Revision: v2.1.26 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:34:19 +0300
branchRCL_3
changeset 25 9ac0a0a7da70
parent 24 0fd27995241b
child 27 f996f87645b0
child 34 71c436fe3ce0
Revision: v2.1.26 Kit: 2010121
build/Makefile.comp
build/Makefile.defs
build/Makefile.nonqt
build/Makefile.project
build/Makefile.subsystem
build/bld.inf
build/buildutils/checkcopyrights.py
build/buildutils/checkfilenames.py
build/buildutils/extractJavaLocFiles_qt.py
build/exports.inf
build/loc/resources.jar
build/makefile.javaversion
build/sis/java_2_0.pkg
build/sis/java_3_1.pkg
inc/build_defines.hrh
inc/java.txt
javacommons/comms/build/comms_0x2002DCA6.mmp
javacommons/comms/ipclib/clientserver/build/ipc_0x2002DCB7.mmp
javacommons/connectionmanager/build/javaconnectionmanager_0x2002DCA7.mmp
javacommons/connectionmanager/javasrc.linux/com/nokia/mj/impl/connectionmanager/AccessPoint.java
javacommons/connectionmanager/javasrc.linux/com/nokia/mj/impl/connectionmanager/ConnectionManager.java
javacommons/connectionmanager/src.linux/connectionmanagerjni.cpp
javacommons/fileutils/build/fileutils_0x2002DCAD.mmp
javacommons/fileutils/inc.linux/drivechangedeventgenerator.h
javacommons/fileutils/javasrc.linux/com/nokia/mj/impl/fileutils/FilePlatformSpecifics.java
javacommons/fileutils/src.linux/drivechangedeventgenerator.cpp
javacommons/fileutils/src.linux/filedrmhandlerjni.cpp
javacommons/fileutils/src.linux/filesystemutils.cpp
javacommons/fileutils/src.linux/linuxdriveutilities.cpp
javacommons/fileutils/src.linux/linuxfilesystemutils.cpp
javacommons/fileutils/src.linux/linuxfilesystemutils.h
javacommons/gcfbase/build/javagcf_0x2002DCAE.mmp
javacommons/gcfbase/javasrc.linux/com/nokia/mj/impl/gcf/utils/ProtocolBase.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/Connection.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/ConnectionNotFoundException.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/Connector.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/ContentConnection.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/InputConnection.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/OutputConnection.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/StreamConnection.java
javacommons/gcfbase/javasrc.linux/javax/microedition/io/StreamConnectionNotifier.java
javacommons/gcfprotocols/file/build/javafile_0x2002DCAC.mmp
javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileAccessHelper.java
javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileSystemUtils.java
javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileUrlValidator.java
javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/gcf/protocol/file/Protocol.java
javacommons/gcfprotocols/file/src.linux/filesystemutilsjni.cpp
javacommons/gcfprotocols/http/build/javahttp_0x2002DCB1.mmp
javacommons/gcfprotocols/http/inc.linux/nativedynamicproperty.h
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/gcf/protocol/http/HttpPermissionImpl.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/gcf/protocol/http/Protocol.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/DateUtil.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpClientConnection.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpInputStreamAdapter.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpMessage.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpMessageParser.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpOutputStreamAdapter.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpRequest.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpResponse.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpStatusLine.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/SocketElement.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/SocketPool.java
javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/properties/http/DynamicPropertyHandler.java
javacommons/gcfprotocols/http/javasrc.linux/javax/microedition/io/HttpConnection.java
javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/BlockingOperation.java
javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/http/BlockingOperation.java
javacommons/gcfprotocols/http/src.linux/dynamicpropertyhandlerjni.cpp
javacommons/gcfprotocols/http/src.linux/nativedynamicproperty.cpp
javacommons/gcfprotocols/https/build/javahttps_0x2002DCB2.mmp
javacommons/gcfprotocols/https/inc.linux/nativehttpsconnection.h
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/gcf/protocol/https/HttpsPermissionImpl.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/gcf/protocol/https/Protocol.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/CertificateImpl.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/HttpsConnectionImpl.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/HttpsElement.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/SecureConnectionPool.java
javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/SecurityInfoImpl.java
javacommons/gcfprotocols/https/javasrc.linux/javax/microedition/io/HttpsConnection.java
javacommons/gcfprotocols/https/src.linux/httpsconnectionimpljni.cpp
javacommons/gcfprotocols/https/src.linux/nativehttpsconnection.cpp
javacommons/gcfprotocols/secureconnection/build/javassl_0x2002DCD7.mmp
javacommons/gcfprotocols/secureconnection/inc.linux/nativecertificatemanager.h
javacommons/gcfprotocols/secureconnection/javasrc.linux/com/mj/impl/gcf/protocol/ssl/Protocol.java
javacommons/gcfprotocols/secureconnection/javasrc.s60/com/mj/impl/gcf/protocol/ssl/Connection.java
javacommons/gcfprotocols/secureconnection/javasrc.s60/com/mj/impl/gcf/protocol/ssl/Protocol.java
javacommons/gcfprotocols/secureconnection/javasrc.s60/com/nokia/mj/impl/gcf/protocol/ssl/Connection.java
javacommons/gcfprotocols/secureconnection/javasrc.s60/com/nokia/mj/impl/gcf/protocol/ssl/Protocol.java
javacommons/gcfprotocols/socket/serverconnection/build/javasocketscplugin_0x2002DCD5.mmp
javacommons/gcfprotocols/socket/socket/build/javasocket_0x2002DCD4.mmp
javacommons/gcfprotocols/socket/socket/javasrc.linux/com/mj/impl/gcf/protocol/socket/Protocol.java
javacommons/gcfprotocols/socket/socket/javasrc.s60/com/mj/impl/gcf/protocol/socket/Connection.java
javacommons/gcfprotocols/socket/socket/javasrc.s60/com/mj/impl/gcf/protocol/socket/Protocol.java
javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Connection.java
javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Protocol.java
javacommons/gcfprotocols/socket/socket/src.linux/apnsettings.cpp
javacommons/gcfprotocols/socket/socket/src.linux/socketlocalhostinfo.cpp
javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp
javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp
javacommons/javaenv/build/bwins/javaenvinfou.def
javacommons/javaenv/build/bwins/javaenvu.def
javacommons/javaenv/build/eabi/javaenvinfou.def
javacommons/javaenv/build/eabi/javaenvu.def
javacommons/javaenv/build/javaenv.pro
javacommons/javaenv/build/javaenv_0x2001B2A5.mmp
javacommons/javaenv/tsrc/build/alltests.mmp
javacommons/javastorage/build/javastorage_0x2002DCD8.mmp
javacommons/javastorage/javasrc.linux/com/nokia/mj/impl/storage/StorageConnection.java
javacommons/javastorage/src.linux/client/javadataaccessimpl.cpp
javacommons/javastorage/src.linux/client/javadataaccessimpl.h
javacommons/jvms/j9utils/threaddump/build/javathreaddumper_0x2002DCD9.mmp
javacommons/jvms/nativeportlayer/build/jvmnativeport_0x2002DCDE.mmp
javacommons/security/build/exports.inf
javacommons/security/build/javasecurity_0x2002DCCF.mmp
javacommons/security/conf/CI_javasecurity.confml
javacommons/security/conf/javasecurity2.confml
javacommons/security/data/att_manufacturer.txt
javacommons/security/data/att_operatorextra.txt
javacommons/security/data/msa_manufacturer.txt
javacommons/security/data/msa_operator.txt
javacommons/security/data/s60_manufacturer.txt
javacommons/security/data/s60_operator.txt
javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/PermissionGranter.java
javacommons/security/javasrc.linux/com/nokia/mj/impl/security/midp/authentication/OcspUserPreferences.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java
javacommons/security/javaunicertstoreplugin/build/exports.inf
javacommons/security/javaunicertstoreplugin/build/javausermessages.loc
javacommons/security/src.linux/fileutils.cpp
javacommons/security/src.linux/fileutils.h
javacommons/security/src.linux/generalsecuritysettings.cpp
javacommons/security/src.linux/ocspchecker.cpp
javacommons/security/src.linux/ocspclient.cpp
javacommons/security/src.linux/ocspclient.h
javacommons/security/src.linux/telutils.cpp
javacommons/security/src.linux/telutils.h
javacommons/security/src/utils/securityutils.cpp
javacommons/security/tsrc/data/policies/test_manufacturer.txt
javacommons/security/tsrc/data/policies/test_operator.txt
javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionGranterTests.java
javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java
javacommons/utils/build/build.xml
javacommons/utils/build/bwins/javautilsu.def
javacommons/utils/build/javautils.pro
javacommons/utils/build/javautils_0x2002DCDA.mmp
javacommons/utils/functionserver/inc/functionserver.h
javacommons/utils/inc.linux/javaosheaders.h
javacommons/utils/inc.linux/jdebug_omj.h
javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/SystemPropertyProperties.java
javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/sun/JvmPortJ2se.java
javacommons/utils/javasrc.linux/com/nokia/mj/impl/utils/OsErrorMessage.java
javacommons/utils/javasrc/com/nokia/mj/impl/rt/DynamicProperty.java
javacommons/utils/javasrc/com/nokia/mj/impl/rt/JvmPort.java
javacommons/utils/javasrc/com/nokia/mj/impl/rt/SystemPropertyHashtable.java
javacommons/utils/javasrc/com/nokia/mj/impl/rt/support/JvmInternal.java
javacommons/utils/javasrc/com/nokia/mj/impl/utils/concurrent/ConditionObject.java
javacommons/utils/javasrc/com/nokia/mj/impl/utils/concurrent/Semaphore.java
javacommons/utils/src.linux/formatternative.cpp
javacommons/utils/src.linux/javaoslayer.cpp
javacommons/utils/src.linux/properties.cpp
javacommons/utils/tsrc/build/build.xml
javacommons/utils/tsrc/build/jiut.bat
javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/properties/test/Property.java
javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/properties/test/Property2.java
javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/rt/SystemPropertyTests.java
javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/concurrent/ConcurrentTests.java
javacommons/utils/tsrc/unittestrunner/runner/build/build.xml
javacommons/utils/tsrc/unittestrunner/runner/build/bwins/javaunittestrunneru.def
javacommons/utils/tsrc/unittestrunner/runner/build/eabi/javaunittestrunneru.def
javacommons/utils/tsrc/unittestrunner/runner/build/javaunittestrunner.pro
javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/test/UnitTestRunner.java
javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/unittestrunner/ApplicationInfoImpl.java
javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/unittestrunner/ApplicationUtilsImpl.java
javacommons/utils/tsrc/unittestrunner/starter/build/javauntitester.pro
javacommons/utils/tsrc/unittestrunner/starter/src/main.cpp
javacommons/utils/tsrc/unittestrunner/subsystem.mk
javaextensions/bluetooth/bluecove/build/javabluecove_0x2002DC97.mmp
javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60bluetoothplatformcontrol.cpp
javaextensions/bluetooth/bluetoothcommons/build/bwins/javabluetoothcommonsu.def
javaextensions/bluetooth/bluetoothcommons/build/eabi/javabluetoothcommonsu.def
javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons.pro
javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons_0x2002DC99.mmp
javaextensions/bluetooth/bluetoothplugins/btgoeppushplugin/build/javabtgoepscplugin_0x2002DC9A.mmp
javaextensions/bluetooth/bluetoothplugins/btjavacaptainplugin/build/javacaptain_ext_btdeviceclassmanager_0x2002DC9D.mmp
javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/bwins/javabtl2capscpluginu.def
javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/eabi/javabtl2capscpluginu.def
javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/javabtl2capscplugin_0x2002DC9B.mmp
javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/inc.s60/btl2capserverconnection.h
javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/bwins/javabtsppscpluginu.def
javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/eabi/javabtsppscpluginu.def
javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/javabtsppscplugin_0x2002DC9C.mmp
javaextensions/bluetooth/bluetoothplugins/btspppushplugin/inc.s60/btrfcommserverconnection.h
javaextensions/bluetooth/omjbluetooth/build/javabluetooth_0x2002DC98.mmp
javaextensions/broadcast_stub/build/javabroadcast_0x2002DCE0.mmp
javaextensions/comm/build/javacomm_0x2002DCA5.mmp
javaextensions/comm/javasrc.linux/com/nokia/mj/impl/gcf/protocol/comm/Protocol.java
javaextensions/datagram/datagram/build/javadatagram_0x2002DCA9.mmp
javaextensions/datagram/datagram/javasrc.linux/com/nokia/mj/impl/gcf/protocol/Protocol.java
javaextensions/datagram/datagram/src.linux/apnsettings.cpp
javaextensions/datagram/datagram/src.s60/apnsettings.cpp
javaextensions/datagram/serverconnection/build/javadatagramscplugin_0x2002DCAA.mmp
javaextensions/globalindicators/build/javaglobalindicators_0x2002DCAF.mmp
javaextensions/iapinfo/build/javaiapinfo_0x2002DCB3.mmp
javaextensions/location/build/javalocation_0x2002DCBC.mmp
javaextensions/location/tsrc/junit/JsrTestRunner.jad
javaextensions/location/tsrc/junit/build.xml
javaextensions/location/tsrc/junit/setup.py
javaextensions/location/tsrc/junit/src/automatic/AddressInfoTest.java
javaextensions/location/tsrc/junit/src/automatic/CoordinatesTest.java
javaextensions/location/tsrc/junit/src/automatic/CriteriaTest.java
javaextensions/location/tsrc/junit/src/automatic/ErrorsTest.java
javaextensions/location/tsrc/junit/src/automatic/GetLocationTest.java
javaextensions/location/tsrc/junit/src/automatic/LandmarkStoreTest.java
javaextensions/location/tsrc/junit/src/automatic/LandmarkTest.java
javaextensions/location/tsrc/junit/src/automatic/MultipleLandmarkStoresTest.java
javaextensions/location/tsrc/junit/src/automatic/OrientationTest.java
javaextensions/location/tsrc/junit/src/automatic/PeriodicUpdateTest.java
javaextensions/location/tsrc/junit/src/automatic/ProximityListenerTest.java
javaextensions/location/tsrc/junit/src/automatic/QualifiedCoordinatesTest.java
javaextensions/location/tsrc/junit/teardown.py
javaextensions/location/tsrc/vipertest/bin/101F7A81.txt
javaextensions/location/tsrc/vipertest/bin/MANIFEST.MF
javaextensions/location/tsrc/vipertest/bin/build.bat
javaextensions/location/tsrc/vipertest/bin/buildmidlet.bat
javaextensions/location/tsrc/vipertest/bin/rmlmdb.bat
javaextensions/location/tsrc/vipertest/bin/unittestinstructions.txt
javaextensions/location/tsrc/vipertest/bin/updatejarsize.pl
javaextensions/location/tsrc/vipertest/bin/vipertest.jad
javaextensions/location/tsrc/vipertest/bin/vipertest.png
javaextensions/location/tsrc/vipertest/bin/vipertestsimpsy.sps
javaextensions/location/tsrc/vipertest/src/AddressInfoTest.java
javaextensions/location/tsrc/vipertest/src/CoordinatesTest.java
javaextensions/location/tsrc/vipertest/src/CriteriaTest.java
javaextensions/location/tsrc/vipertest/src/ErrorsTest.java
javaextensions/location/tsrc/vipertest/src/GetLocationTest.java
javaextensions/location/tsrc/vipertest/src/LandmarkStoreTest.java
javaextensions/location/tsrc/vipertest/src/LandmarkTest.java
javaextensions/location/tsrc/vipertest/src/MultipleLandmarkStoresTest.java
javaextensions/location/tsrc/vipertest/src/PeriodicUpdateTest.java
javaextensions/location/tsrc/vipertest/src/QualifiedCoordinatesTest.java
javaextensions/location/tsrc/vipertest/src/ViperPreferences.java
javaextensions/location/tsrc/vipertest/src/ViperTest.java
javaextensions/location/tsrc/vipertest/src/ViperUnitTest.java
javaextensions/location/tsrc/vipertestpsy/group/bld.inf
javaextensions/location/tsrc/vipertestpsy/group/vipertestpsy.mmp
javaextensions/location/tsrc/vipertestpsy/group/vipertestpsyext.mak
javaextensions/location/tsrc/vipertestpsy/resource/01010176.txt
javaextensions/location/tsrc/vipertestpsy/resource/13070BF3.rss
javaextensions/location/tsrc/vipertestpsy/resource/ViperTestPsy.hrh
javaextensions/location/tsrc/vipertestpsy/src/vipertestpsy.cpp
javaextensions/midppush/build/javapushregistry_0x2002DCC9.mmp
javaextensions/midppush/pushcontroller/build/javapushcontroller_0x2002DCC8.mmp
javaextensions/midppush/pushregistryplugin/build/javacaptain_ext_pushregistryplugin_0x2002DCA2.mmp
javaextensions/midprms_db/build/javarms_0x2002DCCB.mmp
javaextensions/midprms_db/rmsplugin/build/javacaptain_ext_ondemand_2_0x2002DD01.mmp
javaextensions/mobinfo/build/mobinfo_0x2002DCC3.mmp
javaextensions/mobinfo/tsrc/build/build.xml
javaextensions/mobinfo/tsrc/build/jiut.bat
javaextensions/mobinfo/tsrc/javasrc/com/nokia/mj/impl/properties/mobinfo/TestProperties.java
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/build.xml
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/compiled/dummy.txt
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/preprocessed/hello/HelloMIDlet.java
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/preverified/dummy.txt
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/dist/MobInfoProp.jad
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/dist/MobInfoProp.jar
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/dist/lib/dummy.txt
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/buildimpl.xml
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/genfiles.properties
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/private/private.properties
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/private/private.xml
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/project.properties
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/project.xml
javaextensions/mobinfo/tsrc/midlet/mobinfoprop/src/hello/HelloMIDlet.java
javaextensions/pim/agnadapter/inc.s60/cpimagnlistadapter.h
javaextensions/pim/agnadapter/inc.s60/cpimeventadapteraccess.h
javaextensions/pim/agnadapter/inc.s60/cpimeventlistadapter.h
javaextensions/pim/agnadapter/inc.s60/cpimtodoadapteraccess.h
javaextensions/pim/agnadapter/inc.s60/cpimtodolistadapter.h
javaextensions/pim/agnadapter/src.s60/cpimagnlistadapter.cpp
javaextensions/pim/agnadapter/src.s60/cpimeventadapteraccess.cpp
javaextensions/pim/agnadapter/src.s60/cpimeventlistadapter.cpp
javaextensions/pim/agnadapter/src.s60/cpimtodoadapteraccess.cpp
javaextensions/pim/agnadapter/src.s60/cpimtodolistadapter.cpp
javaextensions/pim/build/javapim_0x2002DCC5.mmp
javaextensions/pim/cntadapter/inc.s60/cpimcmadapteraccess.h
javaextensions/pim/cntadapter/src.s60/cpimcmadapteraccess.cpp
javaextensions/pim/common/inc.s60/mpimadapteraccess.h
javaextensions/pim/framework/inc.s60/cpimmanager.h
javaextensions/pim/framework/src.s60/cpimmanager.cpp
javaextensions/pim/tsrc/JsrTestRunner.jad
javaextensions/pim/tsrc/JsrTestRunner.jar
javaextensions/pim/tsrc/ReadMe.txt
javaextensions/pim/tsrc/build.xml
javaextensions/pim/tsrc/res/1.vcf
javaextensions/pim/tsrc/res/3.vcf
javaextensions/pim/tsrc/res/6.vcf
javaextensions/pim/tsrc/res/agent.dat
javaextensions/pim/tsrc/res/appointment.vcs
javaextensions/pim/tsrc/res/broken.vcf
javaextensions/pim/tsrc/res/invalid1.vcf
javaextensions/pim/tsrc/res/invalid2.vcf
javaextensions/pim/tsrc/res/invalid3.vcf
javaextensions/pim/tsrc/res/invalid4.vcf
javaextensions/pim/tsrc/res/invalid5.vcf
javaextensions/pim/tsrc/res/invalid6.vcf
javaextensions/pim/tsrc/res/timed-appointment.vcs
javaextensions/pim/tsrc/res/todoPriority1.vcs
javaextensions/pim/tsrc/res/todoPriority2.vcs
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/ItemTool.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/MIDPTest.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TestEndThrowable.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TestParameters.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TimeTool.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CConstants/CConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CcommitPartial/CcommitPartial.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CcommitUpdate/CcommitUpdate.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CgetPreferredIndex/CgetPreferredIndex.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CgetPreferredIndexEx/CgetPreferredIndexEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLcategoryTests/CLcategoryTests.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLcreateContact/CLcreateContact.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLfieldsOrder/CLfieldsOrder.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLgetAttributes/CLgetAttributes.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLimportContact/CLimportContact.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLmaxValues/CLmaxValues.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLmultipleLists/CLmultipleLists.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLremoveContact/CLremoveContact.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLremoveContactEx/CLremoveContactEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLserialFormatTests/CLserialFormatTests.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLstringMaxLen/CLstringMaxLen.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedArrayElements/CLsupportedArrayElements.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedAttributes/CLsupportedAttributes.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedFields/CLsupportedFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/EConstants/EConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/ERepeat/ERepeat.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/Ecommit/Ecommit.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELConstants/ELConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELcreateEvent/ELcreateEvent.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELfieldsOrder/ELfieldsOrder.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELgetSupportedRRFields/ELsupportedRRFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELimportEvent/ELimportEvent.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELitems/ELitems.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELitemsEx/ELitemsEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELmultipleLists/ELmultipleLists.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELremoveEvent/ELremoveEvent.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELremoveEventEx/ELremoveEventEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELserialFormatTests/ELserialFormatTests.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELstringMaxLen/ELstringMaxLen.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELsupportedFields/ELsupportedFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELsupportedRRFields2/ELsupportedRRFields2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/FieldEmptyException/FEEgetField/FEEgetField.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/FieldFullException/FFEgetField/FFEgetField.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/OpenMultipleLists.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PConstants/PConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSFormatInvalid/PfromSerialFormatInvalid.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSerialFormat/PfromSerialFormatTest.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSerialFormatEx/PfromSerialFormatExTest.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PlistPIMlists/PlistPIMlists.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PopenPIMlist/PopenPIMlist.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PopenPIMlist2/PopenPIMlist2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/Pserialization/Pserialization.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PsupportedSerialFormats/PsupportedSerialFormats.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PtoSerialFormat/PtoSerialFormat/PtoSerialFormatTest.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PtoSerialFormat/PtoSerialFormatEx/PtoSerialFormatEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMException/PEconstants/PEconstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMException/PEgetReason/PEgetReason.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIConstants/PIConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBinary/PIaddBinary.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBinaryEx/PIaddBinaryEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBoolean/PIaddBoolean.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddDate/PIaddDate.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddDateEx/PIaddDateEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddInt/PIaddInt.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddString/PIaddString.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddStringArray/PIaddStringArray.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddStringArrayEx/PIaddStringArrayEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcategories/PIcategories.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcommit/PIcommit.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcommit2/PIcommit2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetAttributes/PIgetAttributes.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetFields/PIgetFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetPIMList/PIgetPIMList.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIremoveValue/PIremoveValue.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIremoveValueEx/PIremoveValueEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBinary/PIsetBinary.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBinaryEx/PIsetBinaryEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBoolean/PIsetBoolean.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetDate/PIsetDate.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetDateEx/PIsetDateEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetInt/PIsetInt.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetString/PIsetString.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetStringArray/PIsetStringArray.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetStringArrayEx/PIsetStringArrayEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLConstants/PLConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLaddCategory/PLaddCategory.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLattributes/PLattributes.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLclose/PLclose.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLdeleteCategory/PLdeleteCategory.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLfields/PLfields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLgetName/PLgetName.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLisCategory/PLisCategory.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems/PLitems.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems2/PLitems2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems2Ex/PLitems2Ex.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitemsByCategory/PLitemsByCategory.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLrenameCategory/PLrenameCategory.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLstringArrays/PLstringArrays.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLcategoryTester.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLitemTester.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLpriorityTester.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLstringMaxLen.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLsupportTester.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PfromSerialFormat.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PserializationTester.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PtoSerialFormat.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRConstants/RRConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldCount/RRintFieldCount.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInMonth/RRintFieldDayInMonth.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInWeek/RRintFieldDayInWeek.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInYear/RRintFieldDayInYear.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldFrequency/RRintFieldFrequency.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldInterval/RRintFieldInterval.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldMonthInYear/RRintFieldMonthInYear.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldWeekInMonth/RRintFieldWeekInMonth.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates/RRdates.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates2/RRdates2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates3/RRdates3.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates4/RRdates4.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdatesExcept/RRdatesExcept.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRequals/RRequals.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRequals2/RRequals2.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRexceptDates/RRexceptDates.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRgetDate/RRgetDate.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRgetFields/RRgetFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRintField.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRsetDate/RRsetDate.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/SupportTestData.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/System/Properties/SystemPropertiesTest.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDo/TConstants/TConstants.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDo/Tcommit/Tcommit.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLcreateToDo/TLcreateToDo.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLfieldsOrder/TLfieldsOrder.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLimportToDo/TLimportToDo.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLitems/TLitems.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLitemsEx/TLitemsEx.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLmultipleLists/TLmultipleLists.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLpriorityMappings/TLpriorityMappings.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLremoveToDo/TLremoveToDo.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLserialFormatTests/TLserialFormatTests.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLstringMaxLen/TLstringMaxLen.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLsupportedFields/TLsupportedFields.java
javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/UnsupportedFieldException/UFEgetField/UFEgetField.java
javaextensions/satsa/apdu/javasrc.s60/com/nokia/mj/impl/APDUError.java
javaextensions/satsa/apdu/javasrc.s60/com/nokia/mj/impl/satsa/APDUError.java
javaextensions/satsa/build/javasatsa_0x2002DCCE.mmp
javaextensions/sensor/build/javasensor_0x2002DCD0.mmp
javaextensions/sensor/javasrc.s60/com/mj/impl/gcf/protocol/sensor/Connection.java
javaextensions/sensor/javasrc.s60/com/mj/impl/gcf/protocol/sensor/Protocol.java
javaextensions/sensor/javasrc.s60/com/nokia/mj/impl/gcf/protocol/sensor/Connection.java
javaextensions/sensor/javasrc.s60/com/nokia/mj/impl/gcf/protocol/sensor/Protocol.java
javaextensions/sensor/src.s60/cacceleratorsensor.cpp
javaextensions/subsystem.mk
javaextensions/webservices/build/javawebservices_0x2002DCDB.mmp
javaextensions/wma/mms/build/javawmamms_0x2002DCDD.mmp
javaextensions/wma/mms/pushplugin/build/javammsscplugin_0x2002DCC1.mmp
javaextensions/wma/mms/tsrc/exhaustivetests/JsrTestRunner.jad
javaextensions/wma/mms/tsrc/exhaustivetests/build.xml
javaextensions/wma/mms/tsrc/exhaustivetests/data/MMSs.zip
javaextensions/wma/mms/tsrc/exhaustivetests/data/localmode.ini
javaextensions/wma/mms/tsrc/exhaustivetests/javasrc/com/nokia/mj/test/wma/TestReceive.java
javaextensions/wma/mms/tsrc/exhaustivetests/runTests.bat
javaextensions/wma/mms/tsrc/generictests/JsrTestRunner.jad
javaextensions/wma/mms/tsrc/generictests/build.xml
javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestMessageConnection.java
javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestMessagePart.java
javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestOpenConnection.java
javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestReceive.java
javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestSend.java
javaextensions/wma/mms/tsrc/generictests/runTests.bat
javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaException.java
javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaTestBase.java
javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaTestUtils.java
javaextensions/wma/mms/tsrc/multithreadingtests/JsrTestRunner.jad
javaextensions/wma/mms/tsrc/multithreadingtests/build.xml
javaextensions/wma/mms/tsrc/multithreadingtests/javasrc/com/nokia/mj/test/wma/TestShareConnection.java
javaextensions/wma/mms/tsrc/multithreadingtests/javasrc/com/nokia/mj/test/wma/WmaMultiThreadingTestBase.java
javaextensions/wma/mms/tsrc/multithreadingtests/runTests.bat
javaextensions/wma/mms/tsrc/pushtests/JsrTestRunner.jad
javaextensions/wma/mms/tsrc/pushtests/build.xml
javaextensions/wma/mms/tsrc/pushtests/compileAndInstall.bat
javaextensions/wma/mms/tsrc/pushtests/data/WmaPush.jad
javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushReceiver.java
javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushSender.java
javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushStaticReceiver.java
javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushUtils.java
javaextensions/wma/sms_cbs/build/javawma_0x2002DCDC.mmp
javaextensions/wma/sms_cbs/pushplugin/cbs/build/javacbsscplugin_0x2002DCA4.mmp
javaextensions/wma/sms_cbs/pushplugin/sms/build/javasmsscplugin_0x2002DCD3.mmp
javamanager/bld.inf
javamanager/debugapi/build/debugapi_0x2002DCAB.mmp
javamanager/javaappschemeplugin/build/javaappschemeplugin.mmp
javamanager/javaappschemeplugin/src/javaapphandler.cpp
javamanager/javabackup/midp2backup/build/midp2backupplugin.mmp
javamanager/javabackup/midp2backup/src.s60/midp2backupplugin.cpp
javamanager/javacaptain/build/javacaptain_0x200211DC.mmp
javamanager/javacaptain/extensionplugins/boot/src/booteventprovider.cpp
javamanager/javacaptain/extensionplugins/config/build/javacaptain_ext_config_0x2002DC9E.mmp
javamanager/javacaptain/extensionplugins/javacertstore/build/javacaptain_ext_javacertstore_0x2002DC9F.mmp
javamanager/javacaptain/extensionplugins/javacertstore/inc/javacertstore.h
javamanager/javacaptain/extensionplugins/javacertstore/src.linux/javasmartcardcertificatesreader.cpp
javamanager/javacaptain/extensionplugins/javacertstore/src.linux/metadatafilehandler.cpp
javamanager/javacaptain/extensionplugins/javacertstore/src.s60/metadatafilehandler.cpp
javamanager/javacaptain/extensionplugins/javacertstore/src/javacertstore.cpp
javamanager/javacaptain/extensionplugins/preinstallerstarter/build/javacaptain_ext_preinstallerstarter_0x2002DCA0.mmp
javamanager/javacaptain/extensionplugins/storageserver/build/javacaptain_ext_storageserverplugin_0x2002DCA3.mmp
javamanager/javacaptain/extensionplugins/storageserver/src.linux/storageserverplugin.cpp
javamanager/javacaptain/extensionplugins/storageserver/src.linux/storageserverplugin.h
javamanager/javacaptain/inc.linux/pmc.h
javamanager/javacaptain/inc.linux/signalhandler.h
javamanager/javacaptain/inc.linux/signalhandlermessages.h
javamanager/javacaptain/inc.linux/tickerprovider.h
javamanager/javacaptain/inc/coremessages.h
javamanager/javacaptain/src.linux/pmc.cpp
javamanager/javacaptain/src.linux/signalhandler.cpp
javamanager/javacaptain/src.linux/tickerprovider.cpp
javamanager/javacaptain/src/core.cpp
javamanager/javacaptain/src/main.cpp
javamanager/javacaptain/src/rtc.cpp
javamanager/javacaptain/src/rtc.h
javamanager/javainstaller/installer/build/exports.inf
javamanager/javainstaller/installer/build/javainstaller.pro
javamanager/javainstaller/installer/build/javainstaller_0x2002DCB4.mmp
javamanager/javainstaller/installer/conf/CI_javainstaller.confml
javamanager/javainstaller/installer/conf/javainstaller2.confml
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/SifNotifier.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/customisationproperties/CustomisationProperties.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/jadjarmatcher/JadJarMatcher.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifier.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/FileRoots.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/FileWriter.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/PlatformUid.java
javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/SysUtil.java
javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/InstallerResultMessage.java
javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/exetable/ExeBall.java
javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/UninstallBall.java
javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java
javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/Log.java
javamanager/javainstaller/installer/src.s60/applicationregistrator/sifnotifier.cpp
javamanager/javainstaller/installer/src.s60/applicationregistrator/sifregistrator.cpp
javamanager/javainstaller/installerui/build/javainstallerui_0x2002DCB6.mmp
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiListener.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/CertificateDetailsView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ConfirmationViewBase.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorDetailsView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallConfirmationView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiEswt.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiTexts.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionDetailsView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/UninstallConfirmationView.java
javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ViewBase.java
javamanager/javalauncher/build/javalauncher_0x2001E262.mmp
javamanager/javalauncher/src.s60/javalauncher.cpp
javamanager/javalauncher/tsrc/midlets/midlet_n_test/Launcher.java
javamanager/javalauncher/tsrc/midlets/midlet_n_test/LocalAppSuite.jad
javamanager/javalauncher/tsrc/midlets/midlet_n_test/LocalAppSuite.jar
javamanager/javalauncher/tsrc/midlets/midlet_n_test/base/RunnerBase.java
javamanager/javalauncher/tsrc/midlets/midlet_n_test/test1/Runner1.java
javamanager/javalauncher/tsrc/midlets/midlet_n_test/test2/Runner2.java
javamanager/javalauncher/tsrc/midlets/midlet_n_test/test3/Runner3.java
javamanager/javalauncher/tsrc/midlets/midlet_n_test/test4/Runner4.java
javamanager/javalauncher/tsrc/midlets/plat_req/plat_req.jad
javamanager/javalauncher/tsrc/midlets/sptest/sptesti.jad
javamanager/javalauncher/tsrc/midlets/sptest/sptesti.jar
javamanager/javalauncher/tsrc/midlets/sptest/testimidletti.java
javamanager/javalauncher/tsrc/testmidletstart/src.s60/main.cpp
javamanager/javamanager.pro
javamanager/javaregistry/build/javaregistryclient_0x10282476.mmp
javamanager/javaregistry/javasizehelper/client/build/javasizehelperclient_0x2002DCD1.mmp
javamanager/javaregistry/javasizehelper/server/build/javasizehelperserver_0x2002DCD2.mmp
javamanager/javasettings/appsettingsview_qt/build/javaapplicationsettingsview.pro
javamanager/javasettings/appsettingsview_qt/inc/applicationsettingsview.h
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.cpp
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.h
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.cpp
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.h
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.cpp
javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.h
javamanager/javasettings/bld.inf
javamanager/javasettings/javasettings.pro
javamanager/javasettings/subsystem.mk
javamanager/preinstaller/build/javapreinstaller_0x2002DCC6.mmp
javamanager/subsystem.mk
javaruntimes/installer/starterdll/build/javainstallerstarter_0x2002DCB5.mmp
javaruntimes/installer/starterdll/src/main.cpp
javaruntimes/installer/starterexe/build/javainstaller_0x2001843A.mmp
javaruntimes/jvmargmodifier/default/build/javajvmargsmodifier_0x2002DCB8.mmp
javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile_0x2002DCB9.mmp
javaruntimes/midp/runtime/build/javamidpruntime_0x2002DCBF.mmp
javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java
javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java
javaruntimes/midp/runtime/src.linux/platformimpl.cpp
javaruntimes/midp/runtime/src.linux/platformrequesthandler.cpp
javaruntimes/midp/runtime/src.linux/platformrequesthandler.h
javaruntimes/midp/runtime/tsrc/rttests/build/build.xml
javaruntimes/midp/runtime/tsrc/rttests/build/rt.bat
javaruntimes/midp/runtime/tsrc/rttests/javasrc/com/nokia/mj/impl/rt/midp/UtilTests.java
javaruntimes/midp/runtimestarter/build/javamidpstarter_0x2002DCC0.mmp
javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp
javaruntimes/standalone/tsrc/data/javastandalone_reg.rss
javaruntimes/standalone/tsrc/sis/javastandalone.pkg
javaruntimes/standalone/tsrc/sis/jvmargs.txt
javaruntimes/standalone/tsrc/src/main.cpp
javaruntimes/starter/build/java_0x102033E6.mmp
javaruntimes/starter/build/javamidp_installer.pkg
javaruntimes/starter/build/javamidp_template.pkg
javaruntimes/starterutils/build/javaruntimestarterutils_0x2002DCCC.mmp
javaruntimes/starterutils/src.linux/bootclasspath.cpp
javaruntimes/starterutils/src.linux/jvmstarterjni.cpp
javaruntimes/starterutils/src.linux/jvmstarterjni.h
javaruntimes/starterutils/src.linux/osthreadsupervisor.cpp
javaruntimes/starterutils/src.linux/osthreadsupervisor.h
javatools/certificatesconfigurator/build/javacertificatesconfigurator.pro
javatools/certificatesconfigurator/src.s60/main.cpp
javatools/certificatesconfigurator/src.s60/trustrootpolicy.cpp
javatools/certificatesconfigurator/src.s60/trustrootpolicy.h
javatools/certificatesconfigurator/tsrc/Makefile
javatools/certificatesconfigurator/tsrc/build/antcleanupcertificatesconfiguratortests.mk
javatools/certificatesconfigurator/tsrc/build/antpreparecertificatesconfiguratortests.mk
javatools/certificatesconfigurator/tsrc/build/bld.inf
javatools/certificatesconfigurator/tsrc/build/build.xml
javatools/certificatesconfigurator/tsrc/build/certificatesconfiguratorunittests.mmp
javatools/certificatesconfigurator/tsrc/build/runTests.bat
javatools/certificatesconfigurator/tsrc/data/midp2_trp.xml
javatools/certificatesconfigurator/tsrc/data/roots.zip
javatools/certificatesconfigurator/tsrc/data/states.zip
javatools/certificatesconfigurator/tsrc/src/certificatesconfiguratorunittests.cpp
javatools/certificatesconfigurator/tsrc/src/certificatesconfiguratorunittests.h
javatools/certificatesconfigurator/tsrc/src/testcertificatesconfigurator.cpp
javatools/javaappbackconverter/build/javaappbackconverter.pro
javatools/javaappbackconverter/src.s60/backconverter.cpp
javatools/javaappbackconverter/src.s60/backconverter.h
javatools/javaappbackconverter/src.s60/main.cpp
javatools/javaappconverter/build/javaappconverter.pro
javatools/javaappconverter/src.s60/convertserver.cpp
javatools/javaappconverter/src.s60/convertserver.h
javatools/javaappconverter/src.s60/main.cpp
javatools/javaappconverter/src.s60/silentmidletconvert.cpp
javatools/javaappconverter/src.s60/silentmidletconvert.h
javatools/javaapppreconverter/build/exports.inf
javatools/javaapppreconverter/build/javaapppreconverter.pro
javatools/javaapppreconverter/legacy/inc/MDatabaseV2.h
javatools/javaapppreconverter/legacy/inc/MMIDletTableIterator.h
javatools/javaapppreconverter/legacy/inc/MMIDletTableV2.h
javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2.dso
javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2.lib
javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2_000a0000_.dso
javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2_000a0000_.lib
javatools/javaapppreconverter/legacy/lib/winscw/udeb/midp2dbv2.lib
javatools/javaapppreconverter/legacy/lib/winscw/urel/midp2dbv2.dll
javatools/javaapppreconverter/src.s60/main.cpp
javatools/javaapppreconverter/src.s60/midletlist.cpp
javatools/javaapppreconverter/src.s60/midletlist.h
javatools/javaapppreconverter/src.s60/noarmlogs.h
javatools/javaapppreconverter/src.s60/preconverter.cpp
javatools/javaapppreconverter/src.s60/preconverter.h
javatools/javacleaner/build/javacleaner.pro
javatools/javacleaner/src.s60/main.cpp
javatools/javamgr/build/javamgr.pro
javatools/javamgr/src/javamgr.cpp
javatools/javapostupdater/build/javapostupdater.pro
javatools/javapostupdater/src/main.cpp
javatools/javarestoreconverter/build/javarestoreconverter.pro
javatools/javarestoreconverter/src.s60/main.cpp
javatools/javarestoreconverter/src.s60/restoreconvertmidlet.cpp
javatools/javarestoreconverter/src.s60/restoreconvertmidlet.h
javatools/javarestoreconverter/src.s60/restoreserver.cpp
javatools/javarestoreconverter/src.s60/restoreserver.h
javatools/javarestoreconverter/tsrc/testrestorestart/build/testrestorestart.pro
javatools/javarestoreconverter/tsrc/testrestorestart/src.s60/main.cpp
javatools/javasecuritycustomization/build/javasecuritycustomization_0x20028786.mmp
javatools/javasecuritycustomization/javasecuritycustomizationtool.pl
javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java
javatools/javaupdater/build/javaupdater.pro
javatools/javaupdater/src/main.cpp
javatools/javaupdater/src/systemamstraderprivateclient.cpp
javatools/javaupdater/src/systemamstraderprivateclient.h
javatools/subsystem.mk
javatools/tckrunner/runner/build/tckrunner_0x2002DCE3.mmp
javatools/tckrunner/starter/build/tckrunner_0x2002121E.mmp
javatools/usersettingsconfigurator/build/javausersettingsconfigurator.pro
javatools/usersettingsconfigurator/src.s60/main.cpp
javatools/usersettingsconfigurator/src.s60/storagehandler.cpp
javatools/usersettingsconfigurator/src.s60/storagehandler.h
javatools/usersettingsconfigurator/tsrc/Makefile
javatools/usersettingsconfigurator/tsrc/build/bld.inf
javatools/usersettingsconfigurator/tsrc/build/usersettingsconfiguratorunittests.mmp
javatools/usersettingsconfigurator/tsrc/src/testusersettingsconfigurator.cpp
javatools/usersettingsconfigurator/tsrc/src/usersettingsconfiguratorunittests.cpp
javatools/usersettingsconfigurator/tsrc/src/usersettingsconfiguratorunittests.h
javatools/usersettingsconfigurator/tsrc/src/utils/teststoragehandler.cpp
javatools/usersettingsconfigurator/tsrc/src/utils/teststoragehandler.h
javauis/amms_akn/build/build.xml
javauis/amms_akn/build/javaamms_0x2002DC96.mmp
javauis/amms_akn/javasrc/javax/microedition/amms/MediaProcessorListener.java
javauis/amms_qt/ammscontrol/audio3D/inc/cammsaudio3dcontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/inc/cammscommitcontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/inc/cammsdistanceattenuationcontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/inc/cammsdopplercontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/inc/cammslocationcontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/inc/cammsorientationcontrolgroup.h
javauis/amms_qt/ammscontrol/audio3D/src/cammsaudio3dcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audio3D/src/cammscommitcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audio3D/src/cammsdistanceattenuationcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audio3D/src/cammsdopplercontrolgroup.cpp
javauis/amms_qt/ammscontrol/audio3D/src/cammslocationcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audio3D/src/cammsorientationcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audioeffect/inc/cammsaudiovirtualizercontrolgroup.h
javauis/amms_qt/ammscontrol/audioeffect/inc/cammseffectcontrolgroup.h
javauis/amms_qt/ammscontrol/audioeffect/inc/cammsequalizercontrolgroup.h
javauis/amms_qt/ammscontrol/audioeffect/inc/cammsreverbcontrolgroup.h
javauis/amms_qt/ammscontrol/audioeffect/inc/cammsreverbsourcecontrolgroup.h
javauis/amms_qt/ammscontrol/audioeffect/src/cammsaudiovirtualizercontrolgroup.cpp
javauis/amms_qt/ammscontrol/audioeffect/src/cammseffectcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audioeffect/src/cammsequalizercontrolgroup.cpp
javauis/amms_qt/ammscontrol/audioeffect/src/cammsreverbcontrolgroup.cpp
javauis/amms_qt/ammscontrol/audioeffect/src/cammsreverbsourcecontrolgroup.cpp
javauis/amms_qt/ammscontrol/inc/cammspancontrolgroup.h
javauis/amms_qt/ammscontrol/inc/cammsvolumecontrolgroup.h
javauis/amms_qt/ammscontrol/src/cammspancontrolgroup.cpp
javauis/amms_qt/ammscontrol/src/cammsvolumecontrolgroup.cpp
javauis/amms_qt/build/build.xml
javauis/amms_qt/build/bwins/javaammsu.def
javauis/amms_qt/build/eabi/javaammsu.def
javauis/amms_qt/build/javaamms.pro
javauis/amms_qt/javasrc/com/nokia/amms/AMMSError.java
javauis/amms_qt/javasrc/com/nokia/amms/AMMSPlugin.java
javauis/amms_qt/javasrc/com/nokia/amms/ControlContainer.java
javauis/amms_qt/javasrc/com/nokia/amms/EffectModuleImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/GlobalManagerImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/MMAInvokeListenerImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/ModuleBase.java
javauis/amms_qt/javasrc/com/nokia/amms/SoundSource3DImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/SpectatorImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/ControlImpl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/EffectControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/PanControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/PriorityControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/VolumeControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/CommitControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/DistanceAttenuationControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/DopplerControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/LocationControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/OrientationControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/AudioVirtualizerControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/EqualizerControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/ReverbControl.java
javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/ReverbSourceControl.java
javauis/amms_qt/javasrc/com/nokia/mid/impl/media/AudioOutput.java
javauis/amms_qt/javasrc/com/nokia/mid/impl/media/AudioOutputControl.java
javauis/amms_qt/javasrc/com/nokia/mid/media/AudioOutput.java
javauis/amms_qt/javasrc/com/nokia/mid/media/AudioOutputControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/EffectModule.java
javauis/amms_qt/javasrc/javax/microedition/amms/GlobalManager.java
javauis/amms_qt/javasrc/javax/microedition/amms/MediaProcessor.java
javauis/amms_qt/javasrc/javax/microedition/amms/MediaProcessorListener.java
javauis/amms_qt/javasrc/javax/microedition/amms/Module.java
javauis/amms_qt/javasrc/javax/microedition/amms/SoundSource3D.java
javauis/amms_qt/javasrc/javax/microedition/amms/Spectator.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/AudioFormatControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/ContainerFormatControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/EffectControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/EffectOrderControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/FormatControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/ImageFormatControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/MIDIChannelControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/PanControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/PriorityControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/VideoFormatControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/CommitControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DirectivityControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DistanceAttenuationControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DopplerControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/LocationControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/MacroscopicControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/ObstructionControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/OrientationControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/AudioVirtualizerControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ChorusControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/EqualizerControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ReverbControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ReverbSourceControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/CameraControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/ExposureControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/FlashControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/FocusControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/SnapshotControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/ZoomControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageEffectControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageTonalityControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageTransformControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/OverlayControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/WhiteBalanceControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/tuner/RDSControl.java
javauis/amms_qt/javasrc/javax/microedition/amms/control/tuner/TunerControl.java
javauis/amms_qt/jni/src/ammsplugin.cpp
javauis/amms_qt/jni/src/audiooutputcontrol.cpp
javauis/amms_qt/jni/src/commitcontrol.cpp
javauis/amms_qt/jni/src/controlcontainer.cpp
javauis/amms_qt/jni/src/distanceattenuationcontrol.cpp
javauis/amms_qt/jni/src/dopplercontrol.cpp
javauis/amms_qt/jni/src/effectcontrol.cpp
javauis/amms_qt/jni/src/equalizercontrol.cpp
javauis/amms_qt/jni/src/globalmanager.cpp
javauis/amms_qt/jni/src/locationcontrol.cpp
javauis/amms_qt/jni/src/modulebase.cpp
javauis/amms_qt/jni/src/orientationcontrol.cpp
javauis/amms_qt/jni/src/pancontrol.cpp
javauis/amms_qt/jni/src/prioritycontrol.cpp
javauis/amms_qt/jni/src/reverbcontrol.cpp
javauis/amms_qt/jni/src/reverbsourcecontrol.cpp
javauis/amms_qt/jni/src/volumecontrol.cpp
javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiodopplercontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiolocationcontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiovirtualizercontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiovirtualizerenvironmentalpresetutility.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcbasemmfdevsound.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcdistanceattenuationcontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcequalizercontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcequalizerenvironmentalpresetutility.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbcontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbenvironmentalpresetutility.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbsourcecontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatordopplercontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatorlocationcontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatororientationcontrol.h
javauis/amms_qt/mmacontrol/inc.emc/cammspancontrol.h
javauis/amms_qt/mmacontrol/inc.mmf/cammspancontrol.h
javauis/amms_qt/mmacontrol/inc/cammsaudiodopplercontrol.h
javauis/amms_qt/mmacontrol/inc/cammsaudiolocationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsaudiooutputcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsaudioplayerbuilder.h
javauis/amms_qt/mmacontrol/inc/cammsaudiovirtualizercontrol.h
javauis/amms_qt/mmacontrol/inc/cammsbasedistanceattenuationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsbaseequalizercontrol.h
javauis/amms_qt/mmacontrol/inc/cammsbasereverbcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsbasereverbsourcecontrol.h
javauis/amms_qt/mmacontrol/inc/cammscontrol.h
javauis/amms_qt/mmacontrol/inc/cammscustomcommandutility.h
javauis/amms_qt/mmacontrol/inc/cammsdistanceattenuationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsdopplercontrol.h
javauis/amms_qt/mmacontrol/inc/cammseffectcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsequalizercontrol.h
javauis/amms_qt/mmacontrol/inc/cammslocationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsorientationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsplayerbuilder.h
javauis/amms_qt/mmacontrol/inc/cammsplayerbuildergroup.h
javauis/amms_qt/mmacontrol/inc/cammsprioritycontrol.h
javauis/amms_qt/mmacontrol/inc/cammsreverbcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsreverbsourcecontrol.h
javauis/amms_qt/mmacontrol/inc/cammsspectatordopplercontrol.h
javauis/amms_qt/mmacontrol/inc/cammsspectatorlocationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsspectatororientationcontrol.h
javauis/amms_qt/mmacontrol/inc/cammsvolumecontrol.h
javauis/amms_qt/mmacontrol/inc/cammsvolumecontrolbuilder.h
javauis/amms_qt/mmacontrol/src.emc/cammsaudioplayerbuilder.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiodopplercontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiolocationcontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiovirtualizercontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiovirtualizerenvironmentalpresetutility.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcbasemmfdevsound.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcdistanceattenuationcontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcequalizercontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcequalizerenvironmentalpresetutility.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbcontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbenvironmentalpresetutility.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbsourcecontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatordopplercontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatorlocationcontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatororientationcontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammspancontrol.cpp
javauis/amms_qt/mmacontrol/src.emc/cammsprioritycontrol.cpp
javauis/amms_qt/mmacontrol/src.mmf/cammsaudioplayerbuilder.cpp
javauis/amms_qt/mmacontrol/src.mmf/cammspancontrol.cpp
javauis/amms_qt/mmacontrol/src.mmf/cammsprioritycontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsaudiodopplercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsaudiolocationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsaudiooutputcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsaudiovirtualizercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsbasedistanceattenuationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsbaseequalizercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsbasereverbcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsbasereverbsourcecontrol.cpp
javauis/amms_qt/mmacontrol/src/cammscontrol.cpp
javauis/amms_qt/mmacontrol/src/cammscustomcommandutility.cpp
javauis/amms_qt/mmacontrol/src/cammsdistanceattenuationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsdopplercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammseffectcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsequalizercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammslocationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsorientationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsplayerbuilder.cpp
javauis/amms_qt/mmacontrol/src/cammsplayerbuildergroup.cpp
javauis/amms_qt/mmacontrol/src/cammsreverbcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsreverbsourcecontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsspectatordopplercontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsspectatorlocationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsspectatororientationcontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsvolumecontrol.cpp
javauis/amms_qt/mmacontrol/src/cammsvolumecontrolbuilder.cpp
javauis/amms_qt/module/inc/ammsconstants.h
javauis/amms_qt/module/inc/ammsutil.h
javauis/amms_qt/module/inc/cammscontrolgroup.h
javauis/amms_qt/module/inc/cammseffectmodule.h
javauis/amms_qt/module/inc/cammsglobalmanager.h
javauis/amms_qt/module/inc/cammsmodule.h
javauis/amms_qt/module/inc/cammsmodulecontainer.h
javauis/amms_qt/module/inc/cammsplayerstatelistener.h
javauis/amms_qt/module/inc/cammssoundsource3d.h
javauis/amms_qt/module/inc/mammscontrolgroup.h
javauis/amms_qt/module/inc/mammscontrollable.h
javauis/amms_qt/module/src/ammsutil.cpp
javauis/amms_qt/module/src/cammscontrolgroup.cpp
javauis/amms_qt/module/src/cammseffectmodule.cpp
javauis/amms_qt/module/src/cammsglobalmanager.cpp
javauis/amms_qt/module/src/cammsmodule.cpp
javauis/amms_qt/module/src/cammsmodulecontainer.cpp
javauis/amms_qt/module/src/cammsplayerstatelistener.cpp
javauis/amms_qt/module/src/cammssoundsource3d.cpp
javauis/amms_qt/src_tuner/javasrc/com/nokia/amms/control/tuner/TunerControlImpl.java
javauis/amms_qt/src_tuner/javasrc/com/nokia/microedition/media/protocol/capture/radio/Protocol.java
javauis/amms_qt/src_tuner/native/external_include/fmradioenginecrkeys.h
javauis/amms_qt/src_tuner/native/external_include/tuner.h
javauis/amms_qt/src_tuner/native/external_include/tuner.inl
javauis/amms_qt/src_tuner/native/inc/ammstunerfactory.h
javauis/amms_qt/src_tuner/native/inc/cammstunercontrol.h
javauis/amms_qt/src_tuner/native/inc/cammstunerplayer.h
javauis/amms_qt/src_tuner/native/inc/cammstunerpresetshandler.h
javauis/amms_qt/src_tuner/native/inc/cammstunervolumecontrol.h
javauis/amms_qt/src_tuner/native/inc/tammstunerpreset.h
javauis/amms_qt/src_tuner/native/src/ammstunerfactory.cpp
javauis/amms_qt/src_tuner/native/src/cammstunercontrol.cpp
javauis/amms_qt/src_tuner/native/src/cammstunerplayer.cpp
javauis/amms_qt/src_tuner/native/src/cammstunerpresetshandler.cpp
javauis/amms_qt/src_tuner/native/src/cammstunervolumecontrol.cpp
javauis/amms_qt/src_tuner/native/src/protocol.cpp
javauis/amms_qt/src_tuner/native/src/tammstunerpreset.cpp
javauis/amms_qt/src_tuner/native/src/tunercontrol.cpp
javauis/bin/armv5/cgfx.dll
javauis/bin/armv5/swt-pi-qt.dll
javauis/bin/eswt.jar
javauis/bin/eswt.odc
javauis/bin/eswtqt.dll
javauis/bin/exports.inf
javauis/bin/openlcdui.jar
javauis/bin/openlcdui.odc
javauis/bin/qt_jxe/armv5/eswtqt.dll
javauis/bin/qt_jxe/armv5/eswtqt.odc
javauis/bin/qt_jxe/armv5/openlcdui.dll
javauis/bin/qt_jxe/armv5/openlcdui.odc
javauis/bin/qt_jxe/winscw/eswtqt.dll
javauis/bin/qt_jxe/winscw/eswtqt.odc
javauis/bin/qt_jxe/winscw/openlcdui.dll
javauis/bin/qt_jxe/winscw/openlcdui.odc
javauis/bin/readme.txt
javauis/bin/winscw/cgfx.dll
javauis/bin/winscw/swt-pi-qt.dll
javauis/coreui_akn/build/javacoreui_0x2002DCA8.mmp
javauis/eswt_akn/eswtdirectcontent/build/eswtdirectcontent_0x2002DC94.mmp
javauis/eswt_akn/eswtdirectcontent/native/src/swtdccontrol.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eswt_0x2002DC93.mmp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplay.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/ercp/swt/midp/UIThreadSupport.java
javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/widgets/Display.java
javauis/javalegacyutils/build/javalegacyutils_0x2002DCBB.mmp
javauis/lcdui_akn/javalcdui/build/javalcdui_0x2002DCBA.mmp
javauis/lcdui_akn/javalcdui/inc/lcdui.h
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Canvas.java
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Graphics.java
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Image.java
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java
javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp
javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItem.h
javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItemPainter.h
javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupControl.h
javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupListBox.h
javauis/lcdui_akn/lcdui/inc/CMIDEditingStateIndicator.h
javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h
javauis/lcdui_akn/lcdui/inc/CMIDTextEditor.h
javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwin.h
javauis/lcdui_akn/lcdui/inc/CMIDUtils.h
javauis/lcdui_akn/lcdui/inc/MMIDScalable.h
javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp
javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItemPainter.cpp
javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp
javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupListBox.cpp
javauis/lcdui_akn/lcdui/src/CMIDEditingStateIndicator.cpp
javauis/lcdui_akn/lcdui/src/CMIDForm.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextEditor.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwin.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp
javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp
javauis/m2g_akn/build/javam2g_0x2002DCBD.mmp
javauis/m2g_akn/javasrc/eclipse/swt/widgets/SVGAnimatorControl.java
javauis/m3g_akn/build/javam3g_0x2002DCBE.mmp
javauis/m3g_qt/build/build.xml
javauis/m3g_qt/build/bwins/javam3gu.def
javauis/m3g_qt/build/eabi/javam3gu.def
javauis/m3g_qt/build/javam3g.pro
javauis/m3g_qt/inc/CSynchronization.h
javauis/m3g_qt/inc/m3g_jsr184.h
javauis/m3g_qt/javasrc/com/dummy.txt
javauis/m3g_qt/javasrc/javax/microedition/m3g/AnimationController.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/AnimationTrack.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Appearance.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Background.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Camera.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/CompositingMode.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Defs.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Fog.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Graphics3D.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Group.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Image2D.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/IndexBuffer.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Interface.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/KeyframeSequence.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Light.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Loader.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/M3gRunnable.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Material.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Mesh.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/MorphingMesh.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Node.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Object3D.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Platform.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/PolygonMode.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/RayIntersection.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/SkinnedMesh.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Sprite3D.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Texture2D.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Transform.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/Transformable.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/TriangleStripArray.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/VertexArray.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/VertexBuffer.java
javauis/m3g_qt/javasrc/javax/microedition/m3g/World.java
javauis/m3g_qt/src/CSynchronization.cpp
javauis/m3g_qt/src/jni/animationController.inl
javauis/m3g_qt/src/jni/animationTrack.inl
javauis/m3g_qt/src/jni/appearance.inl
javauis/m3g_qt/src/jni/background.inl
javauis/m3g_qt/src/jni/camera.inl
javauis/m3g_qt/src/jni/compositingMode.inl
javauis/m3g_qt/src/jni/fog.inl
javauis/m3g_qt/src/jni/graphics3d.inl
javauis/m3g_qt/src/jni/group.inl
javauis/m3g_qt/src/jni/image2d.inl
javauis/m3g_qt/src/jni/interface.inl
javauis/m3g_qt/src/jni/keyframeSequence.inl
javauis/m3g_qt/src/jni/light.inl
javauis/m3g_qt/src/jni/loader.inl
javauis/m3g_qt/src/jni/material.inl
javauis/m3g_qt/src/jni/mesh.inl
javauis/m3g_qt/src/jni/morphingMesh.inl
javauis/m3g_qt/src/jni/node.inl
javauis/m3g_qt/src/jni/object3d.inl
javauis/m3g_qt/src/jni/platform.inl
javauis/m3g_qt/src/jni/polygonMode.inl
javauis/m3g_qt/src/jni/skinnedMesh.inl
javauis/m3g_qt/src/jni/sprite3d.inl
javauis/m3g_qt/src/jni/texture2d.inl
javauis/m3g_qt/src/jni/transform.inl
javauis/m3g_qt/src/jni/transformable.inl
javauis/m3g_qt/src/jni/triangleStripArray.inl
javauis/m3g_qt/src/jni/vertexArray.inl
javauis/m3g_qt/src/jni/vertexBuffer.inl
javauis/m3g_qt/src/jni/world.inl
javauis/m3g_qt/src/m3g_jsr184.inl
javauis/m3g_qt/src/m3g_kvm_api.inl
javauis/m3g_qt/src/m3g_symbian_java_api.cpp
javauis/mmapi_akn/baseline/inc.dsa/cmmacamerawindow.h
javauis/mmapi_akn/baseline/inc.nga/cmmacamerawindow.h
javauis/mmapi_akn/baseline/inc/cmmacamerawindow.h
javauis/mmapi_akn/baseline/inc/cmmaoutputstreamevent.h
javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java
javauis/mmapi_akn/baseline/src.dsa/cmmacamerawindow.cpp
javauis/mmapi_akn/baseline/src.nga/cmmacamerawindow.cpp
javauis/mmapi_akn/baseline/src.nga/cmmasurfacewindow.cpp
javauis/mmapi_akn/baseline/src/cmmacamerawindow.cpp
javauis/mmapi_akn/baseline/src/cmmaoutputstreamevent.cpp
javauis/mmapi_akn/baseline/src/outputstreamwriter.cpp
javauis/mmapi_akn/build/javamobilemedia_0x2002DCC2.mmp
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationframepositioningcontrol.h
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationplayer.h
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationplayerfactory.h
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationratecontrol.h
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationstoptimecontrol.h
javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationwindow.h
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationframepositioningcontrol.cpp
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationplayer.cpp
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationplayerfactory.cpp
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationratecontrol.cpp
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationstoptimecontrol.cpp
javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationwindow.cpp
javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreammetadatacontrol.h
javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreamplayer.h
javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreamplayerfactory.h
javauis/mmapi_qt/audiostreaming/inc.emc/cmmastreamhandler.h
javauis/mmapi_qt/audiostreaming/inc.emc/cmmastreamrequest.h
javauis/mmapi_qt/audiostreaming/inc.mmf/CMMAAudioStreamPlayerFactory.h
javauis/mmapi_qt/audiostreaming/inc.mmf/cmmaaudiostreamplayer.h
javauis/mmapi_qt/audiostreaming/inc.mmf/cmmastreamhandler.h
javauis/mmapi_qt/audiostreaming/inc.mmf/cmmastreamrequest.h
javauis/mmapi_qt/audiostreaming/inc/cmmaaudiostreamratecontrol.h
javauis/mmapi_qt/audiostreaming/inc/cmmadatasourcestream.h
javauis/mmapi_qt/audiostreaming/inc/mmmastreamhandlerlistener.h
javauis/mmapi_qt/audiostreaming/inc/mmmastreamrequestlistener.h
javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreammetadatacontrol.cpp
javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreamplayer.cpp
javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreamplayerfactory.cpp
javauis/mmapi_qt/audiostreaming/src.emc/cmmastreamhandler.cpp
javauis/mmapi_qt/audiostreaming/src.emc/cmmastreamrequest.cpp
javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayer.cpp
javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayerfactory.cpp
javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamhandler.cpp
javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamrequest.cpp
javauis/mmapi_qt/audiostreaming/src/cmmaaudiostreamratecontrol.cpp
javauis/mmapi_qt/audiostreaming/src/cmmadatasourcestream.cpp
javauis/mmapi_qt/baseline/inc.dsa/cmmadsawindow.h
javauis/mmapi_qt/baseline/inc.dsa/cmmavideoplayer.h
javauis/mmapi_qt/baseline/inc.emc/cmmaemcaudioplayer.h
javauis/mmapi_qt/baseline/inc.emc/cmmaemcaudiovolumecontrol.h
javauis/mmapi_qt/baseline/inc.emc/cmmaemcplayerbase.h
javauis/mmapi_qt/baseline/inc.emc/cmmaemcplayerfactory.h
javauis/mmapi_qt/baseline/inc.emc/cmmaemcresolver.h
javauis/mmapi_qt/baseline/inc.emc/cmmamanager.h
javauis/mmapi_qt/baseline/inc.mmf/cmmamanager.h
javauis/mmapi_qt/baseline/inc.nga/cmmasurfacewindow.h
javauis/mmapi_qt/baseline/inc.nga/cmmavideoplayer.h
javauis/mmapi_qt/baseline/inc/cmmaaudiometadatacontrol.h
javauis/mmapi_qt/baseline/inc/cmmaaudioplayer.h
javauis/mmapi_qt/baseline/inc/cmmaaudioplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmaaudiorecordcontrol.h
javauis/mmapi_qt/baseline/inc/cmmaaudiorecorder.h
javauis/mmapi_qt/baseline/inc/cmmaaudiorecorderfactory.h
javauis/mmapi_qt/baseline/inc/cmmaaudiovolumecontrol.h
javauis/mmapi_qt/baseline/inc/cmmabitmapwindow.h
javauis/mmapi_qt/baseline/inc/cmmacameraplayer.h
javauis/mmapi_qt/baseline/inc/cmmacameraplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmacamerawindow.h
javauis/mmapi_qt/baseline/inc/cmmacanvasdisplay.h
javauis/mmapi_qt/baseline/inc/cmmacontrol.h
javauis/mmapi_qt/baseline/inc/cmmadeleterefevent.h
javauis/mmapi_qt/baseline/inc/cmmadisplay.h
javauis/mmapi_qt/baseline/inc/cmmadurationupdater.h
javauis/mmapi_qt/baseline/inc/cmmaevent.h
javauis/mmapi_qt/baseline/inc/cmmaframepositioningcontrol.h
javauis/mmapi_qt/baseline/inc/cmmaitemdisplay.h
javauis/mmapi_qt/baseline/inc/cmmametadatacontrol.h
javauis/mmapi_qt/baseline/inc/cmmamidicontrol.h
javauis/mmapi_qt/baseline/inc/cmmamidimetadatacontrol.h
javauis/mmapi_qt/baseline/inc/cmmamidipitchcontrol.h
javauis/mmapi_qt/baseline/inc/cmmamidiplayer.h
javauis/mmapi_qt/baseline/inc/cmmamidiplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmamidistoptimecontrol.h
javauis/mmapi_qt/baseline/inc/cmmamiditempocontrol.h
javauis/mmapi_qt/baseline/inc/cmmamidivolumecontrol.h
javauis/mmapi_qt/baseline/inc/cmmammfplayerbase.h
javauis/mmapi_qt/baseline/inc/cmmammfplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmammfratecontrol.h
javauis/mmapi_qt/baseline/inc/cmmammfresolver.h
javauis/mmapi_qt/baseline/inc/cmmaoutputstream.h
javauis/mmapi_qt/baseline/inc/cmmaoutputstreamevent.h
javauis/mmapi_qt/baseline/inc/cmmaplayer.h
javauis/mmapi_qt/baseline/inc/cmmaplayerevent.h
javauis/mmapi_qt/baseline/inc/cmmaplayerproperties.h
javauis/mmapi_qt/baseline/inc/cmmaratecontrol.h
javauis/mmapi_qt/baseline/inc/cmmarecordcontrol.h
javauis/mmapi_qt/baseline/inc/cmmasnapshot.h
javauis/mmapi_qt/baseline/inc/cmmasnapshotevent.h
javauis/mmapi_qt/baseline/inc/cmmasourcestream.h
javauis/mmapi_qt/baseline/inc/cmmasourcestreamevent.h
javauis/mmapi_qt/baseline/inc/cmmastoptimecontrol.h
javauis/mmapi_qt/baseline/inc/cmmavideocontrol.h
javauis/mmapi_qt/baseline/inc/cmmavideoframepositioningcontrol.h
javauis/mmapi_qt/baseline/inc/cmmavideoplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmavideorecordcontrol.h
javauis/mmapi_qt/baseline/inc/cmmavideourlplayer.h
javauis/mmapi_qt/baseline/inc/cmmavideourlplayerfactory.h
javauis/mmapi_qt/baseline/inc/cmmavolumecontrol.h
javauis/mmapi_qt/baseline/inc/mmafunctionserver.h
javauis/mmapi_qt/baseline/inc/mmmacontainer.h
javauis/mmapi_qt/baseline/inc/mmmadirectcontent.h
javauis/mmapi_qt/baseline/inc/mmmadisplay.h
javauis/mmapi_qt/baseline/inc/mmmadisplaywindow.h
javauis/mmapi_qt/baseline/inc/mmmaeventposter.h
javauis/mmapi_qt/baseline/inc/mmmaguiplayer.h
javauis/mmapi_qt/baseline/inc/mmmamuteobserver.h
javauis/mmapi_qt/baseline/inc/mmmaplayerfactory.h
javauis/mmapi_qt/baseline/inc/mmmaplayerinstanceobserver.h
javauis/mmapi_qt/baseline/inc/mmmaplayerstatelistener.h
javauis/mmapi_qt/baseline/inc/mmmasnapshot.h
javauis/mmapi_qt/baseline/inc/mmmasnapshotreadycallback.h
javauis/mmapi_qt/baseline/inc/mmmasourcestreamlistener.h
javauis/mmapi_qt/baseline/inc/rmmatempfile.h
javauis/mmapi_qt/baseline/inc/tmmaparametervalidator.h
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/BufferDataSource.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/BufferSourceStream.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/control/MetaDataControl.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/EMCSourceInfo.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/http/Protocol.java
javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/https/Protocol.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/BufferDataSource.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/BufferSourceStream.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/ManagerImpl.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/control/MetaDataControl.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/protocol/http/Protocol.java
javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/protocol/https/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/ConnectorDataSource.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/ControlContainer.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/HttpDataSource.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamDataSource.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamSeekControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamSourceStream.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InternalPlayer.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/Locator.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/MMAInvokeListener.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/NativeError.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/NativePlayerFactory.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerImpl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerListenerImpl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlugIn.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SeekControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/Setup.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SourcePlayer.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SystemTimeBase.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayer.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayerFactory.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/FramePositioningControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/ProxyControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/RateControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/StopTimeControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoItem.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/BaseDisplay.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/ControlImpl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/FramePositioningControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MIDIControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMACanvasDisplay.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMAGUIFactory.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMAPIeSWTObserver.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/PitchControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/RateControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/StopTimeControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/TempoControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VideoControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VideoItem.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VolumeControl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ConnectorProtocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/NativeBase.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/OutputStreamWriter.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ProtocolFactory.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ProtocolPackage.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/SeekThread.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/SourceStreamReader.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/audio/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/devcam0/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/devcam1/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/video/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/midi/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/tone/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/file/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/rtsp/Protocol.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/BlockEndEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/BlockStartEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/Event.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/EventList.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiSequence.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiSequenceException.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiToneConstants.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/PlayBlockEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/PlayToneImpl.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/RepeatEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/ToneEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/TonePlayer.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/ToneSequence.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/VolumeEvent.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/media/PlayerPermission.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/media/RTSPPermission.java
javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/properties/mobilemedia/DynamicPropertyHandler.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Control.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Controllable.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Manager.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/MediaException.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Player.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/PlayerListener.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/TimeBase.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/FramePositioningControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/GUIControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/MIDIControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/MetaDataControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/PitchControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/RateControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/RecordControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/StopTimeControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/TempoControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/ToneControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/VideoControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/VolumeControl.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/ContentDescriptor.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/DataSource.java
javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/SourceStream.java
javauis/mmapi_qt/baseline/src.dsa/cmmadsawindow.cpp
javauis/mmapi_qt/baseline/src.dsa/cmmavideoplayer.cpp
javauis/mmapi_qt/baseline/src.emc/cmmaemcaudioplayer.cpp
javauis/mmapi_qt/baseline/src.emc/cmmaemcaudiovolumecontrol.cpp
javauis/mmapi_qt/baseline/src.emc/cmmaemcplayerbase.cpp
javauis/mmapi_qt/baseline/src.emc/cmmaemcplayerfactory.cpp
javauis/mmapi_qt/baseline/src.emc/cmmaemcresolver.cpp
javauis/mmapi_qt/baseline/src.emc/cmmamanager.cpp
javauis/mmapi_qt/baseline/src.emc/emcsourceinfo.cpp
javauis/mmapi_qt/baseline/src.mmf/cmmamanager.cpp
javauis/mmapi_qt/baseline/src.nga/cmmasurfacewindow.cpp
javauis/mmapi_qt/baseline/src.nga/cmmavideoplayer.cpp
javauis/mmapi_qt/baseline/src/canvasdisplay.cpp
javauis/mmapi_qt/baseline/src/cmmaaudiometadatacontrol.cpp
javauis/mmapi_qt/baseline/src/cmmaaudioplayer.cpp
javauis/mmapi_qt/baseline/src/cmmaaudioplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmaaudiorecordcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmaaudiorecorder.cpp
javauis/mmapi_qt/baseline/src/cmmaaudiorecorderfactory.cpp
javauis/mmapi_qt/baseline/src/cmmaaudiovolumecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmabitmapwindow.cpp
javauis/mmapi_qt/baseline/src/cmmacameraplayer.cpp
javauis/mmapi_qt/baseline/src/cmmacameraplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmacamerawindow.cpp
javauis/mmapi_qt/baseline/src/cmmacanvasdisplay.cpp
javauis/mmapi_qt/baseline/src/cmmacontrol.cpp
javauis/mmapi_qt/baseline/src/cmmadeleterefevent.cpp
javauis/mmapi_qt/baseline/src/cmmadisplay.cpp
javauis/mmapi_qt/baseline/src/cmmadurationupdater.cpp
javauis/mmapi_qt/baseline/src/cmmaevent.cpp
javauis/mmapi_qt/baseline/src/cmmaframepositioningcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmaitemdisplay.cpp
javauis/mmapi_qt/baseline/src/cmmametadatacontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamidicontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamidimetadatacontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamidipitchcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamidiplayer.cpp
javauis/mmapi_qt/baseline/src/cmmamidiplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmamidistoptimecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamiditempocontrol.cpp
javauis/mmapi_qt/baseline/src/cmmamidivolumecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmammfplayerbase.cpp
javauis/mmapi_qt/baseline/src/cmmammfplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmammfratecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmammfresolver.cpp
javauis/mmapi_qt/baseline/src/cmmaoutputstream.cpp
javauis/mmapi_qt/baseline/src/cmmaoutputstreamevent.cpp
javauis/mmapi_qt/baseline/src/cmmaplayer.cpp
javauis/mmapi_qt/baseline/src/cmmaplayerevent.cpp
javauis/mmapi_qt/baseline/src/cmmaplayerproperties.cpp
javauis/mmapi_qt/baseline/src/cmmaratecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmarecordcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmasnapshot.cpp
javauis/mmapi_qt/baseline/src/cmmasnapshotevent.cpp
javauis/mmapi_qt/baseline/src/cmmasourcestream.cpp
javauis/mmapi_qt/baseline/src/cmmasourcestreamevent.cpp
javauis/mmapi_qt/baseline/src/cmmastoptimecontrol.cpp
javauis/mmapi_qt/baseline/src/cmmavideocontrol.cpp
javauis/mmapi_qt/baseline/src/cmmavideoframepositioningcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmavideoplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmavideorecordcontrol.cpp
javauis/mmapi_qt/baseline/src/cmmavideourlplayer.cpp
javauis/mmapi_qt/baseline/src/cmmavideourlplayerclipstreamdelegate.cpp
javauis/mmapi_qt/baseline/src/cmmavideourlplayerfactory.cpp
javauis/mmapi_qt/baseline/src/cmmavideourlplayerlivestreamdelegate.cpp
javauis/mmapi_qt/baseline/src/cmmavolumecontrol.cpp
javauis/mmapi_qt/baseline/src/controlcontainer.cpp
javauis/mmapi_qt/baseline/src/controlimpl.cpp
javauis/mmapi_qt/baseline/src/display.cpp
javauis/mmapi_qt/baseline/src/framepositioningcontrol.cpp
javauis/mmapi_qt/baseline/src/itemdisplay.cpp
javauis/mmapi_qt/baseline/src/managerimpl.cpp
javauis/mmapi_qt/baseline/src/metadatacontrol.cpp
javauis/mmapi_qt/baseline/src/midicontrol.cpp
javauis/mmapi_qt/baseline/src/mmafunctionserver.cpp
javauis/mmapi_qt/baseline/src/nativeplayerfactory.cpp
javauis/mmapi_qt/baseline/src/outputstreamwriter.cpp
javauis/mmapi_qt/baseline/src/pitchcontrol.cpp
javauis/mmapi_qt/baseline/src/player.cpp
javauis/mmapi_qt/baseline/src/ratecontrol.cpp
javauis/mmapi_qt/baseline/src/recordcontrol.cpp
javauis/mmapi_qt/baseline/src/rmmatempfile.cpp
javauis/mmapi_qt/baseline/src/sourcestreamreader.cpp
javauis/mmapi_qt/baseline/src/stoptimecontrol.cpp
javauis/mmapi_qt/baseline/src/tempocontrol.cpp
javauis/mmapi_qt/baseline/src/tmmaparametervalidator.cpp
javauis/mmapi_qt/baseline/src/videocontrol.cpp
javauis/mmapi_qt/baseline/src/volumecontrol.cpp
javauis/mmapi_qt/build/build.xml
javauis/mmapi_qt/build/bwins/javamobilemediau.def
javauis/mmapi_qt/build/dc_exports.inf
javauis/mmapi_qt/build/eabi/javamobilemediau.def
javauis/mmapi_qt/build/exports.inf
javauis/mmapi_qt/build/javamobilemedia.pro
javauis/mmapi_qt/camerasound/data/CamcorderJavaCapture.wav
javauis/mmapi_qt/camerasound/data/CamcorderJavaStart.wav
javauis/mmapi_qt/camerasound/inc/cmmacamerasound.h
javauis/mmapi_qt/camerasound/src/cmmacamerasound.cpp
javauis/mmapi_qt/conf/mobilemedia.confml
javauis/mmapi_qt/conf/mobilemedia_102828A1.crml
javauis/mmapi_qt/directcontent/inc/cmmadcdisplay.h
javauis/mmapi_qt/directcontent/inc/cmmadcfullscreenevent.h
javauis/mmapi_qt/directcontent/inc/cmmadcinvalidateevent.h
javauis/mmapi_qt/directcontent/inc/cmmadcrepaintevent.h
javauis/mmapi_qt/directcontent/src/cmmadcdisplay.cpp
javauis/mmapi_qt/directcontent/src/cmmadcfullscreenevent.cpp
javauis/mmapi_qt/directcontent/src/cmmadcinvalidateevent.cpp
javauis/mmapi_qt/directcontent/src/cmmadcrepaintevent.cpp
javauis/mmapi_qt/src_drmv2/inc/cmmadrmaudioplayer.h
javauis/mmapi_qt/src_drmv2/inc/cmmadrmmetadatacontrol.h
javauis/mmapi_qt/src_drmv2/inc/cmmadrmplayerfactory.h
javauis/mmapi_qt/src_drmv2/inc/cmmadrmratecontrol.h
javauis/mmapi_qt/src_drmv2/inc/cmmadrmvolumecontrol.h
javauis/mmapi_qt/src_drmv2/src/cmmadrmaudioplayer.cpp
javauis/mmapi_qt/src_drmv2/src/cmmadrmmetadatacontrol.cpp
javauis/mmapi_qt/src_drmv2/src/cmmadrmplayerfactory.cpp
javauis/mmapi_qt/src_drmv2/src/cmmadrmratecontrol.cpp
javauis/mmapi_qt/src_drmv2/src/cmmadrmvolumecontrol.cpp
javauis/mmapi_qt/utils/inc/TimeOutTimer.h
javauis/mmapi_qt/utils/inc/mmapiutils.h
javauis/mmapi_qt/utils/src/TimeOutTimer.cpp
javauis/mmapi_qt/utils/src/mmapiutils.cpp
javauis/mmapi_qt/volumekeys/inc/cmmaforeground.h
javauis/mmapi_qt/volumekeys/inc/cmmaforegroundevent.h
javauis/mmapi_qt/volumekeys/inc/cmmaglobalvolume.h
javauis/mmapi_qt/volumekeys/inc/cmmavolumekeyslistener.h
javauis/mmapi_qt/volumekeys/inc/mmaprivatecrkeys.h
javauis/mmapi_qt/volumekeys/inc/mmmavolumekeyslistener.h
javauis/mmapi_qt/volumekeys/javasrc/com/nokia/microedition/volumekeys/ForegroundListener.java
javauis/mmapi_qt/volumekeys/src/Foreground.cpp
javauis/mmapi_qt/volumekeys/src/cmmaforeground.cpp
javauis/mmapi_qt/volumekeys/src/cmmaforegroundevent.cpp
javauis/mmapi_qt/volumekeys/src/cmmaglobalvolume.cpp
javauis/mmapi_qt/volumekeys/src/cmmavolumekeyslistener.cpp
javauis/nokiasound_akn/build/javanokiasound_0x2002DCC4.mmp
javauis/nokiauiapi_qt/build/build.xml
javauis/nokiauiapi_qt/build/bwins/javanokiauiu.def
javauis/nokiauiapi_qt/build/eabi/javanokiauiu.def
javauis/nokiauiapi_qt/build/nokiauiapiqt.pro
javauis/nokiauiapi_qt/library/nokiauiapi.pri
javauis/nokiauiapi_qt/library/os.cpp
javauis/nokiauiapi_qt/loc/dummy.txt
javauis/nokiauiapi_qt/src/com/nokia/mid/ui/DeviceControl.java
javauis/nokiauiapi_qt/src_j2me/com/nokia/mid/ui/TactileFeedback.java
javauis/nokiauiapi_qt/src_j2se/com/nokia/mid/ui/TactileFeedback.java
javauis/ptivariation_akn/javaptivariation/build/bwins/javaptivariationu.def
javauis/ptivariation_akn/javaptivariation/build/eabi/javaptivariationu.def
javauis/ptivariation_akn/javaptivariation/build/exports.inf
javauis/ptivariation_akn/javaptivariation/build/javaptivariation.pro
javauis/ptivariation_akn/javaptivariation/inc/javaptivariation.h
javauis/ptivariation_akn/javaptivariation/src/javaptivariation.cpp
javauis/ptivariation_akn/subsystem.mk
javauis/remconobserver_akn/build/javaremconobserver_0x2002DCCA.mmp
javauis/runtimeui_akn/build/javaruntimeui_0x2002DCCD.mmp
javauis/runtimeui_qt/build/build.xml
javauis/runtimeui_qt/build/bwins/javaruntimeuiu.def
javauis/runtimeui_qt/build/eabi/javaruntimeuiu.def
javauis/runtimeui_qt/build/javaruntimeui.pro
javauis/runtimeui_qt/javasrc.s60/com/nokia/mj/impl/rt/ui/qt/RuntimeUiQt.java
javauis/runtimeui_qt/javasrc/dummy.txt
javauis/runtimeui_qt/src.s60/jni.cpp
javauis/runtimeui_qt/src.s60/runtimeuiqt.cpp
javauis/runtimeui_qt/src.s60/runtimeuiqt.h
javauis/runtimeui_qt/tsrc.s60/build/build.xml
javauis/runtimeui_qt/tsrc.s60/build/jiut.bat
javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/DetailedErrorMessage.java
javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/RuntimeUiQtTests.java
javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/ShortErrorMessage.java
javauis/softnotification_akn/build/javasoftnotification_0x2002DCD6.mmp
javauis/subsystem.mk
javauis/subsystem_qt.mk
javauis/tsrc/fute/build.xml
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/SelectLink.htm
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/SelectLinkBak.htm
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/link1.htm
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/link2.htm
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/SmallLabel.jpg
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/big.png
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/small.gif
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/src/com/nokia/test/java/eswt/browser/BrowserTestMIDlet_01.java
javauis/tsrc/fute/eswt/BrowserTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/SmallLabel.jpg
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/sphere.jpg
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/button/ButtonTestMIDlet_01.java
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/button/ButtonTestMIDlet_02.java
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java
javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java
javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/res/big.png
javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/res/small.png
javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/src/com/nokia/test/java/eswt/captioned/CapControlTestMIDlet01.java
javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/src/com/nokia/test/java/eswt/colordialog/ColorDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ComboTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ComboTestMidletSuite/src/com/nokia/test/java/eswt/combo/ComboTestMIDlet_01.java
javauis/tsrc/fute/eswt/ComboTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/CommandTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/CommandTestMidletSuite/src/com/nokia/test/java/eswt/command/CommandTestMIDlet_01.java
javauis/tsrc/fute/eswt/CommandTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/build.xml
javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/src/com/nokia/test/java/eswt/constrainedtext/ConstrainedTextTestMIDlet_01.java
javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ControlTestMIDlet_01.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ControlTestMIDlet_02.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/CustomControl.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ImageCanvas.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java
javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java
javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/com/nokia/test/java/eswt/dateeditor/DateEditorTestMIDlet_01.java
javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java
javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java
javauis/tsrc/fute/eswt/DirectoryDialogMidlet/build.xml
javauis/tsrc/fute/eswt/DirectoryDialogMidlet/src/com/nokia/test/java/eswt/directorydialog/DirectoryDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/DirectoryDialogMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/src/com/nokia/test/java/eswt/filedialog/FileDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/src/com/nokia/test/java/eswt/fontdialog/FontDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontConfigDialog.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_01.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_02.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_03.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_04.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_05.java
javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/res/medium.jpg
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/res/res/medium.jpg
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/graphics/GraphicsTestMIDlet_01.java
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/graphics/GraphicsTestMIDlet_02.java
javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/src/com/nokia/test/java/eswt/hyperlink/HyperlinkTestMIDlet_01.java
javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/LabelTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/BigLabel.jpg
javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/SmallLabel.jpg
javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/phone.jpg
javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_01.java
javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_02.java
javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_03.java
javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/FormDataConfigDialog.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/GridDataConfigDialog.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_01.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_02.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_03.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_04.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_05.java
javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/medium.jpg
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/small.png
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/sphere.jpg
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/src/com/nokia/test/java/eswt/listbox/ListBoxTestMidlet_01.java
javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ListTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_01.java
javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_02.java
javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_03.java
javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/alphatest_small.png
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/medium.jpg
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/small.png
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/sphere.jpg
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/listview/ListViewTestMIDlet_01.java
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/listview/ListViewTestMIDlet_02.java
javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/MenuTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/menu/MenuTestMIDlet_01.java
javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/menu/MenuTestMIDlet_02.java
javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/src/com/nokia/test/java/eswt/messagebox/MessageBoxTestMIDlet_01.java
javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/src/com/nokia/test/java/eswt/mobileshell/MobileShellTestMIDlet_01.java
javauis/tsrc/fute/eswt/MultipageDialogMidlet/build.xml
javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/big.png
javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/icon.png
javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/medium.jpg
javauis/tsrc/fute/eswt/MultipageDialogMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/MultipageDialogMidlet/src/com/nokia/test/java/eswt/multipagedialog/MultiPageDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarRunnable.java
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarTestMIDlet_01.java
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarTestMIDlet_02.java
javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressTimerTask.java
javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/src/com/nokia/test/java/eswt/querydialog/QueryDialogTestMIDlet_01.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/ShellTestMidletSuite/res/icon.png
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_01.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_02.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_03.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_04.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_05.java
javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_06.java
javauis/tsrc/fute/eswt/SliderTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/SliderTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/SliderTestMidletSuite/src/com/nokia/test/java/eswt/slider/SliderTestMIDlet_01.java
javauis/tsrc/fute/eswt/SortedListTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_01.java
javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_02.java
javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_03.java
javauis/tsrc/fute/eswt/TableTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/medium.jpg
javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/small.png
javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/sphere.jpg
javauis/tsrc/fute/eswt/TableTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TableTestMidletSuite/src/com/nokia/test/java/eswt/table/TableTestMidlet_01.java
javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/src/com/nokia/test/java/eswt/tasktip/TaskTipTestMIDlet_01.java
javauis/tsrc/fute/eswt/TextExtensionMidlet/build.xml
javauis/tsrc/fute/eswt/TextExtensionMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TextExtensionMidlet/src/com/nokia/test/java/eswt/textextension/TextExtensionTestMIDlet_01.java
javauis/tsrc/fute/eswt/TextTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/text/TextTestMIDlet_01.java
javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/text/TextTestMIDlet_02.java
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/build.xml
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/BigLabel.gif
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/SmallLabel.jpg
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/icon.png
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/src/com/nokia/test/java/eswt/timedmessagebox/TimedMessageBoxTestMIDlet_01.java
javauis/tsrc/fute/eswt/TreeTestMidletSuite/build.xml
javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/alphatest_small.png
javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/medium.jpg
javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/small.png
javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/sphere.jpg
javauis/tsrc/fute/eswt/TreeTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java
javauis/tsrc/fute/eswt/TreeTestMidletSuite/src/com/nokia/test/java/eswt/tree/TreeTestMIDlet_01.java
javauis/tsrc/fute/eswt/build.xml
javauis/tsrc/fute/lcdui/DateField_Test/build.xml
javauis/tsrc/fute/lcdui/DateField_Test/src/DateFieldTests.java
javauis/tsrc/fute/lcdui/DateField_Test/src/DateField_Test.java
javauis/tsrc/fute/lcdui/ListImageUpdate/build.xml
javauis/tsrc/fute/lcdui/ListImageUpdate/res/Icon.png
javauis/tsrc/fute/lcdui/ListImageUpdate/res/Star.png
javauis/tsrc/fute/lcdui/ListImageUpdate/res/bigImage.png
javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/Images.java
javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/ListImageUpdate.java
javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/ListTest.java
javauis/tsrc/fute/lcdui/MIDPTestCustomItem/build.xml
javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/MIDPTestCustomItem.java
javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/TestTimer.java
javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/VideoItem.java
javauis/tsrc/fute/lcdui/Midp_Alert_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Alert_01/res/fractal.png
javauis/tsrc/fute/lcdui/Midp_Alert_01/res/invalid.png
javauis/tsrc/fute/lcdui/Midp_Alert_01/res/small.png
javauis/tsrc/fute/lcdui/Midp_Alert_01/src/AlertTests.java
javauis/tsrc/fute/lcdui/Midp_Alert_01/src/Midp_Alert_01.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/build.xml
javauis/tsrc/fute/lcdui/Midp_Alert_02/res/small.png
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/AlertTests.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/IndicatorRunnable.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Midp_Alert_02.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_Alert_04/build.xml
javauis/tsrc/fute/lcdui/Midp_Alert_04/src/IndicatorRunnable.java
javauis/tsrc/fute/lcdui/Midp_Alert_04/src/Midp_Alert_04.java
javauis/tsrc/fute/lcdui/Midp_Alert_05/build.xml
javauis/tsrc/fute/lcdui/Midp_Alert_05/res/fractal.png
javauis/tsrc/fute/lcdui/Midp_Alert_05/res/invalid.png
javauis/tsrc/fute/lcdui/Midp_Alert_05/res/small.png
javauis/tsrc/fute/lcdui/Midp_Alert_05/src/AlertTests.java
javauis/tsrc/fute/lcdui/Midp_Alert_05/src/Midp_Alert_05.java
javauis/tsrc/fute/lcdui/Midp_Canvas_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Canvas_01/src/CanvasTests.java
javauis/tsrc/fute/lcdui/Midp_Canvas_01/src/Midp_Canvas_01.java
javauis/tsrc/fute/lcdui/Midp_Canvas_02/build.xml
javauis/tsrc/fute/lcdui/Midp_Canvas_02/src/CanvasTests.java
javauis/tsrc/fute/lcdui/Midp_Canvas_02/src/Midp_Canvas_02.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/build.xml
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/invalid.png
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/ChoiceGroupTests.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Images.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Midp_ChoiceGroup_01.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test6.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test7.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test8.java
javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test9.java
javauis/tsrc/fute/lcdui/Midp_Command_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Midp_Command_01.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test6.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test7.java
javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test8.java
javauis/tsrc/fute/lcdui/Midp_Command_02/build.xml
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Midp_Command_02.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test6.java
javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test7.java
javauis/tsrc/fute/lcdui/Midp_DateField_01/build.xml
javauis/tsrc/fute/lcdui/Midp_DateField_01/src/DateFieldModes.java
javauis/tsrc/fute/lcdui/Midp_DateField_01/src/DateFieldTests.java
javauis/tsrc/fute/lcdui/Midp_DateField_01/src/Midp_DateField_01.java
javauis/tsrc/fute/lcdui/Midp_DateField_02/build.xml
javauis/tsrc/fute/lcdui/Midp_DateField_02/src/DateFieldTests.java
javauis/tsrc/fute/lcdui/Midp_DateField_02/src/Midp_DateField_02.java
javauis/tsrc/fute/lcdui/Midp_DateField_03/build.xml
javauis/tsrc/fute/lcdui/Midp_DateField_03/src/DateFieldTests.java
javauis/tsrc/fute/lcdui/Midp_DateField_03/src/Midp_DateField_03.java
javauis/tsrc/fute/lcdui/Midp_Form_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Form_01/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_Form_01/res/plasma.png
javauis/tsrc/fute/lcdui/Midp_Form_01/src/FormMethodsTests.java
javauis/tsrc/fute/lcdui/Midp_Form_01/src/Midp_Form_01.java
javauis/tsrc/fute/lcdui/Midp_Form_02/build.xml
javauis/tsrc/fute/lcdui/Midp_Form_02/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_Form_02/src/ChoiceGroupMethods.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/DateFieldMethods.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/FormUpdateTests.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/GaugeMethods.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/ImageItemMethods.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/Midp_Form_02.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/StringItemMethods.java
javauis/tsrc/fute/lcdui/Midp_Form_02/src/TextFieldMethods.java
javauis/tsrc/fute/lcdui/Midp_Gauge_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/GaugeTests.java
javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/GaugeTypes.java
javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/IndicatorRunnable.java
javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/Midp_Gauge_01.java
javauis/tsrc/fute/lcdui/Midp_General_02/build.xml
javauis/tsrc/fute/lcdui/Midp_General_02/src/Midp_General_02.java
javauis/tsrc/fute/lcdui/Midp_General_04/build.xml
javauis/tsrc/fute/lcdui/Midp_General_04/src/Midp_General_04.java
javauis/tsrc/fute/lcdui/Midp_General_05/build.xml
javauis/tsrc/fute/lcdui/Midp_General_05/src/Midp_General_05.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/build.xml
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/BigImageH.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/BigImageW.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw_micro.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw_small.png
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/ImageItemTests.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Images.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Midp_ImageItem_01.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_Item_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Item_01/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_Item_01/src/ItemTests.java
javauis/tsrc/fute/lcdui/Midp_Item_01/src/Midp_Item_01.java
javauis/tsrc/fute/lcdui/Midp_Item_02/build.xml
javauis/tsrc/fute/lcdui/Midp_Item_02/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_Item_02/src/ItemTests.java
javauis/tsrc/fute/lcdui/Midp_Item_02/src/Midp_Item_02.java
javauis/tsrc/fute/lcdui/Midp_Item_03/build.xml
javauis/tsrc/fute/lcdui/Midp_Item_03/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_Item_03/src/ItemTests.java
javauis/tsrc/fute/lcdui/Midp_Item_03/src/Midp_Item_03.java
javauis/tsrc/fute/lcdui/Midp_List_01/build.xml
javauis/tsrc/fute/lcdui/Midp_List_01/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_List_01/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_List_01/res/invalid.png
javauis/tsrc/fute/lcdui/Midp_List_01/src/Images.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/ListTests.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Midp_List_01.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test6.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test7.java
javauis/tsrc/fute/lcdui/Midp_List_01/src/Test8.java
javauis/tsrc/fute/lcdui/Midp_List_02/build.xml
javauis/tsrc/fute/lcdui/Midp_List_02/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_List_02/src/Images.java
javauis/tsrc/fute/lcdui/Midp_List_02/src/ListTests.java
javauis/tsrc/fute/lcdui/Midp_List_02/src/Midp_List_02.java
javauis/tsrc/fute/lcdui/Midp_List_02/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_List_04/build.xml
javauis/tsrc/fute/lcdui/Midp_List_04/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_List_04/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_List_04/src/Images.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/ListTests.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Midp_List_04.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test4.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test5.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test6.java
javauis/tsrc/fute/lcdui/Midp_List_04/src/Test7.java
javauis/tsrc/fute/lcdui/Midp_Spacer_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Spacer_01/res/bigImage.png
javauis/tsrc/fute/lcdui/Midp_Spacer_01/res/plasma.png
javauis/tsrc/fute/lcdui/Midp_Spacer_01/src/Midp_Spacer_01.java
javauis/tsrc/fute/lcdui/Midp_Spacer_01/src/SpacerTests.java
javauis/tsrc/fute/lcdui/Midp_StringItem_01/build.xml
javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/FormStringItemTests.java
javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/Midp_StringItem_01.java
javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests1.java
javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests2.java
javauis/tsrc/fute/lcdui/Midp_TextBox_01/build.xml
javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/Midp_TextBox_01.java
javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/ScreenTextBoxTests.java
javauis/tsrc/fute/lcdui/Midp_TextBox_03/build.xml
javauis/tsrc/fute/lcdui/Midp_TextBox_03/src/Midp_TextBox_03.java
javauis/tsrc/fute/lcdui/Midp_TextField_01/build.xml
javauis/tsrc/fute/lcdui/Midp_TextField_01/src/Midp_TextField_01.java
javauis/tsrc/fute/lcdui/Midp_TextField_01/src/TextFieldTests.java
javauis/tsrc/fute/lcdui/Midp_TextField_02/build.xml
javauis/tsrc/fute/lcdui/Midp_TextField_02/src/Midp_TextField_02.java
javauis/tsrc/fute/lcdui/Midp_TextField_02/src/TextFieldTests.java
javauis/tsrc/fute/lcdui/Midp_TextField_03/build.xml
javauis/tsrc/fute/lcdui/Midp_TextField_03/src/Midp_TextField_03.java
javauis/tsrc/fute/lcdui/Midp_TextField_03/src/TextFieldTests.java
javauis/tsrc/fute/lcdui/Midp_TextField_05/build.xml
javauis/tsrc/fute/lcdui/Midp_TextField_05/src/Midp_TextField_05.java
javauis/tsrc/fute/lcdui/Midp_TextField_05/src/TextFieldTests.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/build.xml
javauis/tsrc/fute/lcdui/Midp_Ticker_01/res/Icon.png
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Midp_Ticker_01.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/ScreenTickerTests.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test1.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test2.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test3.java
javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test4.java
javauis/tsrc/fute/lcdui/StringOutOfBounds/build.xml
javauis/tsrc/fute/lcdui/StringOutOfBounds/src/FormStringItemTests.java
javauis/tsrc/fute/lcdui/StringOutOfBounds/src/StringOutOfBounds.java
javauis/tsrc/fute/lcdui/build.xml
javauis/tsrc/fute/lcdui/deviceControl/build.xml
javauis/tsrc/fute/lcdui/deviceControl/src/DeviceVibra.java
javauis/tsrc/fute/lcdui/deviceControl/src/FlashBackLight.java
javauis/tsrc/fute/lcdui/deviceControl/src/FlashLight.java
javauis/tsrc/fute/properties-basic-midlet.xml
javauis/tsrc/fute/properties-sub-directory.xml
javauis/tsrc/fute/properties.xml
javauis/tsrc/fute/readme.txt
jrt_plat/java_env_info_api/java_env_info_api.metaxml
rom/java_2_1.iby
rom/java_3_1.iby
rom/javalocalization_3_1.iby
rom/midprootslist
--- a/build/Makefile.comp	Tue May 11 16:07:20 2010 +0300
+++ b/build/Makefile.comp	Tue May 25 12:34:19 2010 +0300
@@ -98,6 +98,24 @@
 	echo SUBDIRS += $(TARGET_SUB)/$(PRO_FILE) >> $(TARGET_PRO)
 endif
 
+# The remove_notbuilt removes platform specific subdirectories not
+# participating in the built of current environment
+ifeq ($(BUILDENV),symbian)
+REMOVEWILDCARD = *.linux
+else
+REMOVEWILDCARD = *.s60
+endif
+REMOVEDIRECORIES = $(call PATHFIX,$(wildcard ../$(REMOVEWILDCARD)))
+remove_notbuilt:
+ifneq ($(REMOVEDIRECORIES),)
+ifdef SIMULATE
+	echo Remove not-built directories at $(CURDIR): $(REMOVEDIRECORIES)
+else
+	echo Removing not-built directories at $(CURDIR): $(REMOVEDIRECORIES) \
+	$(foreach d,$(REMOVEDIRECORIES),&& $(call DELTREE,$(d)))
+endif
+endif
+
 # Symbian ----------------------------------
 ifeq ($(BUILDENV),symbian)
 
--- a/build/Makefile.defs	Tue May 11 16:07:20 2010 +0300
+++ b/build/Makefile.defs	Tue May 25 12:34:19 2010 +0300
@@ -56,6 +56,7 @@
     DEVNULL = /dev/null
     MKDIR = if [ ! -d $(1)]; then mkdir $(1); fi
     RMDIR = if [ -d $(1)]; then rmdir $(1); fi
+    DELTREE = if [ -d $(1)]; then rm -fr $(1); fi
 
   else
     # CMD.exe definitions
@@ -72,6 +73,7 @@
     DEVNULL = NUL
     MKDIR = if not exist $(1) mkdir  $(1)
     RMDIR = if exist $(1) rmdir  $(1)
+    DELTREE = if exist $(1) rmdir /S/Q $(1)
 
   endif
 
--- a/build/Makefile.nonqt	Tue May 11 16:07:20 2010 +0300
+++ b/build/Makefile.nonqt	Tue May 25 12:34:19 2010 +0300
@@ -34,6 +34,8 @@
 
 clean_configure:
 
+remove_notbuilt:
+
 test:
 	$(PHASEINFO)
 	$(EXEC_NONQT)
--- a/build/Makefile.project	Tue May 11 16:07:20 2010 +0300
+++ b/build/Makefile.project	Tue May 25 12:34:19 2010 +0300
@@ -179,6 +179,8 @@
   PROJECT_DEFINES += RD_JAVA_USIF_APP_REG
   # Following flag enables application notifications to AppArc.
   #PROJECT_DEFINES += RD_JAVA_USIF_NOTIFY_APP_ARC
+  # Following flag enables installation progress notifications through USIF.
+  #PROJECT_DEFINES += RD_JAVA_USIF_NOTIFY_PROGRESS
 endif
 
 # Java proximity Listener support exsist in 9.2 only(can not be used if 5.0 untill IAD dependecy mentioned)
@@ -238,7 +240,7 @@
 
 # Skip the following targets in 10.1 build
 ifdef RD_JAVA_S60_RELEASE_10_1
-  SKIPTARGETS=pim
+  SKIPTARGETS=
 endif
 
 ifdef RD_JAVA_S60_RELEASE_10_1
--- a/build/Makefile.subsystem	Tue May 11 16:07:20 2010 +0300
+++ b/build/Makefile.subsystem	Tue May 25 12:34:19 2010 +0300
@@ -100,6 +100,26 @@
 	$(call RMFILES,$(COMPONENT_NAME).pro)
 
 
+# If REMOVE_NOTBUILT_EXCLUDING is defined, the remove_notbuilt removes all subdirectories
+# not participating in the built, except the ones listed
+DEFAULT_EXCLUDES = inc tsrc
+DIRECTORIES = $(foreach d,$(wildcard *),$(if $(wildcard $(d)/*),$(d),))
+BUILTDIRECTORIES = $(foreach t,$(REALTARGETS),$(firstword $(subst /, ,$(t))))
+REMOVEDIRECORIES = $(filter-out $(REMOVE_NOTBUILT_EXCLUDING) $(DEFAULT_EXCLUDES) $(BUILTDIRECTORIES),$(DIRECTORIES))
+remove_notbuilt:
+ifdef REMOVE_NOTBUILT_EXCLUDING
+ifdef SIMULATE
+	echo Remove not-built directories at $(CURDIR): $(REMOVEDIRECORIES)
+else
+ifneq ($(REMOVEDIRECORIES),)
+	echo Removing not-built directories at $(CURDIR): $(REMOVEDIRECORIES) \
+	$(foreach d,$(REMOVEDIRECORIES),&& $(call DELTREE,$(d)))
+endif
+endif
+endif	
+	$(MAKE) -f subsystem.mk TARGET_PHASE=$@ subtargets
+
+
 # Symbian ----------------------------------
 ifeq ($(BUILDENV),symbian)
 
--- a/build/bld.inf	Tue May 11 16:07:20 2010 +0300
+++ b/build/bld.inf	Tue May 25 12:34:19 2010 +0300
@@ -65,6 +65,10 @@
 
 #endif // RD_JAVA_UI_QT
 
+../rom/midprootslist      /epoc32/release/winscw/udeb/z/resource/java/security/trustroots/midprootslist
+../rom/midprootslist      /epoc32/release/winscw/urel/z/resource/java/security/trustroots/midprootslist
+../rom/midprootslist      /epoc32/data/z/resource/java/security/trustroots/midprootslist
+
 // Test utilities are included only in R&D and SubCon images
 ../rom/javatest.iby                CORE_IBY_EXPORT_PATH(tools,javatest.iby)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build/buildutils/checkcopyrights.py	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,120 @@
+#!/usr/bin/python
+#
+# 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:
+#   Checks that all the source files have a proper copyright header. 
+#   Ignores number of known 3rd party source files and directories.
+#
+#    Run this script on a clean workarea in order to avoid warnings
+#    about exported files and qmake generated files.
+#
+#    The excluded directories should be checked every now and then
+#    so that there won't be other problems (like files without any
+#    header).
+
+import sys, os, re
+
+# Specify here the file types to be checked
+checkedFileTypes = [".cpp", ".h", ".java", ".py", ".mk"]
+
+# Include here the directories to be ignored
+ignoredDirectories = [
+    "javaextensions\\bluetooth\\bluecove",  # Bluecove
+    "javacommons\\jvms\\j9\\s60\\inc",      # IBM J9
+    "javauis\\eswt_akn",                    # eSWT checked separately
+    "javauis\\eswt_qt",                     # eSWT checked separately
+    "javauis\\tsrc\\fute\\eswt\\",          # eSWT checked separately
+    "javaextensions\\webservices",          # Webservices not delivered
+    "jrt\\tools",                           # Tools not delivered
+    "\\internal"                            # Internal directories not delivered
+    ]
+
+# Include here any individual files to be ignored
+ignoredFiles = [
+    "javacommons\\jvms\\cldc_1.1.1\\javasrc\\java\\util\\Timer.java",       # Apache license
+    "javacommons\\jvms\\cldc_1.1.1\\javasrc\\java\\util\\TimerTask.java",   # Apache license
+    "javacommons\\jvms\\cldc_1.1.1\\tsrc\\javasrc\\com\\nokia\\mj\\test\\java\\util\\TimerTaskTest.java",   # Apache license
+    "javacommons\\jvms\\cldc_1.1.1\\tsrc\\javasrc\\com\\nokia\\mj\\test\\java\\util\\TimerTest.java",       # Apache license
+    "javacommons\\utils\\inc\\convertutf.h",                                # Unicode Inc.
+    "javacommons\\utils\\src\\convertutf.cpp"                               # Unicode Inc.
+]
+
+# The copyright text to be checked
+copyrightText = "Nokia Corporation and/or its subsidiary(-ies)"
+
+
+def main():
+    
+    def visitFun(arg, dirname, names):
+
+        # Skip SVN directories
+        if dirname.find("\\.svn") != -1:
+            return
+        
+        # Skip all the directories to be ignored 
+        for dir in ignoredDirectories:
+            if dirname.find(dir) != -1:
+                names[:] = []
+                # print "Ignoring directory", dirname
+                return
+
+        # Check then the files
+        for f in names: 
+        
+            fname = dirname + "\\" + f
+            
+            # Skip directories
+            if os.path.isdir(fname):
+                continue
+        
+            # Skip ignored files
+            found = False
+            for file in ignoredFiles:
+                if fname.find(file) != -1:
+                    # print "Ignoring file", fname
+                    found = True
+                    break
+            if found:
+                continue
+            
+            # Skip non-wanted file types
+            lastDot = f.rfind(".")
+            if lastDot == -1 or not f[lastDot:] in checkedFileTypes:
+                # print "Ignoring file", f
+                continue
+
+            # Check if the file contains the copyright text
+            try:                       
+                file = open(fname)
+                found = False
+                line = file.readline()
+                while line != "":
+                    if copyrightText in line:
+                        found = True
+                        break;
+                    line = file.readline()                
+                file.close()
+                                    
+            except IOError:
+                print "Error reading the file " + fname
+                
+            if not found:
+                print fname
+                continue
+                
+    os.path.walk(sys.argv[1], visitFun, None)
+
+
+if __name__ == "__main__":
+    main()
--- a/build/buildutils/checkfilenames.py	Tue May 11 16:07:20 2010 +0300
+++ b/build/buildutils/checkfilenames.py	Tue May 25 12:34:19 2010 +0300
@@ -63,7 +63,7 @@
     "findtr", "syncqt", "new",
 # Other peculiar filenames:
     "installerodclist", "installerodclist30", "midpodclist", "midpodclist30",
-    "notice", "package-list", "tckrunnerodclist", "tckrunnerodclist30", "unknowncert",
+    "notice", "package-list", "tckrunnerodclist", "tckrunnerodclist30", "unknowncert","midprootslist",
 ]
 
 # Command line options.
--- a/build/buildutils/extractJavaLocFiles_qt.py	Tue May 11 16:07:20 2010 +0300
+++ b/build/buildutils/extractJavaLocFiles_qt.py	Tue May 25 12:34:19 2010 +0300
@@ -41,7 +41,11 @@
     'javassl',
     'javausermessages',
     'javaapplicationsettings',
-    'javaruntimeapplicationsettings'
+    # loc files for qt
+    'javaapplicationinstaller',
+    'javaapplicationsecuritymessages',
+    'javaruntimeapplicationsettings',
+    'javaruntimecertificatemanagement'
     ]
 
 # Path for java loc files inside RESOURCES_FILE.
@@ -89,7 +93,7 @@
         shutil.rmtree(tmpDir)
 
     except:
-        print "Usage: %s <input_dir> <output_dir>" % sys.argv[0]
+        print "Usage: %s <input_dir> <output_dir> <resources_jar>" % sys.argv[0]
         traceback.print_exc()
         sys.exit(1)
 
@@ -110,6 +114,10 @@
         else:
             text = translation.text
 
+        # If text is not found, this is unlocalised engineering English file
+        if text == None:
+            text = message.find("source").text
+
         # Sanity check - no newlines in text allowed
         if "\n" in text:
             raise Exception("Conversion error in %s / %s: newline found" % (filename, id))
--- a/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ b/build/exports.inf	Tue May 25 12:34:19 2010 +0300
@@ -63,6 +63,11 @@
 
 #endif // RD_JAVA_UI_QT
 
+// midprootslist
+../rom/midprootslist      /epoc32/release/winscw/udeb/z/resource/java/security/trustroots/midprootslist
+../rom/midprootslist      /epoc32/release/winscw/urel/z/resource/java/security/trustroots/midprootslist
+../rom/midprootslist      /epoc32/data/z/resource/java/security/trustroots/midprootslist
+
 // Test utilities are included only in R&D and SubCon images
 ../rom/javatest.iby                CORE_IBY_EXPORT_PATH(tools,javatest.iby)
 
Binary file build/loc/resources.jar has changed
--- a/build/makefile.javaversion	Tue May 11 16:07:20 2010 +0300
+++ b/build/makefile.javaversion	Tue May 25 12:34:19 2010 +0300
@@ -1,6 +1,6 @@
 # Set Java version (must be dot separated, without spaces)
 ifdef RD_JAVA_S60_RELEASE_5_0_IAD
-  JAVA_VERSION = 2.1.24
+  JAVA_VERSION = 2.1.26
 else 
-  JAVA_VERSION = 2.1.24
+  JAVA_VERSION = 2.1.26
 endif
--- a/build/sis/java_2_0.pkg	Tue May 11 16:07:20 2010 +0300
+++ b/build/sis/java_2_0.pkg	Tue May 25 12:34:19 2010 +0300
@@ -456,7 +456,7 @@
 "\epoc32\release\armv5\urel\javabtsppscplugin.dll"-"c:\sys\bin\javabtsppscplugin.dll"
 "\epoc32\release\armv5\urel\javabtgoepscplugin.dll"-"c:\sys\bin\javabtgoepscplugin.dll"
 "\epoc32\release\armv5\urel\javadatagramscplugin.dll"-"c:\sys\bin\javadatagramscplugin.dll"
-"\epoc32\release\armv5\urel\javaenv.dll"-"c:\sys\bin\javaenv.dll"
+"\epoc32\release\armv5\urel\javaenvinfo.dll"-"c:\sys\bin\javaenvinfo.dll"
 "\epoc32\release\armv5\urel\javaipc.dll"-"c:\sys\bin\javaipc.dll"
 "\epoc32\release\armv5\urel\javainstallerstarter.dll"-"c:\sys\bin\javainstallerstarter.dll"
 "\epoc32\release\armv5\urel\javamidpstarter.dll"-"c:\sys\bin\javamidpstarter.dll"
@@ -654,9 +654,13 @@
 "\epoc32\release\armv5\urel\lcdgr.dll"-"c:\sys\bin\lcdgr.dll"
 "\epoc32\release\armv5\urel\lcdui.dll"-"c:\sys\bin\lcdui.dll"
 "\epoc32\release\armv5\urel\LCDC16MA.dll"-"c:\sys\bin\LCDC16MA.dll"
+"\epoc32\data\z\resource\plugins\LCDC16MA.rsc"-"c:\resource\plugins\LCDC16MA.rsc"
 "\epoc32\release\armv5\urel\LCDC16MU.dll"-"c:\sys\bin\LCDC16MU.dll"
+"\epoc32\data\z\resource\plugins\LCDC16MU.rsc"-"c:\resource\plugins\LCDC16MU.rsc"
 "\epoc32\release\armv5\urel\LCDC4K.dll"-"c:\sys\bin\LCDC4K.dll"
+"\epoc32\data\z\resource\plugins\LCDC4K.rsc"-"c:\resource\plugins\LCDC4K.rsc"
 "\epoc32\release\armv5\urel\LCDC64K.dll"-"c:\sys\bin\LCDC64K.dll"
+"\epoc32\data\z\resource\plugins\LCDC64K.rsc"-"c:\resource\plugins\LCDC64K.rsc"
 "\epoc32\release\armv5\urel\lcdgdrv.dll"-"c:\sys\bin\lcdgdrv.dll"
 "\epoc32\release\armv5\urel\lcdgdrvi.dll"-"c:\sys\bin\lcdgdrvi.dll"
 #ifdef RD_JAVA_S60_RELEASE_5_0_IAD
--- a/build/sis/java_3_1.pkg	Tue May 11 16:07:20 2010 +0300
+++ b/build/sis/java_3_1.pkg	Tue May 25 12:34:19 2010 +0300
@@ -169,7 +169,7 @@
 "\epoc32\release\armv5\urel\javabtsppscplugin.dll"-"c:\sys\bin\javabtsppscplugin.dll"
 "\epoc32\release\armv5\urel\javabtgoepscplugin.dll"-"c:\sys\bin\javabtgoepscplugin.dll"
 "\epoc32\release\armv5\urel\javadatagramscplugin.dll"-"c:\sys\bin\javadatagramscplugin.dll"
-"\epoc32\release\armv5\urel\javaenv.dll"-"c:\sys\bin\javaenv.dll"
+"\epoc32\release\armv5\urel\javaenvinfo.dll"-"c:\sys\bin\javaenvinfo.dll"
 "\epoc32\release\armv5\urel\javaipc.dll"-"c:\sys\bin\javaipc.dll"
 "\epoc32\release\armv5\urel\javainstallerstarter.dll"-"c:\sys\bin\javainstallerstarter.dll"
 "\epoc32\release\armv5\urel\javamidpstarter.dll"-"c:\sys\bin\javamidpstarter.dll"
--- a/inc/build_defines.hrh	Tue May 11 16:07:20 2010 +0300
+++ b/inc/build_defines.hrh	Tue May 25 12:34:19 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-#define RD_JAVA_VERSION 2,1,24 
+#define RD_JAVA_VERSION 2,1,26 
 #define RD_JAVA_SYMBIAN_TARGET 
 #define RD_JAVA_S60_RELEASE_9_2 
 #define RD_JAVA_S60_RELEASE_9_2_ONWARDS 
--- a/inc/java.txt	Tue May 11 16:07:20 2010 +0300
+++ b/inc/java.txt	Tue May 25 12:34:19 2010 +0300
@@ -1,1 +1,1 @@
-2.1.24
+2.1.26
--- a/javacommons/comms/build/comms_0x2002DCA6.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/comms/build/comms_0x2002DCA6.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/comms/ipclib/clientserver/build/ipc_0x2002DCB7.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/comms/ipclib/clientserver/build/ipc_0x2002DCB7.mmp	Tue May 25 12:34:19 2010 +0300
@@ -82,6 +82,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -102,10 +115,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/connectionmanager/build/javaconnectionmanager_0x2002DCA7.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/connectionmanager/build/javaconnectionmanager_0x2002DCA7.mmp	Tue May 25 12:34:19 2010 +0300
@@ -79,6 +79,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -99,10 +112,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/connectionmanager/javasrc.linux/com/nokia/mj/impl/connectionmanager/AccessPoint.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.connectionmanager;
-
-import com.nokia.mj.impl.rt.support.*;
-import com.nokia.mj.impl.utils.Uid;
-
-
-
-/*
-JavaImplementation of AccessPoint class
-*/
-
-public class AccessPoint
-{
-    public static int NAP_INITIAL = -1;
-    public static int NAP_ERR = 0;
-    public static int NAP_NONE = 1;
-    public static int NAP_SNAP = 2;
-    public static int NAP_IAP = 3;
-    public static int NAP_ONCE = 4;
-    public static int NAP_ASKALWAYS = 5;
-    public static int NAP_DEFAULT = 6;
-
-    private int iType = -1;
-    private int iNapId = -1;
-
-    public AccessPoint()
-    {
-    }
-    public AccessPoint(int aType, int aId)
-    {
-        iType = aType;
-        iNapId = aId;
-    }
-
-    public int getType()
-    {
-        return iType;
-    }
-
-    public int getNapId()
-    {
-        return iNapId;
-    }
-    public void setType(int aType)
-    {
-        iType = aType;
-    }
-}
--- a/javacommons/connectionmanager/javasrc.linux/com/nokia/mj/impl/connectionmanager/ConnectionManager.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.connectionmanager;
-
-import com.nokia.mj.impl.connectionmanager.*;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.*;
-import com.nokia.mj.impl.utils.Uid;
-import com.nokia.mj.impl.storage.*;
-
-
-
-/*
-JavaImplementation of ConnectionManager class
-*/
-
-public class ConnectionManager
-{
-
-    // Constants for URL paramater names
-    private static String NOKIANETID = ";nokia_netid=";
-    private static String NOKIAAPNID = ";nokia_apnid=";
-
-    // Constants for application setting types
-    private static char NONE = 'N'; // Supported by app mgr
-    private static char ASKALWAYS = 'A'; // this is needed since device default supports it
-    private static char DEFAULTCONN = 'F'; // Supported by app mgr
-    private static char ASKONCE = 'O'; // supported by App mgr
-    private static char SNAPID = 'D';
-    private static char IAPID = 'I';
-
-    private boolean iIsReseted = false;
-    private int iNativeHandle;
-    private static ConnectionManager iCmInstance;
-    public AccessPoint iSessionNetworkAccessPoint;
-
-    static
-    {
-        try
-        {
-            if (Logger.Activated[Logger.ESOCKET])
-            {
-                Logger.ILOG(Logger.ESOCKET,"Loading connection manager...");
-            }
-            Jvm.loadSystemLibrary("javaconnectionmanager");
-            if (Logger.Activated[Logger.ESOCKET])
-            {
-                Logger.ILOG(Logger.ESOCKET, "Loading connection manager ok");
-            }
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-
-
-    public ConnectionManager()
-    {
-    }
-
-    public synchronized static ConnectionManager getInstance()
-    {
-        return null;
-    }
-
-    public AccessPoint getApplicationDefault(Uid aAppSuiteUid)
-    {
-        return null;
-    }
-
-
-    public synchronized AccessPoint getNetworkAccessPoint(Uid aAppSuiteUid, String aUri) throws Exception
-    {
-
-        String apn = _askNetworkAccessPoint();
-        apn = _getDeviceDefaultAccessPoint();
-        return null;
-    }
-
-
-
-
-    public synchronized void reset()
-    {
-        //iSessionNetworkAccessPoint = new AccessPoint();
-        //iIsReseted = true;
-    }
-    private native String _getDeviceDefaultAccessPoint();
-    private native String _askNetworkAccessPoint();
-
-}
-
-
-
-
--- a/javacommons/connectionmanager/src.linux/connectionmanagerjni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-#include "com_nokia_mj_impl_connectionmanager_ConnectionManager.h"
-
-
-JNIEXPORT jstring JNICALL
-Java_com_nokia_mj_impl_connectionmanager_ConnectionManager__1askNetworkAccessPoint
-(JNIEnv *aJni, jobject /*peer*/)
-{
-
-}
-JNIEXPORT jstring JNICALL
-Java_com_nokia_mj_impl_connectionmanager_ConnectionManager__1getDeviceDefaultAccessPoint
-(JNIEnv *aJni, jobject /*peer*/)
-{
-
-}
--- a/javacommons/fileutils/build/fileutils_0x2002DCAD.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/fileutils/build/fileutils_0x2002DCAD.mmp	Tue May 25 12:34:19 2010 +0300
@@ -97,6 +97,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -117,10 +129,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/fileutils/inc.linux/drivechangedeventgenerator.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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:  DriveChangedEventGenerator - Linux specific
-*
-*/
-
-#ifndef DRIVECHANGEDEVENTGENERATOR_H
-#define DRIVECHANGEDEVENTGENERATOR_H
-
-#include "driveutilities.h"
-
-namespace java
-{
-namespace fileutils
-{
-
-class DriveChangedEventGenerator : public DriveListenerInterface
-{
-public:
-    DriveChangedEventGenerator(DriveListenerInterface* aEventDispatcher);
-    virtual ~DriveChangedEventGenerator();
-
-    virtual void startEvents();
-    virtual void stopEvents();
-
-    // DriveListenerInterface
-    virtual void driveChanged(const int& aOperation, const driveInfo& aDriveInfo);
-
-private:
-    DriveListenerInterface*         iEventDispatcher;
-};
-
-} // namespace fileutils
-} // namespace java
-
-#endif // DRIVECHANGEDEVENTGENERATOR_H
--- a/javacommons/fileutils/javasrc.linux/com/nokia/mj/impl/fileutils/FilePlatformSpecifics.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,358 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.fileutils;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * FileURL manages URL/Path handling. It is responsible to manage paths which
- * have path separators specific to the platform. It will also manage
- * differences between URL and Absolute path and make it transparent to use
- * from.
- */
-final class FilePlatformSpecifics
-{
-    /**
-     * Resolves the real target given a pathname without drive using the agreed
-     * eclipsing rules. Currently for OMJ, we have agreed for C: and Z:
-     *
-     * @param aPath
-     *            contains path without drive letter
-     * @return resolved absolute path with drive letter; null if not found
-     */
-    public static String resolveDrive(String aPath)
-    {
-        return null;
-    }
-
-    /**
-     * Copies a file from one location to another.
-     *
-     * @param aSourceFile
-     *            absolute path name of the source file.
-     * @param aDestFile
-     *            absolute path name of the destication file.
-     * @param aOverwrite
-     *            if the destFile already exists, this option allows to
-     *            overwrite its contents
-     * @return true in case copy was successful, false otherwise.
-     */
-    public static boolean copy(String aSourceFile, String aDestFile,
-                               boolean aOverwrite) throws IOException
-    {
-        FileUtility aFrom = new FileUtility(aSourceFile);
-        FileUtility aTo = new FileUtility(aDestFile);
-
-        if (!aFrom.exists())
-        {
-            throw new IOException("Cannot copy, file does not exist: " + aFrom);
-        }
-
-        FileUtility toParent = aTo.getParentFile();
-        if (!toParent.exists())
-        {
-            // Directory for target file does not exist, let's create it.
-            toParent.mkdirs();
-        }
-
-        if (!aTo.exists())
-        {
-            aTo.createNewFile();
-        }
-        else if (!aOverwrite)
-        {
-            throw new IOException("Target already present");
-        }
-
-        InputStream fis = aFrom.openInputStream();
-        OutputStream fos = aTo.openOutputStream();
-
-        try
-        {
-            byte[] buf = new byte[16384];
-            int i = 0;
-            while ((i = fis.read(buf)) != -1)
-            {
-                fos.write(buf, 0, i);
-            }
-        }
-        catch (IOException ioe)
-        {
-            throw ioe;
-        }
-        finally
-        {
-            if (fis != null)
-            {
-                fis.close();
-            }
-            if (fos != null)
-            {
-                fos.close();
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Moves a file from one location to another.
-     *
-     * @param aSourceFile
-     *            absolute path name of the source file.
-     * @param aDestFile
-     *            absolute path name of the destication file.
-     * @param aOverwrite
-     *            if the destFile already exists, this option allows to
-     *            overwrite its contents
-     * @return true in case copy was successful, false otherwise.
-     */
-    public static boolean move(String aSourceFile, String aDestFile,
-                               boolean aOverwrite) throws IOException
-    {
-        FileUtility aFrom = new FileUtility(aSourceFile);
-        FileUtility aTo = new FileUtility(aDestFile);
-
-        boolean result = aFrom.rename(aTo.getName());
-        if (!result)
-        {
-            result = true;
-            if (aFrom.isDirectory())
-            {
-                result = copyAll(aFrom.getAbsolutePath(),
-                                 aTo.getAbsolutePath(), aOverwrite);
-                if (result)
-                {
-                    result = deleteAll(aFrom.getAbsolutePath());
-                }
-            }
-            else
-            {
-                try
-                {
-                    copy(aFrom.getAbsolutePath(), aTo.getAbsolutePath(),
-                         aOverwrite);
-                }
-                catch (IOException ioe)
-                {
-                    result = false;
-                    Logger.ELOG(Logger.EJavaFile, "FileOps.move: copy failed: "
-                                + ioe);
-                }
-                if (result)
-                {
-                    result = aFrom.delete();
-                    if (!result)
-                    {
-                        Logger.ELOG(Logger.EJavaFile,
-                                    "FileOps.move: delete failed: [" + aFrom + "]");
-                    }
-                }
-            }
-        }
-        if (!result)
-        {
-            Logger.ELOG(Logger.EJavaFile, "FileOps.move failed: [" + aFrom
-                        + "], [" + aTo + "]");
-        }
-        return result;
-    }
-
-    /**
-     * Copies a file from one location to another.
-     *
-     * @param aSourceFile
-     *            absolute path name of the source file.
-     * @param aDestFile
-     *            absolute path name of the destication file.
-     * @param aOverwrite
-     *            if the destFile already exists, this option allows to
-     *            overwrite its contents
-     * @return true in case copy was successful, false otherwise.
-     */
-    public static boolean copyAll(String aSourceFile, String aDestFile,
-                                  boolean aOverwrite) throws IOException
-    {
-        boolean result = true;
-        FileUtility aFrom = new FileUtility(aSourceFile);
-        FileUtility aTo = new FileUtility(aDestFile);
-
-        if (aFrom == null || !aFrom.exists() || aTo == null)
-        {
-            result = false;
-        }
-
-        if (result)
-        {
-            if (aFrom.isDirectory())
-            {
-//                if (aTo.exists())
-//                {
-//                    // Target dir exists, remove it before copying.
-//                    result = deleteAll(aTo.getAbsolutePath());
-//                }
-
-                if (result)
-                {
-                    result = aTo.mkdirs();
-                    if (!result)
-                    {
-                        Logger.ELOG(Logger.EJavaFile,
-                                    "FileOps.copyAll: mkdirs failed: "
-                                    + aTo.toString());
-                    }
-                }
-                else
-                {
-                    Logger.ELOG(Logger.EJavaFile,
-                                "FileOps.copyAll: delete target dir failed: "
-                                + aTo.toString());
-                }
-                FileUtility[] files = aFrom.listFiles();
-
-                if (files != null)
-                {
-                    for (int i = 0; i < files.length && result; i++)
-                    {
-
-                        String newTo = aTo.getAbsolutePath() + "/"
-                                       + files[i].getName();
-                        result = copyAll(files[i].getAbsolutePath(), newTo,
-                                         aOverwrite);
-                    }
-                }
-            }
-            else
-            {
-                try
-                {
-                    copy(aFrom.getAbsolutePath(), aTo.getAbsolutePath(),
-                         aOverwrite);
-                }
-                catch (IOException ioe)
-                {
-                    result = false;
-                    Logger.ELOG(Logger.EJavaFile,
-                                "FileOps.copyAll: copy failed: " + ioe);
-                }
-            }
-        }
-        if (!result)
-        {
-            Logger.ELOG(Logger.EJavaFile, "FileOps.copyAll failed: [" + aFrom
-                        + "], [" + aTo + "]");
-        }
-        return result;
-    }
-
-    /**
-     * Deletes contents of the entire directory alonw with the directory.
-     *
-     * @param aTargetFile
-     *            absolute path name of the directory to be deleted.
-     * @return true in case delete was successful, false otherwise.
-     */
-    public static boolean deleteAll(String aTargetFile) throws IOException
-    {
-        boolean result = true;
-        FileUtility aFile = new FileUtility(aTargetFile);
-        if (aFile == null)
-        {
-            result = false;
-        }
-
-        if (result && aFile.isDirectory())
-        {
-            FileUtility[] files = aFile.listFiles();
-            if (files != null)
-            {
-                for (int i = 0; i < files.length && result; i++)
-                {
-                    result = deleteAll(files[i].getAbsolutePath());
-                }
-            }
-        }
-
-        if (result && aFile.exists())
-        {
-            result = aFile.delete();
-        }
-
-        if (!result)
-        {
-            Logger.ELOG(Logger.EJavaFile, "FileOps.deleteAll failed: [" + aFile
-                        + "]");
-        }
-        return result;
-    }
-
-    /**
-     * Sets the hidden attribute of the selected file to the value provided. The
-     * attribute is applied to the file on the actual file system immediately
-     * upon invocation of this method if the file system and platform support
-     * it.
-     * <p>
-     * If the file system doesn't support a hidden attribute, this method is
-     * ignored and isHidden() always returns false. Since the exact definition
-     * of hidden is system-dependent, this method only works on file systems
-     * that support a settable file attribute.
-     * <p>
-     * For example, on Win32 and FAT file systems, a file may be considered
-     * hidden if it has been marked as such in the file's attributes; therefore
-     * this method is applicable.<br/> However on UNIX systems a file may be
-     * considered to be hidden if its name begins with a period character ('.').
-     * In the UNIX case, this method may be ignored and the method to make a
-     * file hidden may be the rename() method.
-     *
-     * @param aHidden
-     *            The new state of the hidden flag of the selected file.
-     * @throws IOException
-     *             if the connection's target does not exist or is not
-     *             accessible.
-     */
-    public static void setHidden(FileUtility aCaller, boolean aHidden)
-    throws IOException
-    {
-        String path = aCaller.getPath();
-        String name = aCaller.getName();
-
-        String newName = "." + name;
-        aCaller.rename(newName);
-    }
-
-    // IN S60, there is a hidden attribute, we set this value.
-    // Whereas on Linux, it is rename to .<something> so we do not use the
-    // native call
-    // private static native void _setHidden(String fileName, boolean hidden) throws IOException;
-
-    /**
-     * Get file Content ID.
-     *
-     * @param path to file where id is read.
-     * @return Content ID. Null if cannot be read or does not exists.
-     */
-    public static String getContentId(String aFilePath)
-    {
-        // Not currently supported on Linux platform.
-        return null;
-    }
-}
--- a/javacommons/fileutils/src.linux/drivechangedeventgenerator.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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:  DriveChangedEventGenerator - S60 specific
-*
-*/
-
-
-#include "logger.h"
-
-#include "drivechangedeventgenerator.h"
-#include "driveutilities.h"
-
-namespace java
-{
-namespace fileutils
-{
-
-DriveChangedEventGenerator::DriveChangedEventGenerator(DriveListenerInterface* aEventDispatcher)
-        :iEventDispatcher(aEventDispatcher)
-{
-    JELOG2(EJavaFile);
-}
-
-DriveChangedEventGenerator::~DriveChangedEventGenerator()
-{
-    JELOG2(EJavaFile);
-}
-
-void DriveChangedEventGenerator::startEvents()
-{
-    JELOG2(EJavaFile);
-
-    driveInfos drives;
-    DriveUtilities::getAllDrives(drives);
-
-    for (driveInfos::const_iterator iter = drives.begin() ;
-            iter != drives.end() ; ++iter)
-    {
-        if (iter->iIsRemovable)
-        {
-            // Add implementation
-        }
-    }
-}
-void DriveChangedEventGenerator::stopEvents()
-{
-    JELOG2(EJavaFile);
-}
-
-
-// DriveListenerInterface
-void DriveChangedEventGenerator::driveChanged(const int& aOperation, const driveInfo& aDriveInfo)
-{
-    JELOG2(EJavaFile);
-    iEventDispatcher->driveChanged(aOperation, aDriveInfo);
-}
-
-} // namespace fileutils
-} // namespace java
--- a/javacommons/fileutils/src.linux/filedrmhandlerjni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI Layer for File DRM Handler
- *
-*/
-
-
-#include "com_nokia_mj_impl_fileutils_FileDRMContentHandler.h"
-
-/*
- * Class:     com_nokia_mj_impl_fileutils_FileDRMContentHandler
- * Method:    _isProtectedFile
- * Signature: (Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_nokia_mj_impl_fileutils_FileDRMContentHandler__1isProtectedFile
-(JNIEnv *aJni, jclass, jstring aName)
-{
-    return false;
-}
-
-/*
- * Class:     com_nokia_mj_impl_fileutils_FileDRMContentHandler
- * Method:    _setDrmArguments
- * Signature: (IZI)I
- */
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_fileutils_FileDRMContentHandler__1setDrmArguments
-(JNIEnv *, jobject, jint, jboolean, jint)
-{
-}
-
-/*
- * Class:     com_nokia_mj_impl_fileutils_FileDRMContentHandler
- * Method:    _createDrmHandler
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_fileutils_FileDRMContentHandler__1createDrmHandler
-(JNIEnv *aJni, jobject, jstring aName)
-{
-    return 0;
-}
--- a/javacommons/fileutils/src.linux/filesystemutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  FileSystemUtils
- *
-*/
-
-
-#include <errno.h>
-#include <sys/statvfs.h>
-#include <sys/stat.h>
-#include <string>
-#include <dirent.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "javajniutils.h"
-#include "javacommonutils.h"
-#include "logger.h"
-
-#include "fileutilities.h"
-#include "linuxfilesystemutils.h"
-
-using namespace std;
-using namespace java::fileutils;
-using namespace java::util;
-
-/*
- * Implementation of FileUtilities methods
- *
- */
-OS_EXPORT long long FileUtilities::availableSize(const std::wstring& aDrive)
-{
-    JELOG2(EJavaFile);
-    char* mbDrive = JavaCommonUtils::wstringToUtf8(aDrive);
-    long retVal = 0;
-    try
-    {
-        retVal = LinuxFileSystemUtils::getAvailableSize(mbDrive);
-    }
-    catch (...)
-    {
-        // We need not report this error. If there was some problem, return -1
-        retVal = -1;
-    }
-    delete[] mbDrive;
-    return retVal;
-}
-
-OS_EXPORT long long FileUtilities::totalSize(const std::wstring& aDrive)
-{
-    JELOG2(EJavaFile);
-    char* mbDrive = JavaCommonUtils::wstringToUtf8(aDrive);
-    long retVal = 0;
-    try
-    {
-        retVal = LinuxFileSystemUtils::getTotalSize(mbDrive);
-    }
-    catch (...)
-    {
-        // We need not report this error. If there was some problem, return -1
-        retVal = -1;
-    }
-    delete[] mbDrive;
-    return retVal;
-}
-
-OS_EXPORT long long FileUtilities::usedSize(const std::wstring& aDrive)
-{
-    JELOG2(EJavaFile);
-    char* mbDrive = JavaCommonUtils::wstringToUtf8(aDrive);
-    long retVal = 0;
-    try
-    {
-        retVal = LinuxFileSystemUtils::getUsedSize(mbDrive);
-    }
-    catch (...)
-    {
-        // We need not report this error. If there was some problem, return -1
-        retVal = -1;
-    }
-    delete[] mbDrive;
-    return retVal;
-}
-
-OS_EXPORT bool FileUtilities::isHidden(const std::wstring& aFile)
-{
-    JELOG2(EJavaFile);
-    std::wstring file = aFile;
-    if (aFile.at(aFile.length()-1) == L'/')
-    {
-        file = aFile.substr(0, aFile.length()-1);
-    }
-    char* mbDrive = JavaCommonUtils::wstringToUtf8(file);
-
-    bool retVal = LinuxFileSystemUtils::isHidden(mbDrive);
-    delete[] mbDrive;
-    return retVal;
-}
-
-OS_EXPORT std::wstring FileUtilities::listRoots()
-{
-    JELOG2(EJavaFile);
-    std::string retString = LinuxFileSystemUtils::listRoots();
-    std::wstring wcRetString = JavaCommonUtils::utf8ToWstring(retString.c_str());
-    return wcRetString;
-
-}
-
-OS_EXPORT int FileUtilities::setReadable(const std::wstring& aFile, bool aReadable)
-{
-    JELOG2(EJavaFile);
-    int result = 0;
-    char* utf8Name = JavaCommonUtils::wstringToUtf8(aFile);
-
-    struct stat fileStat;
-    int error = lstat(utf8Name, &fileStat);
-
-    if (0!=error)
-    {
-        return -1;
-    }
-    mode_t currentMode = fileStat.st_mode;
-
-    if (aReadable)
-    {
-        currentMode = currentMode | S_IRUSR;
-    }
-    else
-    {
-        currentMode = currentMode & (~S_IRUSR);
-    }
-
-    result = chmod(utf8Name, currentMode);
-
-    delete[] utf8Name;
-    return result;
-}
-
-OS_EXPORT int FileUtilities::setWritable(const std::wstring& aFile, bool aWritable)
-{
-    JELOG2(EJavaFile);
-    int result = 0;
-    char* utf8Name = JavaCommonUtils::wstringToUtf8(aFile);
-
-    struct stat fileStat;
-    int error = lstat(utf8Name, &fileStat);
-
-    if (0!=error)
-    {
-        return -1;
-    }
-
-    mode_t currentMode = fileStat.st_mode;
-
-    if (aWritable)
-    {
-        currentMode = currentMode | S_IWUSR;
-    }
-    else
-    {
-        currentMode = currentMode & (~S_IWUSR);
-    }
-
-    result = chmod(utf8Name, currentMode);
-
-    delete[] utf8Name;
-    return result;
-}
-
-OS_EXPORT std::wstring FileUtilities::getDirContents(const std::wstring& dName,
-        bool aIncludeHidden)
-{
-    JELOG2(EJavaFile);
-    std::wstring origDirName = dName;
-    if (origDirName.at(origDirName.length() - 1) == L'/')
-    {
-        int len = origDirName.length();
-        std::wstring trimName = origDirName.substr(0, len -1);
-        origDirName = trimName;
-    }
-
-    //since there are no unicode variants of openDir and readDir in linux, we will use basic strings
-    char* multiByteDirName = new char[ origDirName.length()+1 ];
-    multiByteDirName = java::util::JavaCommonUtils::wstringToUtf8(origDirName);
-    std::string dirName(multiByteDirName);
-    std::string origMbsDirName(multiByteDirName);
-    std::wstring iFileListWrapper;
-
-    DIR* wDirHandle = opendir(dirName.c_str());
-    if (wDirHandle)
-    {
-        struct dirent* dir = readdir(wDirHandle);
-        while (dir)
-        {
-            //keep reading directory
-            dirName = origMbsDirName;
-
-            std::string name(dirName);
-            name += "/";
-            name += std::string(dir->d_name);
-
-            if (!aIncludeHidden)
-            {
-                std::wstring wName = java::util::JavaCommonUtils::utf8ToWstring(name.c_str());
-                if (isHidden(wName))
-                {
-                    // If it is hidden, continue.
-                    dir = readdir(wDirHandle);
-                    continue;
-                }
-            }
-
-            LOG1(EJavaFile, EInfo, "  FileUtilities::getDirContents(): Trying to Stat :%s: ",name.c_str());
-            struct stat buf;
-            if (stat(name.c_str() , &buf) == 0)
-            {
-                iFileListWrapper += java::util::JavaCommonUtils::utf8ToWstring(dir->d_name);
-                if (S_ISDIR(buf.st_mode))
-                { //it is directory
-                    LOG1(EJavaFile, EInfo, "  FileUtilities::getDirContents(): Directory: %s",dir->d_name);
-                    iFileListWrapper += std::wstring(L"/*");
-                }
-                else
-                {
-                    LOG1(EJavaFile, EInfo, "  FileUtilities::getDirContents(): File: %s",dir->d_name);
-                    iFileListWrapper += std::wstring(L"*");
-                }
-            }
-            else
-            {
-                WLOG1(EJavaFile, "  FileUtilities::getDirContents(): Error in Stat: %d ",errno);
-            }
-            dir = readdir(wDirHandle);
-        }
-        closedir(wDirHandle);
-    }
-    else
-    {
-        ELOG1(EJavaFile,"  FileUtilities::getDirContents(): Error Opening Dir: %d",errno);
-    }
-
-    delete[] multiByteDirName;
-    return iFileListWrapper;
-}
--- a/javacommons/fileutils/src.linux/linuxdriveutilities.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  DriveUtilities - Linux specific
-*
-*/
-
-
-#include "logger.h"
-
-#include "driveutilities.h"
-
-namespace java
-{
-namespace fileutils
-{
-OS_EXPORT void DriveUtilities::getAllDrives(driveInfos& aDriveInfos)
-{
-    JELOG2(EJavaFile);
-
-    driveInfo di;
-    di.iRootPath              = L"/tmp/";
-    di.iIsPresent             = true;
-    di.iIsRemovable           = false;
-    di.iIsLocal               = true;
-    di.iIsReadOnly            = false;
-    di.iId                    = 0x12345;
-    di.iIsExternallyMountable = false;
-
-    aDriveInfos.push_back(di);
-}
-} // end of namespace fileutils
-} // end of namespace java
--- a/javacommons/fileutils/src.linux/linuxfilesystemutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  LinuxFileSystemUtils
- *
-*/
-
-
-#include <errno.h>
-#include <sys/statvfs.h>
-#include <sys/stat.h>
-#include <string>
-#include <stdlib.h>
-
-#include "javajniutils.h"
-#include "javacommonutils.h"
-#include "logger.h"
-
-#include "fileutilities.h"
-#include "linuxfilesystemutils.h"
-
-using namespace std;
-using namespace java::fileutils;
-using namespace java::util;
-
-/*
- * Implementation of LinuxFileSystemUtils.h
- *
- */
-unsigned long LinuxFileSystemUtils::getAvailableSize(const char* aPath)
-{
-    JELOG2(EJavaFile);
-    struct statvfs fiData;
-
-    int result = statvfs(aPath, &fiData);
-    if (result < 0)
-    {
-        ELOG1(EJavaFile,
-              "  LinuxFileSystemUtils::GetAvailableSize(): Error %d ", errno);
-        int error = errno;
-        throw error;
-    }
-    return (fiData.f_bfree * fiData.f_bsize);
-}
-
-unsigned long LinuxFileSystemUtils::getUsedSize(const char* aPath)
-{
-    JELOG2(EJavaFile);
-    struct statvfs fsData;
-    int result = statvfs(aPath, &fsData);
-    if (result < 0)
-    {
-        ELOG1(EJavaFile, "  LinuxFileSystemUtils::GetUsedSize(): Error %d ",
-              errno);
-        int error = errno;
-        throw error;
-    }
-
-    return ((fsData.f_blocks - fsData.f_bfree) * fsData.f_bsize);
-
-}
-
-unsigned long LinuxFileSystemUtils::getTotalSize(const char* aPath)
-{
-    JELOG2(EJavaFile);
-    struct statvfs fsData;
-    int result = statvfs(aPath, &fsData);
-    if (result < 0)
-    {
-        ELOG1(EJavaFile, "  LinuxFileSystemUtils::GetTotalSize(): Error %d ",
-              errno);
-        int error = errno;
-        throw error;
-    }
-
-    return (fsData.f_blocks * fsData.f_frsize);
-}
-
-bool LinuxFileSystemUtils::isHidden(const char* aFile)
-{
-    //Files in Linux are hidden if they have a "." as a prefix.
-    //We need to search for "/." in the file name to confirm. Simple. Or is it?
-    JELOG2(EJavaFile);
-    std::string name(aFile);
-
-    int lastIndex = name.find_last_of('/') ;
-    if (name.at(lastIndex+1) == '.')
-    {
-        return true;
-    }
-    return false;
-}
-
-int LinuxFileSystemUtils::setHidden(const char* /*aFile*/, const bool /*aHide*/)
-{
-    return 0;
-}
-
-string LinuxFileSystemUtils::listRoots()
-{
-    string retValue(getenv("HOME"));
-    return retValue;
-}
-
--- a/javacommons/fileutils/src.linux/linuxfilesystemutils.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  LinuxFileSystemUtils
- *
-*/
-
-
-#ifndef LINUXFILESYSTEMUTILS_H
-#define LINUXFILESYSTEMUTILS_H
-
-#include <string>
-
-#include "jni.h"
-
-namespace java
-{
-namespace fileutils
-{
-
-class LinuxFileSystemUtils
-{
-public:
-    static unsigned long getAvailableSize(const char* aPath);
-
-    static unsigned long getUsedSize(const char* aPath);
-
-    static unsigned long getTotalSize(const char* aPath);
-
-    static bool isHidden(const char* aFile);
-
-    static int setHidden(const char* aFile, const bool aHide);
-
-    static std::string listRoots();
-};
-
-}  //end namespace fileutils
-}  //end namespace java
-
-#endif // LINUXFILESYSTEMUTILS_H
--- a/javacommons/gcfbase/build/javagcf_0x2002DCAE.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfbase/build/javagcf_0x2002DCAE.mmp	Tue May 25 12:34:19 2010 +0300
@@ -84,6 +84,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -104,10 +117,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfbase/javasrc.linux/com/nokia/mj/impl/gcf/utils/ProtocolBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.utils;
-
-import java.io.IOException;
-import javax.microedition.io.Connection;
-
-public interface ProtocolBase
-{
-
-    public Connection openConn(String name, int mode, boolean timeouts)
-    throws IOException;
-
-}
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/Connection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-public interface Connection
-{
-    public void close() throws IOException;
-}
-
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/ConnectionNotFoundException.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-public class ConnectionNotFoundException extends IOException
-{
-    public ConnectionNotFoundException()
-    {
-        super();
-    }
-
-    public ConnectionNotFoundException(String s)
-    {
-        super(s);
-    }
-}
-
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/Connector.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-
-
-public class Connector
-{
-    public final static int READ  = 1;
-    public final static int WRITE = 2;
-    public final static int READ_WRITE = (READ|WRITE);
-
-    private Connector() {}
-
-    public static Connection open(String name) throws IOException
-    {
-        return open(name, READ_WRITE);
-    }
-
-    public static Connection open(String name, int mode) throws IOException
-    {
-        return open(name, mode, false);
-    }
-
-    public static Connection open(String name, int mode, boolean timeouts) throws IOException
-    {
-
-        if (name == null)
-        {
-            throw new IllegalArgumentException("url null");
-        }
-
-        int colon = name.indexOf(':');
-        if (colon < 1)
-        {
-            throw new IllegalArgumentException("invalid url");
-        }
-
-        try
-        {
-            String protocol;
-            protocol = name.substring(0, colon).toLowerCase();
-            name = name.substring(colon+1);
-
-            String root = "com.nokia.mj.impl.gcf.protocol";
-
-            // System.out.println("open: " + root + "." + protocol + ".Protocol");
-            Class clazz = Class.forName(root+"."+protocol+".Protocol");
-
-            ProtocolBase cb = (ProtocolBase)clazz.newInstance();
-            return cb.openConn(name, mode, timeouts);
-        }
-        catch (Exception e)
-        {
-            throw new IOException(e.toString());
-        }
-    }
-
-    public static DataInputStream openDataInputStream(String name) throws IOException
-    {
-        Connection con = Connector.open(name, Connector.READ);
-        DataInputStream is = null;
-
-        try
-        {
-            is = ((InputConnection)con).openDataInputStream();
-        }
-        catch (ClassCastException e)
-        {
-            throw new IllegalArgumentException("invalid class");
-        }
-        finally
-        {
-            con.close();
-        }
-
-        return is;
-    }
-
-    public static DataOutputStream openDataOutputStream(String name) throws IOException
-    {
-        Connection con = Connector.open(name, Connector.WRITE);
-        DataOutputStream os = null;
-
-        try
-        {
-            os = ((OutputConnection)con).openDataOutputStream();
-        }
-        catch (ClassCastException e)
-        {
-            throw new IllegalArgumentException("invalid class");
-        }
-        finally
-        {
-            con.close();
-        }
-
-        return os;
-    }
-
-    public static InputStream openInputStream(String name) throws IOException
-    {
-        return openDataInputStream(name);
-    }
-
-    public static OutputStream openOutputStream(String name) throws IOException
-    {
-        return openDataOutputStream(name);
-    }
-
-}
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/ContentConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-
-public interface ContentConnection extends StreamConnection
-{
-
-    public String getType();
-    public String getEncoding();
-    public long getLength();
-
-}
-
-
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/InputConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-public interface InputConnection extends Connection
-{
-    public InputStream openInputStream() throws IOException;
-    public DataInputStream openDataInputStream() throws IOException;
-}
-
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/OutputConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-public interface OutputConnection extends Connection
-{
-    public OutputStream openOutputStream() throws IOException;
-    public DataOutputStream openDataOutputStream() throws IOException;
-}
-
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/StreamConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-
-package javax.microedition.io;
-
-import java.io.*;
-
-public interface StreamConnection extends InputConnection, OutputConnection
-{
-}
--- a/javacommons/gcfbase/javasrc.linux/javax/microedition/io/StreamConnectionNotifier.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-package javax.microedition.io;
-
-import java.io.*;
-
-public interface StreamConnectionNotifier extends Connection
-{
-    public StreamConnection acceptAndOpen() throws IOException;
-}
-
-
--- a/javacommons/gcfprotocols/file/build/javafile_0x2002DCAC.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/file/build/javafile_0x2002DCAC.mmp	Tue May 25 12:34:19 2010 +0300
@@ -76,6 +76,18 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -96,10 +108,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileAccessHelper.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.file;
-
-import java.util.Hashtable;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-
-/**
- * Linux specific checks. Logic to be added when things become clear.
- */
-public class FileAccessHelper implements FileConstants
-{
-    public static boolean accessAllowed(String aPath, String aDomain)
-    {
-        return true;
-    }
-
-    public static boolean manufacturerDomainChecks(String aPath, String aIntent)
-    {
-        return true;
-    }
-
-    private static boolean otherDomainChecks(String aPath, String aIntent)
-    {
-        return true;
-    }
-
-    public static String getCategory(String aPath)
-    {
-        // SYSTEM_FILES, PRIVATE_USER_FILES, PUBLIC_DIRS, HOME_DIR
-        return PUBLIC_DIRS;
-    }
-
-    public static boolean isCreateAllowedWithinDir(String aPath, String aDomain)
-    {
-        return true;
-    }
-
-    /**
-     * To be used in case of list. If list is done on a directory that is equal
-     * to, or higher in path hierarchy than one of the restricted paths, then we
-     * need to check for access for all files, if not, then no need.
-     */
-    public static boolean isDirRestricted(String aPath)
-    {
-        return false;
-    }
-}
--- a/javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileSystemUtils.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.file;
-
-import java.util.Vector;
-import java.lang.RuntimeException;
-
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-
-/**
- * Provides methods to retrieve information that are platform specific. These
- * would include list of roots present and their localized names based on the
- * needs of the platform.
- */
-public final class FileSystemUtils
-{
-    private static String iAppDomain;
-
-    private static ApplicationInfo iAppInfo;
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javafile");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.EJavaFile, "Unable to load javafile dll");
-        }
-
-        // Load application information at startup
-        iAppInfo = ApplicationInfo.getInstance();
-
-        // Load application domain
-        iAppDomain = iAppInfo.getProtectionDomain();
-    }
-
-    public static String getAppPrivateDir()
-    {
-        String appPrivateDir = iAppInfo.getRootPath();
-        appPrivateDir = appPrivateDir.replace('\\', '/');
-        appPrivateDir += "scratch/";
-        return appPrivateDir;
-    }
-
-    public static String getProtectionDomain()
-    {
-        return iAppDomain;
-    }
-
-    public static String getDefaultRoot()
-    {
-        return _listRoots();
-    }
-
-    public static Vector listRoots()
-    {
-        String rootList = _listRoots();
-        Vector roots = new Vector();
-        roots.addElement(rootList + "/");
-        return roots;
-    }
-
-    public static Vector getRootNames()
-    {
-        Vector roots = new Vector();
-        roots.addElement("Internal/");
-        return roots;
-    }
-
-    public static String getPathOfProperty(int aValue)
-    {
-        String retValue = null;
-        Vector root = listRoots();
-
-        switch (aValue)
-        {
-        case FileConstants.GRAPHICS_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Images/";
-            break;
-        case FileConstants.MUSIC_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Sounds/";
-            break;
-        case FileConstants.PHOTOS_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Images/";
-            break;
-        case FileConstants.RECORDINGS_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Sounds/";
-            break;
-        case FileConstants.TONES_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Sounds/";
-            break;
-        case FileConstants.VIDEOS_PROPERTY:
-            retValue = "file:///" + root.elementAt(0) + "Videos/";
-            break;
-        case FileConstants.MEMORY_CARD_PROPERTY:
-            throw new RuntimeException(
-                "fileconn.dir.memorycard is not support in linux");
-        default:
-            retValue = null;
-        }
-        return retValue;
-    }
-
-    public static String getLocalizedName(int aValue)
-    {
-        return "";
-    }
-
-    private static native String _listRoots();
-}
--- a/javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/file/FileUrlValidator.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.file;
-
-import java.util.Vector;
-import java.io.IOException;
-
-final class FileUrlValidator
-{
-    private static String FILE_LOCALHOST = "file://localhost";
-
-    private static String FILE_SIMPLE = "file://";
-
-    public static String validateFileUrl(String aFileUrl) throws IOException
-    {
-        String path;
-
-        if (aFileUrl.startsWith(FILE_LOCALHOST))
-        {
-            path = aFileUrl.substring(FILE_LOCALHOST.length());
-        }
-        else if (aFileUrl.startsWith(FILE_SIMPLE))
-        {
-            path = aFileUrl.substring(FILE_SIMPLE.length());
-        }
-        else
-        {
-            throw new IOException("Improper URL Start");
-        }
-
-        return checkPathStart(path);
-
-    }
-
-    /**
-     * Checks to see if the URL begins properly. Case 1: It must either start
-     * wth file:/// or file://localhost/ Case 2: The string following the start
-     * must be one of the roots.
-     */
-    private static String checkPathStart(String aFilePath) throws IOException
-    {
-        Vector roots = FileSystemUtils.listRoots();
-        boolean validPath = false;
-
-        String filePath = aFilePath;
-        if (!filePath.startsWith("/"))
-        {
-            filePath = "/" + filePath;
-        }
-        for (int i = 0; i < roots.size(); i++)
-        {
-            if (filePath.startsWith((String) roots.elementAt(i)))
-            {
-                validPath = true;
-                break;
-            }
-        }
-
-        if (!validPath)
-        {
-            throw new IOException("Root not valid");
-        }
-
-        return filePath;
-    }
-}
--- a/javacommons/gcfprotocols/file/javasrc.linux/com/nokia/mj/impl/gcf/protocol/file/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.gcf.protocol.file;
-
-import java.io.IOException;
-
-import com.nokia.mj.impl.file.FileConnectionImpl;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-
-public class Protocol implements ProtocolBase
-{
-    public Protocol()
-    {
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        return new FileConnectionImpl(aUri, aMode, aTimeouts);
-    }
-
-    public javax.microedition.io.Connection openConn(String name, int mode,
-            boolean timeouts) throws IOException
-    {
-        return openConnection(name, mode, timeouts);
-    }
-}
--- a/javacommons/gcfprotocols/file/src.linux/filesystemutilsjni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI Layer corresponding to FileSystemUtils
- *
-*/
-
-
-#include <string>
-#include <stdlib.h>
-
-#include "javajniutils.h"
-#include "javacommonutils.h"
-
-#include "com_nokia_mj_impl_file_FileSystemUtils.h"
-
-/*
- * Class:     com_nokia_mj_impl_file_FileSystemUtils
- * Method:    _listRoots
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_file_FileSystemUtils__1listRoots
-(JNIEnv *aJni, jclass)
-{
-    std::wstring propVal = java::util::JavaCommonUtils::utf8ToWstring(getenv("HOME"));
-    return java::util::JniUtils::wstringToJstring(aJni, propVal);
-}
--- a/javacommons/gcfprotocols/http/build/javahttp_0x2002DCB1.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/http/build/javahttp_0x2002DCB1.mmp	Tue May 25 12:34:19 2010 +0300
@@ -92,6 +92,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -112,10 +125,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/http/inc.linux/nativedynamicproperty.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-#ifndef NATIVEDYNAMICPROPERTY_H
-#define NATIVEDYNAMICPROPERTY_H
-
-//#include <wchar.h>
-//#include "javaosheaders.h"
-#include "logger.h"
-
-#include <jni.h>
-
-namespace java
-{
-namespace http
-{
-class NativeDynamicProperty
-{
-public :
-
-    jstring getProxySettings(JNIEnv& aJNi);
-
-    char* iProxyServerAddress;
-
-};
-} // end namespace http
-}  // end namespace java
-#endif // NATIVEDYNAMICPROPERTY_H
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/gcf/protocol/http/HttpPermissionImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.http;
-
-import com.nokia.mj.impl.security.common.PermissionBase;
-import java.security.Permission;
-import java.security.PermissionCollection;
-import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
-
-public class HttpPermissionImpl extends PermissionBase
-{
-    /**
-     * Returns the question (as localized text) associated with the security
-     * prompt
-     *
-     * @return the localized text associated with the security prompt
-     */
-    private String iMessage = null;
-
-    public HttpPermissionImpl(String uri)
-    {
-        super(uri);
-    }
-
-    public String getSecurityPromptQuestion(int aInteractionMode)
-    {
-        return (SecurityPromptMessage.getInstance()).getText(
-                   SecurityPromptMessage.QUESTION_ID_NETWORK_USAGE, new String[]
-                   {
-                       Integer.toString(1), iMessage
-                   });
-    }
-
-    public String toString()
-    {
-        return "javax.microedition.io.HttpProtocolPermission";
-    }
-
-    public boolean implies(Permission p)
-    {
-        if (p instanceof HttpPermissionImpl)
-        {
-            return true;
-        }
-        return false;
-    }
-
-    public boolean equals(Object obj)
-    {
-        return true;
-    }
-
-    public int hashCode()
-    {
-        return 0;
-    }
-
-    public String getActions()
-    {
-        return "";
-    }
-
-    public PermissionCollection newPermissionCollection()
-    {
-        return null;
-    }
-
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/gcf/protocol/http/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.gcf.protocol.http;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.http.HttpClientConnection;
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Logger.ILOG(Logger.ESOCKET,
-                        "Loading HTTP protocol implementation");
-            Jvm.loadSystemLibrary("javasocket");
-            Logger.ILOG(Logger.ESOCKET,
-                        "HTTP protocol implementation loaded");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "+Protocol");
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-
-        String apnstring = null;
-        String urls = null;
-        int apnid = -1;
-        int index = -1;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "http +openConnection - aURi = " + aUri);
-
-        /* security related stuff */
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        HttpPermissionImpl per = new HttpPermissionImpl("http://*");
-        appUtils.checkPermission(per);
-
-        /* security related stuff */
-        index = aUri.indexOf(";nokia_netid=");
-        if (index != -1)
-        {
-            apnstring = aUri.substring(index);
-            int equalindex = apnstring.indexOf('=');
-            if (equalindex != -1)
-            {
-                String temp = apnstring.substring(equalindex + 1);
-                try
-                {
-                    apnid = Integer.parseInt(temp);
-                }
-                catch (NumberFormatException e)
-                {
-                    throw new IllegalArgumentException("url is invalid");
-                }
-            }
-            else
-            {
-                throw new IllegalArgumentException("url is invalid");
-            }
-            urls = aUri.substring(0, index);
-        }
-        else
-        {
-            index = aUri.indexOf(";nokia_apnid=");
-            if (index != -1)
-            {
-                apnstring = aUri.substring(index);
-                int equalindex = apnstring.indexOf('=');
-                if (equalindex != -1)
-                {
-                    String temp = apnstring.substring(equalindex + 1);
-                    try
-                    {
-                        apnid = Integer.parseInt(temp);
-                    }
-                    catch (NumberFormatException e)
-                    {
-                        throw new IllegalArgumentException("url is invalid");
-                    }
-                }
-                else
-                {
-                    throw new IllegalArgumentException("url is invalid");
-                }
-                urls = aUri.substring(0, index);
-            }
-            else
-            {
-                urls = aUri;
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "http +openConnection -after removing nokia_apnid : " + urls);
-        HttpClientConnection httpclient = new HttpClientConnection(urls);
-        return httpclient;
-
-    }
-
-    public javax.microedition.io.Connection openConn(String name, int mode,
-            boolean timeouts) throws IOException
-    {
-        return openConnection(name, mode, timeouts);
-    }
-
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/DateUtil.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +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:
-*
-*/
-package com.nokia.mj.impl.http;
-
-import com.nokia.mj.impl.utils.Logger;
-import java.util.Vector;
-
-public class DateUtil
-{
-    private static final String[] names = { "jan", "feb", "mar", "apr", "may",
-                                            "jun", "jul", "aug", "sep", "oct", "nov", "dec"
-                                          };
-
-    private static final long SECS_PER_DAY = 86400;
-
-    private static final long SECS_PER_HOUR = 3600;
-
-    private static final long SECS_PER_MIN = 60;
-
-    private static Vector monthNames = null;
-
-    private int year;
-
-    private int month;
-
-    private int day;
-
-    private int hour;
-
-    private int minute;
-
-    private int second;
-
-    private String weekday;
-
-    static
-    {
-        try
-        {
-            monthNames = new Vector(12);
-            String t = "sss";
-            for (int i = 0; i < 12; i++)
-                monthNames.addElement(names[i]);
-        }
-        catch (Exception e)
-        {
-        }
-    }
-
-    public DateUtil(int y, int m, int d, int hr, int min, int s)
-    {
-        year = y;
-        month = m;
-        day = d;
-        hour = hr;
-        minute = min;
-        second = s;
-    }
-
-    public DateUtil(String datetime)
-    {
-        String tmpWeekday = null;
-        int tmpYear, tmpDay, tmpMonth;
-        String tmpHour, tmpMinute, tmpSecond;
-        int start = 0;
-        int end = 0;
-        String temp;
-        int index = 0;
-        int colon = 0;
-        int begin = 0;
-
-        // parse date in the format : Thu, 14 Aug 2008 09:49:08 GMT"
-        // parse for weekday
-        end = datetime.indexOf(',');
-        if (end == -1)
-            weekday = null;
-        else
-        {
-            tmpWeekday = datetime.substring(start, end);
-            if (datetime.charAt(end + 1) == ' ')
-            {
-                start = end + 2;
-            }
-            else
-            {
-                start = end + 1;
-            }
-            weekday = tmpWeekday;
-        }
-
-        // parse for day
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "weekday: " + tmpWeekday);
-        end = datetime.indexOf(' ', start);
-        if (end == -1)
-            throw new IllegalArgumentException("illegal date format");
-        temp = datetime.substring(start, end);
-        day = Integer.parseInt(temp);
-        start = end + 1;
-
-        // parse for month
-        end = datetime.indexOf(' ', start);
-        if (end == -1)
-            throw new IllegalArgumentException("illegal date format");
-        temp = datetime.substring(start, end);
-        temp = temp.toLowerCase();
-        if ((index = monthNames.indexOf(temp)) != -1)
-            month = index + 1;
-        else
-            throw new IllegalArgumentException("wrong date format");
-        start = end + 1;
-
-        // parse for year
-        end = datetime.indexOf(' ', start);
-        if (end == -1)
-            throw new IllegalArgumentException("illegal date format");
-        temp = datetime.substring(start, end);
-        year = Integer.parseInt(temp);
-        start = end + 1;
-
-        // parse for time
-        end = datetime.indexOf(' ', start);
-        if (end == -1)
-            throw new IllegalArgumentException("illegal date format");
-        temp = datetime.substring(start, end);
-
-        begin = start;
-        while (begin < end)
-        {
-            index = datetime.indexOf(':', begin);
-            if (index != -1)
-            {
-                colon = colon + 1;
-                begin = index + 1;
-            }
-            if (index == -1)
-                break;
-        }
-        if (colon != 2)
-            throw new IllegalArgumentException("illegal date format");
-        index = datetime.indexOf(':', start);
-        tmpHour = datetime.substring(start, index);
-        hour = Integer.parseInt(tmpHour);
-        start = index + 1;
-        index = datetime.indexOf(':', start);
-        tmpMinute = datetime.substring(start, index);
-        minute = Integer.parseInt(tmpMinute);
-        start = index + 1;
-        tmpSecond = datetime.substring(start, end);
-        second = Integer.parseInt(tmpSecond);
-
-    }
-
-    public static long epocDifference(String s)
-    {
-        /* return number of milliseconds elapsed from Jan 1 1970, 00:00:00 GMT */
-        DateUtil obj1 = new DateUtil(s);
-        DateUtil obj2 = new DateUtil(1970, 1, 1, 0, 0, 0);
-        long d1 = obj1.juliandayfromdate();
-        long d2 = obj2.juliandayfromdate();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "d1 = " + d1 + "d2 = " + d2);
-        long days = d1 - d2;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "days = " + days);
-        long secs = obj1.secondsfrom() - obj2.secondsfrom();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "secs = " + secs);
-        if (days < 0 || (days == 0 && secs < 0))
-            return -1;
-        long retval = (days * SECS_PER_DAY) + secs;
-        return retval * 1000;
-
-    }
-
-    public static long epocDifference(int y, int m, int d, int hr, int min,
-                                      int s)
-    {
-        /* return number of milliseconds elapsed from Jan 1 1970, 00:00:00 GMT */
-        DateUtil obj1 = new DateUtil(y, m, d, hr, min, s);
-        DateUtil obj2 = new DateUtil(1970, 1, 1, 0, 0, 0);
-        long d1 = obj1.juliandayfromdate();
-        long d2 = obj2.juliandayfromdate();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "d1 = " + d1 + "d2 = " + d2);
-        long days = d1 - d2;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "days = " + days);
-        long secs = obj1.secondsfrom() - obj2.secondsfrom();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "secs = " + secs);
-        if (days < 0 || (days == 0 && secs < 0))
-            return -1;
-        long retval = (days * SECS_PER_DAY) + secs;
-        return retval * 1000;
-
-    }
-
-    private long juliandayfromdate()
-    {
-        /* computes the number of days elapsed from 4713BC/01/01 00:00:00 */
-        if (year < 0)
-            ++year;
-
-        if (year > 1582
-                || (year == 1582 && (month > 10 || (month == 10 && day >= 15))))
-        {
-            // Gregorian calendar starting from October 15, 1582
-            // Algorithm from Henry F. Fliegel and Thomas C. Van Flandern
-            return (1461 *(year + 4800 + (month - 14) / 12)) / 4
-                   + (367 *(month - 2 - 12 *((month - 14) / 12))) / 12
-                   - (3 *((year + 4900 + (month - 14) / 12) / 100)) / 4 + day
-                   - 32075;
-        }
-        else if (year < 1582
-                 || (year == 1582 && (month < 10 || (month == 10 && day <= 4))))
-        {
-            // Julian calendar until October 4, 1582
-            // Algorithm from Frequently Asked Questions about Calendars by Claus Toendering
-            int a = (14 - month) / 12;
-            return (153 *(month + (12 * a) - 3) + 2) / 5
-                   + (1461 *(year + 4800 - a)) / 4 + day - 32083;
-        }
-        else
-        {
-            // the day following October 4, 1582 is October 15, 1582
-            return 0;
-        }
-    }
-
-    private long secondsfrom()
-    {
-        long sec = SECS_PER_HOUR * hour + SECS_PER_MIN * minute + second;
-        return sec;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpClientConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1401 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.InputStream;
-import javax.microedition.io.SocketConnection;
-import javax.microedition.io.HttpConnection;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.gcf.utils.DateUtil;
-import com.ibm.oti.util.Util;
-import com.nokia.mj.impl.rt.support.Finalizer;
-import com.nokia.mj.impl.rt.support.JvmInternal; // to be removed when Finalizer is ready
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.gcf.protocol.socket.Protocol;
-import com.nokia.mj.impl.socket.utils.SocketConnectionUtility;
-
-/**
- *Http Implementation class - supports the midp 3.0 specification.
- */
-public class HttpClientConnection implements HttpConnection
-{
-    private Finalizer mFinalizer;
-
-    protected UrlParser mHttpurl;
-
-    private HttpOutputStreamAdapter mOutputStream = null;
-
-    private HttpInputStreamAdapter mInputStream = null;
-
-    private SocketElement mSelm = null;
-
-    private static final int DEFAULT_HTTP_PORT = 80;
-
-    private static final int DEFAULT_HTTPS_PORT = 443;
-
-    private int mybuf_index = 0;
-
-    private int mybuf_length = 0;
-
-    private static final int BUFFER_SIZE = 512;
-
-    private byte[] myBuf = new byte[BUFFER_SIZE];
-
-    private static SocketPool mSockpool;
-
-    private String mStatusLine = null;
-
-    private int mByt_rd_frmchunk = 0;
-
-    protected InputStream mSocketInStream;
-
-    protected OutputStream mSocketOutStream;
-
-    protected SocketConnection mSockObj = null;
-
-    protected static final String HTTP_VERSION_STRING = "HTTP/1.1";
-
-    protected static final byte HTTP_SETUP = 0;
-
-    protected static final byte HTTP_CONNECTED = 1;
-
-    protected static final byte HTTP_SENDING = 2;
-
-    protected static final byte HTTP_CLOSED = 3;
-
-    protected String mUrlString;
-
-    protected String mRequestMethod;
-
-    protected StringBuffer mResponseBuffer;
-
-    protected byte mHttpConnectionState = HTTP_SETUP;
-
-    protected boolean mCloseFlag = false;
-
-    protected boolean mChunkedFlag;
-
-    protected boolean mSendChunkedReq;
-
-    protected boolean mLastChunkSent = false;
-
-    protected long mContentLength = -1;
-
-    protected int msgBufindex = 0;
-
-    protected boolean mOldSocketFlag = false;
-
-    protected boolean mResentFlag = false;
-
-    protected boolean mEof = false;
-
-    protected int mChunkSize = 0;
-
-    public boolean mInputStreamOpen = false;
-
-    protected HttpRequest mHttpRequest = null;
-
-    protected HttpResponse mHttpResponse = null;
-
-    protected boolean mIsProxyUsed = false;
-
-    protected boolean mOutputStreamOpen = false;
-
-    static
-    {
-        int max = 2; // maximum number of persistent connection
-        mSockpool = new SocketPool(max);
-    }
-
-    /**
-     * Constructs the HttpClientConnection with default request method - GET.
-     *
-     * @param url -
-     *            url string
-     */
-    public HttpClientConnection(String url)
-    {
-        // return an object of type httpconection
-        // this method gets called when connector.open is called
-        // parameter - url. store the url for further use
-        // set default port - 80 and default method -GET
-
-        // Logger.LOG(Logger.ESOCKET, Logger.EInfo,"HttpClientConnection()");
-        mHttpurl = new UrlParser("http", url);
-        mUrlString = url;
-        if (mHttpurl.port == -1)
-        {
-            mHttpurl.port = DEFAULT_HTTP_PORT;
-        }
-        mRequestMethod = GET;
-        mHttpRequest = new HttpRequest();
-        mHttpResponse = new HttpResponse();
-        mResponseBuffer = new StringBuffer();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "  HttpClientConnection:  registering for finalization");
-        mFinalizer = registerForFinalization();
-    }
-
-    Finalizer registerForFinalization()
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "creating a finalizer object this = " + this + "mSockObj = "
-                   + mSockObj);
-        return new Finalizer()
-        {
-            public void finalizeImpl()
-            {
-                doFinalize();
-            }
-        };
-
-    }
-
-    /**
-     * This function is called by the runtime during finalization. all native
-     * resources are released
-     */
-    public void doFinalize()
-    {
-        mSelm = mSockpool.getConnection(mHttpurl.host + mHttpurl.port);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "Http doFinalize() called : this :" + this + "+mSockObj = "
-                   + mSockObj);
-        if (mSelm != null)
-        {
-            if (mSelm.getIsActiveFlag() != true)
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                           "socket is active - hence not finalizing");
-                mSockpool.removeConnection(mHttpurl.host + mHttpurl.port);
-                try
-                {
-                    if (mSocketInStream != null)
-                    {
-                        mSocketInStream.close();
-                        mSocketInStream = null;
-                    }
-                    if (mSocketOutStream != null)
-                    {
-                        mSocketOutStream.close();
-                        mSocketOutStream = null;
-                    }
-                    if (mSockObj != null)
-                    {
-                        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                                   "Http doFinalize() called :sockobj:"+ mSockObj);
-                        mSockObj.close();
-                        mSockObj = null;
-                    }
-                }
-                catch (Exception e)
-                {
-
-                }
-            }
-        }
-    }
-
-    /**
-     * This function returns the proxy address.
-     *
-     */
-    protected String getProxy()
-    {
-        int colon = 0;
-        String proxyHost = null;
-        String proxyPortString = null;
-        int proxyPort = 0;
-        String tmpproxy = System.getProperty("com.nokia.mj.impl.http.proxy");
-        return tmpproxy;
-    }
-
-    /**
-     * createSocketConnection method opens socket connection if not open.
-     */
-    public void createSocketConnection() throws IOException
-    {
-        String socketUrl = null;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "+createSocketConnection()");
-
-        mSelm = mSockpool.getConnection(mHttpurl.host + mHttpurl.port);
-        if (mSelm == null)
-        {
-            // if proxy present, connect to proxy or else make direct socket
-            // connection to destination
-            String proxyAddress = null;
-            proxyAddress = getProxy();
-            if (proxyAddress != null)
-            {
-                // if proxy is present connect to it
-                socketUrl = "//" + proxyAddress;
-                mIsProxyUsed = true;
-            }
-            else
-            {
-                socketUrl = "//" + mHttpurl.host + ":" + mHttpurl.port;
-                mIsProxyUsed = false;
-            }
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "socket conn to "
-                       + socketUrl);
-            SocketConnectionUtility sock1 = new SocketConnectionUtility(
-                socketUrl);
-            mSockObj = (SocketConnection) sock1.getSocketInstance();
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "before 1st setsocketoption");
-            mSocketOutStream = mSockObj.openOutputStream();
-        }
-        else
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "using persistent socket");
-            mSockObj = mSelm.get_socket_object();
-            mSocketOutStream = mSelm.get_output_stream();
-            mIsProxyUsed = mSelm.get_Proxy_Flag();
-            mSelm.setIsActiveFlag(true);
-            mSocketInStream = mSelm.get_input_stream();
-            mOldSocketFlag = true;
-        }
-        if (mSockObj != null)
-        {
-            Logger
-            .LOG(Logger.ESOCKET, Logger.EInfo,
-                 "socket creation success ");
-        }
-        else
-        {
-            // ideally mSockObj should not be null
-            throw new IOException("Connection failed");
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "--createSocketConnection()");
-    }
-
-    /**
-     * getURL returns the URL passed to the Connector.open() function.
-     *
-     * @return URL
-     */
-    public String getURL()
-    {
-        // the stored url is returned
-        return mHttpurl.scheme + ":" + mUrlString;
-    }
-
-    /**
-     * returns the protocol name of this url eg : http or https.
-     *
-     * @return protocol
-     */
-    public String getProtocol()
-    {
-        return mHttpurl.scheme;
-    }
-
-    /**
-     * returns the host name of the url for this Httpconnection eg : host name
-     * or IPv4 address.
-     *
-     * @return host address
-     */
-    public String getHost()
-    {
-        return mHttpurl.host;
-    }
-
-    /**
-     * returns the file portion of the url for this HttpConnection returns file
-     * portion of the url or null if there is no file.
-     *
-     * @return file portion of url
-     */
-    public String getFile()
-    {
-        return mHttpurl.path;
-    }
-
-    /**
-     * @return the ref portion of the url. usually after the # mark null is
-     *         returned if no value.
-     */
-    public String getRef()
-    {
-        return mHttpurl.fragment;
-    }
-
-    /**
-     * @return the query portion of the url RFC 2396 defines the quesry
-     *         component as the text after the forst question mark(?) in the
-     *         url. null is returned if no value
-     */
-    public String getQuery()
-    {
-        return mHttpurl.query;
-    }
-
-    /**
-     * returns the network port number in the url for this HttpConnection
-     * returns the defalut port number (80) if no port number was passed in the
-     * url string to connector.open.
-     *
-     * @return port
-     */
-    public int getPort()
-    {
-        return mHttpurl.port;
-
-    }
-
-    /**
-     * returns the http request method - GET/POST/HEAD/PUT/DELETE default method -
-     * GET.
-     *
-     * @return request method
-     */
-    public synchronized String getRequestMethod()
-    {
-        return mRequestMethod;
-
-    }
-
-    /**
-     * returns the value of the named request property key identifies the named
-     * request property whose value is returned if key does not exist null is
-     * returned.
-     *
-     * @param key
-     * @return request property
-     */
-    public synchronized String getRequestProperty(String key)
-    {
-        return mHttpRequest.getElement(key);
-    }
-
-    /**
-     * set the HTTP method for the url - GET/POST/HEAD/PUT/DELETE.
-     *
-     * @param request
-     *            method
-     * @throws IOException
-     *             if it is in connected state
-     */
-    public synchronized void setRequestMethod(String method) throws IOException
-    {
-        if (method == null)
-        {
-            throw new NullPointerException();
-        }
-        throwIfClosed();
-        if (mHttpConnectionState != HTTP_SETUP)
-        {
-            throw new IOException("Illegal state to call setRequestMethod");
-        }
-        if (!((method.equals(GET)) || (method.equals(POST))
-                || (method.equals(HEAD)) || (method.equals(PUT)) || (method
-                        .equals(DELETE))))
-        {
-            throw new IOException("setRequestMethod : Unsupported HTTP method"
-                                  + method);
-        }
-
-        if (mOutputStreamOpen)
-        {
-            // After an output stream has been opened by the openOutputStream or
-            // openDataOutputStream
-            // attempts to change the request parameters are ignored.
-            return;
-        }
-        mRequestMethod = method;
-    }
-
-    /**
-     * set the HTTP request properties.
-     *
-     * @param key
-     * @param value
-     * @throw IOException if in connected state if the key already exists it
-     *        should be overwritten with the new value Http requires that those
-     *        properties which can multiple values, the values should be
-     *        separated by comma for the same key which enable multiple
-     *        propertied to be appended into a single property.
-     */
-    public synchronized void setRequestProperty(String key, String value)
-    throws IOException
-    {
-        throwIfClosed();
-        if (mHttpConnectionState != HTTP_SETUP)
-        {
-            throw new IOException("Illegal state to call setRequestProperty");
-        }
-        if ((key == null) || (value == null))
-        {
-            throw new IOException("Null string passed to setRequestProperty");
-        }
-        if (mOutputStreamOpen)
-        {
-            // After an output stream has been opened by the openOutputStream or
-            // openDataOutputStream
-            // attempts to change the request parameters are ignored.
-            return;
-        }
-        String tmp = key.toLowerCase();
-        if (tmp.equals("transfer-encoding"))
-        {
-            mSendChunkedReq = true;
-        }
-        mHttpRequest.setElement(key, value);
-    }
-
-    /*
-     * the following methods cause the transition from setup to connected state.
-     */
-
-    /**
-     * returns the HTTP response code parses the status line like HTTP/1.0 200
-     * OK HTTP/1.0 401 Unauthorized and extracts the status code or -1 if no
-     * status code can be discerned
-     *
-     * @return response code
-     * @throws IOException
-     *             if an error occurred connecting to server.
-     */
-    public synchronized int getResponseCode() throws IOException
-    {
-        // opensocket, sendrequest, readrequest
-        // send read buffer to headerparser
-        // LineParser.parseStatusLine(string)
-        // return LineParser.statusCode
-        throwIfClosed();
-        getConnected();
-        return mHttpResponse.getStatusCode();
-    }
-
-    /**
-     * returns the response message from the HTTP response parses the status
-     * line and extracts message like - OK, Unauthorized.
-     *
-     * @return message or null if message cant be discerned
-     * @throws IOException
-     *             if error occurred while connecting to server
-     */
-    public synchronized String getResponseMessage() throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        return mHttpResponse.getResponseMsg();
-    }
-
-    /**
-     * returns the value of the expires header field it is the number of
-     * miilisecons passed from jan 1, 1970 it is the expiration time for the
-     * reource the url refers.
-     *
-     * @return value or 0 if not known
-     * @throws IOException
-     *             if error occurred while connecting to server
-     */
-    public synchronized long getExpiration() throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        final long result = getHeaderFieldDate("Expires", 0);
-        return result;
-    }
-
-    /**
-     * returns the value of the date header field or 0 if not known it is the
-     * sending date of the resource the url references it is the number of
-     * miilseconds passed since jan 1. 1970.
-     *
-     * @return date header field
-     * @throws IOException
-     *             if error occurred while connecting to server
-     */
-    public synchronized long getDate() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "++Http getDate()");
-        throwIfClosed();
-        getConnected();
-        final long result = getHeaderFieldDate("Date", 0);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "--Http getDate()");
-        return result;
-    }
-
-    /**
-     * returns the value of last-modified header field it is the date of the
-     * resource the url references when it was last modified.
-     *
-     * @return last-modified header field or 0 if not known
-     * @throws IOException
-     *             if error occurred while connecting to server
-     */
-    public synchronized long getLastModified() throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        final long result = getHeaderFieldDate("Last-Modified", 0);
-        return result;
-    }
-
-    /**
-     * Returns the value of the named header field.
-     *
-     * @param name -
-     *            of a header field.
-     * @return the value of the named header field, or null if there is no such
-     *         field in the header.
-     * @throws IOException -
-     *             if an error occurred connecting to the server.
-     */
-    public synchronized String getHeaderField(String name) throws IOException
-    {
-        throwIfClosed();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "+getHeaderField()");
-        getConnected();
-        return mHttpResponse.getElement(name);
-    }
-
-    /**
-     * Returns the value of the named field parsed as a number.
-     *
-     * @param name -
-     *            the name of the header field.
-     * @param def -
-     *            the default value.
-     * @return: the value of the named field, parsed as an integer or The def
-     *          value is returned if the field is missing or malformed.
-     * @throws IOException -
-     *             if an error occurred connecting to the server.
-     */
-    public synchronized int getHeaderFieldInt(String name, int def)
-    throws IOException
-    {
-        String value;
-        throwIfClosed();
-        getConnected();
-        value = mHttpResponse.getElement(name);
-        if (value == null)
-        {
-            return def;
-        }
-        else
-        {
-            int result;
-            try
-            {
-                result = Integer.parseInt(value);
-            }
-            catch (Exception e)
-            {
-                result = def; // default value is returned
-            }
-            return result;
-        }
-    }
-
-    /**
-     * Gets a header field value by index.
-     *
-     * @param aIndex -
-     *            the index of the header field
-     * @return : the value of the nth header field or null if the array index is
-     *         out of range. An empty String is returned if the field does not
-     *         have a value
-     * @throws IOException -
-     *             if an error occurred connecting to the server.
-     */
-    public synchronized String getHeaderField(int aIndex) throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        if (aIndex >= mHttpResponse.numberOfElements() || aIndex < 0)
-        {
-            return null;
-        }
-        final String result = (String) mHttpResponse.getValueAt(aIndex);
-        return result;
-    }
-
-    /**
-     * Gets a header field key by index.
-     *
-     * @param aIndex -
-     *            the index of the header field
-     * @return: the key of the nth header field or null if the array index is
-     *          out of range.
-     * @throws IOException -
-     *             if an error occurred connecting to the server
-     */
-    public synchronized String getHeaderFieldKey(int aIndex) throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        if (aIndex >= mHttpResponse.numberOfElements() || aIndex < 0)
-        {
-            return null;
-        }
-        final String result = (String) mHttpResponse.getNameAt(aIndex);
-        return result;
-    }
-
-    /**
-     * @return the length of the content which is being provided E.g. if the
-     *         connection is via HTTP, then the value of the content-length
-     *         header field is returned or -1 if it is not known.
-     */
-    public synchronized long getLength()
-    {
-        try
-        {
-            getConnected();
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET, "getLength() failed", e);
-        }
-        return mContentLength;
-    }
-
-    /**
-     * Returns a string describing the encoding of the content which the
-     * resource connected to is providing E.g. if the connection is via HTTP,
-     * the value of the content-encoding header field is returned.
-     *
-     * @return encoding string used or null if not known
-     */
-    public String getEncoding()
-    {
-        try
-        {
-            getConnected();
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET, "getEncoding() failed", e);
-        }
-        return mHttpResponse.getElement("Content-Encoding");
-    }
-
-    /**
-     * Returns the type of content that the resource connected to is providing
-     * For instance, if the connection is via HTTP, then the value of the
-     * content-type header field is returned. or null if it is not known
-     */
-    public synchronized String getType()
-    {
-        try
-        {
-            getConnected();
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET, "getType() failed, e");
-        }
-        return mHttpResponse.getElement("Content-Type");
-    }
-
-    /**
-     * Open and return an input stream for a connection.
-     *
-     * @return InputStream
-     * @throws IOExcpetion
-     *             if an IO error occurs
-     */
-    public synchronized InputStream openInputStream() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "+ openInputStream()");
-        if (mHttpConnectionState != HTTP_CONNECTED)
-        {
-            getConnected();
-        }
-        throwIfClosed();
-        if (mInputStream == null)
-        {
-            mInputStream = new HttpInputStreamAdapter(this);
-            mInputStreamOpen = true;
-        }
-        else
-        {
-            throw new IOException("InputStream already opened");
-        }
-        return (mInputStream);
-    }
-
-    /**
-     * Open and return a data input stream for a connection.
-     *
-     * @return DataInputStream
-     * @throws IOExcpetion
-     *             if an IO error occurs
-     */
-    public synchronized DataInputStream openDataInputStream()
-    throws IOException
-    {
-        if (mHttpConnectionState != HTTP_CONNECTED)
-        {
-            getConnected();
-        }
-        throwIfClosed();
-        if (mInputStream == null)
-        {
-            mInputStream = new HttpInputStreamAdapter(this);
-            mInputStreamOpen = true;
-        }
-        else
-        {
-            throw new IOException("DataInputStream already opened");
-        }
-        return (new DataInputStream(mInputStream));
-    }
-
-    /**
-     * Open and return an output stream for a connection.
-     *
-     * @return OutputStream
-     * @throws IOExcpetion
-     *             if an IO error occurs
-     */
-    public synchronized OutputStream openOutputStream() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "++ Http::openOutputStream()");
-        throwIfClosed();
-        if (mOutputStream == null)
-        {
-            mOutputStream = new HttpOutputStreamAdapter(this);
-            mOutputStreamOpen = true;
-        }
-        else
-        {
-            throw new IOException("OutputStream already opened");
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "-- Http::openOutputStream()");
-        return mOutputStream;
-    }
-
-    /**
-     * Open and return a data output stream for a connection.
-     *
-     * @return DataOutputStream
-     * @throws IOExcpetion
-     *             if an IO error occurs
-     */
-    public synchronized DataOutputStream openDataOutputStream()
-    throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "++ Http::openDataOutputStream()");
-        throwIfClosed();
-        if (mOutputStream == null)
-        {
-            mOutputStream = new HttpOutputStreamAdapter(this);
-            mOutputStreamOpen = true;
-        }
-        else
-        {
-            throw new IOException("OutputStream already opened");
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "-- Http::openDataOutputStream()");
-        return (new DataOutputStream(mOutputStream));
-    }
-
-    /**
-     * Throw an exception if the connection is close
-     *
-     * @throws IOExcpetion
-     *             if an IO error occurs
-     */
-    void throwIfClosed() throws IOException
-    {
-        if (mHttpConnectionState == HTTP_CLOSED)
-        {
-            throw new IOException("Connection close");
-        }
-    }
-
-    /**
-     * closes the http connection.
-     */
-    public synchronized void close()
-    {
-        if (mHttpConnectionState == HTTP_CLOSED)
-        {
-            return;
-        }
-        mHttpConnectionState = HTTP_CLOSED;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "Http close() called "
-                   + mCloseFlag + ";;" + mEof + "this = " + this + " sockobj = "
-                   + mSockObj);
-        try
-        {
-            if ((mCloseFlag == false) && (mEof == true))
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "Adding connection : "
-                           + mHttpurl.host);
-                if (mInputStream != null)
-                {
-                    mInputStream.close();
-                }
-                if (mOutputStream != null)
-                {
-                    mOutputStream.close();
-                }
-                mSockpool.addConnection((mHttpurl.host + mHttpurl.port),
-                                        mSockObj, mSocketInStream, mSocketOutStream,
-                                        mIsProxyUsed);
-            }
-            else
-            {
-                mSockpool.removeConnection(mHttpurl.host + mHttpurl.port);
-                if (mSocketInStream != null)
-                {
-                    mSocketInStream.close();
-                }
-                if (mSocketOutStream != null)
-                {
-                    mSocketOutStream.close();
-                }
-                if (mSockObj != null)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "Http::close(),calling Socket close");
-                    mSockObj.close();
-                }
-                mSocketInStream = null;
-                mSocketOutStream = null;
-                mSockObj = null;
-            }
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET,
-                        "Error while closing the http connection", e);
-        }
-
-    }
-
-    /**
-     * creates and sends a chunked request to the server and reads response from
-     * server after sending of last chunk.
-     */
-    public void sendChunkedRequest(boolean isLastChunk) throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "http:: sendChunkedRequest() isLastChunk = " + isLastChunk);
-        try
-        {
-            if (isLastChunk == true)
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "Sending last chunk "
-                           + mLastChunkSent);
-
-                // Send 0\r\n , marking end of chunked request
-                if (mLastChunkSent == true)
-                {
-                    // already sent, either by os.close() or some get() call
-                    return;
-                }
-                String t1 = "0;\r\n\r\n";
-                mSocketOutStream.write(t1.getBytes());
-                mSocketOutStream.flush();
-                mLastChunkSent = true;
-                return;
-            }
-            else
-            {
-                if (mHttpConnectionState != HTTP_SENDING)
-                {
-                    String requesttempLine = mHttpRequest.createRequestLine(
-                                                 mHttpurl, mRequestMethod, mUrlString, 0,
-                                                 mIsProxyUsed);
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "\n chunked request sent:" + requesttempLine
-                               + ":end");
-                    mSocketOutStream.write(requesttempLine.getBytes());
-                    mHttpConnectionState = HTTP_SENDING;
-                }
-                if (mOutputStream != null)
-                {
-                    if (mOutputStream.mDataBytes != null)
-                    {
-                        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                                   "inside bytarr");
-                        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                                   " out stream size = "
-                                   + mOutputStream.mDataBytes.length);
-                        // write mChunkSize\r\ndata
-                        String t2 = Integer
-                                    .toString(mOutputStream.mDataBytes.length)
-                                    + ";\r\n";
-                        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                                   "\nRequest Body:\n" + t2
-                                   + new String(mOutputStream.mDataBytes));
-                        mSocketOutStream.write(t2.getBytes());
-                        mSocketOutStream.write(mOutputStream.mDataBytes);
-                        String t3 = "\r\n";
-                        mSocketOutStream.write(t3.getBytes());
-                    }
-                }
-                mSocketOutStream.flush();
-            }
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "outstream.write failed"
-                       + e);
-            if (mOldSocketFlag == true)
-            {
-                // if we have used an old tcp connection ( from connection pool)
-                // and send fails, then send the second request afresh.
-                resend_request();
-            }
-            else
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                           "---------SendRequestLine()");
-                throw new IOException(e.getMessage());
-            }
-        }
-    }
-
-    public void sendRequest() throws IOException
-    {
-        /**
-         * creates request, sends request to server and reads response recieved
-         * from server.
-         */
-        if (mHttpConnectionState == HTTP_CONNECTED)
-        {
-            // request has already been sent
-            return;
-        }
-        mHttpConnectionState = HTTP_CONNECTED;
-        if (mSockObj == null)
-        {
-            createSocketConnection();
-        }
-
-        if (mSendChunkedReq == true)
-        {
-            sendChunkedRequest(true);
-        }
-        else
-        {
-            // send request
-            sendRequestLine();
-        }
-        if (mResentFlag == false)
-        {
-            if (mSocketInStream == null)
-            {
-                mSocketInStream = mSockObj.openInputStream();
-            }
-            readResponse(mSocketInStream);
-        }
-        // Logger.LOG(Logger.ESOCKET,
-        // Logger.EInfo,"httpClientConnection-sendRequest()");
-
-    }
-
-    /**
-     * send the request line eg : GET www.google.com HTTP/1.1.
-     *
-     * @throws IOException
-     */
-    public void sendRequestLine() throws IOException
-    {
-        int tmplen = 0;
-        if (mOutputStream != null)
-        {
-            mOutputStream.copyToByteArray();
-            if (mOutputStream.mDataBytes != null)
-            {
-                tmplen = mOutputStream.mDataBytes.length;
-            }
-        }
-        String requesttempLine = mHttpRequest.createRequestLine(mHttpurl,
-                                 mRequestMethod, mUrlString, tmplen, mIsProxyUsed);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "\n request sent:"
-                   + requesttempLine + ":end");
-        try
-        {
-            mSocketOutStream.write(requesttempLine.getBytes());
-            if (mOutputStream != null)
-            {
-                if (mOutputStream.mDataBytes != null)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo, "inside bytarr");
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               " out stream size = "
-                               + mOutputStream.mDataBytes.length);
-                    mSocketOutStream.write(mOutputStream.mDataBytes);
-                }
-            }
-            mSocketOutStream.flush();
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "outstream.write failed"
-                       + e);
-            if (mOldSocketFlag == true)
-            {
-                resend_request();
-            }
-            else
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "--SendRequestLine()");
-                throw new IOException(e.getMessage());
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "---------SendRequestLine()");
-    }
-
-    /**
-     * read the response from inputstream.
-     *
-     * @param is -
-     *            inputstream
-     */
-    public void readResponse(InputStream is) throws IOException
-    {
-        // Logger.LOG(Logger.ESOCKET, Logger.EInfo,"+ readResponse()");
-        readStatusLine(is);
-        if (mResentFlag == false)
-        {
-            readResponseHeaders(is);
-        }
-        // Logger.LOG(Logger.ESOCKET, Logger.EInfo,"- readResponse()");
-    }
-
-    public void readResponseHeaders(InputStream is) throws IOException
-    {
-        // read response headers and body.
-        int total = 0;
-        int count = -1;
-        try
-        {
-            int tmpcnt = 0;
-            int bytesread = 0;
-            String ln;
-            while (true)
-            {
-                ln = readLine(is);
-                if (ln == null)
-                {
-                    break;
-                }
-                mResponseBuffer.append(ln);
-                mResponseBuffer.append("\r\n");
-                bytesread++;
-                tmpcnt++;
-            }
-            String headerBuf = mResponseBuffer.toString();
-            parseResponse(headerBuf);
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET, "readResponseHeaders() failed", e);
-        }
-    }
-
-    public void readStatusLine(InputStream is) throws IOException
-    {
-        // read statusline from server
-        try
-        {
-            mStatusLine = readLine(is);
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "status line is "
-                       + mStatusLine);
-            if ((mStatusLine == null) && (mOldSocketFlag == true))
-            {
-                // If the CRLF of the previous response is not read, read it
-                // read again to get the status line of the new response.
-
-                mStatusLine = readLine(is);
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                           "status line in trial2 is " + mStatusLine);
-            }
-            if ((mStatusLine == null) && (mOldSocketFlag == true))
-            {
-                /*
-                 * the second request has failed. reconstruct and send the
-                 * second request on a new socket connection
-                 */
-                resend_request();
-            }
-            if (mStatusLine == null)
-            {
-                // server closed/terminated abnormally
-                throw new IOException("Server error");
-            }
-
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "status line is "
-                       + mStatusLine);
-        }
-        catch (IOException e)
-        {
-            throw new IOException("No response received" + e.toString());
-        }
-        mHttpResponse.parseStatusLine(mStatusLine);
-    }
-
-    public String readLine(InputStream is) throws IOException
-    {
-        // read data line by line from inputstream.
-        // read one line at a time from inputstream
-        int c;
-        StringBuffer resBuffer = new StringBuffer();
-        // Logger.LOG(Logger.ESOCKET, Logger.EInfo,"+readLine()");
-        try
-        {
-            for (;;)
-            {
-                c = is.read();
-                // Logger.LOG1(Logger.ESOCKET, Logger.EInfo,"+readLine()-c:"+c);
-                if (c < 0)
-                {
-                    return null;
-                }
-                if (c == '\r')
-                {
-                    continue;
-                }
-                if (c == '\n')
-                {
-                    // Logger.LOG(Logger.ESOCKET,
-                    // Logger.EInfo,"+readLine()-\n");
-                    break;
-                }
-                resBuffer.append((char) c);
-            }
-
-            // Return a whole line and reset the string buffer.
-            // Logger.LOG(Logger.ESOCKET,
-            // Logger.EInfo,"+readLine()- resBuffer :" + resBuffer);
-            String line;
-            if (resBuffer.length() == 0)
-            {
-                line = null;
-            }
-            else
-            {
-                line = resBuffer.toString();
-            }
-            // Logger.LOG(Logger.ESOCKET,
-            // Logger.EInfo,"+readLine()- responseline :" + line);
-            return line;
-        }
-        catch (Exception e)
-        {
-            return null;
-        }
-    }
-
-    public void parseResponse(String buf) throws IOException
-    {
-        HttpMessageParser msgParser = new HttpMessageParser();
-        msgParser.parseHeader(buf, this);
-    }
-
-    public void resend_request() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "resend request called ");
-        mHttpConnectionState = HTTP_SETUP;
-        mOldSocketFlag = false;
-        mSockObj = null;
-        mSockpool.removeConnection(mHttpurl.host + mHttpurl.port);
-        sendRequest();
-        mResentFlag = true;
-
-    }
-
-    /**
-     * getHeaderFieldDate
-     *
-     * @param aName
-     * @param aDfault
-     * @return header field date
-     * @throws IOException
-     */
-    public synchronized long getHeaderFieldDate(String aName, long aDfault)
-    throws IOException
-    {
-        throwIfClosed();
-        getConnected();
-        String value;
-        value = mHttpResponse.getElement(aName);
-        if (value != null)
-        {
-            final long result = parseDate(value);
-            return result;
-        }
-        else
-        {
-            return aDfault;
-        }
-    }
-
-    protected long parseDate(String aDateString)
-    {
-        final long result = DateUtil.epocDifference(aDateString);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "parseDate : result = "
-                   + result);
-        return result;
-    }
-
-    protected void getConnected() throws IOException
-    {
-        try
-        {
-            sendRequest();
-        }
-        catch (Exception e)
-        {
-            throw new IOException(e.getMessage());
-        }
-    }
-
-    protected void getChunkSize()
-    {
-        // read new chunk size
-        try
-        {
-            String tmplen = readLine(mSocketInStream);
-            // Logger.LOG(Logger.ESOCKET, Logger.EInfo,"line = "+tmplen);
-            if (tmplen == null)
-            {
-                tmplen = readLine(mSocketInStream);
-            }
-            int t = tmplen.indexOf(';'); // the line containing size may have
-            // some extra stuff after ';' character
-            if (t > 0)
-            {
-                tmplen = tmplen.substring(0, t);
-            }
-            mChunkSize = Integer.parseInt(tmplen, 16);
-
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "\nChunk_size = "
-                       + mChunkSize);
-        }
-        catch (Exception e)
-        {
-            Logger.WLOG(Logger.ESOCKET, "Reading chunk size failed", e);
-        }
-    }
-
-    protected synchronized int getBytes(byte[] aBytes, int aOffset, int aLength)
-    throws IOException
-    {
-        int bytesRead = 0;
-        while (aLength > 0)
-        {
-            int numRead = myRead(aBytes, aOffset, aLength);
-            if (numRead <= 0)
-            {
-                if (bytesRead == 0)
-                {
-                    return -1;
-                }
-                break;
-            }
-            bytesRead += numRead;
-            aOffset = aOffset + numRead;
-            aLength = aLength - numRead;
-        }
-
-        return bytesRead;
-    }
-
-    protected int myRead(byte[] buf, int offset, int len) throws IOException
-    {
-        if (mybuf_index == mybuf_length)
-        {
-            // everything was read from the internal mybuffer
-            mybuf_length = get_data_into_myBuffer();
-            mybuf_index = 0;
-        }
-        if (mybuf_length == -1)
-        {
-            return -1;
-        }
-
-        int nBytes;
-
-        if ((mybuf_index + len) <= mybuf_length)
-        {
-            nBytes = len;
-        }
-        else
-        {
-            nBytes = mybuf_length - mybuf_index;
-        }
-        System.arraycopy(myBuf, mybuf_index, buf, offset, nBytes);
-        mybuf_index += nBytes;
-        return nBytes;
-    }
-
-    protected int get_data_into_myBuffer() throws IOException
-    {
-        int rc = -1;
-        int cnt;
-
-        if (mByt_rd_frmchunk == mChunkSize)
-        {
-            // before getting the chunk_size read the CRLF present
-            if (mChunkedFlag == false)
-            {
-                // Data was not chunked, we had assuemd the whole content as
-                // one big chunk
-                mEof = true;
-                return -1;
-            }
-            getChunkSize();
-            if (mChunkSize == 0)
-            {
-                mEof = true;
-                return -1;
-            }
-            // This is a new chunk, nothing is read still
-            mByt_rd_frmchunk = 0;
-        }
-
-        int chunk_remaining = mChunkSize - mByt_rd_frmchunk;
-        int inputBufferSize = BUFFER_SIZE;
-        // Logger.LOG(Logger.ESOCKET,
-        // Logger.EInfo,"get_data_into_myBuffer calling stream base read : "+
-        // chunk_remaining);
-        if (inputBufferSize >= chunk_remaining)
-        {
-            rc = mSocketInStream.read(myBuf, 0, chunk_remaining);
-        }
-        else
-        {
-            rc = mSocketInStream.read(myBuf, 0, inputBufferSize);
-        }
-        // Logger.LOG(Logger.ESOCKET,
-        // Logger.EInfo,"get_data_into_myBuffer return : "+ rc);
-
-        // we now have read "rc" bytes from the chunk
-        mByt_rd_frmchunk += rc;
-        return rc;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpInputStreamAdapter.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * Input Stream adapter class. Provides the input stream interfaces
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-public class HttpInputStreamAdapter extends InputStream
-{
-    private boolean mOpenFlag = true;
-
-    private HttpClientConnection mHttpClientConn;
-
-    private byte[] mSingleByteBuf = new byte[1];
-
-    private static final int MASK = 0xff;
-
-    /**
-     * Constructs the HttpInputStreamAdapter.
-     *
-     * @param aHttpConn
-     *            the HttpConn object
-     */
-    public HttpInputStreamAdapter(HttpClientConnection aHttpConn)
-    {
-        mHttpClientConn = aHttpConn;
-    }
-
-    /**
-     * Read the data from the buffer.
-     *
-     * @return byte read
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized int read() throws IOException
-    {
-        if (read(mSingleByteBuf, 0, 1) > 0)
-        {
-            return (mSingleByteBuf[0] & MASK);
-        }
-        return -1;
-    }
-
-    /**
-     * Reads the data to the buffer.
-     *
-     * @param buf
-     *            the byte to be copied
-     * @param offset
-     *            the start offset inside the buf
-     * @param len
-     *            number of bytes to be read
-     * @return byte read
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized int read(byte[] buf, int offset, int len)
-    throws IOException
-    {
-        int j, k, tmplen;
-        int ret = -1;
-
-        if ((offset < 0) || (len < 0) || (offset + len > buf.length))
-        {
-            throw new IOException("illegal argument exception ");
-        }
-
-        if (mOpenFlag == false)
-        {
-            throw new IOException("Connection Closed");
-        }
-
-        if (mHttpClientConn.mChunkedFlag == false)
-        {
-            // read directly from the underlying socket input stream
-            if (mHttpClientConn.mContentLength >= 0)
-            {
-                mHttpClientConn.mChunkSize = (int) mHttpClientConn.mContentLength;
-                int rc = mHttpClientConn.getBytes(buf, offset, len);
-                ret = rc;
-            }
-            else
-            {
-                tmplen = mHttpClientConn.mSocketInStream.read(buf, offset, len);
-                ret = tmplen;
-            }
-        }
-        else
-        {
-            // chunked response case
-            int rc = mHttpClientConn.getBytes(buf, offset, len);
-            ret = rc;
-        }
-        return ret;
-    }
-
-    /**
-     * Closes the OutputStream .
-     *
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized void close() throws IOException
-    {
-        // mHttpClientConn.inStream.close();
-        mOpenFlag = false;
-        mHttpClientConn.mInputStreamOpen = false;
-    }
-
-    /**
-     * Check if input stream is in open state.
-     *
-     * @return true if inputstream open
-     */
-    public synchronized boolean isOpen()
-    {
-        return mOpenFlag;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpMessage.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.util.Vector;
-
-/**
- * Http class responsible for storing HTTP message.
- */
-public class HttpMessage
-{
-    private Vector mNameList;
-
-    private Vector mValueList;
-
-    /**
-     * Constructs the Storage class.
-     */
-    public HttpMessage()
-    {
-        mNameList = new Vector();
-        mValueList = new Vector();
-    }
-
-    /**
-     * parse the protocol version.
-     *
-     * @param aKey
-     *            the name of the http header.
-     * @param aVal
-     *            the value of the corresponding header.
-     * @param mNameList
-     *            the list into which the header key will be added.
-     * @param mValueList
-     *            the list into which the header value will be added.
-     */
-    public final void addElement(String aKey, String aVal)
-    {
-        String key = aKey.toLowerCase();
-        String val = aVal;
-        mNameList.addElement(key);
-        mValueList.addElement(val);
-    }
-
-    /**
-     * parse the protocol version.
-     *
-     * @param key
-     *            the name of the http header to be removed.
-     * @param mNameList
-     *            the list from which header correspoding to key will be removed.
-     * @param mValueList
-     *            the list from which the header value corresponding to the key will be removed.
-     */
-    public final void removeElement(String aKey)
-    {
-        String keyLowerCase = aKey.toLowerCase();
-        int index = mNameList.indexOf(keyLowerCase);
-        if (index > -1)
-        {
-            mNameList.removeElementAt(index);
-            mValueList.removeElementAt(index);
-        }
-    }
-
-    /**
-     * Returns the value of the http header.
-     *
-     * @param key
-     *            the name of the http header.
-     * @param mNameList
-     *            the list of headers.
-     * @param mValueList
-     *            the list of values corresponding to header names.
-     * @return the header value.
-     */
-    public final String getElement(String key)
-    {
-        if (key == null)
-        {
-            return null;
-        }
-        String key1 = key.toLowerCase();
-        int index = mNameList.indexOf(key1);
-        String hv = null;
-        if (index > -1)
-        {
-            hv = (String) mValueList.elementAt(index);
-        }
-        return hv;
-    }
-
-    /**
-     * Returns the name of the http header at the specified index.
-     *
-     * @param aIndex
-     *            index into the list supplied.
-     * @param mNameList
-     *            the list of headers.
-     * @return the header name.
-     */
-    public final String getNameAt(int aIndex)
-    {
-        String nv = (String) mNameList.elementAt(aIndex);
-        return nv;
-    }
-
-    /**
-     * Returns the value of the http header at the specified index.
-     *
-     * @param aIndex
-     *            index into the list supplied.
-     * @param mValueList
-     *            the list of header values.
-     * @return the header value.
-     */
-    public final String getValueAt(int aIndex)
-    {
-        String hv = (String) mValueList.elementAt(aIndex);
-        return hv;
-    }
-
-    /**
-     * Sets the name,value of the http header.
-     *
-     * @param aKey
-     *            name of the http header.
-     * @param aVal
-     *            the header value.
-     * @param mNameList
-     *            the list of header names(keys).
-     * @param mValueList
-     *            the list of header values.
-     */
-    public final void setElement(String aKey, String aValue)
-    {
-        String keyLowerCase = aKey.toLowerCase();
-        int index = mNameList.indexOf(keyLowerCase);
-        if (index == -1)
-        {
-            addElement(keyLowerCase, aValue);
-        }
-        else
-        {
-            // for certain headers, it can have muliple value
-            // so there will be multiple entries for the same key
-            if (aKey.equals("User-Agent"))
-            {
-                String temp1 = (String) mValueList.elementAt(index);
-                String temp2 = temp1.concat(", ");
-                String multipleValues = temp2.concat(aValue);
-                mValueList.setElementAt(multipleValues, index);
-            }
-            else
-            {
-                // else replace the old value with the new value
-                mValueList.setElementAt(aValue, index);
-            }
-        }
-    }
-
-    /**
-     * Sets the value of the http header at the specified index.
-     *
-     * @param aIndex
-     *            the index of the http header.
-     * @param aVal
-     *            the header value.
-     * @param mValueList
-     *            the list of header values.
-     */
-    public final void setElementAt(String aVal, int aIndex)
-    {
-        mValueList.setElementAt(aVal, aIndex);
-    }
-
-    /**
-     * Sets the value of the http header at the specified index.
-     *
-     * @param mNameList
-     *            the list containing all the header names.
-     * @return the number of elements present in the input list.
-     */
-    public final int numberOfElements()
-    {
-        return mNameList.size();
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpMessageParser.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.io.IOException;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * Simple MessageParser. Used to parse the Http response line.
- *
- * @version 1.1
- */
-public class HttpMessageParser
-{
-    private static final String WHITESPACE = " ";
-    private static final String TAB = "\t";
-    private static final String LINEFEED = "\n";
-
-    /**
-     * Constructs the OutputStreamAdapter.
-     */
-    HttpMessageParser()
-    {
-    }
-
-    /**
-     * parse the protocol version.
-     *
-     * @param aHeaderBuffer
-     *            the buffer which contains all the response headers.
-     * @param aClientConn
-     *            the http client connection object.
-     * @throws IOException
-     *             if stream is closed
-     */
-    public final void parseHeader(String aHeaderBuffer,
-                                  HttpClientConnection aClientConn) throws IOException
-    {
-        int count = 0;
-        // break down the response message into statusline, body.
-        if (aHeaderBuffer == null)
-        {
-            throw new IOException("response message is null");
-        }
-        String temp1 = "";
-
-        if (aHeaderBuffer.length() == 0)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "++Http parseHeader():no headers present in the response");
-            return;
-        }
-        try
-        {
-            int x = 0;
-            while (true)
-            {
-                int y = aHeaderBuffer.indexOf('\n', x);
-                if ((y == -1) || (y == aHeaderBuffer.length() - 1))
-                {
-                    break;
-                }
-                temp1 = aHeaderBuffer.substring(x, y - 1);
-                if ((aHeaderBuffer.charAt(y + 1) == ' ')
-                        || (aHeaderBuffer.charAt(y + 1) == '\t'))
-                {
-                    int z = aHeaderBuffer.indexOf('\n', y + 1);
-                    StringBuffer temp2 = new StringBuffer();
-                    temp2.append(temp1);
-                    temp2.append(aHeaderBuffer.substring(y, z - 1));
-                    temp1 = temp2.toString();
-                }
-
-                x = y + 1;
-                parseProperty(temp1, aClientConn);
-
-                if (x >= aHeaderBuffer.length())
-                {
-                    break;
-                }
-            }
-        }
-        catch (IOException e)
-        {
-
-        }
-    }
-
-    /**
-     * parse the protocol version.
-     *
-     * @param aHeader
-     *            the buffer which contains a header in the form name:value.
-     * @param aClientConn
-     *            the http client connection object.
-     * @throws IOException
-     *             if stream is closed
-     */
-    public final void parseProperty(String aHeader,
-                                    HttpClientConnection aClientConn) throws IOException
-    {
-        String line = aHeader;
-        String key = null;
-        String value = null;
-        int colon = line.indexOf(':');
-        if (colon == -1)
-        {
-            throw new IOException("Invalid header: " + aHeader);
-        }
-
-        // store the headers in lower case
-        key = line.substring(0, colon).toLowerCase();
-        if (key.length() == 0)
-        {
-            throw new IOException("Invalid header field with no key " + line);
-        }
-        if (line.length() <= colon + 1)
-        {
-            value = "";
-        }
-        else
-        {
-            value = line.substring(colon + 1).trim();
-        }
-        if ((key.equals("connection")) && (value.equals("close")))
-        {
-            // server indicated with this header that it is going to close the
-            // connection.
-            // set the flag, so that this connection will not be re-used.
-            aClientConn.mCloseFlag = true;
-        }
-        if ((key.equals("transfer-encoding"))
-                && (value.regionMatches(true, 0, "chunked", 0, value.length())))
-        {
-            // the response from the server is chunked.
-            aClientConn.mChunkedFlag = true;
-        }
-        if (key.equals("content-length"))
-        {
-            aClientConn.mContentLength = Long.parseLong(value);
-        }
-        aClientConn.mHttpResponse.setElement(key, value);
-    }
-
-    /**
-     * parse the status line.
-     *
-     * @param aRespline
-     *            the status line to be parsed.
-     * @param aStatusLine
-     *            the result is stored into this object.
-     * @throws IOException
-     *             in case of any IO errors
-     */
-    public static final void parseStatusLine(String aRespline,
-            HttpStatusLine aStatusLine) throws IOException
-    {
-        int fromIndex, toIndex, spaceIndex;
-        int length = aRespline.length();
-
-        if (length == 0)
-        {
-            throw new IOException("response may no be null");
-        }
-        fromIndex = 0;
-        toIndex = length;
-        spaceIndex = aRespline.indexOf(WHITESPACE, fromIndex);
-        if (spaceIndex < 0)
-        {
-            throw new IOException("response does not have status code");
-        }
-        aStatusLine.mHttpVersion = aRespline.substring(fromIndex, spaceIndex);
-        fromIndex = ignoreWhiteSpace(aRespline, spaceIndex);
-        spaceIndex = aRespline.indexOf(WHITESPACE, fromIndex);
-
-        if (spaceIndex == -1)
-        {
-            spaceIndex = toIndex; // if no response message is present
-        }
-        String temp = (String) aRespline.substring(fromIndex, spaceIndex);
-        try
-        {
-            aStatusLine.mStatusCode = Integer.parseInt(temp);
-        }
-        catch (NumberFormatException e)
-        {
-            throw new IOException("response code is not a number ");
-        }
-        if (aStatusLine.mStatusCode < 100 || aStatusLine.mStatusCode >= 600)
-        {
-            throw new IOException("invalid status code");
-        }
-        // spaceIndex = aRespline.indexOf(WHITESPACE,);
-        if (spaceIndex < toIndex)
-        {
-            fromIndex = ignoreWhiteSpace(aRespline, spaceIndex);
-            aStatusLine.mReasonPhrase = aRespline.substring(fromIndex, toIndex);
-        }
-        else
-        {
-            aStatusLine.mReasonPhrase = "";
-        }
-    }
-
-    /**
-     * Skips the white space character present in the respline.
-     *
-     * @param aRespline
-     *            the request line to be parsed.
-     * @param aIndex
-     *            the start index.
-     * @return the next index.
-     */
-    public static final int ignoreWhiteSpace(String aRespline, int aIndex)
-    {
-        while ((aRespline.charAt(aIndex)) == ' ')
-        {
-            aIndex++;
-        }
-        return aIndex;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpOutputStreamAdapter.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.io.OutputStream;
-import java.io.IOException;
-import java.util.Vector;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * Output Stream adapter class. Provides the output stream interfaces
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-public class HttpOutputStreamAdapter extends OutputStream
-{
-    private StringBuffer mBuffer = new StringBuffer();
-    private Vector mTmpBuf;
-    private boolean mOpenFlag = true;
-    private HttpClientConnection mHttpClientConn;
-    protected byte[] mDataBytes;
-
-    /**
-     * Constructs the OutputStreamAdapter.
-     *
-     * @param aHttpConn
-     *            the HttpConn object
-     */
-    public HttpOutputStreamAdapter(HttpClientConnection aHttpConn)
-    {
-        mHttpClientConn = aHttpConn;
-        mTmpBuf = new Vector();
-    }
-
-    /**
-     * Writes the data to the buffer.
-     *
-     * @param aByte
-     *            the byte to be copied
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized void write(int aByte) throws IOException
-    {
-        if (!mOpenFlag)
-        {
-            throw new IOException("stream closed");
-        }
-        else
-        {
-            mTmpBuf.addElement(new Integer(aByte));
-        }
-    }
-
-    /**
-     * Closes the OutputStream .
-     *
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized void close() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "+HttpOutputStreamAdapter::close()");
-        if (!mOpenFlag)
-        {
-            return;
-        }
-        mOpenFlag = false;
-        flush();
-        mHttpClientConn.mOutputStreamOpen = false;
-        mHttpClientConn = null;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "-HttpOutputStreamAdapter::close()");
-    }
-
-    /**
-     * Closes the OutputStream .
-     *
-     * @throws IOException
-     *             if stream is closed
-     */
-    public synchronized void flush() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "\nHttpOutputStreamAdapter flush() called ");
-        copyToByteArray();
-        // Reset the internal index
-        mTmpBuf.removeAllElements(); // mTmpBuf can be reset, all the data is
-        // copied into mDataBytes
-        if (mHttpClientConn.mSendChunkedReq == true)
-        {
-            if (mHttpClientConn.mSockObj == null)
-            {
-                mHttpClientConn.createSocketConnection();
-            }
-            mHttpClientConn.sendChunkedRequest(false);
-            mDataBytes = null;
-        }
-        else
-        {
-            // Send out the request along with the data written on to this output stream
-            mHttpClientConn.getConnected();
-        }
-    }
-
-    /**
-     * Checks if OutputStream is in open state.
-     *
-     * @return true if outputstream open
-     */
-    public synchronized boolean isOpen()
-    {
-        return mOpenFlag;
-    }
-
-    protected void copyToByteArray() throws IOException
-    {
-        if (mDataBytes != null)
-        {
-            return; //already copied
-        }
-
-        mDataBytes = new byte[mTmpBuf.size()];
-
-        int k = 0;
-        try
-        {
-            Integer y;
-            for (int i = 0; i < mTmpBuf.size(); i++)
-            {
-                // Copy the data from the Vector to mBuffer memory.
-                y = (Integer)(mTmpBuf.elementAt(i));
-                int c = y.intValue();
-                mBuffer.append((char) c);
-                mDataBytes[k] = (byte) c;
-                k++;
-            }
-        }
-        catch (Exception ex)
-        {
-            mHttpClientConn = null;
-            throw new IOException(ex.getMessage());
-        }
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpRequest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import java.util.Vector;
-
-/**
- * Http class responsible for storing and sending the HTTP request message. It
- * stores HTTP headers as a map of key and value pair and a character buffer to
- * store the body of the request.
- */
-
-public class HttpRequest extends HttpMessage
-{
-
-    private static final int INITIAL_SIZE = 10;
-
-    // from midp 3.0
-    protected static final String HTTP_VERSION_STRING = "HTTP/1.1";
-
-    protected static final String POST = "POST"; // from midp 3.0
-
-    protected static final String PUT = "PUT"; // from midp 3.0
-
-    protected static final String DELETE = "DELETE"; // from midp 3.0
-
-    /**
-     * Constructs the HttpRequest
-     */
-    HttpRequest()
-    {
-    }
-
-    /**
-     * Creates and returns the HTTP/HTTPS request line. Example request line,
-     * which will be returned.
-     *
-     * "GET http://www.google.com HTTP/1.1CRLF Host: www.google.comCRLF
-     * Content-Length: 4CRLF CRLF"
-     *
-     * In the above string, CR(Carrige return) = '\r' LF(Line feed) = '\n'
-     *
-     * HttpClientConnectionImpl, which calls this function takes this request
-     * line and appends it with the message body and sends it to the server
-     *
-     * @param aHttpurl
-     *            the http url object, created from Connector.open() argument.
-     * @param aRequestMethod
-     *            the http request method. Possible values "GET" , "POST",
-     *            "HEAD", "DELETE" ,"PUT"
-     * @param aContentLength
-     *            the content length (message body length) which will be added
-     *            later. this is required because the request must contain the
-     *            "Content-Length" header field.
-     * @return the http request line as a string.
-     */
-    protected String createRequestLine(UrlParser aHttpurl,
-                                       String aRequestMethod, String aUrlString, int aContentLength,
-                                       boolean aIsProxyUsed)
-    {
-        String filename;
-        int numberOfKeys;
-        String queryData = null;
-        StringBuffer postData = null;
-        int queryLen = 0;
-        String lenstr = null;
-        String bodyData = null;
-        StringBuffer headerbuf = new StringBuffer();
-
-        numberOfKeys = numberOfElements();
-        for (int i = 0; i < numberOfKeys; i++)
-        {
-            String key = (String) getNameAt(i);
-            headerbuf.append(key);
-            headerbuf.append(": ");
-            headerbuf.append(getValueAt(i));
-            headerbuf.append("\r\n");
-        }
-
-        StringBuffer requesttempLine = new StringBuffer(256);
-
-        if (aRequestMethod.compareTo(POST) == 0)
-        {
-            queryData = aHttpurl.query;
-            if (queryData != null)
-            {
-                postData = new StringBuffer(queryData);
-                queryLen = postData.length();
-            }
-            if (aIsProxyUsed == true)
-            {
-                requesttempLine
-                .append(aRequestMethod + " " + aHttpurl.scheme + ":"
-                        + aUrlString + " " + HTTP_VERSION_STRING
-                        + "\r\n");
-            }
-            else
-            {
-                requesttempLine.append(aRequestMethod + " " + aHttpurl.path
-                                       + " " + HTTP_VERSION_STRING + "\r\n");
-            }
-            requesttempLine.append("Host: " + aHttpurl.host + ":"
-                                   + aHttpurl.port + "\r\n");
-            requesttempLine.append(headerbuf); // headers
-            if (getElement("Content-Length") == null)
-            {
-                String conLen = Integer.toString(aContentLength);
-                requesttempLine.append("Content-Length: " + conLen + "\r\n");
-            }
-            requesttempLine.append("\r\n");
-        }
-        else if (aRequestMethod.compareTo(PUT) == 0)
-        {
-            queryData = aHttpurl.query;
-            if (queryData != null)
-            {
-                postData = new StringBuffer(queryData);
-                postData.append("\r\n");
-                queryLen = postData.length();
-            }
-            if (aIsProxyUsed == true)
-            {
-                requesttempLine
-                .append(aRequestMethod + " " + aHttpurl.scheme + ":"
-                        + aUrlString + " " + HTTP_VERSION_STRING
-                        + "\r\n");
-            }
-            else
-            {
-                requesttempLine.append(aRequestMethod + " " + aHttpurl.path
-                                       + " " + HTTP_VERSION_STRING + "\r\n");
-            }
-            requesttempLine.append("Host: " + aHttpurl.host + ":"
-                                   + aHttpurl.port + "\r\n");
-            requesttempLine.append(headerbuf); // headers
-            if (getElement("Content-Length") == null)
-            {
-                int ct = queryLen + aContentLength;
-                String conLen = Integer.toString(ct);
-                requesttempLine.append("Content-Length: " + conLen + "\r\n");
-            }
-            requesttempLine.append("\r\n");
-        }
-        else if (aRequestMethod.compareTo(DELETE) == 0)
-        {
-            queryData = aHttpurl.query;
-            if (queryData != null)
-            {
-                postData = new StringBuffer(queryData);
-                postData.append("\r\n");
-                queryLen = postData.length();
-            }
-            if (aIsProxyUsed == true)
-            {
-                requesttempLine
-                .append(aRequestMethod + " " + aHttpurl.scheme + ":"
-                        + aUrlString + " " + HTTP_VERSION_STRING
-                        + "\r\n");
-            }
-            else
-            {
-                requesttempLine.append(aRequestMethod + " " + aHttpurl.path
-                                       + " " + HTTP_VERSION_STRING + "\r\n");
-            }
-            requesttempLine.append("Host: " + aHttpurl.host + ":"
-                                   + aHttpurl.port + "\r\n");
-            requesttempLine.append(headerbuf); // headers
-            if (getElement("Content-Length") == null)
-            {
-                int ct = queryLen + aContentLength;
-                String conLen = Integer.toString(ct);
-                requesttempLine.append("Content-Length: " + conLen + "\r\n");
-            }
-            requesttempLine.append("\r\n");
-        }
-        else
-        {
-            // GET and HEAD method
-            if (aIsProxyUsed == true)
-            {
-                requesttempLine
-                .append(aRequestMethod + " " + aHttpurl.scheme + ":"
-                        + aUrlString + " " + HTTP_VERSION_STRING
-                        + "\r\n");
-            }
-            else
-            {
-                queryData = aHttpurl.query;
-                requesttempLine.append(aRequestMethod + " " + aHttpurl.path);
-                if (queryData != null)
-                {
-                    requesttempLine.append("?" + queryData);
-                }
-                requesttempLine.append(" " + HTTP_VERSION_STRING + "\r\n");
-            }
-            requesttempLine.append("Host: " + aHttpurl.host);
-            if ((aHttpurl.port != 80) && (aHttpurl.port != -1))
-            {
-                requesttempLine.append(":" + aHttpurl.port);
-            }
-            requesttempLine.append("\r\n");
-            requesttempLine.append(headerbuf); // headers
-            requesttempLine.append("\r\n");
-        }
-        return requesttempLine.toString();
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpResponse.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import com.nokia.mj.impl.http.HttpMessageParser;
-import java.io.IOException;
-
-/**
- * Http class responsible for storing HTTP response message.
- */
-public class HttpResponse extends HttpMessage
-{
-    private HttpStatusLine mStatusLine;
-
-    HttpResponse()
-    {
-        mStatusLine = new HttpStatusLine();
-    }
-
-    /**
-     * Parse the status line of the http resposne.
-     *
-     * @param aStatusLine
-     *            the response status line.
-     * @throws IOException
-     *             incase of any errors
-     */
-    public void parseStatusLine(String aStatusLine) throws IOException
-    {
-        HttpMessageParser.parseStatusLine(aStatusLine, mStatusLine);
-    }
-
-    /**
-     * Return the http response code.
-     *
-     * @return the response code
-     */
-    public int getStatusCode()
-    {
-        return mStatusLine.mStatusCode;
-    }
-
-    /**
-     * Return the http response msg.
-     *
-     * @return the response msg
-     */
-    public String getResponseMsg()
-    {
-        return mStatusLine.mReasonPhrase;
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/HttpStatusLine.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import java.io.IOException;
-
-/**
- * Simple HttpStatusLine. Used to store the Http response line contents.
- *
- * @version 1.1
- */
-public class HttpStatusLine
-{
-    protected String mHttpVersion;
-
-    protected int mStatusCode; // status code of the response
-
-    protected String mReasonPhrase; // status code reason phrase
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/SocketElement.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import javax.microedition.io.SocketConnection;
-import java.io.OutputStream;
-import java.io.InputStream;
-
-/**
- * Socket Element calss, used to store the tcp connection, which will be later
- * used in case of persistent connection
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-class SocketElement
-{
-    private InputStream mInpStr;
-
-    private OutputStream mOutStr;
-
-    private SocketConnection mSockObj;
-
-    private boolean mIsProxy = false;
-
-    private boolean mIsActive = false;
-
-    /**
-     * Constructs the SocketElement.
-     *
-     * @param aSockObject
-     *            the SocketConnection object
-     * @param aInputStream
-     *            the InputStream object of this socket connection
-     * @param aOutputStream
-     *            the OutputStream object of this socket connection.
-     */
-    SocketElement(SocketConnection aSockObject, InputStream aInputStream,
-                  OutputStream aOutputStream, boolean aIsProxy)
-    {
-        mInpStr = aInputStream;
-        mOutStr = aOutputStream;
-        mSockObj = aSockObject;
-        mIsProxy = aIsProxy;
-    }
-
-    /**
-     * Get the input stream object of this socket object
-     *
-     * @return inputstream object
-     */
-    public InputStream get_input_stream()
-    {
-        return mInpStr;
-    }
-
-    /**
-     * Get the proxy flag of this socket object
-     *
-     * @return proxy flag
-     */
-    public boolean get_Proxy_Flag()
-    {
-        return mIsProxy;
-    }
-
-    /**
-     * Get the outstream stream object of this socket object
-     *
-     * @return outstream object
-     */
-    public OutputStream get_output_stream()
-    {
-        return mOutStr;
-    }
-
-    /**
-     * Get the socket object
-     *
-     * @return socket object
-     */
-    public SocketConnection get_socket_object()
-    {
-        return mSockObj;
-    }
-    /**
-     * sets flag if the socket object is in use or not
-     * true - if socket object in use
-     * false - when socket object is not in use
-     */
-    public void setIsActiveFlag(boolean flag)
-    {
-        mIsActive = flag;
-    }
-
-    /**
-     * returns whether the socket object is in use or not
-     * true - if socket object in use
-     * false - when socket object is not in use
-     */
-    public boolean getIsActiveFlag()
-    {
-        return mIsActive;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/http/SocketPool.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-import javax.microedition.io.SocketConnection;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Vector;
-
-/**
- * Socket Pool calss, used to store the pool of tcp connections, which will be
- * later used in case of persistent connection
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-
-class SocketPool
-{
-    private int mMaxEle;
-
-    private Vector mHosts;
-
-    private Vector mSockElements;
-
-    /**
-     * Constructs the SocketPool.
-     *
-     * @param m
-     *            the maximum number of tcp connections that can be stored
-     */
-    SocketPool(int aMax)
-    {
-        mMaxEle = aMax;
-        mHosts = new Vector();
-        mSockElements = new Vector();
-    }
-
-    /**
-     * Add a new tcp connection into the socket pool
-     *
-     * @param aHost
-     *            the host string
-     * @param aSocketObject
-     *            the tcp connection established to this host, which is to be
-     *            stored.
-     * @param aInputStream
-     *            the input stream associated with this tcp connection
-     * @param aOutputStream
-     *            the output strem associated with this tcp connection
-     */
-    public void addConnection(String aHost, SocketConnection aSocketObject,
-                              InputStream aInputStream, OutputStream aOutputStream,
-                              boolean aIsProxy)
-    {
-        int index = mHosts.indexOf(aHost);
-        if (index == -1)
-        {
-            mHosts.addElement(aHost);
-            mSockElements.addElement(new SocketElement(aSocketObject,
-                                     aInputStream, aOutputStream, aIsProxy));
-        }
-        else
-        {
-            mSockElements.setElementAt(new SocketElement(aSocketObject,
-                                       aInputStream, aOutputStream, aIsProxy), index);
-        }
-
-    }
-
-    /**
-     * Remove the tcp connection associated to this host
-     *
-     * @param aHost
-     *            the host string
-     */
-    public void removeConnection(String aHost)
-    {
-        int index = mHosts.indexOf(aHost);
-        if (index != -1)
-        {
-            mHosts.removeElementAt(index);
-            mSockElements.removeElementAt(index);
-        }
-
-    }
-
-    /**
-     * Get the tcp connection associated to this host
-     *
-     * @param aHost
-     *            the host string
-     * @return socketelement object
-     */
-    public SocketElement getConnection(String aHost)
-    {
-        int index = mHosts.indexOf(aHost);
-        if (index > -1)
-        {
-            SocketElement tmp = (SocketElement) mSockElements.elementAt(index);
-            return tmp;
-        }
-        return null;
-    }
-}
--- a/javacommons/gcfprotocols/http/javasrc.linux/com/nokia/mj/impl/properties/http/DynamicPropertyHandler.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.properties.http;
-
-import com.nokia.mj.impl.rt.support.SystemPropertyProvider;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * DynamicPropertyHandler class, used to implement the system property for http connection
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-
-public class DynamicPropertyHandler implements SystemPropertyProvider
-{
-
-    static
-    {
-        try
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"loading http from http DynamicPropertyHandler.java");
-            Jvm.loadSystemLibrary("javahttp");
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"after loading http dll");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-    /**
-     * Get the system property corresponding to the key specified.
-     * There could be various system properties available for one interface.
-     * Currently this function returns the proxy server address. So the paramter key is
-     * not used at present.
-     *
-     * @param the system property name as a string
-     * @return system property correspoding to the key
-     */
-
-    public String getProperty(String Key)
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "DynamicPropertyHandler in http");
-        StringBuffer proxy = new StringBuffer();
-        String ret = _getProxyInfo();
-        if (ret != null && ret.length() != 0)
-        {
-            int index = ret.indexOf(':');
-            proxy.append(ret.substring(0, index + 5));
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "Proxy string returned in DynamicPropertyHandler.java : "
-                       + proxy);
-            return proxy.toString();
-        }
-        return null;
-    }
-
-    public boolean isStatic(String Key)
-    {
-        return false;
-    }
-
-    private native String _getProxyInfo();
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/http/javasrc.linux/javax/microedition/io/HttpConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package javax.microedition.io;
-
-
-import java.io.IOException;
-import javax.microedition.io.ContentConnection;
-
-
-public interface HttpConnection extends ContentConnection
-{
-
-    public final static String HEAD = "HEAD";
-    public final static String GET = "GET";
-    public final static String POST = "POST";
-    public final static String PUT = "PUT"; //from midp 3.0
-    public final static String DELETE = "DELETE"; //from midp 3.0
-    public static final int HTTP_OK = 200;
-    public static final int HTTP_CREATED = 201;
-    public static final int HTTP_ACCEPTED = 202;
-    public static final int HTTP_NOT_AUTHORITATIVE = 203;
-    public static final int HTTP_NO_CONTENT = 204;
-    public static final int HTTP_RESET = 205;
-    public static final int HTTP_PARTIAL = 206;
-    public static final int HTTP_MULT_CHOICE = 300;
-    public static final int HTTP_MOVED_PERM = 301;
-    public static final int HTTP_MOVED_TEMP = 302;
-    public static final int HTTP_SEE_OTHER = 303;
-    public static final int HTTP_NOT_MODIFIED = 304;
-    public static final int HTTP_USE_PROXY = 305;
-    public static final int HTTP_TEMP_REDIRECT = 307;
-    public static final int HTTP_BAD_REQUEST = 400;
-    public static final int HTTP_UNAUTHORIZED = 401;
-    public static final int HTTP_PAYMENT_REQUIRED = 402;
-    public static final int HTTP_FORBIDDEN = 403;
-    public static final int HTTP_NOT_FOUND = 404;
-    public static final int HTTP_BAD_METHOD = 405;
-    public static final int HTTP_NOT_ACCEPTABLE = 406;
-    public static final int HTTP_PROXY_AUTH = 407;
-    public static final int HTTP_CLIENT_TIMEOUT = 408;
-    public static final int HTTP_CONFLICT = 409;
-    public static final int HTTP_GONE = 410;
-    public static final int HTTP_LENGTH_REQUIRED = 411;
-    public static final int HTTP_PRECON_FAILED = 412;
-    public static final int HTTP_ENTITY_TOO_LARGE = 413;
-    public static final int HTTP_REQ_TOO_LONG = 414;
-    public static final int HTTP_UNSUPPORTED_TYPE = 415;
-    public static final int HTTP_UNSUPPORTED_RANGE = 416;
-    public static final int HTTP_EXPECT_FAILED = 417;
-    public static final int HTTP_INTERNAL_ERROR = 500;
-    public static final int HTTP_NOT_IMPLEMENTED = 501;
-    public static final int HTTP_BAD_GATEWAY = 502;
-    public static final int HTTP_UNAVAILABLE = 503;
-    public static final int HTTP_GATEWAY_TIMEOUT = 504;
-    public static final int HTTP_VERSION = 505;
-
-    public long getDate() throws IOException;
-
-    public long getExpiration() throws IOException;
-
-    public String getFile();
-
-    public String getHeaderField(String name) throws IOException;
-
-    public String getHeaderField(int n)  throws IOException;
-
-    public long getHeaderFieldDate(String name, long def) throws IOException;
-
-    public int getHeaderFieldInt(String name, int def) throws IOException;
-
-    public String getHeaderFieldKey(int n) throws IOException;
-
-    public String getHost();
-
-    public long getLastModified() throws IOException;
-
-    public int getPort();
-
-    public String getProtocol();
-
-    public String getQuery();
-
-    public String getRef();
-
-    public String getRequestMethod();
-
-    public String getRequestProperty(String key);
-
-    public int getResponseCode() throws IOException;
-
-    public String getResponseMessage() throws IOException;
-
-    public String getURL();
-
-    public void setRequestMethod(String method) throws IOException;
-
-    public void setRequestProperty(String key, String value) throws IOException;
-
-}
-
--- a/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/BlockingOperation.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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:
-*
-*/
-
-
-package com.nokia.mj.impl.http;
-
-/**
- * BlockingOperation is a generic class designed to handle Symbian OS
- * asynchronous methods, where a wait() and a callback to Java are usually
- * required. It can contain an integer as result of the operation. The provided
- * lock Object allows for keeping several threads from executing the same
- * operation on the same object at the same time.
- *
- * @see com.symbian.gcf.ConnectionEndPoint for examples of how to use
- *      BlockingOperation.
- */
-public final class BlockingOperation
-{
-    /**
-     * BLOCKED is set to the maximum integer value so that the number of bytes
-     * received can be returned, or BLOCKED, or an error code. The number of
-     * bytes received is unlikely to ever be the value of Integer.MAX_VALUE.
-     */
-    public static final int BLOCKED = Integer.MAX_VALUE;
-
-    public static final int COMPLETED = 1;
-
-    private final Object iThreadBlocker = new Object();
-
-    private int iResult = 0;
-
-    public BlockingOperation()
-    {
-    }
-
-    public Object getLock()
-    {
-        return iThreadBlocker;
-    }
-
-    public synchronized void waitForCompletion()
-    {
-        while (true)
-        {
-            try
-            {
-                wait();
-                return;
-            }
-            catch (InterruptedException ex)
-            {
-                // ignore and continue
-                ;
-            }
-        }
-    }
-
-    /**
-     * We must use a synchronized block here as this method could be called from
-     * a native callback. Native callbacks ignore the synchronized keyword on
-     * method signatures.
-     */
-    public void notifyCompleted(int aResult)
-    {
-        synchronized (this)
-        {
-            iResult = aResult;
-            notify();
-        }
-    }
-
-    public void notifyCompleted()
-    {
-        notifyCompleted(0);
-    }
-
-    public synchronized int getResult()
-    {
-        return iResult;
-    }
-
-    public synchronized void setResult(int aResult)
-    {
-        iResult = aResult;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/http/BlockingOperation.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.http;
+
+/**
+ * BlockingOperation is a generic class designed to handle Symbian OS
+ * asynchronous methods, where a wait() and a callback to Java are usually
+ * required. It can contain an integer as result of the operation. The provided
+ * lock Object allows for keeping several threads from executing the same
+ * operation on the same object at the same time.
+ *
+ * @see com.symbian.gcf.ConnectionEndPoint for examples of how to use
+ *      BlockingOperation.
+ */
+public final class BlockingOperation
+{
+    /**
+     * BLOCKED is set to the maximum integer value so that the number of bytes
+     * received can be returned, or BLOCKED, or an error code. The number of
+     * bytes received is unlikely to ever be the value of Integer.MAX_VALUE.
+     */
+    public static final int BLOCKED = Integer.MAX_VALUE;
+
+    public static final int COMPLETED = 1;
+
+    private final Object iThreadBlocker = new Object();
+
+    private int iResult = 0;
+
+    public BlockingOperation()
+    {
+    }
+
+    public Object getLock()
+    {
+        return iThreadBlocker;
+    }
+
+    public synchronized void waitForCompletion()
+    {
+        while (true)
+        {
+            try
+            {
+                wait();
+                return;
+            }
+            catch (InterruptedException ex)
+            {
+                // ignore and continue
+                ;
+            }
+        }
+    }
+
+    /**
+     * We must use a synchronized block here as this method could be called from
+     * a native callback. Native callbacks ignore the synchronized keyword on
+     * method signatures.
+     */
+    public void notifyCompleted(int aResult)
+    {
+        synchronized (this)
+        {
+            iResult = aResult;
+            notify();
+        }
+    }
+
+    public void notifyCompleted()
+    {
+        notifyCompleted(0);
+    }
+
+    public synchronized int getResult()
+    {
+        return iResult;
+    }
+
+    public synchronized void setResult(int aResult)
+    {
+        iResult = aResult;
+    }
+}
--- a/javacommons/gcfprotocols/http/src.linux/dynamicpropertyhandlerjni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-#include "com_nokia_mj_impl_properties_http_DynamicPropertyHandler.h"
-#include "stdlib.h"
-#include "nativedynamicproperty.h"
-#include "javajniutils.h"
-#include "wchar.h"
-
-using namespace java::http;
-
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_properties_http_DynamicPropertyHandler__1getProxyInfo
-(JNIEnv* aJni, jobject /*peer*/)
-{
-
-    NativeDynamicProperty *peer = new NativeDynamicProperty();
-    jstring ret = peer->getProxySettings(*aJni);
-    delete peer;
-    return ret;
-}
--- a/javacommons/gcfprotocols/http/src.linux/nativedynamicproperty.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-#include "nativedynamicproperty.h"
-#include <stdlib.h>
-#include <stdio.h>
-
-using namespace java::http;
-
-jstring NativeDynamicProperty::getProxySettings(JNIEnv& aJni)
-{
-    // proxy address hard coded for now as its retrieval not possible
-    return aJni.NewStringUTF("gxwebproxy01.apac.nokia.com:8080");
-}
--- a/javacommons/gcfprotocols/https/build/javahttps_0x2002DCB2.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/https/build/javahttps_0x2002DCB2.mmp	Tue May 25 12:34:19 2010 +0300
@@ -85,6 +85,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -105,10 +118,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/https/inc.linux/nativehttpsconnection.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-#ifndef NATIVEHTTPSCONNECTION_H
-#define NATIVEHTTPSCONNECTION_H
-
-#include<sys/types.h>
-#include<sys/stat.h>
-#include <wchar.h>
-#include <sys/socket.h>
-#include "javaosheaders.h"
-#include <logger.h>
-
-namespace java
-{
-namespace https
-{
-
-/**
- * This class is used to write the "CONNECT" request to the proxy server.
- * It will be used only when there is a proxy server present. HttpsConnectionImpl from java will call the function of this
- * class to create a normal tcp socket to the proxy. This socket will then be made a secure socket.
-*/
-
-class NativeHttpsConnection
-{
-public :
-
-    /**
-    * createSocket is called by HttpsConnectionImpl java class to create a tcp socket and issue a CONNECT request.
-    *
-    * @param aProxy: Proxy server address
-    * @param aProxyPort: Proxy server port
-    * @param aHost: Destination host address, to which https connection is opened
-    * @param aPort: Destination port number
-    * @return the tcp socket descriptor
-    */
-    int createSocket(const char *aProxy, int aProxyPort, const char *aHost, int aPort);
-
-};
-} // end namespace https
-}  // end namespace java
-#endif // NATIVEHTTPSCONNECTION_H
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/gcf/protocol/https/HttpsPermissionImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.https;
-
-import com.nokia.mj.impl.security.common.PermissionBase;
-import java.security.Permission;
-import java.security.PermissionCollection;
-import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
-
-public class HttpsPermissionImpl extends PermissionBase
-{
-
-    /**
-     * Returns the question (as localized text) associated with the security
-     * prompt
-     *
-     * @return the localized text associated with the security prompt
-     */
-    private String iMessage = null;
-
-    public HttpsPermissionImpl(String uri)
-    {
-        super(uri);
-    }
-
-    public String getSecurityPromptQuestion(int aInteractionMode)
-    {
-        // either provide own localized text
-        // or use the pre-defined texts
-        // Note: some permissions use the same text always (case in which the
-        // ID and the params for the text could be chosen at this phase) and
-        // some permissions use a more dynamic text, depending on the context
-        // in which they are used, case in which the ID and the params could
-        // come from the constructor
-
-        return (SecurityPromptMessage.getInstance()).getText(
-                   SecurityPromptMessage.QUESTION_ID_NETWORK_USAGE ,
-                   new String[] {Integer.toString(1), iMessage});
-
-    }
-
-    public String toString()
-    {
-        return "javax.microedition.io.HttpsProtocolPermission";
-    }
-
-    public boolean implies(Permission p)
-    {
-        if (p instanceof HttpsPermissionImpl)
-        {
-            return true;
-        }
-        return false;
-    }
-
-    public boolean equals(Object obj)
-    {
-        return true;
-    }
-
-    public int hashCode()
-    {
-        return 0;
-    }
-
-    public String getActions()
-    {
-        return "";
-    }
-
-    public PermissionCollection newPermissionCollection()
-    {
-        return null;
-    }
-
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/gcf/protocol/https/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.https;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.https.HttpsConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.utils.Logger;
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Logger.ILOG(Logger.ESOCKET, "Before Loading https native");
-            Jvm.loadSystemLibrary("javahttps");
-            Logger.ILOG(Logger.ESOCKET, "Loaded https native");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-        try
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"Before Loading ssl  native");
-            Jvm.loadSystemLibrary("javassl");
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"Loaded ssl  native");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-        try
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"Before Loading http  native");
-            Jvm.loadSystemLibrary("javahttp");
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,"Loaded http  native");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,"+Protocol");
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-
-        /* security related stuff */
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        HttpsPermissionImpl per = new HttpsPermissionImpl("https://*");
-        appUtils.checkPermission(per);
-
-        /* security related stuff */
-        return new HttpsConnectionImpl(aUri, aMode);
-    }
-
-    public javax.microedition.io.Connection openConn(String name, int mode,
-            boolean timeouts) throws IOException
-    {
-        return openConnection(name, mode, timeouts);
-    }
-
-}
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/CertificateImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.ssl;
-
-import javax.microedition.pki.Certificate;
-import com.nokia.mj.impl.gcf.utils.DateUtil;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.Finalizer;
-
-/**
- * Certificate Implementation class.
- *
- */
-
-public class CertificateImpl implements Certificate
-{
-
-    private String iIssuer;
-    private String iSubject;
-    private String iSerialNum;
-    private String iVersion;
-    private long iTimeNotAfter;
-    private long iTimeNotbefore;
-    private String iAlgName;
-    private String iDateNotAfter;
-    private String iDateNotBefore;
-
-    /**
-     * Constructs the CertificateImpl.
-     */
-    public CertificateImpl()
-    {
-        super();
-    }
-
-    /**
-     * Constructs the CertificateImpl.
-     *
-     * @param aResult the certicate information
-     */
-
-    public CertificateImpl(String[] aResult)
-    {
-
-        StringBuffer temp = new StringBuffer("");
-        StringBuffer t1 = new StringBuffer("");
-        int tmpindex = 0;
-        String t = aResult[0];
-        while (true)
-        {
-            tmpindex = t.lastIndexOf('/');
-            if (tmpindex < 0)
-            {
-                break;
-            }
-            temp.append(t.substring(tmpindex + 1, t.length()) + ";");
-            t1.append(t.substring(0, tmpindex));
-            t = t1.toString();
-            t1.setLength(0);
-        }
-        t = temp.toString();
-        iSubject = t.substring(0, t.length() - 1);
-        // -------------
-        t1.setLength(0);
-        t = aResult[1];
-        temp.setLength(0);
-        while (true)
-        {
-            tmpindex = t.lastIndexOf('/');
-            if (tmpindex < 0)
-            {
-                break;
-            }
-            temp.append(t.substring(tmpindex + 1, t.length()) + ";");
-            t1.append(t.substring(0, tmpindex));
-            t = t1.toString();
-            t1.setLength(0);
-        }
-        t = temp.toString();
-        iIssuer = t.substring(0, t.length() - 1);
-
-        // -------------
-        temp.setLength(0);
-        temp.append(aResult[2]);
-        for (int i = 1; i < temp.length(); i += 3)
-        {
-            temp.insert(i + 1, ":");
-        }
-        t = temp.toString();
-        if (temp.length() >= 2)
-        {
-            iSerialNum = t.substring(0, temp.length() - 2); // aResult[2];
-        }
-
-        iDateNotBefore = aResult[3];
-        iTimeNotbefore = parseString(iDateNotBefore);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "iTimeNotbefore = "
-                   + iTimeNotbefore);
-        iDateNotAfter = aResult[4];
-        iTimeNotAfter = parseString(iDateNotAfter);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "iTimeNotAfter = "
-                   + iTimeNotAfter);
-        iAlgName = aResult[5];
-        iVersion = aResult[6];
-    }
-
-    long parseString(String s)
-    {
-        String tmp = null;
-        long result;
-        try
-        {
-            tmp = s.substring(0, 2);
-            int yr = 2000 + Integer.parseInt(tmp);
-            tmp = s.substring(2, 4);
-            int mnt = Integer.parseInt(tmp);
-            tmp = s.substring(4, 6);
-            int dy = Integer.parseInt(tmp);
-            tmp = s.substring(6, 8);
-            int hr = Integer.parseInt(tmp);
-            tmp = s.substring(8, 10);
-            int mn = Integer.parseInt(tmp);
-            tmp = s.substring(10, 12);
-            int secnd = Integer.parseInt(tmp);
-            result = DateUtil.epocDifference(yr, mnt, dy, hr, mn, secnd);
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            result = Long.MAX_VALUE;
-        }
-        return result;
-    }
-
-    /**
-     * Get the subject field from the certificate
-     *
-     * @return the Subject field
-     */
-
-    public String getSubject()
-    {
-        return iSubject;
-    }
-
-    /**
-     * Get the issuer field from the certificate
-     *
-     * @return the issuer field
-     */
-
-    public String getIssuer()
-    {
-        return iIssuer;
-    }
-
-    /**
-     * Get the type of the certificate
-     *
-     * @return the type field
-     */
-
-    public String getType()
-    {
-        String type = "X.509";
-        return type;
-    }
-
-    /**
-     * Get the version of the certificate
-     *
-     * @return the version field
-     */
-
-    public String getVersion()
-    {
-        return iVersion;
-    }
-
-    /**
-     * Get the signature algorithm used for the certificate
-     *
-     * @return the alg name
-     */
-
-    public String getSigAlgName()
-    {
-        return iAlgName;
-    }
-
-    /**
-     * Gets the time before which this Certificate may not be used from the
-     * validity period.
-     *
-     * @return the time
-     */
-
-    public long getNotBefore()
-    {
-        return iTimeNotbefore;
-    }
-
-    /**
-     * Gets the time after which this Certificate may not be used from the
-     * validity period.
-     *
-     * @return the time
-     */
-
-    public long getNotAfter()
-    {
-        return iTimeNotAfter;
-    }
-
-    /**
-     * GGets the printable form of the serial number of this Certificate
-     *
-     * @return the serial number
-     */
-
-    public String getSerialNumber()
-    {
-        return iSerialNum;
-    }
-
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/HttpsConnectionImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.https;
-
-import java.io.IOException;
-import javax.microedition.io.*;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.gcf.utils.StreamConnectionBase;
-import com.nokia.mj.impl.http.HttpClientConnection;
-import com.nokia.mj.impl.ssl.SecureConnectionImpl;
-import com.nokia.mj.impl.utils.Logger;
-
-import java.io.*;
-
-/**
- * Https Connection Implementation class.
- *
- */
-public class HttpsConnectionImpl extends HttpClientConnection implements
-        HttpsConnection
-{
-    private UrlParser iUri;
-
-    private SecureConnectionImpl mSecureConnobj;
-
-    private static final int DEFAULT_HTTPS_PORT = 443;
-
-    protected static SecureConnectionPool mSSLConnectionPool;
-
-    static
-    {
-        int max = 2; // maximum number of persistent connection
-        mSSLConnectionPool = new SecureConnectionPool(max);
-    }
-
-    /**
-     * Constructs the HttpsConnectionImpl with default request method - GET.
-     *
-     * @param url
-     *            url string
-     * @param mode
-     *            mode of connection
-     */
-    public HttpsConnectionImpl(String uri, int mode)
-    {
-        super(uri);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "HttpsConnectionImpl() "
-                   + uri);
-        iUri = new UrlParser("https", uri);
-        if (iUri.port == -1)
-        {
-            iUri.port = DEFAULT_HTTPS_PORT;
-        }
-        mHttpurl = iUri;
-    }
-
-    /**
-     * Creates the ssl connection
-     *
-     * @throws IOException
-     *             in case of IOException
-     */
-    public void createSocketConnection() throws IOException
-    {
-        int socket_desc = 0;
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "HttpsConnectionImpl: calling overloaded https connect method");
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "sock_dess " + socket_desc);
-
-        HttpsElement https_elm = mSSLConnectionPool
-                                 .getConnection((iUri.host + iUri.port));
-
-        if (https_elm == null)
-        {
-            String tmpproxy = null;
-            tmpproxy = getProxy();
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       " https , get proxy returned " + tmpproxy);
-            if (tmpproxy == null)
-            {
-                mIsProxyUsed = false;
-                socket_desc = -1;
-            }
-            else
-            {
-                // in case of proxy
-                mIsProxyUsed = true;
-                int colon = tmpproxy.indexOf(':');
-                String proxyHost = tmpproxy.substring(0, colon);
-                String proxyPortString = tmpproxy.substring(colon + 1, tmpproxy
-                                         .length());
-                int proxyPort = Integer.parseInt(proxyPortString);
-                socket_desc = _createNativePeer(proxyHost, proxyPort,
-                                                iUri.host, iUri.port);
-                if (socket_desc < 0)
-                {
-                    throw new IOException(
-                        "Could not connect to host, error code: "
-                        + socket_desc);
-                }
-            }
-            mSecureConnobj = new SecureConnectionImpl(iUri, 3, socket_desc,
-                    null, null);
-
-            // ssl read and write
-            mSocketInStream = mSecureConnobj.openInputStream();
-
-            // ssl read and write
-            mSocketOutStream = mSecureConnobj.openOutputStream();
-        }
-        else
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "old socket obj");
-            mSocketOutStream = https_elm.getSslOutputStream();
-            mSecureConnobj = https_elm.getSecureConnObject();
-            mSocketInStream = mSecureConnobj.openInputStream();
-            mIsProxyUsed = https_elm.getSslProxyFlag();
-            mOldSocketFlag = true;
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "Using the old ssl connection, mSecureConnobj");
-        }
-    }
-
-    public void sendRequest() throws IOException
-    {
-        // creates request, sends request to server and reads response recieved
-        // from server.
-        if (mHttpConnectionState == HTTP_CONNECTED)
-        {
-            // request has already been sent
-            return;
-        }
-        mHttpConnectionState = HTTP_CONNECTED;
-        if (mSecureConnobj == null)
-        {
-            createSocketConnection();
-        }
-
-        if (mSendChunkedReq == true)
-        {
-            sendChunkedRequest(true);
-        }
-        else
-        {
-            // send request
-            sendRequestLine();
-        }
-
-        if (mResentFlag == false)
-        {
-            if (mSocketInStream == null)
-            {
-                mSocketInStream = mSecureConnobj.openInputStream();
-            }
-            readResponse(mSocketInStream);
-        }
-
-        // Logger.LOG(Logger.ESOCKET,
-        // Logger.EInfo,"httpClientConnection-sendRequest()");
-    }
-
-    /**
-     * resend_request is an internal function , which will be called when either
-     * the send request or read response fails, because of using an old tcp
-     * connection from the connection pool. This failure is not reported to the
-     * application since it is not aware of this persistent connection. So the
-     * request will be resent using a new tcp connection.
-     */
-    public void resend_request() throws IOException
-    {
-        mHttpConnectionState = HTTP_SETUP;
-        mOldSocketFlag = false;
-        mSecureConnobj = null;
-        mSSLConnectionPool.removeConnection((iUri.host + iUri.port));
-        sendRequest();
-        mResentFlag = true;
-    }
-
-    /**
-     * closes the https connection.
-     */
-    public void close()
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "https close() method called closeflag = " + mCloseFlag
-                   + " mEof == " + mEof);
-        if (mHttpConnectionState == HTTP_CLOSED)
-        {
-            return;
-        }
-
-        mHttpConnectionState = HTTP_CLOSED;
-        try
-        {
-            if ((mCloseFlag == false) && (mEof == true))
-            {
-                // if the first respone is read completely and server has not
-                // closed the connection
-                // then add this tcp connection to the connection pool
-                mSSLConnectionPool.addConnection((iUri.host + iUri.port),
-                                                 mSecureConnobj, mSocketInStream, mSocketOutStream,
-                                                 mIsProxyUsed);
-            }
-            else
-            {
-                // first response not read completely or server closed
-                // so this tcp connection cannot be re-used, close it
-                mSSLConnectionPool.removeConnection((iUri.host + iUri.port));
-                if (mSocketInStream != null)
-                {
-                    mSocketInStream.close();
-                }
-                if (mSocketOutStream != null)
-                {
-                    mSocketOutStream.close();
-                }
-                if (mSecureConnobj != null)
-                {
-                    mSecureConnobj.close();
-                }
-                mSocketInStream = null;
-                mSocketOutStream = null;
-                mSecureConnobj = null;
-            }
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "exception while closing https connection ");
-        }
-    }
-
-    /**
-     * Get the security info
-     *
-     * @return SecurityInfo instance
-     * @throws IOException
-     *             in case of IOException
-     */
-    public SecurityInfo getSecurityInfo() throws IOException
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "HttpsConnection :: getSecurityInfo() called ");
-        getConnected();
-        return mSecureConnobj.getSecurityInfo();
-    }
-
-    private native int _createNativePeer(String proxyAddr, int proxyPort, String host, int port);
-}
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/HttpsElement.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.https;
-
-import javax.microedition.io.SocketConnection;
-import java.io.OutputStream;
-import java.io.InputStream;
-import com.nokia.mj.impl.ssl.SecureConnectionImpl;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * Https Element calss, used to store the secure connection(tcp connection).
- * which will be later used in case of persistent connection
- *
- * @version 1.1
- * @author Nokia Corporation
- */
-
-class HttpsElement
-{
-
-    private InputStream mInputStream;
-
-    private OutputStream mOutputStream;
-
-    private SecureConnectionImpl mSecureObj;
-
-    private boolean mIsProxy;
-
-    /**
-     * Constructs the HttpsElement.
-     *
-     * @param aSecureobj
-     *            the SecureConnection object
-     * @param aInputStream
-     *            the InputStream object
-     * @param aOutputStream
-     *            the OutputStream object
-     */
-
-    HttpsElement(SecureConnectionImpl aSecureobj, InputStream aInputStream,
-                 OutputStream aOutputStream, boolean aIsProxy)
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,"Creating a new https element " + aSecureobj + " : " + aInputStream
-                   + " : " + aOutputStream);
-        mInputStream = aInputStream;
-        mOutputStream = aOutputStream;
-        mSecureObj = aSecureobj;
-        mIsProxy = aIsProxy;
-    }
-
-    /**
-     * Get the input stream object of this secure connection
-     *
-     * @return inputstream object
-     */
-
-    public InputStream getSslInputStream()
-    {
-        return mInputStream;
-    }
-
-    /**
-     * Get the proxy flag of this secure connection
-     *
-     * @return proxy flag
-     */
-
-    public boolean getSslProxyFlag()
-    {
-        return mIsProxy;
-    }
-
-    /**
-     * Get the outstream stream object of this secure connection.
-     *
-     * @return outstream object
-     */
-
-    public OutputStream getSslOutputStream()
-    {
-        return mOutputStream;
-    }
-
-    /**
-     * Get the secure connection object
-     *
-     * @return secure connection object
-     */
-
-    public SecureConnectionImpl getSecureConnObject()
-    {
-        return mSecureObj;
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/SecureConnectionPool.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.https;
-
-import com.nokia.mj.impl.ssl.SecureConnectionImpl;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Vector;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * SecureSocket Pool calss, used to store tcp connections, which will be later
- * used in case of persistent connection
- */
-class SecureConnectionPool
-{
-    int max;
-
-    private Vector mHosts = null;
-
-    private Vector mHttpsElements = null;
-
-    /**
-     * Constructs the SecureSocketPool.
-     *
-     * @param m
-     *            the maximum number of tcp connections that can be stored
-     */
-    SecureConnectionPool(int m)
-    {
-        max = m;
-        mHosts = new Vector();
-        mHttpsElements = new Vector();
-    }
-
-    /**
-     * Add a new tcp connection into the securesocket pool
-     *
-     * @param aHost
-     *            the host string
-     * @param aSecureConnobj
-     *            the secure tcp connection established to this host
-     * @param aInputStream
-     *            the input stream associated with this tcp connection
-     * @param aOutputStream
-     *            the output strem associated with this tcp connection
-     */
-    public void addConnection(String aHost,
-                              SecureConnectionImpl aSecureConnobj, InputStream aInputStream,
-                              OutputStream aOutputStream, boolean aIsProxy)
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "Adding a new socket connection to SecureConnectionPool: "
-                   + aHost + ":os: " + aOutputStream + ":ins: "
-                   + aInputStream);
-
-        int index = mHosts.indexOf(aHost);
-        if (index == -1)
-        {
-            mHosts.addElement(aHost);
-            mHttpsElements.addElement(new HttpsElement(aSecureConnobj,
-                                      aInputStream, aOutputStream, aIsProxy));
-        }
-        else
-        {
-            // Replace the old connection
-            mHttpsElements.setElementAt(new HttpsElement(aSecureConnobj,
-                                        aInputStream, aOutputStream, aIsProxy), index);
-        }
-    }
-
-    /**
-     * Remove the secure tcp connection associated to this host
-     *
-     * @param aHost
-     *            the host string
-     */
-    public void removeConnection(String aHost)
-    {
-        int index = mHosts.indexOf(aHost);
-        if (index != -1)
-        {
-            mHosts.removeElementAt(index);
-            mHttpsElements.removeElementAt(index);
-        }
-    }
-
-    /**
-     * Get the secure tcp connection associated to this host
-     *
-     * @param aHost
-     *            the host string
-     * @return HttpsElement object
-     */
-    public HttpsElement getConnection(String aHost)
-    {
-        int index = mHosts.indexOf(aHost);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "SecureConnectionPool getConnection called " + aHost);
-
-        if (index > -1)
-        {
-            HttpsElement tmp = (HttpsElement) mHttpsElements.elementAt(index);
-            return tmp;
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "getConnection called returning null");
-        return null;
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/https/javasrc.linux/com/nokia/mj/impl/https/SecurityInfoImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.ssl;
-import javax.microedition.io.SecurityInfo;
-import javax.microedition.pki.Certificate;
-
-/**
- * Security Info Implementation class.
- */
-
-public class SecurityInfoImpl implements SecurityInfo
-{
-    private Certificate iCertificate;
-    private String iCipher;
-    private String iProtocolName;
-    private String iProtocolVersion;
-
-    public SecurityInfoImpl()
-    {
-        super();
-    }
-
-    public SecurityInfoImpl(String[] aResult)
-    {
-        iCertificate = new CertificateImpl(aResult);
-
-        if (aResult[7].indexOf("TLS") >= 0)
-            iProtocolName = "TLS";
-        else
-            iProtocolName = "SSL";
-
-        if (aResult[7].compareTo("TLSv1") == 0)
-            iProtocolVersion = "3.1";
-        else
-            iProtocolVersion = "3.0";
-
-        if (aResult[8].indexOf("MD5") >= 0)
-        {
-            iCipher = new String("TLS_RSA_WITH_RC4_128_MD5");
-        }
-        else
-        {
-            iCipher = new String("TLS_RSA_WITH_RC4_128_SHA");
-        }
-
-    }
-
-    /**
-     * Gets the handle to the servercertificate
-     *
-     * @returns a Certificate class
-     */
-
-    public Certificate getServerCertificate()
-    {
-        return iCertificate;
-    }
-
-    /**
-     * Gets the SSL protocol version
-     *
-     * @returns protocolversion
-     */
-
-    public String getProtocolVersion()
-    {
-        return iProtocolVersion;
-    }
-
-    /**
-     * Gets the Protocol Name
-     *
-     * @returns protocol name
-     */
-
-    public String getProtocolName()
-    {
-        return iProtocolName;
-    }
-
-    /**
-     * Gets the name of the cipher suite in use
-     *
-     * @returns cipher suite name
-     */
-
-    public String getCipherSuite()
-    {
-        return iCipher;
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/https/javasrc.linux/javax/microedition/io/HttpsConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package javax.microedition.io;
-
-import java.io.IOException;
-
-public interface HttpsConnection
-            extends HttpConnection
-{
-    public SecurityInfo getSecurityInfo()
-    throws IOException;
-}
-
--- a/javacommons/gcfprotocols/https/src.linux/httpsconnectionimpljni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-#include "com_nokia_mj_impl_https_HttpsConnectionImpl.h"
-#include "stdlib.h"
-#include "nativehttpsconnection.h"
-#include "javajniutils.h"
-
-#include "wchar.h"
-
-using namespace java::https;
-
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_https_HttpsConnectionImpl__1createNativePeer
-(JNIEnv* aJni, jobject /*peer*/, jstring aProxy, jint aProxyPort, jstring aHost, jint aPort)
-{
-    const char* proxy = aJni->GetStringUTFChars(aProxy, 0);
-    const char* host = aJni->GetStringUTFChars(aHost, 0);
-    NativeHttpsConnection *httpsPeer = new NativeHttpsConnection();
-    int sock_desc = httpsPeer->createSocket(proxy,aProxyPort,host,aPort);
-    return sock_desc;
-}
--- a/javacommons/gcfprotocols/https/src.linux/nativehttpsconnection.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
- *
-*/
-
-
-#include "nativehttpsconnection.h"
-#include <stdio.h>
-#include<errno.h>
-#include<fcntl.h>
-#include<unistd.h>
-#include<sys/stat.h>
-#include<sys/types.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <arpa/inet.h>
-#include <sstream>
-#include <string.h>
-
-#include <logger.h>
-
-namespace java
-{
-namespace https
-{
-int NativeHttpsConnection::createSocket(const char *aProxy,int aProxyPort, const char *aHost, int aPort)
-{
-    JELOG2(ESOCKET);
-    PLOG4(ESOCKET, "Creating socket, proxy host = %s, proxy port = %d, host = %s, port = %d ",
-          aProxy, aProxyPort, aHost, aPort);
-
-    //Create TCP socket to proxy server
-
-    struct sockaddr_in addr;
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(aProxyPort);
-
-    if (!inet_aton(aProxy, &addr.sin_addr))
-    {
-        struct hostent* hp = gethostbyname(aProxy);
-        addr.sin_addr.s_addr = ((struct in_addr*)(hp->h_addr))->s_addr;
-    }
-
-    int sd = socket(AF_INET, SOCK_STREAM, 0);
-    LOG1(ESOCKET, EInfo, "fd = %d", sd);
-    int rb = bind(sd, (struct sockaddr*) &addr, sizeof(addr));
-    int rc = connect(sd, (struct sockaddr*) &addr, sizeof(addr));
-
-    if (rc < 0)
-        return -errno;  // could not connect to proxy server, return
-
-    std::string string_host = aHost;
-    LOG1(ESOCKET, EInfo, "ahost = %s", aHost);
-    std::ostringstream tmpbuf;
-    tmpbuf << aPort;
-    std::string string_port = tmpbuf.str();
-
-    std::string tmpst1 = "CONNECT " + string_host + ":";
-    tmpst1 = tmpst1 + string_port;
-    tmpst1 = tmpst1 + " HTTP/1.1\r\n\r\n";
-    char *p1 = (char *) tmpst1.c_str();
-
-    // Example p1 ="CONNECT www.google.com:443 HTTP/1.1\r\n\r\n"
-
-    int res = send(sd, p1, strlen(p1), 0);
-
-    if (res < 0)
-        return -errno;
-
-    LOG1(ESOCKET, EInfo, "HttpsConnection() tmp string %s", p1);
-    LOG1(ESOCKET, EInfo, "send returned %d", res);
-    LOG1(ESOCKET, EInfo, "NativeHttpsConnection::receiving using sd %d", sd);
-    char response[1024];
-    int rcnt = recv(sd, response, 1024, 0);
-    LOG1(ESOCKET, EInfo, "recv returned %d", rcnt);
-    response[rcnt] = 0; // null termination
-    for (int i = 0; i < rcnt; i++)
-        LOG1(ESOCKET, EInfo, "%c", response[i]);
-
-    // for CONNECT request, the response line will be of the form "HTTP/1.1 200 Connection established\r\n"
-    // check if the response code is 200, if it is not 200 then this website cannot be accessed via this proxy, so return error code
-
-    std::string s3 = response;
-    std::string pattern = "200";
-    size_t found = s3.find(pattern);
-
-    if (found != std::string::npos)
-    {
-        LOG1(ESOCKET, EInfo, "Proxy returned 200 Connection established response", 2);
-        return sd;
-    }
-    else
-        return -1; // error code
-
-
-}
-} // end namespace https
-
-} // end namespace java
--- a/javacommons/gcfprotocols/secureconnection/build/javassl_0x2002DCD7.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/secureconnection/build/javassl_0x2002DCD7.mmp	Tue May 25 12:34:19 2010 +0300
@@ -88,6 +88,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -108,10 +120,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/secureconnection/inc.linux/nativecertificatemanager.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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:  Provides functionality for adding certificate ino cert store
-*
-*/
-
-
-#ifndef NATIVECERTIFICATEMANAGER_H
-#define NATIVECERTIFICATEMANAGER_H
-
-
-// CLASS DECLARATION
-
-/**
-*  Provides functionality for verifying a X509 certificate.
-*/
-
-
-class NativeCertificateManager
-{
-public:
-
-    /*
-    * validateX509Certificate is called by nativesecureconnection when the ssl handshake happens.
-    * In case of symbian when an X509 certificate is received, the fields are validated.
-    * For linux currently there are not apis available for validation, so this function returns valid always.
-    */
-    static int validateX509Certificate(X509 *aCert)
-    {
-        return 0;
-    }
-
-};
-
-
-#endif // NATIVECERTIFICATEMANAGER_H
--- a/javacommons/gcfprotocols/secureconnection/javasrc.linux/com/mj/impl/gcf/protocol/ssl/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.ssl;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.ssl.SecureConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.connectionmanager.ConnectionManager;
-import com.nokia.mj.impl.connectionmanager.AccessPoint;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.utils.Uid;
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javassl");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        String apnstring = null;
-        String urls = null;
-        int apnid = -1;
-        int index = -1;
-        ConnectionManager cminstance = null;
-        AccessPoint apn = null;
-        String fullurl = "ssl:" + aUri;
-
-        index = aUri.indexOf(";nokia_netid=");
-        if (index != -1)
-        {
-            apnstring = aUri.substring(index);
-            int equalindex = apnstring.indexOf('=');
-            if (equalindex != -1)
-            {
-                String temp = apnstring.substring(equalindex + 1);
-                try
-                {
-                    apnid = Integer.parseInt(temp);
-                }
-                catch (NumberFormatException e)
-                {
-                    throw new IllegalArgumentException("Invalid URL:  "
-                                                       + fullurl);
-                }
-            }
-            else
-            {
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            urls = aUri.substring(0, index);
-        }
-        else
-        {
-            index = aUri.indexOf(";nokia_apnid=");
-            if (index != -1)
-            {
-                apnstring = aUri.substring(index);
-                int equalindex = apnstring.indexOf('=');
-                if (equalindex != -1)
-                {
-                    String temp = apnstring.substring(equalindex + 1);
-                    try
-                    {
-                        apnid = Integer.parseInt(temp);
-                    }
-                    catch (NumberFormatException e)
-                    {
-                        throw new IllegalArgumentException("Invalid URL: "
-                                                           + fullurl);
-                    }
-                }
-                else
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-                urls = aUri.substring(0, index);
-            }
-            else
-            {
-                urls = aUri;
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "http +openConnection -after removing nokia_apnid : " + urls);
-
-        /* check for restricted ports */
-        UrlParser sslUrl = new UrlParser("ssl", urls);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "secureconnection - protocol class : port = " + sslUrl.port);
-        if (sslUrl.getPort() == 443)
-        {
-            if (ApplicationInfo.getInstance().getRuntimeType().equals(
-                        ApplicationInfo.RUNTIME_MIDP) == true)
-            {
-                if ((ApplicationInfo.getInstance().getProtectionDomain()
-                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "Throwing security exception for restricted port");
-                    throw new SecurityException("Unable to open secure connection: port "+sslUrl.getPort()+" is restricted");
-                }
-            }
-        }
-
-        /* security related stuff */
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        SSLPermissionImpl per = new SSLPermissionImpl("ssl://*");
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "calling check permissions from protocol");
-        appUtils.checkPermission(per);
-        /* security related stuff */
-
-        // remove comments if open c patch available
-        cminstance = ConnectionManager.getInstance();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "after getting ConnectionManager instance");
-        // get application suite uid
-        try
-        {
-            Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
-            try
-            {
-                // remove comments if open c patch available
-                apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
-            }
-            catch (Exception e)
-            {
-                Logger
-                .LOG(Logger.ESOCKET, Logger.EInfo,
-                     "+secureconnection Protocol getNetworkAccessPoint threw Exception");
-            }
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
-                       + apn.getType() + " apn.getNapId= " + apn.getNapId());
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "getSuiteUid exception ");
-        }
-
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "secure connection protocol.java");
-
-        if (sslUrl.port == -1)
-        {
-            throw new IllegalArgumentException("Invalid URL: " + fullurl);
-        }
-        return new SecureConnectionImpl(sslUrl, aMode, -1, cminstance, apn);
-
-    }
-
-    public javax.microedition.io.Connection openConn(String aName, int aMode,
-            boolean aTimeouts) throws IOException
-    {
-        return openConnection(aName, aMode, aTimeouts);
-    }
-
-}
--- a/javacommons/gcfprotocols/secureconnection/javasrc.s60/com/mj/impl/gcf/protocol/ssl/Connection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.ssl;
-
-import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
-import java.io.IOException;
-
-/* This class is specific to j9 Vm.
- * It derives from J9GcfConnectionBase IBM VM's
- * class, so that when Connector.open is called,
- * in case of j9 VM, the VM finds
- * com.nokia.mj.impl.gcf.protocol."scheme".Connection class
- * and calls the createConnection method to return a Connection
- */
-
-public class Connection extends J9GcfConnectionBase
-{
-    private static Protocol iProtocol = null;
-
-    public Connection()
-    {
-    }
-
-    protected javax.microedition.io.Connection createConnection(String aName,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        if (iProtocol == null)
-        {
-            iProtocol = new Protocol();
-        }
-        return iProtocol.openConnection(aName, aMode, aTimeouts);
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/secureconnection/javasrc.s60/com/mj/impl/gcf/protocol/ssl/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.ssl;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.ssl.SecureConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.connectionmanager.ConnectionManager;
-import com.nokia.mj.impl.connectionmanager.AccessPoint;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.utils.Uid;
-
-public class Protocol
-{
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javassl");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        String apnstring = null;
-        String urls = null;
-        int apnid = -1;
-        int index = -1;
-        ConnectionManager cminstance = null;
-        AccessPoint apn = null;
-        String fullurl = "ssl:" + aUri;
-
-        index = aUri.indexOf(";nokia_netid=");
-        if (index != -1)
-        {
-            apnstring = aUri.substring(index);
-            int equalindex = apnstring.indexOf('=');
-            if (equalindex != -1)
-            {
-                String temp = apnstring.substring(equalindex + 1);
-                try
-                {
-                    apnid = Integer.parseInt(temp);
-                }
-                catch (NumberFormatException e)
-                {
-                    throw new IllegalArgumentException("Invalid URL:  "
-                                                       + fullurl);
-                }
-            }
-            else
-            {
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            urls = aUri.substring(0, index);
-        }
-        else
-        {
-            index = aUri.indexOf(";nokia_apnid=");
-            if (index != -1)
-            {
-                apnstring = aUri.substring(index);
-                int equalindex = apnstring.indexOf('=');
-                if (equalindex != -1)
-                {
-                    String temp = apnstring.substring(equalindex + 1);
-                    try
-                    {
-                        apnid = Integer.parseInt(temp);
-                    }
-                    catch (NumberFormatException e)
-                    {
-                        throw new IllegalArgumentException("Invalid URL: "
-                                                           + fullurl);
-                    }
-                }
-                else
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-                urls = aUri.substring(0, index);
-            }
-            else
-            {
-                urls = aUri;
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "http +openConnection -after removing nokia_apnid : " + urls);
-
-        /* check for restricted ports */
-        UrlParser sslUrl = new UrlParser("ssl", urls);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "secureconnection - protocol class : port = " + sslUrl.port);
-        if (sslUrl.getPort() == 443)
-        {
-            if (ApplicationInfo.getInstance().getRuntimeType().equals(
-                        ApplicationInfo.RUNTIME_MIDP) == true)
-            {
-                if ((ApplicationInfo.getInstance().getProtectionDomain()
-                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "Throwing security exception for restricted port");
-                    throw new SecurityException("Unable to open secure connection: port "+sslUrl.getPort()+" is restricted");
-                }
-            }
-        }
-
-        /* security related stuff */
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        SSLPermissionImpl per = new SSLPermissionImpl("ssl://*");
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "calling check permissions from protocol");
-        appUtils.checkPermission(per);
-        /* security related stuff */
-
-        // remove comments if open c patch available
-        cminstance = ConnectionManager.getInstance();
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "after getting ConnectionManager instance");
-        // get application suite uid
-        try
-        {
-            Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
-            try
-            {
-                // remove comments if open c patch available
-                apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
-            }
-            catch (Exception e)
-            {
-                Logger
-                .LOG(Logger.ESOCKET, Logger.EInfo,
-                     "+secureconnection Protocol getNetworkAccessPoint threw Exception");
-            }
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
-                       + apn.getType() + " apn.getNapId= " + apn.getNapId());
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "getSuiteUid exception ");
-        }
-
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "secure connection protocol.java");
-
-        if (sslUrl.port == -1)
-        {
-            throw new IllegalArgumentException("Invalid URL: " + fullurl);
-        }
-        return new SecureConnectionImpl(sslUrl, aMode, -1, cminstance, apn);
-
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/gcfprotocols/secureconnection/javasrc.s60/com/nokia/mj/impl/gcf/protocol/ssl/Connection.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.ssl;
+
+import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
+import java.io.IOException;
+
+/* This class is specific to j9 Vm.
+ * It derives from J9GcfConnectionBase IBM VM's
+ * class, so that when Connector.open is called,
+ * in case of j9 VM, the VM finds
+ * com.nokia.mj.impl.gcf.protocol."scheme".Connection class
+ * and calls the createConnection method to return a Connection
+ */
+
+public class Connection extends J9GcfConnectionBase
+{
+    private static Protocol iProtocol = null;
+
+    public Connection()
+    {
+    }
+
+    protected javax.microedition.io.Connection createConnection(String aName,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+        if (iProtocol == null)
+        {
+            iProtocol = new Protocol();
+        }
+        return iProtocol.openConnection(aName, aMode, aTimeouts);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/gcfprotocols/secureconnection/javasrc.s60/com/nokia/mj/impl/gcf/protocol/ssl/Protocol.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.ssl;
+
+import java.io.IOException;
+import com.nokia.mj.impl.rt.support.Jvm;
+import com.nokia.mj.impl.gcf.utils.UrlParser;
+import com.nokia.mj.impl.ssl.SecureConnectionImpl;
+import com.nokia.mj.impl.rt.support.ApplicationUtils;
+import com.nokia.mj.impl.connectionmanager.ConnectionManager;
+import com.nokia.mj.impl.connectionmanager.AccessPoint;
+import com.nokia.mj.impl.utils.Logger;
+import com.nokia.mj.impl.rt.support.ApplicationInfo;
+import com.nokia.mj.impl.utils.Uid;
+
+public class Protocol
+{
+
+    static
+    {
+        try
+        {
+            Jvm.loadSystemLibrary("javassl");
+        }
+        catch (Exception e)
+        {
+            Logger.ELOG(Logger.ESOCKET, e.toString());
+        }
+    }
+
+    public Protocol()
+    {
+    }
+
+    public javax.microedition.io.Connection openConnection(String aUri,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+        String apnstring = null;
+        String urls = null;
+        int apnid = -1;
+        int index = -1;
+        ConnectionManager cminstance = null;
+        AccessPoint apn = null;
+        String fullurl = "ssl:" + aUri;
+
+        index = aUri.indexOf(";nokia_netid=");
+        if (index != -1)
+        {
+            apnstring = aUri.substring(index);
+            int equalindex = apnstring.indexOf('=');
+            if (equalindex != -1)
+            {
+                String temp = apnstring.substring(equalindex + 1);
+                try
+                {
+                    apnid = Integer.parseInt(temp);
+                }
+                catch (NumberFormatException e)
+                {
+                    throw new IllegalArgumentException("Invalid URL:  "
+                                                       + fullurl);
+                }
+            }
+            else
+            {
+                throw new IllegalArgumentException("Invalid URL: " + fullurl);
+            }
+            urls = aUri.substring(0, index);
+        }
+        else
+        {
+            index = aUri.indexOf(";nokia_apnid=");
+            if (index != -1)
+            {
+                apnstring = aUri.substring(index);
+                int equalindex = apnstring.indexOf('=');
+                if (equalindex != -1)
+                {
+                    String temp = apnstring.substring(equalindex + 1);
+                    try
+                    {
+                        apnid = Integer.parseInt(temp);
+                    }
+                    catch (NumberFormatException e)
+                    {
+                        throw new IllegalArgumentException("Invalid URL: "
+                                                           + fullurl);
+                    }
+                }
+                else
+                {
+                    throw new IllegalArgumentException("Invalid URL: "
+                                                       + fullurl);
+                }
+                urls = aUri.substring(0, index);
+            }
+            else
+            {
+                urls = aUri;
+            }
+        }
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "http +openConnection -after removing nokia_apnid : " + urls);
+
+        /* check for restricted ports */
+        UrlParser sslUrl = new UrlParser("ssl", urls);
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "secureconnection - protocol class : port = " + sslUrl.port);
+        if (sslUrl.getPort() == 443)
+        {
+            if (ApplicationInfo.getInstance().getRuntimeType().equals(
+                        ApplicationInfo.RUNTIME_MIDP) == true)
+            {
+                if ((ApplicationInfo.getInstance().getProtectionDomain()
+                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
+                {
+                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                               "Throwing security exception for restricted port");
+                    throw new SecurityException("Unable to open secure connection: port "+sslUrl.getPort()+" is restricted");
+                }
+            }
+        }
+
+        /* security related stuff */
+        ApplicationUtils appUtils = ApplicationUtils.getInstance();
+        SSLPermissionImpl per = new SSLPermissionImpl("ssl://*");
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "calling check permissions from protocol");
+        appUtils.checkPermission(per);
+        /* security related stuff */
+
+        // remove comments if open c patch available
+        cminstance = ConnectionManager.getInstance();
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "after getting ConnectionManager instance");
+        // get application suite uid
+        try
+        {
+            Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
+            try
+            {
+                // remove comments if open c patch available
+                apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
+            }
+            catch (Exception e)
+            {
+                Logger
+                .LOG(Logger.ESOCKET, Logger.EInfo,
+                     "+secureconnection Protocol getNetworkAccessPoint threw Exception");
+            }
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
+                       + apn.getType() + " apn.getNapId= " + apn.getNapId());
+        }
+        catch (Exception e)
+        {
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo, "getSuiteUid exception ");
+        }
+
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "secure connection protocol.java");
+
+        if (sslUrl.port == -1)
+        {
+            throw new IllegalArgumentException("Invalid URL: " + fullurl);
+        }
+        return new SecureConnectionImpl(sslUrl, aMode, -1, cminstance, apn);
+
+    }
+
+}
--- a/javacommons/gcfprotocols/socket/serverconnection/build/javasocketscplugin_0x2002DCD5.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/socket/serverconnection/build/javasocketscplugin_0x2002DCD5.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/socket/socket/build/javasocket_0x2002DCD4.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/build/javasocket_0x2002DCD4.mmp	Tue May 25 12:34:19 2010 +0300
@@ -88,6 +88,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -108,10 +121,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/gcfprotocols/socket/socket/javasrc.linux/com/mj/impl/gcf/protocol/socket/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.socket;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.gcf.utils.*;
-import com.nokia.mj.impl.socket.SocketConnectionImpl;
-import com.nokia.mj.impl.socket.ServerSocketConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.connectionmanager.ConnectionManager;
-import com.nokia.mj.impl.connectionmanager.AccessPoint;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.utils.Uid;
-
-/*
- * Implementation of Connector class of GCF framework The protocol class is the
- * entry point for connection types When connector.open is called, the VM finds
- * the com.nokia.mj.impl.gcf.protocol."scheme".Protocol class which implements
- * openConnection method which is called by the Vm.
- */
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javasocket");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-
-        String apnstring = null;
-        String urls = null;
-        int apnid = -1;
-        int index = -1;
-        String fullurl = "socket:" + aUri;
-        ConnectionManager cminstance = null;
-        AccessPoint apn = null;
-        index = aUri.indexOf(";nokia_netid=");
-        if (index != -1)
-        {
-            apnstring = aUri.substring(index);
-            int equalindex = apnstring.indexOf('=');
-            if (equalindex != -1)
-            {
-                String temp = apnstring.substring(equalindex + 1);
-                try
-                {
-                    apnid = Integer.parseInt(temp);
-                }
-                catch (NumberFormatException e)
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-            }
-            else
-            {
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            urls = aUri.substring(0, index);
-        }
-        else
-        {
-            index = aUri.indexOf(";nokia_apnid=");
-            if (index != -1)
-            {
-                apnstring = aUri.substring(index);
-                int equalindex = apnstring.indexOf('=');
-                if (equalindex != -1)
-                {
-                    String temp = apnstring.substring(equalindex + 1);
-                    try
-                    {
-                        apnid = Integer.parseInt(temp);
-                    }
-                    catch (NumberFormatException e)
-                    {
-                        throw new IllegalArgumentException("Invalid URL: "
-                                                           + fullurl);
-                    }
-                }
-                else
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-                urls = aUri.substring(0, index);
-            }
-            else
-            {
-                urls = aUri;
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "socket +openConnection -after removing nokia_apnid : " + urls);
-
-        UrlParser SocURL = new UrlParser("socket", urls);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "socket - protocol class : port = " + SocURL.port);
-        if (SocURL.getPort() == 8080 || SocURL.getPort() == 443
-                || SocURL.getPort() == 80)
-        {
-            if (ApplicationInfo.getInstance().getRuntimeType().equals(
-                        ApplicationInfo.RUNTIME_MIDP) == true)
-            {
-                if ((ApplicationInfo.getInstance().getProtectionDomain()
-                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "Throwing security exception for restricted port");
-                    throw new SecurityException("Unable to open socket connection: port "+SocURL.getPort()+" is restricted");
-                }
-            }
-        }
-        if (SocURL.host == null)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : server connection");
-            ApplicationUtils appUtils = ApplicationUtils.getInstance();
-            SocketPermissionImpl per = new SocketPermissionImpl("socket://");
-            appUtils.checkPermission(per);
-            /* security related stuff */
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : after security check");
-            return new ServerSocketConnectionImpl(SocURL, aMode);
-        }
-        else
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : client connection");
-            if (SocURL.port == -1)
-            {
-                /* client connecction should have a port number */
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            ApplicationUtils appUtils = ApplicationUtils.getInstance();
-            SocketPermissionImpl per = new SocketPermissionImpl("socket://*");
-            appUtils.checkPermission(per);
-            /* security related stuff */
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : after security check");
-
-            // remove comments if open c patch available
-            cminstance = ConnectionManager.getInstance();
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "after getting ConnectionManager instance");
-            // get application suite uid
-            try
-            {
-                Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
-                try
-                {
-                    // remove comments if open c patch available
-                    apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
-                }
-                catch (Exception e)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "+secureconnection Protocol getNetworkAccessPoint threw Exception");
-                }
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
-                           + apn.getType() + " apn.getNapId= " + apn.getNapId());
-            }
-            catch (Exception e)
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                           "getSuiteUid exception ");
-            }
-
-            return new SocketConnectionImpl(SocURL, aMode, -1, cminstance, apn);
-        }
-    }
-
-    public javax.microedition.io.Connection openConn(String name, int mode,
-            boolean timeouts) throws IOException
-    {
-        return openConnection(name, mode, timeouts);
-    }
-
-}
--- a/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/mj/impl/gcf/protocol/socket/Connection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.socket;
-
-import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
-import java.io.IOException;
-
-/* This class is specific to j9 Vm.
- * It derives from J9GcfConnectionBase IBM VM's
- * class, so that when Connector.open is called,
- * in case of j9 VM, the VM finds
- * com.nokia.mj.impl.gcf.protocol."scheme".Connection class
- * and calls the createConnection method to return a Connection
- */
-public class Connection extends J9GcfConnectionBase
-{
-
-    private static Protocol iProtocol;
-
-    public Connection()
-    {
-    }
-
-    protected javax.microedition.io.Connection createConnection(String aName,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        if (iProtocol == null)
-        {
-            iProtocol = new Protocol();
-        }
-        return iProtocol.openConnection(aName, aMode, aTimeouts);
-    }
-}
\ No newline at end of file
--- a/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/mj/impl/gcf/protocol/socket/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.socket;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.*;
-import com.nokia.mj.impl.socket.SocketConnectionImpl;
-import com.nokia.mj.impl.socket.ServerSocketConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.gcf.utils.UrlParser;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.connectionmanager.ConnectionManager;
-import com.nokia.mj.impl.connectionmanager.AccessPoint;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.utils.Uid;
-
-/*
- * Implementation of Connector class of GCF framework The protocol class is the
- * entry point for connection types When connector.open is called, the VM finds
- * the com.nokia.mj.impl.gcf.protocol."scheme".Protocol class which implements
- * openConnection method which is called by the Vm.
- */
-
-public class Protocol
-{
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javasocket");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.ESOCKET, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-
-        String apnstring = null;
-        String urls = null;
-        int apnid = -1;
-        int index = -1;
-        String fullurl = "socket:" + aUri;
-        ConnectionManager cminstance = null;
-        AccessPoint apn = null;
-        index = aUri.indexOf(";nokia_netid=");
-        if (index != -1)
-        {
-            apnstring = aUri.substring(index);
-            int equalindex = apnstring.indexOf('=');
-            if (equalindex != -1)
-            {
-                String temp = apnstring.substring(equalindex + 1);
-                try
-                {
-                    apnid = Integer.parseInt(temp);
-                }
-                catch (NumberFormatException e)
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-            }
-            else
-            {
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            urls = aUri.substring(0, index);
-        }
-        else
-        {
-            index = aUri.indexOf(";nokia_apnid=");
-            if (index != -1)
-            {
-                apnstring = aUri.substring(index);
-                int equalindex = apnstring.indexOf('=');
-                if (equalindex != -1)
-                {
-                    String temp = apnstring.substring(equalindex + 1);
-                    try
-                    {
-                        apnid = Integer.parseInt(temp);
-                    }
-                    catch (NumberFormatException e)
-                    {
-                        throw new IllegalArgumentException("Invalid URL: "
-                                                           + fullurl);
-                    }
-                }
-                else
-                {
-                    throw new IllegalArgumentException("Invalid URL: "
-                                                       + fullurl);
-                }
-                urls = aUri.substring(0, index);
-            }
-            else
-            {
-                urls = aUri;
-            }
-        }
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "socket +openConnection -after removing nokia_apnid : " + urls);
-
-        UrlParser SocURL = new UrlParser("socket", urls);
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "socket - protocol class : port = " + SocURL.port);
-        if (SocURL.getPort() == 8080 || SocURL.getPort() == 443
-                || SocURL.getPort() == 80)
-        {
-            if (ApplicationInfo.getInstance().getRuntimeType().equals(
-                        ApplicationInfo.RUNTIME_MIDP) == true)
-            {
-                if ((ApplicationInfo.getInstance().getProtectionDomain()
-                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "Throwing security exception for restricted port");
-                    throw new SecurityException("Unable to open socket connection: port "+SocURL.getPort()+" is restricted");
-                }
-            }
-        }
-        if (SocURL.host == null)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : server connection");
-            ApplicationUtils appUtils = ApplicationUtils.getInstance();
-            SocketPermissionImpl per = new SocketPermissionImpl("socket://");
-            appUtils.checkPermission(per);
-            /* security related stuff */
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : after security check");
-            return new ServerSocketConnectionImpl(SocURL, aMode);
-        }
-        else
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : client connection");
-            if (SocURL.port == -1)
-            {
-                /* client connecction should have a port number */
-                throw new IllegalArgumentException("Invalid URL: " + fullurl);
-            }
-            ApplicationUtils appUtils = ApplicationUtils.getInstance();
-            SocketPermissionImpl per = new SocketPermissionImpl("socket://*");
-            appUtils.checkPermission(per);
-            /* security related stuff */
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "socket - protocol class : after security check");
-
-            // remove comments if open c patch available
-            cminstance = ConnectionManager.getInstance();
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "after getting ConnectionManager instance");
-            // get application suite uid
-            try
-            {
-                Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
-                try
-                {
-                    // remove comments if open c patch available
-                    apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
-                }
-                catch (Exception e)
-                {
-                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                               "+secureconnection Protocol getNetworkAccessPoint threw Exception");
-                }
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
-                           + apn.getType() + " apn.getNapId= " + apn.getNapId());
-            }
-            catch (Exception e)
-            {
-                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                           "getSuiteUid exception ");
-            }
-
-            return new SocketConnectionImpl(SocURL, aMode, -1, cminstance, apn);
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Connection.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.socket;
+
+import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
+import java.io.IOException;
+
+/* This class is specific to j9 Vm.
+ * It derives from J9GcfConnectionBase IBM VM's
+ * class, so that when Connector.open is called,
+ * in case of j9 VM, the VM finds
+ * com.nokia.mj.impl.gcf.protocol."scheme".Connection class
+ * and calls the createConnection method to return a Connection
+ */
+public class Connection extends J9GcfConnectionBase
+{
+
+    private static Protocol iProtocol;
+
+    public Connection()
+    {
+    }
+
+    protected javax.microedition.io.Connection createConnection(String aName,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+        if (iProtocol == null)
+        {
+            iProtocol = new Protocol();
+        }
+        return iProtocol.openConnection(aName, aMode, aTimeouts);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Protocol.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.socket;
+
+import java.io.IOException;
+import com.nokia.mj.impl.rt.support.Jvm;
+import com.nokia.mj.impl.gcf.utils.*;
+import com.nokia.mj.impl.socket.SocketConnectionImpl;
+import com.nokia.mj.impl.socket.ServerSocketConnectionImpl;
+import com.nokia.mj.impl.rt.support.ApplicationUtils;
+import com.nokia.mj.impl.gcf.utils.UrlParser;
+import com.nokia.mj.impl.utils.Logger;
+import com.nokia.mj.impl.connectionmanager.ConnectionManager;
+import com.nokia.mj.impl.connectionmanager.AccessPoint;
+import com.nokia.mj.impl.rt.support.ApplicationInfo;
+import com.nokia.mj.impl.utils.Uid;
+
+/*
+ * Implementation of Connector class of GCF framework The protocol class is the
+ * entry point for connection types When connector.open is called, the VM finds
+ * the com.nokia.mj.impl.gcf.protocol."scheme".Protocol class which implements
+ * openConnection method which is called by the Vm.
+ */
+
+public class Protocol
+{
+
+    static
+    {
+        try
+        {
+            Jvm.loadSystemLibrary("javasocket");
+        }
+        catch (Exception e)
+        {
+            Logger.ELOG(Logger.ESOCKET, e.toString());
+        }
+    }
+
+    public Protocol()
+    {
+
+    }
+
+    public javax.microedition.io.Connection openConnection(String aUri,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+
+        String apnstring = null;
+        String urls = null;
+        int apnid = -1;
+        int index = -1;
+        String fullurl = "socket:" + aUri;
+        ConnectionManager cminstance = null;
+        AccessPoint apn = null;
+        index = aUri.indexOf(";nokia_netid=");
+        if (index != -1)
+        {
+            apnstring = aUri.substring(index);
+            int equalindex = apnstring.indexOf('=');
+            if (equalindex != -1)
+            {
+                String temp = apnstring.substring(equalindex + 1);
+                try
+                {
+                    apnid = Integer.parseInt(temp);
+                }
+                catch (NumberFormatException e)
+                {
+                    throw new IllegalArgumentException("Invalid URL: "
+                                                       + fullurl);
+                }
+            }
+            else
+            {
+                throw new IllegalArgumentException("Invalid URL: " + fullurl);
+            }
+            urls = aUri.substring(0, index);
+        }
+        else
+        {
+            index = aUri.indexOf(";nokia_apnid=");
+            if (index != -1)
+            {
+                apnstring = aUri.substring(index);
+                int equalindex = apnstring.indexOf('=');
+                if (equalindex != -1)
+                {
+                    String temp = apnstring.substring(equalindex + 1);
+                    try
+                    {
+                        apnid = Integer.parseInt(temp);
+                    }
+                    catch (NumberFormatException e)
+                    {
+                        throw new IllegalArgumentException("Invalid URL: "
+                                                           + fullurl);
+                    }
+                }
+                else
+                {
+                    throw new IllegalArgumentException("Invalid URL: "
+                                                       + fullurl);
+                }
+                urls = aUri.substring(0, index);
+            }
+            else
+            {
+                urls = aUri;
+            }
+        }
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "socket +openConnection -after removing nokia_apnid : " + urls);
+
+        UrlParser SocURL = new UrlParser("socket", urls);
+        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                   "socket - protocol class : port = " + SocURL.port);
+        if (SocURL.getPort() == 8080 || SocURL.getPort() == 443
+                || SocURL.getPort() == 80)
+        {
+            if (ApplicationInfo.getInstance().getRuntimeType().equals(
+                        ApplicationInfo.RUNTIME_MIDP) == true)
+            {
+                if ((ApplicationInfo.getInstance().getProtectionDomain()
+                        .equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)) == true)
+                {
+                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                               "Throwing security exception for restricted port");
+                    throw new SecurityException("Unable to open socket connection: port "+SocURL.getPort()+" is restricted");
+                }
+            }
+        }
+        if (SocURL.host == null)
+        {
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                       "socket - protocol class : server connection");
+            ApplicationUtils appUtils = ApplicationUtils.getInstance();
+            SocketPermissionImpl per = new SocketPermissionImpl("socket://");
+            appUtils.checkPermission(per);
+            /* security related stuff */
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                       "socket - protocol class : after security check");
+            return new ServerSocketConnectionImpl(SocURL, aMode);
+        }
+        else
+        {
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                       "socket - protocol class : client connection");
+            if (SocURL.port == -1)
+            {
+                /* client connecction should have a port number */
+                throw new IllegalArgumentException("Invalid URL: " + fullurl);
+            }
+            ApplicationUtils appUtils = ApplicationUtils.getInstance();
+            SocketPermissionImpl per = new SocketPermissionImpl("socket://*");
+            appUtils.checkPermission(per);
+            /* security related stuff */
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                       "socket - protocol class : after security check");
+
+            // remove comments if open c patch available
+            cminstance = ConnectionManager.getInstance();
+            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                       "after getting ConnectionManager instance");
+            // get application suite uid
+            try
+            {
+                Uid appSuite = ApplicationInfo.getInstance().getSuiteUid();
+                try
+                {
+                    // remove comments if open c patch available
+                    apn = cminstance.getNetworkAccessPoint(appSuite, aUri);
+                }
+                catch (Exception e)
+                {
+                    Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                               "+secureconnection Protocol getNetworkAccessPoint threw Exception");
+                }
+                Logger.LOG(Logger.ESOCKET, Logger.EInfo, "apn.getType = "
+                           + apn.getType() + " apn.getNapId= " + apn.getNapId());
+            }
+            catch (Exception e)
+            {
+                Logger.LOG(Logger.ESOCKET, Logger.EInfo,
+                           "getSuiteUid exception ");
+            }
+
+            return new SocketConnectionImpl(SocURL, aMode, -1, cminstance, apn);
+        }
+    }
+}
--- a/javacommons/gcfprotocols/socket/socket/src.linux/apnsettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ApnSettings.app
-*
-*/
-
-
-
-#include "apnsettings.h"
-
-using namespace java;
-
-int ApnSettings::setDefaultApn(int aType, int aApn)
-{
-    /*
-    This is dummy implementation
-    setting of apn in linux is not supported currently
-    */
-    return 0;
-}
-
-void ApnSettings::removeDefaultApn()
-{
-    /*
-    This is dummy implementation
-    removal of apn in linux is not supported currently
-    */
-}
--- a/javacommons/gcfprotocols/socket/socket/src.linux/socketlocalhostinfo.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  ApnSettings.app
- *
- */
-#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <arpa/inet.h>
-#include <cstring>
-#include "socketlocalhostinfo.h"
-#include "logger.h"
-
-int SocketLocalHostInfo::getLocalAddress(int aSockDesc, char *aLocalAddr, int /* aIadid */, int /* aType */)
-{
-
-    int retval;
-    struct sockaddr_in saddr;
-    socklen_t len = sizeof(saddr);
-
-    if (getsockname(aSockDesc, (struct sockaddr*) &saddr, &len) == -1)
-    {
-        ELOG1(ESOCKET,
-              "SocketServerConnectionJNI::getLocalAddress() : getlocaladdress failed : %d",
-              errno);
-        strcpy(aLocalAddr, "error");
-        retval = -errno;
-    }
-    else
-    {
-        strcpy(aLocalAddr, inet_ntoa(saddr.sin_addr));
-        retval = 0;
-    }
-
-    return 0;
-}
--- a/javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp	Tue May 25 12:34:19 2010 +0300
@@ -67,15 +67,10 @@
 }
 
 void ApnSettings::removeDefaultApn()
-{
-
-    int def = 0;
-
-#ifdef RD_JAVA_OPENC_BETA_PATCH
-    def = setdefaultif(NULL);
-    ILOG(ESOCKET, "sedefaultif called");
-#endif
-    (void)def; //just to suppress a warning
-    ILOG1(ESOCKET, "remove default apn returned %d",def);
-
+{ 
+    #ifdef RD_JAVA_OPENC_BETA_PATCH
+        setdefaultif(NULL);
+        ILOG(ESOCKET, "sedefaultif called");
+        ILOG1(ESOCKET, "remove default apn returned %d",setdefaultif(NULL));
+    #endif  
 }
--- a/javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp	Tue May 25 12:34:19 2010 +0300
@@ -123,9 +123,9 @@
 
                 if ((err == KErrNone) && (ifQuery.iZone[1] == activeIapId))
                 {
-                    TUint32 t5 = (TUint32)(ifQuery.iZone[15]);
-                    ILOG2(ESOCKET, "Network id = %d, IAP id = %d ", t5,
-                          ifQuery.iZone[1]);
+                    //TUint32 t5 = (TUint32)(ifQuery.iZone[15]);                    
+                    ILOG2(ESOCKET, "Network id = %d, IAP id = %d ",(TUint32)(ifQuery.iZone[15]),(TUint32)ifQuery.iZone[1]);
+                    
                     // IAP ID is index 1 of iZone
                     // We have found an interface using the IAP we are interested in.
                     if (ifInfo.iAddress.Address() > 0)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/javaenv/build/bwins/javaenvinfou.def	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	?GetPlatformInfoL@JavaEnvInfo@Java@@SAPAVHBufC16@@XZ @ 1 NONAME ; class HBufC16 * Java::JavaEnvInfo::GetPlatformInfoL(void)
+	?GetUserAgentHeaderL@JavaEnvInfo@Java@@SAPAVHBufC16@@XZ @ 2 NONAME ; class HBufC16 * Java::JavaEnvInfo::GetUserAgentHeaderL(void)
+	?Version@JavaEnvInfo@Java@@SA?AVTVersion@@XZ @ 3 NONAME ; class TVersion Java::JavaEnvInfo::Version(void)
+
--- a/javacommons/javaenv/build/bwins/javaenvu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	?GetPlatformInfoL@JavaEnvInfo@Java@@SAPAVHBufC16@@XZ @ 1 NONAME ; class HBufC16 * Java::JavaEnvInfo::GetPlatformInfoL(void)
-	?GetUserAgentHeaderL@JavaEnvInfo@Java@@SAPAVHBufC16@@XZ @ 2 NONAME ; class HBufC16 * Java::JavaEnvInfo::GetUserAgentHeaderL(void)
-	?Version@JavaEnvInfo@Java@@SA?AVTVersion@@XZ @ 3 NONAME ; class TVersion Java::JavaEnvInfo::Version(void)
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/javaenv/build/eabi/javaenvinfou.def	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	_ZN4Java11JavaEnvInfo16GetPlatformInfoLEv @ 1 NONAME
+	_ZN4Java11JavaEnvInfo19GetUserAgentHeaderLEv @ 2 NONAME
+	_ZN4Java11JavaEnvInfo7VersionEv @ 3 NONAME
+
--- a/javacommons/javaenv/build/eabi/javaenvu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	_ZN4Java11JavaEnvInfo16GetPlatformInfoLEv @ 1 NONAME
-	_ZN4Java11JavaEnvInfo19GetUserAgentHeaderLEv @ 2 NONAME
-	_ZN4Java11JavaEnvInfo7VersionEv @ 3 NONAME
-
--- a/javacommons/javaenv/build/javaenv.pro	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/javaenv/build/javaenv.pro	Tue May 25 12:34:19 2010 +0300
@@ -15,7 +15,7 @@
 #
 
 TEMPLATE=lib
-TARGET=javaenv
+TARGET=javaenvinfo
 CONFIG += omj stl
 CONFIG -= qt
 
--- a/javacommons/javaenv/build/javaenv_0x2001B2A5.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/javaenv/build/javaenv_0x2001B2A5.mmp	Tue May 25 12:34:19 2010 +0300
@@ -22,7 +22,7 @@
 //  Name        : javaenv.mmp
 // ==============================================================================
 
-TARGET		javaenv.dll
+TARGET		javaenvinfo.dll
 TARGETTYPE		DLL
 
 UID		0x1000008d 0x2001B2A5
@@ -75,6 +75,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -95,10 +107,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
@@ -107,7 +115,7 @@
 
  OS_LAYER_SSL_SYSTEMINCLUDE
 
-deffile ./~/javaenv.def
+deffile ./~/javaenvinfo.def
 
  SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)
 
--- a/javacommons/javaenv/tsrc/build/alltests.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/javaenv/tsrc/build/alltests.mmp	Tue May 25 12:34:19 2010 +0300
@@ -36,4 +36,4 @@
 SOURCE alltests.cpp     // For STL execution
 SOURCE testjavaenvinfo.cpp
 
-LIBRARY javaenv.lib
\ No newline at end of file
+LIBRARY javaenvinfo.lib
\ No newline at end of file
--- a/javacommons/javastorage/build/javastorage_0x2002DCD8.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/javastorage/build/javastorage_0x2002DCD8.mmp	Tue May 25 12:34:19 2010 +0300
@@ -91,6 +91,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -111,10 +124,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/javastorage/javasrc.linux/com/nokia/mj/impl/storage/StorageConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.storage;
-
-import com.nokia.mj.impl.comms.exception.CommsException;
-import com.nokia.mj.impl.comms.CommsEndpoint;
-import com.nokia.mj.impl.comms.CommsMessage;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * StorageConnection handles communication to Java Storage server databases.
- * Java Comms is used for communication.
- */
-final class StorageConnection
-{
-    private CommsEndpoint iServerEnd;
-
-    private static final int JAVASTORAGE_SERVER_ID = 10200;
-    private static final int STORAGE_CONN_REG_ID = 401;
-    private static final int TIMEOUT_SECS = 10;
-    private static final int PLUGIN_ID_JAVASTORAGE_CLIENT_C = 5;
-
-    /**
-     * Constructor. Initiates comms connection to storage server.
-     *
-     * @throws StorageException if comms connection creation fails.
-     */
-    StorageConnection() throws StorageException
-    {
-        try
-        {
-            iServerEnd = new CommsEndpoint();
-            iServerEnd.connect(JAVASTORAGE_SERVER_ID);
-        }
-        catch (CommsException ce)
-        {
-            throw new StorageException("Cannot connect to storage server", ce);
-        }
-
-    }
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-    /*** ---------------------------- PROTECTED ---------------------------- */
-    /*** ----------------------------- PACKAGE ----------------------------- */
-
-    /**
-     * Open connection to Java Storage database.
-     *
-     * @param aHeaders Connection headers.
-     * @param aStorageName Storage to open connection.
-     * @return sessionID if open was successful.
-     * @throws StorageException if open fails.
-     */
-    String open(String aHeaders, String aStorageName)
-    throws StorageException
-    {
-        String response = "";
-        try
-        {
-            CommsMessage msg = new CommsMessage();
-            msg.setMessageId(STORAGE_CONN_REG_ID);
-            msg.setModuleId(PLUGIN_ID_JAVASTORAGE_CLIENT_C);
-
-            msg.write(aHeaders);
-            msg.write(aStorageName);
-
-            CommsMessage responseMsg =
-                iServerEnd.sendReceive(msg, TIMEOUT_SECS);
-
-            // Message body is sessionID
-            response = checkReceivedMessage(responseMsg);
-        }
-        catch (CommsException e)
-        {
-            Logger.ELOG(Logger.EJavaStorage, "Communication error: "
-                        + e.getMessage());
-            throw new StorageException("Storage open failed", e);
-        }
-
-        return response;
-    }
-
-    /**
-     * Close JavaStorage connection.
-     *
-     * @param aHeaders connection headers to identify closed connection.
-     * @throws StorageException if closing fails.
-     */
-    void close(String aHeaders) throws StorageException
-    {
-        try
-        {
-            CommsMessage msg = new CommsMessage();
-            msg.setMessageId(STORAGE_CONN_REG_ID);
-            msg.setModuleId(PLUGIN_ID_JAVASTORAGE_CLIENT_C);
-
-            msg.write(aHeaders);
-
-            CommsMessage responseMsg =
-                iServerEnd.sendReceive(msg, TIMEOUT_SECS);
-
-            // Reponse contains OK if no exception thrown.
-            String response = checkReceivedMessage(responseMsg);
-        }
-        catch (CommsException e)
-        {
-            Logger.ELOG(Logger.EJavaStorage, "Communication error: "
-                        + e.getMessage());
-            throw new StorageException("Storage close failed", e);
-        }
-    }
-
-    /**
-     * Execute SQL statement to JavaStorage.
-     *
-     * @param aHeaders Connection headers to identify used connection.
-     * @param aSqlStatement SQL statement to be executed.
-     * @return response to SQL query. This can be for instance queried
-     *         application attributes in String format.
-     */
-    String execute(String aHeaders, String aSqlStatement)
-    throws StorageException
-    {
-        String response = "";
-        try
-        {
-            CommsMessage msg = new CommsMessage();
-            msg.setMessageId(STORAGE_CONN_REG_ID);
-            msg.setModuleId(PLUGIN_ID_JAVASTORAGE_CLIENT_C);
-
-            msg.write(aHeaders);
-            msg.write(aSqlStatement);
-
-            CommsMessage responseMsg =
-                iServerEnd.sendReceive(msg, TIMEOUT_SECS);
-
-            response = checkReceivedMessage(responseMsg);
-        }
-        catch (CommsException e)
-        {
-            Logger.ELOG(Logger.EJavaStorage, "Communication error: "
-                        + e.getMessage());
-            throw new StorageException("Storage execute failed", e);
-        }
-
-        return response;
-    }
-
-    /**
-     * Close JavaStorage server comms session.
-     */
-    void closeSession()
-    {
-        try
-        {
-            iServerEnd.disconnect();
-        }
-        catch (CommsException ce)
-        {
-            Logger.ELOG(Logger.EJavaStorage,
-                        "Disconnect from storage server failed",
-                        ce);
-        }
-        finally
-        {
-            iServerEnd.destroy();
-        }
-    }
-
-    /*** ----------------------------- PRIVATE ---------------------------- */
-
-    /**
-     * Check received message is valid and read body of it.
-     *
-     * @param aReceivedMsg to be checked.
-     * @return message body.
-     * @throws StorageException if received message is null or message body is
-     *         is empty or status code indicates error.
-     */
-    private String checkReceivedMessage(CommsMessage aReceivedMsg)
-    throws StorageException
-    {
-        String response = "";
-
-        if (aReceivedMsg != null)
-        {
-            int resultCode = aReceivedMsg.readInt();
-
-            if (resultCode < 0)
-            {
-                // Read error description
-                String errMsg = aReceivedMsg.readString();
-
-                Logger.ELOG(Logger.EJavaStorage, "Internal Storage Error: "
-                            + String.valueOf(resultCode) + " : " + errMsg);
-
-                throw new StorageException("Internal Storage Error: "
-                                           + String.valueOf(resultCode) + " : " + errMsg);
-            }
-            else
-            {
-                response = aReceivedMsg.readString();
-                if (response == null || response == "")
-                {
-                    Logger.ELOG(Logger.EJavaStorage, "Empty message body");
-                    throw new StorageException("Empty message body");
-                }
-            }
-        }
-        else
-        {
-            Logger.ELOG(Logger.EJavaStorage, "Empty response");
-            throw new StorageException("Empty response");
-        }
-
-        return response;
-    }
-
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javacommons/javastorage/src.linux/client/javadataaccessimpl.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2008-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:  JavaDataAccessImpl
-*
-*/
-
-
-#include "commsclientendpoint.h"
-#include "commsmessage.h"
-#include "javacommonutils.h"
-#include "javadataaccessimpl.h"
-#include "javastorageexception.h"
-#include "javastoragemessage.h"
-#include "logger.h"
-
-using namespace java::comms;
-using namespace java::storage;
-using namespace java::util;
-using namespace std;
-
-JavaDataAccessImpl::JavaDataAccessImpl() throw(JavaStorageException)
-        : mConnOpen(false), mCachedSessionID("")
-{
-    JELOG2(EJavaStorage);
-    mConnOpen = false;
-    mCliConn.reset(new CommsClientEndpoint());
-    int resultCode = mCliConn->connect(IPC_ADDRESS_JAVA_STORAGE_C);
-
-    if (resultCode != 0)
-    {
-        ELOG1(EJavaStorage, "Cannot connect via comms: %d", resultCode);
-        throw JavaStorageException(resultCode, "Comms failure",
-                                   __FILE__, __FUNCTION__, __LINE__);
-    }
-}
-
-OS_EXPORT JavaDataAccessImpl::~JavaDataAccessImpl()
-{
-    JELOG2(EJavaStorage);
-
-    // If intance is deleted prior connection is closed do close which triggers
-    // rollback on server side.
-    if (mConnOpen)
-    {
-        string msgID = JavaCommonUtils::intToString(JavaStorageMessage::EClose);
-        string msgIDSize = JavaCommonUtils::intToString(msgID.size());
-        string requestHeaders = msgIDSize + msgID + mCachedSessionID;
-        CommsMessage message;
-        close(requestHeaders, message);
-    }
-
-    int resultCode = mCliConn->disconnect();
-
-    if (resultCode != 0)
-    {
-        LOG1(EJavaStorage, EInfo,
-             "Comms disconnect result code: %d", resultCode);
-    }
-}
-
-OS_EXPORT void JavaDataAccessImpl::open(
-    const std::string& aHeaders,
-    const std::string& aStorageName,
-    CommsMessage& aReceivedMessage) throw(JavaStorageException)
-{
-    JELOG2(EJavaStorage);
-
-    CommsMessage sendStorageMessage;
-    sendStorageMessage.setMessageId(IPC_JS_CONN_REG);
-
-    // Headers contain MsgIdentifier,SessionId
-    sendStorageMessage<<aHeaders;
-    sendStorageMessage<<aStorageName;
-
-    sendReceiveMessage(sendStorageMessage, aReceivedMessage);
-    // SessionID is cached for the case that client deleted storage instance
-    // with open connection. SessionID is required to close open connection.
-    int resultCode = 0;
-    aReceivedMessage>>resultCode;
-    if (resultCode >= 0)
-    {
-        aReceivedMessage>>mCachedSessionID;
-        aReceivedMessage.begin();
-        mConnOpen = true;
-    }
-}
-
-OS_EXPORT void JavaDataAccessImpl::close(const std::string& aHeaders,
-        CommsMessage& aReceivedMessage)
-throw(JavaStorageException)
-{
-    JELOG2(EJavaStorage);
-
-    CommsMessage sendStorageMessage;
-    sendStorageMessage.setMessageId(IPC_JS_CONN_REG);
-
-    // Headers contain MsgIdentifier,SessionId
-    sendStorageMessage<<aHeaders;
-    sendStorageMessage<<"";
-
-    sendReceiveMessage(sendStorageMessage, aReceivedMessage);
-    mConnOpen = false;
-}
-
-OS_EXPORT void JavaDataAccessImpl::execute(const std::string& aHeaders,
-        const std::wstring& aSqlStatement,
-        CommsMessage& aReceivedMessage)
-throw(JavaStorageException)
-{
-    JELOG2(EJavaStorage);
-
-    CommsMessage sendStorageMessage;
-    sendStorageMessage.setMessageId(IPC_JS_CONN_REG);
-
-    // Headers contain MsgIdentifier,SessionId
-    sendStorageMessage<<aHeaders;
-    // Data is pure sqlstatement
-    sendStorageMessage<<aSqlStatement;
-
-    sendReceiveMessage(sendStorageMessage, aReceivedMessage);
-}
-
-void JavaDataAccessImpl::sendReceiveMessage(CommsMessage& aSendMessage,
-        CommsMessage& aReceivedMessage)
-throw(JavaStorageException)
-{
-    JELOG2(EJavaStorage);
-
-    int resultCode = -1;
-
-    aSendMessage.setReceiver(IPC_ADDRESS_JAVA_STORAGE_C);
-    aSendMessage.setModuleId(PLUGIN_ID_JAVASTORAGE_CLIENT_C);
-
-    resultCode = mCliConn->sendReceive(aSendMessage, aReceivedMessage, 10);
-
-    if (resultCode != 0)
-    {
-        ELOG1(EJavaStorage, "Comms result code: %d", resultCode);
-
-        throw JavaStorageException(resultCode, "Comms failure",
-                                   __FILE__, __FUNCTION__, __LINE__);
-    }
-}
--- a/javacommons/javastorage/src.linux/client/javadataaccessimpl.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2008-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:  JavaDataAccessImpl
-*
-*/
-
-
-#ifndef JAVADATAACCESSIMPL_H
-#define JAVADATAACCESSIMPL_H
-
-#include <memory>
-
-#include "javadataaccess.h"
-#include "javaosheaders.h"
-
-namespace java
-{
-namespace comms
-{
-class CommsClientEndpoint;
-class CommsMessage;
-}    // end namespace comms
-namespace storage
-{
-
-/**
- * JavaDataAccessImpl implements JavaDataAccess interface.
- */
-class JavaDataAccessImpl : public JavaDataAccess
-{
-
-    friend class JavaDataAccess;
-
-public:
-    /**
-     * Destructor. If destructor is called while having active connection
-     * Connection is rollbacked and closed before closing comms connection
-     * to storage server.
-     */
-    OS_IMPORT virtual ~JavaDataAccessImpl();
-
-    /**
-     * Open connection to given storage. Send connection open comms mesasge to
-     * storage server and caches received session ID to disconnect connection
-     * gracefully at error situation.
-     *
-     * @param aHeaders connection headers.
-     * @param aStorageName storage name.
-     * @param aReceiveMessage received comms message.
-     * @throws JavaStorageException if communication fails.
-     */
-    OS_IMPORT virtual void open(const std::string& aHeaders,
-                                const std::string& aStorageName,
-                                comms::CommsMessage& aReceivedMessage)
-    throw(JavaStorageException);
-
-    /**
-     * Send close message to storage server.
-     *
-     * @param aHeaders connection headers.
-     * @param aReceiveMessage received comms message.
-     * @throws JavaStorageException if communication fails.
-     */
-    OS_IMPORT virtual void close(const std::string& aHeaders,
-                                 comms::CommsMessage& aReceivedMessage)
-    throw(JavaStorageException);
-
-    /**
-     * Send SQL statement to storage server for execution.
-     *
-     * @param aHeaders connection headers.
-     * @param aSqlStatement SQL statement.
-     * @param aReceiveMessage received comms message.
-     * @throws JavaStorageException if communication fails.
-     */
-    OS_IMPORT virtual void execute(const std::string& aHeaders,
-                                   const std::wstring& aSqlStatement,
-                                   comms::CommsMessage& aReceivedMessage)
-    throw(JavaStorageException);
-
-private:
-    /**
-     * Constructor. Initiate comms connection to storage server
-     *
-     * @throws JavaStorageException if cannot connect to storage server using
-     * comms.
-     */
-    JavaDataAccessImpl() throw(JavaStorageException);
-
-    /**
-     * Send and receive comms messages.
-     *
-     * @param aSendMessage message to be sent.
-     * @param aReceivedMessage received message.
-     * @throws JavaStorageException if communication fails. Exception is thrown
-     * if comms returns error code. Comms error code is set as exception error
-     * code.
-     */
-    void sendReceiveMessage(comms::CommsMessage& aSendMessage,
-                            comms::CommsMessage& aReceivedMessage)
-    throw(JavaStorageException);
-
-private:
-    std::auto_ptr<comms::CommsClientEndpoint> mCliConn;
-    bool mConnOpen;
-    std::string mCachedSessionID;
-};
-
-} // end namespace storage
-} // end namespace java
-
-#endif // JAVADATAACCESSIMPL_H
-
--- a/javacommons/jvms/j9utils/threaddump/build/javathreaddumper_0x2002DCD9.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/jvms/j9utils/threaddump/build/javathreaddumper_0x2002DCD9.mmp	Tue May 25 12:34:19 2010 +0300
@@ -76,6 +76,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -96,10 +109,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/jvms/nativeportlayer/build/jvmnativeport_0x2002DCDE.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/jvms/nativeportlayer/build/jvmnativeport_0x2002DCDE.mmp	Tue May 25 12:34:19 2010 +0300
@@ -78,6 +78,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -98,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/security/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/build/exports.inf	Tue May 25 12:34:19 2010 +0300
@@ -27,9 +27,12 @@
 
 #include <platform_paths.hrh>
 
-// Generic configuration interface for javasecurity cenrep settings  
-// javasecurity_2001B289.crml implementation specifics for cenrep data
-// javasecurity_2001B289.gcfml implementation specifics for genconf ml data
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS 
+../conf/javasecurity2.confml        APP_LAYER_CONFML(javasecurity.confml)
+../conf/CI_javasecurity.confml      APP_LAYER_CONFML(CI_javasecurity.confml)
+#else
 ../conf/javasecurity.confml         APP_LAYER_CONFML(javasecurity.confml)
+#endif /* RD_JAVA_S60_RELEASE_10_1_ONWARDS */
+
 ../conf/javasecurity_2001B289.crml  APP_LAYER_CRML(javasecurity_2001B289.crml)
 #endif
--- a/javacommons/security/build/javasecurity_0x2002DCCF.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/build/javasecurity_0x2002DCCF.mmp	Tue May 25 12:34:19 2010 +0300
@@ -107,6 +107,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -127,10 +139,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
Binary file javacommons/security/conf/CI_javasecurity.confml has changed
Binary file javacommons/security/conf/javasecurity2.confml has changed
--- a/javacommons/security/data/att_manufacturer.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/att_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
@@ -22,6 +22,7 @@
     permission javax.microedition.io.Connector.bluetooth.client "*" "client";
     permission javax.microedition.location.LocationPermission "location://*" "position,orientation";
     permission javax.microedition.location.LocationPermission "landmarks://*" "read,write,category,management";
+    permission javax.microedition.location.LocationPermission "proximity://*" "registerlistener";
     permission javax.microedition.apdu.aid "apdu://*" "aid";
     permission javax.microedition.apdu.sat "apdu://*" "sat";    
     permission javax.microedition.securityservice.CMSMessageSignatureService "pki://*" "authenticate";
@@ -34,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/data/att_operatorextra.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/att_operatorextra.txt	Tue May 25 12:34:19 2010 +0300
@@ -22,6 +22,7 @@
     permission javax.microedition.io.Connector.bluetooth.client "*" "client";
     permission javax.microedition.location.LocationPermission "location://*" "position,orientation";
     permission javax.microedition.location.LocationPermission "landmarks://*" "read,write,category,management";
+    permission javax.microedition.location.LocationPermission "proximity://*" "registerlistener";
     permission javax.microedition.apdu.aid "apdu://*" "aid";
     permission javax.microedition.apdu.sat "apdu://*" "sat";
     permission javax.microedition.securityservice.CMSMessageSignatureService "pki://*" "authenticate";
@@ -34,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
\ No newline at end of file
--- a/javacommons/security/data/msa_manufacturer.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/msa_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
@@ -35,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/data/msa_operator.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/msa_operator.txt	Tue May 25 12:34:19 2010 +0300
@@ -35,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/data/s60_manufacturer.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/s60_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
@@ -35,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/data/s60_operator.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/data/s60_operator.txt	Tue May 25 12:34:19 2010 +0300
@@ -35,4 +35,5 @@
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
     permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/PermissionGranter.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/PermissionGranter.java	Tue May 25 12:34:19 2010 +0300
@@ -347,6 +347,10 @@
             boolean permissions_from_sensitive_combination_list_2 = false;
             boolean local_connectivity = false;
             boolean net_access = false;
+            boolean multimedia = false;
+            boolean read_user_data = false;
+            boolean call_control = false;
+            boolean messaging = false;
             Vector blanketPermissions =
                 new Vector();
             for (int i=0; i<grantedPermissions.size(); i++)
@@ -402,11 +406,16 @@
                 else if (settings.getName().equalsIgnoreCase(
                              UserSecuritySettings.MESSAGING_SETTINGS)
                          || settings.getName().equalsIgnoreCase(
-                             UserSecuritySettings.RESTRICTED_MESSAGING_SETTINGS)
-                         || settings.getName().equalsIgnoreCase(
+                             UserSecuritySettings.RESTRICTED_MESSAGING_SETTINGS))
+                {
+                    permissions_from_sensitive_combination_list_1 = true;
+                    messaging = true;
+                }
+                else if (settings.getName().equalsIgnoreCase(
                              UserSecuritySettings.CALL_CONTROL_SETTINGS))
                 {
                     permissions_from_sensitive_combination_list_1 = true;
+                    call_control = true;
                 }
                 else if (settings.getName().equalsIgnoreCase(
                              UserSecuritySettings.LOCAL_CONNECTIVITY_SETTINGS))
@@ -415,11 +424,16 @@
                     local_connectivity = true;
                 }
                 else if (settings.getName().equalsIgnoreCase(
-                             UserSecuritySettings.MULTIMEDIA_RECORDING_SETTINGS)
-                         || settings.getName().equalsIgnoreCase(
+                             UserSecuritySettings.MULTIMEDIA_RECORDING_SETTINGS))
+                {
+                    permissions_from_sensitive_combination_list_2 = true;
+                    multimedia = true;
+                }
+                else if (settings.getName().equalsIgnoreCase(
                              UserSecuritySettings.READ_USER_DATA_ACCESS_SETTINGS))
                 {
                     permissions_from_sensitive_combination_list_2 = true;
+                    read_user_data = true;
                 }
             }
             if (!defaultNotBlanket)
@@ -442,9 +456,15 @@
             if (permissions_from_sensitive_combination_list_1
                     && permissions_from_sensitive_combination_list_2)
             {
-                String blanketPermissionsDetails = ((local_connectivity && !net_access) ? 
-                    "settings_inst_query_perm_sec" : 
-                    "settings_inst_query_perm_net");
+                String blanketPermissionsDetails = ( 
+                    ((call_control == true && multimedia == true)
+                    || (call_control == true && read_user_data == true) 
+                    || (net_access == true && multimedia == true)
+                    || (net_access == true && read_user_data == true)
+                    || (messaging == true && multimedia == true)
+                    || (messaging == true && read_user_data == true)) ? 
+                    "settings_inst_query_perm_net" : 
+                    "settings_inst_query_perm_sec");
                 iBlanketPermissionsDetails.put(msUidKey,
                                                UserSecuritySettingsImpl.getLocalizedString(
                                                    blanketPermissionsDetails));
--- a/javacommons/security/javasrc.linux/com/nokia/mj/impl/security/midp/authentication/OcspUserPreferences.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.security.midp.authentication;
-
-/**
- * Encapsulation of the ocsp settings which could be set by the user:
- *
- * <ul>
- * <li>ocspUrl: the URL of the Ocsp responder</li>
- *
- * <li>ocspMode: the mode in which the ocsp checks are done. Possible values:
- * <li>ON: the ocsp checks should be performed and some errors are tollerated (e.g. with user's approval)</li>
- * <li>MUST: the ocsp checks should be performed and no errors are tollerated</li>
- * <li>OFF: the ocsp checks should not be performed</li>
- * </ul>
- *
- */
-final class OcspUserPreferences
-{
-    // constants for the ocsp mode
-    static final int OCSP_MODE_ON = 1;
-    static final int OCSP_MODE_MUST = 2;
-    static final int OCSP_MODE_OFF = 3;
-
-    // the ocsp mode
-    private int ocspMode;
-
-    // the ocsp Url
-    private String ocspUrl = null;
-
-    OcspUserPreferences()
-    {
-        ocspMode = OCSP_MODE_OFF;
-        ocspUrl = null;
-    }
-
-    int getOcspMode()
-    {
-        return ocspMode;
-    }
-
-    public String toString()
-    {
-        StringBuffer buf = new StringBuffer();
-        buf.append("ocspMode: ").append(ocspMode);
-        buf.append(", ocspUrl: ").append(ocspUrl);
-        return buf.toString();
-    }
-
-    String getOcspUrl()
-    {
-        return ocspUrl;
-    }
-}
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java	Tue May 25 12:34:19 2010 +0300
@@ -225,6 +225,9 @@
         PERMISSION_MAPPING_TABLE.put(
             "javax.microedition.location.LandmarkPermission", new MIDPPermission(
                 "com.nokia.mj.impl.location.LocationPermission", "*"));
+       PERMISSION_MAPPING_TABLE.put(
+            "javax.microedition.midlet.AutoStartPermission", new MIDPPermission(
+                "com.nokia.mj.impl.installer.utils.AutoStartPermission", null));
     }
 
     /**
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java	Tue May 25 12:34:19 2010 +0300
@@ -455,9 +455,13 @@
                 permEntry.addAttribute(new StorageAttribute(
                                            StorageNames.CLASS,
                                            p.getName()));
-                permEntry.addAttribute(new StorageAttribute(
-                                           StorageNames.NAME,
-                                           p.getTarget()));
+                if (p.getTarget() != null
+                        && p.getTarget().length() > 0)
+                {
+                    permEntry.addAttribute(new StorageAttribute(
+                                               StorageNames.NAME,
+                                               p.getTarget()));
+                }
                 if (p.getActionList() != null
                         && p.getActionList().length() > 0)
                 {
@@ -1250,9 +1254,13 @@
                 removePermissionQuery.addAttribute(new StorageAttribute(
                                                        StorageNames.CLASS,
                                                        p.getName()));
-                removePermissionQuery.addAttribute(new StorageAttribute(
-                                                       StorageNames.NAME,
-                                                       p.getTarget()));
+                if (p.getTarget() != null
+                        && p.getTarget().length() > 0)
+                {
+                    removePermissionQuery.addAttribute(new StorageAttribute(
+                                                           StorageNames.NAME,
+                                                           p.getTarget()));
+                }
                 if (p.getActionList() != null
                         && p.getActionList().length() > 0)
                 {
--- a/javacommons/security/javaunicertstoreplugin/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/javaunicertstoreplugin/build/exports.inf	Tue May 25 12:34:19 2010 +0300
@@ -15,14 +15,12 @@
 *
 */
 
-PRJ_EXPORTS
-
+#include <platform_paths.hrh>
 #include "../../../../inc/build_defines.hrh"
 
-#ifdef RD_JAVA_SYMBIAN_TARGET
-
-#include <platform_paths.hrh>
+PRJ_EXPORTS
 
-../../../../javauis/runtimeui_akn/loc/javausermessages.loc  APP_LAYER_LOC_EXPORT_PATH(javausermessages.loc)
-
+// Export the localization file temporarily from this component in 10.1 builds
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+javausermessages.loc  APP_LAYER_LOC_EXPORT_PATH(javausermessages.loc)
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/javaunicertstoreplugin/build/javausermessages.loc	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,526 @@
+/*
+* 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:  Localised strings for Java Runtime version 2.x for S60 - Java User Messages
+*
+*/
+
+
+
+// LOCALISATION STRINGS
+
+// d:Softkey label in SK1
+// d:for accepting security prompt
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_ok "Ok"
+
+// d:Softkey label in SK2
+// d:for cancelling security prompt
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_cancel "Cancel"
+
+// d:Softkey label in SK1
+// d:for accepting a security prompt
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_yes "Yes"
+
+// d:Softkey label in SK2
+// d:for rejecting a security prompt
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_no "No"
+
+// d:Softkey label in SK2
+// d:for opening error details view
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_error_details_message "Details"
+
+// d:Access permission option in security prompt
+// d:for allowing access
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_allow "Allow"
+
+// d:Access permission option in security prompt
+// d:for denying access
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_prompt_deny "Deny"
+
+// d:Access permission option in security prompt
+// d:for allowing push registration
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_auto_invoc_allow "Allow"
+
+// d:Access permission option in security prompt
+// d:for denying push registration
+// l:control_pane_t1/opt7
+//
+#define qtn_java_secur_auto_invoc_deny "Deny"
+
+// d:Security message
+// d:for sending/receiving data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_network_usage "Allow this application to use network for sending/receiving data?"
+
+// d:Security message
+// d:for opening SMS connection
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_sms_opening_conn "Allow this application to open a SMS connection?"
+
+// d:Security message
+// d:for opening MMS connection
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_mms_opening_conn "Allow this application to open a MMS connection?"
+
+// d:Security message
+// d:for opening CBS connection
+// l:popup_info_list_pane_t2/opt1
+//
+#define	qtn_java_secur_cbs_opening_conn "Allow this application to open a CBS connection?"
+
+// d:Security message
+// d:for receiving SMSs
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_sms_receiving "Allow this application to receive SMSs?"
+
+// d:Security message
+// d:for receiving MMSs
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_mms_receiving "Allow this application to receive MMSs?"
+
+// d:Security message
+// d:for receiving CBSs
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_cbs_receiving "Allow this application to receive CBSs?"
+
+// d:Security message
+// d:for sending SMSs
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_sms_sending "Allow this application to send %0N SMSs to %1U?"
+
+// d:Security message
+// d:for sending one SMS
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_sms_single_sending "Allow this application to send SMS to %0U?"
+
+// d:Security message
+// d:for sending one MMS to one destination
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_mms_single_sending "Allow this application to send MMS?"
+
+// d:Security message
+// d:for sending one MMS to many destinations
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_mms_single_sending_multiple_destinations "Allow this application to send MMS to %0N recipients?"
+
+// d:Security message
+// d:for both sending and receving messages (SMS, MMS, CBS)
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_receive_send_messages "Allow this application to receive and send messages?"
+
+// d:Security message
+// d:for using local connectivity services
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_local_connectivity "Allow this application to use local connectivity services?"
+
+// d:Security message
+// d:for using multimedia services
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_audio_video_recording "Allow this application to access camera, video player or audio features?"
+
+// d:Security message
+// d:for allowing application registration for automatic start
+// d:during installation
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_push_registration_static "Registration for automatic start needed. Note that installation will fail if not allowed."
+
+// d:Security message
+// d:for allowing application registration for automatic start
+// d:during runtime
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_push_registration_dynamic "Registration for automatic start needed."
+
+// d:Security message
+// d:for allowing application to be automatically started
+// d:during runtime
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_auto_invocation "Allow this application to be started automatically?"
+
+// d:Security message
+// d:for reading user data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_user_data "Allow this application to read user data?"
+
+// d:Security message
+// d:for writing user data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_writing_user_data "Allow this application to write user data?"
+
+// d:Security message
+// d:for both reading and writing user data (managing user data in the device)
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_manage_user_data "Allow this application to manage user data?"
+
+// d:Security message
+// d:for reading file
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_file "Allow application to open %U?"
+
+// d:Security message
+// d:for modifying file
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_modifying_file "Allow application to modify %U?"
+
+// d:Security message
+// d:for accessing location file
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_location_data "Allow this application to access location information?"
+
+// d:Security message
+// d:for accessing landmark data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_landmark_data "Allow this application to access landmark data?"
+
+// d:Security message
+// d:for accessing smart card
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_smartcard "Allow this application to access the smart card?"
+
+// d:Security message
+// d:for accessing authentication sevices
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_auth_services_usage "Allow this application to access authentication services?"
+
+// d:Security message
+// d:for being activated by Bluetooth device
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_bluetooth_usage "Allow application to be activated by a Bluetooth device %U?"
+
+// d:Security message
+// d:for reading contacts
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_contacts "Allow application to read contacts?"
+
+// d:Security message
+// d:for modifying contacts
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_modifying_contacts "Allow application to modify contacts?"
+
+// d:Security message
+// d:for reading events
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_events "Allow application to read events?"
+
+// d:Security message
+// d:for modifying events
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_modifying_events "Allow application to modify events?"
+
+// d:Security message
+// d:for reading to-dos
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_reading_todos "Allow application to read to-dos?"
+
+// d:Security message
+// d:for modifying to-dos
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_modifying_todos "Allow application to modify to-dos?"
+
+// d:Security message
+// d:for deleting item
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_deleting_item "Allow application to delete this item from %U?"
+
+// d:Security message
+// d:for updating item
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_updating_item "Allow application to update this item from %U?"
+
+// d:Security message
+// d:for deleting category
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_deleting_category "Allow application to delete category %0U from %1U?"
+
+// d:Security message
+// d:for updating category
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_updating_category "Allow application to update category %0U from %1U?"
+
+// d:Security message
+// d:for deleting item
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_deleting_unnamed_item "Allow application to delete unnamed item from %U?"
+
+// d:Security message
+// d:for updating item
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_updating_unnamed_item "Allow application to update unnamed item in %U?"
+
+// d:Security message
+// d:for adding calendar
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_adding_calendar "Allow application to create a new calendar?"
+
+// d:Security message
+// d:for deleting calendar
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_deleting_calendar "Allow application to delete the calendar file %U?"
+
+// d:Security message
+// d:for listing calendars
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_listing_calendars "Allow application to list the calendars available on phone?"
+
+// d:Security message
+// d:for using orientation data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_orientation_data_usage "Allow application to use orientation data?"
+
+// d:Security message
+// d:for using positioning data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_positioning_data_usage "Allow application to use positioning data?"
+
+// d:Security message
+// d:for using landmarks data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_landmark_data_usage "Allow application to use landmarks data?"
+
+// d:Security message
+// d:for registering proximity listener
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_proximity_listener_registration "Allow application to register a proximity listener?"
+
+// d:Security message
+// d:for accessing broadcasting data
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_tv_broadcast_user_data_access "Allow application to access TV broadcast user data?"
+
+// d:Security message
+// d:for allowing application to write into a NDEF tag (Near Field Communication)
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_nfc_ndef_tag_write "Allow application to write into a tag?"
+
+// d:Security message
+// d:for allowing application to start another application via an URL.
+// d:Displayed after user has selected an URL, e.g. in a text editor (like SMS editor)
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_url_start "Allow this application to be started?"
+
+// d:Title for certificate management
+// d:for disabling certificate
+// l:heading_pane_t1
+//
+#define qtn_java_secur_cert_disabling_title "Certificate management"
+
+// d:Certificate management message
+// d:for disabling certificate
+// l:popup_note_window
+//
+#define qtn_java_secur_cert_disabling "Disabling a certificate may prevent you from installing or running some applications. Continue?"
+
+// d:Certificate management message
+// d:for deleting certificate
+// l:popup_note_window
+//
+#define qtn_java_secur_cert_deleting "Deleting a certificate may prevent you from installing or running some applications. Continue?"
+
+// d:Security message for platform message
+// d:for using network
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_network_usage_via_plat_req "Allow application to use network for sending/receiving data?"
+
+// d:Security message for platform message
+// d:for starting another application
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_app_launch_via_plat_req "Allow application to start an application?"
+
+// d:System notification
+// d:for application start failure
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_system_app_cannot_start "Application start-up failed."
+
+// d:Runtime error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_runtime_error_unhandled "Application error. Application will be closed."
+
+// d:Runtime error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_runtime_error_unhandled_details "Unhandled error. %U"
+
+// d:Security error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_jar_tampered "The application has been tampered."
+
+// d:Security error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_cert_not_available "The certificate is not available."
+
+// d:Security error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_unexpected_err "Unexpected error."
+
+// d:Security error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_net_restr_violation "Network restriction violation."
+
+// d:Security error message:
+// d:short error message - DRM rights are not valid or have expired or have not been received yet
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_drm_rights_not_valid "No digital rights to launch application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_jar_tampered_details "The application's deployment package has been modified. Application is not trusted anymore therefore it can not be used. You may want to uninstall the application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_cert_disabled "The certificate used to authenticate the application has been disabled. You may want to enable the certificate or uninstall the application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_cert_deleted "The certificate used to authenticate the application has been deleted therefore the application can not be used anymore. You should uninstall the application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_sim_changed "The certificate used to authenticate the application resides on a SIM which is not currently available. You may want to reinsert the correct SIM or uninstall the application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_unidentified_application "The application can not be identified. You may want to uninstall the application."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_net_restr_violation_details "The application is not allowed to be executed within the current network. This is due to roaming or SIM change."
+
+// d:Security error message:
+// d:short error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_ocsp_general "Online certificate check failed."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_ocsp_general_details "The revocation state of the certificate used to sign the application could not be determined."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_ocsp_settings "The online revocation checking of the certificate used to sign the application could not be conducted. Check your settings."
+
+// d:Security error message:
+// d:detailed error message
+// l:popup_info_list_pane_t1
+//
+#define qtn_java_secur_error_ocsp_revoked "The certificate used to sign the application has been revoked either permanently or temporarily (on hold)."
+
+// d:Title for security warning
+// d:general purpose
+// l:heading_pane_t1
+//
+#define qtn_java_secur_general_warning "Security warning"
+
+// d:Security ocsp warning message:
+// d:ocsp warning message
+// l:popup_info_list_pane_t2/opt1
+//
+#define qtn_java_secur_ocsp_warning "Unable to verify supplier. Continue anyway?"
+
+
+
+// End of File
--- a/javacommons/security/src.linux/fileutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include <stdlib.h>
-#include "fileutils.h"
-#include "javajniutils.h"
-#include "com_nokia_mj_impl_security_midp_authentication_AuthenticationModule.h"
-
-using namespace java::security;
-
-char * FileUtils::computeDigest(const char* aFileName)
-{
-    return NULL;
-}
-
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_security_midp_authentication_AuthenticationModule__1drmDecryptAndComputeHash
-(JNIEnv * env, jobject, jstring appJARPath)
-{
-    return NULL;
-}
-
--- a/javacommons/security/src.linux/fileutils.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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:
-*
-*/
-#ifndef FILEUTILS_H
-#define FILEUTILS_H
-
-namespace java
-{
-namespace security
-{
-
-class FileUtils
-{
-public:
-    static char * computeDigest(const char*);
-};
-
-} //end namespace security
-} //end namespace java
-
-#endif // FILEUTILS_H
-
--- a/javacommons/security/src.linux/generalsecuritysettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "javajniutils.h"
-#include "com_nokia_mj_impl_security_midp_common_GeneralSecuritySettings.h"
-
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_security_midp_common_GeneralSecuritySettings__1getSecurityPolicy
-(JNIEnv *, jclass)
-{
-    return NULL;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_security_midp_common_GeneralSecuritySettings__1getDefaultSecurityWarningsMode
-(JNIEnv *, jclass)
-{
-    return -1;
-}
--- a/javacommons/security/src.linux/ocspchecker.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "javajniutils.h"
-#include "com_nokia_mj_impl_security_midp_authentication_OcspChecker.h"
-#include "ocspclient.h"
-
-using namespace java::security;
-using namespace std;
-
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1createNativeThread
-(JNIEnv *, jobject)
-{
-    return 0;
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1destroyNativeThread
-(JNIEnv *, jobject, jint)
-{
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1createNativePeer
-(JNIEnv * env, jobject, jint aNativeThreadHandle, jlong iap, jlong snap, jstring jOcspDefaultUrl)
-{
-    OcspClient * ocspClient = NULL;
-    const char* ocspDefaultUrl = NULL;
-    if (jOcspDefaultUrl != NULL)
-    {
-        jboolean isCopy;
-        ocspDefaultUrl = env->GetStringUTFChars(jOcspDefaultUrl, &isCopy);
-        ocspClient = OcspClient::createInstance(iap, ocspDefaultUrl);
-    }
-    else
-    {
-        ocspClient = OcspClient::createInstance(iap, NULL);
-    }
-    return reinterpret_cast<int>(ocspClient);
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1destroyNativePeer
-(JNIEnv *, jobject, jint aNativeThreadHandle, jint aNativePeerHandle)
-{
-    OcspClient* ocspClient =
-        reinterpret_cast< OcspClient* >(aNativePeerHandle);
-    delete ocspClient;
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1ocspChecks
-(JNIEnv * env, jobject, jint aNativeThreadHandle, jint aNativePeerHandle, jobjectArray ocspData)
-{
-    if (ocspData == NULL)
-    {
-        return;
-    }
-    // do the OCSP check for each of the cert chains
-    OcspClient* ocspClient =
-        reinterpret_cast< OcspClient* >(aNativePeerHandle);
-    jint len = env->GetArrayLength(ocspData);
-    jboolean isCopy;
-    for (int i=0; i<len; i++)
-    {
-        jobject jOcspData = env->GetObjectArrayElement(ocspData, i);
-        jclass ocspDataClass = env->GetObjectClass(jOcspData);
-        jmethodID getCertChainMethod = env->GetMethodID(
-                                           ocspDataClass,"getCertChain", "()[Ljava/lang/String;");
-        jmethodID setIndividualResponsesMethod = env->GetMethodID(
-                    ocspDataClass,"setIndividualResponses", "([I)V");
-        jmethodID setSummaryMethod = env->GetMethodID(
-                                         ocspDataClass,"setSummary", "(I)V");
-        jobjectArray jCertChain = (jobjectArray)env->CallObjectMethod(
-                                      jOcspData, getCertChainMethod);
-        jint certChainLen = env->GetArrayLength(jCertChain);
-        const char** certChain = new const char* [certChainLen];
-        for (int j=0; j<certChainLen; j++)
-        {
-            jstring jCert  = (jstring)env->GetObjectArrayElement(jCertChain, j);
-            const char *cert =  env->GetStringUTFChars(jCert, &isCopy);
-            certChain[j] = cert;
-        }
-        // do the actual OCSP check for the current cert chain
-        ocspClient->startOcspCheck(certChain, certChainLen);
-        OcspResponse ocspResponse = ocspClient->getOcspCheckResponse();
-        env->CallVoidMethod(jOcspData, setSummaryMethod, ocspResponse.iSummary);
-        if (ocspResponse.iIndividualResponses.size() > 0)
-        {
-            int size = ocspResponse.iIndividualResponses.size();
-            jint* tmp = new jint[size];
-            for (int j=0; j<size; j++)
-            {
-                tmp[j] = ocspResponse.iIndividualResponses[j];
-            }
-            jintArray individualResponses = (jintArray)env->NewIntArray(size);
-            env->SetIntArrayRegion((jintArray)individualResponses,(jsize)0,(jsize)size,tmp);
-            // set the individual responses
-            env->CallVoidMethod(jOcspData, setIndividualResponsesMethod, individualResponses);
-            delete[] tmp;
-        }
-        // cleanup
-        for (int j=0; j<certChainLen; j++)
-        {
-            jstring jCert  = (jstring)env->GetObjectArrayElement(jCertChain, j);
-            env->ReleaseStringUTFChars(jCert,certChain[j]);
-        }
-        delete[] certChain;
-    }
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_security_midp_authentication_OcspChecker__1cancelOcspChecks
-(JNIEnv *, jobject, jint aNativeThreadHandle, jint aNativePeerHandle)
-{
-    OcspClient* ocspClient =
-        reinterpret_cast< OcspClient* >(aNativePeerHandle);
-    ocspClient->cancelOcspCheck(true);
-}
--- a/javacommons/security/src.linux/ocspclient.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "ocspclient.h"
-
-using namespace java::security;
-using namespace std;
-
-OcspClient* OcspClient::createInstance(long iap, const char* defaultUrl)
-{
-    return new OcspClient();
-}
-void OcspClient::startOcspCheck(const char ** certChain, int certChainLen)
-{
-}
-
-OcspResponse OcspClient::getOcspCheckResponse()
-{
-    OcspResponse response;
-    response.iSummary = RESPONSE_GOOD;
-    return response;
-}
-
-void OcspClient::cancelOcspCheck(bool doCleanup)
-{
-}
--- a/javacommons/security/src.linux/ocspclient.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef OCSPCLIENT_H
-#define OCSPCLIENT_H
-
-#include "ocspchecker.h"
-#include <vector>
-
-namespace java
-{
-namespace security
-{
-
-class OcspResponse
-{
-
-public:
-
-    int iSummary;
-    std::vector<int> iIndividualResponses;
-};
-
-class OcspClient
-{
-public:
-    static OcspClient* createInstance(long iap, const char* defaultUrl);
-    void startOcspCheck(const char **, int);
-    OcspResponse getOcspCheckResponse();
-    void cancelOcspCheck(bool doCleanup);
-};
-
-} //end namespace security
-} //end namespace java
-
-#endif // OCSPCLIENT_H
--- a/javacommons/security/src.linux/telutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "telutils.h"
-
-using namespace java::security;
-
-TelUtils* TelUtils::createInstance()
-{
-    return new TelUtils();
-}
-
-void TelUtils::getNetworkCodes(std::string& mnc, std::string& mcc)
-{
-    //JELOG2(EUtils);
-    mnc += "000";
-    mcc += "000";
-}
-
-void TelUtils::getImei(std::string& imei)
-{
-    //JELOG2(EUtils);
-    imei += "000000000000000";
-}
--- a/javacommons/security/src.linux/telutils.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef TELUTILS_H
-#define TELUTILS_H
-
-#include <string>
-
-namespace java
-{
-namespace security
-{
-
-class TelUtils
-{
-public:
-    static TelUtils* createInstance();
-    void getNetworkCodes(std::string& mnc, std::string& mcc);
-    void getImei(std::string& imei);
-};
-
-} //end namespace security
-} //end namespace java
-
-#endif // TELUTILS_H
--- a/javacommons/security/src/utils/securityutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/src/utils/securityutils.cpp	Tue May 25 12:34:19 2010 +0300
@@ -494,18 +494,15 @@
     authInfo->signature = new char[sig_len];
     BIO * b64 = BIO_new(BIO_f_base64());
     BIO * mem = BIO_new_mem_buf((char *)sig, sig_len);
-    if ((NULL == b64) || (NULL == mem))
-    {
-        env->ReleaseStringUTFChars(signature,sig);
-        delete[] jcert;
-        jcert = NULL;
+    if (b64 && mem)
+    {    
+        BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
+        BIO_set_close(b64, BIO_CLOSE);
+        BIO_set_close(mem, BIO_CLOSE);
+        mem = BIO_push(b64, mem);
+        authInfo->signature_len = BIO_read(mem, authInfo->signature, sig_len);
+        BIO_free_all(mem);
     }
-    BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
-    BIO_set_close(b64, BIO_CLOSE);
-    BIO_set_close(mem, BIO_CLOSE);
-    mem = BIO_push(b64, mem);
-    authInfo->signature_len = BIO_read(mem, authInfo->signature, sig_len);
-    BIO_free_all(mem);
     env->ReleaseStringUTFChars(signature,sig);
     delete[] jcert;
     jcert = NULL;
--- a/javacommons/security/tsrc/data/policies/test_manufacturer.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
@@ -33,4 +33,5 @@
 }
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/tsrc/data/policies/test_operator.txt	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_operator.txt	Tue May 25 12:34:19 2010 +0300
@@ -33,4 +33,5 @@
 }
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
+    permission javax.microedition.midlet.AutoStartPermission;
 }
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionGranterTests.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionGranterTests.java	Tue May 25 12:34:19 2010 +0300
@@ -262,7 +262,7 @@
         grantedPermissions = storage.readGrantedPermissions(appUID);
         assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Manufacturer", new String[]
                                            {
-                                               INTERNAL_DATAGRAM_PERMISSION, INTERNAL_COMM_PERMISSION, INTERNAL_SOCKET_PERMISSION,INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission"
+                                               INTERNAL_DATAGRAM_PERMISSION, INTERNAL_COMM_PERMISSION, INTERNAL_SOCKET_PERMISSION,INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"
                                            }),
                                            getDefaultPermissions()));
         // 1.1 Legacy, signed: P1, P2 requested in the JAD, P3, P4 requested in the JAR -> grant the requested permissions filled in with right targets/actions from the policy
@@ -368,7 +368,7 @@
         grantedPermissions = storage.readGrantedPermissions(appUID);
         assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[]
                                            {
-                                               INTERNAL_SOCKET_PERMISSION, INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission"
+                                               INTERNAL_SOCKET_PERMISSION, INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"
                                            }),
                                            getDefaultPermissions()));
         // 3. Legacy, signed : permissions NOT requested in JAD & permissions NOT requested in JAR -> grant only the "assigned" permissions
@@ -410,7 +410,7 @@
         securityAttributes.addManifestAttributes(allAttributes);
         permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
         grantedPermissions = storage.readGrantedPermissions(appUID);
-        assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[] {"javax.microedition.PropertyPermission"}),
+        assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[] {"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"}),
                                            getDefaultPermissions()));
         // 4. Legacy, unsigned : permissions requested in JAD & permissions requested in JAR -> ignore requested permissions and
         //    grant all the permissions available in the policy for untrusted MIDlets
@@ -775,7 +775,8 @@
                        new MIDPPermission(INTERNAL_SSL_PERMISSION,"ssl://*.sun.com"),
                        new MIDPPermission(INTERNAL_DATAGRAM_PERMISSION,"datagram://12345"),
                        new MIDPPermission(INTERNAL_COMM_PERMISSION, "comm:123"),
-                       new MIDPPermission("javax.microedition.PropertyPermission", "mobinfo.msisdn", "read")
+                       new MIDPPermission("javax.microedition.PropertyPermission", "mobinfo.msisdn", "read"),
+                       new MIDPPermission("javax.microedition.midlet.AutoStartPermission", null)
                    },
                    getDefaultPermissions()));
         // 18. identified third party (some assigned permissions exist)
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java	Tue May 25 12:34:19 2010 +0300
@@ -88,6 +88,7 @@
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.msisdn","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.publicinfo","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.cellid","read",null),
+        new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.AutoStartPermission"),null,null,null),
     };
     static final SecurityPolicyPermission[] OPERATOR_PERMS =
     {
@@ -140,6 +141,7 @@
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.msisdn","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.publicinfo","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.cellid","read",null),
+        new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.AutoStartPermission"),null,null,null),
     };
     static final SecurityPolicyPermission[] IDENTIFIED_THIRD_PARTY_PERMS =
     {
--- a/javacommons/utils/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/build/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -44,39 +44,7 @@
   <!-- Setting all classes to be visible to everybody -->
   <target name="create.internal.api.jar">
     <omj.internal.apis includes=
-                 "com/nokia/mj/impl/utils/Attribute.class,
-                  com/nokia/mj/impl/utils/AttributeReader.class,
-                  com/nokia/mj/impl/utils/Base64.class,
-                  com/nokia/mj/impl/utils/BufferedReader.class,
-                  com/nokia/mj/impl/utils/DebugUtils.class,
-                  com/nokia/mj/impl/utils/ErrorMessageBase.class,
-                  com/nokia/mj/impl/utils/Formatter.class,
-                  com/nokia/mj/impl/utils/InstallerDetailedErrorMessage.class,
-                  com/nokia/mj/impl/utils/InstallerErrorMessage.class,
-                  com/nokia/mj/impl/utils/JadReader.class,
-                  com/nokia/mj/impl/utils/JarManifestReader.class,
-                  com/nokia/mj/impl/utils/JavaLanguageSyntaxChecker.class,
-                  com/nokia/mj/impl/utils/LineReader.class,
-                  com/nokia/mj/impl/utils/LocalizedTextProvider.class,
-                  com/nokia/mj/impl/utils/Logger.class,
-                  com/nokia/mj/impl/utils/ManifestReader.class,
-                  com/nokia/mj/impl/utils/MidpAttributeValidator.class,
-                  com/nokia/mj/impl/utils/OsErrorMessage.class,
-                  com/nokia/mj/impl/utils/OtaStatusCode.class,
-                  com/nokia/mj/impl/utils/ResourceLoader.class,
-                  com/nokia/mj/impl/utils/ResourceUtil.class,
-                  com/nokia/mj/impl/utils/StartUpTrace.class,
-                  com/nokia/mj/impl/utils/StreamUtils.class,
-                  com/nokia/mj/impl/utils/Task.class,
-                  com/nokia/mj/impl/utils/TaskQueue.class,
-                  com/nokia/mj/impl/utils/TextUtil.class,
-                  com/nokia/mj/impl/utils/Tokenizer.class,
-                  com/nokia/mj/impl/utils/Uid.class,
-                  com/nokia/mj/impl/utils/Version.class,
-                  com/nokia/mj/impl/utils/exception/InvalidAttributeException.class,
-                  com/nokia/mj/impl/utils/exception/InstallerExceptionBase.class,
-                  com/nokia/mj/impl/utils/exception/ExceptionBase.class,
-                  com/nokia/mj/impl/utils/exception/UserCancelException.class,
+                 "com/nokia/mj/impl/utils/**/*.class,
                   com/nokia/mj/impl/rt/legacy/LegacySupport.class,
                   com/nokia/mj/impl/rt/support/ApplicationInfo.class,
                   com/nokia/mj/impl/rt/support/ApplicationUtils.class,
--- a/javacommons/utils/build/bwins/javautilsu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/build/bwins/javautilsu.def	Tue May 25 12:34:19 2010 +0300
@@ -112,26 +112,20 @@
 	??0ExceptionBase@util@java@@QAE@HHABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@4@1H@Z @ 111 NONAME ; java::util::ExceptionBase::ExceptionBase(int, int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
 	??0ExceptionBase@util@java@@QAE@HHABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 112 NONAME ; java::util::ExceptionBase::ExceptionBase(int, int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
 	?what@ExceptionBase@util@java@@UBEPBDXZ @ 113 NONAME ; char const * java::util::ExceptionBase::what(void) const
-	??_EFunctionServer@util@java@@UAE@I@Z @ 114 NONAME ; java::util::FunctionServer::~FunctionServer(unsigned int)
-	??0ExceptionBase@util@java@@QAE@ABV012@@Z @ 115 NONAME ; java::util::ExceptionBase::ExceptionBase(class java::util::ExceptionBase const &)
-	?doDetachFromVm@FunctionServer@util@java@@AAEHXZ @ 116 NONAME ; int java::util::FunctionServer::doDetachFromVm(void)
-	??0LibraryLoaderException@util@java@@QAE@HHABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 117 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(int, int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	??0ExceptionBase@util@java@@QAE@HABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 118 NONAME ; java::util::ExceptionBase::ExceptionBase(int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	?doAttachToVm@FunctionServer@util@java@@AAEHPAUJavaVM_@@PAV_jobject@@@Z @ 119 NONAME ; int java::util::FunctionServer::doAttachToVm(struct JavaVM_ *, class _jobject *)
-	??0LibraryLoaderException@util@java@@QAE@HABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 120 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	?executeInServerThread@FunctionServer@util@java@@AAEHABVFunctor@@@Z @ 121 NONAME ; int java::util::FunctionServer::executeInServerThread(class Functor const &)
-	??_EExceptionBase@util@java@@UAE@I@Z @ 122 NONAME ; java::util::ExceptionBase::~ExceptionBase(unsigned int)
-	?init@FunctionServer@util@java@@AAEXXZ @ 123 NONAME ; void java::util::FunctionServer::init(void)
-	??0ExceptionBase@util@java@@QAE@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@4@1H@Z @ 124 NONAME ; java::util::ExceptionBase::ExceptionBase(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	??_ELibraryLoaderException@util@java@@UAE@I@Z @ 125 NONAME ; java::util::LibraryLoaderException::~LibraryLoaderException(unsigned int)
-	??1ExceptionBase@util@java@@UAE@XZ @ 126 NONAME ; java::util::ExceptionBase::~ExceptionBase(void)
-	??0ExceptionBase@util@java@@QAE@HABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@4@1H@Z @ 127 NONAME ; java::util::ExceptionBase::ExceptionBase(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	??0ExceptionBase@util@java@@QAE@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 128 NONAME ; java::util::ExceptionBase::ExceptionBase(class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	?serverThreadEntryPoint@FunctionServer@util@java@@CAPAXPAX@Z @ 129 NONAME ; void * java::util::FunctionServer::serverThreadEntryPoint(void *)
-	??0LibraryLoaderException@util@java@@QAE@ABV012@@Z @ 130 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(class java::util::LibraryLoaderException const &)
-	??0RuntimeException@runtime@java@@QAE@ABV012@@Z @ 131 NONAME ; java::runtime::RuntimeException::RuntimeException(class java::runtime::RuntimeException const &)
-	??0RuntimeException@runtime@java@@QAE@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 132 NONAME ; java::runtime::RuntimeException::RuntimeException(class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
-	??_ERuntimeException@runtime@java@@UAE@I@Z @ 133 NONAME ; java::runtime::RuntimeException::~RuntimeException(unsigned int)
-	??1RuntimeException@runtime@java@@UAE@XZ @ 134 NONAME ; java::runtime::RuntimeException::~RuntimeException(void)
-	?toString@RuntimeException@runtime@java@@UBE?AV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ @ 135 NONAME ; class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > java::runtime::RuntimeException::toString(void) const
+	??0ExceptionBase@util@java@@QAE@ABV012@@Z @ 114 NONAME ; java::util::ExceptionBase::ExceptionBase(class java::util::ExceptionBase const &)
+	??0LibraryLoaderException@util@java@@QAE@HHABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 115 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(int, int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??0ExceptionBase@util@java@@QAE@HABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 116 NONAME ; java::util::ExceptionBase::ExceptionBase(int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??0LibraryLoaderException@util@java@@QAE@HABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 117 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(int, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??_EExceptionBase@util@java@@UAE@I@Z @ 118 NONAME ; java::util::ExceptionBase::~ExceptionBase(unsigned int)
+	??0ExceptionBase@util@java@@QAE@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@4@1H@Z @ 119 NONAME ; java::util::ExceptionBase::ExceptionBase(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??_ELibraryLoaderException@util@java@@UAE@I@Z @ 120 NONAME ; java::util::LibraryLoaderException::~LibraryLoaderException(unsigned int)
+	??1ExceptionBase@util@java@@UAE@XZ @ 121 NONAME ; java::util::ExceptionBase::~ExceptionBase(void)
+	??0ExceptionBase@util@java@@QAE@HABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@4@1H@Z @ 122 NONAME ; java::util::ExceptionBase::ExceptionBase(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??0ExceptionBase@util@java@@QAE@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 123 NONAME ; java::util::ExceptionBase::ExceptionBase(class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??0LibraryLoaderException@util@java@@QAE@ABV012@@Z @ 124 NONAME ; java::util::LibraryLoaderException::LibraryLoaderException(class java::util::LibraryLoaderException const &)
+	??0RuntimeException@runtime@java@@QAE@ABV012@@Z @ 125 NONAME ; java::runtime::RuntimeException::RuntimeException(class java::runtime::RuntimeException const &)
+	??0RuntimeException@runtime@java@@QAE@ABV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z @ 126 NONAME ; java::runtime::RuntimeException::RuntimeException(class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > const &, int)
+	??_ERuntimeException@runtime@java@@UAE@I@Z @ 127 NONAME ; java::runtime::RuntimeException::~RuntimeException(unsigned int)
+	??1RuntimeException@runtime@java@@UAE@XZ @ 128 NONAME ; java::runtime::RuntimeException::~RuntimeException(void)
+	?toString@RuntimeException@runtime@java@@UBE?AV?$basic_string@DV?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ @ 129 NONAME ; class std::basic_string<char, class std::char_traits<char>, class std::allocator<char> > java::runtime::RuntimeException::toString(void) const
 
--- a/javacommons/utils/build/javautils.pro	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/build/javautils.pro	Tue May 25 12:34:19 2010 +0300
@@ -37,7 +37,7 @@
                ../src.s60/*.cpp \
 
       LIBS += -lflogger -lplatformver -lsysversioninfo -lsysutil -lbafl \
-              -lefsrv -ljavaenv -lhal -llibcrypto -lcommonengine -lplatformenv
+              -lefsrv -ljavaenvinfo -lhal -llibcrypto -lcommonengine -lplatformenv
 
     !contains(PROJECT_DEFINES,RD_JAVA_UI_QT) {
         LIBS += -lavkon
--- a/javacommons/utils/build/javautils_0x2002DCDA.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/build/javautils_0x2002DCDA.mmp	Tue May 25 12:34:19 2010 +0300
@@ -110,7 +110,7 @@
 LIBRARY		sysutil.lib
 LIBRARY		bafl.lib
 LIBRARY		efsrv.lib
-LIBRARY		javaenv.lib
+LIBRARY		javaenvinfo.lib
 LIBRARY		hal.lib
 LIBRARY		libcrypto.lib
 LIBRARY		commonengine.lib
@@ -122,6 +122,16 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -142,10 +152,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javacommons/utils/functionserver/inc/functionserver.h	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/functionserver/inc/functionserver.h	Tue May 25 12:34:19 2010 +0300
@@ -45,7 +45,7 @@
  * See usage example from \javaextensions\jsr\midp\push\pushregistryplugin\src.s60
  * directory.
  */
-class OS_IMPORT FunctionServer
+class FunctionServer
 {
 
 public:
--- a/javacommons/utils/inc.linux/javaosheaders.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef JAVAOSHEADERS_H
-#define JAVAOSHEADERS_H
-
-#ifndef OS_EXPORT
-#define OS_EXPORT
-#endif
-
-#ifndef OS_IMPORT
-#define OS_IMPORT
-#endif
-
-#ifndef OS_NONSHARABLE_CLASS
-#define OS_NONSHARABLE_CLASS(__x__) class __x__
-#endif
-#ifndef OS_NONSHARABLE_STRUCT
-#define OS_NONSHARABLE_STRUCT(__x__) struct __x__
-#endif
-
-#endif // JAVAOSHEADERS_H
--- a/javacommons/utils/inc.linux/jdebug_omj.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +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:
-*
-*/
-
-#ifndef JDEBUG_OMJ_H
-#define JDEBUG_OMJ_H
-
-#ifdef LOGGING_ON
-#include <stdio.h>
-
-#define DEBUG( msg ) printf(msg "\n");
-#define DEBUG_STR( msg, string ) printf( msg "\n", string);
-#define DEBUG_STR_INT( msg, string, num ) printf(msg "\n", string, num);
-#define DEBUG_INT( msg, num ) printf(msg, "\n", num);
-#define DEBUG_INT2( msg, num, num2 ) printf(msg "\n", num, num2 );
-#define DEBUG_INT3( msg, num, num2, num3 ) printf(msg "\n", num, num2, num3 );
-#define DEBUG_INT4( msg, num, num2, num3, num4 ) printf(msg "\n", num, num2, num3, num4);
-#define DEBUG_INT5( msg, num, num2, num3, num4, num5) printf(msg "\n", num, num2, num3, num4, num5);
-#define DEBUG_INT6( msg, num, num2, num3, num4, num5, num6 ) printf(msg "\n", num, num2, num3, num4, num5, num6 );
-
-#else // LOGGING_ON
-
-#define DEBUG( msg )
-#define DEBUG_STR( msg, string )
-#define DEBUG_STR_INT( msg, string )
-#define DEBUG_INT( msg, num )
-#define DEBUG_INT2( msg, num, num2 )
-#define DEBUG_INT3( msg, num, num2, num3 )
-#define DEBUG_INT4( msg, num, num2, num3, num4 )
-#define DEBUG_INT5( msg, num, num2, num3, num4, num5 )
-#define DEBUG_INT6( msg, num, num2, num3, num4, num5, num6 )
-#endif // LOGGING_ON
-
-#define ERROR( msg ) printf(msg "\n");
-#define ERROR_INT( msg, num ) printf(msg "\n", num);
-#define ERROR_STR( msg, str ) printf(msg "\n", str);
-
-#endif // JDEBUG_OMJ_H
-
--- a/javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/SystemPropertyProperties.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/SystemPropertyProperties.java	Tue May 25 12:34:19 2010 +0300
@@ -33,7 +33,11 @@
  */
 
 public class SystemPropertyProperties extends Properties
+                                      implements DynamicProperty
 {
+    /** Storage place for user defined properties. */
+    private Properties mUserProperties = new Properties(); 
+
     public SystemPropertyProperties(Hashtable originalProperties)
     {
         // Store the original properties
@@ -58,9 +62,12 @@
      */
     public Object get(Object name)
     {
-        return SystemPropertyUtils.solvePropertyValue(name,
-                super.get(name),
-                this);
+        Object val = super.get(name);
+        if (val != null)
+        {
+            return SystemPropertyUtils.solvePropertyValue(name, val, this);
+        }
+        return mUserProperties.get(name);
     }
 
 
@@ -88,13 +95,19 @@
     }
 
     /**
-     * A workaround for calling directly put method of the Hashtable. This
-     * method is meant to be used in occasion where the escaping of ':'
-     * done by overriden put method is unwanted behvior.
+     * Adds the defined system property to Hashtable containing all the system
+     * properties without escaping any leading colon.
      */
-    public Object basePut(Object key, Object value)
+    public Object setSystemProperty(Object key, Object value)
     {
         return super.put(key, value);
     }
 
+    /**
+     * Adds the defined system property to Hashtable containing all the user
+     */
+    public Object setUserProperty(Object key, Object value)
+    {
+        return mUserProperties.put(key, value);
+    }
 }
--- a/javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/sun/JvmPortJ2se.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/javasrc.cdc/com/nokia/mj/impl/rt/sun/JvmPortJ2se.java	Tue May 25 12:34:19 2010 +0300
@@ -101,7 +101,7 @@
                                     name = line.substring(2,pos);
                                     value = line.substring(pos+1);
                                 }
-                                newProperties.basePut(name, value);
+                                newProperties.setSystemProperty(name, value);
                             }
                         }
                     }
--- a/javacommons/utils/javasrc.linux/com/nokia/mj/impl/utils/OsErrorMessage.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class for framing error string specific to linux error codes
-*
-*/
-
-package com.nokia.mj.impl.utils;
-
-import java.util.Hashtable;
-
-/**
- * Base class for classes defining localized error messages.
- *
- * @author Nokia Corporation
- * @version 1.0
- * @see InstallerExceptionBase
- */
-public final class OsErrorMessage
-{
-    /**
-     * OS success error code.
-     */
-    public static final int SUCCESS = 0;
-
-    /**
-     * Mapping between OS error codes and OS error string
-     */
-    private static Hashtable messageTable = null;
-
-    /**
-     * Initialization of the mapping.
-     */
-    static
-    {
-        messageTable = new Hashtable();
-        messageTable.put(new Integer(SUCCESS), " Success");
-        messageTable.put(new Integer(1), " Operation not permitted");
-        messageTable.put(new Integer(2), " No such file or directory");
-        messageTable.put(new Integer(3), " No such process");
-        messageTable.put(new Integer(4), " Interrupted systemcall");
-        messageTable.put(new Integer(5), " Input/outputerror");
-        messageTable.put(new Integer(6), " No such device or address");
-        messageTable.put(new Integer(7), " Argument list too long");
-        messageTable.put(new Integer(8), " Exec format error");
-        messageTable.put(new Integer(9), " Bad file descriptor");
-        messageTable.put(new Integer(10), " No child processes");
-        messageTable.put(new Integer(11), " Resource temporarily unavailable");
-        messageTable.put(new Integer(12), " Cannot allocate memory");
-        messageTable.put(new Integer(13), " Permission denied");
-        messageTable.put(new Integer(14), " Bad address");
-        messageTable.put(new Integer(15), " Block device required");
-        messageTable.put(new Integer(16), " Device or resource busy");
-        messageTable.put(new Integer(17), " File exists");
-        messageTable.put(new Integer(18), " Invalid cross-devicelink");
-        messageTable.put(new Integer(19), " No such device");
-        messageTable.put(new Integer(20), " Not a directory");
-        messageTable.put(new Integer(21), " Is a directory");
-        messageTable.put(new Integer(22), " Invalid argument");
-        messageTable.put(new Integer(23), " Too many openfiles in system");
-        messageTable.put(new Integer(24), " Too many open files");
-        messageTable.put(new Integer(25), " Inappropriate ioctl for device");
-        messageTable.put(new Integer(26), " Text file busy");
-        messageTable.put(new Integer(27), " File too large");
-        messageTable.put(new Integer(28), " No space left on device");
-        messageTable.put(new Integer(29), " Illegal seek");
-        messageTable.put(new Integer(30), " Read-only file system");
-        messageTable.put(new Integer(31), " Too many links");
-        messageTable.put(new Integer(32), " Broken pipe");
-        messageTable.put(new Integer(33), " Numerical argument out of domain");
-        messageTable.put(new Integer(34), " Numerical result out of range");
-        messageTable.put(new Integer(35), " Resource deadlock avoided");
-        messageTable.put(new Integer(36), " Filename too long");
-        messageTable.put(new Integer(37), " No locks available");
-        messageTable.put(new Integer(38), " Function not implemented");
-        messageTable.put(new Integer(39), " Directory not empty");
-        messageTable.put(new Integer(40), " Too many levels of symbolic links");
-        messageTable.put(new Integer(41), " Operation would block");
-        messageTable.put(new Integer(42), " Nomessage of desired type");
-        messageTable.put(new Integer(43), " Identifier removed");
-        messageTable.put(new Integer(44), " Channel number out of range");
-        messageTable.put(new Integer(45), " Level2 not synchronized");
-        messageTable.put(new Integer(46), " Level3 halted");
-        messageTable.put(new Integer(47), " Level3 reset");
-        messageTable.put(new Integer(48), " Link number out of range");
-        messageTable.put(new Integer(49), " Protocol driver not attached");
-        messageTable.put(new Integer(50), " No CSI structure available");
-        messageTable.put(new Integer(51), " Level2 halted");
-        messageTable.put(new Integer(52), " Invalid exchange");
-        messageTable.put(new Integer(53), " Invalid request descriptor");
-        messageTable.put(new Integer(54), " Exchange full");
-        messageTable.put(new Integer(55), " No anode");
-        messageTable.put(new Integer(56), " Invalid request code");
-        messageTable.put(new Integer(57), " Invalid slot");
-        messageTable.put(new Integer(58), " Resource deadlock");
-        messageTable.put(new Integer(59), " Bad font file format");
-        messageTable.put(new Integer(60), " Device not a stream");
-        messageTable.put(new Integer(61), " No data available");
-        messageTable.put(new Integer(62), " Timer expired");
-        messageTable.put(new Integer(63), " Out of streams resources");
-        messageTable.put(new Integer(64), " Machine is not on the network");
-        messageTable.put(new Integer(65), " Package not installed");
-        messageTable.put(new Integer(66), " Object is remote");
-        messageTable.put(new Integer(67), " Link has been severed");
-        messageTable.put(new Integer(68), " Advertis eerror");
-        messageTable.put(new Integer(69), " Srmount error");
-        messageTable.put(new Integer(70), " Communication error on send");
-        messageTable.put(new Integer(71), " Protocol error");
-        messageTable.put(new Integer(72), " Multihop attempted");
-        messageTable.put(new Integer(73), " RFS specific error");
-        messageTable.put(new Integer(74), " Bad message");
-        messageTable.put(new Integer(75), " Value too large for defined datatype");
-        messageTable.put(new Integer(76), " Name not unique on network");
-        messageTable.put(new Integer(77), " File descriptorin bad state");
-        messageTable.put(new Integer(78), " Remote address changed");
-        messageTable.put(new Integer(79), " Cannot access a needed shared library");
-        messageTable.put(new Integer(80), " Accessing a corrupted shared library");
-        messageTable.put(new Integer(81), " .lib section in a.out corrupted");
-        messageTable.put(new Integer(82), " Attempting to link in too many shared libraries");
-        messageTable.put(new Integer(83), " Cannot exec a shared library directly");
-        messageTable.put(new Integer(84), " Invalid or incomplete multibyte or widecharacter");
-        messageTable.put(new Integer(85), " Interrupted systemcall should be restarted");
-        messageTable.put(new Integer(86), " Streams pipe error");
-        messageTable.put(new Integer(87), " Too many users");
-        messageTable.put(new Integer(88), " Socket operation on non-socket");
-        messageTable.put(new Integer(89), " Destination address required");
-        messageTable.put(new Integer(90), " Message too long");
-        messageTable.put(new Integer(91), " Protocol wrong type for socket");
-        messageTable.put(new Integer(92), " Protocol not available");
-        messageTable.put(new Integer(93), " Protocol not supported");
-        messageTable.put(new Integer(94), " Socket type not supported");
-        messageTable.put(new Integer(95), " Operation not supported");
-        messageTable.put(new Integer(96), " Protocol family not supported");
-        messageTable.put(new Integer(97), " Address family not supported by protocol");
-        messageTable.put(new Integer(98), " Address already in use");
-        messageTable.put(new Integer(99), " Cannot assign requested address");
-        messageTable.put(new Integer(100), " Network is down");
-        messageTable.put(new Integer(101), " Network is unreachable");
-        messageTable.put(new Integer(102), " Network dropped connection on reset");
-        messageTable.put(new Integer(103), " Software caused connection abort");
-        messageTable.put(new Integer(104), " Connection reset by peer");
-        messageTable.put(new Integer(105), " No buffer space available");
-        messageTable.put(new Integer(106), " Transport endpoint is already connected");
-        messageTable.put(new Integer(107), " Transport endpoint is not connected");
-        messageTable.put(new Integer(108), " Cannot send after transport endpoint shutdown");
-        messageTable.put(new Integer(109), " Too many references: cannot splice");
-        messageTable.put(new Integer(110), " Connection timed out");
-        messageTable.put(new Integer(111), " Connection refused");
-        messageTable.put(new Integer(112), " Host is down");
-        messageTable.put(new Integer(113), " No route to host");
-        messageTable.put(new Integer(114), " Operation already in progress");
-        messageTable.put(new Integer(115), " Operation now in progress");
-        messageTable.put(new Integer(116), " Stale NFS file handle");
-        messageTable.put(new Integer(117), " Structure needs cleaning");
-        messageTable.put(new Integer(118), " Not a XENIX named typefile");
-        messageTable.put(new Integer(119), " No XENIX semaphores available");
-        messageTable.put(new Integer(120), " Is a named typefile");
-        messageTable.put(new Integer(121), " Remote I/O error");
-        messageTable.put(new Integer(122), " Disk quota exceeded");
-        messageTable.put(new Integer(123), " No medium found");
-        messageTable.put(new Integer(124), " Wrong medium type");
-        messageTable.put(new Integer(125), " Operation canceled");
-        messageTable.put(new Integer(126), " Required key not available");
-        messageTable.put(new Integer(127), " Key has expired");
-        messageTable.put(new Integer(128), " Key has been revoked");
-        messageTable.put(new Integer(129), " Key was rejected by service");
-        messageTable.put(new Integer(130), " Owner died");
-        messageTable.put(new Integer(131), " State not recoverable");
-
-    }
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Returns OTA status report message body.
-     *
-     * @param aErrCode The OS status code whose message body is queried
-     * @return The corresponding Os error string
-     */
-    public static String getErrorMessage(int aErrCode)
-    {
-        String result = (String)messageTable.get(new Integer(aErrCode));
-        if (result == null)
-        {
-            result = "Unknown error " + Integer.toString(aErrCode);
-        }
-        return result;
-    }
-
-    /*** ---------------------------- PROTECTED --------------------------- */
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/rt/DynamicProperty.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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.rt;
+
+/**
+ * Interface for accessing configuration dependent system property extension
+ * mechanism.
+ */
+
+interface DynamicProperty
+{
+    /**
+     * Adds the defined system property containing all the system
+     * properties. The value is set as is without any escaping.
+     * The semanitc is equivalent to Hashtable.put() method.
+     * @param key a key.
+     * @param value a value.
+     * @return the value before adding, null if this was the first add.
+     * @throws NullPointerException if either key or value is null.
+     */
+    public Object setSystemProperty(Object key, Object value);
+
+    /**
+     * Adds the defined user property containing all the user
+     * properties. This will not override any system properies.
+     * The semanitc is equivalent to Hashtable.put() method.
+     * @param key a key.
+     * @param value a value.
+     * @return the value before adding, null if this was the first add.
+     * @throws NullPointerException if either key or value is null.
+     */
+    public Object setUserProperty(Object key, Object value);
+}
\ No newline at end of file
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/rt/JvmPort.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/rt/JvmPort.java	Tue May 25 12:34:19 2010 +0300
@@ -48,7 +48,7 @@
      * A reference to object containing properties. In CLDC it is Hashtable,
      * otherwise it is Properties.
      */
-    private static Hashtable mPropertiesContainer;
+    private static DynamicProperty mPropertiesContainer;
 
     protected JvmPort()
     {
@@ -95,7 +95,7 @@
      * Sets the container containing system properties.
      * @param propertiesContainer system properties.
      */
-    public static void setPropertiesContainer(Hashtable propertiesContainer)
+    public static void setPropertiesContainer(DynamicProperty propertiesContainer)
     {
         mPropertiesContainer = propertiesContainer;
     }
@@ -194,8 +194,16 @@
      * @see com.nokia.mj.impl.runtimesupport.JvmPort#setSystemProperty.
      */
     public void setSystemProperty(Object key, Object value)
-{
-        mPropertiesContainer.put(key, value);
+    {
+        mPropertiesContainer.setSystemProperty(key, value);
+    }
+
+    /**
+     * @see com.nokia.mj.impl.runtimesupport.JvmPort#setUserProperty.
+     */
+    public void setUserProperty(Object key, Object value)
+    {
+        mPropertiesContainer.setUserProperty(key, value);
     }
 
     /**
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/rt/SystemPropertyHashtable.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/rt/SystemPropertyHashtable.java	Tue May 25 12:34:19 2010 +0300
@@ -31,8 +31,11 @@
  * @version 1.0
  */
 
-public class SystemPropertyHashtable extends Hashtable
+public class SystemPropertyHashtable extends Hashtable implements DynamicProperty
 {
+    /** Storage place for user defined properties. */
+    private Hashtable mUserProperties = new Hashtable(); 
+
     public SystemPropertyHashtable(Hashtable originalProperties)
     {
         // Store the original properties
@@ -54,8 +57,29 @@
      */
     public Object get(Object name)
     {
-        return SystemPropertyUtils.solvePropertyValue(name,
-                super.get(name),
-                this);
+        Object val = super.get(name);
+        if (val != null)
+        {
+            return SystemPropertyUtils.solvePropertyValue(name, val,this);
+        }
+        return mUserProperties.get(name);
+    }
+
+    /**
+     * Adds the defined system property to Hashtable containing all the system
+     * properties.
+     */
+    public Object setSystemProperty(Object key, Object value)
+    {
+        return super.put(key, value);
+    }
+
+    /**
+     * Adds the defined system property to Hashtable containing all the user
+     * properties.
+     */
+    public Object setUserProperty(Object key, Object value)
+    {
+        return mUserProperties.put(key, value);
     }
 }
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/rt/support/JvmInternal.java	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/rt/support/JvmInternal.java	Tue May 25 12:34:19 2010 +0300
@@ -182,9 +182,12 @@
     }
 
     /**
-     * Sets a system property.
+     * Adds the defined system property containing all the user
+     * properties. This will not override any system properies.
+     * The semanitc is equivalent to Hashtable.put() method.
      * @param key a key.
      * @param value a value.
+     * @throws NullPointerException if either key or value is null.
      */
     public static void setSystemProperty(Object key, Object value)
     {
@@ -192,6 +195,19 @@
     }
 
     /**
+     * Adds the defined user property containing all the user
+     * properties. This will not override any system properies.
+     * The semanitc is equivalent to Hashtable.put() method.
+     * @param key a key.
+     * @param value a value.
+     * @throws NullPointerException if either key or value is null.
+     */
+    public static void setUserProperty(Object key, Object value)
+    {
+        JvmPort.getInstance().setUserProperty(key, value);
+    }
+
+    /**
      * Shrinks the Java heap to a minimum. This call will lead to call
      * of the gc.
      *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/concurrent/ConditionObject.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Simple concurrency abstractions for multihreaded programming. 
+*
+*/
+
+package com.nokia.mj.impl.utils.concurrent;
+
+/**
+ * Simple class for waiting on a condition on another thread. When the
+ * condition is signalled, all threads waiting on it will become runnable.
+ */
+public class ConditionObject
+{
+    /** Synchronization object. */
+    Object mSync = new Object();
+
+    /** Condition value */
+    boolean mCondition = false;
+    
+    /**
+     * Wait until the condition has been reached. If condition has already
+     * been reached, return immediately.
+     */
+    public void await()
+    {
+        synchronized (mSync)
+        {
+            // Loop due to possible InterruptedException
+            while (!mCondition)
+            {
+                try
+                {
+                    mSync.wait();
+                }
+                catch (InterruptedException ex)
+                {
+                    // Ignore interrupts
+                }
+            }
+        }
+    }
+
+    /**
+     * Signals that the condition has been reached. All waiters will
+     * continue execution, and any future await() calls return immediately.
+     */
+    public void signal()
+    {
+        synchronized (mSync)
+        {
+            mCondition = true;
+            mSync.notifyAll();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/concurrent/Semaphore.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* 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: Semaphore util for multihreaded programming.
+*
+*/
+
+
+package com.nokia.mj.impl.utils.concurrent;
+
+import java.util.Vector;
+
+
+/**
+ * Semaphore.
+ *
+ * On creation the fairness is selected. Unfair does not guarantee which
+ * waiter gets the semaphore, while fair gives semaphore in first-in
+ * first-out basis.
+ *
+ * InterruptedExceptions are siletly ignored.
+ */
+public class Semaphore
+{
+    /** When Semaphore is fair, the list of Conditions waiting for
+     * semaphore. Null when Semaphore is unfair */
+    private Vector mWaiters = new Vector();
+
+    /** Synchronization lock */
+    private Object mSync = new Object();
+
+    /** Current semaphore count. When < 0, someone is waiting for the semaphore. */
+    private int mCount;
+
+    /**
+     * Create the semaphore.
+     * @param count initial semaphore count
+     * @param isFair is the semaphore fair or unfair
+     */
+    public Semaphore(int count, boolean isFair)
+    {
+        mCount = count;
+
+        if (isFair)
+        {
+            mWaiters = new Vector();
+        }
+        else
+        {
+            mWaiters = null;
+        }
+    }
+
+    /**
+     * Acquire the semaphore. If no semaphores are left, wait for one to be
+     * released.
+     */
+    public void acquire()
+    {
+        if (mWaiters == null)
+        {
+            acquireUnfair();
+        }
+        else
+        {
+            acquireFair();
+        }
+    }
+
+
+    /**
+     * Release the semaphore.
+     */
+    public void release()
+    {
+        if (mWaiters == null)
+        {
+            releaseUnfair();
+        }
+        else
+        {
+            releaseFair();
+        }
+    }
+
+    /**
+     * Acquire the semaphore - fair variant.
+     */
+    private void acquireFair()
+    {
+        ConditionObject lock = null;
+
+        synchronized (mSync)
+        {
+            // Get a semaphore
+            if (mCount-- > 0)
+            {
+                // Got a semaphore, return
+                return;
+            }
+
+            // No semaphores left, add to queue and wait
+            // (manipulate mWaiters within sync, so that lock objects are
+            // correctly and fully created and visible to other thread)
+            lock = new ConditionObject();
+            mWaiters.addElement(lock);
+        }
+        lock.await();
+    }
+
+    /**
+     * Release the semaphore, fair variant.
+     */
+    private void releaseFair()
+    {
+        ConditionObject lock = null;
+
+        // Release a semaphore
+        synchronized (mSync)
+        {
+            if (mCount++ >= 0)
+            {
+                return;
+            }
+
+            // There was < 0 semaphores, so release first one waiting
+            lock = (ConditionObject) mWaiters.firstElement();
+            mWaiters.removeElementAt(0);
+        }
+        lock.signal();
+    }
+
+    /**
+     * Acquire the semaphore - unfair variant.
+     */
+    private void acquireUnfair()
+    {
+        synchronized (mSync)
+        {
+            if (mCount-- > 0)
+            {
+                return;
+            }
+            while (true)
+            {
+                try
+                {
+                    mSync.wait();
+                    break;
+                }
+                catch (InterruptedException ex)
+                {
+                    // Ignore
+                }
+            }
+        }
+    }
+
+    /**
+     * Release the semaphore - unfair variant.
+     */
+    private void releaseUnfair()
+    {
+        synchronized (mSync)
+        {
+            // Increase count and notify someone if someone was waiting
+            if (mCount++ < 0)
+            {
+                mSync.notify();
+            }
+        }
+    }
+}
--- a/javacommons/utils/src.linux/formatternative.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2008-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:  formatternative
-*
-*/
-
-
-#include <time.h>
-
-#include "com_nokia_mj_impl_utils_Formatter.h"
-#include "com_nokia_mj_impl_utils_ResourceLoader.h"
-#include "javacommonutils.h"
-#include "javajniutils.h"
-#include "logger.h"
-
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_utils_Formatter__1formatInteger
-(JNIEnv *aJni, jobject, jint aNumber)
-{
-    // Stub implementation
-    std::string intStr = java::util::JavaCommonUtils::intToString(aNumber);
-    return aJni->NewStringUTF(intStr.c_str());
-}
-
-JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_utils_Formatter__1formatDate
-(JNIEnv * aJni, jobject, jlong timeInMillis)
-{
-    // Stub implementation. Missing localisation.
-    time_t javaTime = timeInMillis/1000;
-    char buffer[80];
-    struct tm* timeInfo;
-    timeInfo = localtime(&javaTime);
-
-    // European format as default.
-    strftime(buffer, 80, "%d/%m/%Y", timeInfo);
-
-    std::string dateStr(buffer);
-
-    return aJni->NewStringUTF(dateStr.c_str());
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_utils_ResourceLoader__1getLocaleId
-(JNIEnv *, jobject)
-
-{
-    // Stub implementation. This triggers using default "sc" engineering
-    // english at Java side.
-    return (jint) -1;
-}
-
--- a/javacommons/utils/src.linux/javaoslayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JavaOsLayer
-*
-*/
-
-
-#include <stdlib.h>
-#include <dlfcn.h>
-
-#include "logger.h"
-#include "javaoslayer.h"
-
-using namespace java::util;
-
-OS_EXPORT void JavaOsLayer::getOsSpecificLibName(std::string& result,
-        const char* libName)
-{
-    JELOG2(EUtils);
-    if (libName)
-    {
-        result += "lib";
-        result += libName;
-        result += ".so";
-        LOG2(EUtils, EInfo,
-             "JavaOsLayer::getOsSpecificLibName(), Name: %s, Result: %s",
-             libName, result.c_str());
-    }
-    else
-    {
-        ELOG(EUtils, "JavaOsLayer::getOsSpecificLibName() libname was null");
-    }
-}
-
-OS_EXPORT void JavaOsLayer::getOsSpecificJavaRootPath(std::string& path)
-{
-    JELOG2(EUtils);
-    path = getenv("JAVA_BIN_ROOT");
-    LOG1(EUtils, EInfo, "JavaOsLayer::getOsSpecificLibName() Path: %s",
-         path.c_str());
-}
-
-
-
-void appendTrailingSlash(std::string& path)
-{
-    if (path[path.length()-1] != '/')
-    {
-        path += '/';
-    }
-}
-
-OS_EXPORT std::string& JavaOsLayer::getBinRoot(std::string& path, bool /*append*/)
-//Argument append is not relevant in Linux environment
-{
-    JELOG2(EUtils);
-    path = getenv("JAVA_BIN_ROOT");
-    appendTrailingSlash(path);
-    return path;
-}
-
-OS_EXPORT std::string& JavaOsLayer::getResRoot(std::string& path, bool /*append*/)
-//Argument append is not relevant in Linux environment
-{
-    JELOG2(EUtils);
-    path = getenv("JAVA_BIN_ROOT");
-    appendTrailingSlash(path);
-    return path;
-}
-
-OS_EXPORT std::string& JavaOsLayer::getMidpRoot(std::string& path, bool /*append*/)
-//Argument append is not relevant in Linux environment
-{
-    JELOG2(EUtils);
-    path = getenv("JAVA_BIN_ROOT");
-    appendTrailingSlash(path);
-    return path;
-}
-
-OS_EXPORT std::string& JavaOsLayer::getJavaCaptainRoot(std::string& path, bool /*append*/)
-//Argument append is not relevant in Linux environment
-{
-    JELOG2(EUtils);
-    path = getenv("JAVA_BIN_ROOT");
-    appendTrailingSlash(path);
-    return path;
-}
-
-OS_EXPORT DriveId JavaOsLayer::getMidpDrive()
-{
-//    JELOG2(EUtils);
-    return DriveId();
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-OS_EXPORT void* JavaOsLayer::dlopen(const char* libName)
-{
-    JELOG2(EUtils);
-    void* lib = 0;
-    if (libName)
-    {
-        lib = ::dlopen(libName, RTLD_LAZY);
-        LOG2(EUtils, EInfo, "JavaOsLayer::dlopen(%s)  Handle: %X", libName,
-             lib);
-        if (lib == 0)
-        {
-            char* errstr;
-            errstr = dlerror();
-            if (errstr != 0)
-            {
-                /*
-                ELOG2(EUtils, "JavaOsLayer::dlopen(%s) failed. Reason: %s",
-                      libName, errstr);
-                */
-            }
-        }
-    }
-    else
-    {
-        ELOG(EUtils, "JavaOsLayer::dlopen() libname was null");
-    }
-    return lib;
-}
-
-OS_EXPORT void* JavaOsLayer::dlsym(void* handle, const char* name, bool)
-{
-    JELOG2(EUtils);
-    void* func = 0;
-    if (handle && name)
-    {
-        func = ::dlsym(handle, name);
-        LOG2(EUtils, EInfo, "JavaOsLayer::dlsym(%s) fPtr: %X", name, func);
-        if (func == 0)
-        {
-            char* errstr;
-            errstr = dlerror();
-            if (errstr != 0)
-            {
-                ELOG2(EUtils, "JavaOsLayer::dlsym(%s) failed. Reason: %s",
-                      name, errstr);
-            }
-        }
-    }
-    else
-    {
-        ELOG2(EUtils, "JavaOsLayer::dlsym() null argument handle: %X, name %X",
-              handle, name);
-    }
-    return func;
-}
-
-OS_EXPORT int JavaOsLayer::dlclose(void* handle)
-{
-    JELOG2(EUtils);
-    int result = -1;
-    if (handle)
-    {
-        result = ::dlclose(handle);
-        if (result != 0)
-        {
-            ELOG1(EUtils, "JavaOsLayer::dlclose() failed. Reason: %d", result);
-        }
-    }
-    else
-    {
-        ELOG(EUtils, "JavaOsLayer::dlclose() null handle");
-    }
-    return result;
-}
-
-OS_EXPORT void JavaOsLayer::startUpTrace(const std::string& /*header*/,
-        int /*freeMem*/, int /*totalMem*/)
-{
-    //NOP for Linux at the moment.
-}
--- a/javacommons/utils/src.linux/properties.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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:
-*
-*/
-
-
-#include <jni.h>
-
-#include "logger.h"
-#include "commonproperties.h"
-#include "javajniutils.h"
-
-using namespace java::util;
-
-jstring java::util::getLocaleImpl(JNIEnv* aEnv)
-{
-    JELOG2(EUtils);
-    jstring loc = 0;
-    // Impl missing...
-    JniUtils::throwNewException
-    (aEnv,"java/lang/RuntimeException",
-     "microedition.locale system property not supported in linux");
-    return loc;
-}
-
-jstring java::util::getPlatformImpl(JNIEnv* aEnv)
-{
-    JELOG2(EUtils);
-    jstring platformStr = 0;
-    // Impl missing...
-    JniUtils::throwNewException
-    (aEnv,"java/lang/RuntimeException",
-     "microedition.platform system property not supported in linux");
-    return platformStr;
-}
-
-jint java::util::getFreeMemoryImpl(JNIEnv* aEnv)
-{
-    JELOG2(EUtils);
-    // Impl missing...
-    JniUtils::throwNewException
-    (aEnv,"java/lang/RuntimeException",
-     "com.nokia.memoryramfree system property not supported in linux");
-    return -1;
-}
-
--- a/javacommons/utils/tsrc/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/tsrc/build/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -62,6 +62,7 @@
 
   <target name="deploy.ut" depends="compile.ut">
       <property name="dist.dir" location="${vm.extension.directory}"/>
+      <mkdir dir="${dist.dir}"/>
       <jar destfile="${dist.dir}/${javacommonutilstests.jar.filename}" basedir="${classes.dir}"/>
       <copy file="${junit.jar.dir}/${junit.jar.filename}"
             tofile="${dist.dir}/${junit.jar.filename}"/>
@@ -75,6 +76,11 @@
           <arg line="test -mainclass=com.nokia.mj.impl.utils.BufferedReaderTests"/>
       </exec>
 
+      <echo>Running ConcurrencyTests</echo>
+      <exec executable="${java.bin.root}/bin/javainstaller">
+          <arg line="test -mainclass=com.nokia.mj.impl.utils.concurrency.ConcurrencyTests"/>
+      </exec>
+
   </target>
 
   <target name="main" depends="clean,run"/>
--- a/javacommons/utils/tsrc/build/jiut.bat	Tue May 11 16:07:20 2010 +0300
+++ b/javacommons/utils/tsrc/build/jiut.bat	Tue May 25 12:34:19 2010 +0300
@@ -15,3 +15,8 @@
 @rem
 rem Script for running JavaCommonUtils unit tests from S60 eshell
 javainstaller test -mainclass=com.nokia.mj.impl.utils.BufferedReaderTests
+javainstaller test -mainclass=com.nokia.mj.impl.utils.concurrent.ConcurrentTests
+javaunittester -conf=cldc -mainclass=com.nokia.mj.impl.rt.SystemPropertyTests
+javaunittester -conf=cdc -mainclass=com.nokia.mj.impl.rt.SystemPropertyTests
+javaunittester -conf=foundation -mainclass=com.nokia.mj.impl.rt.SystemPropertyTests
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/properties/test/Property.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* 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.properties.test;
+
+import com.nokia.mj.impl.rt.support.SystemPropertyProvider;
+
+public class Property implements SystemPropertyProvider
+{
+
+
+    private static int mCounter = 0;
+
+    public String getProperty(String key)
+    {
+        mCounter++;
+        return key +" DynamicValue ("+mCounter+")";
+    }
+    public boolean isStatic(String key)
+    {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/properties/test/Property2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* 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.properties.test;
+
+import com.nokia.mj.impl.rt.support.SystemPropertyProvider;
+
+public class Property2 implements SystemPropertyProvider
+{
+
+    private static int mCounter = 0;
+
+    public String getProperty(String key)
+    {
+        mCounter++;
+        return key +" DynamicValue2 ("+mCounter+")";
+    }
+
+    public boolean isStatic(String key)
+    {
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/rt/SystemPropertyTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,239 @@
+/*
+* 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.rt;
+
+
+import com.nokia.mj.impl.installer.utils.InstallerMain;
+import com.nokia.mj.impl.rt.support.JvmInternal;
+
+import j2meunit.framework.Test;
+import j2meunit.framework.TestCase;
+import j2meunit.framework.TestMethod;
+import j2meunit.framework.TestSuite;
+
+/**
+ * SystemProperty unit tests.
+ */
+public class SystemPropertyTests extends TestCase implements InstallerMain
+{
+
+    // Begin j2meunit test framework setup
+    public void installerMain(String[] args)
+    {
+        TestSuite suite = new TestSuite(this.getClass().getName());
+
+        suite.addTest(new SystemPropertyTests("setPropTests", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((SystemPropertyTests)tc).setPropTests();
+            }
+        }));
+
+        suite.addTest(new SystemPropertyTests("staticPropTests", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((SystemPropertyTests)tc).staticPropTests();
+            }
+        }));
+
+        suite.addTest(new SystemPropertyTests("dynamicPropTests", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((SystemPropertyTests)tc).dynamicPropTests();
+            }
+        }));
+
+ 
+        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
+
+    }
+
+    public SystemPropertyTests()
+    {
+    }
+
+    public SystemPropertyTests(String aTestName, TestMethod aTestMethod)
+    {
+        super(aTestName, aTestMethod);
+    }
+
+    // End j2meunit test framework setup
+
+    protected void setUp()
+    {
+    }
+
+    protected void tearDown()
+    {
+    }
+
+    // Test cases
+
+    private static final String testPropertyKey1 = "test.property.key1";
+    private static final String testPropertyKey2 = "test.property.key2";
+    private static final String testPropertyKey3 = "test.property.key3";
+    private static final String testPropertyKey4 = "test.property.key4";
+    private static final String testPropertyVal1 = "test.property.val1";
+    private static final String testPropertyVal2 = "test.property.val2";
+    private static final String testPropertyVal3 = "test.property.val3";
+    private static final String testPropertyVal4 = "test.property.val4";
+    private static final String testPropertyVal5 = "test.property.val5";
+    private static final String testPropertyVal6 = "test.property.val6";
+
+    private void setPropTests()
+    {
+        try
+        {
+            // Check that the system property is null in the beginning of the
+            // test.
+            String res = System.getProperty(testPropertyKey1);
+            assertTrue("Fail1, got: "+ res, res == null);
+
+            // Set the system property and check that it was correctly set.
+            JvmInternal.setSystemProperty(testPropertyKey1, testPropertyVal1);
+            res = System.getProperty(testPropertyKey1);
+            assertTrue("Fail2, got: "+ res, testPropertyVal1.equals(res));
+
+            // Set a new value to same system property and check that it was correctly set.
+            JvmInternal.setSystemProperty(testPropertyKey1, testPropertyVal2);
+            res = System.getProperty(testPropertyKey1);
+            assertTrue("Fail3, got: "+ res, testPropertyVal2.equals(res));
+
+            // Set a null value to same system property and check that an 
+            // exception is thrown and the value is not changed.
+            try
+            {
+                JvmInternal.setSystemProperty(testPropertyKey1, null);
+                assertTrue("No exception1: "+ res, false);
+            }
+            catch (NullPointerException ne)
+            {
+            }
+            res = System.getProperty(testPropertyKey1);
+            assertTrue("Fail4, got: "+ res, testPropertyVal2.equals(res));
+
+            // Check that the user property is null in the beginning of the
+            // test.
+            res = System.getProperty(testPropertyKey2);
+            assertTrue("Fail5, got: "+ res, res == null);
+
+            // Set the user property and check that it was correctly set.
+            JvmInternal.setUserProperty(testPropertyKey2, testPropertyVal3);
+            res = System.getProperty(testPropertyKey2);
+            assertTrue("Fail6, got: "+ res, testPropertyVal3.equals(res));
+
+            // Set a new value to same user property and check that it was correctly set.
+            JvmInternal.setUserProperty(testPropertyKey2, testPropertyVal4);
+            res = System.getProperty(testPropertyKey2);
+            assertTrue("Fail7, got: "+ res, testPropertyVal4.equals(res));
+
+            // Set a null value to same user property and check that an 
+            // exception is thrown and the value is not changed.
+            try
+            {
+                JvmInternal.setSystemProperty(testPropertyKey2, null);
+                assertTrue("No exception2: "+ res, false);
+            }
+            catch (NullPointerException ne)
+            {
+            }
+            res = System.getProperty(testPropertyKey2);
+            assertTrue("Fail8, got: "+ res, testPropertyVal4.equals(res));
+
+            // Set the same system and user property and check that the user property 
+            // doesn't override the system property.
+            JvmInternal.setSystemProperty(testPropertyKey3, testPropertyVal5);
+            JvmInternal.setUserProperty(testPropertyKey3, testPropertyVal6);
+            res = System.getProperty(testPropertyKey3);
+            assertTrue("Fail9, got: "+ res, testPropertyVal5.equals(res));
+
+        }
+        catch (Throwable t)
+        {
+            t.printStackTrace();
+            assertTrue(t.toString(), false);
+        }
+    }
+
+    private void staticPropTests()
+    {
+        try
+        {
+            // Check some random static system properties.
+            String res = System.getProperty("microedition.jtwi.version");
+            assertTrue("Fail01, got: "+ res, "1.0".equals(res));
+
+            res = System.getProperty("microedition.msa.version");
+            assertTrue("Fail01, got: "+ res, "1.1-SUBSET".equals(res));
+
+            res = System.getProperty("microedition.profiles");
+            assertTrue("Fail01, got: "+ res, "MIDP-2.1".equals(res));
+        }
+        catch (Throwable t)
+        {
+            t.printStackTrace();
+            assertTrue(t.toString(), false);
+        }
+    }
+
+
+    private static final String testDynPropertyKey1 = "test.dyn.property.key1";
+    private static final String testDynPropertyKey2 = "test.dyn.property.key2";
+    private static final String testDynPropertyVal1 = testDynPropertyKey1 + " DynamicValue (";
+    private static final String testDynPropertyVal2 = testDynPropertyKey2 + " DynamicValue2 (1)";
+
+    private void dynamicPropTests()
+    {
+        try
+        {
+            JvmInternal.setSystemProperty(testDynPropertyKey1, ":test.Property");
+            JvmInternal.setSystemProperty(testDynPropertyKey2, ":test.Property2");
+
+            // Check that dynamic property is changing per each call.
+            String res = System.getProperty(testDynPropertyKey1);
+            assertTrue("Fail_21, got: "+ res, (testDynPropertyVal1+"1)").equals(res));
+            res = System.getProperty(testDynPropertyKey1);
+            assertTrue("Fail_22, got: "+ res, (testDynPropertyVal1+"2)").equals(res));
+            res = System.getProperty(testDynPropertyKey1);
+            assertTrue("Fail_23, got: "+ res, (testDynPropertyVal1+"3)").equals(res));
+            res = System.getProperty(testDynPropertyKey1);
+            assertTrue("Fail_24, got: "+ res, (testDynPropertyVal1+"4)").equals(res));
+
+            // Check that static dynamic property is set in first call, but doesn't change
+            // in leading calls.
+            res = System.getProperty(testDynPropertyKey2);
+            assertTrue("Fail_25, got: "+ res, testDynPropertyVal2.equals(res));
+            res = System.getProperty(testDynPropertyKey2);
+            assertTrue("Fail_26, got: "+ res, testDynPropertyVal2.equals(res));
+            res = System.getProperty(testDynPropertyKey2);
+            assertTrue("Fail_27, got: "+ res, testDynPropertyVal2.equals(res));
+            res = System.getProperty(testDynPropertyKey2);
+            assertTrue("Fail_28, got: "+ res, testDynPropertyVal2.equals(res));
+
+        }
+        catch (Throwable t)
+        {
+            t.printStackTrace();
+            assertTrue(t.toString(), false);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/concurrent/ConcurrentTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,573 @@
+/*
+* 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.utils.concurrent;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+import com.nokia.mj.impl.installer.utils.InstallerMain;
+import com.nokia.mj.impl.utils.DebugUtils;
+
+import j2meunit.framework.Test;
+import j2meunit.framework.TestCase;
+import j2meunit.framework.TestMethod;
+import j2meunit.framework.TestSuite;
+
+/**
+ * BufferedReader unit tests.
+ */
+public class ConcurrentTests extends TestCase implements InstallerMain
+{
+    private int mMaxThreadId;
+    private int mReleaseThreadId;
+    private int mNextReleasedThreadId;
+    private int mRunningThreadCount;
+    private Semaphore mSem;
+    private Object mLockEnd;
+
+    // Begin j2meunit test framework setup
+    public void installerMain(String[] args)
+    {
+        createDumperThread(false);
+        TestSuite suite = new TestSuite(this.getClass().getName());
+
+
+        suite.addTest(new ConcurrentTests("testLockBasic", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockBasic();
+            }
+        }));
+
+        suite.addTest(new ConcurrentTests("testLockFair", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockFair();
+            }
+        }));
+
+
+        suite.addTest(new ConcurrentTests("testLockFair2", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockFair2();
+            }
+        }));
+
+        suite.addTest(new ConcurrentTests("testLockUnFair", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockUnFair();
+            }
+        }));
+
+        suite.addTest(new ConcurrentTests("testLockUnFair2", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockUnFair2();
+            }
+        }));
+
+        suite.addTest(new ConcurrentTests("testLockUnFair3", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testLockUnFair3();
+            }
+        }));
+
+
+        suite.addTest(new ConcurrentTests("testCondition1", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testCondition1();
+            }
+        }));
+
+        suite.addTest(new ConcurrentTests("testCondition10_10", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testCondition10_10();
+            }
+        }));
+
+
+        suite.addTest(new ConcurrentTests("testCondition5_10", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((ConcurrentTests)tc).testCondition5_10();
+            }
+        }));
+
+
+
+        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
+
+    }
+
+    public ConcurrentTests()
+    {
+    }
+
+    public ConcurrentTests(String aTestName, TestMethod aTestMethod)
+    {
+        super(aTestName, aTestMethod);
+    }
+
+    private void createDumperThread(boolean doCreate)
+    {
+        if (doCreate)
+        {
+            new Thread(new Runnable(){
+                public void run()
+                {
+                    threadSleep(5000);
+                }
+            }).start();
+        }
+    }
+
+
+    public void assertFalse(String aMsg, boolean aCondition)
+    {
+        assertTrue(aMsg, !aCondition);
+    }
+
+    // End j2meunit test framework setup
+
+    protected void setUp()
+    {
+    }
+
+    protected void tearDown()
+    {
+    }
+
+
+    private synchronized void incThreadCount()
+    {
+        mRunningThreadCount++;
+    }
+
+    private synchronized void decThreadCount()
+    {
+        mRunningThreadCount--;
+    }
+
+    private Vector /*String*/ mTrace = new Vector();
+
+    private void trace(String str)
+    {
+        trace(str, false);
+    }
+
+    private void trace(String str, boolean doTrace)
+    {
+        if (doTrace)
+        {
+        //System.out.println(str);
+        mTrace.addElement(str);
+        }
+    }
+
+
+    private void printTrace()
+    {
+        Enumeration enumer = mTrace.elements();
+        while (enumer.hasMoreElements())
+        {
+            String s = (String)enumer.nextElement();
+            System.out.println(s);
+        }
+        mTrace.removeAllElements();
+    }
+
+
+
+    // Test cases
+
+    /** LOCK TESTS*/
+
+    private void testLockBasic()
+    {
+        try
+        {
+            Semaphore sem = new Semaphore(1, true);
+            sem.acquire();
+            sem.release();
+            sem.acquire();
+            sem.release();
+            sem.acquire();
+            sem.release();
+            sem = null;
+
+            Semaphore sem2 = new Semaphore(1, false);
+            sem2.acquire();
+            sem2.release();
+            sem2.acquire();
+            sem2.release();
+            sem2.acquire();
+            sem2.release();
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+
+    private void testLockFair()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 10;
+        mMaxThreadId = 10;
+
+        try
+        {
+            
+            testLock(true);
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testLockFair2()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 5;
+        mMaxThreadId = 10;
+
+        try
+        {
+            
+            testLock(true);
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testLockUnFair()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 10;
+        mMaxThreadId = 10;
+
+        try
+        {
+            
+            testLock(false);
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testLockUnFair2()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 5;
+        mMaxThreadId = 10;
+
+        try
+        {
+            
+            testLock(false);
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testLockUnFair3()
+    {
+        try
+        {
+            mSem = new Semaphore(1, false);
+            mSem.acquire();
+            new Thread(new Runnable()
+            {
+                public void run()
+                {
+                    threadSleep(100);
+                    mSem.release();
+                }
+            }).start();
+            mSem.acquire();
+            mSem.release();
+            mSem.acquire();
+            new Thread(new Runnable()
+            {
+                public void run()
+                {
+                    threadSleep(100);
+                    mSem.release();
+                }
+            }).start();
+            mSem.acquire();
+            mSem.release();
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+
+
+
+    private class LockTestThread extends Thread
+    {
+        private int mId;
+        private boolean mCheck;
+        
+        private LockTestThread(int id, boolean check)
+        {
+            mId = id;
+            mCheck = check;
+        }
+        public void run() 
+        {
+            threadSleep(20);
+            trace("run: "+mId);
+            incThreadCount();
+            if (mId < mMaxThreadId)
+            {
+                // Need to create additional thread.
+                trace("creating new thread: "+mId);
+                new LockTestThread(mId+1, mCheck).start();
+            }
+            if (mReleaseThreadId == mId)
+            {
+                synchronized (mLockEnd)
+                {
+                    trace("notify: "+mId);
+                    mLockEnd.notify();
+                }
+            }
+            trace("Getting lock: "+mId);
+            mSem.acquire();
+            trace("Got lock: "+mId);
+            if (mCheck)
+            {
+                String errorTxt = "Incorrect release order. mId: "+ mId + 
+                                  ", next: " +mNextReleasedThreadId;
+                assertTrue(errorTxt, mNextReleasedThreadId == mId);
+            }
+            mNextReleasedThreadId++;
+            trace("unlock: "+mId);
+            mSem.release();
+            decThreadCount();
+            trace("done: "+mId);
+        }
+    }
+
+    private void threadSleep(int ms)
+    {
+        try
+        {
+            Thread.sleep(ms);
+        }
+        catch (Exception e)
+        {
+        }
+    }
+    private void testLock(boolean isFair) throws Exception
+    {
+        mSem = new Semaphore(1,isFair);
+        mSem.acquire();
+        new LockTestThread(1, isFair).start();
+        mLockEnd = new Object();
+        synchronized (mLockEnd)
+        {
+            // Wait that all the threads has been started.
+            trace("Wait()");
+            mLockEnd.wait();
+            trace("wait ok()");
+        }
+        mSem.release();
+        trace("unlock after wait");
+        for (int i = 0; i < 5; ++i)
+        {
+            threadSleep(100);
+            trace("Woke from sleep.");
+            if (mRunningThreadCount == 0)
+            {
+                break;
+            }
+        }
+        printTrace();
+        assertTrue("Threads still running: " + mRunningThreadCount, mRunningThreadCount == 0);
+    }
+
+    /** CONDITION TESTS*/
+    private ConditionObject mCondition;
+
+    private void testCondition1()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 1;
+        mMaxThreadId = 1;
+
+        try
+        {
+            testCondtion();
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testCondition10_10()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 10;
+        mMaxThreadId = 10;
+
+        try
+        {
+            testCondtion();
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+    private void testCondition5_10()
+    {
+        mRunningThreadCount = 0;
+        mNextReleasedThreadId = 1;
+        mReleaseThreadId = 5;
+        mMaxThreadId = 10;
+
+        try
+        {
+            testCondtion();
+        }
+        catch (Throwable t)
+        {
+            assertTrue(t.toString(), false);
+            t.printStackTrace();
+        }
+    }
+
+
+    private class ConditionTestThread extends Thread
+    {
+        private int mId;
+        
+        private ConditionTestThread(int id)
+        {
+            mId = id;
+        }
+        public void run() 
+        {
+            threadSleep(20);
+            trace("run: "+mId);
+            incThreadCount();
+
+            if (mReleaseThreadId == mId)
+            {
+                synchronized (mLockEnd)
+                {
+                    trace("notify: "+mId);
+                    mLockEnd.notify();
+                }
+                threadSleep(50);
+            }
+
+            if (mId < mMaxThreadId)
+            {
+                // Need to create additional thread.
+                trace("creating new thread: "+mId);
+                new ConditionTestThread(mId+1).start();
+            }
+
+            trace("Going to await: "+mId);
+            mCondition.await();
+            trace("out from await: "+mId);
+            decThreadCount();
+            trace("done: "+mId);
+        }
+    }
+
+    private void testCondtion() throws Exception
+    {
+        mCondition = new ConditionObject();
+        new ConditionTestThread(1).start();
+
+        mLockEnd = new Object();
+        synchronized (mLockEnd)
+        {
+            // Wait that all the threads has been started.
+            trace("wait()-->");
+            mLockEnd.wait();
+            trace("<--wait()");
+        }
+
+        assertTrue("Not correct amount of threads waiting: " + mRunningThreadCount, mRunningThreadCount == mReleaseThreadId);
+        if (mMaxThreadId == 1)
+        {
+            threadSleep(100);
+        }
+        trace("before signal()");
+        mCondition.signal();
+        trace("after signal()");
+        for (int i = 0; i < 5; ++i)
+        {
+            threadSleep(100);
+            trace("Woke from sleep.");
+            if (mRunningThreadCount == 0)
+            {
+                break;
+            }
+        }
+        printTrace();
+        assertTrue("Threads still running: " + mRunningThreadCount, mRunningThreadCount == 0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/build/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,23 @@
+<!--
+#
+# 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="javaunittestrunner" basedir="." default="deploy">
+
+  <import file="../../../../../../build/utilities.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/build/bwins/javaunittestrunneru.def	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/build/eabi/javaunittestrunneru.def	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z10jni_lookupPKc @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/build/javaunittestrunner.pro	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,26 @@
+#
+# 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: 
+#
+
+TARGET=javaunittestrunner
+TEMPLATE=lib
+CONFIG += omj java stl
+CONFIG -= qt
+
+symbian {
+    TARGET.UID3          = 0xE0008435
+}
+include(../../../../../../build/omj.pri)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/test/UnitTestRunner.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* 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.rt.test;
+
+import com.nokia.mj.impl.installer.utils.InstallerMain;
+import com.nokia.mj.impl.rt.support.JvmInternal;
+import com.nokia.mj.impl.rt.support.ThreadEventListener;
+import com.nokia.mj.impl.utils.Logger;
+import com.nokia.mj.impl.utils.Tokenizer;
+
+
+public class UnitTestRunner
+{
+    /**
+     * UnitTestRunner main program.
+     *
+     * @param args command line arguments
+     */
+    public static void main(String[] args)
+    {
+        int exitCode = 0;
+
+        System.out.println("java.version: " +
+                           System.getProperty("java.version"));
+        System.out.println("java.fullversion: " +
+                           System.getProperty("java.fullversion"));
+
+        if (args.length == 0)
+        {
+            Logger.ELOG(Logger.EJavaRuntime, "No args provided.");
+            exitCode = -2;
+        }
+        try
+        {
+            JvmInternal.setThreadEventListener(new ThreadEventListener()
+            {
+                public void threadStarting(Thread newThread, Thread parentThread) {}
+                public void threadDied(Thread thread) {}
+                public void uncaughtException(Thread thread, Throwable throwable)
+                {
+                    String threadName = null;
+                    if (thread != null)
+                    {
+                        threadName = thread.getName();
+                    }
+                    Logger.ELOG(Logger.EJavaRuntime, "Unhandled exception in " +
+                                threadName, throwable);
+                    System.exit(-1);
+                }
+            });
+            test(args);
+        }
+        catch (Throwable t)
+        {
+            Logger.ELOG(Logger.EJavaRuntime, "Unhandled exception in main", t);
+            exitCode = -1;
+        }
+        System.exit(exitCode);
+    }
+
+   /**
+     * Main program for executing tests.
+     */
+    private static void test(String[] args)
+    {
+        String mainClass = getMainClass(args[0]);
+        if (mainClass == null)
+        {
+            Logger.ELOG(Logger.EJavaRuntime, "Mainclass must be specified.");
+            return;
+        }
+
+        try
+        {
+            // Instantiate mainclass and call its main() method.
+            Class clazz = Class.forName(mainClass);
+            InstallerMain instMain = (InstallerMain)clazz.newInstance();
+            instMain.installerMain(args);
+        }
+        catch (Exception ex)
+        {
+            Logger.ELOG(Logger.EJavaRuntime, "Running mainclass failed", ex);
+        }
+    }
+
+   /**
+     * Main program for executing tests.
+     */
+    private static String getMainClass(String arg)
+    {
+        String[] mainClassArg = Tokenizer.split(arg, "=");
+        if (mainClassArg.length != 2)
+        {
+            return null;
+        }
+        if (!mainClassArg[0].equals("-mainclass"))
+        {
+            return null;
+        }
+    return mainClassArg[1];
+        
+    }
+
+    /**
+     * Logs arguments given to TCK Runner
+     */
+    private static void logArgs(String[] args)
+    {
+        StringBuffer buf = new StringBuffer("UnitTestRunner args:");
+        for (int i = 0; i < args.length; i++)
+        {
+            buf.append(" ");
+            buf.append(args[i]);
+        }
+        Logger.ILOG(Logger.EJavaRuntime, buf.toString());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/unittestrunner/ApplicationInfoImpl.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* 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.rt.unittestrunner;
+
+import com.nokia.mj.impl.rt.support.ApplicationInfo;
+import com.nokia.mj.impl.utils.Uid;
+
+public class ApplicationInfoImpl extends ApplicationInfo
+{
+    private String iProtectionDomain = null;
+
+    /**
+     */
+    public String getRuntimeType()
+    {
+        // See runtime types defined in ApplicationInfo class.
+        return "UnitTest_Runner";
+    }
+
+    /**
+     */
+    public String getProtectionDomain()
+    {
+        return MANUFACTURER_DOMAIN;
+    }
+
+    /**
+     */
+    public Uid getUid()
+    {
+        return Uid.createUid("[ffffffff]");
+    }
+
+    /**
+     */
+    public Uid getSuiteUid()
+    {
+        throw new RuntimeException
+        ("Get suite uid is not applicable for TckRunner");
+    }
+
+    /**
+     */
+    public String getSuiteName()
+    {
+        return getName();
+    }
+
+    /**
+     */
+    public String getName()
+    {
+        return "JavaUnitTester";
+    }
+
+    /**
+     */
+    public String getVendor()
+    {
+        return "Nokia";
+    }
+
+    /**
+     */
+    public String getVersion()
+    {
+        return "1.0.0";
+    }
+
+    /**
+     */
+    public String getRootPath()
+    {
+        return ".";
+    }
+
+    /**
+     */
+    public String getMainClass()
+    {
+        throw new RuntimeException
+        ("Get main class is not applicable for UntiTestRunner");
+    }
+
+    /**
+     */
+    public String getAttribute(String key)
+    {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/runner/javasrc/com/nokia/mj/impl/rt/unittestrunner/ApplicationUtilsImpl.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.mj.impl.rt.unittestrunner;
+
+import com.nokia.mj.impl.rt.support.ApplicationInfo;
+import com.nokia.mj.impl.rt.support.ApplicationUtils;
+import com.nokia.mj.impl.utils.Uid;
+
+import java.security.Permission;
+import java.security.AccessControlException;
+
+public class ApplicationUtilsImpl extends ApplicationUtils
+{
+    public static void doShutdownImpl()
+    {
+        // Send shutdown notification to all registered listeners.
+        ((ApplicationUtilsImpl)sInstance).doShutdown();
+    }
+
+
+    public void notifyExitCmd()
+    {
+    }
+
+    public void checkPermission(Permission aPermission)
+    throws AccessControlException, NullPointerException
+    {
+        checkPermission(null, aPermission);
+    }
+
+    public void checkPermission(Uid aAppUid, Permission aPermission)
+    throws AccessControlException, NullPointerException
+    {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/starter/build/javauntitester.pro	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,34 @@
+#
+# 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: 
+#
+
+TARGET=javaunittester
+TEMPLATE=app
+
+CONFIG += omj no_icon stl
+CONFIG -= qt
+
+INCLUDEPATH += ../../../../../../javaruntimes/inc
+
+LIBS += -ljavaruntimestarterutils -ljavastorage
+
+symbian {
+    TARGET.EPOCHEAPSIZE  = 0x020000 0x800000
+    TARGET.EPOCSTACKSIZE = 0x14000
+    TARGET.CAPABILITY    = all -tcb -allfiles -drm
+}
+
+
+include(../../../../../../build/omj.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/starter/src/main.cpp	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* 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:  Main program for the Unit test process
+*
+*/
+
+#include <memory>
+#include <unistd.h>
+
+#include "logger.h"
+#include "exceptionbase.h"
+#include "runtimeexception.h"
+#include "javacommonutils.h"
+#include "runtimestarterutils.h"
+#include "jvmstarter.h"
+
+using namespace java::runtime;
+using namespace java::util;
+
+int startJvm(int argc, char *argv[]);
+const wchar_t* const UNIT_TEST_RUNNER_MAIN_CLASS = L"com.nokia.mj.impl.rt.test.UnitTestRunner";
+void findMidlet();
+
+int main(int argc, char *argv[])
+{
+    LOG(EJavaRuntime, EInfo, "UNIT TEST RUNNER main()");
+
+    int result = -1;
+    try
+    {
+        result = startJvm(argc, argv);
+    }
+    catch (RuntimeException& e)
+    {
+        ELOG1(EJavaRuntime, "UNIT TEST RUNNER main() RuntimeException caught: %s ",
+              e.toString().c_str());
+    }
+
+    catch (ExceptionBase& e)
+    {
+        ELOG1(EJavaRuntime, "UNIT TEST RUNNER main() ExceptionBase caught: %s ",
+              e.toString().c_str());
+    }
+
+    catch (std::exception& e)
+    {
+        ELOG1(EJavaRuntime, "UNIT TEST RUNNER main() Exception %s caught", e.what());
+    }
+
+    LOG1(EJavaRuntime, EInfo, "UNIT TEST RUNNER EXIT = %d", result);
+    return result;
+}
+
+int startJvm(int argc, char *argv[])
+{
+    JELOG2(EJavaRuntime);
+
+    // Create instance of RuntimeStarterUtils for thread supervisioning.
+    std::auto_ptr<RuntimeStarterUtils> starterUtils(new RuntimeStarterUtils());
+    starterUtils->startThreadSupervisor();
+    
+    JvmStarter::Configuration config = JvmStarter::CLDC;
+    int argInd = 1;
+    if (argc > 2)
+    {
+        if (strncmp(argv[1], "-conf", 5) == 0)
+        {
+            argInd = 2;
+            if (strcmp(argv[1]+5, "=cdc") == 0)
+            {
+                config = JvmStarter::CDC;
+            }
+            else if (strcmp(argv[1]+5, "=foundation") == 0)
+            {
+                config = JvmStarter::FOUNDATION;
+            }
+        }
+    }
+    // Create starter for starting the JVM
+    std::auto_ptr<JvmStarter>
+    jvm(JvmStarter::getJvmStarterInstance(config,
+                                          L"Unit_test_runner"));
+
+    // starterUtils->enableDevelopmentFeatures(*jvm.get());
+    jvm->enableThreadDumping();
+
+    jvm->appendSystemProperty(L"-Dcom.nokia.rt.port=unittestrunner");
+
+    jvm->setMainClass(UNIT_TEST_RUNNER_MAIN_CLASS);
+
+    for (; argInd < argc; ++argInd)
+    {
+        jvm->appendApplicationArgument(
+            JavaCommonUtils::utf8ToWstring(argv[argInd]));
+    }
+
+    // Start the JVM.
+    return jvm->startJvm();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/utils/tsrc/unittestrunner/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+include $(JAVA_SRC_ROOT)/build/Makefile.defs
+
+COMPONENTS += \
+	starter/build \
+	runner/build
+
+include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/javaextensions/bluetooth/bluecove/build/javabluecove_0x2002DC97.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluecove/build/javabluecove_0x2002DC97.mmp	Tue May 25 12:34:19 2010 +0300
@@ -70,6 +70,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -90,10 +103,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60bluetoothplatformcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60bluetoothplatformcontrol.cpp	Tue May 25 12:34:19 2010 +0300
@@ -76,7 +76,7 @@
     delete mPlatformPlugin;
 }
 
-std::wstring BluetoothPlatformControl::getSystemProperty(const int aProperty)
+OS_EXPORT std::wstring BluetoothPlatformControl::getSystemProperty(const int aProperty)
 {
     JELOG2(EJavaBluetooth);
 
--- a/javaextensions/bluetooth/bluetoothcommons/build/bwins/javabluetoothcommonsu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/build/bwins/javabluetoothcommonsu.def	Tue May 25 12:34:19 2010 +0300
@@ -1,60 +1,60 @@
 EXPORTS
 	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-	??0BluetoothClientConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 2 NONAME ; java::bluetooth::BluetoothClientConnection::BluetoothClientConnection(class java::bluetooth::BluetoothFunctionServer *)
+	?isAttributesFound@BTServiceRecordPopulator@bluetooth@java@@QAE_NXZ @ 2 NONAME ; bool java::bluetooth::BTServiceRecordPopulator::isAttributesFound(void)
 	??0BluetoothClientConnection@bluetooth@java@@QAE@PAVCBluetoothSocket@@PAVBluetoothFunctionServer@12@@Z @ 3 NONAME ; java::bluetooth::BluetoothClientConnection::BluetoothClientConnection(class CBluetoothSocket *, class java::bluetooth::BluetoothFunctionServer *)
-	??0BtUrlParams@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 4 NONAME ; java::bluetooth::BtUrlParams::BtUrlParams(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
-	??1BTServiceRecordPopulator@bluetooth@java@@QAE@XZ @ 5 NONAME ; java::bluetooth::BTServiceRecordPopulator::~BTServiceRecordPopulator(void)
-	??1BluetoothClientConnection@bluetooth@java@@QAE@XZ @ 6 NONAME ; java::bluetooth::BluetoothClientConnection::~BluetoothClientConnection(void)
-	??1BluetoothNameLookup@bluetooth@java@@UAE@XZ @ 7 NONAME ; java::bluetooth::BluetoothNameLookup::~BluetoothNameLookup(void)
+	?initializeRecordL@ServiceRecord@bluetooth@java@@QAEXHHAAVTUUID@@AAVTDesC8@@@Z @ 4 NONAME ; void java::bluetooth::ServiceRecord::initializeRecordL(int, int, class TUUID &, class TDesC8 &)
+	?isAllowedSender@BtUrlParams@bluetooth@java@@QAE_NAAVHBufC16@@AA_N1@Z @ 5 NONAME ; bool java::bluetooth::BtUrlParams::isAllowedSender(class HBufC16 &, bool &, bool &)
+	?getParamEncrypt@BtUrlParams@bluetooth@java@@QAE_NXZ @ 6 NONAME ; bool java::bluetooth::BtUrlParams::getParamEncrypt(void)
+	?cleanup@ServiceRecord@bluetooth@java@@SAXAAPAV123@@Z @ 7 NONAME ; void java::bluetooth::ServiceRecord::cleanup(class java::bluetooth::ServiceRecord * &)
 	??1BtUrlParams@bluetooth@java@@QAE@XZ @ 8 NONAME ; java::bluetooth::BtUrlParams::~BtUrlParams(void)
-	?New@BTServiceRecordPopulator@bluetooth@java@@SAPAV123@PAUJNIEnv_@@PAV_jobject@@@Z @ 9 NONAME ; class java::bluetooth::BTServiceRecordPopulator * java::bluetooth::BTServiceRecordPopulator::New(struct JNIEnv_ *, class _jobject *)
-	?NewL@BluetoothNameLookup@bluetooth@java@@SAPAV123@XZ @ 10 NONAME ; class java::bluetooth::BluetoothNameLookup * java::bluetooth::BluetoothNameLookup::NewL(void)
-	?NewL@ServiceRecord@bluetooth@java@@SAPAV123@PAVBluetoothFunctionServer@23@@Z @ 11 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::ServiceRecord::NewL(class java::bluetooth::BluetoothFunctionServer *)
-	?attributeListEnd@ServiceRecord@bluetooth@java@@QAEHH@Z @ 12 NONAME ; int java::bluetooth::ServiceRecord::attributeListEnd(int)
-	?attributeListStart@ServiceRecord@bluetooth@java@@QAEHHH@Z @ 13 NONAME ; int java::bluetooth::ServiceRecord::attributeListStart(int, int)
-	?available@BluetoothClientConnection@bluetooth@java@@QAEJXZ @ 14 NONAME ; long java::bluetooth::BluetoothClientConnection::available(void)
-	?cleanup@ServiceRecord@bluetooth@java@@SAXAAPAV123@@Z @ 15 NONAME ; void java::bluetooth::ServiceRecord::cleanup(class java::bluetooth::ServiceRecord * &)
-	?close@BluetoothClientConnection@bluetooth@java@@QAEXXZ @ 16 NONAME ; void java::bluetooth::BluetoothClientConnection::close(void)
-	?completesUpdateRecord@ServiceRecord@bluetooth@java@@QAEXXZ @ 17 NONAME ; void java::bluetooth::ServiceRecord::completesUpdateRecord(void)
-	?connect@BluetoothClientConnection@bluetooth@java@@QAEH_JH_N1HH@Z @ 18 NONAME ; int java::bluetooth::BluetoothClientConnection::connect(long long, int, bool, bool, int, int)
-	?doDeviceNameLookupL@BluetoothNameLookup@bluetooth@java@@QAEPAV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@_J@Z @ 19 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > * java::bluetooth::BluetoothNameLookup::doDeviceNameLookupL(long long)
-	?getBluetoothDeviceClass@S60BluetoothPlatformControl@bluetooth@java@@UAEIAAH@Z @ 20 NONAME ; unsigned int java::bluetooth::S60BluetoothPlatformControl::getBluetoothDeviceClass(int &)
-	?getBluetoothPlatformControl@BluetoothPlatformControl@bluetooth@java@@SAPAV123@XZ @ 21 NONAME ; class java::bluetooth::BluetoothPlatformControl * java::bluetooth::BluetoothPlatformControl::getBluetoothPlatformControl(void)
-	?getParamAuthenticate@BtUrlParams@bluetooth@java@@QAE_NXZ @ 22 NONAME ; bool java::bluetooth::BtUrlParams::getParamAuthenticate(void)
-	?getParamAuthorize@BtUrlParams@bluetooth@java@@QAE_NXZ @ 23 NONAME ; bool java::bluetooth::BtUrlParams::getParamAuthorize(void)
-	?getParamEncrypt@BtUrlParams@bluetooth@java@@QAE_NXZ @ 24 NONAME ; bool java::bluetooth::BtUrlParams::getParamEncrypt(void)
-	?getParamMaster@BtUrlParams@bluetooth@java@@QAE_NXZ @ 25 NONAME ; bool java::bluetooth::BtUrlParams::getParamMaster(void)
-	?getParamName@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 26 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getParamName(void)
-	?getParamReceiveMtu@BtUrlParams@bluetooth@java@@QAEHXZ @ 27 NONAME ; int java::bluetooth::BtUrlParams::getParamReceiveMtu(void)
-	?getParamTransmitMtu@BtUrlParams@bluetooth@java@@QAEHXZ @ 28 NONAME ; int java::bluetooth::BtUrlParams::getParamTransmitMtu(void)
-	?getProtocol@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 29 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getProtocol(void)
-	?getReceiveMTU@BluetoothClientConnection@bluetooth@java@@QAEHXZ @ 30 NONAME ; int java::bluetooth::BluetoothClientConnection::getReceiveMTU(void)
-	?getRemoteAddress@BluetoothClientConnection@bluetooth@java@@QAE_JXZ @ 31 NONAME ; long long java::bluetooth::BluetoothClientConnection::getRemoteAddress(void)
-	?getSecurityProperty@BluetoothRemoteDevice@bluetooth@java@@SAHCAA_J@Z @ 32 NONAME ; int java::bluetooth::BluetoothRemoteDevice::getSecurityProperty(signed char, long long &)
-	?getServiceRecordID@ServiceRecord@bluetooth@java@@QAEHXZ @ 33 NONAME ; int java::bluetooth::ServiceRecord::getServiceRecordID(void)
-	?getServiceUuid@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 34 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getServiceUuid(void)
-	?getSystemProperty@BluetoothPlatformControl@bluetooth@java@@SA?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@H@Z @ 35 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BluetoothPlatformControl::getSystemProperty(int)
-	?getTransmitMTU@BluetoothClientConnection@bluetooth@java@@QAEHXZ @ 36 NONAME ; int java::bluetooth::BluetoothClientConnection::getTransmitMTU(void)
-	?init@BluetoothClientConnection@bluetooth@java@@QAEHH@Z @ 37 NONAME ; int java::bluetooth::BluetoothClientConnection::init(int)
-	?initialize@BluetoothClientConnection@bluetooth@java@@QAEXH_JHH@Z @ 38 NONAME ; void java::bluetooth::BluetoothClientConnection::initialize(int, long long, int, int)
-	?initializeRecord@ServiceRecord@bluetooth@java@@QAEHHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 39 NONAME ; int java::bluetooth::ServiceRecord::initializeRecord(int, int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
-	?initializeRecordL@ServiceRecord@bluetooth@java@@QAEXHHAAVTUUID@@AAVTDesC8@@@Z @ 40 NONAME ; void java::bluetooth::ServiceRecord::initializeRecordL(int, int, class TUUID &, class TDesC8 &)
-	?initializeUpdateRecord@ServiceRecord@bluetooth@java@@QAEXH@Z @ 41 NONAME ; void java::bluetooth::ServiceRecord::initializeUpdateRecord(int)
-	?isAllowedSender@BtUrlParams@bluetooth@java@@QAE_NAAVHBufC16@@AA_N1@Z @ 42 NONAME ; bool java::bluetooth::BtUrlParams::isAllowedSender(class HBufC16 &, bool &, bool &)
-	?isAttributesFound@BTServiceRecordPopulator@bluetooth@java@@QAE_NXZ @ 43 NONAME ; bool java::bluetooth::BTServiceRecordPopulator::isAttributesFound(void)
-	?isBlockedSender@BtUrlParams@bluetooth@java@@QAE_NAAVHBufC16@@@Z @ 44 NONAME ; bool java::bluetooth::BtUrlParams::isBlockedSender(class HBufC16 &)
-	?receive@BluetoothClientConnection@bluetooth@java@@QAEHAAPAD@Z @ 45 NONAME ; int java::bluetooth::BluetoothClientConnection::receive(char * &)
-	?registerCallback@BluetoothClientConnection@bluetooth@java@@QAEXPAUJNIEnv_@@PAV_jobject@@@Z @ 46 NONAME ; void java::bluetooth::BluetoothClientConnection::registerCallback(struct JNIEnv_ *, class _jobject *)
-	?restoreJavaServiceRecordL@ServiceRecord@bluetooth@java@@QAEXPAUJNIEnv_@@PAV_jobject@@@Z @ 47 NONAME ; void java::bluetooth::ServiceRecord::restoreJavaServiceRecordL(struct JNIEnv_ *, class _jobject *)
-	?restorePersistentRecord@ServiceRecord@bluetooth@java@@QAEHXZ @ 48 NONAME ; int java::bluetooth::ServiceRecord::restorePersistentRecord(void)
-	?send@BluetoothClientConnection@bluetooth@java@@QAEHPBDH@Z @ 49 NONAME ; int java::bluetooth::BluetoothClientConnection::send(char const *, int)
-	?setAdvertiseFs@ServiceRecord@bluetooth@java@@QAEHH@Z @ 50 NONAME ; int java::bluetooth::ServiceRecord::setAdvertiseFs(int)
-	?setAttributeBool@ServiceRecord@bluetooth@java@@QAEHHH@Z @ 51 NONAME ; int java::bluetooth::ServiceRecord::setAttributeBool(int, int)
-	?setAttributeInt@ServiceRecord@bluetooth@java@@QAEHHHAAVTDesC8@@@Z @ 52 NONAME ; int java::bluetooth::ServiceRecord::setAttributeInt(int, int, class TDesC8 &)
-	?setAttributeNil@ServiceRecord@bluetooth@java@@QAEHH@Z @ 53 NONAME ; int java::bluetooth::ServiceRecord::setAttributeNil(int)
-	?setAttributeString@ServiceRecord@bluetooth@java@@QAEHHAAVTDesC8@@@Z @ 54 NONAME ; int java::bluetooth::ServiceRecord::setAttributeString(int, class TDesC8 &)
-	?setAttributeUUID@ServiceRecord@bluetooth@java@@QAEHHAAVTUUID@@@Z @ 55 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUUID(int, class TUUID &)
-	?setAttributeUint@ServiceRecord@bluetooth@java@@QAEHHHAAVTDesC8@@@Z @ 56 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUint(int, int, class TDesC8 &)
-	?setAttributeUrl@ServiceRecord@bluetooth@java@@QAEHHAAVTDesC8@@@Z @ 57 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUrl(int, class TDesC8 &)
-	?setDeviceServiceClass@ServiceClassHandler@bluetooth@java@@SAHI_N@Z @ 58 NONAME ; int java::bluetooth::ServiceClassHandler::setDeviceServiceClass(unsigned int, bool)
+	?init@BluetoothClientConnection@bluetooth@java@@QAEHH@Z @ 9 NONAME ; int java::bluetooth::BluetoothClientConnection::init(int)
+	?getParamTransmitMtu@BtUrlParams@bluetooth@java@@QAEHXZ @ 10 NONAME ; int java::bluetooth::BtUrlParams::getParamTransmitMtu(void)
+	?attributeListStart@ServiceRecord@bluetooth@java@@QAEHHH@Z @ 11 NONAME ; int java::bluetooth::ServiceRecord::attributeListStart(int, int)
+	?initializeRecord@ServiceRecord@bluetooth@java@@QAEHHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 12 NONAME ; int java::bluetooth::ServiceRecord::initializeRecord(int, int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
+	?initialize@BluetoothClientConnection@bluetooth@java@@QAEXH_JHH@Z @ 13 NONAME ; void java::bluetooth::BluetoothClientConnection::initialize(int, long long, int, int)
+	?getParamAuthorize@BtUrlParams@bluetooth@java@@QAE_NXZ @ 14 NONAME ; bool java::bluetooth::BtUrlParams::getParamAuthorize(void)
+	?setAttributeInt@ServiceRecord@bluetooth@java@@QAEHHHAAVTDesC8@@@Z @ 15 NONAME ; int java::bluetooth::ServiceRecord::setAttributeInt(int, int, class TDesC8 &)
+	?getParamAuthenticate@BtUrlParams@bluetooth@java@@QAE_NXZ @ 16 NONAME ; bool java::bluetooth::BtUrlParams::getParamAuthenticate(void)
+	?setAttributeUrl@ServiceRecord@bluetooth@java@@QAEHHAAVTDesC8@@@Z @ 17 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUrl(int, class TDesC8 &)
+	??0BtUrlParams@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 18 NONAME ; java::bluetooth::BtUrlParams::BtUrlParams(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
+	?registerCallback@BluetoothClientConnection@bluetooth@java@@QAEXPAUJNIEnv_@@PAV_jobject@@@Z @ 19 NONAME ; void java::bluetooth::BluetoothClientConnection::registerCallback(struct JNIEnv_ *, class _jobject *)
+	?getSecurityProperty@BluetoothRemoteDevice@bluetooth@java@@SAHCAA_J@Z @ 20 NONAME ; int java::bluetooth::BluetoothRemoteDevice::getSecurityProperty(signed char, long long &)
+	?restorePersistentRecord@ServiceRecord@bluetooth@java@@QAEHXZ @ 21 NONAME ; int java::bluetooth::ServiceRecord::restorePersistentRecord(void)
+	??1BluetoothClientConnection@bluetooth@java@@QAE@XZ @ 22 NONAME ; java::bluetooth::BluetoothClientConnection::~BluetoothClientConnection(void)
+	??1BTServiceRecordPopulator@bluetooth@java@@QAE@XZ @ 23 NONAME ; java::bluetooth::BTServiceRecordPopulator::~BTServiceRecordPopulator(void)
+	?getParamMaster@BtUrlParams@bluetooth@java@@QAE_NXZ @ 24 NONAME ; bool java::bluetooth::BtUrlParams::getParamMaster(void)
+	?completesUpdateRecord@ServiceRecord@bluetooth@java@@QAEXXZ @ 25 NONAME ; void java::bluetooth::ServiceRecord::completesUpdateRecord(void)
+	?setAttributeBool@ServiceRecord@bluetooth@java@@QAEHHH@Z @ 26 NONAME ; int java::bluetooth::ServiceRecord::setAttributeBool(int, int)
+	?attributeListEnd@ServiceRecord@bluetooth@java@@QAEHH@Z @ 27 NONAME ; int java::bluetooth::ServiceRecord::attributeListEnd(int)
+	?New@BTServiceRecordPopulator@bluetooth@java@@SAPAV123@PAUJNIEnv_@@PAV_jobject@@@Z @ 28 NONAME ; class java::bluetooth::BTServiceRecordPopulator * java::bluetooth::BTServiceRecordPopulator::New(struct JNIEnv_ *, class _jobject *)
+	?setAttributeUint@ServiceRecord@bluetooth@java@@QAEHHHAAVTDesC8@@@Z @ 29 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUint(int, int, class TDesC8 &)
+	?getBluetoothPlatformControl@BluetoothPlatformControl@bluetooth@java@@SAPAV123@XZ @ 30 NONAME ; class java::bluetooth::BluetoothPlatformControl * java::bluetooth::BluetoothPlatformControl::getBluetoothPlatformControl(void)
+	?getParamName@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 31 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getParamName(void)
+	?available@BluetoothClientConnection@bluetooth@java@@QAEJXZ @ 32 NONAME ; long java::bluetooth::BluetoothClientConnection::available(void)
+	?connect@BluetoothClientConnection@bluetooth@java@@QAEH_JH_N1HH@Z @ 33 NONAME ; int java::bluetooth::BluetoothClientConnection::connect(long long, int, bool, bool, int, int)
+	?getParamReceiveMtu@BtUrlParams@bluetooth@java@@QAEHXZ @ 34 NONAME ; int java::bluetooth::BtUrlParams::getParamReceiveMtu(void)
+	?setAttributeUUID@ServiceRecord@bluetooth@java@@QAEHHAAVTUUID@@@Z @ 35 NONAME ; int java::bluetooth::ServiceRecord::setAttributeUUID(int, class TUUID &)
+	?NewL@BluetoothNameLookup@bluetooth@java@@SAPAV123@XZ @ 36 NONAME ; class java::bluetooth::BluetoothNameLookup * java::bluetooth::BluetoothNameLookup::NewL(void)
+	?getServiceUuid@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 37 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getServiceUuid(void)
+	?initializeUpdateRecord@ServiceRecord@bluetooth@java@@QAEXH@Z @ 38 NONAME ; void java::bluetooth::ServiceRecord::initializeUpdateRecord(int)
+	?close@BluetoothClientConnection@bluetooth@java@@QAEXXZ @ 39 NONAME ; void java::bluetooth::BluetoothClientConnection::close(void)
+	?setAttributeString@ServiceRecord@bluetooth@java@@QAEHHAAVTDesC8@@@Z @ 40 NONAME ; int java::bluetooth::ServiceRecord::setAttributeString(int, class TDesC8 &)
+	?receive@BluetoothClientConnection@bluetooth@java@@QAEHAAPAD@Z @ 41 NONAME ; int java::bluetooth::BluetoothClientConnection::receive(char * &)
+	?send@BluetoothClientConnection@bluetooth@java@@QAEHPBDH@Z @ 42 NONAME ; int java::bluetooth::BluetoothClientConnection::send(char const *, int)
+	?isBlockedSender@BtUrlParams@bluetooth@java@@QAE_NAAVHBufC16@@@Z @ 43 NONAME ; bool java::bluetooth::BtUrlParams::isBlockedSender(class HBufC16 &)
+	?getServiceRecordID@ServiceRecord@bluetooth@java@@QAEHXZ @ 44 NONAME ; int java::bluetooth::ServiceRecord::getServiceRecordID(void)
+	?getReceiveMTU@BluetoothClientConnection@bluetooth@java@@QAEHXZ @ 45 NONAME ; int java::bluetooth::BluetoothClientConnection::getReceiveMTU(void)
+	?restoreJavaServiceRecordL@ServiceRecord@bluetooth@java@@QAEXPAUJNIEnv_@@PAV_jobject@@@Z @ 46 NONAME ; void java::bluetooth::ServiceRecord::restoreJavaServiceRecordL(struct JNIEnv_ *, class _jobject *)
+	??0BluetoothClientConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 47 NONAME ; java::bluetooth::BluetoothClientConnection::BluetoothClientConnection(class java::bluetooth::BluetoothFunctionServer *)
+	?setDeviceServiceClass@ServiceClassHandler@bluetooth@java@@SAHI_N@Z @ 48 NONAME ; int java::bluetooth::ServiceClassHandler::setDeviceServiceClass(unsigned int, bool)
+	?setAdvertiseFs@ServiceRecord@bluetooth@java@@QAEHH@Z @ 49 NONAME ; int java::bluetooth::ServiceRecord::setAdvertiseFs(int)
+	?doDeviceNameLookupL@BluetoothNameLookup@bluetooth@java@@QAEPAV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@_J@Z @ 50 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > * java::bluetooth::BluetoothNameLookup::doDeviceNameLookupL(long long)
+	?getTransmitMTU@BluetoothClientConnection@bluetooth@java@@QAEHXZ @ 51 NONAME ; int java::bluetooth::BluetoothClientConnection::getTransmitMTU(void)
+	?setAttributeNil@ServiceRecord@bluetooth@java@@QAEHH@Z @ 52 NONAME ; int java::bluetooth::ServiceRecord::setAttributeNil(int)
+	?getProtocol@BtUrlParams@bluetooth@java@@QAE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 53 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BtUrlParams::getProtocol(void)
+	?NewL@ServiceRecord@bluetooth@java@@SAPAV123@PAVBluetoothFunctionServer@23@@Z @ 54 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::ServiceRecord::NewL(class java::bluetooth::BluetoothFunctionServer *)
+	?getSystemProperty@BluetoothPlatformControl@bluetooth@java@@SA?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@H@Z @ 55 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::BluetoothPlatformControl::getSystemProperty(int)
+	??1BluetoothNameLookup@bluetooth@java@@UAE@XZ @ 56 NONAME ; java::bluetooth::BluetoothNameLookup::~BluetoothNameLookup(void)
+	?getRemoteAddress@BluetoothClientConnection@bluetooth@java@@QAE_JXZ @ 57 NONAME ; long long java::bluetooth::BluetoothClientConnection::getRemoteAddress(void)
+	?getBluetoothDeviceClass@S60BluetoothPlatformControl@bluetooth@java@@UAEIAAH@Z @ 58 NONAME ; unsigned int java::bluetooth::S60BluetoothPlatformControl::getBluetoothDeviceClass(int &)
 
--- a/javaextensions/bluetooth/bluetoothcommons/build/eabi/javabluetoothcommonsu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/build/eabi/javabluetoothcommonsu.def	Tue May 25 12:34:19 2010 +0300
@@ -45,35 +45,36 @@
 	_ZN4java9bluetooth24BTServiceRecordPopulator3NewEP7JNIEnv_P8_jobject @ 44 NONAME
 	_ZN4java9bluetooth24BTServiceRecordPopulatorD1Ev @ 45 NONAME
 	_ZN4java9bluetooth24BTServiceRecordPopulatorD2Ev @ 46 NONAME
-	_ZN4java9bluetooth24BluetoothPlatformControl27getBluetoothPlatformControlEv @ 47 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection10initializeEixii @ 48 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection13getReceiveMTUEv @ 49 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection14getTransmitMTUEv @ 50 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection16getRemoteAddressEv @ 51 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection16registerCallbackEP7JNIEnv_P8_jobject @ 52 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection4initEi @ 53 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection4sendEPKci @ 54 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection5closeEv @ 55 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection7connectExibbii @ 56 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection7receiveERPc @ 57 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnection9availableEv @ 58 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionC1EP16CBluetoothSocketPNS0_23BluetoothFunctionServerE @ 59 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionC1EPNS0_23BluetoothFunctionServerE @ 60 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionC2EP16CBluetoothSocketPNS0_23BluetoothFunctionServerE @ 61 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionC2EPNS0_23BluetoothFunctionServerE @ 62 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionD1Ev @ 63 NONAME
-	_ZN4java9bluetooth25BluetoothClientConnectionD2Ev @ 64 NONAME
-	_ZN4java9bluetooth27S60BluetoothPlatformControl23getBluetoothDeviceClassERi @ 65 NONAME
-	_ZTIN4java9bluetooth19BluetoothNameLookupE @ 66 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth24BTServiceRecordPopulatorE @ 67 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth24CBluetoothPlatformPluginE @ 68 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth25BluetoothClientConnectionE @ 69 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth26BTDataElementListPopulatorE @ 70 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth27S60BluetoothPlatformControlE @ 71 NONAME ; #<TI>#
-	_ZTVN4java9bluetooth19BluetoothNameLookupE @ 72 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth24BTServiceRecordPopulatorE @ 73 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth24CBluetoothPlatformPluginE @ 74 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth25BluetoothClientConnectionE @ 75 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth26BTDataElementListPopulatorE @ 76 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth27S60BluetoothPlatformControlE @ 77 NONAME ; #<VT>#
+	_ZN4java9bluetooth24BluetoothPlatformControl17getSystemPropertyEi @ 47 NONAME
+	_ZN4java9bluetooth24BluetoothPlatformControl27getBluetoothPlatformControlEv @ 48 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection10initializeEixii @ 49 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection13getReceiveMTUEv @ 50 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection14getTransmitMTUEv @ 51 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection16getRemoteAddressEv @ 52 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection16registerCallbackEP7JNIEnv_P8_jobject @ 53 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection4initEi @ 54 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection4sendEPKci @ 55 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection5closeEv @ 56 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection7connectExibbii @ 57 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection7receiveERPc @ 58 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnection9availableEv @ 59 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionC1EP16CBluetoothSocketPNS0_23BluetoothFunctionServerE @ 60 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionC1EPNS0_23BluetoothFunctionServerE @ 61 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionC2EP16CBluetoothSocketPNS0_23BluetoothFunctionServerE @ 62 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionC2EPNS0_23BluetoothFunctionServerE @ 63 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionD1Ev @ 64 NONAME
+	_ZN4java9bluetooth25BluetoothClientConnectionD2Ev @ 65 NONAME
+	_ZN4java9bluetooth27S60BluetoothPlatformControl23getBluetoothDeviceClassERi @ 66 NONAME
+	_ZTIN4java9bluetooth19BluetoothNameLookupE @ 67 NONAME
+	_ZTIN4java9bluetooth24BTServiceRecordPopulatorE @ 68 NONAME
+	_ZTIN4java9bluetooth24CBluetoothPlatformPluginE @ 69 NONAME
+	_ZTIN4java9bluetooth25BluetoothClientConnectionE @ 70 NONAME
+	_ZTIN4java9bluetooth26BTDataElementListPopulatorE @ 71 NONAME
+	_ZTIN4java9bluetooth27S60BluetoothPlatformControlE @ 72 NONAME
+	_ZTVN4java9bluetooth19BluetoothNameLookupE @ 73 NONAME
+	_ZTVN4java9bluetooth24BTServiceRecordPopulatorE @ 74 NONAME
+	_ZTVN4java9bluetooth24CBluetoothPlatformPluginE @ 75 NONAME
+	_ZTVN4java9bluetooth25BluetoothClientConnectionE @ 76 NONAME
+	_ZTVN4java9bluetooth26BTDataElementListPopulatorE @ 77 NONAME
+	_ZTVN4java9bluetooth27S60BluetoothPlatformControlE @ 78 NONAME
 
--- a/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons.pro	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons.pro	Tue May 25 12:34:19 2010 +0300
@@ -26,7 +26,7 @@
     SOURCES += ../bluetoothplatformcontrol/src.s60/*.cpp
 }
 
-LIBS +=  -lsdpdatabase -lbtengsettings -lbtnotif -lbluetooth -lbtmanclient \
+LIBS +=  -lsdpdatabase -lbtengsettings -lbluetooth -lbtmanclient \
          -lbtdevice -ljavacomms -ljavafileutils -lesock
 
 
--- a/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons_0x2002DC99.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons_0x2002DC99.mmp	Tue May 25 12:34:19 2010 +0300
@@ -91,7 +91,6 @@
 
 LIBRARY		sdpdatabase.lib
 LIBRARY		btengsettings.lib
-LIBRARY		btnotif.lib
 LIBRARY		bluetooth.lib
 LIBRARY		btmanclient.lib
 LIBRARY		btdevice.lib
@@ -105,6 +104,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -125,10 +137,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothplugins/btgoeppushplugin/build/javabtgoepscplugin_0x2002DC9A.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btgoeppushplugin/build/javabtgoepscplugin_0x2002DC9A.mmp	Tue May 25 12:34:19 2010 +0300
@@ -88,6 +88,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -108,10 +121,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothplugins/btjavacaptainplugin/build/javacaptain_ext_btdeviceclassmanager_0x2002DC9D.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btjavacaptainplugin/build/javacaptain_ext_btdeviceclassmanager_0x2002DC9D.mmp	Tue May 25 12:34:19 2010 +0300
@@ -82,6 +82,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -102,10 +115,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/bwins/javabtl2capscpluginu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/bwins/javabtl2capscpluginu.def	Tue May 25 12:34:19 2010 +0300
@@ -1,39 +1,38 @@
 EXPORTS
 	?findDllMethod@@YAP6APAXXZPBD@Z @ 1 NONAME ; void * (*)(void) findDllMethod(char const *)
-	??0BtL2CapServerConnectionFactory@bluetooth@java@@QAE@XZ @ 2 NONAME ; java::bluetooth::BtL2CapServerConnectionFactory::BtL2CapServerConnectionFactory(void)
-	??0L2CAPServerConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 3 NONAME ; java::bluetooth::L2CAPServerConnection::L2CAPServerConnection(class java::bluetooth::BluetoothFunctionServer *)
-	??0L2CapPushServerConnection@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 4 NONAME ; java::bluetooth::L2CapPushServerConnection::L2CapPushServerConnection(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
-	??1BtL2CapServerConnectionFactory@bluetooth@java@@UAE@XZ @ 5 NONAME ; java::bluetooth::BtL2CapServerConnectionFactory::~BtL2CapServerConnectionFactory(void)
-	??1L2CAPServerConnection@bluetooth@java@@QAE@XZ @ 6 NONAME ; java::bluetooth::L2CAPServerConnection::~L2CAPServerConnection(void)
-	??1L2CapPushServerConnection@bluetooth@java@@UAE@XZ @ 7 NONAME ; java::bluetooth::L2CapPushServerConnection::~L2CapPushServerConnection(void)
-	?Accept@L2CAPServerConnection@bluetooth@java@@QAEJXZ @ 8 NONAME ; long java::bluetooth::L2CAPServerConnection::Accept(void)
-	?CloseServer@L2CAPServerConnection@bluetooth@java@@QAEHXZ @ 9 NONAME ; int java::bluetooth::L2CAPServerConnection::CloseServer(void)
+	?isActive@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 2 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isActive(void)
+	?open@L2CapPushServerConnection@bluetooth@java@@UAEXPAVConnectionListener@push@3@@Z @ 3 NONAME ; void java::bluetooth::L2CapPushServerConnection::open(class java::push::ConnectionListener *)
+	?setFilter@L2CapPushServerConnection@bluetooth@java@@UAEXABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 4 NONAME ; void java::bluetooth::L2CapPushServerConnection::setFilter(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?getServiceRecordHandle@L2CAPServerConnection@bluetooth@java@@QAEPAVServiceRecord@23@XZ @ 5 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::L2CAPServerConnection::getServiceRecordHandle(void)
+	?initializeServiceRecord@L2CAPServerConnection@bluetooth@java@@QAEHHAAVTUUID@@AAVTDesC8@@@Z @ 6 NONAME ; int java::bluetooth::L2CAPServerConnection::initializeServiceRecord(int, class TUUID &, class TDesC8 &)
+	?isMultipleSrvConnAllowed@BtL2CapServerConnectionFactory@bluetooth@java@@UAE_NXZ @ 7 NONAME ; bool java::bluetooth::BtL2CapServerConnectionFactory::isMultipleSrvConnAllowed(void)
+	??1BtL2CapServerConnectionFactory@bluetooth@java@@UAE@XZ @ 8 NONAME ; java::bluetooth::BtL2CapServerConnectionFactory::~BtL2CapServerConnectionFactory(void)
+	?initializeServiceRecord@L2CAPServerConnection@bluetooth@java@@QAEHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 9 NONAME ; int java::bluetooth::L2CAPServerConnection::initializeServiceRecord(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
 	?GetServerPSM@L2CAPServerConnection@bluetooth@java@@QAEHXZ @ 10 NONAME ; int java::bluetooth::L2CAPServerConnection::GetServerPSM(void)
-	?ServerOpen@L2CAPServerConnection@bluetooth@java@@QAEHHHHHHH@Z @ 11 NONAME ; int java::bluetooth::L2CAPServerConnection::ServerOpen(int, int, int, int, int, int)
-	?asyncAccept@L2CAPServerConnection@bluetooth@java@@QAEHPAVBluetoothPushEventListener@23@PAVBtUrlParams@23@@Z @ 12 NONAME ; int java::bluetooth::L2CAPServerConnection::asyncAccept(class java::bluetooth::BluetoothPushEventListener *, class java::bluetooth::BtUrlParams *)
-	?close@L2CapPushServerConnection@bluetooth@java@@UAEXXZ @ 13 NONAME ; void java::bluetooth::L2CapPushServerConnection::close(void)
-	?create@BtL2CapServerConnectionFactory@bluetooth@java@@UAEPAVServerConnection@push@3@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 14 NONAME ; class java::push::ServerConnection * java::bluetooth::BtL2CapServerConnectionFactory::create(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?createSrvConnObj@BtL2CapServerConnectionFactory@bluetooth@java@@UAEPAVServerConnection@push@3@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 15 NONAME ; class java::push::ServerConnection * java::bluetooth::BtL2CapServerConnectionFactory::createSrvConnObj(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?deleteServer@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 16 NONAME ; void java::bluetooth::L2CapPushServerConnection::deleteServer(void)
-	?getConnectedClient@L2CapPushServerConnection@bluetooth@java@@QAEPAVBluetoothClientConnection@23@XZ @ 17 NONAME ; class java::bluetooth::BluetoothClientConnection * java::bluetooth::L2CapPushServerConnection::getConnectedClient(void)
-	?getFactory@BtL2CapServerConnectionFactory@bluetooth@java@@SAAAV123@XZ @ 18 NONAME ; class java::bluetooth::BtL2CapServerConnectionFactory & java::bluetooth::BtL2CapServerConnectionFactory::getFactory(void)
-	?getFilter@L2CapPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 19 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::L2CapPushServerConnection::getFilter(void) const
-	?getServerObject@L2CapPushServerConnection@bluetooth@java@@QAEPAVL2CAPServerConnection@23@XZ @ 20 NONAME ; class java::bluetooth::L2CAPServerConnection * java::bluetooth::L2CapPushServerConnection::getServerObject(void)
-	?getServiceRecordHandle@L2CAPServerConnection@bluetooth@java@@QAEPAVServiceRecord@23@XZ @ 21 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::L2CAPServerConnection::getServiceRecordHandle(void)
-	?getUri@L2CapPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 22 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::L2CapPushServerConnection::getUri(void) const
-	?initializeServiceRecord@L2CAPServerConnection@bluetooth@java@@QAEHHAAVTUUID@@AAVTDesC8@@@Z @ 23 NONAME ; int java::bluetooth::L2CAPServerConnection::initializeServiceRecord(int, class TUUID &, class TDesC8 &)
-	?initializeServiceRecord@L2CAPServerConnection@bluetooth@java@@QAEHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 24 NONAME ; int java::bluetooth::L2CAPServerConnection::initializeServiceRecord(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
-	?isActive@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 25 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isActive(void)
-	?isConnectionAccepted@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 26 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isConnectionAccepted(void)
-	?isCreatedByPush@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 27 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isCreatedByPush(void)
-	?isListening@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 28 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isListening(void)
-	?isMultipleSrvConnAllowed@BtL2CapServerConnectionFactory@bluetooth@java@@UAE_NXZ @ 29 NONAME ; bool java::bluetooth::BtL2CapServerConnectionFactory::isMultipleSrvConnAllowed(void)
-	?open@L2CapPushServerConnection@bluetooth@java@@UAEXPAVConnectionListener@push@3@@Z @ 30 NONAME ; void java::bluetooth::L2CapPushServerConnection::open(class java::push::ConnectionListener *)
-	?openServer@L2CAPServerConnection@bluetooth@java@@QAEH_N000HH@Z @ 31 NONAME ; int java::bluetooth::L2CAPServerConnection::openServer(bool, bool, bool, bool, int, int)
-	?restorePersistentRecord@L2CAPServerConnection@bluetooth@java@@QAEHXZ @ 32 NONAME ; int java::bluetooth::L2CAPServerConnection::restorePersistentRecord(void)
-	?setAcceptMonitor@L2CapPushServerConnection@bluetooth@java@@QAEXPAVMonitor@util@3@@Z @ 33 NONAME ; void java::bluetooth::L2CapPushServerConnection::setAcceptMonitor(class java::util::Monitor *)
-	?setCreatedByPush@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 34 NONAME ; void java::bluetooth::L2CapPushServerConnection::setCreatedByPush(void)
-	?setFilter@L2CapPushServerConnection@bluetooth@java@@UAEXABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 35 NONAME ; void java::bluetooth::L2CapPushServerConnection::setFilter(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?unsetAcceptMonitor@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 36 NONAME ; void java::bluetooth::L2CapPushServerConnection::unsetAcceptMonitor(void)
-	?unsetClearServiceClassBitsFlag@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 37 NONAME ; void java::bluetooth::L2CapPushServerConnection::unsetClearServiceClassBitsFlag(void)
+	?asyncAccept@L2CAPServerConnection@bluetooth@java@@QAEHPAVBluetoothPushEventListener@23@PAVBtUrlParams@23@@Z @ 11 NONAME ; int java::bluetooth::L2CAPServerConnection::asyncAccept(class java::bluetooth::BluetoothPushEventListener *, class java::bluetooth::BtUrlParams *)
+	?create@BtL2CapServerConnectionFactory@bluetooth@java@@UAEPAVServerConnection@push@3@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 12 NONAME ; class java::push::ServerConnection * java::bluetooth::BtL2CapServerConnectionFactory::create(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?getFactory@BtL2CapServerConnectionFactory@bluetooth@java@@SAAAV123@XZ @ 13 NONAME ; class java::bluetooth::BtL2CapServerConnectionFactory & java::bluetooth::BtL2CapServerConnectionFactory::getFactory(void)
+	?getFilter@L2CapPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 14 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::L2CapPushServerConnection::getFilter(void) const
+	?isConnectionAccepted@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 15 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isConnectionAccepted(void)
+	?getServerObject@L2CapPushServerConnection@bluetooth@java@@QAEPAVL2CAPServerConnection@23@XZ @ 16 NONAME ; class java::bluetooth::L2CAPServerConnection * java::bluetooth::L2CapPushServerConnection::getServerObject(void)
+	??1L2CapPushServerConnection@bluetooth@java@@UAE@XZ @ 17 NONAME ; java::bluetooth::L2CapPushServerConnection::~L2CapPushServerConnection(void)
+	??0L2CAPServerConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 18 NONAME ; java::bluetooth::L2CAPServerConnection::L2CAPServerConnection(class java::bluetooth::BluetoothFunctionServer *)
+	??0BtL2CapServerConnectionFactory@bluetooth@java@@QAE@XZ @ 19 NONAME ; java::bluetooth::BtL2CapServerConnectionFactory::BtL2CapServerConnectionFactory(void)
+	?openServer@L2CAPServerConnection@bluetooth@java@@QAEH_N000HH@Z @ 20 NONAME ; int java::bluetooth::L2CAPServerConnection::openServer(bool, bool, bool, bool, int, int)
+	?ServerOpen@L2CAPServerConnection@bluetooth@java@@QAEHHHHHHH@Z @ 21 NONAME ; int java::bluetooth::L2CAPServerConnection::ServerOpen(int, int, int, int, int, int)
+	?isListening@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 22 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isListening(void)
+	?unsetClearServiceClassBitsFlag@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 23 NONAME ; void java::bluetooth::L2CapPushServerConnection::unsetClearServiceClassBitsFlag(void)
+	?deleteServer@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 24 NONAME ; void java::bluetooth::L2CapPushServerConnection::deleteServer(void)
+	??1L2CAPServerConnection@bluetooth@java@@QAE@XZ @ 25 NONAME ; java::bluetooth::L2CAPServerConnection::~L2CAPServerConnection(void)
+	?getConnectedClient@L2CapPushServerConnection@bluetooth@java@@QAEPAVBluetoothClientConnection@23@XZ @ 26 NONAME ; class java::bluetooth::BluetoothClientConnection * java::bluetooth::L2CapPushServerConnection::getConnectedClient(void)
+	?close@L2CapPushServerConnection@bluetooth@java@@UAEXXZ @ 27 NONAME ; void java::bluetooth::L2CapPushServerConnection::close(void)
+	?setCreatedByPush@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 28 NONAME ; void java::bluetooth::L2CapPushServerConnection::setCreatedByPush(void)
+	?isCreatedByPush@L2CapPushServerConnection@bluetooth@java@@QAE_NXZ @ 29 NONAME ; bool java::bluetooth::L2CapPushServerConnection::isCreatedByPush(void)
+	?Accept@L2CAPServerConnection@bluetooth@java@@QAEJXZ @ 30 NONAME ; long java::bluetooth::L2CAPServerConnection::Accept(void)
+	?unsetAcceptMonitor@L2CapPushServerConnection@bluetooth@java@@QAEXXZ @ 31 NONAME ; void java::bluetooth::L2CapPushServerConnection::unsetAcceptMonitor(void)
+	??0L2CapPushServerConnection@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 32 NONAME ; java::bluetooth::L2CapPushServerConnection::L2CapPushServerConnection(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >)
+	?restorePersistentRecord@L2CAPServerConnection@bluetooth@java@@QAEHXZ @ 33 NONAME ; int java::bluetooth::L2CAPServerConnection::restorePersistentRecord(void)
+	?setAcceptMonitor@L2CapPushServerConnection@bluetooth@java@@QAEXPAVMonitor@util@3@@Z @ 34 NONAME ; void java::bluetooth::L2CapPushServerConnection::setAcceptMonitor(class java::util::Monitor *)
+	?createSrvConnObj@BtL2CapServerConnectionFactory@bluetooth@java@@UAEPAVServerConnection@push@3@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 35 NONAME ; class java::push::ServerConnection * java::bluetooth::BtL2CapServerConnectionFactory::createSrvConnObj(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?getUri@L2CapPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 36 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::L2CapPushServerConnection::getUri(void) const
 
--- a/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/eabi/javabtl2capscpluginu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/eabi/javabtl2capscpluginu.def	Tue May 25 12:34:19 2010 +0300
@@ -43,10 +43,10 @@
 	_ZN4java9bluetooth30BtL2CapServerConnectionFactoryD2Ev @ 42 NONAME
 	_ZNK4java9bluetooth25L2CapPushServerConnection6getUriEv @ 43 NONAME
 	_ZNK4java9bluetooth25L2CapPushServerConnection9getFilterEv @ 44 NONAME
-	_ZTIN4java9bluetooth21L2CAPServerConnectionE @ 45 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth25L2CapPushServerConnectionE @ 46 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth30BtL2CapServerConnectionFactoryE @ 47 NONAME ; #<TI>#
-	_ZTVN4java9bluetooth21L2CAPServerConnectionE @ 48 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth25L2CapPushServerConnectionE @ 49 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth30BtL2CapServerConnectionFactoryE @ 50 NONAME ; #<VT>#
+	_ZTIN4java9bluetooth21L2CAPServerConnectionE @ 45 NONAME
+	_ZTIN4java9bluetooth25L2CapPushServerConnectionE @ 46 NONAME
+	_ZTIN4java9bluetooth30BtL2CapServerConnectionFactoryE @ 47 NONAME
+	_ZTVN4java9bluetooth21L2CAPServerConnectionE @ 48 NONAME
+	_ZTVN4java9bluetooth25L2CapPushServerConnectionE @ 49 NONAME
+	_ZTVN4java9bluetooth30BtL2CapServerConnectionFactoryE @ 50 NONAME
 
--- a/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/javabtl2capscplugin_0x2002DC9B.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/build/javabtl2capscplugin_0x2002DC9B.mmp	Tue May 25 12:34:19 2010 +0300
@@ -90,6 +90,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -110,10 +123,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/inc.s60/btl2capserverconnection.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/inc.s60/btl2capserverconnection.h	Tue May 25 12:34:19 2010 +0300
@@ -39,6 +39,7 @@
 public:
     OS_IMPORT L2CAPServerConnection(
         java::bluetooth::BluetoothFunctionServer* server);
+            
     OS_IMPORT ~L2CAPServerConnection();
 
     OS_IMPORT int openServer(bool authorize, bool authenticate, bool encrypt,
@@ -67,8 +68,8 @@
                              TBool encrypt, TBool master, TInt receiveMTU, TInt transmitMTU);
 
     OS_IMPORT int GetServerPSM();
+
     OS_IMPORT long Accept();
-    OS_IMPORT int CloseServer();
 
     OS_IMPORT ServiceRecord *getServiceRecordHandle();
 
@@ -99,6 +100,8 @@
 
     void avoidFilter();
 
+    int CloseServer();
+
 private:
     L2CAPServerConnection();
 
--- a/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/bwins/javabtsppscpluginu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/bwins/javabtsppscpluginu.def	Tue May 25 12:34:19 2010 +0300
@@ -1,40 +1,39 @@
 EXPORTS
 	?findDllMethod@@YAP6APAXXZPBD@Z @ 1 NONAME ; void * (*)(void) findDllMethod(char const *)
-	??0BTRFCOMMServerConnectionFactory@@QAE@XZ @ 2 NONAME ; BTRFCOMMServerConnectionFactory::BTRFCOMMServerConnectionFactory(void)
-	??0RFCOMMPushServerConnection@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0PAVServerConnectionFactoryBase@push@2@@Z @ 3 NONAME ; java::bluetooth::RFCOMMPushServerConnection::RFCOMMPushServerConnection(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class java::push::ServerConnectionFactoryBase *)
-	??0RFCOMMServerConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 4 NONAME ; java::bluetooth::RFCOMMServerConnection::RFCOMMServerConnection(class java::bluetooth::BluetoothFunctionServer *)
-	??1BTRFCOMMServerConnectionFactory@@UAE@XZ @ 5 NONAME ; BTRFCOMMServerConnectionFactory::~BTRFCOMMServerConnectionFactory(void)
-	??1RFCOMMPushServerConnection@bluetooth@java@@UAE@XZ @ 6 NONAME ; java::bluetooth::RFCOMMPushServerConnection::~RFCOMMPushServerConnection(void)
-	??1RFCOMMServerConnection@bluetooth@java@@QAE@XZ @ 7 NONAME ; java::bluetooth::RFCOMMServerConnection::~RFCOMMServerConnection(void)
+	?asyncAccept@RFCOMMServerConnection@bluetooth@java@@QAEHPAVBluetoothPushEventListener@23@PAVBtUrlParams@23@@Z @ 2 NONAME ; int java::bluetooth::RFCOMMServerConnection::asyncAccept(class java::bluetooth::BluetoothPushEventListener *, class java::bluetooth::BtUrlParams *)
+	?setCreatedByPush@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 3 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setCreatedByPush(void)
+	?GetRfListeningChannel@RFCOMMServerConnection@bluetooth@java@@QAEHXZ @ 4 NONAME ; int java::bluetooth::RFCOMMServerConnection::GetRfListeningChannel(void)
+	?isCreatedByPush@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 5 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isCreatedByPush(void)
+	?getServiceRecordHandle@RFCOMMServerConnection@bluetooth@java@@QAEPAVServiceRecord@23@XZ @ 6 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::RFCOMMServerConnection::getServiceRecordHandle(void)
+	?isListening@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 7 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isListening(void)
 	?Accept@RFCOMMServerConnection@bluetooth@java@@QAEJXZ @ 8 NONAME ; long java::bluetooth::RFCOMMServerConnection::Accept(void)
-	?CloseServer@RFCOMMServerConnection@bluetooth@java@@QAEHXZ @ 9 NONAME ; int java::bluetooth::RFCOMMServerConnection::CloseServer(void)
-	?GetRfListeningChannel@RFCOMMServerConnection@bluetooth@java@@QAEHXZ @ 10 NONAME ; int java::bluetooth::RFCOMMServerConnection::GetRfListeningChannel(void)
-	?ServerOpen@RFCOMMServerConnection@bluetooth@java@@QAEHHHH@Z @ 11 NONAME ; int java::bluetooth::RFCOMMServerConnection::ServerOpen(int, int, int)
-	?asyncAccept@RFCOMMServerConnection@bluetooth@java@@QAEHPAVBluetoothPushEventListener@23@PAVBtUrlParams@23@@Z @ 12 NONAME ; int java::bluetooth::RFCOMMServerConnection::asyncAccept(class java::bluetooth::BluetoothPushEventListener *, class java::bluetooth::BtUrlParams *)
-	?close@RFCOMMPushServerConnection@bluetooth@java@@UAEXXZ @ 13 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::close(void)
-	?create@BTRFCOMMServerConnectionFactory@@UAEPAVServerConnection@push@java@@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 14 NONAME ; class java::push::ServerConnection * BTRFCOMMServerConnectionFactory::create(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?createSrvConnObj@BTRFCOMMServerConnectionFactory@@UAEPAVServerConnection@push@java@@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 15 NONAME ; class java::push::ServerConnection * BTRFCOMMServerConnectionFactory::createSrvConnObj(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?deleteServer@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 16 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::deleteServer(void)
-	?getConnectedClient@RFCOMMPushServerConnection@bluetooth@java@@QAEPAVBluetoothClientConnection@23@XZ @ 17 NONAME ; class java::bluetooth::BluetoothClientConnection * java::bluetooth::RFCOMMPushServerConnection::getConnectedClient(void)
-	?getFactory@BTRFCOMMServerConnectionFactory@@SAAAV1@XZ @ 18 NONAME ; class BTRFCOMMServerConnectionFactory & BTRFCOMMServerConnectionFactory::getFactory(void)
-	?getFilter@RFCOMMPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 19 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::RFCOMMPushServerConnection::getFilter(void) const
-	?getServerObject@RFCOMMPushServerConnection@bluetooth@java@@QAEPAVRFCOMMServerConnection@23@XZ @ 20 NONAME ; class java::bluetooth::RFCOMMServerConnection * java::bluetooth::RFCOMMPushServerConnection::getServerObject(void)
-	?getServiceRecordHandle@RFCOMMServerConnection@bluetooth@java@@QAEPAVServiceRecord@23@XZ @ 21 NONAME ; class java::bluetooth::ServiceRecord * java::bluetooth::RFCOMMServerConnection::getServiceRecordHandle(void)
-	?getUri@RFCOMMPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 22 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::RFCOMMPushServerConnection::getUri(void) const
-	?initializeServiceRecord@RFCOMMServerConnection@bluetooth@java@@QAEHHAAVTUUID@@AAVTDesC8@@_N@Z @ 23 NONAME ; int java::bluetooth::RFCOMMServerConnection::initializeServiceRecord(int, class TUUID &, class TDesC8 &, bool)
-	?initializeServiceRecord@RFCOMMServerConnection@bluetooth@java@@QAEHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0_N@Z @ 24 NONAME ; int java::bluetooth::RFCOMMServerConnection::initializeServiceRecord(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, bool)
-	?isActive@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 25 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isActive(void)
-	?isConnectionAccepted@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 26 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isConnectionAccepted(void)
-	?isCreatedByPush@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 27 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isCreatedByPush(void)
-	?isGOEPConnection@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 28 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isGOEPConnection(void)
-	?isListening@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 29 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isListening(void)
-	?isMultipleSrvConnAllowed@BTRFCOMMServerConnectionFactory@@UAE_NXZ @ 30 NONAME ; bool BTRFCOMMServerConnectionFactory::isMultipleSrvConnAllowed(void)
-	?open@RFCOMMPushServerConnection@bluetooth@java@@UAEXPAVConnectionListener@push@3@@Z @ 31 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::open(class java::push::ConnectionListener *)
-	?openServer@RFCOMMServerConnection@bluetooth@java@@QAEH_N00@Z @ 32 NONAME ; int java::bluetooth::RFCOMMServerConnection::openServer(bool, bool, bool)
-	?restorePersistentRecord@RFCOMMServerConnection@bluetooth@java@@QAEHXZ @ 33 NONAME ; int java::bluetooth::RFCOMMServerConnection::restorePersistentRecord(void)
-	?setAcceptMonitor@RFCOMMPushServerConnection@bluetooth@java@@QAEXPAVMonitor@util@3@@Z @ 34 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setAcceptMonitor(class java::util::Monitor *)
-	?setCreatedByPush@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 35 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setCreatedByPush(void)
-	?setFilter@RFCOMMPushServerConnection@bluetooth@java@@UAEXABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 36 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setFilter(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
-	?unsetAcceptMonitor@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 37 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::unsetAcceptMonitor(void)
-	?unsetClearServiceClassBitsFlag@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 38 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::unsetClearServiceClassBitsFlag(void)
+	?initializeServiceRecord@RFCOMMServerConnection@bluetooth@java@@QAEHHAAVTUUID@@AAVTDesC8@@_N@Z @ 9 NONAME ; int java::bluetooth::RFCOMMServerConnection::initializeServiceRecord(int, class TUUID &, class TDesC8 &, bool)
+	??0RFCOMMServerConnection@bluetooth@java@@QAE@PAVBluetoothFunctionServer@12@@Z @ 10 NONAME ; java::bluetooth::RFCOMMServerConnection::RFCOMMServerConnection(class java::bluetooth::BluetoothFunctionServer *)
+	?open@RFCOMMPushServerConnection@bluetooth@java@@UAEXPAVConnectionListener@push@3@@Z @ 11 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::open(class java::push::ConnectionListener *)
+	?createSrvConnObj@BTRFCOMMServerConnectionFactory@@UAEPAVServerConnection@push@java@@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0@Z @ 12 NONAME ; class java::push::ServerConnection * BTRFCOMMServerConnectionFactory::createSrvConnObj(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?restorePersistentRecord@RFCOMMServerConnection@bluetooth@java@@QAEHXZ @ 13 NONAME ; int java::bluetooth::RFCOMMServerConnection::restorePersistentRecord(void)
+	?getConnectedClient@RFCOMMPushServerConnection@bluetooth@java@@QAEPAVBluetoothClientConnection@23@XZ @ 14 NONAME ; class java::bluetooth::BluetoothClientConnection * java::bluetooth::RFCOMMPushServerConnection::getConnectedClient(void)
+	??0RFCOMMPushServerConnection@bluetooth@java@@QAE@V?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0PAVServerConnectionFactoryBase@push@2@@Z @ 15 NONAME ; java::bluetooth::RFCOMMPushServerConnection::RFCOMMPushServerConnection(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class java::push::ServerConnectionFactoryBase *)
+	??1RFCOMMServerConnection@bluetooth@java@@QAE@XZ @ 16 NONAME ; java::bluetooth::RFCOMMServerConnection::~RFCOMMServerConnection(void)
+	?isActive@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 17 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isActive(void)
+	?setFilter@RFCOMMPushServerConnection@bluetooth@java@@UAEXABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 18 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setFilter(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?getUri@RFCOMMPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 19 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::RFCOMMPushServerConnection::getUri(void) const
+	?isMultipleSrvConnAllowed@BTRFCOMMServerConnectionFactory@@UAE_NXZ @ 20 NONAME ; bool BTRFCOMMServerConnectionFactory::isMultipleSrvConnAllowed(void)
+	?getServerObject@RFCOMMPushServerConnection@bluetooth@java@@QAEPAVRFCOMMServerConnection@23@XZ @ 21 NONAME ; class java::bluetooth::RFCOMMServerConnection * java::bluetooth::RFCOMMPushServerConnection::getServerObject(void)
+	??1BTRFCOMMServerConnectionFactory@@UAE@XZ @ 22 NONAME ; BTRFCOMMServerConnectionFactory::~BTRFCOMMServerConnectionFactory(void)
+	??0BTRFCOMMServerConnectionFactory@@QAE@XZ @ 23 NONAME ; BTRFCOMMServerConnectionFactory::BTRFCOMMServerConnectionFactory(void)
+	?create@BTRFCOMMServerConnectionFactory@@UAEPAVServerConnection@push@java@@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 24 NONAME ; class java::push::ServerConnection * BTRFCOMMServerConnectionFactory::create(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
+	?getFilter@RFCOMMPushServerConnection@bluetooth@java@@UBE?AV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ @ 25 NONAME ; class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > java::bluetooth::RFCOMMPushServerConnection::getFilter(void) const
+	?unsetAcceptMonitor@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 26 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::unsetAcceptMonitor(void)
+	?ServerOpen@RFCOMMServerConnection@bluetooth@java@@QAEHHHH@Z @ 27 NONAME ; int java::bluetooth::RFCOMMServerConnection::ServerOpen(int, int, int)
+	?setAcceptMonitor@RFCOMMPushServerConnection@bluetooth@java@@QAEXPAVMonitor@util@3@@Z @ 28 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::setAcceptMonitor(class java::util::Monitor *)
+	?close@RFCOMMPushServerConnection@bluetooth@java@@UAEXXZ @ 29 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::close(void)
+	?initializeServiceRecord@RFCOMMServerConnection@bluetooth@java@@QAEHHV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@0_N@Z @ 30 NONAME ; int java::bluetooth::RFCOMMServerConnection::initializeServiceRecord(int, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> >, bool)
+	?isGOEPConnection@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 31 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isGOEPConnection(void)
+	?unsetClearServiceClassBitsFlag@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 32 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::unsetClearServiceClassBitsFlag(void)
+	??1RFCOMMPushServerConnection@bluetooth@java@@UAE@XZ @ 33 NONAME ; java::bluetooth::RFCOMMPushServerConnection::~RFCOMMPushServerConnection(void)
+	?isConnectionAccepted@RFCOMMPushServerConnection@bluetooth@java@@QAE_NXZ @ 34 NONAME ; bool java::bluetooth::RFCOMMPushServerConnection::isConnectionAccepted(void)
+	?deleteServer@RFCOMMPushServerConnection@bluetooth@java@@QAEXXZ @ 35 NONAME ; void java::bluetooth::RFCOMMPushServerConnection::deleteServer(void)
+	?getFactory@BTRFCOMMServerConnectionFactory@@SAAAV1@XZ @ 36 NONAME ; class BTRFCOMMServerConnectionFactory & BTRFCOMMServerConnectionFactory::getFactory(void)
+	?openServer@RFCOMMServerConnection@bluetooth@java@@QAEH_N00@Z @ 37 NONAME ; int java::bluetooth::RFCOMMServerConnection::openServer(bool, bool, bool)
 
--- a/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/eabi/javabtsppscpluginu.def	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/eabi/javabtsppscpluginu.def	Tue May 25 12:34:19 2010 +0300
@@ -44,10 +44,10 @@
 	_ZN4java9bluetooth26RFCOMMPushServerConnectionD2Ev @ 43 NONAME
 	_ZNK4java9bluetooth26RFCOMMPushServerConnection6getUriEv @ 44 NONAME
 	_ZNK4java9bluetooth26RFCOMMPushServerConnection9getFilterEv @ 45 NONAME
-	_ZTI31BTRFCOMMServerConnectionFactory @ 46 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth22RFCOMMServerConnectionE @ 47 NONAME ; #<TI>#
-	_ZTIN4java9bluetooth26RFCOMMPushServerConnectionE @ 48 NONAME ; #<TI>#
-	_ZTV31BTRFCOMMServerConnectionFactory @ 49 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth22RFCOMMServerConnectionE @ 50 NONAME ; #<VT>#
-	_ZTVN4java9bluetooth26RFCOMMPushServerConnectionE @ 51 NONAME ; #<VT>#
+	_ZTI31BTRFCOMMServerConnectionFactory @ 46 NONAME
+	_ZTIN4java9bluetooth22RFCOMMServerConnectionE @ 47 NONAME
+	_ZTIN4java9bluetooth26RFCOMMPushServerConnectionE @ 48 NONAME
+	_ZTV31BTRFCOMMServerConnectionFactory @ 49 NONAME
+	_ZTVN4java9bluetooth22RFCOMMServerConnectionE @ 50 NONAME
+	_ZTVN4java9bluetooth26RFCOMMPushServerConnectionE @ 51 NONAME
 
--- a/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/javabtsppscplugin_0x2002DC9C.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/build/javabtsppscplugin_0x2002DC9C.mmp	Tue May 25 12:34:19 2010 +0300
@@ -90,6 +90,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -110,10 +123,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/inc.s60/btrfcommserverconnection.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothplugins/btspppushplugin/inc.s60/btrfcommserverconnection.h	Tue May 25 12:34:19 2010 +0300
@@ -39,6 +39,7 @@
 public:
     OS_IMPORT RFCOMMServerConnection(
         java::bluetooth::BluetoothFunctionServer* server);
+            
     OS_IMPORT ~RFCOMMServerConnection();
 
     OS_IMPORT int openServer(bool authorize, bool authenticate, bool encrypt);
@@ -60,12 +61,10 @@
     OS_IMPORT int restorePersistentRecord();
 
     OS_IMPORT int
-    ServerOpen(TBool authorize, TBool authenticate, TBool encrypt);
+        ServerOpen(TBool authorize, TBool authenticate, TBool encrypt);
 
     OS_IMPORT long Accept();
 
-    OS_IMPORT int CloseServer();
-
     OS_IMPORT int GetRfListeningChannel();
 
     OS_IMPORT ServiceRecord *getServiceRecordHandle();
@@ -97,6 +96,8 @@
 
     void avoidFilter();
 
+    int CloseServer();
+
 private:
     RFCOMMServerConnection();
 
--- a/javaextensions/bluetooth/omjbluetooth/build/javabluetooth_0x2002DC98.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/bluetooth/omjbluetooth/build/javabluetooth_0x2002DC98.mmp	Tue May 25 12:34:19 2010 +0300
@@ -96,6 +96,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -116,10 +129,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/broadcast_stub/build/javabroadcast_0x2002DCE0.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/broadcast_stub/build/javabroadcast_0x2002DCE0.mmp	Tue May 25 12:34:19 2010 +0300
@@ -69,6 +69,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -89,10 +102,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/comm/build/javacomm_0x2002DCA5.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/comm/build/javacomm_0x2002DCA5.mmp	Tue May 25 12:34:19 2010 +0300
@@ -84,6 +84,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -104,10 +116,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/comm/javasrc.linux/com/nokia/mj/impl/gcf/protocol/comm/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.comm;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.comm.CommConnectionImpl;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.utils.Logger;
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javacomm");
-        }
-        catch (Exception e)
-        {
-
-        }
-    }
-
-    public Protocol()
-    {
-
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        /* security related stuff */
-
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        CommPermissionImpl per = new CommPermissionImpl("comm:*");
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,"calling check permissions from protocol");
-        appUtils.checkPermission(per);
-        /* security related stuff */
-
-        return new CommConnectionImpl(aUri, aMode, aTimeouts);
-    }
-
-    public javax.microedition.io.Connection openConn(String name, int mode,
-            boolean timeouts) throws IOException
-    {
-        return openConnection(name, mode, timeouts);
-    }
-
-}
--- a/javaextensions/datagram/datagram/build/javadatagram_0x2002DCA9.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/datagram/datagram/build/javadatagram_0x2002DCA9.mmp	Tue May 25 12:34:19 2010 +0300
@@ -82,6 +82,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -102,10 +115,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/datagram/datagram/javasrc.linux/com/nokia/mj/impl/gcf/protocol/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.datagram;
-
-import java.io.IOException;
-import com.nokia.mj.impl.rt.support.Jvm;
-import com.nokia.mj.impl.gcf.utils.ProtocolBase;
-import com.nokia.mj.impl.datagram.UDPDatagramConnectionImpl;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.utils.Logger;
-
-
-public class Protocol implements ProtocolBase
-{
-
-    static
-    {
-        try
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "Before Loading datagram native");
-            Jvm.loadSystemLibrary("javadatagram");
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                       "Loaded datagram native");
-        }
-        catch (Exception e)
-        {
-            Logger.LOG(Logger.ESOCKET, Logger.EInfo, e.toString());
-        }
-    }
-
-    public Protocol()
-    {
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo, "+Protocol");
-    }
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-
-        Logger.LOG(Logger.ESOCKET, Logger.EInfo,
-                   "+openConnection-udpdatagramconnection - aUri = "+aUri);
-
-        return new UDPDatagramConnectionImpl(aUri, aMode, aTimeouts);
-    }
-
-    public javax.microedition.io.Connection openConn(String aName, int aMode,
-            boolean aTimeouts) throws IOException
-    {
-        return openConnection(aName, aMode, aTimeouts);
-    }
-
-}
--- a/javaextensions/datagram/datagram/src.linux/apnsettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ApnSettings.app
-*
-*/
-
-
-
-#include "apnsettings.h"
-
-using namespace java;
-
-int ApnSettings::setDefaultApn(int aType, int aApn)
-{
-    /*
-    This is dummy implementation
-    setting of apn in linux is not supported currently
-    */
-    return 0;
-}
-void ApnSettings::removeDefaultApn()
-{
-    /*
-    This is dummy implementation
-    removal of apn in linux is not supported currently
-    */
-}
--- a/javaextensions/datagram/datagram/src.s60/apnsettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/datagram/datagram/src.s60/apnsettings.cpp	Tue May 25 12:34:19 2010 +0300
@@ -68,14 +68,10 @@
 
 void ApnSettings::removeDefaultApn()
 {
-
-    int def = 0;
-
-#ifdef RD_JAVA_OPENC_BETA_PATCH
-    def = setdefaultif(NULL);
-    ILOG(ESOCKET, "sedefaultif called");
-#endif
-    (void)def; //just to suppress a warning
-    ILOG1(ESOCKET, "remove default apn returned %d",def);
-
+    #ifdef RD_JAVA_OPENC_BETA_PATCH
+        setdefaultif(NULL);
+        
+        ILOG(ESOCKET, "sedefaultif called");
+        ILOG1(ESOCKET, "remove default apn returned %d",setdefaultif(NULL));
+    #endif 
 }
--- a/javaextensions/datagram/serverconnection/build/javadatagramscplugin_0x2002DCAA.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/datagram/serverconnection/build/javadatagramscplugin_0x2002DCAA.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/globalindicators/build/javaglobalindicators_0x2002DCAF.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/globalindicators/build/javaglobalindicators_0x2002DCAF.mmp	Tue May 25 12:34:19 2010 +0300
@@ -80,6 +80,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -100,10 +112,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/iapinfo/build/javaiapinfo_0x2002DCB3.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/iapinfo/build/javaiapinfo_0x2002DCB3.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/location/build/javalocation_0x2002DCBC.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/location/build/javalocation_0x2002DCBC.mmp	Tue May 25 12:34:19 2010 +0300
@@ -124,6 +124,18 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -144,10 +156,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/location/tsrc/junit/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-Created-By: 1.3.1_14 (Sun Microsystems Inc.)
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-MIDlet-1: JsrTestRunner,/res/JsrTestRunner.png,JsrTestRunner.JsrTestRunner
-MIDlet-Name: JsrTestRunner
-MIDlet-Jar-Size: 7291
-MIDlet-Jar-URL: JsrTestRunner.jar
-ModuleName: LAPI
-TestClassName1: com.nokia.mj.test.lapi.CoordinatesTest
-TestClassName2: com.nokia.mj.test.lapi.QualifiedCoordinatesTest
-TestClassName3: com.nokia.mj.test.lapi.AddressInfoTest
-TestClassName4: com.nokia.mj.test.lapi.CriteriaTest
-TestClassName5: com.nokia.mj.test.lapi.LandmarkStoreTest
-TestClassName6: com.nokia.mj.test.lapi.LandmarkTest
-TestClassName7: com.nokia.mj.test.lapi.MultipleLandmarkStoresTest
-TestClassName8: com.nokia.mj.test.lapi.ErrorsTest
-TestClassName9: com.nokia.mj.test.lapi.GetLocationTest
-TestClassName10: com.nokia.mj.test.lapi.PeriodicUpdateTest
-TestClassName11: com.nokia.mj.test.lapi.OrientationTest
-TestClassName12: com.nokia.mj.test.lapi.ProximityListenerTest
--- a/javaextensions/location/tsrc/junit/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="LocationTests" default="deploy.ut" basedir=".">
-  
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property name="src.dir" location="./src"/>
-  <property name="build.dir" location="."/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="jar_dir" value="${classes.dir}"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="locationTests.jar.filename" value="LocationTests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
- <target name="init.component.properties">
-      <property name="dist"
-               value="${vm.extension.directory}"/>
-      <echo message="dist = ${dist}"/>  
-      <echo message="java.src.paths = ${java.src.paths}"/>
-  </target>
-
-<!--property name="dist" location="${java.bin.root}/jsr/classes"/-->
-
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${locationTests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    <ant antfile="${java.src.root}/tools/junit/JsrTestRunner/build/build.xml">
-
-    </ant>
-  </target>
-
-  <target name="deploy.ut" depends="compile.ut">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${locationTests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean"/>
-
- </project> 
--- a/javaextensions/location/tsrc/junit/setup.py	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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: 
-#
-
-import os
-
-def setup():
-    
-    # NPP and BT GPS PSY Cenrep file location
-    btpsyfile = "\\epoc32\\RELEASE\\winscw\\UDEB\\Z\\private\\10202be9\\101FE999.txt"
-    npppsyfile = "\\epoc32\\RELEASE\\winscw\\UDEB\\Z\\private\\10202be9\\10206915.txt"
-
-    # Path where landmark databases lie in the emulator environment
-    lmpath = "\\epoc32\\winscw\\c\\Private\\100012a5\\"
-
-    print "Setup for Location API module tests"
-
-    if (os.path.isfile(btpsyfile)):
-        # Remove old temp file if still exists
-        if( os.path.isfile(btpsyfile+'.tmp')):
-            os.remove(btpsyfile+'.tmp')
-        # Rename existing Bluetooth GPS PSY file to temp file
-        os.rename(btpsyfile,btpsyfile+'.tmp')
-        print "Renamed: " + btpsyfile
-    if (os.path.isfile(npppsyfile)):
-        # Remove old temp file if still exists
-        if( os.path.isfile(npppsyfile+'.tmp')):
-            os.remove(npppsyfile+'.tmp')
-        # Rename existing NPP PSY file to temp file
-        os.rename(npppsyfile,npppsyfile+'.tmp')
-        print "Renamed: " + npppsyfile
-        
-    # Compile test PSY to the emulator environment
-    if (os.path.exists('..\\ViperTestPSY\\group\\')):
-        os.chdir(r'..\\ViperTestPSY\\group\\')
-        os.system(r'bldmake bldfiles')
-        os.system(r'abld cleanexport')
-        os.system(r'abld build winscw udeb')
-
-    # Remove existing landmark databases from the emulator
-    if (os.path.exists(lmpath)):
-        print "Deleting landmark databases"
-        os.system(r'del '+lmpath+'*.ldb')
-
-    print "Setup is done."
-
-if __name__ == "__main__":
-	# If this module was started as the main module (given as the py-file to
-	# python.exe) take command line arguments and pass them to replaceFile
-	setup()
--- a/javaextensions/location/tsrc/junit/src/automatic/AddressInfoTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * This suite of testcases tests that: - AddressInfo object can be created and
- * changed - legal parameters are accepted - illegal parameters are not accepted
- *
- */
-
-public class AddressInfoTest extends TestCase
-{
-    private AddressInfo currentAddressInfo;
-
-    public AddressInfoTest()
-    {
-    }
-
-    public AddressInfoTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new AddressInfoTest("testConstructor", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((AddressInfoTest) tc).testConstructor();
-            }
-        }));
-
-        aSuite.addTest(new AddressInfoTest("testSetters", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((AddressInfoTest) tc).testSetters();
-            }
-        }));
-
-        aSuite.addTest(new AddressInfoTest("testIllegalArgumentSet",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((AddressInfoTest) tc).testIllegalArgumentSet();
-            }
-        }));
-
-        aSuite.addTest(new AddressInfoTest("testIllegalArgumentGet",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((AddressInfoTest) tc).testIllegalArgumentGet();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    // Test that constructor works and that default values are correct.
-    public void testConstructor()
-    {
-        // Create a AddressInfo object with correct parameters and check that
-        // the values are unchanged when read.
-        AddressInfo addrInfo = new AddressInfo();
-
-        // Check the defaults
-        assertTrue("Default AddressInfo values incorrect", addrInfo
-                   .getField(AddressInfo.EXTENSION) == null
-                   && addrInfo.getField(AddressInfo.STREET) == null
-                   && addrInfo.getField(AddressInfo.POSTAL_CODE) == null
-                   && addrInfo.getField(AddressInfo.CITY) == null
-                   && addrInfo.getField(AddressInfo.COUNTY) == null
-                   && addrInfo.getField(AddressInfo.DISTRICT) == null
-                   && addrInfo.getField(AddressInfo.STATE) == null
-                   && addrInfo.getField(AddressInfo.COUNTRY) == null
-                   && addrInfo.getField(AddressInfo.COUNTRY_CODE) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_NAME) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_FLOOR) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_ROOM) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_ZONE) == null
-                   && addrInfo.getField(AddressInfo.CROSSING1) == null
-                   && addrInfo.getField(AddressInfo.CROSSING2) == null
-                   && addrInfo.getField(AddressInfo.URL) == null
-                   && addrInfo.getField(AddressInfo.PHONE_NUMBER) == null);
-    }
-
-    // Test that all the setters work correctly.
-    public void testSetters()
-    {
-
-        // List the new values
-        String extension = "Flat 4";
-        String street = "11 Mount Avenue";
-        String city = "London";
-        String county = "Ealing";
-        String postal_code = "W5 1QB";
-        String state = "England";
-        String district = "Middlesex";
-        String country = "United Kingdom";
-        String country_code = "GB";
-        String building_name = "The Castle";
-        String building_floor = "3";
-        String building_room = "Front Room";
-        String building_zone = "Upstairs";
-        String crossing1 = "Mount Avenue";
-        String crossing2 = "Eaton Rise";
-        String url = "http://www.upmystreet.co.uk";
-        String phone_number = "+358401234567";
-
-        // Define a AddressInfo object with non-default parameters and check
-        // that the values are unchanged when read.
-        AddressInfo addrInfo = new AddressInfo();
-        addrInfo.setField(AddressInfo.EXTENSION, extension);
-        addrInfo.setField(AddressInfo.STREET, street);
-        addrInfo.setField(AddressInfo.POSTAL_CODE, postal_code);
-        addrInfo.setField(AddressInfo.CITY, city);
-        addrInfo.setField(AddressInfo.COUNTY, county);
-        addrInfo.setField(AddressInfo.DISTRICT, district);
-        addrInfo.setField(AddressInfo.STATE, state);
-        addrInfo.setField(AddressInfo.COUNTRY, country);
-        addrInfo.setField(AddressInfo.COUNTRY_CODE, country_code);
-        addrInfo.setField(AddressInfo.BUILDING_NAME, building_name);
-        addrInfo.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-        addrInfo.setField(AddressInfo.BUILDING_ROOM, building_room);
-        addrInfo.setField(AddressInfo.BUILDING_ZONE, building_zone);
-        addrInfo.setField(AddressInfo.CROSSING1, crossing1);
-        addrInfo.setField(AddressInfo.CROSSING2, crossing2);
-        addrInfo.setField(AddressInfo.URL, url);
-        addrInfo.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-        // Check that the retrieved values are the same as the input ones
-        assertTrue(
-            "Retrieved AddressInfo values different from input",
-            addrInfo.getField(AddressInfo.EXTENSION) == extension
-            && addrInfo.getField(AddressInfo.STREET) == street
-            && addrInfo.getField(AddressInfo.POSTAL_CODE) == postal_code
-            && addrInfo.getField(AddressInfo.CITY) == city
-            && addrInfo.getField(AddressInfo.COUNTY) == county
-            && addrInfo.getField(AddressInfo.DISTRICT) == district
-            && addrInfo.getField(AddressInfo.STATE) == state
-            && addrInfo.getField(AddressInfo.COUNTRY) == country
-            && addrInfo.getField(AddressInfo.COUNTRY_CODE) == country_code
-            && addrInfo.getField(AddressInfo.BUILDING_NAME) == building_name
-            && addrInfo.getField(AddressInfo.BUILDING_FLOOR) == building_floor
-            && addrInfo.getField(AddressInfo.BUILDING_ROOM) == building_room
-            && addrInfo.getField(AddressInfo.BUILDING_ZONE) == building_zone
-            && addrInfo.getField(AddressInfo.CROSSING1) == crossing1
-            && addrInfo.getField(AddressInfo.CROSSING2) == crossing2
-            && addrInfo.getField(AddressInfo.URL) == url
-            && addrInfo.getField(AddressInfo.PHONE_NUMBER) == phone_number);
-    }
-
-    // Test that an exception is thrown if the field used in setter is
-    // undefined.
-    public void testIllegalArgumentSet()
-    {
-        AddressInfo addrInfo = new AddressInfo();
-
-        // List the illegal field and value to set
-        int illegalField = 77;
-        String street = "11 Mount Avenue";
-
-        try
-        {
-            addrInfo.setField(illegalField, street);
-
-            // If this point is reached, something is wrong
-            assertTrue("No exception thrown when illegal field used", false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-
-    // Test that an exception is thrown if the requested field is undefined.
-    public void testIllegalArgumentGet()
-    {
-        AddressInfo addrInfo = new AddressInfo();
-
-        int illegalField = 77;
-
-        try
-        {
-            addrInfo.getField(illegalField);
-
-            // If this point is reached, something is wrong
-            assertTrue("No exception thrown when illegal field used", false);
-
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/CoordinatesTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,948 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * This suite of testcases tests that: - Coordinates object can be created and
- * changed - legal parameters are accepted - illegal parameters are not accepted
- *
- */
-
-public class CoordinatesTest extends TestCase
-{
-    protected double iLat;
-
-    protected double iLon;
-
-    protected float iAlt;
-
-    protected final static float[] LEGAL_ALT_VALUES = { Float.NaN,
-            Float.MAX_VALUE, -Float.MAX_VALUE, Float.MIN_VALUE,
-            Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY
-                                                      };
-
-    public CoordinatesTest()
-    {
-    }
-
-    public CoordinatesTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new CoordinatesTest("testGoodArguments",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testGoodArguments();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testBadArguments",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testArgumentsRange",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testArgumentsRange();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathNormal",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathNormal();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathReverse",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathReverse();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathShortDistance",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathShortDistance();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathPolar",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathPolar();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathSameCoords",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathSameCoords();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathNullCoord",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathNullCoord();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertFromStringBadArguments",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc)
-                .testConvertFromStringBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertFromString_DD_MM",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testConvertFromString_DD_MM();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertFromString_DD_MM_SS",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testConvertFromString_DD_MM_SS();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertToStringBadArguments",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc)
-                .testConvertToStringBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertToString_DD_MM",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testConvertToString_DD_MM();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testConvertToString_DD_MM_SS",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testConvertToString_DD_MM_SS();
-            }
-        }));
-
-        aSuite.addTest(new CoordinatesTest("testLocationMathThreadSafe",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CoordinatesTest) tc).testLocationMathThreadSafe();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    public void testGoodArguments()
-    {
-
-        // Test some values in allowed range
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // tests -lat, -lon and -alt too
-        assertReallyGood(lat, lon, alt);
-
-        // Test some legal values for alt
-        for (int i = 0; i < LEGAL_ALT_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, LEGAL_ALT_VALUES[i]);
-        }
-        assertTrue("", true);
-    }
-
-    public void testBadArguments()
-    {
-
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // Test that NaN is illegal for lat, lon
-        assertBad(Double.NaN, lon, alt);
-        assertBad(lat, Double.NaN, alt);
-        assertBad(Double.NaN, Double.NaN, alt);
-
-        // Test some more bad values for lat
-        assertBad(Double.MAX_VALUE, lon, alt);
-        assertBad(Double.POSITIVE_INFINITY, lon, alt);
-        assertBad(Double.NEGATIVE_INFINITY, lon, alt);
-
-        // Test some more bad values for lon
-        assertBad(lat, Double.MAX_VALUE, alt);
-        assertBad(lat, Double.POSITIVE_INFINITY, alt);
-        assertBad(lat, Double.NEGATIVE_INFINITY, alt);
-
-        assertTrue("", true);
-    }
-
-    // Tests range of allowed values.
-    public void testArgumentsRange()
-    {
-
-        // Test maximum allowed values
-        double lat = 90.0d;
-        double lon = 179.99999999999d;
-        float alt = Float.POSITIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test minimum allowed values
-        lat = -90.0d;
-        lon = -180.0d;
-        alt = Float.NEGATIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test out of range positive values
-        lat = 0;
-        lon = 0;
-        double badLat = 90.0000000000001d;
-        double badLon = 180.0d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        // Test out of range negative values
-        badLat = -90.000000000001d;
-        badLon = -180.00000000001d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        assertTrue("", true);
-    }
-
-    // Tests that a 'normal' calculation computes correct results.
-    public void testLocationMathNormal()
-    {
-
-        try
-        {
-            // Define the expected results
-            float expectedDistance = 407342.9950f; // from www.fai.org
-            float expectedBearing = 33.2208175f; // from www.fai.org
-
-            checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                    new Coordinates(60.0, 21.0, 2000.0f), expectedDistance,
-                                    expectedBearing);
-
-            // Define the expected results
-            expectedDistance = 6500256.303349322f; // from www.fai.org
-            expectedBearing = 200.08970684975316f; // from www.fai.org
-
-            checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                    new Coordinates(0.0, 0.0, 2000.0f), expectedDistance,
-                                    expectedBearing);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-
-    }
-
-    // Tests that the reverse of the 'normal' calculation computes correct
-    public void testLocationMathReverse()
-    {
-
-        try
-        {
-            // Create two Coordinates object with 'normal' parameters and
-            // check that the computed distance and bearing are correct
-            Coordinates fromCoords = new Coordinates(60.0, 21.0, 2000.0f);
-            Coordinates toCoords = new Coordinates(57.0, 17.0, -1000.0f);
-
-            // Define the expected results
-            float expectedDistance = (float) 407342.9950; // from www.fai.org
-            float expectedBearing = (float) 216.63292698852845; // from
-            // www.fai.org
-
-            checkDistanceAndAzimuth(fromCoords, toCoords, expectedDistance,
-                                    expectedBearing);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that a 'normal' calculation computes correct results.
-    public void testLocationMathShortDistance()
-    {
-
-        try
-        {
-            // Define the expected results
-            float expectedDistance = 789.11491522f; // from www.fai.org
-            float expectedBearing = 44.96957375f; // from www.fai.org
-
-            checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                    new Coordinates(57.005013, 17.009178, 2000.0f),
-                                    expectedDistance, expectedBearing);
-
-            checkDistanceAndAzimuth(new Coordinates(0, 0, 0.0f),
-                                    new Coordinates(0, 0.00001, 0.0f), 1.11319f, 90.0f);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that polar values give correct results.
-    public void testLocationMathPolar()
-    {
-
-        try
-        {
-            Coordinates northPole = new Coordinates(90.0, 0.0, 0.0f);
-            Coordinates southPole = new Coordinates(-90.0, 0.0, 0.0f);
-
-            // Define the expected results
-            float expectedDistance = 20003931.458622963f; // from www.fai.org
-
-            checkDistanceAndAzimuth(northPole, southPole, expectedDistance,
-                                    180.0f);
-            checkDistanceAndAzimuth(southPole, northPole, expectedDistance,
-                                    0.0f);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that same coordinates doesn't cause exception.
-    public void testLocationMathSameCoords()
-    {
-
-        try
-        {
-            // Expected results
-            float expectedDistance = 0.0f;
-            float expectedBearing = 0.0f;
-
-            checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, 0.0f),
-                                    new Coordinates(57.0, 17.0, 0.0f), expectedDistance,
-                                    expectedBearing);
-
-            // Altitude should not be used in distance and azimuth calculation
-            checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, 4000.0f),
-                                    new Coordinates(57.0, 17.0, -1000.0f), expectedDistance,
-                                    expectedBearing);
-
-            // North pole
-            checkDistanceAndAzimuth(new Coordinates(90.0, 10.0, 0.0f),
-                                    new Coordinates(90.0, 10.0, 0.0f), expectedDistance,
-                                    expectedBearing);
-
-            // South pole
-            checkDistanceAndAzimuth(new Coordinates(-90.0, 10.0, 0.0f),
-                                    new Coordinates(-90.0, 10.0, 0.0f), expectedDistance,
-                                    expectedBearing);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that a null coordinate causes exception.
-    public void testLocationMathNullCoord()
-    {
-
-        Coordinates fromCoords = new Coordinates(57.0, 17.0, -1000.0f);
-        try
-        {
-            float distance = fromCoords.distance(null);
-            assertContinue("NullPointerException was never thrown", false);
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-
-        try
-        {
-            float azimuth = fromCoords.azimuthTo(null);
-            assertContinue("NullPointerException was never thrown", false);
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-        assertTrue("", true);
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertFromStringBadArguments()
-    {
-        try
-        {
-            double result = Coordinates.convert(null);
-            assertContinue("NullPointerException was never thrown", false);
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-
-        // Illegal values
-        assertConvertBad("");
-        assertConvertBad("44.44");
-        assertConvertBad("1234");
-        assertConvertBad("123A");
-        assertConvertBad("convertThis!");
-
-        // DD:MM
-        assertConvertBad(":"); // empty
-        assertConvertBad("a:11"); // Degrees illegal value
-        assertConvertBad("1#:11"); // Degrees illegal value
-        assertConvertBad("a1:11"); // Degrees illegal value
-        assertConvertBad("+90:22"); // Degrees illegal value
-        assertConvertBad("90@:22"); // Degrees illegal value
-        assertConvertBad("1?2:33"); // Degrees illegal value
-        assertConvertBad("-x12:44"); // Degrees illegal value
-        assertConvertBad("01:10"); // starts with 0
-        assertConvertBad("011:11"); // starts with 0
-        assertConvertBad("-09:12"); // starts with -0
-        assertConvertBad("-099:19"); // starts with -0
-        assertConvertBad("180:00"); // >= 180
-        assertConvertBad("-181:01"); // < -180
-        assertConvertBad("-180:59.99999"); // < -180
-        assertConvertBad("60:0"); // Minutes < 10 does not start with 0
-        assertConvertBad("-160:1"); // Minutes < 10 does not start with 0
-        assertConvertBad("70:9.9"); // Minutes < 10 does not start with 0
-        assertConvertBad("20:300"); // Minutes > 59
-        assertConvertBad("-10:60"); // Minutes > 59
-        assertConvertBad("80:-1"); // Minutes < 0
-        assertConvertBad("90:+2"); // Minutes illegal value
-        assertConvertBad("90:?2"); // Minutes illegal value
-        assertConvertBad("80:33+1"); // Minutes illegal value
-        assertConvertBad("90:44;5"); // Minutes illegal value
-        assertConvertBad("-70:12.123456"); // Minutes too many decimals
-
-        // DD:MM:SS
-        assertConvertBad("::"); // empty
-        assertConvertBad("b:11:11"); // Degrees illegal value
-        assertConvertBad("1$:11:22"); // Degrees illegal value
-        assertConvertBad("c1:11:33"); // Degrees illegal value
-        assertConvertBad("*90:22:44"); // Degrees illegal value
-        assertConvertBad("90!:22:55"); // Degrees illegal value
-        assertConvertBad("1-2:33:01"); // Degrees illegal value
-        assertConvertBad("-z12:44:02"); // Degrees illegal value
-        assertConvertBad(":10:20"); // starts with :
-        assertConvertBad("01:10:20"); // starts with 0
-        assertConvertBad("010:10:21"); // starts with 0
-        assertConvertBad("-09:10:22"); // starts with -0
-        assertConvertBad("-090:10:29"); // starts with -0
-        assertConvertBad("180:00:00"); // >= 180
-        assertConvertBad("280:59:59"); // >= 180
-        assertConvertBad("-181:00:00"); // < -180
-        assertConvertBad("-180:01:00"); // < -180
-        assertConvertBad("-180:00:00.001"); // < -180
-        assertConvertBad("12:3:40"); // Minutes < 10 does not start with 0
-        assertConvertBad("56:07.8:09"); // Minutes has decimals
-        assertConvertBad("31:17.33:12"); // Minutes has decimals
-        assertConvertBad("100:60:10"); // Minutes > 59
-        assertConvertBad("20:300:21"); // Minutes > 59
-        assertConvertBad("-10:60:01"); // Minutes > 59
-        assertConvertBad("80:-1:11"); // Minutes illegal value
-        assertConvertBad("90:?2:22"); // Minutes illegal value
-        assertConvertBad("80:3+:33"); // Minutes illegal value
-        assertConvertBad("90:4;:44"); // Minutes illegal value
-        assertConvertBad("60:10:0"); // Seconds < 10 does not start with 0
-        assertConvertBad("59:59:1"); // Seconds < 10 does not start with 0
-        assertConvertBad("69:49:9.999"); // Seconds < 10 does not start with
-        // 0
-        assertConvertBad("89:29:60"); // Seconds > 59.999
-        assertConvertBad("-90:39:60.000"); // Seconds > 59.999
-        assertConvertBad("99:19:100"); // Seconds > 59.999
-        assertConvertBad("10:10:-1"); // Seconds illegal value
-        assertConvertBad("20:20:?2"); // Seconds illegal value
-        assertConvertBad("-123:45.x2"); // Seconds illegal value
-        assertConvertBad("30:30:3+.3"); // Seconds illegal value
-        assertConvertBad("40:40:4;.4"); // Seconds illegal value
-        assertConvertBad("-80:01:31..97"); // Seconds illegal value
-        assertConvertBad("9:09:12.1234"); // Seconds too many decimals
-        assertConvertBad("-70:30:12.3456"); // Seconds too many decimals
-
-        assertTrue("", true);
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertFromString_DD_MM()
-    {
-
-        try
-        {
-            // All legal values that should be equal to zero
-            String[] zeroValues = { "0:00", "0:00.0", "0:00.00", "0:00.000",
-                                    "0:00.0000", "0:00.00000", "-0:00", "-0:00.0", "-0:00.00",
-                                    "-0:00.000", "-0:00.0000", "-0:00.00000"
-                                  };
-
-            for (int i = 0; i < zeroValues.length; ++i)
-            {
-                double zero = Coordinates.convert(zeroValues[i]);
-                assertContinue("Conversion failed for " + zeroValues[i] + ": "
-                               + zero + " != 0", zero == 0d);
-            }
-
-            // Define the input values
-            String[] strings = { "-0:00.06", "-0:30.0", "-0:00.5", "-59:40.4",
-                                 "-0:06.666", "0:39.996", "179:59.9994", "61:30.6"
-                               };
-
-            // Define the expected results
-            double[] expecteds = { -0.0010d, -0.5d, -0.00833d, -59.6733d,
-                                   -0.1111d, 0.6666d, 179.99999d, 61.51d
-                                 };
-
-            // Define the tolerance
-            double tol = 0.001d;
-
-            for (int i = 0; i < strings.length; ++i)
-            {
-                double result = Coordinates.convert(strings[i]);
-                assertContinue("Conversion failed for " + strings[i] + ": "
-                               + result + " != " + expecteds[i], Math.abs(expecteds[i]
-                                       - result) < tol);
-            }
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertFromString_DD_MM_SS()
-    {
-
-        try
-        {
-            // All legal values that should be equal to zero
-            String[] zeroValues = { "0:00:00", "0:00:00.0", "0:00:00.00",
-                                    "0:00:00.000", "-0:00:00", "-0:00:00.0", "-0:00:00.00",
-                                    "-0:00:00.000"
-                                  };
-
-            for (int i = 0; i < zeroValues.length; ++i)
-            {
-                double zero = Coordinates.convert(zeroValues[i]);
-                assertContinue("Conversion failed for " + zeroValues[i] + ": "
-                               + zero + " != 0", zero == 0d);
-            }
-
-            // Define the input values
-            String[] strings = { "-0:30:00.0", "-59:40", "-0:06:39.96",
-                                 "0:39:59.76", "179:59:59.964", "61:30:36"
-                               };
-
-            // Define the expected results
-            double[] expecteds = { -0.5d, -59.6667d, -0.1111d, 0.6666d,
-                                   179.99999d, 61.51d
-                                 };
-
-            // Define the tolerance
-            double tol = 0.0001d;
-
-            for (int i = 0; i < strings.length; i++)
-            {
-                double result = Coordinates.convert(strings[i]);
-                assertContinue("Conversion failed for " + strings[i] + ": "
-                               + result + " != " + expecteds[i], Math.abs(expecteds[i]
-                                       - result) < tol);
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertToStringBadArguments()
-    {
-
-        double[] badCoords = { Double.NaN, Double.MAX_VALUE, -Double.MAX_VALUE,
-                               Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, 180.0d,
-                               -180.0001d, 300.99999d
-                             };
-
-        for (int i = 0; i < badCoords.length; ++i)
-        {
-            assertConvertBad(badCoords[i], Coordinates.DD_MM);
-            assertConvertBad(badCoords[i], Coordinates.DD_MM_SS);
-        }
-
-        assertTrue("", true);
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertToString_DD_MM()
-    {
-
-        double[] coords = { 61.51d, 57.0d, 0.6666d, -0.1111d, 179.99999d,
-                            30.1234567d, 1.333333d, -5.1d, -97.99d, -180.0d, 0.01d, 0.0d,
-                            1.000013d, 80.133602d, 1.666666666666666e-7d, 10.9833333d,
-                            0.999999916666667d
-                          };
-
-        String[] expected = { "61:30.6", "57:00.0", "0:39.996", "-0:06.666",
-                              "179:59.9994", "30:07.4074", "1:19.99998", "-5:06.0",
-                              "-97:59.4", "-180:00.0", "0:00.6", "0:00.0", "1:00.00078",
-                              "80:08.01612", "0:00.00001", "10:59.0", "1:00.0"
-                            };
-
-        for (int i = 0; i < coords.length; i++)
-        {
-            String result = Coordinates.convert(coords[i], Coordinates.DD_MM);
-            assertContinue("Conversion failed for " + coords[i] + " (" + result
-                           + " != " + expected[i] + ")", expected[i].equals(result));
-        }
-        assertTrue("", true);
-    }
-
-    // Tests that the convert() function works.
-    public void testConvertToString_DD_MM_SS()
-    {
-
-        double[] coords = { 61.51d, 57.0d, 0.6666d, -0.1111d, 179.99999d,
-                            30.1234567d, 1.333333d, -5.1d, -97.99d, -180.0d,
-                            7.000277777777778d, 0.01d, 0.0d, -179.000002d, -16.4d,
-                            2.777777777777778e-7d, 7.001111d, -8.002222d,
-                            0.999999916666667d
-                          };
-
-        String[] expected = { "61:30:36.0", "57:00:00.0", "0:39:59.76",
-                              "-0:06:39.96", "179:59:59.964", "30:07:24.444", "1:19:59.999",
-                              "-5:06:00.0", "-97:59:24.0", "-180:00:00.0", "7:00:01.0",
-                              "0:00:36.0", "0:00:00.0", "-179:00:00.007", "-16:24:00.0",
-                              "0:00:00.001", "7:00:04.0", "-8:00:07.999", "1:00:00.0"
-                            };
-
-        for (int i = 0; i < coords.length; i++)
-        {
-            String result = Coordinates
-                            .convert(coords[i], Coordinates.DD_MM_SS);
-            assertContinue("Conversion failed for " + coords[i] + " (" + result
-                           + " != " + expected[i] + ")", expected[i].equals(result));
-        }
-        assertTrue("", true);
-    }
-
-    public void testLocationMathThreadSafe()
-    {
-
-        try
-        {
-            ThreadSafeTester t2 = new ThreadSafeTester();
-
-            Coordinates from = new Coordinates(57.0f, 17.0f, 0f);
-            Coordinates to = new Coordinates(60.0f, 21.0f, 0f);
-
-            t2.start();
-
-            for (int i = 0; i < 100; i++)
-            {
-                float d = from.distance(to);
-                float a = from.azimuthTo(to);
-                checkDistanceAndAzimuth(from, to, d, a);
-            }
-
-            t2.join();
-            assertTrue("Thread t2 produced the wrong result", t2.iSuccess);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    private class ThreadSafeTester extends Thread
-    {
-        boolean iSuccess = false;
-
-        public void run()
-        {
-            Coordinates from = new Coordinates(57.0f, 17.0f, 0f);
-            Coordinates to = new Coordinates(56.0f, 17.0f, 0f);
-            for (int i = 0; i < 100; i++)
-            {
-                float d = from.distance(to);
-                float a = from.azimuthTo(to);
-                checkDistanceAndAzimuth(from, to, d, a);
-            }
-            iSuccess = true;
-        }
-    }
-
-    // Also used in QualifiedCoordinatesTest
-    protected Coordinates newCoordinates()
-    {
-        return new Coordinates(iLat, iLon, iAlt);
-    }
-
-    // Also used in QualifiedCoordinatesTest
-    protected Coordinates newZeroCoordinates()
-    {
-        return new Coordinates(0, 0, 0);
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    private void assertReallyGood(double lat, double lon, float alt)
-    {
-        assertGood(lat, lon, alt);
-        assertGood(-lat, lon, alt);
-        assertGood(lat, -lon, alt);
-        assertGood(lat, lon, -alt);
-        assertGood(-lat, lon, -alt);
-        assertGood(lat, -lon, -alt);
-        assertGood(-lat, -lon, -alt);
-    }
-
-    protected void assertGood(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        iLat = aLat;
-        iLon = aLon;
-        iAlt = aAlt;
-        Coordinates coords = newCoordinates();
-        assertContinue("Coordinates values not equal to constructor input ("
-                       + aLat + "," + aLon + "," + aAlt + ")",
-                       coords.getLatitude() == aLat && coords.getLongitude() == aLon
-                       && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt));
-        // Test setters
-        coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setLatitude(" + aLat + ") failed", false);
-        }
-
-        try
-        {
-            coords.setLongitude(aLon);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setLongitude(" + aLon + ") failed", false);
-        }
-
-        try
-        {
-            coords.setAltitude(aAlt);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setAtitude(" + aAlt + ") failed", false);
-        }
-
-        assertContinue("Coordinates values not equal to set values (" + aLat
-                       + "," + aLon + "," + aAlt + ")", coords.getLatitude() == aLat
-                       && coords.getLongitude() == aLon
-                       && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt));
-    }
-
-    protected void assertBad(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        try
-        {
-            iLat = aLat;
-            iLon = aLon;
-            iAlt = aAlt;
-            Coordinates coords = newCoordinates();
-
-            assertContinue("No exception thrown for constructor (" + aLat
-                           + ", " + aLon + ", " + aAlt + ")", false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        // Test setters
-        Coordinates coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-            coords.setLongitude(aLon);
-            assertContinue("IllegalArgumentException not thrown for setter",
-                           false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        // setAltitude should never throw exception
-        coords.setAltitude(aAlt);
-    }
-
-    private void checkDistanceAndAzimuth(Coordinates aFrom, Coordinates aTo,
-                                         float aExpectedDistance, float aExpectedAzimuth)
-    {
-        // Define the tolerance
-        float distTol = 0.0035f; // Relative error
-        float azTol = 1f; // Absolute error
-
-        float distance = aFrom.distance(aTo);
-        if (aExpectedDistance != 0.0f)
-        {
-            float distErr = Math.abs((distance - aExpectedDistance)
-                                     / aExpectedDistance);
-
-            assertContinue("Computed distance " + distance + " != "
-                           + aExpectedDistance, distErr <= distTol);
-        }
-        else
-        {
-            assertContinue("Computed distance " + distance + " != 0.0",
-                           distance == 0.0f);
-        }
-
-        float azimuth = aFrom.azimuthTo(aTo);
-        if (aExpectedAzimuth != 0.0f)
-        {
-            assertContinue("Computed bearing " + azimuth + " != "
-                           + aExpectedAzimuth,
-                           Math.abs(azimuth - aExpectedAzimuth) <= azTol);
-        }
-        else
-        {
-            assertContinue("Computed bearing " + azimuth + " != 0.0",
-                           azimuth == 0.0f);
-        }
-    }
-
-    private void assertConvertBad(String aString)
-    {
-        try
-        {
-            double result = Coordinates.convert(aString);
-            assertContinue("No exception thrown for convert(" + aString + ")",
-                           false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-
-    private void assertConvertBad(double aCoord, int aFormat)
-    {
-        try
-        {
-            String result = Coordinates.convert(aCoord, aFormat);
-            assertContinue("IllegalArgumentException was never thrown", false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-        }
-    }
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/CriteriaTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * This suite of testcases tests that: - Criteria object can be created -
- * Default values are correct - Criteria parameters can be changed
- *
- */
-
-public class CriteriaTest extends TestCase
-{
-
-    public CriteriaTest()
-    {
-    }
-
-    public CriteriaTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new CriteriaTest("testConstructor", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CriteriaTest) tc).testConstructor();
-            }
-        }));
-
-        aSuite.addTest(new CriteriaTest("testSetters", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((CriteriaTest) tc).testSetters();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    // Test that Criteria constructor works and that default values are correct
-    public void testConstructor()
-    {
-
-        Criteria criteria = new Criteria();
-
-        // Default values
-        int hacc = Criteria.NO_REQUIREMENT;
-        int power = Criteria.NO_REQUIREMENT;
-        boolean costAllowed = true;
-        int vacc = Criteria.NO_REQUIREMENT;
-        int maxresptime = Criteria.NO_REQUIREMENT;
-        boolean speedRequired = false;
-        boolean altitudeRequired = false;
-        boolean addressInfoRequired = false;
-
-        // Check the defaults
-        assertTrue("Default Criteria values incorrect", criteria
-                   .getHorizontalAccuracy() == hacc
-                   && criteria.getVerticalAccuracy() == vacc
-                   && criteria.getPreferredPowerConsumption() == power
-                   && criteria.getPreferredResponseTime() == maxresptime
-                   && criteria.isAllowedToCost() == costAllowed
-                   && criteria.isSpeedAndCourseRequired() == speedRequired
-                   && criteria.isAltitudeRequired() == altitudeRequired
-                   && criteria.isAddressInfoRequired() == addressInfoRequired);
-
-    }
-
-    // Tests that all the setters work
-    public void testSetters()
-    {
-
-        // Define a Criteria object with non-default parameters and check that
-        // the values are unchanged when read.
-        int hacc = 10;
-        int power = Criteria.POWER_USAGE_LOW;
-        boolean costAllowed = false;
-        int vacc = 45;
-        int maxresptime = 100;
-        boolean speedRequired = true;
-        boolean altitudeRequired = true;
-        boolean addressInfoRequired = true;
-
-        Criteria criteria = new Criteria();
-        criteria.setHorizontalAccuracy(hacc);
-        criteria.setVerticalAccuracy(vacc);
-        criteria.setPreferredPowerConsumption(power);
-        criteria.setPreferredResponseTime(maxresptime);
-        criteria.setCostAllowed(costAllowed);
-        criteria.setSpeedAndCourseRequired(speedRequired);
-        criteria.setAltitudeRequired(altitudeRequired);
-        criteria.setAddressInfoRequired(addressInfoRequired);
-
-        // Check that the values are correct
-        assertTrue("Retrieved Criteria values different from input", criteria
-                   .getHorizontalAccuracy() == hacc
-                   && criteria.getVerticalAccuracy() == vacc
-                   && criteria.getPreferredPowerConsumption() == power
-                   && criteria.getPreferredResponseTime() == maxresptime
-                   && criteria.isAllowedToCost() == costAllowed
-                   && criteria.isSpeedAndCourseRequired() == speedRequired
-                   && criteria.isAltitudeRequired() == altitudeRequired
-                   && criteria.isAddressInfoRequired() == addressInfoRequired);
-    }
-
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/ErrorsTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1487 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * These test are for testing error reports, so that we can avoid regressions
- * Used for complicated tests that don't fit in the other test suites
- *
- */
-
-public class ErrorsTest extends TestCase
-{
-
-    private static final String STORE_1_NAME = "store1";
-
-    private static final String STORE_2_NAME = "store2";
-
-    private static final String LONG_CATEGORY_NAME = "Relatively long category name...";
-
-    private static final String SHORT_CATEGORY_NAME = "a";
-
-    private static final String LANDMARKSTORE_NAME = "store1";
-
-    private static final String SEQUENTIAL_CATEGORY = "sequential_category_tck_jsr179";
-
-    private static final QualifiedCoordinates VALID_QUALIFIED_COORDINATES = new QualifiedCoordinates(
-        45.0d, 120.0d, 274f, 7.2f, 10.5f);
-
-    public ErrorsTest()
-    {
-    }
-
-    public ErrorsTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-
-        TestSuite aSuite = new TestSuite();
-
-        /*
-         * aSuite.addTest(new ErrorsTest("testGc1", new TestMethod() { public
-         * void run(TestCase tc) {((ErrorsTest) tc).testGc1(); } }));
-         */
-
-        aSuite.addTest(new ErrorsTest("testGc2", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).testGc2();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp17", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp17();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp19_p1", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp19_p1();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp19_p2", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp19_p2();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp19_p3", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp19_p3();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp19_p4", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp19_p4();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("tp19_p5", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).tp19_p5();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0412", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0412();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0608", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0608();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0701", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0701();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0702", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0702();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0703", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0703();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0801", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0801();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0802", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0802();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore0803", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore0803();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore1201", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore1201();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore1202", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore1202();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore1303", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore1303();
-            }
-        }));
-
-        aSuite.addTest(new ErrorsTest("landmarkStore1701", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ErrorsTest) tc).landmarkStore1701();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testGc1()
-    {
-
-        try
-        {
-            LandmarkStore store = LandmarkStore.getInstance(null);
-            String id = store.toString();
-            assertContinue("Not the same instance", store == LandmarkStore
-                           .getInstance(null));
-
-            store = null;
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-
-            store = LandmarkStore.getInstance(null);
-            assertContinue("The same instance", !id.equals(store.toString()));
-
-            Landmark lm = new Landmark("test", null, null, null);
-            store.addLandmark(lm, null);
-            store.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    private void testGc_helper1()
-    {
-        try
-        {
-            LandmarkStore store = LandmarkStore.getInstance(null);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    private void testGc_helper2()
-    {
-        try
-        {
-            System.gc();
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            Landmark lm = new Landmark("test", null, null, null);
-            store.addLandmark(lm, null);
-            store.deleteLandmark(lm);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGc2()
-    {
-        try
-        {
-            testGc_helper1();
-            testGc_helper2();
-
-            deleteAllLandmarksAndCategories();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp17()
-    {
-
-        try
-        {
-            // 1.
-            // ------------------------------------------------------------------
-            String lm1_name1 = "lm1_name";
-            String lm1_description1 = "lm1_description";
-            String lm1_street1 = "lm1_street";
-            double lm1_latitude1 = 12.3;
-            double lm1_longitude1 = 32.1;
-            float lm1_altitude1 = 3.9f;
-            float lm1_horAccuracy1 = 5.5f;
-            float lm1_verAccuracy1 = 6.6f;
-
-            QualifiedCoordinates lm1_coords1 = new QualifiedCoordinates(
-                lm1_latitude1, lm1_longitude1, lm1_altitude1,
-                lm1_horAccuracy1, lm1_verAccuracy1);
-
-            AddressInfo lm1_addressInfo1 = new AddressInfo();
-            lm1_addressInfo1.setField(AddressInfo.STREET, lm1_street1);
-
-            Landmark lm1 = new Landmark(lm1_name1, lm1_description1,
-                                        lm1_coords1, lm1_addressInfo1);
-
-            QualifiedCoordinates lm1_coords_returned1 = lm1
-                    .getQualifiedCoordinates();
-
-            AddressInfo lm1_addressInfo_returned1 = lm1.getAddressInfo();
-
-            // 2.
-            // ------------------------------------------------------------------
-            String lm1_name2 = "lm1_name2";
-            String lm1_description2 = "lm1_description2";
-            String lm1_street2 = "lm1_street2";
-            double lm1_latitude2 = 16.8;
-            double lm1_longitude2 = 26.7;
-            float lm1_altitude2 = 7.1f;
-            float lm1_horAccuracy2 = 2.7f;
-            float lm1_verAccuracy2 = 8.1f;
-
-            QualifiedCoordinates lm1_coords2 = new QualifiedCoordinates(
-                lm1_latitude2, lm1_longitude2, lm1_altitude2,
-                lm1_horAccuracy2, lm1_verAccuracy2);
-
-            AddressInfo lm1_addressInfo2 = new AddressInfo();
-            lm1_addressInfo2.setField(AddressInfo.STREET, lm1_street2);
-
-            lm1.setName(lm1_name2);
-            lm1.setDescription(lm1_description2);
-            lm1.setQualifiedCoordinates(lm1_coords2);
-            lm1.setAddressInfo(lm1_addressInfo2);
-
-            QualifiedCoordinates lm1_coords_returned2 = lm1
-                    .getQualifiedCoordinates();
-
-            AddressInfo lm1_addressInfo_returned2 = lm1.getAddressInfo();
-
-            // 3.
-            // ------------------------------------------------------------------
-            boolean check3 = false;
-
-            try
-            {
-                lm1.setName(null);
-                assertContinue(
-                    "TP17-ERR stage3, NullPointerException was not thrown as expected.",
-                    false);
-            }
-            catch (java.lang.NullPointerException e)
-            {
-                check3 = true;
-            }
-
-            // 4.
-            // ------------------------------------------------------------------
-            String lm2_name1 = "lm2_name1";
-
-            Landmark lm2 = new Landmark(lm2_name1, null, null, null);
-
-            // 5.
-            // ------------------------------------------------------------------
-            boolean check5 = false;
-
-            try
-            {
-                Landmark lm3 = new Landmark(null, null, null, null);
-                assertContinue(
-                    "TP17-ERR stage5, NullPointerException was not thrown as expected.",
-                    false);
-            }
-            catch (java.lang.NullPointerException e)
-            {
-                check5 = true;
-            }
-            assertTrue("", true);
-        }
-        catch (Throwable e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp19_p1()
-    {
-
-        try
-        {
-            System.gc();
-            // waitForEposShutdown(10000);
-            // waitForLandmarksShutdown(10000);
-            // delete_EPOSLM_LDB();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            // 1.
-            // ------------------------------------------------------------------
-
-            final String tc80Category = "TC80CategoryISINDEED32CHARACTERS";
-
-            store.addCategory(tc80Category);
-
-            // 2.
-            // ------------------------------------------------------------------
-
-            boolean check = false;
-
-            try
-            {
-                store.addCategory(tc80Category);
-                assertContinue(
-                    "TP19-ERR TC80 stage2, IllegalArgumentException was not thrown as expected.",
-                    false);
-            }
-            catch (java.lang.IllegalArgumentException e)
-            {
-                check = true;
-            }
-
-            // 3.
-            // ------------------------------------------------------------------
-
-            check = false;
-
-            try
-            {
-                store.addCategory(null);
-                assertContinue(
-                    "TP19-ERR TC80 stage3, NullPointerException was not thrown as expected.",
-                    false);
-            }
-            catch (java.lang.NullPointerException e)
-            {
-                check = true;
-            }
-            store = null;
-            assertTrue("", true);
-        }
-        catch (Throwable e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp19_p2()
-    {
-        try
-        {
-            System.gc();
-            // waitForEposShutdown(10000);
-            // waitForLandmarksShutdown(10000);
-            // delete_EPOSLM_LDB();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            // 1.
-            // ------------------------------------------------------------------
-
-            Enumeration emptyEnum = store.getCategories();
-            assertContinue("TP19-ERR TC90 stage1, Enumeration was not empty.",
-                           !emptyEnum.hasMoreElements());
-
-            // 2.
-            // ------------------------------------------------------------------
-
-            final String tc90cat1 = "TC90cat1";
-            final String tc90cat2 = "TC90cat2";
-
-            store.addCategory(tc90cat1);
-            store.addCategory(tc90cat2);
-
-            // 3.
-            // ------------------------------------------------------------------
-
-            Enumeration categories = store.getCategories();
-            assertContinue("TP19-ERR stage3, Enumeration was empty.",
-                           categories.hasMoreElements());
-
-            boolean tc90cat1_found = false;
-            boolean tc90cat2_found = false;
-
-            int count = 0;
-
-            while (categories.hasMoreElements())
-            {
-
-                String cat_temporary = (String) categories.nextElement();
-
-                assertContinue(
-                    "TP19-ERR stage3, An unexpected Category was found in the LandmarkStore.",
-                    tc90cat1.equals(cat_temporary)
-                    || tc90cat2.equals(cat_temporary));
-
-                if (tc90cat1.equals(cat_temporary))
-                {
-                    tc90cat1_found = true;
-                }
-                if (tc90cat2.equals(cat_temporary))
-                {
-                    tc90cat2_found = true;
-                }
-
-                count++;
-            }
-
-            assertContinue(
-                "TP19-ERR stage3, There were not 2 elements in the Enumeration.",
-                count == 2);
-            assertContinue(
-                "TP19-ERR stage3, Category nr 1 - tc90cat1 - was not found in the Landmark store.",
-                tc90cat1_found);
-            assertContinue(
-                "TP19-ERR stage3, Category nr 2 - tc90cat2 - was not found in the Landmark store.",
-                tc90cat2_found);
-            assertTrue("", true);
-
-        }
-        catch (Throwable e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp19_p3()
-    {
-        try
-        {
-            System.gc();
-            // waitForEposShutdown(10000);
-            // waitForLandmarksShutdown(10000);
-            // delete_EPOSLM_LDB();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            final String tc91cat1 = "TC91cat1";
-            store.addCategory(tc91cat1);
-
-            // 1.
-            // ------------------------------------------------------------------
-
-            store.deleteCategory(tc91cat1);
-
-            // 2.
-            // ------------------------------------------------------------------
-
-            boolean check = false;
-
-            try
-            {
-                store.deleteCategory(null);
-                assertContinue(
-                    "TP19-ERR stage4, NullPointerException was not thrown as expected.",
-                    false);
-            }
-            catch (java.lang.NullPointerException e)
-            {
-                check = true;
-            }
-            assertContinue("TP19-ERR TC91 stage2, Wrong Throwable was thrown.",
-                           check);
-
-            // 3.
-            // ------------------------------------------------------------------
-
-            store.deleteCategory("TC91_ShouldReturnSilently");
-            assertTrue("", true);
-        }
-        catch (Throwable e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp19_p4()
-    {
-        try
-        {
-            System.gc();
-            // waitForEposShutdown(10000);
-            // waitForLandmarksShutdown(10000);
-            // delete_EPOSLM_LDB();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            final String tc92cat = "tc92cat";
-            final String tc92lmstring = "tc92lm";
-
-            Landmark tc92lm = new Landmark(tc92lmstring, null, null, null);
-            store.addLandmark(tc92lm, null);
-
-            // int err = iVTH.addLandmarksToCategory(tc92lmstring, tc92cat);
-            // assert(err == 0, "TP19-ERR TC92 pre-condition error: (1) Landmark
-            // was not sucessfully added to category.");
-            // assert(iVTH.isLandmarkInCategory(tc92lmstring, tc92cat),
-            // "TP19-ERR TC92 pre-condition error: (2) Landmark was not
-            // sucessfully added to category.");
-            store.addCategory(tc92cat);
-            store.addLandmark(tc92lm, tc92cat);
-
-            // Flow:
-            // ---------------------------------------------------------------
-            store.deleteCategory(tc92cat);
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void tp19_p5()
-    {
-        try
-        {
-            System.gc();
-            // waitForEposShutdown(10000);
-            // waitForLandmarksShutdown(10000);
-            // delete_EPOSLM_LDB();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-
-            final String tc93cat1 = "tc93cat1";
-            final String tc93cat2 = "tc93cat2";
-            final String tc93lmstring = "tc93lm";
-
-            // iVTH.addCategory(tc93cat1);
-            // assert(iVTH.categoryExists(tc93cat1), "TP19-ERR TC93
-            // pre-condition error: category tc93cat1 was not added to
-            // LandmarkStore.");
-            store.addCategory(tc93cat1);
-
-            // iVTH.addCategory(tc93cat2);
-            // assert(iVTH.categoryExists(tc93cat2), "TP19-ERR TC93
-            // pre-condition error: category tc93cat2 was not added to
-            // LandmarkStore.");
-            store.addCategory(tc93cat2);
-
-            Landmark tc93lm = new Landmark(tc93lmstring, null, null, null);
-            store.addLandmark(tc93lm, null); // null because the landmark
-            // will be added to the category
-            // via iVTH native interface.
-            // assert(iVTH.countLandmarksByName(tc93lmstring) == 1, "TP19-ERR
-            // TC93 pre-condition error: Landmark was not added to
-            // LandmarkStore.");
-
-            // int err = iVTH.addLandmarksToCategory(tc93lmstring, tc93cat1);
-            // assert(err == 0, "TP19-ERR TC93 pre-condition error: (1) Landmark
-            // was not sucessfully added to category.");
-            // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1),
-            // "TP19-ERR TC93 pre-condition error: (2) Landmark was not
-            // sucessfully added to category.");
-            store.addLandmark(tc93lm, tc93cat1);
-
-            // err = iVTH.addLandmarksToCategory(tc93lmstring, tc93cat2);
-            // assert(err == 0, "TP19-ERR TC93 pre-condition error: (3) Landmark
-            // was not sucessfully added to category.");
-            // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1),
-            // "TP19-ERR TC93 pre-condition error: (4) Landmark was not
-            // sucessfully added to category.");
-            store.addLandmark(tc93lm, tc93cat2);
-
-            // Flow:
-            // ---------------------------------------------------------------
-            store.deleteCategory(tc93cat2);
-            // assert(!iVTH.categoryExists(tc93cat2), "TP19-ERR TC93 category
-            // tc93cat2 was not deleted.");
-            // assert(iVTH.categoryExists(tc93cat1), "TP19-ERR TC93 both
-            // categories were deleted from LandmarkStore.");
-            // assert(iVTH.countLandmarksByName(tc93lmstring) == 1, "TP19-ERR
-            // TC93 Landmark was DELETED when deleting category!");
-            // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1),
-            // "TP19-ERR TC93 Some strange error occurred!");
-            assertTrue("", true);
-        }
-        catch (Throwable e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test LandmarkStore0412 in TCK (?)
-    public void landmarkStore0412()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore("store1");
-            LandmarkStore.createLandmarkStore("store2");
-
-            LandmarkStore store1 = LandmarkStore.getInstance("store1");
-            LandmarkStore store2 = LandmarkStore.getInstance("store2");
-
-            store1.addCategory("TEST_CATEGORY_1");
-            store1.addCategory("TEST_CATEGORY_2");
-            store2.addCategory("TEST_CATEGORY_1");
-
-            AddressInfo addressInfo = new AddressInfo();
-            for (int i = 1; i < 17; ++i)
-            {
-                addressInfo.setField(i, "Some text representing address stuff");
-            }
-
-            QualifiedCoordinates q1 = new QualifiedCoordinates(-30.0d, -10.0d,
-                    Float.NaN, Float.NaN, Float.NaN);
-
-            Landmark landmarkToAdd1 = new Landmark("landmark_1_name",
-                                                   "landmark_1_description", q1, addressInfo);
-
-            QualifiedCoordinates q2 = new QualifiedCoordinates(30.0d, 165.0d,
-                    Float.NaN, Float.NaN, Float.NaN);
-
-            Landmark landmarkToAdd2 = new Landmark("landmark_2_name",
-                                                   "landmark_2_description", q2, addressInfo);
-
-            QualifiedCoordinates q3 = new QualifiedCoordinates(30.0d, -165.0d,
-                    Float.NaN, Float.NaN, Float.NaN);
-
-            Landmark landmarkToAdd3 = new Landmark("landmark_3_name",
-                                                   "landmark_3_description", q3, addressInfo);
-
-            addLandmarkToStore(store1, landmarkToAdd1, "TEST_CATEGORY_1");
-            addLandmarkToStore(store1, landmarkToAdd2, "TEST_CATEGORY_2");
-            addLandmarkToStore(store2, landmarkToAdd3, "TEST_CATEGORY_1");
-
-            // get Landmarks from store1
-            Enumeration e = store1.getLandmarks(null, 10.0d, 50.0d, 150.0d,
-                                                -150.0d);
-            assertContinue("No landmarks found", e != null);
-            Landmark received = (Landmark) e.nextElement();
-            assertContinue("To many landmarks found", !e.hasMoreElements());
-
-            String lmName = received.getName();
-            assertContinue("Wrong landmark found in store", lmName
-                           .equals(landmarkToAdd2.getName()));
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test LandmarkStore0608 in TCK (?)
-    public void landmarkStore0608()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore.createLandmarkStore(STORE_2_NAME);
-
-            LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-            LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-            Landmark LEGAL_LANDMARK_1 = new Landmark("landmark_1",
-                    "description_text", VALID_QUALIFIED_COORDINATES, null);
-
-            // adds landmark to the stores:
-            addLandmarkToStore(store2, LEGAL_LANDMARK_1, null);
-
-            addLandmarkToStore(store1, LEGAL_LANDMARK_1, null);
-
-            // deletes the Landmark landmarkFromStore1 from the store:
-            store1.deleteLandmark(LEGAL_LANDMARK_1);
-
-            // Queries the Landmarks from the store and checks that the
-            // returned Enumeration isn't null:
-            Vector landmarks = getAllLandmarksFromStore(store2);
-
-            // there should be two Landmarks in the Vector:
-            assertContinue(
-                "One Landmark was added to the newly created LandmarkStore. "
-                + "deleteLandmark was called to another LandmarkStore with"
-                + " same Landmark instance as parameter."
-                + "The store containing the Landmark was expected to "
-                + "remain as is. "
-                + "Still, LandmarkStore.getLandmarks() returned "
-                + "an Enumeration with " + landmarks.size()
-                + " Landmarks.", landmarks.size() == 1);
-
-            // Check if landmarks are equal not implemented
-
-            // if (!LandmarkStoreHelpers
-            // .areLandmarksEqual(
-            // (Landmark) landmarks.firstElement(),
-            // LEGAL_LANDMARK_1,
-            // true)) {
-            //
-            // return m_helper.failTestCase( testCaseID,
-            // "One Landmark was added to newly created LandmarkStore, "
-            // + "but getLandmarks returned a Landmark instance not identical"
-            // + "to added one.");
-            // }
-
-            landmarks = getAllLandmarksFromStore(store1);
-            assertContinue(
-                "One Landmark was stored to named "
-                + "LandmarkStore and deleted, but the store still contains "
-                + "Landmarks.", landmarks.size() == 0);
-            removeExistingStores();
-            assertTrue("", true);
-
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0701 in TCK (?)
-    public void landmarkStore0701()
-    {
-
-        try
-        {
-            removeExistingStores();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-            assertContinue(" Getting default LandmarkStore with getInstance "
-                           + "returned null, but non-null value was expected.",
-                           store != null);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0702 in TCK (?)
-    public void landmarkStore0702()
-    {
-
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            Landmark landmark = new Landmark("Landmark1", "Short description",
-                                             VALID_QUALIFIED_COORDINATES,
-                                             getAddressInfo_allFieldsLessThan30Chars());
-
-            LandmarkStore def = LandmarkStore.getInstance(null);
-
-            def.addLandmark(landmark, null);
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore store = LandmarkStore.getInstance(STORE_1_NAME);
-            assertContinue(" Getting LandmarkStore with getInstance "
-                           + "returned null, but non-null value was expected.",
-                           store != null);
-
-            Vector landmarks = getAllLandmarksFromStore(store);
-            assertContinue("Created new LandmarkStore instance and called."
-                           + " getLandmarks() was expected to return zero landmarks, "
-                           + " but enumeration containing " + landmarks.size()
-                           + " landmarks was returned.", landmarks.size() == 0);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0703 in TCK (?)
-    public void landmarkStore0703()
-    {
-
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore store = LandmarkStore.getInstance(STORE_2_NAME);
-            assertContinue(" Getting LandmarkStore with getInstance "
-                           + "returned non-null when null value was expected.",
-                           store == null);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0801 in TCK (?)
-    public void landmarkStore0801()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore store = LandmarkStore.getInstance(STORE_1_NAME);
-            assertContinue("Getting created LandmarkStore with getInstance "
-                           + "returned null, when non-null value was expected.",
-                           store != null);
-
-            // get Landmarks from store
-            Enumeration e = store.getLandmarks();
-            assertContinue("Created new LandmarkStore instance and called"
-                           + " getLandmarks(). The expected result was "
-                           + "that zero Landmarks are returned. ", e == null);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0802 in TCK (?)
-    public void landmarkStore0802()
-    {
-
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore.createLandmarkStore(STORE_2_NAME);
-            LandmarkStore store = LandmarkStore.getInstance(STORE_2_NAME);
-            assertContinue(" Getting created LandmarkStore with getInstance "
-                           + "returned null, but non-null value was expected.",
-                           store != null);
-            // get Landmarks from store
-            Enumeration e = store.getLandmarks();
-            assertContinue("Created new LandmarkStore instance and called"
-                           + " getLandmarks(). The expected result was "
-                           + "that zero Landmarks are returned. ", e == null);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore0803 in TCK (?)
-    public void landmarkStore0803()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            try
-            {
-                removeExistingStores();
-                LandmarkStore.createLandmarkStore(STORE_1_NAME);
-                LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            }
-            catch (IllegalArgumentException ia)
-            {
-                return;
-            }
-            assertContinue(
-                "Created new LandmarkStore with name already in use, "
-                + "expected IllegalArgumentException to be thrown but "
-                + "no exception was caught.", false);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore1201 in TCK (?)
-    public void landmarkStore1201()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            deleteAllLandmarksAndCategories();
-
-            LandmarkStore store = LandmarkStore.getInstance(null);
-            store.addCategory(LONG_CATEGORY_NAME);
-
-            // check that it was actually added
-            Enumeration categories = store.getCategories();
-            assertContinue("store.getCategories() returned null!",
-                           categories != null);
-
-            while (categories.hasMoreElements())
-            {
-                String name = (String) categories.nextElement();
-                assertContinue("Category name was null!", name != null);
-                if (LONG_CATEGORY_NAME.equals(name))
-                {
-                    return;
-                }
-            }
-            assertContinue("Added category with name \"" + LONG_CATEGORY_NAME
-                           + "\" to default LandmarkStore but Category was not"
-                           + "returned by getCategories method.", false);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore1202 in TCK (?)
-    public void landmarkStore1202()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-
-            LandmarkStore.createLandmarkStore(STORE_2_NAME);
-            LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-            store1.addCategory(LONG_CATEGORY_NAME);
-
-            // check that it was actually added to store1 only
-            Enumeration categories = store2.getCategories();
-
-            while (categories.hasMoreElements())
-            {
-                String name = (String) categories.nextElement();
-                assertContinue(
-                    "Two new LandmarkStores were created and new category "
-                    + "was added to " + STORE_1_NAME
-                    + ". Still same category was returned from \""
-                    + STORE_2_NAME + "\".", !LONG_CATEGORY_NAME
-                    .equals(name));
-            }
-
-            categories = store1.getCategories();
-
-            while (categories.hasMoreElements())
-            {
-                String name = (String) categories.nextElement();
-                if (LONG_CATEGORY_NAME.equals(name))
-                {
-                    return;
-                }
-            }
-            assertContinue("Added category with name \"" + SHORT_CATEGORY_NAME
-                           + "\" to default LandmarkStore but Category was not"
-                           + "returned by getCategories mehtod.", false);
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test landmarkStore1303 in TCK (?)
-    public void landmarkStore1303()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-
-            LandmarkStore.createLandmarkStore(STORE_2_NAME);
-            LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-            String[] categories1 = getSupportedCategories(store1, 1);
-            String[] categories2 = getSupportedCategories(store2, 1);
-
-            assertContinue("Required number of supported categories are"
-                           + "not available.", categories1 != null
-                           && categories2 != null);
-
-            // Check that categories were actually added
-            Vector returned = getCategoriesAsVector(store2);
-            assertContinue("One category was added to LandmarkStore"
-                           + STORE_2_NAME
-                           + " but it was not returned by method getCategories.",
-                           returned.contains(categories2[0]));
-
-            returned = getCategoriesAsVector(store1);
-
-            assertContinue("One category was added to default LandmarkStore"
-                           + STORE_1_NAME
-                           + " but it was not returned by method getCategories.",
-                           returned.contains(categories1[0]));
-
-            store1.deleteCategory(categories1[0]);
-
-            returned = getCategoriesAsVector(store1);
-            assertContinue("One category was added to LandmarkStore"
-                           + STORE_1_NAME
-                           + " and after that it was deleted. Still it was "
-                           + "returned by method getCategories.", !returned
-                           .contains(categories1[0]));
-
-            returned = getCategoriesAsVector(store2);
-            assertContinue("One category was added to LandmarkStore"
-                           + STORE_2_NAME
-                           + " it was not deleted, but still it was not returned "
-                           + " by method getCategories.", returned
-                           .contains(categories2[0]));
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Equivalent to test LandmarkStore1701 in TCK (?)
-    public void landmarkStore1701()
-    {
-        try
-        {
-            System.gc();
-            try
-            {
-                Thread.sleep(1000);
-            }
-            catch (Exception e)
-            {
-            }
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(LANDMARKSTORE_NAME);
-
-            // gets the LandmarkStore:
-            LandmarkStore landmarkStore = LandmarkStore
-                                          .getInstance(LANDMARKSTORE_NAME);
-
-            // gets the Landmark that is put to the LandmarkStore:
-            Landmark landmark = new Landmark("sequential_landmark_name", null,
-                                             new QualifiedCoordinates(80d, 45d, 250f, 20f, 30f), null);
-
-            landmarkStore.addCategory(SEQUENTIAL_CATEGORY);
-
-            // adds one Landmark to the LandmarkStore:
-            addLandmarkToStore(landmarkStore, landmark, null);
-
-            removeExistingStores();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    //------------------------ Helper methods -----------------------
-
-    private String[] getSupportedCategories(LandmarkStore store, int count)
-    throws Exception
-    {
-
-        assertContinue("internal error in " + "getSupportedCategories: "
-                       + "LandmarkStore=" + store.toString() + " and count=" + count,
-                       store != null && count > 0);
-
-        String[] supported = new String[count];
-
-        for (int i = 0; i < count; i++)
-        {
-            String categoryName = "Test_Category_" + i;
-
-            store.addCategory(categoryName);
-            supported[i] = categoryName;
-
-        }
-
-        // makes sure that the right number of categories or null
-        // is always returned:
-        assertContinue("Internal error: "
-                       + "getSupportedCategories() method returned "
-                       + "wrong number of categories. " + count
-                       + " categories were requested, but " + supported.length
-                       + " categories were returned.", supported == null
-                       || supported.length == count);
-        return supported;
-    }
-
-    private Vector getCategoriesAsVector(LandmarkStore store)
-    {
-        Vector v = new Vector();
-        Enumeration e = store.getCategories();
-        while (e.hasMoreElements())
-        {
-            v.addElement(e.nextElement());
-        }
-        return v;
-    }
-
-    private Vector getAllLandmarksFromStore(LandmarkStore landmarkStore)
-    throws Exception
-    {
-        Enumeration landmarks = null;
-        landmarks = landmarkStore.getLandmarks();
-
-        assertContinue(
-            "LandmarkStore.getLandmarks() returned an empty Enumeration. "
-            + "If there are no Landmarks "
-            + "in the LandmarkStore, it should return null.",
-            landmarks == null || landmarks.hasMoreElements());
-
-        // puts the Landmarks to a Vector:
-        Vector result = new Vector();
-        while (landmarks != null && landmarks.hasMoreElements())
-        {
-            Landmark current = (Landmark) landmarks.nextElement();
-            assertContinue("LandmarkStore.getLandmarks() returned an "
-                           + "Enumeration that had a null Landmark in it.",
-                           current != null);
-            result.addElement(current);
-        }
-        return result;
-    }
-
-    private static AddressInfo getAddressInfo_allFieldsLessThan30Chars()
-    {
-
-        // creates the AddressInfo object used in the tests
-        // and sets its fields:
-        AddressInfo addressInfo = new AddressInfo();
-        addressInfo.setField(AddressInfo.BUILDING_FLOOR,
-                             "value_building_floor 12");
-        addressInfo.setField(AddressInfo.BUILDING_NAME, "value_building_name ");
-        addressInfo.setField(AddressInfo.BUILDING_ROOM, "value_building_room");
-        addressInfo.setField(AddressInfo.BUILDING_ZONE,
-                             "value_building_zone east");
-        addressInfo.setField(AddressInfo.CITY, "value_city Chicago");
-        addressInfo.setField(AddressInfo.COUNTRY, "value_country");
-        addressInfo.setField(AddressInfo.COUNTRY_CODE,
-                             "value_country_code * # ");
-        addressInfo.setField(AddressInfo.COUNTY, "value_county Helsinki");
-        addressInfo.setField(AddressInfo.CROSSING1, "value_crossing1");
-        addressInfo.setField(AddressInfo.CROSSING2, "value_crossing2");
-        addressInfo.setField(AddressInfo.DISTRICT, "value_district");
-        addressInfo.setField(AddressInfo.EXTENSION, "value_extension");
-        addressInfo.setField(AddressInfo.PHONE_NUMBER,
-                             "value_phoneNumber +358 1234");
-        addressInfo
-        .setField(AddressInfo.POSTAL_CODE, "value_postal_code 12345");
-        addressInfo.setField(AddressInfo.STATE, "value_state Florida");
-        addressInfo.setField(AddressInfo.STREET, "value_street Wall Street");
-        addressInfo.setField(AddressInfo.URL, "value_url @ //www.com/?id=8#d");
-
-        return addressInfo;
-    }
-
-    protected void addLandmarkToStore(LandmarkStore ls, Landmark landmark,
-                                      String category) throws Exception
-    {
-
-        Enumeration e = ls.getLandmarks();
-        int numLandmarksBefore = 0;
-        if (e != null)
-        {
-            while (e.hasMoreElements())
-            {
-                Object o = e.nextElement();
-                ++numLandmarksBefore;
-            }
-        }
-
-        ls.addLandmark(landmark, category);
-
-        // check that landmark was added
-        e = ls.getLandmarks();
-        assertContinue("Landmarks enumeration is null", e != null);
-
-        int numLandmarksAfter = 0;
-        while (e.hasMoreElements())
-        {
-            ++numLandmarksAfter;
-            Object o = e.nextElement();
-        }
-
-        assertContinue("Expected only one landmark to be added",
-                       numLandmarksAfter - numLandmarksBefore == 1);
-    }
-
-    protected void removeExistingStores() throws Exception
-    {
-
-        String[] stores = LandmarkStore.listLandmarkStores();
-
-        if (stores != null)
-        {
-            for (int i = 0; i < stores.length; ++i)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-    }
-
-    protected void deleteAllLandmarksAndCategories() throws Exception
-    {
-        // Delete all the categories and Landmarks from the store
-        LandmarkStore ls = LandmarkStore.getInstance(null);
-        Enumeration c = ls.getCategories();
-        while (c.hasMoreElements())
-        {
-            ls.deleteCategory((String) c.nextElement());
-        }
-
-        Enumeration l = ls.getLandmarks();
-        if (l != null)
-        {
-            while (l.hasMoreElements())
-            {
-                ls.deleteLandmark((Landmark) l.nextElement());
-            }
-        }
-    }
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/GetLocationTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,439 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-public class GetLocationTest extends TestCase
-{
-    private Location iLoc;
-
-    final static int TIMETOFIX = 5;
-
-    protected LocationProvider iLP = null;
-
-    long[] iTimeArray;
-
-    public GetLocationTest()
-    {
-    }
-
-    public GetLocationTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new GetLocationTest("testBadArguments",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testGetLocation", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testGetLocation();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testAltitudeData",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testAltitudeData();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testSpeedData", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testSpeedData();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testAddressInfo", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testAddressInfo();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testGetLocationTimeout",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testGetLocationTimeout();
-            }
-        }));
-
-        aSuite.addTest(new GetLocationTest("testGetLatest", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((GetLocationTest) tc).testGetLatest();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testBadArguments()
-    {
-        try
-        {
-            providerSetUp(null);
-            assertContinue("LocationProvider is null", iLP != null);
-
-            assertBad(0);
-            assertBad(-2);
-            assertBad(-12345); // Sanity check
-            assertBad(Integer.MIN_VALUE);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLocation()
-    {
-        try
-        {
-            providerSetUp(null);
-            assertContinue("LocationProvider is null", iLP != null);
-            simpleGetLocation();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAltitudeData()
-    {
-        try
-        {
-            Criteria criteria = new Criteria();
-            criteria.setAltitudeRequired(true);
-            criteria.setPreferredResponseTime(100); // 100 ms
-
-            providerSetUp(criteria);
-            assertContinue("LocationProvider is null", iLP != null);
-            simpleGetLocation();
-
-            QualifiedCoordinates coords = iLoc.getQualifiedCoordinates();
-            float altitude = coords.getAltitude();
-            assertContinue("No altitude included", !Float.isNaN(altitude));
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testSpeedData()
-    {
-        try
-        {
-
-            Criteria criteria = new Criteria();
-            criteria.setPreferredResponseTime(100); // 100 ms
-            criteria.setSpeedAndCourseRequired(true);
-
-            providerSetUp(criteria);
-            assertContinue("LocationProvider is null", iLP != null);
-            simpleGetLocation();
-
-            float speed = iLoc.getSpeed();
-            assertContinue("No speed included", !Float.isNaN(speed));
-            float course = iLoc.getCourse();
-            assertContinue("No course included", !Float.isNaN(course));
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddressInfo()
-    {
-        try
-        {
-            Criteria criteria = new Criteria();
-            criteria.setPreferredResponseTime(100); // 100 ms
-            criteria.setAddressInfoRequired(true);
-
-            providerSetUp(criteria);
-            if (iLP != null)
-            {
-                assertContinue("LocationProvider is null", iLP != null);
-                simpleGetLocation();
-
-                AddressInfo addr = iLoc.getAddressInfo();
-                if (addr != null)
-                {
-                    boolean hasNonNullField = false;
-                    for (int i = 1; i <= 17; ++i)
-                    {
-                        String field = addr.getField(i);
-                        if (field != null)
-                        {
-                            hasNonNullField = true;
-                        }
-                    }
-                    assertContinue("All AddressInfo fields are null",
-                                   hasNonNullField);
-                }
-            }
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLocationTimeout()
-    {
-        try
-        {
-            Criteria criteria = new Criteria();
-            criteria.setCostAllowed(false); // This will select the right
-            // provider
-            providerSetUp(criteria);
-            assertContinue("LocationProvider is null", iLP != null);
-            iLoc = null;
-
-            try
-            {
-                int TIMEOUT = 1; // seconds
-                iLoc = iLP.getLocation(TIMEOUT);
-                assertContinue("No timeout for getLocation", false);
-            }
-            catch (LocationException le)
-            {
-                // Timed out correctly
-            }
-
-            // Sanity check - test that normal request works ok
-            simpleGetLocation();
-
-            try
-            {
-                int TIMEOUT = 10; // seconds
-                long startTime = System.currentTimeMillis();
-                iLoc = iLP.getLocation(TIMEOUT);
-                long duration = System.currentTimeMillis() - startTime;
-                assertContinue("GetLocation took too long",
-                               duration <= TIMEOUT * 1000);
-                checkLocationData(iLoc);
-            }
-            catch (LocationException le)
-            {
-                assertContinue("Illegal timeout", false);
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLatest()
-    {
-        iLP = null;
-        iLoc = null;
-
-        // Get the last known location
-        iLoc = LocationProvider.getLastKnownLocation();
-
-        assertTrue("", true);
-    }
-
-    public void testGetLocationOutOfService()
-    {
-        try
-        {
-            Criteria criteria = new Criteria();
-            criteria.setCostAllowed(false); // This will select the right
-            // provider
-            providerSetUp(criteria);
-
-            assertContinue("LocationProvider is null", iLP != null);
-
-            simpleGetLocation();
-
-            // now we get the last known Location:
-            Location lastKnownLocation = LocationProvider
-                                         .getLastKnownLocation();
-            checkLocationData(lastKnownLocation);
-
-            assertContinue("Not the last known location returned",
-                           lastKnownLocation.getTimestamp() == iLoc.getTimestamp());
-
-            long start = System.currentTimeMillis();
-            long end = 0;
-            try
-            {
-                iLoc = iLP.getLocation(-1);
-                assertContinue("No exception thrown for getLocation", false);
-            }
-            catch (LocationException le)
-            {
-                // Exception thrown correctly
-                end = System.currentTimeMillis();
-            }
-            assertContinue("Expected LocationException immediately", end
-                           - start < 500);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void simpleGetLocation() throws Exception
-    {
-        iLoc = null;
-
-        try
-        {
-            iLoc = iLP.getLocation(-1);
-            checkLocationData(iLoc);
-        }
-        catch (LocationException le)
-        {
-            assertContinue("Could not get location: " + le, false);
-        }
-    }
-
-    private void assertBad(int aBadParam) throws Exception
-    {
-        try
-        {
-            iLoc = iLP.getLocation(aBadParam);
-            assertContinue("IllegalArgumentException was not thrown for: "
-                           + aBadParam, false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-        }
-    }
-
-    // ------------------------ Helper class -----------------------
-
-    protected void providerSetUp(Criteria aCriteria)
-    {
-        iLP = null;
-        try
-        {
-            iLP = LocationProvider.getInstance(aCriteria);
-            if (iLP != null)
-            {
-                int state = iLP.getState();
-                assertContinue("Initial state=" + state
-                               + ", expected AVAILABLE",
-                               state == LocationProvider.AVAILABLE);
-            }
-        }
-        catch (LocationException le)
-        {
-        }
-    }
-
-    protected void checkLocationData(Location aLoc)
-    {
-        assertContinue("Location is null", aLoc != null);
-        assertContinue("Location is invalid", aLoc.isValid());
-        assertContinue("Location is valid, but Coordinates are null", aLoc
-                       .getQualifiedCoordinates() != null);
-
-        long timestamp = aLoc.getTimestamp();
-        long now = System.currentTimeMillis();
-        assertContinue("Timestamp incorrect: t=" + timestamp + ", now=" + now,
-                       now >= timestamp && (now - timestamp < 30000) && timestamp > 0);
-
-        QualifiedCoordinates coords = aLoc.getQualifiedCoordinates();
-        double lat = coords.getLatitude();
-        double lon = coords.getLongitude();
-
-        assertContinue("Latitude out of range", lat >= -90.0 || lat <= 90.0);
-        assertContinue("Longitude out of range", lon >= -180.0 || lon < 180.0);
-
-        float hacc = coords.getHorizontalAccuracy();
-        assertContinue("Horizontal accuracy is negative", Float.isNaN(hacc)
-                       || hacc >= 0);
-
-        float vacc = coords.getVerticalAccuracy();
-        assertContinue("Vertical accuracy is negative", Float.isNaN(vacc)
-                       || vacc >= 0);
-
-        float speed = aLoc.getSpeed();
-        assertContinue("Speed is negative", Float.isNaN(speed) || speed >= 0);
-
-        float course = aLoc.getCourse();
-        assertContinue("Course out of range", Float.isNaN(course)
-                       || (course >= 0 && course < 360));
-
-        String nmea = aLoc.getExtraInfo("application/X-jsr179-location-nmea");
-        if (nmea != null)
-        {
-            assertTrue("Bad NMEA data", nmea.startsWith("$GP"));
-        }
-    }
-
-}
-
-// End of file
--- a/javaextensions/location/tsrc/junit/src/automatic/LandmarkStoreTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3143 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-import java.util.Enumeration;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- */
-
-public class LandmarkStoreTest extends TestCase
-{
-    static final int MAX_NAME_LENGTH = 255;
-
-    static final int MAX_CATEGORY_LENGTH = 124;
-
-    static final int MAX_DESCRIPTION_LENGTH = 4095;
-
-    static final int MAX_ADDRESSFIELD_LENGTH = 255;
-
-    static final String extension = "23";
-
-    static final String street = "11 Mount Avenue";
-
-    static final String city = "London";
-
-    static final String county = "Ealing";
-
-    static final String postal_code = "W5 1QB";
-
-    static final String state = "England";
-
-    static final String district = "Middlesex";
-
-    static final String country = "United Kingdom";
-
-    static final String country_code = "GB";
-
-    static final String building_name = "The Castle";
-
-    static final String building_floor = "3";
-
-    static final String building_room = "Front Room";
-
-    static final String building_zone = "Upstairs";
-
-    static final String crossing1 = "Mount Avenue";
-
-    static final String crossing2 = "Eaton Rise";
-
-    static final String url = "http://www.upmystreet.co.uk";
-
-    static final String phone_number = "+358401234567";
-
-    static final String searchCategory0 = "category0";
-
-    static final String searchCategory1 = "category1";
-
-    static final String searchCategory2 = "category2";
-
-    static final String searchName0 = "name0"; // Will not be added
-
-    static final String searchName1 = "name1"; // Will be added once
-
-    static final String searchName2 = "name2"; // Will be added twice
-
-    static final String searchName3 = "name3"; // Will be added three times
-
-    final static int TIMETOFIX = 5;
-
-    protected LocationProvider iLP = null;
-
-    long[] iTimeArray;
-
-    private LandmarkStore ls;
-
-    private String iCategory;
-
-    public LandmarkStoreTest()
-    {
-    }
-
-    public LandmarkStoreTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new LandmarkStoreTest("testGetInstance",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetInstance();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testDeleteLandmarkBadArguments",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testDeleteLandmarkBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksEmptyStore",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetLandmarksEmptyStore();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("setCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).setCategory(null);
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testAddGetDeleteAndUpdateLandmarks", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testAddGetDeleteAndUpdateLandmarks();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddCategoryBadArguments",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddCategoryBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testDeleteCategoryBadArguments",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testDeleteCategoryBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddDeleteCategory",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddDeleteCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddDeleteManyCategories",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddDeleteManyCategories();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddCategoryTruncate",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddCategoryTruncate();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddLandmarkToCategory1",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddLandmarkToCategory1();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddLandmarkToCategory2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddLandmarkToCategory2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testAddLandmarkToCategory3",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testAddLandmarkToCategory3();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testAddLandmarkToCategoryDeleteCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testAddLandmarkToCategoryDeleteCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testAddLandmarkSameNameDifferentCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testAddLandmarkSameNameDifferentCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("setCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).setCategory("Work");
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testAddGetDeleteAndUpdateLandmarks", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testAddGetDeleteAndUpdateLandmarks();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testRemoveLandmarkFromCategoryBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testRemoveLandmarkFromCategoryBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testRemoveLandmarkFromCategory",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testRemoveLandmarkFromCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testRemoveLandmarkFromCategory2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testRemoveLandmarkFromCategory2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByNameBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByNameBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksByName",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetLandmarksByName();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByNameUncategorized", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByNameUncategorized();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksByNameWildcards",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByNameWildcards();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByCategoryBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByCategoryBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksByCategory",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetLandmarksByCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByNameAndCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByNameAndCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByAreaBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByAreaBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksByArea",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetLandmarksByArea();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetLandmarksByArea2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetLandmarksByArea2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest(
-                           "testGetLandmarksByAreaAndCategory", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testGetLandmarksByAreaAndCategory();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testEnumerationDeleteLandmark1",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testEnumerationDeleteLandmark1();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testEnumerationDeleteLandmark2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc)
-                .testEnumerationDeleteLandmark2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("assertEmptyLandmarkStore",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).assertEmptyLandmarkStore();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetInstance2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetInstance2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testGetInstanceWithGc",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testGetInstanceWithGc();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testCreateLandmarkStore1",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testCreateLandmarkStore1();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testCreateLandmarkStore2",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testCreateLandmarkStore2();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testCreateLandmarkStore3",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testCreateLandmarkStore3();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkStoreTest("testCreateLandmarkStore4",
-                                             new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkStoreTest) tc).testCreateLandmarkStore4();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    void setCategory(String aCat)
-    {
-        iCategory = aCat;
-        assertTrue("", true);
-    }
-
-    void testAddGetDeleteAndUpdateLandmarks()
-    {
-        try
-        {
-            if (iCategory != null)
-            {
-                ls = getDefaultLandmarkStore();
-                ls.addCategory(iCategory);
-            }
-
-            testAddLandmarkBadArguments();
-            testAddDeleteLandmark1();
-            testAddDeleteLandmark2();
-            testAddDeleteLandmark3();
-            testAddDeleteLandmark4();
-            testAddLandmarkTwice();
-            testAddLandmarkNoUpdate();
-            testAddLandmarkSameName();
-
-            testAddDeleteAddLandmark();
-            testAddLandmarkTruncate();
-            testAddLandmarkEmptyStrings();
-
-            testUpdateLandmarkBadArguments();
-            testUpdateLandmark1();
-            testUpdateLandmark2();
-
-            testUpdateLandmarkTruncate();
-            testAddDeleteUpdateLandmark();
-
-            testGetAllLandmarks();
-
-            if (iCategory != null)
-            {
-                ls = getDefaultLandmarkStore();
-                ls.deleteCategory(iCategory);
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetInstance()
-    {
-
-        // Get default store
-        ls = LandmarkStore.getInstance(null);
-        assertTrue("Instance was null for default store", ls != null);
-    }
-
-    public void testAddLandmarkBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                // Add with null Landmark parameter
-                ls.addLandmark(null, iCategory);
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            Landmark lm = new Landmark("test", null, null, null);
-
-            try
-            {
-                String badCategory = "This category does not exist";
-                ls.addLandmark(lm, badCategory); // Add with nonexisting
-                // category
-                assertContinue("IllegalArgumentException not thrown 1", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                lm.setName(new String(new char[MAX_NAME_LENGTH + 1]));
-                ls.addLandmark(lm, iCategory); // Add Landmark with too long
-                // name
-                assertContinue("IllegalArgumentException not thrown 2", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testDeleteLandmarkBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                ls.deleteLandmark(null); // Delete with null Landmark
-                // parameter
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                Landmark lm = new Landmark("test", null, null, null);
-                ls.deleteLandmark(lm); // Try to delete a Landmark that was
-                // never added
-                assertContinue("LandmarkException not thrown", false);
-            }
-            catch (LandmarkException le)
-            {
-                // Exception was thrown correctly
-            }
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksEmptyStore()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-            Enumeration e = ls.getLandmarks();
-            assertTrue("Expected getLandmarks to return null", e == null);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Create a Landmark object, store it in the LandmarkStore, check
-    // that it can be found again and then delete it
-    public void testAddDeleteLandmark1()
-    {
-        try
-        {
-
-            String name = "Nowhere";
-
-            // Create a new Landmark object with only name set
-            Landmark lm = new Landmark(name, null, null, null);
-
-            saveRetrieveDelete(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddDeleteLandmark2()
-    {
-        try
-        {
-            String name = "Somewhere";
-            String desc = "It's somewhere but noone knows where it really is";
-
-            // Create a new Landmark object with only name set
-            Landmark lm = new Landmark(name, desc, null, null);
-
-            saveRetrieveDelete(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddDeleteLandmark3()
-    {
-        try
-        {
-            String name = "North pole";
-            String desc = "Santas workshop, whats that address again?";
-
-            QualifiedCoordinates coords = new QualifiedCoordinates(90.0f, 0.0f,
-                    0.0f, 10.0f, 10.0f);
-
-            // Create a new Landmark object with only name set
-            Landmark lm = new Landmark(name, desc, coords, null);
-
-            saveRetrieveDelete(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddDeleteLandmark4()
-    {
-        try
-        {
-            String name = "Office";
-            String desc = "Where you work";
-
-            QualifiedCoordinates coords = new QualifiedCoordinates(57.0f,
-                    17.0f, 34.0f, 50.0f, 80.0f);
-
-            AddressInfo address = new AddressInfo();
-            address.setField(AddressInfo.EXTENSION, extension);
-            address.setField(AddressInfo.STREET, street);
-            address.setField(AddressInfo.POSTAL_CODE, postal_code);
-            address.setField(AddressInfo.CITY, city);
-            address.setField(AddressInfo.COUNTY, county);
-            address.setField(AddressInfo.DISTRICT, district);
-            address.setField(AddressInfo.STATE, state);
-            address.setField(AddressInfo.COUNTRY, country);
-            address.setField(AddressInfo.COUNTRY_CODE, country_code);
-            address.setField(AddressInfo.BUILDING_NAME, building_name);
-            address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-            address.setField(AddressInfo.BUILDING_ROOM, building_room);
-            address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-            address.setField(AddressInfo.CROSSING1, crossing1);
-            address.setField(AddressInfo.CROSSING2, crossing2);
-            address.setField(AddressInfo.URL, url);
-            address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-            // Create a new Landmark object
-            Landmark lm = new Landmark(name, desc, coords, address);
-
-            saveRetrieveDelete(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that a Landmark can be added twice.
-    public void testAddLandmarkTwice()
-    {
-        try
-        {
-            String name = "Add this landmark twice";
-            Landmark lm = new Landmark(name, null, null, null);
-
-            ls = getDefaultLandmarkStore();
-            ls.addLandmark(lm, iCategory);
-            ls.addLandmark(lm, iCategory);
-
-            Enumeration e = ls.getLandmarks();
-            int count = findLandmarks(e, new String[] { name });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that addLandmark can not be used as updateLandmark.
-    public void testAddLandmarkNoUpdate() throws Exception
-    {
-        String name = "Add this landmark twice";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        ls = getDefaultLandmarkStore();
-        ls.addLandmark(lm, iCategory);
-
-        // Check that addLandmark is not doing what updateLandmark should do
-        lm.setDescription("Whatever");
-        lm.setQualifiedCoordinates(new QualifiedCoordinates(0, 0, 0, 0, 0));
-        lm.setAddressInfo(new AddressInfo());
-        ls.addLandmark(lm, iCategory);
-
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        ls.deleteLandmark(lm);
-
-        assertTrue("", true);
-    }
-
-    // Tests that Landmarks with the same name can be added.
-    public void testAddLandmarkSameName()
-    {
-        try
-        {
-            String name = "Glenn";
-            Landmark lm1 = new Landmark(name, null, null, null);
-            String desc = "Another landmark with name=Glenn";
-            Landmark lm2 = new Landmark(name, desc, null, null);
-
-            ls = getDefaultLandmarkStore();
-            ls.addLandmark(lm1, iCategory);
-            ls.addLandmark(lm2, iCategory);
-
-            Enumeration e = ls.getLandmarks();
-            int count = findLandmarks(e, new String[] { name, name });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            ls.deleteLandmark(lm1);
-            ls.deleteLandmark(lm2);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that a Landmark can be added, then deleted and added again.
-    public void testAddDeleteAddLandmark()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String name = "LandmarkToBeAddedDeletedAndAddedAgain";
-            Landmark lm = new Landmark(name, null, null, null);
-            Enumeration e;
-
-            ls.addLandmark(lm, iCategory);
-
-            e = ls.getLandmarks();
-            Landmark fetchedLm = findLandmark(e, name);
-            ls.deleteLandmark(fetchedLm);
-
-            ls.addLandmark(lm, iCategory);
-
-            e = ls.getLandmarks();
-            int count = findLandmarks(e, new String[] { name });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that description and address are truncated if they are too long
-    public void testAddLandmarkTruncate()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String name = "Longest address in the world :)";
-
-            String maxDescription = new String(new char[MAX_DESCRIPTION_LENGTH]);
-            String tooLongDescription = maxDescription + "could be a lot more";
-
-            String maxAddrField = new String(new char[MAX_ADDRESSFIELD_LENGTH]);
-            String tooLongAddrField = maxAddrField + "some more";
-            AddressInfo tooLongAddr = new AddressInfo();
-            for (int i = 0; i < 17; ++i)
-            {
-                tooLongAddr.setField(i + 1, tooLongAddrField);
-            }
-
-            // Add the landmark that has info with too long length
-            Landmark lm = new Landmark(name, tooLongDescription, null,
-                                       tooLongAddr);
-            ls.addLandmark(lm, iCategory);
-
-            // All fields should be truncated to max length
-            AddressInfo expectedAddr = new AddressInfo();
-            for (int i = 0; i < 17; ++i)
-            {
-                expectedAddr.setField(i + 1, maxAddrField);
-            }
-
-            Enumeration e = ls.getLandmarks();
-            Landmark fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, maxDescription, null, expectedAddr);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testUpdateLandmarkBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                ls.updateLandmark(null); // Update with null Landmark
-                // parameter
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            Landmark lm = new Landmark("test", null, null, null);
-            try
-            {
-                ls.updateLandmark(lm); // Update without adding first
-                assertContinue("LandmarkException not thrown 1", false);
-            }
-            catch (LandmarkException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                ls.addLandmark(lm, iCategory);
-                ls.deleteLandmark(lm);
-                ls.updateLandmark(lm); // Landmark no longer belongs to store
-                assertContinue("LandmarkException not thrown 2", false);
-            }
-            catch (LandmarkException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                ls.addLandmark(lm, iCategory);
-                lm.setName(new String(new char[MAX_NAME_LENGTH + 1]));
-                ls.updateLandmark(lm); // Update Landmark with too long name
-                assertContinue("IllegalArgumentException not thrown 3", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Add a landmark to the LandmarkStore and update with more and more
-    // information.
-    public void testUpdateLandmark1()
-    {
-        try
-        {
-            // Create a new Landmark object
-            String name = "Home";
-            Landmark lm = new Landmark(name, null, null, null);
-
-            ls = getDefaultLandmarkStore();
-
-            // Save the landmark
-            ls.addLandmark(lm, iCategory);
-
-            Landmark fetchedLm = null;
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            // Update the landmark with a decription
-            String description = "There is no place like it";
-            lm.setDescription(description);
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, description, null, null);
-
-            // Update the landmark with QualifiedCoordinates and change the name
-            QualifiedCoordinates coords = new QualifiedCoordinates(-10.2f,
-                    -107.8f, -4.5f, 11.9f, 5.1f);
-
-            lm.setQualifiedCoordinates(coords);
-            name = "My place";
-            lm.setName(name);
-
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, description, coords, null);
-
-            // Update the landmark with AddressInfo
-            AddressInfo address = new AddressInfo();
-            address.setField(AddressInfo.EXTENSION, extension);
-            address.setField(AddressInfo.STREET, street);
-            address.setField(AddressInfo.POSTAL_CODE, postal_code);
-            address.setField(AddressInfo.CITY, city);
-            address.setField(AddressInfo.COUNTY, county);
-            address.setField(AddressInfo.DISTRICT, district);
-            address.setField(AddressInfo.STATE, state);
-            address.setField(AddressInfo.COUNTRY, country);
-            address.setField(AddressInfo.COUNTRY_CODE, country_code);
-            address.setField(AddressInfo.BUILDING_NAME, building_name);
-            address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-            address.setField(AddressInfo.BUILDING_ROOM, building_room);
-            address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-            address.setField(AddressInfo.CROSSING1, crossing1);
-            address.setField(AddressInfo.CROSSING2, crossing2);
-            address.setField(AddressInfo.URL, url);
-            address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-            lm.setAddressInfo(address);
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, description, coords, address);
-
-            // Finally, remove the landmark
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Add a landmark to the LandmarkStore with all the information set and
-    // update by removing information.
-    public void testUpdateLandmark2()
-    {
-        try
-        {
-            // Create a new Landmark object
-            String name = "Home";
-            String desc = "There is no place like it";
-            QualifiedCoordinates coords = new QualifiedCoordinates(-10.2f,
-                    -107.8f, -4.5f, 11.9f, 5.1f);
-            AddressInfo address = new AddressInfo();
-            address.setField(AddressInfo.EXTENSION, extension);
-            address.setField(AddressInfo.STREET, street);
-            address.setField(AddressInfo.POSTAL_CODE, postal_code);
-            address.setField(AddressInfo.CITY, city);
-            address.setField(AddressInfo.COUNTY, county);
-            address.setField(AddressInfo.DISTRICT, district);
-            address.setField(AddressInfo.STATE, state);
-            address.setField(AddressInfo.COUNTRY, country);
-            address.setField(AddressInfo.COUNTRY_CODE, country_code);
-            address.setField(AddressInfo.BUILDING_NAME, building_name);
-            address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-            address.setField(AddressInfo.BUILDING_ROOM, building_room);
-            address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-            address.setField(AddressInfo.CROSSING1, crossing1);
-            address.setField(AddressInfo.CROSSING2, crossing2);
-            address.setField(AddressInfo.URL, url);
-            address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-            Landmark lm = new Landmark(name, desc, coords, address);
-
-            ls = getDefaultLandmarkStore();
-
-            // Save the landmark
-            ls.addLandmark(lm, iCategory);
-
-            Landmark fetchedLm = null;
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, desc, coords, address);
-
-            // Remove decription
-            lm.setDescription(null);
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, null, coords, address);
-
-            // Remove QualifiedCoordinates
-            lm.setQualifiedCoordinates(null);
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, null, null, address);
-
-            // Remove AddressInfo
-            lm.setAddressInfo(null);
-            ls.updateLandmark(lm);
-
-            fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            // Finally, remove the landmark
-            ls.deleteLandmark(lm);
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testUpdateLandmarkTruncate()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String name = "Update with lots of info later";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, iCategory);
-
-            String maxDescription = new String(new char[MAX_DESCRIPTION_LENGTH]);
-            String tooLongDescription = maxDescription + "could be a lot more";
-
-            String maxAddrField = new String(new char[MAX_ADDRESSFIELD_LENGTH]);
-            String tooLongAddrField = maxAddrField + "some more";
-            AddressInfo tooLongAddr = new AddressInfo();
-            for (int i = 0; i < 17; ++i)
-            {
-                tooLongAddr.setField(i + 1, tooLongAddrField);
-            }
-
-            // Update the landmark with info that has length longer than max
-            lm.setDescription(tooLongDescription);
-            lm.setAddressInfo(tooLongAddr);
-            ls.updateLandmark(lm);
-
-            // All fields should be truncated to max length
-            AddressInfo expectedAddr = new AddressInfo();
-            for (int i = 0; i < 17; ++i)
-            {
-                expectedAddr.setField(i + 1, maxAddrField);
-            }
-
-            Enumeration e = ls.getLandmarks();
-            Landmark fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, maxDescription, null, expectedAddr);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddDeleteUpdateLandmark()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String name = "AddDeleteUpdateLandmark";
-            Landmark lm = new Landmark(name, null, null, null);
-
-            // Add, get and delete the landmark
-            ls.addLandmark(lm, iCategory);
-            Enumeration e = ls.getLandmarks();
-            Landmark fetchedLm = findLandmark(e, name);
-            ls.deleteLandmark(lm);
-
-            // Try to update the landmark we just deleted
-            try
-            {
-                fetchedLm.setDescription("Description");
-                ls.updateLandmark(fetchedLm);
-                assertContinue("LandmarkException not thrown", false);
-            }
-            catch (LandmarkException le)
-            {
-                // Exception was thrown correctly
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // List all landmarks.
-    public void testGetAllLandmarks()
-    {
-        try
-        {
-            final String BASE_NAME = "GetLandmarksTest";
-            final int NUM_LANDMARKS = 10;
-            String[] names = new String[NUM_LANDMARKS];
-
-            ls = getDefaultLandmarkStore();
-
-            for (int i = 0; i < NUM_LANDMARKS; ++i)
-            {
-                names[i] = BASE_NAME + i;
-                Landmark lm = new Landmark(names[i], null, null, null);
-                ls.addLandmark(lm, iCategory);
-            }
-
-            // Retrieve the enumeration of landmarks
-            Enumeration e = ls.getLandmarks();
-
-            int count = findLandmarks(e, names);
-            assertContinue("Wrong number of Landmarks found",
-                           count == NUM_LANDMARKS);
-
-            // Delete all the added landmarks
-            e = ls.getLandmarks();
-            while (e.hasMoreElements())
-            {
-                ls.deleteLandmark((Landmark) e.nextElement());
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddCategoryBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                ls.addCategory(null); // Add category with null parameter
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                ls.addCategory(""); // Add category with empty string parameter
-                assertContinue("IllegalArgumentException not thrown", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            String category = "Try to add this category twice";
-            ls.addCategory(category);
-
-            try
-            {
-                ls.addCategory(category); // Category already exists
-                assertContinue("IllegalArgumentException not thrown", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            ls.deleteCategory(category);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testDeleteCategoryBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                ls.deleteCategory(null); // Delete category with null
-                // parameter
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            String category = "Nonexisting category";
-            ls.deleteCategory(category); // This should be a silent failure
-            ls.deleteCategory(category); // Try again just to make sure :)
-
-            ls.deleteCategory(""); // Empty string should fail silently
-
-            // Silent failure if category name is too long
-            ls.deleteCategory(new String(new char[MAX_CATEGORY_LENGTH + 1]));
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // Tests that new categories can be added and deleted.
-    public void testAddDeleteCategory()
-    {
-        try
-        {
-            String category = "AddCategoryTest Category";
-
-            ls = getDefaultLandmarkStore();
-
-            // Add category
-            ls.addCategory(category);
-
-            // Check that the category was added
-            Enumeration e = ls.getCategories();
-            findCategory(e, category);
-
-            // Delete the category
-            ls.deleteCategory(category);
-
-            // Check that category has been removed
-            e = ls.getCategories();
-            while (e.hasMoreElements())
-            {
-                String s = (String) e.nextElement();
-                assertContinue("Category was not removed", !s.equals(category));
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddDeleteManyCategories()
-    {
-        int c = 0;
-        try
-        {
-            // A variety of valid category names
-            String[] categories = new String[] { "q", "Dots ...",
-                                                 "Exclamation!", "(parentesis)", "percentage%", "hashmark#",
-                                                 "at@", "et&", "commas,,,"
-                                               };
-
-            ls = getDefaultLandmarkStore();
-
-            // Quick Add and Delete of categories
-            for (int i = 0; i < categories.length; ++i)
-            {
-                ls.addCategory(categories[i]);
-                ls.deleteCategory(categories[i]);
-            }
-
-            // Add many categories
-            String category = "Test_Category_";
-
-            // Add categories
-            for (int i = 0; i < 100; ++i)
-            {
-                ls.addCategory(category + i);
-                c++;
-            }
-
-            // Delete categories
-            for (int i = 0; i < 100; ++i)
-            {
-                ls.deleteCategory(category + i);
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage() + "@" + c, false);
-        }
-    }
-
-    public void testAddCategoryTruncate()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String maxCategoryName = new String(new char[MAX_CATEGORY_LENGTH]);
-
-            // Add category with too long name
-            String tooLongCategoryName = maxCategoryName + "extra";
-            ls.addCategory(tooLongCategoryName);
-
-            // Check that the category was added
-            Enumeration e = ls.getCategories();
-            // Category name should be truncated to max length
-            findCategory(e, maxCategoryName);
-
-            // Try to delete with the too long category name
-            ls.deleteCategory(tooLongCategoryName);
-            // Make sure the category is still there
-            e = ls.getCategories();
-            findCategory(e, maxCategoryName);
-
-            // Delete the category
-            ls.deleteCategory(maxCategoryName);
-
-            // Check that category has been removed
-            e = ls.getCategories();
-            while (e.hasMoreElements())
-            {
-                String s = (String) e.nextElement();
-                assertContinue("Category was not removed", !maxCategoryName
-                               .equals(s));
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkToCategory1()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Create a category
-            String category = "ViperTest Sightseeing";
-            ls.addCategory(category);
-
-            // Create a new Landmark in the category
-            String name = "Eiffel Tower";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, category);
-
-            // Get Landmarks by category
-            Enumeration e = ls.getLandmarks(category, null);
-            int count = findLandmarks(e, new String[] { name });
-            assertContinue("Wrong number of Landmarks found", count == 1);
-
-            ls.deleteLandmark(lm);
-            ls.deleteCategory(category);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkToCategory2()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Add a new Landmark to default category
-            String name = "Liseberg";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, null);
-
-            // Create a category
-            String category = "Amuzement Parks";
-            ls.addCategory(category);
-
-            // Get Landmarks by category
-            Enumeration e = ls.getLandmarks(category, null);
-            assertContinue("Category should have been empty", e == null);
-
-            // Add the Landmark to the category
-            ls.addLandmark(lm, category);
-
-            // Get Landmarks by category
-            Enumeration e2 = ls.getLandmarks(category, null);
-            int count = findLandmarks(e2, new String[] { name });
-            assertContinue("Wrong number of Landmarks found", count == 1);
-
-            ls.deleteLandmark(lm);
-            ls.deleteCategory(category);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkToCategory3()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Add category1
-            String category1 = "Food";
-            ls.addCategory(category1);
-            findCategory(ls.getCategories(), category1);
-
-            // Add category2
-            String category2 = "Restuarants";
-            ls.addCategory(category2);
-            findCategory(ls.getCategories(), category2);
-
-            // Create a new Landmark in category1
-            String name = "Da Pizza place";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, category1);
-
-            // Add the Landmark to category2
-            ls.addLandmark(lm, category2);
-
-            // Get Landmarks by category1
-            Enumeration e1 = ls.getLandmarks(category1, null);
-            int count1 = findLandmarks(e1, new String[] { name });
-            assertContinue("Wrong number of Landmarks found", count1 == 1);
-
-            // Get Landmarks by category2
-            Enumeration e2 = ls.getLandmarks(category2, null);
-            int count2 = findLandmarks(e2, new String[] { name });
-            assertContinue("Wrong number of Landmarks found", count2 == 1);
-
-            ls.deleteLandmark(lm);
-            ls.deleteCategory(category1);
-            ls.deleteCategory(category2);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkEmptyStrings()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            try
-            {
-                Landmark lm = new Landmark("name", null, null, null);
-                ls.addLandmark(lm, ""); // Try to use empty string for category
-                assertContinue("IllegalArgumentException not thrown", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception thrown correctly
-            }
-
-            // Create AddressInfo with all fields set to empty strings
-            AddressInfo addr = new AddressInfo();
-            for (int i = 0; i < 17; ++i)
-            {
-                addr.setField(i + 1, "");
-            }
-
-            String name = "";
-            String description = " ";
-
-            Landmark lm = new Landmark(name, description, null, addr);
-            ls.addLandmark(lm, iCategory); // Should be ok
-
-            // Get Landmarks
-            Enumeration e = ls.getLandmarks();
-            Landmark fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, description, null, addr);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkToCategoryDeleteCategory()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Create a category
-            String category = "Museums";
-            ls.addCategory(category);
-
-            // Create a new Landmark in the category
-            String name = "Guggenheim";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, category);
-
-            // Delete the category
-            ls.deleteCategory(category);
-
-            // Get Landmarks by category
-            Enumeration e = ls.getLandmarks(null, category);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Make sure Landmark still exists
-            Landmark fetchedLm = findLandmark(ls.getLandmarks(), name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkSameNameDifferentCategory()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Create categories
-            String category1 = "category1";
-            String category2 = "category2";
-            ls.addCategory(category1);
-            ls.addCategory(category2);
-
-            String name = "Same name";
-
-            // Create a new Landmark in category1
-            String desc1 = "This landmark has a description";
-            Landmark lm1 = new Landmark(name, desc1, null, null);
-            ls.addLandmark(lm1, category1);
-
-            // Create a new Landmark in category2
-            Landmark lm2 = new Landmark(name, null, null, null);
-            ls.addLandmark(lm2, category2);
-
-            // Get Landmarks by category1
-            Enumeration e = ls.getLandmarks(category1, null);
-            Landmark fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, desc1, null, null);
-
-            // Get Landmarks by category2
-            e = ls.getLandmarks(category2, null);
-            fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            // Get Landmarks by name
-            e = ls.getLandmarks(null, name);
-            int count = findLandmarks(e, new String[] { name, name });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            ls.deleteLandmark(lm1);
-            ls.deleteLandmark(lm2);
-            ls.deleteCategory(category1);
-            ls.deleteCategory(category2);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testRemoveLandmarkFromCategoryBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String category1 = "Cat1";
-            String category2 = "Cat2";
-            ls.addCategory(category1);
-            ls.addCategory(category2);
-
-            // Add a landmark to category1
-            Landmark lm = new Landmark("name", null, null, null);
-            ls.addLandmark(lm, category1);
-
-            try
-            {
-                // Remove landmark from category with null Landmark parameter
-                ls.removeLandmarkFromCategory(null, category1);
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                // Remove landmark from category with null category parameter
-                ls.removeLandmarkFromCategory(lm, null);
-                assertContinue("NullPointerException not thrown", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            // Silent failure if Landmark does not belong to category
-            ls.removeLandmarkFromCategory(lm, category2);
-
-            // Silent failure if category does not exist
-            ls.removeLandmarkFromCategory(lm, "NonexistingCategory");
-
-            // Silent failure if category is empty string
-            ls.removeLandmarkFromCategory(lm, "");
-
-            // Silent failure if category name is too long
-            String tooLongCategory = new String(
-                new char[MAX_CATEGORY_LENGTH + 1]);
-            ls.removeLandmarkFromCategory(lm, tooLongCategory);
-
-            // Silent failure if Landmark does not belong to LandmarkStore
-            Landmark newLm = new Landmark("Not added", null, null, null);
-            ls.removeLandmarkFromCategory(newLm, category1);
-
-            ls.deleteLandmark(lm);
-            ls.deleteCategory(category1);
-            ls.deleteCategory(category2);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testRemoveLandmarkFromCategory()
-    {
-        try
-        {
-            String category = "Category";
-            String name = "lm";
-            Landmark lm = new Landmark(name, null, null, null);
-
-            ls = getDefaultLandmarkStore();
-            ls.addCategory(category);
-            ls.addLandmark(lm, category);
-
-            Enumeration e = ls.getLandmarks(category, name);
-            Landmark fetchedLm = findLandmark(e, name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            ls.removeLandmarkFromCategory(lm, category);
-
-            Enumeration e2 = ls.getLandmarks(category, name);
-            assertContinue("Landmark not removed from category", e2 == null);
-
-            // Delete the category and Landmark from the store
-            ls.deleteCategory(category);
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testRemoveLandmarkFromCategory2()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            // Add categories
-            String category1 = "category1";
-            String category2 = "category2";
-            ls.addCategory(category1);
-            ls.addCategory(category2);
-
-            String name = "lm";
-            Landmark lm = new Landmark(name, null, null, null);
-
-            // Add landmark to category1 and category2
-            ls.addLandmark(lm, category1);
-            ls.addLandmark(lm, category2);
-
-            // Remove landmark from category1
-            ls.removeLandmarkFromCategory(lm, category1);
-
-            Enumeration e = ls.getLandmarks(category1, name);
-            assertContinue("Landmark not removed from category", e == null);
-
-            // Make sure landmark still belongs to category2
-            Enumeration e2 = ls.getLandmarks(category2, name);
-            Landmark fetchedLm = findLandmark(e2, name);
-            checkLandmark(fetchedLm, name, null, null, null);
-
-            // Remove landmark from category2
-            ls.removeLandmarkFromCategory(lm, category2);
-
-            Enumeration e3 = ls.getLandmarks(category2, name);
-            assertContinue("Landmark not removed from category", e3 == null);
-
-            // Delete the categories and Landmark from the store
-            ls.deleteCategory(category1);
-            ls.deleteCategory(category2);
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByNameBadArguments()
-    {
-        try
-        {
-            String maxName = new String(new char[MAX_NAME_LENGTH]);
-
-            ls = getDefaultLandmarkStore();
-            Landmark lm = new Landmark(maxName, null, null, null);
-            ls.addLandmark(lm, null);
-
-            // Sanity check, find landmark by name
-            Enumeration e = ls.getLandmarks(null, maxName);
-            int count = findLandmarks(e, new String[] { maxName });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search with too long name
-            e = ls.getLandmarks(null, maxName + "x");
-            assertContinue("Expected getLandmarks to return null (1)",
-                           e == null);
-
-            // Search with empty string for name
-            e = ls.getLandmarks(null, "");
-            assertContinue("Expected getLandmarks to return null (2)",
-                           e == null);
-
-            ls.deleteLandmark(lm);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByName()
-    {
-        try
-        {
-
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            Enumeration e;
-            int count;
-
-            // Search for landmark that does not exist
-            e = ls.getLandmarks(null, searchName0);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search for landmarks 1
-            e = ls.getLandmarks(null, searchName1);
-            count = findLandmarks(e, new String[] { searchName1 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 2
-            e = ls.getLandmarks(null, searchName2);
-            count = findLandmarks(e, new String[] { searchName2, searchName2 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks 3
-            e = ls.getLandmarks(null, searchName3);
-            count = findLandmarks(e, new String[] { searchName3, searchName3,
-                                                    searchName3
-                                                  });
-            assertContinue("Wrong number of landmarks found", count == 3);
-
-            deleteAllLandmarksAndCategories();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByNameUncategorized()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            Enumeration e;
-            int count;
-
-            // Find all landmarks that do not belong to a category
-            e = ls.getLandmarks("", null);
-            count = findLandmarks(e, new String[] { searchName1, searchName2 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks 1
-            e = ls.getLandmarks("", searchName1);
-            count = findLandmarks(e, new String[] { searchName1 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 3
-            e = ls.getLandmarks("", searchName3);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            deleteAllLandmarksAndCategories();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByNameWildcards()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String[] names = { "Hepa", "Huupa", "Lupa", "upo", "upa", "Lu?a",
-                               "*"
-                             };
-            int length = names.length;
-            Landmark[] lms = new Landmark[length];
-
-            for (int i = 0; i < length; ++i)
-            {
-                lms[i] = new Landmark(names[i], null, null, null);
-                ls.addLandmark(lms[i], null);
-            }
-
-            searchAndMatch("H*", new String[] { "Hepa", "Huupa" });
-            searchAndMatch("*o", new String[] { "upo" });
-            searchAndMatch("*upa", new String[] { "Huupa", "Lupa", "upa" });
-            searchAndMatch("L*a", new String[] { "Lupa", "Lu?a" });
-            searchAndMatch("*e*", new String[] { "Hepa" });
-
-            searchAndMatch("?", new String[] { "*" });
-            searchAndMatch("up?", new String[] { "upa", "upo" });
-            searchAndMatch("?upa", new String[] { "Lupa" });
-            searchAndMatch("H?pa", new String[] { "Hepa" });
-            searchAndMatch("?u??", new String[] { "Lupa", "Lu?a" });
-            searchAndMatch("???", new String[] { "upo", "upa" });
-            searchAndMatch("?????", new String[] { "Huupa" });
-
-            // Some complicated searches
-            searchAndMatch("*??pa", new String[] { "Hepa", "Huupa", "Lupa" });
-            searchAndMatch("*u?a", new String[] { "Huupa", "Lupa", "upa",
-                                                  "Lu?a"
-                                                });
-            searchAndMatch("*up?",
-                           new String[] { "Huupa", "Lupa", "upo", "upa" });
-            searchAndMatch("?*up?", new String[] { "Huupa", "Lupa" });
-            searchAndMatch("*?*o*", new String[] { "upo" });
-
-            // Find all landmarks
-            searchAndMatch("*", names);
-            searchAndMatch("?*", names);
-            searchAndMatch("*?", names);
-            searchAndMatch("*?*", names);
-
-            for (int i = 0; i < length; ++i)
-            {
-                ls.deleteLandmark(lms[i]);
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByCategoryBadArguments()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            String maxCategoryName = new String(new char[MAX_CATEGORY_LENGTH]);
-            ls.addCategory(maxCategoryName);
-
-            String name = "Wherever";
-            Landmark lm = new Landmark(name, null, null, null);
-            ls.addLandmark(lm, maxCategoryName);
-
-            // Sanity check, find landmark by category
-            Enumeration e = ls.getLandmarks(maxCategoryName, null);
-            int count = findLandmarks(e, new String[] { name });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search with too long category name
-            e = ls.getLandmarks(maxCategoryName + "x", null);
-            assertContinue("Expected getLandmarks to return null (1)",
-                           e == null);
-
-            // Search with empty string for category name
-            e = ls.getLandmarks("", null);
-            assertContinue("Expected getLandmarks to return null (2)",
-                           e == null);
-
-            ls.deleteLandmark(lm);
-            ls.deleteCategory(maxCategoryName);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByCategory()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            Enumeration e;
-            int count;
-
-            // Search for category that does not exist
-            e = ls.getLandmarks(searchCategory0, null);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search for landmarks 1
-            e = ls.getLandmarks(searchCategory1, null);
-            count = findLandmarks(e, new String[] { searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 2
-            e = ls.getLandmarks(searchCategory2, null);
-            count = findLandmarks(e, new String[] { searchName2, searchName3,
-                                                    searchName3
-                                                  });
-            assertContinue("Wrong number of landmarks found", count == 3);
-
-            // Delete the categories and Landmarks from the store
-            deleteAllLandmarksAndCategories();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByNameAndCategory()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            Enumeration e;
-            int count;
-
-            // Search with a category that does not exist
-            e = ls.getLandmarks(searchCategory0, searchName1);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search with a name that does not exist
-            e = ls.getLandmarks(searchCategory2, searchName0);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search with a name that does not exist in the category
-            e = ls.getLandmarks(searchCategory1, searchName1);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search for landmarks 1
-            e = ls.getLandmarks(searchCategory1, searchName3);
-            count = findLandmarks(e, new String[] { searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 2
-            e = ls.getLandmarks(searchCategory2, searchName3);
-            count = findLandmarks(e, new String[] { searchName3, searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks 3
-            e = ls.getLandmarks(searchCategory2, searchName2);
-            Landmark fetchedLm = findLandmark(e, searchName2);
-            checkLandmark(fetchedLm, searchName2, searchCategory2, null, null);
-
-            // Delete the categories and Landmarks from the store
-            deleteAllLandmarksAndCategories();
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByAreaBadArguments()
-    {
-
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            double minLat = -10.0d;
-            double maxLat = 10.0d;
-            double minLon = -110.0d;
-            double maxLon = 110.0d;
-
-            // Bad minLat values
-            assertBadGetLandmarksByArea(-90.1d, maxLat, minLon, maxLon);
-            assertBadGetLandmarksByArea(90.1d, maxLat, minLon, maxLon);
-
-            // Bad maxLat values
-            assertBadGetLandmarksByArea(minLat, -90.1d, minLon, maxLon);
-            assertBadGetLandmarksByArea(minLat, 90.1d, minLon, maxLon);
-
-            // minLat > maxLat
-            assertBadGetLandmarksByArea(40.0d, 30.0d, minLon, maxLon);
-
-            // Bad minLon values
-            assertBadGetLandmarksByArea(minLat, maxLat, -180.1d, maxLon);
-            assertBadGetLandmarksByArea(minLat, maxLat, 180.0d, maxLon);
-
-            // Bad maxLon values
-            assertBadGetLandmarksByArea(minLat, maxLat, minLon, -180.1d);
-            assertBadGetLandmarksByArea(minLat, maxLat, minLon, 180.0d);
-
-            try
-            {
-                Enumeration e = ls.getLandmarks(null, minLat, minLon, maxLat,
-                                                maxLon);
-                assertContinue(
-                    "IllegalArgumentException not thrown for long category name",
-                    false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByArea()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            // -180 0 180
-            // |---------|- 90 1 = searchName1
-            // | | | 2 = searchName2
-            // | 1 | | 3 = searchName3, searchCategory1
-            // |----+----|- 0 4 = searchName3, searchCategory2
-            // |2 |4 5| 5 = searchName3, searchCategory2
-            // | 3 | |
-            // |---------|- -90
-
-            Enumeration e;
-            int count;
-
-            // Search an area where there are no landmarks
-            e = ls.getLandmarks(null, 0.0d, 90.0d, 0.0d, 179.9d);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search for landmarks 1
-            e = ls.getLandmarks(null, 0.0d, 90.0d, -180.0d, 0.0d);
-            count = findLandmarks(e, new String[] { searchName1 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 2
-            e = ls.getLandmarks(null, -90.0d, 0.0d, -180.0d, 0.0d);
-            count = findLandmarks(e, new String[] { searchName2, searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks 3
-            e = ls.getLandmarks(null, -90.0d, 0.0d, 0.0d, 179.9d);
-            count = findLandmarks(e, new String[] { searchName3, searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks - find lm2, smallest possible area
-            e = ls.getLandmarks(null, -5.0d, -5.0d, -180.0d, -180.0d);
-            count = findLandmarks(e, new String[] { searchName2 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks - search lon [-180, 0] and [100, 180)
-            e = ls.getLandmarks(null, -90.0d, 90.0d, 100.0d, 0.0d);
-            count = findLandmarks(e, new String[] { searchName1, searchName2,
-                                                    searchName3, searchName3
-                                                  });
-            assertContinue("Wrong number of landmarks found", count == 4);
-
-            deleteAllLandmarksAndCategories();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByArea2()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-            Landmark lm1 = new Landmark("Landmark1", "description",
-                                        new QualifiedCoordinates(10.0, 20.0, Float.NaN, Float.NaN,
-                                                                 Float.NaN), null);
-            ls.addLandmark(lm1, null);
-            ls.addLandmark(new Landmark("Landmark2", null,
-                                        new QualifiedCoordinates(40.0, 30.0, 0, 0, 0), null), null);
-            ls
-            .addLandmark(new Landmark("Landmark3", null,
-                                      new QualifiedCoordinates(30.0, -10.0, 0, 0, 0),
-                                      null), null);
-            ls
-            .addLandmark(new Landmark("Landmark4", null,
-                                      new QualifiedCoordinates(30.0, 165.0, 0, 0, 0),
-                                      null), null);
-            ls.addLandmark(new Landmark("Landmark5", null,
-                                        new QualifiedCoordinates(30.0, -165.0, 0, 0, 0), null),
-                           null);
-
-            Enumeration e = ls.getLandmarks(null, -30.0, 50.0, 5.0, 25.0);
-            Landmark gotLandmark = findLandmark(e, "Landmark1");
-            checkLandmark(gotLandmark, lm1.getName(), lm1.getDescription(), lm1
-                          .getQualifiedCoordinates(), lm1.getAddressInfo());
-            assertContinue("Wrong number of landmarks found", !e
-                           .hasMoreElements());
-
-            deleteAllLandmarksAndCategories();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetLandmarksByAreaAndCategory()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            addLandmarksAndCategoriesForSearch();
-
-            // -180 0 180
-            // |---------|- 90 1 = searchName1
-            // | | | 2 = searchName2
-            // | 1 | | 3 = searchName3, searchCategory1
-            // |----+----|- 0 4 = searchName3, searchCategory2
-            // |2 |4 5| 5 = searchName3, searchCategory2
-            // | 3 | |
-            // |---------|- -90
-
-            Enumeration e;
-            int count;
-
-            // Search a category that does not contain any landmarks
-            e = ls
-                .getLandmarks(searchCategory0, -90.0d, 90.0d, -180.0d,
-                              179.9d);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search an area that does not contain any landmarks in the
-            // category
-            e = ls.getLandmarks(searchCategory2, -90.0d, 90.0d, -180.0d, 0.0d);
-            assertContinue("Expected getLandmarks to return null", e == null);
-
-            // Search for landmarks 1
-            e = ls
-                .getLandmarks(searchCategory1, -90.0d, 90.0d, -180.0d,
-                              179.9d);
-            count = findLandmarks(e, new String[] { searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 2
-            e = ls.getLandmarks(searchCategory2, -90.0d, 0.0d, -180.0d, 179.9d);
-            count = findLandmarks(e, new String[] { searchName3, searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 2);
-
-            // Search for landmarks 3
-            e = ls.getLandmarks(searchCategory2, -90.0d, 0.0d, 100.0d, 179.9d);
-            count = findLandmarks(e, new String[] { searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            // Search for landmarks 4 - smallest possible search area
-            e = ls
-                .getLandmarks(searchCategory1, -90.0d, -90.0d, -21.0d,
-                              -21.0d);
-            count = findLandmarks(e, new String[] { searchName3 });
-            assertContinue("Wrong number of landmarks found", count == 1);
-
-            deleteAllLandmarksAndCategories();
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testEnumerationDeleteLandmark1()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            Landmark lm1 = new Landmark("lm1", null, null, null);
-            Landmark lm2 = new Landmark("lm2", null, null, null);
-            Landmark lm3 = new Landmark("lm3", null, null, null);
-
-            ls.addLandmark(lm1, null);
-            ls.addLandmark(lm2, null);
-            ls.addLandmark(lm3, null);
-
-            Enumeration e = ls.getLandmarks();
-            assertContinue("Enumeration is empty", e.hasMoreElements());
-            ls.deleteLandmark(lm1);
-            ls.deleteLandmark(lm2);
-
-            // Expect all landmarks since the enumeration should remain
-            // unchanged
-            int count = findLandmarks(e, new String[] { "lm1", "lm2", "lm3" });
-            assertContinue("Wrong number of landmarks found", count == 3);
-
-            ls.deleteLandmark(lm3);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testEnumerationDeleteLandmark2()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-
-            Landmark lm1 = new Landmark("lm1", null, null, null);
-            Landmark lm2 = new Landmark("lm2", null, null, null);
-            Landmark lm3 = new Landmark("lm3", null, null, null);
-
-            ls.addLandmark(lm1, null);
-            ls.addLandmark(lm2, null);
-            ls.addLandmark(lm3, null);
-
-            Enumeration e = ls.getLandmarks();
-            ls.deleteLandmark(lm1);
-            ls.deleteLandmark(lm2);
-            ls.deleteLandmark(lm3);
-
-            assertContinue("Landmark lm1 was not found!", findLandmarks(e,
-                           new String[] { "lm1", "lm2", "lm3" }) == 3);
-            assertContinue("Store is not empty!", ls.getLandmarks() == null);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testGetInstance2()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-            for (int i = 0; i < 10; i++)
-            {
-                LandmarkStore.createLandmarkStore("mystore" + i);
-            }
-
-            stores = LandmarkStore.listLandmarkStores();
-            for (int i = 0; i < stores.length; i++)
-            {
-                LandmarkStore.getInstance(stores[i]);
-            }
-
-            for (int i = 0; i < stores.length; i++)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing getInstance() !!!", false);
-        }
-    }
-
-    public void testGetInstanceWithGc()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-            for (int i = 0; i < 10; i++)
-            {
-                LandmarkStore.createLandmarkStore("mystore" + i);
-            }
-
-            stores = LandmarkStore.listLandmarkStores();
-            for (int i = 0; i < stores.length; i++)
-            {
-                LandmarkStore.getInstance(stores[i]);
-            }
-
-            for (int i = 0; i < stores.length; i++)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-
-            for (int i = 0; i < 10; i++)
-            {
-                LandmarkStore.createLandmarkStore("mystore" + i);
-                System.gc(); // collect some garbages...
-            }
-
-            // Cleanup
-            stores = LandmarkStore.listLandmarkStores();
-            for (int i = 0; i < stores.length; i++)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing getInstance() !!!", false);
-        }
-    }
-
-    public void testCreateLandmarkStore1()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-
-            try
-            {
-                // Check for '\' character
-                java.lang.Character ch = new java.lang.Character((char) 0x005C);
-                LandmarkStore.createLandmarkStore("mystore" + ch.charValue());
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '/' character
-                LandmarkStore.createLandmarkStore("mystore/");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for ':' character
-                LandmarkStore.createLandmarkStore("mystore:");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '*' character
-                LandmarkStore.createLandmarkStore("mystore*");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '?' character
-                LandmarkStore.createLandmarkStore("mystore?");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '|' character
-                LandmarkStore.createLandmarkStore("mystore" + '"');
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '<' character
-                LandmarkStore.createLandmarkStore("mystore<");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '>' character
-                LandmarkStore.createLandmarkStore("mystore>");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for '|' character
-                LandmarkStore.createLandmarkStore("mystore|");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-            try
-            {
-                // Check for Byte-order-mark character
-                java.lang.Character ch = new java.lang.Character((char) 0xFEFF);
-                LandmarkStore.createLandmarkStore("mystore" + ch.charValue());
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            // Cleanup
-            stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing createLandmarkStore !!!",
-                       false);
-
-        }
-
-        assertTrue("", true);
-    }
-
-    // 0x0000...0x001F control characters are not allowed
-    public void testCreateLandmarkStore2()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-
-            for (int i = 0x0000; i <= 0x001F; i++)
-            {
-                java.lang.Character ch = new java.lang.Character((char) i);
-                try
-                {
-                    LandmarkStore.createLandmarkStore("mystore"
-                                                      + ch.charValue());
-                }
-                catch (IllegalArgumentException e)
-                {
-                    // Exception was thrown correctly
-                }
-            }
-
-            // Cleanup
-            stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing createLandmarkStore !!!",
-                       false);
-        }
-
-        assertTrue("", true);
-    }
-
-    // 0x007F...0x009F control characters are not allowed
-    public void testCreateLandmarkStore3()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-
-            for (int i = 0x007F; i <= 0x009F; i++)
-            {
-                java.lang.Character ch = new java.lang.Character((char) i);
-                try
-                {
-                    LandmarkStore.createLandmarkStore("mystore"
-                                                      + ch.charValue());
-                }
-                catch (IllegalArgumentException e)
-                {
-                    // Exception was thrown correctly
-                }
-            }
-
-            // Cleanup
-            stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing createLandmarkStore !!!",
-                       false);
-        }
-
-        assertTrue("", true);
-    }
-
-    // 0xFFF0...0xFFFF are not allowed
-    public void testCreateLandmarkStore4()
-    {
-        try
-        {
-            String[] stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-
-            for (int i = 0xFFF0; i <= 0xFFFF; i++)
-            {
-                java.lang.Character ch = new java.lang.Character((char) i);
-                try
-                {
-                    LandmarkStore.createLandmarkStore("mystore"
-                                                      + ch.charValue());
-                }
-                catch (IllegalArgumentException e)
-                {
-                    // Exception was thrown correctly
-                }
-            }
-
-            // Cleanup
-            stores = LandmarkStore.listLandmarkStores();
-            if (stores != null)
-            {
-                for (int i = 0; i < stores.length; i++)
-                {
-                    LandmarkStore.deleteLandmarkStore(stores[i]);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Exception thrown when testing createLandmarkStore !!!",
-                       false);
-        }
-
-        assertTrue("", true);
-    }
-
-    //------------------------ Helper methods -----------------------
-
-    private void searchAndMatch(String aPattern, String[] aNames)
-    throws Exception
-    {
-
-        Enumeration e = ls.getLandmarks(null, aPattern);
-        int count = findLandmarks(e, aNames);
-        assertContinue("Wrong number of landmarks found",
-                       count == aNames.length);
-    }
-
-    // Add landmarks for testing getLandmarks
-    private void addLandmarksAndCategoriesForSearch() throws Exception
-    {
-        // -180   0   180
-        //   |---------|-  90        1 = searchName1
-        //   |    |    |             2 = searchName2
-        //   |  1 |    |             3 = searchName3, searchCategory1
-        //   |----+----|-  0         4 = searchName3, searchCategory2
-        //   |2   |4  5|             5 = searchName3, searchCategory2
-        //   |  3 |    |
-        //   |---------|- -90
-
-        float alt = 0.0f;
-        float hacc = 100.0f;
-        float vacc = 100.0f;
-
-        QualifiedCoordinates qc1 = new QualifiedCoordinates(27.0d, -17.0d, alt,
-                hacc, vacc);
-        QualifiedCoordinates qc2 = new QualifiedCoordinates(-5.0d, -180.0d,
-                alt, hacc, vacc);
-        QualifiedCoordinates qc3 = new QualifiedCoordinates(-90.0d, -21.0d,
-                alt, hacc, vacc);
-        QualifiedCoordinates qc4 = new QualifiedCoordinates(-5.0d, 5.0d, alt,
-                hacc, vacc);
-        QualifiedCoordinates qc5 = new QualifiedCoordinates(-5.0d, 179.0d, alt,
-                hacc, vacc);
-
-        // |     Category    | Landmarks
-        // |-----------------|--------------------------------------
-        // |       null      | searchName1, searchName2
-        // | searchCategory1 | searchName3
-        // | searchCategory2 | searchName2, searchName3, searchName3
-
-        // Add categories
-        ls.addCategory(searchCategory1);
-        ls.addCategory(searchCategory2);
-
-        // Add landmarks to default category
-        Landmark lm1 = new Landmark(searchName1, null, qc1, null);
-        Landmark lm2 = new Landmark(searchName2, null, qc2, null);
-        ls.addLandmark(lm1, null);
-        ls.addLandmark(lm2, null);
-
-        // Add landmarks to searchCategory1 (description = category)
-        Landmark lm3 = new Landmark(searchName3, searchCategory1, qc3, null);
-        ls.addLandmark(lm3, searchCategory1);
-
-        // Add landmark to searchCategory2 (description = category)
-        Landmark lm4 = new Landmark(searchName3, searchCategory2, qc4, null);
-        Landmark lm5 = new Landmark(searchName3, searchCategory2, qc5, null);
-        Landmark lm6 = new Landmark(searchName2, searchCategory2, null, null);
-        ls.addLandmark(lm4, searchCategory2);
-        ls.addLandmark(lm5, searchCategory2);
-        ls.addLandmark(lm6, searchCategory2);
-    }
-
-    private LandmarkStore getDefaultLandmarkStore()
-    {
-        LandmarkStore store = LandmarkStore.getInstance(null);
-        assertContinue("LandmarkStore is null", store != null);
-        return store;
-    }
-
-    private void assertEmptyLandmarkStore()
-    {
-        try
-        {
-            ls = getDefaultLandmarkStore();
-            Enumeration le = ls.getLandmarks();
-            assertContinue("Landmarks exist in LandmarkStore", le == null);
-
-            Enumeration ce = ls.getCategories();
-            assertContinue("Categories exist in LandmarkStore", !ce
-                           .hasMoreElements());
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    private void saveRetrieveDelete(Landmark aLm) throws Exception
-    {
-        String name = aLm.getName();
-        String description = aLm.getDescription();
-        QualifiedCoordinates coords = aLm.getQualifiedCoordinates();
-        AddressInfo address = aLm.getAddressInfo();
-
-        // Get the LandmarkStore
-        ls = LandmarkStore.getInstance(null);
-        assertContinue("LandmarkStore is null", ls != null);
-
-        // Save the landmark
-        ls.addLandmark(aLm, iCategory);
-
-        // Get all landmarks and search for the one we added
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-
-        ls.deleteLandmark(aLm);
-        assertContinue("No landmarks found in database", e != null);
-        checkLandmark(fetchedLm, name, description, coords, address);
-
-        ls.deleteLandmark(aLm); // Try to delete again, should be silently ignored
-    }
-
-    private Landmark findLandmark(Enumeration e, String aName)
-    {
-        Landmark foundLm = null;
-
-        if (e != null)
-        {
-            // Search for the saved one
-            while (e.hasMoreElements())
-            {
-                Landmark aLandmark = (Landmark) e.nextElement();
-                assertContinue("Enumeration contains a null", aLandmark != null);
-
-                if (aName.equals(aLandmark.getName()))
-                {
-                    assertContinue("More that one landmark called " + aName,
-                                   foundLm == null);
-                    foundLm = aLandmark;
-                    break;
-                }
-            }
-        }
-
-        return foundLm;
-    }
-
-    // Returns number of Landmarks in the enumeration
-    // Also checks that Landmarks with correct names are found
-    private int findLandmarks(Enumeration e, String[] aNames)
-    {
-        int length = aNames != null ? aNames.length : 0;
-
-        boolean[] found = new boolean[length];
-        int numLandmarks = 0;
-
-        if (e != null)
-        {
-            // Search for the saved one
-            while (e.hasMoreElements())
-            {
-                Landmark aLandmark = (Landmark) e.nextElement();
-                assertContinue("Enumeration contains a null", aLandmark != null);
-                ++numLandmarks;
-
-                for (int i = 0; i < length; ++i)
-                {
-                    if (aNames[i].equals(aLandmark.getName()))
-                    {
-                        found[i] = true;
-                    }
-                }
-            }
-        }
-
-        for (int i = 0; i < length; ++i)
-        {
-            assertContinue("Landmark '" + aNames[i] + "' not found", found[i]);
-        }
-
-        return numLandmarks;
-    }
-
-    private void findCategory(Enumeration e, String aCategory)
-    {
-        assertContinue("Categories enumeration is null", e != null);
-        assertContinue("Categories enumeration is empty", e.hasMoreElements());
-
-        // Check that both category is present
-        boolean found = false;
-        while (e.hasMoreElements())
-        {
-            String s = (String) e.nextElement();
-            if (aCategory.equals(s))
-            {
-                found = true;
-            }
-        }
-
-        assertContinue("Category " + aCategory + " not found", found);
-    }
-
-    private void assertEqual(String errorMsg, String dis, String dat)
-    {
-        if (dis == null)
-        {
-            assertContinue(errorMsg + ": " + dat + " != null", dat == null);
-        }
-        else
-        {
-            assertContinue(errorMsg + ": " + dis + " != " + dat, dis
-                           .equals(dat));
-        }
-    }
-
-    private void assertBadGetLandmarksByArea(double aMinLat, double aMaxLat,
-            double aMinLon, double aMaxLon) throws Exception
-    {
-        try
-        {
-            Enumeration e = ls.getLandmarks(null, aMinLat, aMinLon, aMaxLat,
-                                            aMaxLon);
-            String args = "getLandmarks(null, " + aMinLat + ", " + aMaxLat
-                          + ", " + aMinLon + ", " + aMaxLon + ")";
-
-            assertContinue("IllegalArgumentException not thrown for " + args,
-                           false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-
-    private void checkLandmark(Landmark aLm, String aName, String aDescription,
-                               QualifiedCoordinates aCoords, AddressInfo aAddress)
-    {
-
-        assertContinue("Landmark is null", aLm != null);
-
-        //        echo("name = " + aLm.getName() + ", desc = " + aLm.getDescription());
-
-        // Check the values
-        String incorrect = "Wrong value retrieved from LandmarkStore: ";
-        assertEqual(incorrect + "name", aName, aLm.getName());
-        assertEqual(incorrect + "description", aDescription, aLm
-                    .getDescription());
-
-        checkCoordinates(aCoords, aLm.getQualifiedCoordinates());
-        checkAddressInfo(aAddress, aLm.getAddressInfo());
-    }
-
-    private void checkCoordinates(QualifiedCoordinates aCorrectCoords,
-                                  QualifiedCoordinates aThatCoords)
-    {
-        if (aCorrectCoords == null)
-        {
-            assertContinue("Coordinates should have been null",
-                           aThatCoords == null);
-            return;
-        }
-
-        assertContinue("Coordinate null when retrieved from LandmarkStore",
-                       aThatCoords != null);
-
-        //        echo("lat = " + aThatCoords.getLatitude() +
-        //             ", lon = " + aThatCoords.getLongitude() +
-        //             ", alt = " + aThatCoords.getAltitude() +
-        //             ", hacc = " + aThatCoords.getHorizontalAccuracy() +
-        //             ", vacc = " + aThatCoords.getVerticalAccuracy());
-
-        assertContinue("Latitude incorrect when retrieved from LandmarkStore",
-                       aThatCoords.getLatitude() == aCorrectCoords.getLatitude());
-        assertContinue("Longitude incorrect when retrieved from LandmarkStore",
-                       aThatCoords.getLongitude() == aCorrectCoords.getLongitude());
-        assertContinue("Altitude incorrect when retrieved from LandmarkStore",
-                       isSameFloat(aThatCoords.getAltitude(), aCorrectCoords
-                                   .getAltitude()));
-        assertContinue(
-            "HorizontalAccuracy incorrect when retrieved from LandmarkStore",
-            isSameFloat(aThatCoords.getHorizontalAccuracy(), aCorrectCoords
-                        .getHorizontalAccuracy()));
-        assertContinue(
-            "VerticalAccuracy incorrect when retrieved from LandmarkStore",
-            isSameFloat(aThatCoords.getVerticalAccuracy(), aCorrectCoords
-                        .getVerticalAccuracy()));
-    }
-
-    private void checkAddressInfo(AddressInfo aCorrectAddress,
-                                  AddressInfo aThatAddress)
-    {
-        if (aCorrectAddress == null)
-        {
-            assertContinue("AddressInfo should have been null",
-                           aThatAddress == null);
-            return;
-        }
-
-        assertContinue("AddressInfo null when retrieved from LandmarkStore",
-                       aThatAddress != null);
-
-        // Check that address strings are the same as the input ones
-        for (int i = 1; i <= 17; ++i)
-        {
-            String original = aCorrectAddress.getField(i);
-            String stored = aThatAddress.getField(i);
-            if (original != null)
-            {
-                assertContinue("AddressInfo incorrect (" + i + "): " + original
-                               + " != " + stored, original.equals(stored));
-            }
-            else
-            {
-                assertContinue("AddressInfo incorrect: (" + i + "): " + stored
-                               + " != null", stored == null);
-            }
-        }
-    }
-
-    private boolean isSameFloat(float aF1, float aF2)
-    {
-        if (new Float(aF1).equals(new Float(aF2)))
-        {
-            return true;
-        }
-        return false;
-    }
-
-    protected void deleteAllLandmarksAndCategories() throws Exception
-    {
-        // Delete all the categories and Landmarks from the store
-        LandmarkStore ls = LandmarkStore.getInstance(null);
-        Enumeration c = ls.getCategories();
-        while (c.hasMoreElements())
-        {
-            ls.deleteCategory((String) c.nextElement());
-        }
-
-        Enumeration l = ls.getLandmarks();
-        if (l != null)
-        {
-            while (l.hasMoreElements())
-            {
-                ls.deleteLandmark((Landmark) l.nextElement());
-            }
-        }
-    }
-
-    protected void removeExistingStores() throws Exception
-    {
-        String[] stores = LandmarkStore.listLandmarkStores();
-        if (stores != null)
-        {
-            for (int i = 0; i < stores.length; ++i)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-    }
-
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/LandmarkTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- */
-
-public class LandmarkTest extends TestCase
-{
-
-    public LandmarkTest()
-    {
-    }
-
-    public LandmarkTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new LandmarkTest("testBadConstructor", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkTest) tc).testBadConstructor();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkTest("testConstructor", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkTest) tc).testConstructor();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkTest("testBadSetter", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkTest) tc).testBadSetter();
-            }
-        }));
-
-        aSuite.addTest(new LandmarkTest("testSetters", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((LandmarkTest) tc).testSetters();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testBadConstructor()
-    {
-
-        try
-        {
-            // Trying to create a landmark where name is null
-            Landmark lm = new Landmark(null, null, null, null);
-            assertContinue("No exception thrown for constructor values", false);
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-
-        assertTrue("", true);
-    }
-
-    public void testConstructor()
-    {
-
-        // Create a Landmark object with correct parameters and check that
-        // the values are unchanged when read.
-        String name = "Office";
-        Landmark lm1 = new Landmark(name, null, null, null);
-
-        String description = "Where I work";
-        Landmark lm2 = new Landmark(name, description, null, null);
-
-        float hacc = 50.0f;
-        float vacc = 80.0f;
-        QualifiedCoordinates coords = new QualifiedCoordinates(57.0f, 17.0f,
-                34.0f, hacc, vacc);
-
-        Landmark lm3 = new Landmark(name, null, coords, null);
-        Landmark lm4 = new Landmark(name, description, coords, null);
-
-        AddressInfo address = new AddressInfo();
-
-        Landmark lm5 = new Landmark(name, null, null, address);
-        Landmark lm6 = new Landmark(name, description, null, address);
-        Landmark lm7 = new Landmark(name, null, coords, address);
-
-        Landmark lm = new Landmark(name, description, coords, address);
-
-        // Check the Landmark's values
-        assertContinue("Retrieved Landmark values incorrect",
-                       lm.getName() == name && lm.getDescription() == description
-                       && lm.getQualifiedCoordinates() == coords
-                       && lm.getAddressInfo() == address);
-
-        assertTrue("", true);
-    }
-
-    public void testBadSetter()
-    {
-        String name = "Office";
-
-        // Create a new unmodified Landmark object
-        Landmark lm = new Landmark(name, null, null, null);
-
-        try
-        {
-            lm.setName(null);
-            assertContinue("No exception thrown for bad argument", false);
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-        assertTrue("", true);
-    }
-
-    public void testSetters()
-    {
-
-        String name = "Office";
-
-        // Create a new unmodified Landmark object
-        Landmark lm = new Landmark(name, null, null, null);
-
-        String newName = "Home";
-        String description = "Where I live";
-        QualifiedCoordinates coords = new QualifiedCoordinates(57.0f, 17.0f,
-                34.0f, 20.0f, 20.0f);
-        AddressInfo address = new AddressInfo();
-
-        lm.setName(newName);
-        lm.setDescription(description);
-        lm.setQualifiedCoordinates(coords);
-        lm.setAddressInfo(address);
-
-        // Check the Landmark's values
-        assertContinue("Retrieved Landmark values incorrect",
-                       lm.getName() == newName && lm.getDescription() == description
-                       && lm.getQualifiedCoordinates() == coords
-                       && lm.getAddressInfo() == address);
-
-        assertTrue("", true);
-    }
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/MultipleLandmarkStoresTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,627 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-import java.util.*;
-import java.io.IOException;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- */
-
-public class MultipleLandmarkStoresTest extends TestCase
-{
-    private static final String STORE_NAME = "store1";
-
-    public MultipleLandmarkStoresTest()
-    {
-    }
-
-    public MultipleLandmarkStoresTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testGetInstanceDefaultOnly", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testGetInstanceDefaultOnly();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testListLandmarkStoresOnlyDefault", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testListLandmarkStoresOnlyDefault();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testCreateLandmarkStoreBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testCreateLandmarkStoreBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testDeleteLandmarkStoreBadArguments", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testDeleteLandmarkStoreBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testCreateListDeleteLandmarkStore", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testCreateListDeleteLandmarkStore();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testCreateLandmarkStoreAlreadyExists", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testCreateLandmarkStoreAlreadyExists();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testCreateGetInstanceSameObject", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testCreateGetInstanceSameObject();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest("testCaseInsensitivity",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testCaseInsensitivity();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest("testCreateDeleteUse",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc).testCreateDeleteUse();
-            }
-        }));
-
-        aSuite.addTest(new MultipleLandmarkStoresTest(
-                           "testAddLandmarkAndCategoryToStore", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((MultipleLandmarkStoresTest) tc)
-                .testAddLandmarkAndCategoryToStore();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    // Test getInstance when only the default store exists
-    public void testGetInstanceDefaultOnly()
-    {
-        try
-        {
-            removeExistingStores();
-
-            LandmarkStore ls = null;
-
-            // Try to get nonexisting store
-            ls = LandmarkStore.getInstance("Apa");
-            assertContinue("Got an instance for nonexisting store1", ls == null);
-
-            ls = LandmarkStore.getInstance("c:Heppa");
-            assertContinue("Got an instance for nonexisting store", ls == null);
-
-            ls = LandmarkStore.getInstance("Huppa (d:)");
-            assertContinue("Got an instance for nonexisting store", ls == null);
-
-            // Get default store
-            ls = LandmarkStore.getInstance(null);
-            assertContinue("Instance was null for default store", ls != null);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testListLandmarkStoresOnlyDefault()
-    {
-
-        try
-        {
-            // List all landmark stores, should return null
-            String[] stores = LandmarkStore.listLandmarkStores();
-            assertContinue("Landmarkstore found, should have been null",
-                           stores == null);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCreateLandmarkStoreBadArguments()
-    {
-        try
-        {
-            try
-            {
-                // Create with null
-                LandmarkStore.createLandmarkStore(null);
-                assertContinue(
-                    "No Exception thrown for createLandmarkStore(null)",
-                    false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            assertBadCreateStore("file://Helloworld");
-            assertBadCreateStore("c:Heppa");
-            assertBadCreateStore("Heppa (d:)");
-            assertBadCreateStore("x:Heppa");
-            assertBadCreateStore("/Bad \\Name %&#");
-            assertBadCreateStore("..\\Heppa");
-            assertBadCreateStore("../Heppa");
-            assertBadCreateStore("");
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testDeleteLandmarkStoreBadArguments()
-    {
-        try
-        {
-            try
-            {
-                // Delete with null
-                LandmarkStore.deleteLandmarkStore(null);
-                assertContinue("No exception thrown for DeleteLandmarkStore()",
-                               false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            LandmarkStore.deleteLandmarkStore("Nonexisting"); // Silently fail
-            LandmarkStore.deleteLandmarkStore("x:Nonexisting"); // Silently fail
-            LandmarkStore.deleteLandmarkStore("/Bad \\Name %&#"); // Silently
-            // fail
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCreateListDeleteLandmarkStore()
-    {
-        try
-        {
-            String name = "store";
-
-            // Create the store
-            LandmarkStore.createLandmarkStore(name);
-
-            // Check that store is returned in list
-            assertContinue("Created store not found in list", storeExists(name));
-
-            // Delete the store
-            LandmarkStore.deleteLandmarkStore(name);
-            assertContinue("Deleted store found in list", !storeExists(name));
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCreateLandmarkStoreAlreadyExists()
-    {
-        try
-        {
-            String name = "Create me twice";
-
-            // Create the store
-            LandmarkStore.createLandmarkStore(name);
-            assertContinue("Created store not found in list", storeExists(name));
-
-            // Create again with the same name
-            try
-            {
-                LandmarkStore.createLandmarkStore(name);
-                assertContinue("No exception thrown for createLandmarkStore!",
-                               false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception thrown correctly
-            }
-
-            // Delete the store
-            LandmarkStore.deleteLandmarkStore(name);
-            assertContinue("Deleted store found in list", !storeExists(name));
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCreateGetInstanceSameObject()
-    {
-        try
-        {
-
-            // Create the store
-            LandmarkStore.createLandmarkStore(STORE_NAME);
-            assertContinue("Created store not found in list",
-                           storeExists(STORE_NAME));
-
-            LandmarkStore ls1 = LandmarkStore.getInstance(STORE_NAME);
-            LandmarkStore ls2 = LandmarkStore.getInstance(STORE_NAME);
-
-            assertContinue("Not the same instance!", ls1.equals(ls2));
-
-            // Delete the store
-            LandmarkStore.deleteLandmarkStore(STORE_NAME);
-            assertContinue("Deleted store found in list",
-                           !storeExists(STORE_NAME));
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCaseInsensitivity()
-    {
-        try
-        {
-            String lowerName1 = "store";
-            String upperName1 = "STORE";
-            String mixedName1 = "sToRe";
-
-            String lowerName2 = "smores";
-            String upperName2 = "SMORES";
-            String mixedName2 = "SmoRES";
-
-            String lowerName3 = "da store";
-            String upperName3 = "DA STORE";
-            String mixedName3 = "dA sToRe";
-
-            // Create
-            LandmarkStore.createLandmarkStore(lowerName1);
-            LandmarkStore.createLandmarkStore(mixedName2);
-            LandmarkStore.createLandmarkStore(upperName3);
-
-            // Open
-            LandmarkStore ls1 = LandmarkStore.getInstance(upperName1);
-            assertContinue("Instance was null for store: " + upperName1,
-                           ls1 != null);
-
-            LandmarkStore ls2 = LandmarkStore.getInstance(lowerName2);
-            assertContinue("Instance was null for store: " + lowerName2,
-                           ls2 != null);
-
-            LandmarkStore ls3 = LandmarkStore.getInstance(mixedName3);
-            assertContinue("Instance was null for store: " + mixedName3,
-                           ls3 != null);
-
-            // Delete
-            LandmarkStore.deleteLandmarkStore(mixedName1);
-            LandmarkStore.deleteLandmarkStore(upperName2);
-            LandmarkStore.deleteLandmarkStore(lowerName3);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testCreateDeleteUse()
-    {
-        try
-        {
-
-            // Create LandmarkStore
-            LandmarkStore.createLandmarkStore(STORE_NAME);
-            LandmarkStore ls = LandmarkStore.getInstance(STORE_NAME);
-
-            // Add a Landmark
-            Landmark lm = new Landmark("Hepp", null, null, null);
-            ls.addLandmark(lm, null);
-
-            // Get landmarks enumeration
-            Enumeration eLms = ls.getLandmarks();
-            assertContinue("getLandmarks returned null", eLms != null);
-
-            // Get categories enumeration
-            Enumeration eCats = ls.getCategories();
-            assertContinue("getCategories returned null", eCats != null);
-
-            // Delete the store
-            LandmarkStore.deleteLandmarkStore(STORE_NAME);
-
-            assertContinue("eLms should have elements", eLms.hasMoreElements());
-            assertContinue("eLms should have lements",
-                           eLms.nextElement() != null);
-
-            assertContinue("eCats should have elements", eCats
-                           .hasMoreElements());
-            assertContinue("eCats should have lements",
-                           eCats.nextElement() != null);
-
-            for (int i = 0; i <= 8; ++i)
-            {
-                try
-                {
-                    failWithIOException(ls, lm, i);
-                    assertContinue("No IOException thrown: " + i, false);
-                }
-                catch (IOException ioe)
-                {
-                    // Exception thrown correctly
-                }
-                catch (Exception e)
-                {
-                    assertContinue("Wrong Exception thrown: " + i + ", " + e,
-                                   false);
-                }
-            }
-
-            assertContinue("Expected getCategories to return null", ls
-                           .getCategories() == null);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testAddLandmarkAndCategoryToStore()
-    {
-        try
-        {
-
-            removeExistingStores();
-
-            LandmarkStore.createLandmarkStore(STORE_NAME);
-            LandmarkStore ls = LandmarkStore.getInstance(STORE_NAME);
-
-            // add category to store
-            String category = "test category";
-            ls.addCategory(category);
-
-            // add Landmark in category to store
-            Landmark landmark = new Landmark("test landmark",
-                                             "test description", new QualifiedCoordinates(80d, 45d,
-                                                     250f, 20f, 30f), null);
-
-            addLandmarkToStore(ls, landmark, category);
-
-            // delete landmark and category
-            ls.deleteLandmark(landmark);
-            ls.deleteCategory(category);
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertBadCreateStore(String aStoreName) throws Exception
-    {
-        try
-        {
-            LandmarkStore.createLandmarkStore(aStoreName);
-            assertContinue("No exception thrown for createLandmarkStore()",
-                           false);
-        }
-        catch (IllegalArgumentException e)
-        {
-            // Exception was thrown correctly
-        }
-        catch (Exception e)
-        {
-            assertContinue("Wrong exception thrown for createLandmarkStore(\""
-                           + aStoreName + "\"): " + e, false);
-        }
-    }
-
-    private boolean storeExists(String aStoreName) throws Exception
-    {
-        String[] stores = LandmarkStore.listLandmarkStores();
-        if (stores == null)
-        {
-            return false;
-        }
-
-        String listName = null;
-        for (int i = 0; i < stores.length; ++i)
-        {
-            assertContinue("Null found in listLandmarkStores",
-                           stores[i] != null);
-            if (aStoreName.equals(stores[i]))
-            {
-                listName = stores[i];
-                break;
-            }
-        }
-
-        return aStoreName.equals(listName);
-    }
-
-    private void failWithIOException(LandmarkStore aLs, Landmark aLm, int aIndex)
-    throws Exception
-    {
-        Enumeration e = null;
-
-        switch (aIndex)
-        {
-        case 0:
-            aLs.addLandmark(aLm, null);
-            break;
-        case 1:
-            e = aLs.getLandmarks(null, null);
-            break;
-        case 2:
-            e = aLs.getLandmarks();
-            break;
-        case 3:
-            e = aLs.getLandmarks(null, -90, 90, -180, 179);
-            break;
-        case 4:
-            aLs.removeLandmarkFromCategory(aLm, "categoryName");
-            break;
-        case 5:
-            aLs.updateLandmark(aLm);
-            break;
-        case 6:
-            aLs.deleteLandmark(aLm);
-            break;
-        case 7:
-            aLs.addCategory("categoryName");
-            break;
-        case 8:
-            aLs.deleteCategory("categoryName");
-            break;
-        default:
-            assertContinue("No test for index: " + aIndex, false);
-        }
-    }
-
-    protected void addLandmarkToStore(LandmarkStore ls, Landmark landmark,
-                                      String category) throws Exception
-    {
-
-        Enumeration e = ls.getLandmarks();
-        int numLandmarksBefore = 0;
-        if (e != null)
-        {
-            while (e.hasMoreElements())
-            {
-                Object o = e.nextElement();
-                ++numLandmarksBefore;
-            }
-        }
-
-        ls.addLandmark(landmark, category);
-
-        // check that landmark was added
-        e = ls.getLandmarks();
-        assertContinue("Landmarks enumeration is null", e != null);
-
-        int numLandmarksAfter = 0;
-        while (e.hasMoreElements())
-        {
-            ++numLandmarksAfter;
-            Object o = e.nextElement();
-        }
-
-        assertContinue("Expected only one landmark to be added",
-                       numLandmarksAfter - numLandmarksBefore == 1);
-    }
-
-    protected void removeExistingStores() throws Exception
-    {
-        String[] stores = LandmarkStore.listLandmarkStores();
-        if (stores != null)
-        {
-            for (int i = 0; i < stores.length; ++i)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-    }
-
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/OrientationTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * This suite of testcases tests that: - OrientationTest object can be created -
- * Default values are correct -
- *
- *
- * @created 2008-07-20
- *
- */
-
-public class OrientationTest extends TestCase
-{
-
-    public OrientationTest()
-    {
-    }
-
-    public OrientationTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     *
-     * /*************************************** Creates the test suite. You need
-     * to add a new aSuite.addTest antry for any new test methods, otherwise
-     * they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new OrientationTest("testAzimuthData", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((OrientationTest) tc).testAzimuthData();
-            }
-        }));
-
-        aSuite.addTest(new OrientationTest("testPitchData", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((OrientationTest) tc).testPitchData();
-            }
-        }));
-
-        aSuite.addTest(new OrientationTest("testRollData", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((OrientationTest) tc).testRollData();
-            }
-        }));
-
-        aSuite.addTest(new OrientationTest("testIsOrientationMagneticData",
-                                           new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((OrientationTest) tc).testIsOrientationMagneticData();
-            }
-        }));
-
-        return aSuite;
-    }
-
-    // Test Azimuth Data
-    public void testAzimuthData()
-    {
-
-        try
-        {
-            Orientation orientation = Orientation.getOrientation();
-
-            if (orientation != null)
-            {
-                float Azimuth = orientation.getCompassAzimuth();
-
-                if (!((Azimuth <= 360.0f) && (Azimuth >= 0.0f)))
-                {
-                    assertTrue("Azimuth is out of range(0,360)", false);
-                }
-
-            }
-            else
-            {
-                assertTrue("orientation can’t be currently determined", true);
-            }
-            assertTrue("", true);
-        }
-        catch (LocationException e)
-        {
-            assertTrue("Implmentation doesn't support Orientation", true);
-        }
-        catch (SecurityException e)
-        {
-            assertTrue("Calling application doesn't have the permission to"
-                       + "query Orientation Data", true);
-        }
-    }
-
-    // Test Pitch Data
-    public void testPitchData()
-    {
-
-        try
-        {
-            Orientation orientation = Orientation.getOrientation();
-
-            if (orientation != null)
-            {
-                float Pitch = orientation.getPitch();
-
-                if (!(((Pitch <= 90.0f) && (Pitch >= -90.0f)) || Float
-                        .isNaN(Pitch)))
-                {
-                    assertTrue("Pitch is out of range(90,-90)", false);
-                }
-            }
-            else
-            {
-                assertTrue("orientation can’t be currently determined", true);
-            }
-
-            assertTrue("", true);
-        }
-        catch (LocationException e)
-        {
-            assertTrue("Implmentation doesn't support Orientation", true);
-        }
-        catch (SecurityException e)
-        {
-            assertTrue("Calling application doesn't have the permission to"
-                       + "query Orientation Data", true);
-        }
-    }
-
-    // Test Roll Data
-    public void testRollData()
-    {
-
-        try
-        {
-            Orientation orientation = Orientation.getOrientation();
-
-            if (orientation != null)
-            {
-                float Roll = orientation.getRoll();
-
-                if (!(((Roll <= 180.0f) && (Roll >= -180.0f)) || Float
-                        .isNaN(Roll)))
-                {
-                    assertTrue("Roll is out of range(180,-180)", false);
-                }
-            }
-            else
-            {
-                assertTrue("orientation can’t be currently determined", true);
-            }
-
-            assertTrue("", true);
-        }
-        catch (LocationException e)
-        {
-            assertTrue("Implmentation doesn't support Orientation", true);
-        }
-        catch (SecurityException e)
-        {
-            assertTrue("Calling application doesn't have the permission to"
-                       + "query Orientation Data", true);
-        }
-    }
-
-    // Test Orientation data is w.r.t Magnetic Data or True North Data
-    public void testIsOrientationMagneticData()
-    {
-
-        try
-        {
-            Orientation orientation = Orientation.getOrientation();
-
-            if (orientation != null)
-            {
-                boolean IsMagnetic = orientation.isOrientationMagnetic();
-
-                if (!IsMagnetic)
-                {
-                    assertTrue("IsMagnertic Data is wrong", false);
-                }
-            }
-            else
-            {
-                assertTrue("orientation can’t be currently determined", true);
-            }
-
-            assertTrue("", true);
-        }
-        catch (LocationException e)
-        {
-            assertTrue("Implmentation doesn't support Orientation", true);
-        }
-        catch (SecurityException e)
-        {
-            assertTrue("Calling application doesn't have the permission to"
-                       + "query Orientation Data", true);
-        }
-    }
-}
--- a/javaextensions/location/tsrc/junit/src/automatic/PeriodicUpdateTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,525 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-public class PeriodicUpdateTest extends TestCase implements LocationListener
-{
-    final static int ONLY_STATUS_INTERVAL = 0;
-
-    final static int DEFAULT_INTERVAL = -1;
-
-    final static int INTERVAL = 10;
-
-    final static int TIMEOUT = 3;
-
-    final static int MAXAGE = 2;
-
-    final static int LARGE_TIMEOUT = 12;
-
-    final static int LARGE_MAXAGE = 11;
-
-    final static int[] badInterval = new int[] { -2, -12345, Integer.MIN_VALUE };
-
-    final static int[] badTimeout = new int[] { 0, -2, -12345,
-            Integer.MIN_VALUE
-                                              };
-
-    final static int[] badMaxAge = badTimeout;
-
-    private Coordinates currentCoords;
-
-    private Location[] iLocations;
-
-    private int iNumUpdates;
-
-    private long[] iLocUpdateCallbackTime;
-
-    final static int TIMETOFIX = 5;
-
-    protected LocationProvider iLP = null;
-
-    long[] iTimeArray;
-
-    public PeriodicUpdateTest()
-    {
-    }
-
-    public PeriodicUpdateTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new PeriodicUpdateTest("testBadArguments",
-                                              new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc).testBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest("testGoodArguments",
-                                              new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc).testGoodArguments();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest("testLocationListenerDefault",
-                                              new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc).testLocationListenerDefault();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest(
-                           "testLocationListenerInterval_1s", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc)
-                .testLocationListenerInterval_1s();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest(
-                           "testLocationListenerInterval_3s", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc)
-                .testLocationListenerInterval_3s();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest(
-                           "testLocationListenerInterval_7s", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc)
-                .testLocationListenerInterval_7s();
-            }
-        }));
-
-        aSuite.addTest(new PeriodicUpdateTest("testChangeListener",
-                                              new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((PeriodicUpdateTest) tc).testChangeListener();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testBadArguments()
-    {
-        providerSetUp(null);
-        assertContinue("LocationProvider is null", iLP != null);
-
-        assertBad(INTERVAL, TIMEOUT, LARGE_MAXAGE); // MaxAge > Interval
-        assertBad(INTERVAL, LARGE_TIMEOUT, MAXAGE); // Timeout > Interval
-        assertBad(INTERVAL, LARGE_TIMEOUT, LARGE_MAXAGE);
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            assertBad(badInterval[i], TIMEOUT, MAXAGE);
-        }
-
-        for (int i = 0; i < badTimeout.length; ++i)
-        {
-            assertBad(INTERVAL, badTimeout[i], MAXAGE);
-            assertBad(INTERVAL, badTimeout[i], LARGE_MAXAGE);
-        }
-
-        for (int i = 0; i < badMaxAge.length; ++i)
-        {
-            assertBad(INTERVAL, TIMEOUT, badMaxAge[i]);
-            assertBad(INTERVAL, LARGE_TIMEOUT, badMaxAge[i]);
-        }
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            for (int j = 0; j < badTimeout.length; ++j)
-            {
-                for (int k = 0; k < badMaxAge.length; ++k)
-                {
-                    assertBad(badInterval[i], badTimeout[j], badMaxAge[k]);
-                }
-            }
-        }
-        assertTrue("", true);
-    }
-
-    public void testGoodArguments()
-    {
-        providerSetUp(null);
-        assertContinue("LocationProvider is null", iLP != null);
-
-        // These arguments should not throw exceptions
-        testGoodWithBad(this, DEFAULT_INTERVAL);
-        testGoodWithBad(this, ONLY_STATUS_INTERVAL);
-
-        testGoodWithBad(null, INTERVAL);
-        testGoodWithBad(null, DEFAULT_INTERVAL);
-        testGoodWithBad(null, ONLY_STATUS_INTERVAL);
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            testGoodWithBad(null, badInterval[i]);
-        }
-
-        int bigValue = Integer.MAX_VALUE / 1000000;
-        assertGood(this, bigValue, bigValue, bigValue);
-
-        assertGood(this, Integer.MAX_VALUE, Integer.MAX_VALUE,
-                   Integer.MAX_VALUE);
-
-        assertTrue("", true);
-    }
-
-    public void testLocationListenerDefault()
-    {
-        final int MAXTIME = 1000 * (TIMETOFIX + 13 + 1); // Interval ~ 6.25
-
-        providerSetUp(null); // Simulation PSY should be default
-        assertContinue("LocationProvider is null", iLP != null);
-
-        // Start listening for location changes
-        iLP.setLocationListener(this, -1, -1, -1);
-
-        getUpdates(2, MAXTIME);
-
-        checkLocationData(iLocations[0]);
-        checkLocationData(iLocations[1]);
-
-        iLocations = null;
-        assertTrue("", true);
-    }
-
-    public void testLocationListenerInterval_1s()
-    {
-        testInterval(1, 4);
-        assertTrue("", true);
-    }
-
-    public void testLocationListenerInterval_3s()
-    {
-        testInterval(3, 5);
-        assertTrue("", true);
-    }
-
-    public void testLocationListenerInterval_7s()
-    {
-        testInterval(7, 3);
-        assertTrue("", true);
-    }
-
-    public void testChangeListener()
-    {
-        providerSetUp(null);
-        assertContinue("LocationProvider is null", iLP != null);
-
-        final int PERIOD1 = 10; // seconds
-        final int PERIOD2 = 7; // seconds
-
-        LocationListener listener = new LocationListener()
-        {
-            public void providerStateChanged(LocationProvider lp, int s)
-            {
-            }
-
-            public void locationUpdated(LocationProvider lp, Location l)
-            {
-            }
-        };
-
-        // Change interval
-        iLP.setLocationListener(this, PERIOD1, -1, -1);
-        int maxtime = 1000 * (2 * PERIOD1 + TIMETOFIX);
-        getUpdates(2, maxtime);
-
-        iLP.setLocationListener(this, PERIOD2, -1, -1);
-        maxtime = 1000 * (2 * PERIOD2 + TIMETOFIX);
-        getUpdates(2, maxtime);
-
-        // Change listener
-        iLP.setLocationListener(listener, -1, -1, -1);
-
-        try
-        {
-            if (iLP != null)
-                iLP.setLocationListener(null, -1, -1, -1);
-        }
-        catch (Exception e)
-        {
-        }
-        assertTrue("", true);
-    }
-
-    public void providerStateChanged(LocationProvider l, int event)
-    {
-    }
-
-    public void locationUpdated(LocationProvider l, Location fix)
-    {
-        iLocUpdateCallbackTime[iNumUpdates] = System.currentTimeMillis();
-
-        iLocations[iNumUpdates] = fix;
-        ++iNumUpdates;
-        assertContinue("LocationProvider is null", l != null);
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertBad(int aInterval, int aTimeout, int aMaxAge)
-    {
-        try
-        {
-            iLP.setLocationListener(this, aInterval, aTimeout, aMaxAge);
-            // Oops, no exception thrown, remove listener
-            iLP.setLocationListener(null, -1, -1, -1);
-            assertContinue("Bad arguments should throw exception: " + aInterval
-                           + "," + aTimeout + "," + aMaxAge, false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-            assertContinue("no message allowed for the exception: " + iae, iae
-                           .getMessage() == null);
-        }
-        catch (Exception e)
-        {
-            assertContinue("Unknown error: " + e, false);
-        }
-    }
-
-    private void testGoodWithBad(LocationListener aListener, int aInterval)
-    {
-        assertGood(aListener, aInterval, LARGE_TIMEOUT, LARGE_MAXAGE);
-
-        for (int i = 0; i < badTimeout.length; ++i)
-        {
-            assertGood(aListener, aInterval, badTimeout[i], LARGE_MAXAGE);
-        }
-
-        for (int i = 0; i < badMaxAge.length; ++i)
-        {
-            assertGood(aListener, aInterval, LARGE_TIMEOUT, badMaxAge[i]);
-        }
-
-        for (int j = 0; j < badTimeout.length; ++j)
-        {
-            for (int k = 0; k < badMaxAge.length; ++k)
-            {
-                assertGood(aListener, aInterval, badTimeout[j], badMaxAge[k]);
-            }
-        }
-    }
-
-    private void assertGood(LocationListener aListener, int aInterval,
-                            int aTimeout, int aMaxAge)
-    {
-        try
-        {
-            iLP.setLocationListener(aListener, aInterval, aTimeout, aMaxAge);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setLocationListener(" + aListener + "," + aInterval
-                           + "," + aTimeout + "," + aMaxAge + ") threw exception:\n"
-                           + iae, false);
-        }
-
-        // remove listener
-        try
-        {
-            if (iLP != null)
-                iLP.setLocationListener(null, -1, -1, -1);
-        }
-        catch (Exception e)
-        {
-        }
-    }
-
-    private void testInterval(int aInterval, int aNumberOfFixes)
-    {
-        assertContinue("Must test with at least one fix!", aNumberOfFixes > 0);
-
-        final int TIMETOFIX = 100; // 100 ms
-        final int TIMEOUT = 1000 + 2 * TIMETOFIX;
-        final int MAXTIME = 1000 * (aNumberOfFixes * aInterval) + TIMEOUT;
-
-        Criteria criteria = new Criteria();
-        criteria.setPreferredResponseTime(TIMETOFIX);
-
-        providerSetUp(criteria);
-        assertContinue("LocationProvider is null", iLP != null);
-
-        // Start listening for location changes
-        iLP.setLocationListener(this, aInterval, -1, -1);
-
-        getUpdates(aNumberOfFixes, MAXTIME);
-
-        checkLocationData(iLocations[0]);
-        // Fixes at interval starts after first fix
-        long startTime = iLocUpdateCallbackTime[0];
-        long lastTimeOfFix = startTime;
-
-        for (int i = 1; i < aNumberOfFixes; ++i)
-        {
-            checkLocationData(iLocations[i]);
-            long timeOfFix = iLocUpdateCallbackTime[i];
-            long timeDiff = timeOfFix - lastTimeOfFix;
-            assertContinue("Period difference is less than allowed for fix" + i
-                           + ": " + timeDiff, timeDiff > (aInterval - TIMEOUT) * 1000);
-            assertContinue("Period difference is more than allowed for fix" + i
-                           + ": " + timeDiff, timeDiff < (aInterval + TIMEOUT) * 1000);
-            assertContinue("Timestamp too late for fix" + i,
-                           (timeOfFix - startTime) < ((i + 1) * aInterval * 1000));
-            lastTimeOfFix = timeOfFix;
-        }
-        iLocations = null;
-    }
-
-    private void getUpdates(int aNumUpdates, int aTimeout)
-    {
-        iLocations = new Location[aNumUpdates];
-        iLocUpdateCallbackTime = new long[aNumUpdates];
-        iNumUpdates = 0;
-
-        // Wait for the first result or timeout
-        boolean timeout = false;
-        long startTime = System.currentTimeMillis();
-        while (iNumUpdates < aNumUpdates)
-        {
-            // Wait a moment before checking things
-            try
-            {
-                Thread.sleep(250);
-            }
-            catch (InterruptedException ie)
-            {
-            }
-
-            // Use a safeguard timeout in case the updating thread hangs
-            // or takes too long
-            if (System.currentTimeMillis() - startTime > aTimeout)
-            {
-                timeout = true;
-                break;
-            }
-        }
-
-        try
-        {
-            if (iLP != null)
-                iLP.setLocationListener(null, -1, -1, -1);
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertContinue("Got a timeout", !timeout);
-    }
-
-    protected void providerSetUp(Criteria aCriteria)
-    {
-        iLP = null;
-        try
-        {
-            iLP = LocationProvider.getInstance(aCriteria);
-            if (iLP != null)
-            {
-                int state = iLP.getState();
-                assertContinue("Initial state=" + state
-                               + ", expected AVAILABLE",
-                               state == LocationProvider.AVAILABLE);
-            }
-        }
-        catch (LocationException le)
-        {
-        }
-    }
-
-    protected void checkLocationData(Location aLoc)
-    {
-        assertContinue("Location is null", aLoc != null);
-        assertContinue("Location is invalid", aLoc.isValid());
-        assertContinue("Location is valid, but Coordinates are null", aLoc
-                       .getQualifiedCoordinates() != null);
-
-        long timestamp = aLoc.getTimestamp();
-        long now = System.currentTimeMillis();
-        assertContinue("Timestamp incorrect: t=" + timestamp + ", now=" + now,
-                       now >= timestamp && (now - timestamp < 30000) && timestamp > 0);
-
-        QualifiedCoordinates coords = aLoc.getQualifiedCoordinates();
-        double lat = coords.getLatitude();
-        double lon = coords.getLongitude();
-
-        assertContinue("Latitude out of range", lat >= -90.0 || lat <= 90.0);
-        assertContinue("Longitude out of range", lon >= -180.0 || lon < 180.0);
-
-        float hacc = coords.getHorizontalAccuracy();
-        assertContinue("Horizontal accuracy is negative", Float.isNaN(hacc)
-                       || hacc >= 0);
-
-        float vacc = coords.getVerticalAccuracy();
-        assertContinue("Vertical accuracy is negative", Float.isNaN(vacc)
-                       || vacc >= 0);
-
-        float speed = aLoc.getSpeed();
-        assertContinue("Speed is negative", Float.isNaN(speed) || speed >= 0);
-
-        float course = aLoc.getCourse();
-        assertContinue("Course out of range", Float.isNaN(course)
-                       || (course >= 0 && course < 360));
-
-        String nmea = aLoc.getExtraInfo("application/X-jsr179-location-nmea");
-        if (nmea != null)
-        {
-            assertTrue("Bad NMEA data", nmea.startsWith("$GP"));
-        }
-    }
-}
-
-// End of file
--- a/javaextensions/location/tsrc/junit/src/automatic/ProximityListenerTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- *
- *
- * @created 2009-07-24
- *
- */
-
-public class ProximityListenerTest extends TestCase
-{
-
-    public ProximityListenerTest()
-    {
-    }
-
-    public ProximityListenerTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new ProximityListenerTest("testBadArguments",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ProximityListenerTest) tc).testBadArguments();
-            }
-        }));
-
-        aSuite.addTest(new ProximityListenerTest("testProximityListener",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ProximityListenerTest) tc).testProximityListener();
-            }
-        }));
-
-        aSuite.addTest(new ProximityListenerTest("testRemoveProximityListener",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((ProximityListenerTest) tc).testRemoveProximityListener();
-            }
-        }));
-
-        return aSuite;
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testBadArguments()
-    {
-        Listener L1 = new Listener(60.0, 21.0, 0.0f, 100);
-
-        try
-        {
-            try
-            {
-                LocationProvider.addProximityListener(null,
-                                                      L1.coordinates,
-                                                      L1.proximityRadius);
-
-                assertContinue("NullPointerException not thrown 1", false);
-            }
-            catch (NullPointerException npe)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                LocationProvider.addProximityListener(L1,
-                                                      L1.coordinates,
-                                                      0);
-
-                assertContinue("IllegalArgumentException not thrown 1", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                LocationProvider.addProximityListener(L1,
-                                                      L1.coordinates,
-                                                      -1);
-
-                assertContinue("IllegalArgumentException not thrown 2", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            try
-            {
-                LocationProvider.addProximityListener(L1,
-                                                      L1.coordinates,
-                                                      Float.NaN);
-
-                assertContinue("IllegalArgumentException not thrown 3", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // Exception was thrown correctly
-            }
-
-            assertTrue("", true);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-    }
-
-    public void testRemoveProximityListener()
-    {
-        Listener L1 = new Listener(78.338500d, 56.338500d, 0.0f, 500.0f);
-        boolean timeout = false;
-        long startTime = System.currentTimeMillis();
-        try
-        {
-            LocationProvider.addProximityListener(L1,
-                                                  L1.coordinates,
-                                                  L1.proximityRadius);
-
-            LocationProvider.removeProximityListener(L1);
-
-            while (L1.IsCorrectEvent == false)
-            {
-                // Wait a moment before checking things
-                try
-                {
-                    Thread.sleep(250);
-                }
-                catch (InterruptedException ie)
-                {
-                }
-                System.out.println("Module Tests 11");
-                // Wait for 1 minutes to get updates
-                if (System.currentTimeMillis() - startTime > 60000)
-                {
-                    System.out.println("Module Tests 22");
-                    timeout = true;
-                    break;
-                }
-            }
-
-            // If timeout occurs, the listener was removed correctly
-            if (timeout)
-            {
-                assertTrue("", true);
-            }
-            else
-            {
-                assertTrue("Listener Not removed", false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-
-    }
-
-    public void testProximityListener()
-    {
-        Listener L1 = new Listener(78.338500d, 56.338500d, 0.0f, 500.0f);
-
-        boolean timeout = false;
-        long startTime = System.currentTimeMillis();
-        try
-        {
-            // Wait a moment before checking things
-            try
-            {
-                Thread.sleep(250);
-            }
-            catch (InterruptedException ie)
-            {
-            }
-            LocationProvider.addProximityListener(L1,
-                                                  L1.coordinates,
-                                                  L1.proximityRadius);
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.getMessage(), false);
-        }
-        System.out.println("Module Tests 33");
-        while (L1.IsCorrectEvent == false)
-        {
-            // Wait a moment before checking things
-            try
-            {
-                Thread.sleep(250);
-            }
-            catch (InterruptedException ie)
-            {
-            }
-            System.out.println("Module Tests 44");
-            System.out.println("Module Tests System.currentTimeMillis() = " + System.currentTimeMillis());
-
-            // Use a safeguard timeout in case the updating thread hangs
-            // or takes too long. Wait for 1 minutes to get updates
-            if (System.currentTimeMillis() - startTime > 60000)
-            {
-                timeout = true;
-                break;
-            }
-        }
-        if (timeout)
-        {
-            assertTrue("Timeout occured", false);
-        }
-        else
-        {
-            assertTrue("", true);
-        }
-    }
-}
-
-// Helper class
-class Listener implements ProximityListener
-{
-    public float proximityRadius = Float.NaN;
-
-    public Coordinates coordinates = null;
-
-    public boolean IsCorrectEvent = false;
-
-    Listener(double aLat, double aLon, float aAlt, float aProximityRadius)
-    {
-        coordinates = new Coordinates(aLat, aLon, aAlt);
-        proximityRadius = aProximityRadius;
-    }
-
-    public void monitoringStateChanged(boolean aState)
-    {
-    }
-
-    public void proximityEvent(Coordinates cord, Location loc)
-    {
-        IsCorrectEvent = true;
-    }
-}
-
-// End of file
--- a/javaextensions/location/tsrc/junit/src/automatic/QualifiedCoordinatesTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +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:
-*
-*/
-package com.nokia.mj.test.lapi;
-
-import j2meunit.framework.*;
-import javax.microedition.location.*;
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * This suite of testcases tests that: - Coordinates object can be created and
- * changed - legal parameters are accepted - illegal parameters are not accepted
- *
- */
-
-public class QualifiedCoordinatesTest extends TestCase
-{
-
-    protected double iLat;
-
-    protected double iLon;
-
-    protected float iAlt;
-
-    protected final static float[] LEGAL_ALT_VALUES = { Float.NaN,
-            Float.MAX_VALUE, -Float.MAX_VALUE, Float.MIN_VALUE,
-            Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY
-                                                      };
-
-    private float iHacc;
-
-    private float iVacc;
-
-    private final static float[] LEGAL_ACC_VALUES = { 0, Float.NaN,
-            Float.MAX_VALUE, Float.MIN_VALUE, Float.POSITIVE_INFINITY,
-                                                    };
-
-    public QualifiedCoordinatesTest()
-    {
-    }
-
-    public QualifiedCoordinatesTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for
-     * any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new QualifiedCoordinatesTest("testGoodArguments",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((QualifiedCoordinatesTest) tc).testGoodArguments();
-            }
-        }));
-
-        aSuite.addTest(new QualifiedCoordinatesTest("testArgumentsRange",
-                       new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((QualifiedCoordinatesTest) tc).testArgumentsRange();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    private void assertContinue(String aReason, boolean aCond)
-    {
-        if (!aCond)
-            assertTrue(aReason, false);
-    }
-
-    public void testGoodArguments()
-    {
-
-        float iHacc = 100.0f;
-        float iVacc = 150.0f;
-
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // Test legal values for hacc
-        for (int i = 0; i < LEGAL_ACC_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, alt, LEGAL_ACC_VALUES[i], iVacc);
-        }
-
-        // Test legal values for vacc
-        for (int i = 0; i < LEGAL_ACC_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, alt, iHacc, LEGAL_ACC_VALUES[i]);
-        }
-
-        assertTrue("", true);
-    }
-
-    // Tests range of allowed values.
-    void testArgumentsRange()
-    {
-
-        // Test maximum allowed values
-        double lat = 90.0d;
-        double lon = 179.99999999999d;
-        float alt = Float.POSITIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test minimum allowed values
-        lat = -90.0d;
-        lon = -180.0d;
-        alt = Float.NEGATIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test out of range positive values
-        lat = 0;
-        lon = 0;
-        double badLat = 90.0000000000001d;
-        double badLon = 180.0d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        // Test out of range negative values
-        badLat = -90.000000000001d;
-        badLon = -180.00000000001d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        assertTrue("", true);
-    }
-
-    // Inherited from CoordinatesTest
-    protected Coordinates newCoordinates()
-    {
-        return new QualifiedCoordinates(iLat, iLon, iAlt, iHacc, iVacc);
-    }
-
-    // Inherited from CoordinatesTest
-    protected Coordinates newZeroCoordinates()
-    {
-        return new QualifiedCoordinates(0, 0, 0, 0, 0);
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertGood(double aLat, double aLon, float aAlt, float aHacc,
-                            float aVacc)
-    {
-        iHacc = aHacc;
-        iVacc = aVacc;
-        assertGood(aLat, aLon, aAlt);
-
-        QualifiedCoordinates coords = (QualifiedCoordinates) newCoordinates();
-
-        assertContinue(
-            "Coordinates values not equal to constructor input",
-            (Float.isNaN(aHacc) ^ coords.getHorizontalAccuracy() == aHacc)
-            && (Float.isNaN(aVacc) ^ coords.getVerticalAccuracy() == aVacc));
-
-        // Test setters
-        coords = (QualifiedCoordinates) newZeroCoordinates();
-
-        try
-        {
-            coords.setHorizontalAccuracy(aHacc);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setHorizontalAccuracy(" + aHacc + ") failed", false);
-        }
-
-        try
-        {
-            coords.setVerticalAccuracy(aVacc);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setVerticalAccuracy(" + aVacc + ") failed", false);
-        }
-    }
-
-    private void assertGood(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        iLat = aLat;
-        iLon = aLon;
-        iAlt = aAlt;
-        Coordinates coords = newCoordinates();
-
-        assertContinue("Coordinates values not equal to constructor input ("
-                       + aLat + "," + aLon + "," + aAlt + ")",
-                       coords.getLatitude() == aLat && coords.getLongitude() == aLon
-                       && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt));
-
-        // Test setters
-        coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setLatitude(" + aLat + ") failed", false);
-        }
-
-        try
-        {
-            coords.setLongitude(aLon);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setLongitude(" + aLon + ") failed", false);
-        }
-
-        try
-        {
-            coords.setAltitude(aAlt);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertContinue("setAtitude(" + aAlt + ") failed", false);
-        }
-
-        assertContinue("Coordinates values not equal to set values (" + aLat
-                       + "," + aLon + "," + aAlt + ")", coords.getLatitude() == aLat
-                       && coords.getLongitude() == aLon
-                       && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt));
-    }
-
-    protected void assertBad(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        try
-        {
-            iLat = aLat;
-            iLon = aLon;
-            iAlt = aAlt;
-            Coordinates coords = newCoordinates();
-
-            assertContinue("No exception thrown for constructor (" + aLat
-                           + ", " + aLon + ", " + aAlt + ")", false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        // Test setters
-        Coordinates coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-            coords.setLongitude(aLon);
-            assertContinue("IllegalArgumentException not thrown for setter",
-                           false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        // setAltitude should never throw exception
-        coords.setAltitude(aAlt);
-    }
-}
--- a/javaextensions/location/tsrc/junit/teardown.py	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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: 
-#
-
-import os
-
-def setup():
-    
-    # NPP and BT GPS PSY Cenrep file location
-    btpsyfile = "\\epoc32\\RELEASE\\winscw\\UDEB\\Z\\private\\10202be9\\101FE999.txt"
-    npppsyfile = "\\epoc32\\RELEASE\\winscw\\UDEB\\Z\\private\\10202be9\\10206915.txt"
-
-    if (os.path.isfile(btpsyfile+'.tmp')):
-        # Recover Bluetooth GPS PSY file from temp file
-        os.rename(btpsyfile+'.tmp',btpsyfile)
-        print "Recovered: " + btpsyfile
-    if (os.path.isfile(npppsyfile+'.tmp')):
-        # Recover NPP PSY file from temp file
-        os.rename(npppsyfile+'.tmp',npppsyfile)
-        print "Recovered: " + npppsyfile
-
-if __name__ == "__main__":
-	# If this module was started as the main module (given as the py-file to
-	# python.exe) take command line arguments and pass them to replaceFile
-	setup()
\ No newline at end of file
Binary file javaextensions/location/tsrc/vipertest/bin/101F7A81.txt has changed
--- a/javaextensions/location/tsrc/vipertest/bin/MANIFEST.MF	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-MIDlet-Name: Viper test
-MIDlet-Vendor: TietoEnator
-MIDlet-Version: 1.0
-MicroEdition-Profile: MIDP-2.0
-MicroEdition-Configuration: CLDC-1.0
-MIDlet-Permissions: javax.microedition.location.Location
-MIDlet-Icon: viper.png
-MIDlet-Description: MIDlet used to test Viper implementation.
-MIDlet-1: Viper, Viper.png, ViperTest
-TBD: smurf
--- a/javaextensions/location/tsrc/vipertest/bin/build.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-call buildmidlet vipertest
-
-@setlocal
-
-@set targetfolder=%EPOCROOT%epoc32\release\winscw\udeb\z\system\data
-
-@if not exist %targetfolder%\vipertest-simpsy.sps. (
-  echo copying simulation file to %targetfolder%
-  copy vipertest-simpsy.sps %targetfolder%
-)
-
-
--- a/javaextensions/location/tsrc/vipertest/bin/buildmidlet.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-@if not defined S60ROOT (
- @echo Error: S60ROOT not set
- @goto end
-)
-
-@if "%1"=="" goto usage
-
-@setlocal
-@set J2MECLASSPATH=%EPOCROOT%epoc32\release\winscw\udeb\hmidps60v30.jar
-@set PREVERIFYPATH=%S60ROOT%s60\j2me\vms\cldchi\build\share\bin\win32_i386
-@set INSTALLFOLDER=%EPOCROOT%epoc32\winscw\c\data\installs
-
-@pushd .
-@cd ..\src
-%JAVA_1_3_1_HOME%\bin\javac -bootclasspath %J2MECLASSPATH% *.java
-
-@if %ERRORLEVEL% NEQ 0 goto error
-
-%PREVERIFYPATH%\preverify -classpath %J2MECLASSPATH% -d ..\bin .
-
-@if %ERRORLEVEL% NEQ 0 goto error
-
-@echo off
-del *.class
-popd
-if EXIST "%1.png" set PNGFILE="%1.png"
-jar cmf MANIFEST.MF %1.jar *.class %PNGFILE%
-
-UpdateJarSize.pl %1.jar %1.jad > %INSTALLFOLDER%\%1.jad
-move %1.jar %INSTALLFOLDER%
-del *.class
-goto end
-
-:usage
-@echo Usage: buildmidlet midletname
-@goto end
-
-:error
-@popd
-
-:end
-@echo on
\ No newline at end of file
--- a/javaextensions/location/tsrc/vipertest/bin/rmlmdb.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-
-if exist %EPOCROOT%EPOC32\winscw\c\Private\100012a5\*.ldb. (
- echo deleting all landmark databases.
- del %EPOCROOT%EPOC32\winscw\c\Private\100012a5\*.ldb
-)
--- a/javaextensions/location/tsrc/vipertest/bin/unittestinstructions.txt	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-This document describes how to run the unit tests in the ViperTest midlet. The tests are meant to be run on the emulator, but many tests can also be run on a real device.
-
-The following steps assume that you already have a working S60 environment including the Java location component.
-
-* Step 1: Build the midlet.
-
-Use the build.bat script in the ViperTest\bin folder (You may need to edit some variables).
-
-The script will also copy the ViperTest-SimPsy.sps simulation data for the simulation PSY to the correct location.
-
-
-* Step 2: Build ViperTestPsy.
-
-Go to the ViperTestPsy\group folder and build it with bldmake and abld.
-
-
-* Step 3: Prepare the environment.
-
-Run the rmlmdb.bat script to remove any existing landmark databases.
-
-Start the emulator. Start the location configuration applet. Enable the ViperTest PSY and Simulation PSY. Disable all other methods.
-
-Select the Simulation PSY method and change the configuration to use the ViperTest-SimPsy.sps file.
-
-
-* Step 4: Run the midlet.
-
-There are two different unit tests, "LocationProvider tests" and "tests for the other classes".
-
-Choose "Run tests" to run the "fast" unit tests (takes about 30 seconds).
-
-Choose "Run LP tests" to run the LocationProvider tests (takes about 2 minutes). You will also be asked to disable all the PSYs. This is done in the location configuration applet.
\ No newline at end of file
--- a/javaextensions/location/tsrc/vipertest/bin/updatejarsize.pl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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: 
-#
-
-$jarsize = (-s $ARGV[0]);
-
-open (JAD, $ARGV[1]) or die "cannot open jad-file: $!";
-
-$midletjarsize = "MIDlet-Jar-Size";
-
-while (<JAD>) {
-    if (/$midletjarsize+/) {
-        print $midletjarsize.": $jarsize\n";       
-    } else {
-        print $_;
-    }
-}
\ No newline at end of file
--- a/javaextensions/location/tsrc/vipertest/bin/vipertest.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-MIDlet-Name: Viper test
-MIDlet-Vendor: TietoEnator
-MIDlet-Version: 1.0
-MIDlet-Jar-Size: 47621
-MIDlet-Jar-URL: Viper.jar
-MIDlet-Icon: Viper.png
-MIDlet-Description: MIDlet used to test Viper implementation.
-MIDlet-1: Viper, Viper.png, ViperTest
Binary file javaextensions/location/tsrc/vipertest/bin/vipertest.png has changed
--- a/javaextensions/location/tsrc/vipertest/bin/vipertestsimpsy.sps	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-Horizontal accuracy=20;
-Vertical accuracy=30;
-TimeToFix min=1;
-TimeToFix max=1;
-Powerup time=1;
-Longitude=56.3385;
-Latitude=78.3385;
-Speed=100;
-Course=113.9;
-Deterministic=0;
-
--- a/javaextensions/location/tsrc/vipertest/src/AddressInfoTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +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:
-*
-*/
-import javax.microedition.location.*;
-
-/*
- * This suite of testcases tests that:
- * - AddressInfo object can be created and changed
- * - legal parameters are accepted
- * - illegal parameters are not accepted
- */
-public class AddressInfoTest extends ViperUnitTest
-{
-    private AddressInfo currentAddressInfo;
-
-    public AddressInfoTest()
-    {
-        super("AddressInfoTest");
-    }
-
-    protected void runTest() throws java.lang.Throwable
-    {
-        testConstructor();
-        testSetters();
-        testIllegalArgumentSet();
-        testIllegalArgumentGet();
-    }
-
-    // Test that constructor works and that default values are correct.
-    void testConstructor()
-    {
-        setCurrentTest("testConstructor()");
-
-        // Create a AddressInfo object with correct parameters and check that
-        // the values are unchanged when read.
-        AddressInfo addrInfo = new AddressInfo();
-
-        // Check the defaults
-        assertTrue(addrInfo.getField(AddressInfo.EXTENSION) == null
-                   && addrInfo.getField(AddressInfo.STREET) == null
-                   && addrInfo.getField(AddressInfo.POSTAL_CODE) == null
-                   && addrInfo.getField(AddressInfo.CITY) == null
-                   && addrInfo.getField(AddressInfo.COUNTY) == null
-                   && addrInfo.getField(AddressInfo.DISTRICT) == null
-                   && addrInfo.getField(AddressInfo.STATE) == null
-                   && addrInfo.getField(AddressInfo.COUNTRY) == null
-                   && addrInfo.getField(AddressInfo.COUNTRY_CODE) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_NAME) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_FLOOR) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_ROOM) == null
-                   && addrInfo.getField(AddressInfo.BUILDING_ZONE) == null
-                   && addrInfo.getField(AddressInfo.CROSSING1) == null
-                   && addrInfo.getField(AddressInfo.CROSSING2) == null
-                   && addrInfo.getField(AddressInfo.URL) == null
-                   && addrInfo.getField(AddressInfo.PHONE_NUMBER) == null,
-                   "Default AddressInfo values incorrect");
-
-    }
-
-    // Test that all the setters work correctly.
-    void testSetters()
-    {
-        setCurrentTest("testSetters()");
-
-        // List the new values
-        String extension = "Flat 4";
-        String street = "11 Mount Avenue";
-        String city = "London";
-        String county = "Ealing";
-        String postal_code = "W5 1QB";
-        String state = "England";
-        String district = "Middlesex";
-        String country = "United Kingdom";
-        String country_code = "GB";
-        String building_name = "The Castle";
-        String building_floor = "3";
-        String building_room = "Front Room";
-        String building_zone = "Upstairs";
-        String crossing1 = "Mount Avenue";
-        String crossing2 = "Eaton Rise";
-        String url = "http://www.upmystreet.co.uk";
-        String phone_number = "+358401234567";
-
-        // Define a AddressInfo object with non-default parameters and check
-        // that the values are unchanged when read.
-        AddressInfo addrInfo = new AddressInfo();
-        addrInfo.setField(AddressInfo.EXTENSION, extension);
-        addrInfo.setField(AddressInfo.STREET, street);
-        addrInfo.setField(AddressInfo.POSTAL_CODE, postal_code);
-        addrInfo.setField(AddressInfo.CITY, city);
-        addrInfo.setField(AddressInfo.COUNTY, county);
-        addrInfo.setField(AddressInfo.DISTRICT, district);
-        addrInfo.setField(AddressInfo.STATE, state);
-        addrInfo.setField(AddressInfo.COUNTRY, country);
-        addrInfo.setField(AddressInfo.COUNTRY_CODE, country_code);
-        addrInfo.setField(AddressInfo.BUILDING_NAME, building_name);
-        addrInfo.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-        addrInfo.setField(AddressInfo.BUILDING_ROOM, building_room);
-        addrInfo.setField(AddressInfo.BUILDING_ZONE, building_zone);
-        addrInfo.setField(AddressInfo.CROSSING1, crossing1);
-        addrInfo.setField(AddressInfo.CROSSING2, crossing2);
-        addrInfo.setField(AddressInfo.URL, url);
-        addrInfo.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-        // Check that the retrieved values are the same as the input ones
-        assertTrue(
-            addrInfo.getField(AddressInfo.EXTENSION) == extension
-            && addrInfo.getField(AddressInfo.STREET) == street
-            && addrInfo.getField(AddressInfo.POSTAL_CODE) == postal_code
-            && addrInfo.getField(AddressInfo.CITY) == city
-            && addrInfo.getField(AddressInfo.COUNTY) == county
-            && addrInfo.getField(AddressInfo.DISTRICT) == district
-            && addrInfo.getField(AddressInfo.STATE) == state
-            && addrInfo.getField(AddressInfo.COUNTRY) == country
-            && addrInfo.getField(AddressInfo.COUNTRY_CODE) == country_code
-            && addrInfo.getField(AddressInfo.BUILDING_NAME) == building_name
-            && addrInfo.getField(AddressInfo.BUILDING_FLOOR) == building_floor
-            && addrInfo.getField(AddressInfo.BUILDING_ROOM) == building_room
-            && addrInfo.getField(AddressInfo.BUILDING_ZONE) == building_zone
-            && addrInfo.getField(AddressInfo.CROSSING1) == crossing1
-            && addrInfo.getField(AddressInfo.CROSSING2) == crossing2
-            && addrInfo.getField(AddressInfo.URL) == url
-            && addrInfo.getField(AddressInfo.PHONE_NUMBER) == phone_number,
-            "Retrieved AddressInfo values different from input");
-
-    }
-
-    // Test that an exception is thrown if the field used in setter is
-    // undefined.
-    void testIllegalArgumentSet()
-    {
-        setCurrentTest("testIllegalArgumentSet()");
-
-        AddressInfo addrInfo = new AddressInfo();
-
-        // List the illegal field and value to set
-        int illegalField = 77;
-        String street = "11 Mount Avenue";
-
-        try
-        {
-            addrInfo.setField(illegalField, street);
-
-            // If this point is reached, something is wrong
-            assertTrue(false, "No exception thrown when illegal field used");
-
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-
-    // Test that an exception is thrown if the requested field is undefined.
-    void testIllegalArgumentGet()
-    {
-        setCurrentTest("testIllegalArgumentGet()");
-
-        AddressInfo addrInfo = new AddressInfo();
-
-        int illegalField = 77;
-
-        try
-        {
-            addrInfo.getField(illegalField);
-
-            // If this point is reached, something is wrong
-            assertTrue(false, "No exception thrown when illegal field used");
-
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/CoordinatesTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,750 +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:
-*
-*/
-import javax.microedition.location.*;
-
-/*
- * This suite of testcases tests that:
- * - Coordinates object can be created and changed
- * - legal parameters are accepted
- * - illegal parameters are not accepted
- */
-public class CoordinatesTest extends ViperUnitTest
-{
-    protected double iLat;
-
-    protected double iLon;
-
-    protected float iAlt;
-
-    protected final static float[] LEGAL_ALT_VALUES = { Float.NaN,
-            Float.MAX_VALUE, -Float.MAX_VALUE, Float.MIN_VALUE,
-            Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY
-                                                      };
-
-    public CoordinatesTest()
-    {
-        super("CoordinatesTest");
-    }
-
-    protected CoordinatesTest(String s)
-    {
-        super(s);
-    }
-
-    protected void runTest() throws Throwable
-    {
-        testGoodArguments();
-        testBadArguments();
-        testArgumentsRange();
-
-        testLocationMathNormal();
-        testLocationMathReverse();
-        testLocationMathShortDistance();
-        testLocationMathPolar();
-        testLocationMathSameCoords();
-        testLocationMathNullCoord();
-
-        testConvertFromStringBadArguments();
-        testConvertFromString_DD_MM();
-        testConvertFromString_DD_MM_SS();
-
-        testConvertToStringBadArguments();
-        testConvertToString_DD_MM();
-        testConvertToString_DD_MM_SS();
-
-        testLocationMathThreadSafe();
-    }
-
-    void testGoodArguments()
-    {
-        setCurrentTest("testGoodArguments()");
-
-        // Test some values in allowed range
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // tests -lat, -lon and -alt too
-        assertReallyGood(lat, lon, alt);
-
-        // Test some legal values for alt
-        for (int i = 0; i < LEGAL_ALT_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, LEGAL_ALT_VALUES[i]);
-        }
-    }
-
-    void testBadArguments()
-    {
-        setCurrentTest("testBadArguments()");
-
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // Test that NaN is illegal for lat, lon
-        assertBad(Double.NaN, lon, alt);
-        assertBad(lat, Double.NaN, alt);
-        assertBad(Double.NaN, Double.NaN, alt);
-
-        // Test some more bad values for lat
-        assertBad(Double.MAX_VALUE, lon, alt);
-        assertBad(Double.POSITIVE_INFINITY, lon, alt);
-        assertBad(Double.NEGATIVE_INFINITY, lon, alt);
-
-        // Test some more bad values for lon
-        assertBad(lat, Double.MAX_VALUE, alt);
-        assertBad(lat, Double.POSITIVE_INFINITY, alt);
-        assertBad(lat, Double.NEGATIVE_INFINITY, alt);
-    }
-
-    // Tests range of allowed values.
-    void testArgumentsRange()
-    {
-        setCurrentTest("testArgumentsRange()");
-
-        // Test maximum allowed values
-        double lat = 90.0d;
-        double lon = 179.99999999999d;
-        float alt = Float.POSITIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test minimum allowed values
-        lat = -90.0d;
-        lon = -180.0d;
-        alt = Float.NEGATIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test out of range positive values
-        lat = 0;
-        lon = 0;
-        double badLat = 90.0000000000001d;
-        double badLon = 180.0d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        // Test out of range negative values
-        badLat = -90.000000000001d;
-        badLon = -180.00000000001d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-    }
-
-    // Tests that a 'normal' calculation computes correct results.
-    void testLocationMathNormal() throws Exception
-    {
-        setCurrentTest("testLocationMathNormal()");
-
-        // Define the expected results
-        float expectedDistance = 407342.9950f; // from www.fai.org
-        float expectedBearing = 33.2208175f; // from www.fai.org
-
-        checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                new Coordinates(60.0, 21.0, 2000.0f), expectedDistance,
-                                expectedBearing);
-
-        // Define the expected results
-        expectedDistance = 6500256.303349322f; // from www.fai.org
-        expectedBearing = 200.08970684975316f; // from www.fai.org
-
-        checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                new Coordinates(0.0, 0.0, 2000.0f), expectedDistance,
-                                expectedBearing);
-
-    }
-
-    // Tests that the reverse of the 'normal' calculation computes correct
-    void testLocationMathReverse() throws Exception
-    {
-        setCurrentTest("testLocationMathReverse()");
-
-        // Create two Coordinates object with 'normal' parameters and
-        // check that the computed distance and bearing are correct
-        Coordinates fromCoords = new Coordinates(60.0, 21.0, 2000.0f);
-        Coordinates toCoords = new Coordinates(57.0, 17.0, -1000.0f);
-
-        // Define the expected results
-        float expectedDistance = (float) 407342.9950; // from www.fai.org
-        float expectedBearing = (float) 216.63292698852845; // from www.fai.org
-
-        checkDistanceAndAzimuth(fromCoords, toCoords, expectedDistance,
-                                expectedBearing);
-    }
-
-    // Tests that a 'normal' calculation computes correct results.
-    void testLocationMathShortDistance() throws Exception
-    {
-        setCurrentTest("testLocationMathNormal2()");
-
-        // Define the expected results
-        float expectedDistance = 789.11491522f; // from www.fai.org
-        float expectedBearing = 44.96957375f; // from www.fai.org
-
-        checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, -1000.0f),
-                                new Coordinates(57.005013, 17.009178, 2000.0f),
-                                expectedDistance, expectedBearing);
-
-        checkDistanceAndAzimuth(new Coordinates(0, 0, 0.0f), new Coordinates(0,
-                                0.00001, 0.0f), 1.11319f, 90.0f);
-    }
-
-    // Tests that polar values give correct results.
-    void testLocationMathPolar() throws Exception
-    {
-        setCurrentTest("testLocationMathPolar()");
-
-        Coordinates northPole = new Coordinates(90.0, 0.0, 0.0f);
-        Coordinates southPole = new Coordinates(-90.0, 0.0, 0.0f);
-
-        // Define the expected results
-        float expectedDistance = 20003931.458622963f; // from www.fai.org
-
-        checkDistanceAndAzimuth(northPole, southPole, expectedDistance, 180.0f);
-        checkDistanceAndAzimuth(southPole, northPole, expectedDistance, 0.0f);
-    }
-
-    // Tests that same coordinates doesn't cause exception.
-    void testLocationMathSameCoords() throws Exception
-    {
-        setCurrentTest("testLocationMathSameCoords()");
-
-        // Expected results
-        float expectedDistance = 0.0f;
-        float expectedBearing = 0.0f;
-
-        checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, 0.0f),
-                                new Coordinates(57.0, 17.0, 0.0f), expectedDistance,
-                                expectedBearing);
-
-        // Altitude should not be used in distance and azimuth calculation
-        checkDistanceAndAzimuth(new Coordinates(57.0, 17.0, 4000.0f),
-                                new Coordinates(57.0, 17.0, -1000.0f), expectedDistance,
-                                expectedBearing);
-
-        // North pole
-        checkDistanceAndAzimuth(new Coordinates(90.0, 10.0, 0.0f),
-                                new Coordinates(90.0, 10.0, 0.0f), expectedDistance,
-                                expectedBearing);
-
-        // South pole
-        checkDistanceAndAzimuth(new Coordinates(-90.0, 10.0, 0.0f),
-                                new Coordinates(-90.0, 10.0, 0.0f), expectedDistance,
-                                expectedBearing);
-    }
-
-    // Tests that a null coordinate causes exception.
-    void testLocationMathNullCoord()
-    {
-        setCurrentTest("testLocationMathNullCoord()");
-
-        Coordinates fromCoords = new Coordinates(57.0, 17.0, -1000.0f);
-        try
-        {
-            float distance = fromCoords.distance(null);
-            assertTrue(false, "NullPointerException was never thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-            assertTrue(npe.getMessage() == null, "Message not allowed for "
-                       + npe);
-        }
-
-        try
-        {
-            float azimuth = fromCoords.azimuthTo(null);
-            assertTrue(false, "NullPointerException was never thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-            assertTrue(npe.getMessage() == null, "Message not allowed for "
-                       + npe);
-        }
-    }
-
-    // Tests that the convert() function works.
-    void testConvertFromStringBadArguments()
-    {
-        setCurrentTest("testConvertFromStringBadArguments()");
-        try
-        {
-            double result = Coordinates.convert(null);
-            assertTrue(false, "NullPointerException was never thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-            assertTrue(npe.getMessage() == null, "Message not allowed for "
-                       + npe);
-        }
-
-        // Illegal values
-        assertConvertBad("");
-        assertConvertBad("44.44");
-        assertConvertBad("1234");
-        assertConvertBad("123A");
-        assertConvertBad("convertThis!");
-
-        // DD:MM
-        assertConvertBad(":"); // empty
-        assertConvertBad("a:11"); // Degrees illegal value
-        assertConvertBad("1#:11"); // Degrees illegal value
-        assertConvertBad("a1:11"); // Degrees illegal value
-        assertConvertBad("+90:22"); // Degrees illegal value
-        assertConvertBad("90@:22"); // Degrees illegal value
-        assertConvertBad("1?2:33"); // Degrees illegal value
-        assertConvertBad("-x12:44"); // Degrees illegal value
-        assertConvertBad("01:10"); // starts with 0
-        assertConvertBad("011:11"); // starts with 0
-        assertConvertBad("-09:12"); // starts with -0
-        assertConvertBad("-099:19"); // starts with -0
-        assertConvertBad("180:00"); // >= 180
-        assertConvertBad("-181:01"); // < -180
-        assertConvertBad("-180:59.99999"); // < -180
-        assertConvertBad("60:0"); // Minutes < 10 does not start with 0
-        assertConvertBad("-160:1"); // Minutes < 10 does not start with 0
-        assertConvertBad("70:9.9"); // Minutes < 10 does not start with 0
-        assertConvertBad("20:300"); // Minutes > 59
-        assertConvertBad("-10:60"); // Minutes > 59
-        assertConvertBad("80:-1"); // Minutes < 0
-        assertConvertBad("90:+2"); // Minutes illegal value
-        assertConvertBad("90:?2"); // Minutes illegal value
-        assertConvertBad("80:33+1"); // Minutes illegal value
-        assertConvertBad("90:44;5"); // Minutes illegal value
-        assertConvertBad("-70:12.123456"); // Minutes too many decimals
-
-        // DD:MM:SS
-        assertConvertBad("::"); // empty
-        assertConvertBad("b:11:11"); // Degrees illegal value
-        assertConvertBad("1$:11:22"); // Degrees illegal value
-        assertConvertBad("c1:11:33"); // Degrees illegal value
-        assertConvertBad("*90:22:44"); // Degrees illegal value
-        assertConvertBad("90!:22:55"); // Degrees illegal value
-        assertConvertBad("1-2:33:01"); // Degrees illegal value
-        assertConvertBad("-z12:44:02"); // Degrees illegal value
-        assertConvertBad(":10:20"); // starts with :
-        assertConvertBad("01:10:20"); // starts with 0
-        assertConvertBad("010:10:21"); // starts with 0
-        assertConvertBad("-09:10:22"); // starts with -0
-        assertConvertBad("-090:10:29"); // starts with -0
-        assertConvertBad("180:00:00"); // >= 180
-        assertConvertBad("280:59:59"); // >= 180
-        assertConvertBad("-181:00:00"); // < -180
-        assertConvertBad("-180:01:00"); // < -180
-        assertConvertBad("-180:00:00.001"); // < -180
-        assertConvertBad("12:3:40"); // Minutes < 10 does not start with 0
-        assertConvertBad("56:07.8:09"); // Minutes has decimals
-        assertConvertBad("31:17.33:12"); // Minutes has decimals
-        assertConvertBad("100:60:10"); // Minutes > 59
-        assertConvertBad("20:300:21"); // Minutes > 59
-        assertConvertBad("-10:60:01"); // Minutes > 59
-        assertConvertBad("80:-1:11"); // Minutes illegal value
-        assertConvertBad("90:?2:22"); // Minutes illegal value
-        assertConvertBad("80:3+:33"); // Minutes illegal value
-        assertConvertBad("90:4;:44"); // Minutes illegal value
-        assertConvertBad("60:10:0"); // Seconds < 10 does not start with 0
-        assertConvertBad("59:59:1"); // Seconds < 10 does not start with 0
-        assertConvertBad("69:49:9.999"); // Seconds < 10 does not start with 0
-        assertConvertBad("89:29:60"); // Seconds > 59.999
-        assertConvertBad("-90:39:60.000"); // Seconds > 59.999
-        assertConvertBad("99:19:100"); // Seconds > 59.999
-        assertConvertBad("10:10:-1"); // Seconds illegal value
-        assertConvertBad("20:20:?2"); // Seconds illegal value
-        assertConvertBad("-123:45.x2"); // Seconds illegal value
-        assertConvertBad("30:30:3+.3"); // Seconds illegal value
-        assertConvertBad("40:40:4;.4"); // Seconds illegal value
-        assertConvertBad("-80:01:31..97"); // Seconds illegal value
-        assertConvertBad("9:09:12.1234"); // Seconds too many decimals
-        assertConvertBad("-70:30:12.3456"); // Seconds too many decimals
-    }
-
-    // Tests that the convert() function works.
-    void testConvertFromString_DD_MM() throws Exception
-    {
-        setCurrentTest("testConvertFromString_DD_MM()");
-
-        // All legal values that should be equal to zero
-        String[] zeroValues = { "0:00", "0:00.0", "0:00.00", "0:00.000",
-                                "0:00.0000", "0:00.00000", "-0:00", "-0:00.0", "-0:00.00",
-                                "-0:00.000", "-0:00.0000", "-0:00.00000"
-                              };
-
-        for (int i = 0; i < zeroValues.length; ++i)
-        {
-            double zero = Coordinates.convert(zeroValues[i]);
-            assertTrue(zero == 0d, "Conversion failed for " + zeroValues[i]
-                       + ": " + zero + " != 0");
-        }
-
-        // Define the input values
-        String[] strings = { "-0:00.06", "-0:30.0", "-0:00.5", "-59:40.4",
-                             "-0:06.666", "0:39.996", "179:59.9994", "61:30.6"
-                           };
-
-        // Define the expected results
-        double[] expecteds = { -0.0010d, -0.5d, -0.00833d, -59.6733d, -0.1111d,
-                               0.6666d, 179.99999d, 61.51d
-                             };
-
-        // Define the tolerance
-        double tol = 0.001d;
-
-        for (int i = 0; i < strings.length; ++i)
-        {
-            double result = Coordinates.convert(strings[i]);
-            assertTrue(Math.abs(expecteds[i] - result) < tol,
-                       "Conversion failed for " + strings[i] + ": " + result
-                       + " != " + expecteds[i]);
-        }
-    }
-
-    // Tests that the convert() function works.
-    void testConvertFromString_DD_MM_SS() throws Exception
-    {
-        setCurrentTest("testConvertFromString_DD_MM_SS()");
-
-        // All legal values that should be equal to zero
-        String[] zeroValues = { "0:00:00", "0:00:00.0", "0:00:00.00",
-                                "0:00:00.000", "-0:00:00", "-0:00:00.0", "-0:00:00.00",
-                                "-0:00:00.000"
-                              };
-
-        for (int i = 0; i < zeroValues.length; ++i)
-        {
-            double zero = Coordinates.convert(zeroValues[i]);
-            assertTrue(zero == 0d, "Conversion failed for " + zeroValues[i]
-                       + ": " + zero + " != 0");
-        }
-
-        // Define the input values
-        String[] strings = { "-0:30:00.0", "-59:40", "-0:06:39.96",
-                             "0:39:59.76", "179:59:59.964", "61:30:36"
-                           };
-
-        // Define the expected results
-        double[] expecteds = { -0.5d, -59.6667d, -0.1111d, 0.6666d, 179.99999d,
-                               61.51d
-                             };
-
-        // Define the tolerance
-        double tol = 0.0001d;
-
-        for (int i = 0; i < strings.length; i++)
-        {
-            double result = Coordinates.convert(strings[i]);
-            assertTrue(Math.abs(expecteds[i] - result) < tol,
-                       "Conversion failed for " + strings[i] + ": " + result
-                       + " != " + expecteds[i]);
-        }
-    }
-
-    // Tests that the convert() function works.
-    void testConvertToStringBadArguments()
-    {
-        setCurrentTest("testConvertToStringBadArguments()");
-
-        double[] badCoords = { Double.NaN, Double.MAX_VALUE, -Double.MAX_VALUE,
-                               Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, 180.0d,
-                               -180.0001d, 300.99999d
-                             };
-
-        for (int i = 0; i < badCoords.length; ++i)
-        {
-            assertConvertBad(badCoords[i], Coordinates.DD_MM);
-            assertConvertBad(badCoords[i], Coordinates.DD_MM_SS);
-        }
-    }
-
-    // Tests that the convert() function works.
-    void testConvertToString_DD_MM()
-    {
-        setCurrentTest("testConvertToString_DD_MM()");
-
-        double[] coords = { 61.51d, 57.0d, 0.6666d, -0.1111d, 179.99999d,
-                            30.1234567d, 1.333333d, -5.1d, -97.99d, -180.0d, 0.01d, 0.0d,
-                            1.000013d, 80.133602d, 1.666666666666666e-7d, 10.9833333d,
-                            0.999999916666667d
-                          };
-
-        String[] expected = { "61:30.6", "57:00.0", "0:39.996", "-0:06.666",
-                              "179:59.9994", "30:07.4074", "1:19.99998", "-5:06.0",
-                              "-97:59.4", "-180:00.0", "0:00.6", "0:00.0", "1:00.00078",
-                              "80:08.01612", "0:00.00001", "10:59.0", "1:00.0"
-                            };
-
-        for (int i = 0; i < coords.length; i++)
-        {
-            String result = Coordinates.convert(coords[i], Coordinates.DD_MM);
-            assertTrue(expected[i].equals(result), "Conversion failed for "
-                       + coords[i] + " (" + result + " != " + expected[i] + ")");
-        }
-    }
-
-    // Tests that the convert() function works.
-    void testConvertToString_DD_MM_SS()
-    {
-        setCurrentTest("testConvertToString_DD_MM_SS()");
-
-        double[] coords = { 61.51d, 57.0d, 0.6666d, -0.1111d, 179.99999d,
-                            30.1234567d, 1.333333d, -5.1d, -97.99d, -180.0d,
-                            7.000277777777778d, 0.01d, 0.0d, -179.000002d, -16.4d,
-                            2.777777777777778e-7d, 7.001111d, -8.002222d,
-                            0.999999916666667d
-                          };
-
-        String[] expected = { "61:30:36.0", "57:00:00.0", "0:39:59.76",
-                              "-0:06:39.96", "179:59:59.964", "30:07:24.444", "1:19:59.999",
-                              "-5:06:00.0", "-97:59:24.0", "-180:00:00.0", "7:00:01.0",
-                              "0:00:36.0", "0:00:00.0", "-179:00:00.007", "-16:24:00.0",
-                              "0:00:00.001", "7:00:04.0", "-8:00:07.999", "1:00:00.0"
-                            };
-
-        for (int i = 0; i < coords.length; i++)
-        {
-            String result = Coordinates
-                            .convert(coords[i], Coordinates.DD_MM_SS);
-            assertTrue(expected[i].equals(result), "Conversion failed for "
-                       + coords[i] + " (" + result + " != " + expected[i] + ")");
-        }
-    }
-
-    void testLocationMathThreadSafe() throws InterruptedException
-    {
-        setCurrentTest("testLocationMathThreadSafe()");
-        ThreadSafeTester t2 = new ThreadSafeTester();
-
-        Coordinates from = new Coordinates(57.0f, 17.0f, 0f);
-        Coordinates to = new Coordinates(60.0f, 21.0f, 0f);
-
-        t2.start();
-
-        for (int i = 0; i < 100; i++)
-        {
-            float d = from.distance(to);
-            float a = from.azimuthTo(to);
-            checkDistanceAndAzimuth(from, to, d, a);
-        }
-
-        t2.join();
-        assertTrue(t2.iSuccess, "Thread t2 produced the wrong result");
-    }
-
-    private class ThreadSafeTester extends Thread
-    {
-        boolean iSuccess = false;
-
-        public void run()
-        {
-            Coordinates from = new Coordinates(57.0f, 17.0f, 0f);
-            Coordinates to = new Coordinates(56.0f, 17.0f, 0f);
-            for (int i = 0; i < 100; i++)
-            {
-                float d = from.distance(to);
-                float a = from.azimuthTo(to);
-                checkDistanceAndAzimuth(from, to, d, a);
-            }
-            iSuccess = true;
-        }
-    }
-
-    // Also used in QualifiedCoordinatesTest
-    protected Coordinates newCoordinates()
-    {
-        return new Coordinates(iLat, iLon, iAlt);
-    }
-
-    // Also used in QualifiedCoordinatesTest
-    protected Coordinates newZeroCoordinates()
-    {
-        return new Coordinates(0, 0, 0);
-    }
-
-    //------------------------ Helper methods -----------------------
-
-    private void assertReallyGood(double lat, double lon, float alt)
-    {
-        assertGood(lat, lon, alt);
-        assertGood(-lat, lon, alt);
-        assertGood(lat, -lon, alt);
-        assertGood(lat, lon, -alt);
-        assertGood(-lat, lon, -alt);
-        assertGood(lat, -lon, -alt);
-        assertGood(-lat, -lon, -alt);
-    }
-
-    protected void assertGood(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        iLat = aLat;
-        iLon = aLon;
-        iAlt = aAlt;
-        Coordinates coords = newCoordinates();
-
-        assertTrue(coords.getLatitude() == aLat
-                   && coords.getLongitude() == aLon
-                   && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt),
-                   "Coordinates values not equal to constructor input (" + aLat
-                   + "," + aLon + "," + aAlt + ")");
-
-        // Test setters
-        coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setLatitude(" + aLat + ") failed");
-        }
-
-        try
-        {
-            coords.setLongitude(aLon);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setLongitude(" + aLon + ") failed");
-        }
-
-        try
-        {
-            coords.setAltitude(aAlt);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setAtitude(" + aAlt + ") failed");
-        }
-
-        assertTrue(coords.getLatitude() == aLat
-                   && coords.getLongitude() == aLon
-                   && (Float.isNaN(aAlt) ^ coords.getAltitude() == aAlt),
-                   "Coordinates values not equal to set values (" + aLat + ","
-                   + aLon + "," + aAlt + ")");
-    }
-
-    protected void assertBad(double aLat, double aLon, float aAlt)
-    {
-        // Test constructor
-        try
-        {
-            iLat = aLat;
-            iLon = aLon;
-            iAlt = aAlt;
-            Coordinates coords = newCoordinates();
-
-            assertTrue(false, "No exception thrown for constructor (" + aLat
-                       + ", " + aLon + ", " + aAlt + ")");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertTrue(iae.getMessage() == null, "Message not allowed for "
-                       + iae);
-        }
-
-        // Test setters
-        Coordinates coords = newZeroCoordinates();
-
-        try
-        {
-            coords.setLatitude(aLat);
-            coords.setLongitude(aLon);
-            assertTrue(false, "IllegalArgumentException not thrown for setter");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertTrue(iae.getMessage() == null, "Message not allowed for "
-                       + iae);
-        }
-
-        // setAltitude should never throw exception
-        coords.setAltitude(aAlt);
-    }
-
-    private void checkDistanceAndAzimuth(Coordinates aFrom, Coordinates aTo,
-                                         float aExpectedDistance, float aExpectedAzimuth)
-    {
-        // Define the tolerance
-        float distTol = 0.0035f; // Relative error
-        float azTol = 1f; // Absolute error
-
-        float distance = aFrom.distance(aTo);
-        if (aExpectedDistance != 0.0f)
-        {
-            float distErr = Math.abs((distance - aExpectedDistance)
-                                     / aExpectedDistance);
-
-            assertTrue(distErr <= distTol, "Computed distance " + distance
-                       + " != " + aExpectedDistance);
-        }
-        else
-        {
-            assertTrue(distance == 0.0f, "Computed distance " + distance
-                       + " != 0.0");
-        }
-
-        float azimuth = aFrom.azimuthTo(aTo);
-        if (aExpectedAzimuth != 0.0f)
-        {
-            assertTrue(Math.abs(azimuth - aExpectedAzimuth) <= azTol,
-                       "Computed bearing " + azimuth + " != " + aExpectedAzimuth);
-        }
-        else
-        {
-            assertTrue(azimuth == 0.0f, "Computed bearing " + azimuth
-                       + " != 0.0");
-        }
-    }
-
-    private void assertConvertBad(String aString)
-    {
-        try
-        {
-            double result = Coordinates.convert(aString);
-            assertTrue(false, "No exception thrown for convert(" + aString
-                       + ")");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertTrue(iae.getMessage() == null, "Message not allowed for "
-                       + iae);
-        }
-    }
-
-    private void assertConvertBad(double aCoord, int aFormat)
-    {
-        try
-        {
-            String result = Coordinates.convert(aCoord, aFormat);
-            assertTrue(false, "IllegalArgumentException was never thrown");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-            assertTrue(iae.getMessage() == null, "Message not allowed for "
-                       + iae);
-        }
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/CriteriaTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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:
-*
-*/
-import javax.microedition.location.*;
-
-/*
- * This suite of testcases tests that:
- * - Criteria object can be created
- * - Default values are correct
- * - Criteria parameters can be changed
- */
-public class CriteriaTest extends ViperUnitTest
-{
-
-    public CriteriaTest()
-    {
-        super("CriteriaTest");
-    }
-
-    protected void runTest() throws java.lang.Throwable
-    {
-        testConstructor();
-        testSetters();
-    }
-
-    // Test that Criteria constructor works and that default values are correct
-    void testConstructor()
-    {
-        setCurrentTest("testConstructor()");
-
-        Criteria criteria = new Criteria();
-
-        // Default values
-        int hacc = Criteria.NO_REQUIREMENT;
-        int power = Criteria.NO_REQUIREMENT;
-        boolean costAllowed = true;
-        int vacc = Criteria.NO_REQUIREMENT;
-        int maxresptime = Criteria.NO_REQUIREMENT;
-        boolean speedRequired = false;
-        boolean altitudeRequired = false;
-        boolean addressInfoRequired = false;
-
-        // Check the defaults
-        assertTrue(criteria.getHorizontalAccuracy() == hacc
-                   && criteria.getVerticalAccuracy() == vacc
-                   && criteria.getPreferredPowerConsumption() == power
-                   && criteria.getPreferredResponseTime() == maxresptime
-                   && criteria.isAllowedToCost() == costAllowed
-                   && criteria.isSpeedAndCourseRequired() == speedRequired
-                   && criteria.isAltitudeRequired() == altitudeRequired
-                   && criteria.isAddressInfoRequired() == addressInfoRequired,
-                   "Default Criteria values incorrect");
-
-    }
-
-    // Tests that all the setters work
-    void testSetters()
-    {
-        setCurrentTest("testSetters()");
-
-        // Define a Criteria object with non-default parameters and check that
-        // the values are unchanged when read.
-        int hacc = 10;
-        int power = Criteria.POWER_USAGE_LOW;
-        boolean costAllowed = false;
-        int vacc = 45;
-        int maxresptime = 100;
-        boolean speedRequired = true;
-        boolean altitudeRequired = true;
-        boolean addressInfoRequired = true;
-
-        Criteria criteria = new Criteria();
-        criteria.setHorizontalAccuracy(hacc);
-        criteria.setVerticalAccuracy(vacc);
-        criteria.setPreferredPowerConsumption(power);
-        criteria.setPreferredResponseTime(maxresptime);
-        criteria.setCostAllowed(costAllowed);
-        criteria.setSpeedAndCourseRequired(speedRequired);
-        criteria.setAltitudeRequired(altitudeRequired);
-        criteria.setAddressInfoRequired(addressInfoRequired);
-
-        // Check that the values are correct
-        assertTrue(criteria.getHorizontalAccuracy() == hacc
-                   && criteria.getVerticalAccuracy() == vacc
-                   && criteria.getPreferredPowerConsumption() == power
-                   && criteria.getPreferredResponseTime() == maxresptime
-                   && criteria.isAllowedToCost() == costAllowed
-                   && criteria.isSpeedAndCourseRequired() == speedRequired
-                   && criteria.isAltitudeRequired() == altitudeRequired
-                   && criteria.isAddressInfoRequired() == addressInfoRequired,
-                   "Retrieved Criteria values different from input");
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/ErrorsTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,973 +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:
-*
-*/
-import java.util.Enumeration;
-import java.util.Vector;
-
-import javax.microedition.location.*;
-
-/*
- * These test are for testing error reports, so that we can avoid regressions
- * Used for complicated tests that don't fit in the other test suites
- */
-public class ErrorsTest extends ViperUnitTest
-{
-    private static final String STORE_1_NAME = "store1";
-
-    private static final String STORE_2_NAME = "store2";
-
-    private static final String LONG_CATEGORY_NAME = "Relatively long category name...";
-
-    private static final String SHORT_CATEGORY_NAME = "a";
-
-    private static final String LANDMARKSTORE_NAME = "store1";
-
-    private static final String SEQUENTIAL_CATEGORY = "sequential_category_tck_jsr179";
-
-    private static final QualifiedCoordinates VALID_QUALIFIED_COORDINATES = new QualifiedCoordinates(
-        45.0d, 120.0d, 274f, 7.2f, 10.5f);
-
-    public ErrorsTest()
-    {
-        super("ErrorsTest");
-    }
-
-    protected void runTest() throws java.lang.Throwable
-    {
-        // testGc1(); - Doesn't work, need to change test
-        testGc2();
-
-        tp17();
-        tp19_p1();
-        tp19_p2();
-        tp19_p3();
-        tp19_p4();
-        tp19_p5();
-
-        // Some TCK tests failed, trying to repeat with equivalent tests.
-        landmarkStore0412();
-        landmarkStore0608();
-        landmarkStore0701();
-        landmarkStore0702();
-        landmarkStore0703();
-        landmarkStore0801();
-        landmarkStore0802();
-        landmarkStore0803();
-        landmarkStore1201();
-        landmarkStore1202();
-        landmarkStore1303();
-        landmarkStore1701();
-    }
-
-    void testGc1() throws Exception
-    {
-        setCurrentTest("testGc1()");
-        LandmarkStore store = LandmarkStore.getInstance(null);
-        String id = store.toString();
-        assertTrue(store == LandmarkStore.getInstance(null),
-                   "Not the same instance");
-
-        store = null;
-        echo("Calling System.gc()");
-        System.gc();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        System.gc();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-
-        store = LandmarkStore.getInstance(null);
-        assertFalse(id.equals(store.toString()), "The same instance");
-
-        Landmark lm = new Landmark("test", null, null, null);
-        store.addLandmark(lm, null);
-        store.deleteLandmark(lm);
-    }
-
-    private void testGc_helper1() throws Exception
-    {
-        LandmarkStore store = LandmarkStore.getInstance(null);
-    }
-
-    private void testGc_helper2() throws Exception
-    {
-        System.gc();
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        Landmark lm = new Landmark("test", null, null, null);
-        store.addLandmark(lm, null);
-        store.deleteLandmark(lm);
-    }
-
-    void testGc2() throws Exception
-    {
-        setCurrentTest("testGc2()");
-        testGc_helper1();
-        testGc_helper2();
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void tp17() throws Throwable
-    {
-        setCurrentTest("tp17()");
-
-        // 1. ------------------------------------------------------------------
-        String lm1_name1 = "lm1_name";
-        String lm1_description1 = "lm1_description";
-        String lm1_street1 = "lm1_street";
-        double lm1_latitude1 = 12.3;
-        double lm1_longitude1 = 32.1;
-        float lm1_altitude1 = 3.9f;
-        float lm1_horAccuracy1 = 5.5f;
-        float lm1_verAccuracy1 = 6.6f;
-
-        QualifiedCoordinates lm1_coords1 = new QualifiedCoordinates(
-            lm1_latitude1, lm1_longitude1, lm1_altitude1, lm1_horAccuracy1,
-            lm1_verAccuracy1);
-
-        AddressInfo lm1_addressInfo1 = new AddressInfo();
-        lm1_addressInfo1.setField(AddressInfo.STREET, lm1_street1);
-
-        Landmark lm1 = new Landmark(lm1_name1, lm1_description1, lm1_coords1,
-                                    lm1_addressInfo1);
-
-        QualifiedCoordinates lm1_coords_returned1 = lm1
-                .getQualifiedCoordinates();
-
-        AddressInfo lm1_addressInfo_returned1 = lm1.getAddressInfo();
-
-        // 2. ------------------------------------------------------------------
-        String lm1_name2 = "lm1_name2";
-        String lm1_description2 = "lm1_description2";
-        String lm1_street2 = "lm1_street2";
-        double lm1_latitude2 = 16.8;
-        double lm1_longitude2 = 26.7;
-        float lm1_altitude2 = 7.1f;
-        float lm1_horAccuracy2 = 2.7f;
-        float lm1_verAccuracy2 = 8.1f;
-
-        QualifiedCoordinates lm1_coords2 = new QualifiedCoordinates(
-            lm1_latitude2, lm1_longitude2, lm1_altitude2, lm1_horAccuracy2,
-            lm1_verAccuracy2);
-
-        AddressInfo lm1_addressInfo2 = new AddressInfo();
-        lm1_addressInfo2.setField(AddressInfo.STREET, lm1_street2);
-
-        lm1.setName(lm1_name2);
-        lm1.setDescription(lm1_description2);
-        lm1.setQualifiedCoordinates(lm1_coords2);
-        lm1.setAddressInfo(lm1_addressInfo2);
-
-        QualifiedCoordinates lm1_coords_returned2 = lm1
-                .getQualifiedCoordinates();
-
-        AddressInfo lm1_addressInfo_returned2 = lm1.getAddressInfo();
-
-        // 3. ------------------------------------------------------------------
-        boolean check3 = false;
-
-        try
-        {
-            lm1.setName(null);
-            assertTrue(false,
-                       "TP17-ERR stage3, NullPointerException was not thrown as expected.");
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            check3 = true;
-        }
-
-        // 4. ------------------------------------------------------------------
-        String lm2_name1 = "lm2_name1";
-
-        Landmark lm2 = new Landmark(lm2_name1, null, null, null);
-
-        // 5. ------------------------------------------------------------------
-        boolean check5 = false;
-
-        try
-        {
-            Landmark lm3 = new Landmark(null, null, null, null);
-            assertTrue(false,
-                       "TP17-ERR stage5, NullPointerException was not thrown as expected.");
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            check5 = true;
-        }
-    }
-
-    void tp19_p1() throws Throwable
-    {
-        setCurrentTest("tp19_p1()");
-
-        System.gc();
-        // waitForEposShutdown(10000);
-        // waitForLandmarksShutdown(10000);
-        // delete_EPOSLM_LDB();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        // 1. ------------------------------------------------------------------
-
-        final String tc80Category = "TC80CategoryISINDEED32CHARACTERS";
-
-        store.addCategory(tc80Category);
-
-        // 2. ------------------------------------------------------------------
-
-        boolean check = false;
-
-        try
-        {
-            store.addCategory(tc80Category);
-            assertTrue(false,
-                       "TP19-ERR TC80 stage2, IllegalArgumentException was not thrown as expected.");
-        }
-        catch (java.lang.IllegalArgumentException e)
-        {
-            check = true;
-        }
-
-        // 3. ------------------------------------------------------------------
-
-        check = false;
-
-        try
-        {
-            store.addCategory(null);
-            assertTrue(false,
-                       "TP19-ERR TC80 stage3, NullPointerException was not thrown as expected.");
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            check = true;
-        }
-        store = null;
-    }
-
-    void tp19_p2() throws Throwable
-    {
-        setCurrentTest("tp19_p2()");
-        System.gc();
-        // waitForEposShutdown(10000);
-        // waitForLandmarksShutdown(10000);
-        // delete_EPOSLM_LDB();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        // 1. ------------------------------------------------------------------
-
-        Enumeration emptyEnum = store.getCategories();
-        assertTrue(!emptyEnum.hasMoreElements(),
-                   "TP19-ERR TC90 stage1, Enumeration was not empty.");
-
-        // 2. ------------------------------------------------------------------
-
-        final String tc90cat1 = "TC90cat1";
-        final String tc90cat2 = "TC90cat2";
-
-        store.addCategory(tc90cat1);
-        store.addCategory(tc90cat2);
-
-        // 3. ------------------------------------------------------------------
-
-        Enumeration categories = store.getCategories();
-        assertTrue(categories.hasMoreElements(),
-                   "TP19-ERR stage3, Enumeration was empty.");
-
-        boolean tc90cat1_found = false;
-        boolean tc90cat2_found = false;
-
-        int count = 0;
-
-        while (categories.hasMoreElements())
-        {
-
-            String cat_temporary = (String) categories.nextElement();
-
-            assertTrue(tc90cat1.equals(cat_temporary)
-                       || tc90cat2.equals(cat_temporary),
-                       "TP19-ERR stage3, An unexpected Category was found in the LandmarkStore.");
-
-            if (tc90cat1.equals(cat_temporary))
-            {
-                tc90cat1_found = true;
-            }
-            if (tc90cat2.equals(cat_temporary))
-            {
-                tc90cat2_found = true;
-            }
-
-            count++;
-        }
-
-        assertTrue(count == 2,
-                   "TP19-ERR stage3, There were not 2 elements in the Enumeration.");
-        assertTrue(
-            tc90cat1_found,
-            "TP19-ERR stage3, Category nr 1 - tc90cat1 - was not found in the Landmark store.");
-        assertTrue(
-            tc90cat2_found,
-            "TP19-ERR stage3, Category nr 2 - tc90cat2 - was not found in the Landmark store.");
-    }
-
-    void tp19_p3() throws Throwable
-    {
-        setCurrentTest("tp19_p3()");
-        System.gc();
-        // waitForEposShutdown(10000);
-        // waitForLandmarksShutdown(10000);
-        // delete_EPOSLM_LDB();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        final String tc91cat1 = "TC91cat1";
-        store.addCategory(tc91cat1);
-
-        // 1. ------------------------------------------------------------------
-
-        store.deleteCategory(tc91cat1);
-
-        // 2. ------------------------------------------------------------------
-
-        boolean check = false;
-
-        try
-        {
-            store.deleteCategory(null);
-            assertTrue(false,
-                       "TP19-ERR stage4, NullPointerException was not thrown as expected.");
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            check = true;
-        }
-        assertTrue(check, "TP19-ERR TC91 stage2, Wrong Throwable was thrown.");
-
-        // 3. ------------------------------------------------------------------
-
-        store.deleteCategory("TC91_ShouldReturnSilently");
-    }
-
-    void tp19_p4() throws Throwable
-    {
-        setCurrentTest("tp19_p4()");
-        System.gc();
-        // waitForEposShutdown(10000);
-        // waitForLandmarksShutdown(10000);
-        // delete_EPOSLM_LDB();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        final String tc92cat = "tc92cat";
-        final String tc92lmstring = "tc92lm";
-
-        Landmark tc92lm = new Landmark(tc92lmstring, null, null, null);
-        store.addLandmark(tc92lm, null);
-
-        // int err = iVTH.addLandmarksToCategory(tc92lmstring, tc92cat);
-        // assert(err == 0, "TP19-ERR TC92 pre-condition error: (1) Landmark was
-        // not sucessfully added to category.");
-        // assert(iVTH.isLandmarkInCategory(tc92lmstring, tc92cat), "TP19-ERR
-        // TC92 pre-condition error: (2) Landmark was not sucessfully added to
-        // category.");
-        store.addCategory(tc92cat);
-        store.addLandmark(tc92lm, tc92cat);
-
-        // Flow: ---------------------------------------------------------------
-        store.deleteCategory(tc92cat);
-    }
-
-    void tp19_p5() throws Throwable
-    {
-        setCurrentTest("tp19_p5()");
-        System.gc();
-        // waitForEposShutdown(10000);
-        // waitForLandmarksShutdown(10000);
-        // delete_EPOSLM_LDB();
-        try
-        {
-            Thread.sleep(1000);
-        }
-        catch (Exception e)
-        {
-        }
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-
-        final String tc93cat1 = "tc93cat1";
-        final String tc93cat2 = "tc93cat2";
-        final String tc93lmstring = "tc93lm";
-
-        // iVTH.addCategory(tc93cat1);
-        // assert(iVTH.categoryExists(tc93cat1), "TP19-ERR TC93 pre-condition
-        // error: category tc93cat1 was not added to LandmarkStore.");
-        store.addCategory(tc93cat1);
-
-        // iVTH.addCategory(tc93cat2);
-        // assert(iVTH.categoryExists(tc93cat2), "TP19-ERR TC93 pre-condition
-        // error: category tc93cat2 was not added to LandmarkStore.");
-        store.addCategory(tc93cat2);
-
-        Landmark tc93lm = new Landmark(tc93lmstring, null, null, null);
-        store.addLandmark(tc93lm, null); // null because the landmark will be
-        // added to the category via iVTH
-        // native interface.
-        // assert(iVTH.countLandmarksByName(tc93lmstring) == 1, "TP19-ERR TC93
-        // pre-condition error: Landmark was not added to LandmarkStore.");
-
-        // int err = iVTH.addLandmarksToCategory(tc93lmstring, tc93cat1);
-        // assert(err == 0, "TP19-ERR TC93 pre-condition error: (1) Landmark was
-        // not sucessfully added to category.");
-        // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1), "TP19-ERR
-        // TC93 pre-condition error: (2) Landmark was not sucessfully added to
-        // category.");
-        store.addLandmark(tc93lm, tc93cat1);
-
-        // err = iVTH.addLandmarksToCategory(tc93lmstring, tc93cat2);
-        // assert(err == 0, "TP19-ERR TC93 pre-condition error: (3) Landmark was
-        // not sucessfully added to category.");
-        // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1), "TP19-ERR
-        // TC93 pre-condition error: (4) Landmark was not sucessfully added to
-        // category.");
-        store.addLandmark(tc93lm, tc93cat2);
-
-        // Flow: ---------------------------------------------------------------
-        store.deleteCategory(tc93cat2);
-        // assert(!iVTH.categoryExists(tc93cat2), "TP19-ERR TC93 category
-        // tc93cat2 was not deleted.");
-        // assert(iVTH.categoryExists(tc93cat1), "TP19-ERR TC93 both categories
-        // were deleted from LandmarkStore.");
-        // assert(iVTH.countLandmarksByName(tc93lmstring) == 1, "TP19-ERR TC93
-        // Landmark was DELETED when deleting category!");
-        // assert(iVTH.isLandmarkInCategory(tc93lmstring, tc93cat1), "TP19-ERR
-        // TC93 Some strange error occurred!");
-    }
-
-    // Equivalent to test LandmarkStore0412 in TCK (?)
-    void landmarkStore0412() throws Exception
-    {
-        setCurrentTest("testLandmarkStore0412()");
-
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore("store1");
-        LandmarkStore.createLandmarkStore("store2");
-
-        LandmarkStore store1 = LandmarkStore.getInstance("store1");
-        LandmarkStore store2 = LandmarkStore.getInstance("store2");
-
-        store1.addCategory("TEST_CATEGORY_1");
-        store1.addCategory("TEST_CATEGORY_2");
-        store2.addCategory("TEST_CATEGORY_1");
-
-        AddressInfo addressInfo = new AddressInfo();
-        for (int i = 1; i < 17; ++i)
-        {
-            addressInfo.setField(i, "Some text representing address stuff");
-        }
-
-        QualifiedCoordinates q1 = new QualifiedCoordinates(-30.0d, -10.0d,
-                Float.NaN, Float.NaN, Float.NaN);
-
-        Landmark landmarkToAdd1 = new Landmark("landmark_1_name",
-                                               "landmark_1_description", q1, addressInfo);
-
-        QualifiedCoordinates q2 = new QualifiedCoordinates(30.0d, 165.0d,
-                Float.NaN, Float.NaN, Float.NaN);
-
-        Landmark landmarkToAdd2 = new Landmark("landmark_2_name",
-                                               "landmark_2_description", q2, addressInfo);
-
-        QualifiedCoordinates q3 = new QualifiedCoordinates(30.0d, -165.0d,
-                Float.NaN, Float.NaN, Float.NaN);
-
-        Landmark landmarkToAdd3 = new Landmark("landmark_3_name",
-                                               "landmark_3_description", q3, addressInfo);
-
-        addLandmarkToStore(store1, landmarkToAdd1, "TEST_CATEGORY_1");
-        addLandmarkToStore(store1, landmarkToAdd2, "TEST_CATEGORY_2");
-        addLandmarkToStore(store2, landmarkToAdd3, "TEST_CATEGORY_1");
-
-        // get Landmarks from store1
-        Enumeration e = store1
-                        .getLandmarks(null, 10.0d, 50.0d, 150.0d, -150.0d);
-        assertTrue(e != null, "No landmarks found");
-        Landmark received = (Landmark) e.nextElement();
-        assertTrue(!e.hasMoreElements(), "To many landmarks found");
-
-        String lmName = received.getName();
-        assertTrue(lmName.equals(landmarkToAdd2.getName()),
-                   "Wrong landmark found in store");
-    }
-
-    // Equivalent to test LandmarkStore0608 in TCK (?)
-    void landmarkStore0608() throws Exception
-    {
-        setCurrentTest("landmarkStore0608()");
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore.createLandmarkStore(STORE_2_NAME);
-
-        LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-        LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-        Landmark LEGAL_LANDMARK_1 = new Landmark("landmark_1",
-                "description_text", VALID_QUALIFIED_COORDINATES, null);
-
-        // adds landmark to the stores:
-        addLandmarkToStore(store2, LEGAL_LANDMARK_1, null);
-
-        addLandmarkToStore(store1, LEGAL_LANDMARK_1, null);
-
-        // deletes the Landmark landmarkFromStore1 from the store:
-        store1.deleteLandmark(LEGAL_LANDMARK_1);
-
-        // Queries the Landmarks from the store and checks that the
-        // returned Enumeration isn't null:
-        Vector landmarks = getAllLandmarksFromStore(store2);
-
-        // there should be two Landmarks in the Vector:
-        assertTrue(
-            landmarks.size() == 1,
-            "One Landmark was added to the newly created LandmarkStore. "
-            + "deleteLandmark was called to another LandmarkStore with"
-            + " same Landmark instance as parameter."
-            + "The store containing the Landmark was expected to "
-            + "remain as is. "
-            + "Still, LandmarkStore.getLandmarks() returned "
-            + "an Enumeration with " + landmarks.size()
-            + " Landmarks.");
-
-        // Check if landmarks are equal not implemented
-
-        // if (!LandmarkStoreHelpers
-        // .areLandmarksEqual(
-        // (Landmark) landmarks.firstElement(),
-        // LEGAL_LANDMARK_1,
-        // true)) {
-        //
-        // return m_helper.failTestCase( testCaseID,
-        // "One Landmark was added to newly created LandmarkStore, "
-        // + "but getLandmarks returned a Landmark instance not identical"
-        // + "to added one.");
-        // }
-
-        landmarks = getAllLandmarksFromStore(store1);
-        assertTrue(landmarks.size() == 0, "One Landmark was stored to named "
-                   + "LandmarkStore and deleted, but the store still contains "
-                   + "Landmarks.");
-    }
-
-    // Equivalent to test landmarkStore0701 in TCK (?)
-    void landmarkStore0701() throws Exception
-    {
-        setCurrentTest("landmarkStore0701()");
-        removeExistingStores();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-        assertFalse(store == null,
-                    " Getting default LandmarkStore with getInstance "
-                    + "returned null, but non-null value was expected.");
-    }
-
-    // Equivalent to test landmarkStore0702 in TCK (?)
-    void landmarkStore0702() throws Exception
-    {
-        setCurrentTest("landmarkStore0702()");
-        removeExistingStores();
-
-        Landmark landmark = new Landmark("Landmark1", "Short description",
-                                         VALID_QUALIFIED_COORDINATES,
-                                         getAddressInfo_allFieldsLessThan30Chars());
-        LandmarkStore def = LandmarkStore.getInstance(null);
-        def.addLandmark(landmark, null);
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore store = LandmarkStore.getInstance(STORE_1_NAME);
-        assertFalse(store == null, " Getting LandmarkStore with getInstance "
-                    + "returned null, but non-null value was expected.");
-
-        Vector landmarks = getAllLandmarksFromStore(store);
-        assertFalse(
-            landmarks.size() != 0,
-            "Created new LandmarkStore instance and called."
-            + " getLandmarks() was expected to return zero landmarks, "
-            + " but enumeration containing " + landmarks.size()
-            + " landmarks was returned.");
-    }
-
-    // Equivalent to test landmarkStore0703 in TCK (?)
-    void landmarkStore0703() throws Exception
-    {
-        setCurrentTest("landmarkStore0703()");
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore store = LandmarkStore.getInstance(STORE_2_NAME);
-        assertFalse(store != null, " Getting LandmarkStore with getInstance "
-                    + "returned non-null when null value was expected.");
-    }
-
-    // Equivalent to test landmarkStore0801 in TCK (?)
-    void landmarkStore0801() throws Exception
-    {
-        setCurrentTest("landmarkStore0801()");
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore store = LandmarkStore.getInstance(STORE_1_NAME);
-        assertTrue(store != null,
-                   "Getting created LandmarkStore with getInstance "
-                   + "returned null, when non-null value was expected.");
-
-        // get Landmarks from store
-        Enumeration e = store.getLandmarks();
-        assertTrue(e == null, "Created new LandmarkStore instance and called"
-                   + " getLandmarks(). The expected result was "
-                   + "that zero Landmarks are returned. ");
-    }
-
-    // Equivalent to test landmarkStore0802 in TCK (?)
-    void landmarkStore0802() throws Exception
-    {
-        setCurrentTest("landmarkStore0802()");
-
-        removeExistingStores();
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore.createLandmarkStore(STORE_2_NAME);
-        LandmarkStore store = LandmarkStore.getInstance(STORE_2_NAME);
-        assertTrue(store != null,
-                   " Getting created LandmarkStore with getInstance "
-                   + "returned null, but non-null value was expected.");
-        // get Landmarks from store
-        Enumeration e = store.getLandmarks();
-        assertTrue(e == null, "Created new LandmarkStore instance and called"
-                   + " getLandmarks(). The expected result was "
-                   + "that zero Landmarks are returned. ");
-    }
-
-    // Equivalent to test landmarkStore0803 in TCK (?)
-    void landmarkStore0803() throws Exception
-    {
-        setCurrentTest("landmarkStore0803()");
-
-        try
-        {
-            removeExistingStores();
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-            LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        }
-        catch (IllegalArgumentException ia)
-        {
-            return;
-        }
-        assertTrue(false,
-                   "Created new LandmarkStore with name already in use, "
-                   + "expected IllegalArgumentException to be thrown but "
-                   + "no exception was caught.");
-    }
-
-    // Equivalent to test landmarkStore1201 in TCK (?)
-    void landmarkStore1201() throws Exception
-    {
-        setCurrentTest("landmarkStore1201()");
-        deleteAllLandmarksAndCategories();
-
-        LandmarkStore store = LandmarkStore.getInstance(null);
-        store.addCategory(LONG_CATEGORY_NAME);
-
-        // check that it was actually added
-        Enumeration categories = store.getCategories();
-        assertTrue(categories != null, "store.getCategories() returned null!");
-
-        while (categories.hasMoreElements())
-        {
-            String name = (String) categories.nextElement();
-            assertTrue(name != null, "Category name was null!");
-            if (LONG_CATEGORY_NAME.equals(name))
-            {
-                return;
-            }
-        }
-        assertTrue(false, "Added category with name \"" + LONG_CATEGORY_NAME
-                   + "\" to default LandmarkStore but Category was not"
-                   + "returned by getCategories method.");
-    }
-
-    // Equivalent to test landmarkStore1202 in TCK (?)
-    void landmarkStore1202() throws Exception
-    {
-        setCurrentTest("landmarkStore1202()");
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-
-        LandmarkStore.createLandmarkStore(STORE_2_NAME);
-        LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-        store1.addCategory(LONG_CATEGORY_NAME);
-
-        // check that it was actually added to store1 only
-        Enumeration categories = store2.getCategories();
-
-        while (categories.hasMoreElements())
-        {
-            String name = (String) categories.nextElement();
-            assertFalse(LONG_CATEGORY_NAME.equals(name),
-                        "Two new LandmarkStores were created and new category "
-                        + "was added to " + STORE_1_NAME
-                        + ". Still same category was returned from \""
-                        + STORE_2_NAME + "\".");
-        }
-
-        categories = store1.getCategories();
-
-        while (categories.hasMoreElements())
-        {
-            String name = (String) categories.nextElement();
-            if (LONG_CATEGORY_NAME.equals(name))
-            {
-                return;
-            }
-        }
-        assertTrue(false, "Added category with name \"" + SHORT_CATEGORY_NAME
-                   + "\" to default LandmarkStore but Category was not"
-                   + "returned by getCategories mehtod.");
-    }
-
-    // Equivalent to test landmarkStore1303 in TCK (?)
-    void landmarkStore1303() throws Exception
-    {
-        setCurrentTest("landmarkStore1303()");
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_1_NAME);
-        LandmarkStore store1 = LandmarkStore.getInstance(STORE_1_NAME);
-
-        LandmarkStore.createLandmarkStore(STORE_2_NAME);
-        LandmarkStore store2 = LandmarkStore.getInstance(STORE_2_NAME);
-
-        String[] categories1 = getSupportedCategories(store1, 1);
-        String[] categories2 = getSupportedCategories(store2, 1);
-
-        assertFalse(categories1 == null || categories2 == null,
-                    "Required number of supported categories are"
-                    + "not available.");
-
-        // Check that categories were actually added
-        Vector returned = getCategoriesAsVector(store2);
-        assertFalse(!returned.contains(categories2[0]),
-                    "One category was added to LandmarkStore" + STORE_2_NAME
-                    + " but it was not returned by method getCategories.");
-
-        returned = getCategoriesAsVector(store1);
-
-        assertFalse(!returned.contains(categories1[0]),
-                    "One category was added to default LandmarkStore"
-                    + STORE_1_NAME
-                    + " but it was not returned by method getCategories.");
-
-        store1.deleteCategory(categories1[0]);
-
-        returned = getCategoriesAsVector(store1);
-        assertFalse(returned.contains(categories1[0]),
-                    "One category was added to LandmarkStore" + STORE_1_NAME
-                    + " and after that it was deleted. Still it was "
-                    + "returned by method getCategories.");
-
-        returned = getCategoriesAsVector(store2);
-        assertFalse(!returned.contains(categories2[0]),
-                    "One category was added to LandmarkStore" + STORE_2_NAME
-                    + " it was not deleted, but still it was not returned "
-                    + " by method getCategories.");
-    }
-
-    // Equivalent to test LandmarkStore1701 in TCK (?)
-    void landmarkStore1701() throws Exception
-    {
-        setCurrentTest("landmarkStore1701()");
-
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(LANDMARKSTORE_NAME);
-
-        // gets the LandmarkStore:
-        LandmarkStore landmarkStore = LandmarkStore
-                                      .getInstance(LANDMARKSTORE_NAME);
-
-        // gets the Landmark that is put to the LandmarkStore:
-        Landmark landmark = new Landmark("sequential_landmark_name", null,
-                                         new QualifiedCoordinates(80d, 45d, 250f, 20f, 30f), null);
-
-        landmarkStore.addCategory(SEQUENTIAL_CATEGORY);
-
-        // adds one Landmark to the LandmarkStore:
-        addLandmarkToStore(landmarkStore, landmark, null);
-
-        // if we get here, no exceptions were thrown. After this test,
-        // test LandmarkStoreSequentialTestPart4 is run. The order of the
-        // tests is handled by the test script.
-        // Notice: Now the LandmarkStore MUST NOT be emptied before exit!
-        // This status will be ignored:
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private String[] getSupportedCategories(LandmarkStore store, int count)
-    throws Exception
-    {
-
-        assertTrue(store != null && count > 0, "internal error in "
-                   + "getSupportedCategories: " + "LandmarkStore="
-                   + store.toString() + " and count=" + count);
-
-        String[] supported = new String[count];
-
-        for (int i = 0; i < count; i++)
-        {
-            String categoryName = "Test_Category_" + i;
-
-            store.addCategory(categoryName);
-            supported[i] = categoryName;
-
-        }
-
-        // makes sure that the right number of categories or null
-        // is always returned:
-        assertFalse(supported != null && supported.length != count,
-                    "Internal error: "
-                    + "getSupportedCategories() method returned "
-                    + "wrong number of categories. " + count
-                    + " categories were requested, but " + supported.length
-                    + " categories were returned.");
-        return supported;
-    }
-
-    private Vector getCategoriesAsVector(LandmarkStore store)
-    {
-        Vector v = new Vector();
-        Enumeration enum = store.getCategories();
-        while (enum.hasMoreElements())
-        {
-            v.addElement(enum.nextElement());
-        }
-        return v;
-    }
-
-    private Vector getAllLandmarksFromStore(LandmarkStore landmarkStore)
-    throws Exception
-    {
-        Enumeration landmarks = null;
-        landmarks = landmarkStore.getLandmarks();
-
-        assertFalse(landmarks != null && !landmarks.hasMoreElements(),
-                    "LandmarkStore.getLandmarks() returned an empty Enumeration. "
-                    + "If there are no Landmarks "
-                    + "in the LandmarkStore, it should return null.");
-
-        // puts the Landmarks to a Vector:
-        Vector result = new Vector();
-        while (landmarks != null && landmarks.hasMoreElements())
-        {
-            Landmark current = (Landmark) landmarks.nextElement();
-            assertFalse(current == null,
-                        "LandmarkStore.getLandmarks() returned an "
-                        + "Enumeration that had a null Landmark in it.");
-            result.addElement(current);
-        }
-        return result;
-    }
-
-    private static AddressInfo getAddressInfo_allFieldsLessThan30Chars()
-    {
-
-        // creates the AddressInfo object used in the tests
-        // and sets its fields:
-        AddressInfo addressInfo = new AddressInfo();
-        addressInfo.setField(AddressInfo.BUILDING_FLOOR,
-                             "value_building_floor 12");
-        addressInfo.setField(AddressInfo.BUILDING_NAME, "value_building_name ");
-        addressInfo.setField(AddressInfo.BUILDING_ROOM, "value_building_room");
-        addressInfo.setField(AddressInfo.BUILDING_ZONE,
-                             "value_building_zone east");
-        addressInfo.setField(AddressInfo.CITY, "value_city Chicago");
-        addressInfo.setField(AddressInfo.COUNTRY, "value_country");
-        addressInfo.setField(AddressInfo.COUNTRY_CODE,
-                             "value_country_code * # ");
-        addressInfo.setField(AddressInfo.COUNTY, "value_county Helsinki");
-        addressInfo.setField(AddressInfo.CROSSING1, "value_crossing1");
-        addressInfo.setField(AddressInfo.CROSSING2, "value_crossing2");
-        addressInfo.setField(AddressInfo.DISTRICT, "value_district");
-        addressInfo.setField(AddressInfo.EXTENSION, "value_extension");
-        addressInfo.setField(AddressInfo.PHONE_NUMBER,
-                             "value_phoneNumber +358 1234");
-        addressInfo
-        .setField(AddressInfo.POSTAL_CODE, "value_postal_code 12345");
-        addressInfo.setField(AddressInfo.STATE, "value_state Florida");
-        addressInfo.setField(AddressInfo.STREET, "value_street Wall Street");
-        addressInfo.setField(AddressInfo.URL, "value_url @ //www.com/?id=8#d");
-
-        return addressInfo;
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/GetLocationTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +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:
-*
-*/
-import javax.microedition.location.*;
-
-class GetLocationTest extends ViperUnitTest
-{
-    private Location iLoc;
-
-    GetLocationTest()
-    {
-        super("GetLocationTest");
-    }
-
-    protected void runTest() throws Throwable
-    {
-        testBadArguments();
-        testGetLocation();
-        testAltitudeData();
-        testSpeedData();
-        testAddressInfo();
-        testGetLocationTimeout();
-        testReset();
-        testGetLatest();
-        testGetLocationOutOfService();
-    }
-
-    void testBadArguments() throws Exception
-    {
-        setCurrentTest("testBadArguments()");
-        providerSetUp(null);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        assertBad(0);
-        assertBad(-2);
-        assertBad(-12345); // Sanity check
-        assertBad(Integer.MIN_VALUE);
-    }
-
-    void testGetLocation() throws Exception
-    {
-        setCurrentTest("testGetLocation()");
-        providerSetUp(null);
-        assertTrue(iLP != null, "LocationProvider is null");
-        simpleGetLocation();
-    }
-
-    void testAltitudeData() throws Exception
-    {
-        setCurrentTest("testAltitudeData()");
-
-        Criteria criteria = new Criteria();
-        criteria.setAltitudeRequired(true);
-        criteria.setPreferredResponseTime(100); // 100 ms
-
-        providerSetUp(criteria);
-        assertTrue(iLP != null, "LocationProvider is null");
-        simpleGetLocation();
-
-        QualifiedCoordinates coords = iLoc.getQualifiedCoordinates();
-        float altitude = coords.getAltitude();
-        assertTrue(!Float.isNaN(altitude), "No altitude included");
-        // echo("Altitude = " + altitude);
-    }
-
-    void testSpeedData() throws Exception
-    {
-        setCurrentTest("testSpeedData()");
-
-        Criteria criteria = new Criteria();
-        criteria.setPreferredResponseTime(100); // 100 ms
-        criteria.setSpeedAndCourseRequired(true);
-
-        providerSetUp(criteria);
-        assertTrue(iLP != null, "LocationProvider is null");
-        simpleGetLocation();
-
-        float speed = iLoc.getSpeed();
-        assertTrue(!Float.isNaN(speed), "No speed included");
-        float course = iLoc.getCourse();
-        assertTrue(!Float.isNaN(course), "No course included");
-        // echo("Speed = " + speed + ", Course = " + course);
-    }
-
-    void testAddressInfo() throws Exception
-    {
-        setCurrentTest("testAddressInfo()");
-
-        Criteria criteria = new Criteria();
-        criteria.setPreferredResponseTime(100); // 100 ms
-        criteria.setAddressInfoRequired(true);
-
-        providerSetUp(criteria);
-        if (iLP != null)
-        {
-            assertTrue(iLP != null, "LocationProvider is null");
-            simpleGetLocation();
-
-            AddressInfo addr = iLoc.getAddressInfo();
-            if (addr != null)
-            {
-                boolean hasNonNullField = false;
-                for (int i = 1; i <= 17; ++i)
-                {
-                    String field = addr.getField(i);
-                    if (field != null)
-                    {
-                        hasNonNullField = true;
-                        // echo("Field #" + i + ": " + field);
-                    }
-                }
-                assertTrue(hasNonNullField, "All AddressInfo fields are null");
-            }
-        }
-    }
-
-    void testGetLocationTimeout() throws Exception
-    {
-        setCurrentTest("testGetLocationTimeout()");
-
-        Criteria criteria = new Criteria();
-        criteria.setCostAllowed(false); // This will select the right provider
-        providerSetUp(criteria);
-        assertTrue(iLP != null, "LocationProvider is null");
-        iLoc = null;
-
-        try
-        {
-            int TIMEOUT = 1; // seconds
-            iLoc = iLP.getLocation(TIMEOUT);
-            assertTrue(false, "No timeout for getLocation");
-        }
-        catch (LocationException le)
-        {
-            // Timed out correctly
-        }
-
-        // Sanity check - test that normal request works ok
-        simpleGetLocation();
-
-        try
-        {
-            int TIMEOUT = 10; // seconds
-            long startTime = System.currentTimeMillis();
-            iLoc = iLP.getLocation(TIMEOUT);
-            long duration = System.currentTimeMillis() - startTime;
-            assertTrue(duration <= TIMEOUT * 1000, "GetLocation took too long");
-            checkLocationData(iLoc);
-        }
-        catch (LocationException le)
-        {
-            assertTrue(false, "Illegal timeout");
-        }
-    }
-
-    void testReset() throws Exception
-    {
-        setCurrentTest("testReset()");
-
-        Criteria criteria = new Criteria();
-        criteria.setCostAllowed(false); // This will select the right provider
-        providerSetUp(criteria);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        LocThread t1 = new LocThread(iLP);
-        LocThread t2 = new LocThread(iLP);
-
-        t1.start();
-        t2.start();
-
-        try
-        {
-            // Sleep to let LocThreads get a chance to call getLocation
-            Thread.sleep(1000);
-            // Reset should cancel all getLocation calls
-            iLP.reset();
-            t1.join();
-            t2.join();
-        }
-        finally
-        {
-            assertTrue(!t1.iGotPosition, "Thread1 got a position");
-            assertTrue(!t2.iGotPosition, "Thread2 got a position");
-            assertTrue(t1.iGotReset, "Thread1 was never reset");
-            assertTrue(t2.iGotReset, "Thread2 was never reset");
-        }
-    }
-
-    void testGetLatest()
-    {
-        setCurrentTest("testGetLatest()");
-
-        iLP = null;
-        iLoc = null;
-
-        // Get the last known location
-        iLoc = LocationProvider.getLastKnownLocation();
-    }
-
-    void testGetLocationOutOfService() throws Exception
-    {
-        setCurrentTest("testGetLocationOutOfService()");
-
-        Criteria criteria = new Criteria();
-        criteria.setCostAllowed(false); // This will select the right provider
-        providerSetUp(criteria);
-
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        simpleGetLocation();
-
-        userMessage("Disable all PSYs");
-
-        // now we get the last known Location:
-        Location lastKnownLocation = LocationProvider.getLastKnownLocation();
-        checkLocationData(lastKnownLocation);
-
-        assertTrue(lastKnownLocation.getTimestamp() == iLoc.getTimestamp(),
-                   "Not the last known location returned");
-
-        long start = System.currentTimeMillis();
-        long end = 0;
-        try
-        {
-            iLoc = iLP.getLocation(-1);
-            assertTrue(false, "No exception thrown for getLocation");
-        }
-        catch (LocationException le)
-        {
-            // Exception thrown correctly
-            end = System.currentTimeMillis();
-        }
-        assertTrue(end - start < 500, "Expected LocationException immediately");
-
-        userMessage("Test passed. Enable PSYs again");
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    void simpleGetLocation() throws Exception
-    {
-        iLoc = null;
-
-        try
-        {
-            iLoc = iLP.getLocation(-1);
-            checkLocationData(iLoc);
-        }
-        catch (LocationException le)
-        {
-            assertTrue(false, "Could not get location: " + le);
-        }
-    }
-
-    void assertBad(int aBadParam) throws Exception
-    {
-        try
-        {
-            iLoc = iLP.getLocation(aBadParam);
-            assertTrue(false, "IllegalArgumentException was not thrown for: "
-                       + aBadParam);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-        }
-    }
-
-    // ------------------------ Helper class -----------------------
-
-    private class LocThread extends Thread
-    {
-        private LocationProvider iLP;
-
-        boolean iGotReset = false;
-
-        boolean iGotPosition = false;
-
-        LocThread(LocationProvider aLP)
-        {
-            iLP = aLP;
-        }
-
-        public void run()
-        {
-            try
-            {
-                int TIMEOUT = 10; // seconds
-                Location l = iLP.getLocation(TIMEOUT);
-                iGotPosition = true;
-            }
-            catch (InterruptedException ie)
-            {
-                iGotReset = true;
-            }
-            catch (Exception e)
-            {
-                echo("Unexpected exception thrown: " + e);
-            }
-        }
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/LandmarkStoreTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2055 +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:
-*
-*/
-import java.util.Enumeration;
-import javax.microedition.location.*;
-
-public class LandmarkStoreTest extends ViperUnitTest
-{
-    static final int MAX_NAME_LENGTH = 255;
-
-    static final int MAX_CATEGORY_LENGTH = 124;
-
-    static final int MAX_DESCRIPTION_LENGTH = 4095;
-
-    static final int MAX_ADDRESSFIELD_LENGTH = 255;
-
-    static final String extension = "23";
-
-    static final String street = "11 Mount Avenue";
-
-    static final String city = "London";
-
-    static final String county = "Ealing";
-
-    static final String postal_code = "W5 1QB";
-
-    static final String state = "England";
-
-    static final String district = "Middlesex";
-
-    static final String country = "United Kingdom";
-
-    static final String country_code = "GB";
-
-    static final String building_name = "The Castle";
-
-    static final String building_floor = "3";
-
-    static final String building_room = "Front Room";
-
-    static final String building_zone = "Upstairs";
-
-    static final String crossing1 = "Mount Avenue";
-
-    static final String crossing2 = "Eaton Rise";
-
-    static final String url = "http://www.upmystreet.co.uk";
-
-    static final String phone_number = "+358401234567";
-
-    static final String searchCategory0 = "category0";
-
-    static final String searchCategory1 = "category1";
-
-    static final String searchCategory2 = "category2";
-
-    static final String searchName0 = "name0"; // Will not be added
-
-    static final String searchName1 = "name1"; // Will be added once
-
-    static final String searchName2 = "name2"; // Will be added twice
-
-    static final String searchName3 = "name3"; // Will be added three times
-
-    private LandmarkStore ls;
-
-    private String iCategory;
-
-    public LandmarkStoreTest()
-    {
-        super("LandmarkStoreTest");
-    }
-
-    // These tests assume the default Landmark store is empty to begin with
-    protected void runTest() throws java.lang.Throwable
-    {
-        testGetInstance();
-
-        testDeleteLandmarkBadArguments();
-        testGetLandmarksEmptyStore();
-
-        // ---------------------------------------------------
-        // Test addLandmark(Landmark, String category = null),
-        // deleteLandmark(Landmark), updateLandmark(Landmark)
-        // and getLandmarks()
-        // ---------------------------------------------------
-        iCategory = null;
-        testAddGetDeleteAndUpdateLandmarks();
-
-        // ---------------------------------------------------
-        // Test addCategory(String), deleteCategory(String)
-        // and getCategories()
-        // ---------------------------------------------------
-        testAddCategoryBadArguments();
-        testDeleteCategoryBadArguments();
-        testAddDeleteCategory();
-        testAddDeleteManyCategories();
-        testAddCategoryTruncate();
-
-        testAddLandmarkToCategory1();
-        testAddLandmarkToCategory2();
-        testAddLandmarkToCategory3();
-        testAddLandmarkToCategoryDeleteCategory();
-        testAddLandmarkSameNameDifferentCategory();
-
-        // Test addLandmark(Landmark, String category = "Work")
-        iCategory = "Work";
-        testAddGetDeleteAndUpdateLandmarks();
-
-        testRemoveLandmarkFromCategoryBadArguments();
-        testRemoveLandmarkFromCategory();
-        testRemoveLandmarkFromCategory2();
-
-        testGetLandmarksByNameBadArguments();
-        testGetLandmarksByName();
-        testGetLandmarksByNameUncategorized();
-        testGetLandmarksByNameWildcards();
-        testGetLandmarksByCategoryBadArguments();
-        testGetLandmarksByCategory();
-        testGetLandmarksByNameAndCategory();
-        testGetLandmarksByAreaBadArguments();
-        testGetLandmarksByArea();
-        testGetLandmarksByArea2();
-        testGetLandmarksByAreaAndCategory();
-
-        testEnumerationDeleteLandmark1();
-        testEnumerationDeleteLandmark2();
-
-        // Make sure the tests cleaned the store
-        assertEmptyLandmarkStore();
-    }
-
-    void testAddGetDeleteAndUpdateLandmarks() throws Exception
-    {
-        if (iCategory != null)
-        {
-            ls = getDefaultLandmarkStore();
-            ls.addCategory(iCategory);
-        }
-
-        testAddLandmarkBadArguments();
-        testAddDeleteLandmark1();
-        testAddDeleteLandmark2();
-        testAddDeleteLandmark3();
-        testAddDeleteLandmark4();
-        testAddLandmarkTwice();
-        testAddLandmarkNoUpdate();
-        testAddLandmarkSameName();
-
-        testAddDeleteAddLandmark();
-        testAddLandmarkTruncate();
-        testAddLandmarkEmptyStrings();
-
-        testUpdateLandmarkBadArguments();
-        testUpdateLandmark1();
-        testUpdateLandmark2();
-
-        testUpdateLandmarkTruncate();
-        testAddDeleteUpdateLandmark();
-
-        testGetAllLandmarks();
-
-        if (iCategory != null)
-        {
-            ls = getDefaultLandmarkStore();
-            ls.deleteCategory(iCategory);
-        }
-    }
-
-    void testGetInstance()
-    {
-        setCurrentTest("testGetInstance()");
-
-        // Get default store
-        ls = LandmarkStore.getInstance(null);
-        assertTrue(ls != null, "Instance was null for default store");
-    }
-
-    void testAddLandmarkBadArguments() throws Exception
-    {
-        setCurrentTest("testAddLandmarkBadArguments()");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            // Add with null Landmark parameter
-            ls.addLandmark(null, iCategory);
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(npe);
-        }
-
-        Landmark lm = new Landmark("test", null, null, null);
-
-        try
-        {
-            String badCategory = "This category does not exist";
-            ls.addLandmark(lm, badCategory); // Add with nonexisting category
-            assertTrue(false, "IllegalArgumentException not thrown 1");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(iae);
-        }
-
-        try
-        {
-            lm.setName(new String(new char[MAX_NAME_LENGTH + 1]));
-            ls.addLandmark(lm, iCategory); // Add Landmark with too long name
-            assertTrue(false, "IllegalArgumentException not thrown 2");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(iae);
-        }
-    }
-
-    void testDeleteLandmarkBadArguments() throws Exception
-    {
-        setCurrentTest("testDeleteLandmarkBadArguments");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            ls.deleteLandmark(null); // Delete with null Landmark parameter
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(npe);
-        }
-
-        try
-        {
-            Landmark lm = new Landmark("test", null, null, null);
-            ls.deleteLandmark(lm); // Try to delete a Landmark that was never
-            // added
-            assertTrue(false, "LandmarkException not thrown");
-        }
-        catch (LandmarkException le)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(le);
-        }
-
-    }
-
-    void testGetLandmarksEmptyStore() throws Exception
-    {
-        setCurrentTest("testGetLandmarksEmptyStore()");
-        ls = getDefaultLandmarkStore();
-        Enumeration e = ls.getLandmarks();
-        assertTrue(e == null, "Expected getLandmarks to return null");
-    }
-
-    // Create a Landmark object, store it in the LandmarkStore, check
-    // that it can be found again and then delete it
-    void testAddDeleteLandmark1() throws Exception
-    {
-        setCurrentTest("testAddDeleteLandmark1()");
-
-        String name = "Nowhere";
-
-        // Create a new Landmark object with only name set
-        Landmark lm = new Landmark(name, null, null, null);
-
-        saveRetrieveDelete(lm);
-    }
-
-    void testAddDeleteLandmark2() throws Exception
-    {
-        setCurrentTest("testAddDeleteLandmark2()");
-
-        String name = "Somewhere";
-        String desc = "It's somewhere but noone knows where it really is";
-
-        // Create a new Landmark object with only name set
-        Landmark lm = new Landmark(name, desc, null, null);
-
-        saveRetrieveDelete(lm);
-    }
-
-    void testAddDeleteLandmark3() throws Exception
-    {
-        setCurrentTest("testAddDeleteLandmark3()");
-
-        String name = "North pole";
-        String desc = "Santas workshop, whats that address again?";
-
-        QualifiedCoordinates coords = new QualifiedCoordinates(90.0f, 0.0f,
-                0.0f, 10.0f, 10.0f);
-
-        // Create a new Landmark object with only name set
-        Landmark lm = new Landmark(name, desc, coords, null);
-
-        saveRetrieveDelete(lm);
-    }
-
-    void testAddDeleteLandmark4() throws Exception
-    {
-        setCurrentTest("testAddDeleteLandmark4()");
-
-        String name = "Office";
-        String desc = "Where you work";
-
-        QualifiedCoordinates coords = new QualifiedCoordinates(57.0f, 17.0f,
-                34.0f, 50.0f, 80.0f);
-
-        AddressInfo address = new AddressInfo();
-        address.setField(AddressInfo.EXTENSION, extension);
-        address.setField(AddressInfo.STREET, street);
-        address.setField(AddressInfo.POSTAL_CODE, postal_code);
-        address.setField(AddressInfo.CITY, city);
-        address.setField(AddressInfo.COUNTY, county);
-        address.setField(AddressInfo.DISTRICT, district);
-        address.setField(AddressInfo.STATE, state);
-        address.setField(AddressInfo.COUNTRY, country);
-        address.setField(AddressInfo.COUNTRY_CODE, country_code);
-        address.setField(AddressInfo.BUILDING_NAME, building_name);
-        address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-        address.setField(AddressInfo.BUILDING_ROOM, building_room);
-        address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-        address.setField(AddressInfo.CROSSING1, crossing1);
-        address.setField(AddressInfo.CROSSING2, crossing2);
-        address.setField(AddressInfo.URL, url);
-        address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-        // Create a new Landmark object
-        Landmark lm = new Landmark(name, desc, coords, address);
-
-        saveRetrieveDelete(lm);
-    }
-
-    // Tests that a Landmark can be added twice.
-    void testAddLandmarkTwice() throws Exception
-    {
-        setCurrentTest("testAddLandmarkTwice()");
-
-        String name = "Add this landmark twice";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        ls = getDefaultLandmarkStore();
-        ls.addLandmark(lm, iCategory);
-        ls.addLandmark(lm, iCategory);
-
-        Enumeration e = ls.getLandmarks();
-        int count = findLandmarks(e, new String[] { name });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        ls.deleteLandmark(lm);
-    }
-
-    // Tests that addLandmark can not be used as updateLandmark.
-    void testAddLandmarkNoUpdate() throws Exception
-    {
-        setCurrentTest("testAddLandmarkNoUpdate()");
-        String name = "Add this landmark twice";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        ls = getDefaultLandmarkStore();
-        ls.addLandmark(lm, iCategory);
-
-        // Check that addLandmark is not doing what updateLandmark should do
-        lm.setDescription("Whatever");
-        lm.setQualifiedCoordinates(new QualifiedCoordinates(0, 0, 0, 0, 0));
-        lm.setAddressInfo(new AddressInfo());
-        ls.addLandmark(lm, iCategory);
-
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        ls.deleteLandmark(lm);
-    }
-
-    // Tests that Landmarks with the same name can be added.
-    void testAddLandmarkSameName() throws Exception
-    {
-        setCurrentTest("testAddLandmarkSameName()");
-
-        String name = "Glenn";
-        Landmark lm1 = new Landmark(name, null, null, null);
-        String desc = "Another landmark with name=Glenn";
-        Landmark lm2 = new Landmark(name, desc, null, null);
-
-        ls = getDefaultLandmarkStore();
-        ls.addLandmark(lm1, iCategory);
-        ls.addLandmark(lm2, iCategory);
-
-        Enumeration e = ls.getLandmarks();
-        int count = findLandmarks(e, new String[] { name, name });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        ls.deleteLandmark(lm1);
-        ls.deleteLandmark(lm2);
-    }
-
-    // Tests that a Landmark can be added, then deleted and added again.
-    void testAddDeleteAddLandmark() throws Exception
-    {
-        setCurrentTest("testAddDeleteAddLandmark()");
-
-        ls = getDefaultLandmarkStore();
-
-        String name = "LandmarkToBeAddedDeletedAndAddedAgain";
-        Landmark lm = new Landmark(name, null, null, null);
-        Enumeration e;
-
-        ls.addLandmark(lm, iCategory);
-
-        e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        ls.deleteLandmark(fetchedLm);
-
-        ls.addLandmark(lm, iCategory);
-
-        e = ls.getLandmarks();
-        int count = findLandmarks(e, new String[] { name });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        ls.deleteLandmark(lm);
-    }
-
-    // Tests that description and address are truncated if they are too long
-    void testAddLandmarkTruncate() throws Exception
-    {
-        setCurrentTest("testAddLandmarkTruncate()");
-
-        ls = getDefaultLandmarkStore();
-
-        String name = "Longest address in the world :)";
-
-        String maxDescription = new String(new char[MAX_DESCRIPTION_LENGTH]);
-        String tooLongDescription = maxDescription + "could be a lot more";
-
-        String maxAddrField = new String(new char[MAX_ADDRESSFIELD_LENGTH]);
-        String tooLongAddrField = maxAddrField + "some more";
-        AddressInfo tooLongAddr = new AddressInfo();
-        for (int i = 0; i < 17; ++i)
-        {
-            tooLongAddr.setField(i + 1, tooLongAddrField);
-        }
-
-        // Add the landmark that has info with too long length
-        Landmark lm = new Landmark(name, tooLongDescription, null, tooLongAddr);
-        ls.addLandmark(lm, iCategory);
-
-        // All fields should be truncated to max length
-        AddressInfo expectedAddr = new AddressInfo();
-        for (int i = 0; i < 17; ++i)
-        {
-            expectedAddr.setField(i + 1, maxAddrField);
-        }
-
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, maxDescription, null, expectedAddr);
-
-        ls.deleteLandmark(lm);
-    }
-
-    void testUpdateLandmarkBadArguments() throws Exception
-    {
-        setCurrentTest("testUpdateLandmarkBadArguments");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            ls.updateLandmark(null); // Update with null Landmark parameter
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-        }
-
-        Landmark lm = new Landmark("test", null, null, null);
-        try
-        {
-            ls.updateLandmark(lm); // Update without adding first
-            assertTrue(false, "LandmarkException not thrown 1");
-        }
-        catch (LandmarkException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        try
-        {
-            ls.addLandmark(lm, iCategory);
-            ls.deleteLandmark(lm);
-            ls.updateLandmark(lm); // Landmark no longer belongs to store
-            assertTrue(false, "LandmarkException not thrown 2");
-        }
-        catch (LandmarkException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        try
-        {
-            ls.addLandmark(lm, iCategory);
-            lm.setName(new String(new char[MAX_NAME_LENGTH + 1]));
-            ls.updateLandmark(lm); // Update Landmark with too long name
-            assertTrue(false, "IllegalArgumentException not thrown 3");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        ls.deleteLandmark(lm);
-    }
-
-    // Add a landmark to the LandmarkStore and update with more and more
-    // information.
-    void testUpdateLandmark1() throws Exception
-    {
-        setCurrentTest("testUpdateLandmark1()");
-
-        // Create a new Landmark object
-        String name = "Home";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        ls = getDefaultLandmarkStore();
-
-        // Save the landmark
-        ls.addLandmark(lm, iCategory);
-
-        Landmark fetchedLm = null;
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        // Update the landmark with a decription
-        String description = "There is no place like it";
-        lm.setDescription(description);
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, description, null, null);
-
-        // Update the landmark with QualifiedCoordinates and change the name
-        QualifiedCoordinates coords = new QualifiedCoordinates(-10.2f, -107.8f,
-                -4.5f, 11.9f, 5.1f);
-
-        lm.setQualifiedCoordinates(coords);
-        name = "My place";
-        lm.setName(name);
-
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, description, coords, null);
-
-        // Update the landmark with AddressInfo
-        AddressInfo address = new AddressInfo();
-        address.setField(AddressInfo.EXTENSION, extension);
-        address.setField(AddressInfo.STREET, street);
-        address.setField(AddressInfo.POSTAL_CODE, postal_code);
-        address.setField(AddressInfo.CITY, city);
-        address.setField(AddressInfo.COUNTY, county);
-        address.setField(AddressInfo.DISTRICT, district);
-        address.setField(AddressInfo.STATE, state);
-        address.setField(AddressInfo.COUNTRY, country);
-        address.setField(AddressInfo.COUNTRY_CODE, country_code);
-        address.setField(AddressInfo.BUILDING_NAME, building_name);
-        address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-        address.setField(AddressInfo.BUILDING_ROOM, building_room);
-        address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-        address.setField(AddressInfo.CROSSING1, crossing1);
-        address.setField(AddressInfo.CROSSING2, crossing2);
-        address.setField(AddressInfo.URL, url);
-        address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-
-        lm.setAddressInfo(address);
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, description, coords, address);
-
-        // Finally, remove the landmark
-        ls.deleteLandmark(lm);
-    }
-
-    // Add a landmark to the LandmarkStore with all the information set and
-    // update by removing information.
-    void testUpdateLandmark2() throws Exception
-    {
-        setCurrentTest("testUpdateLandmark2()");
-
-        // Create a new Landmark object
-        String name = "Home";
-        String desc = "There is no place like it";
-        QualifiedCoordinates coords = new QualifiedCoordinates(-10.2f, -107.8f,
-                -4.5f, 11.9f, 5.1f);
-        AddressInfo address = new AddressInfo();
-        address.setField(AddressInfo.EXTENSION, extension);
-        address.setField(AddressInfo.STREET, street);
-        address.setField(AddressInfo.POSTAL_CODE, postal_code);
-        address.setField(AddressInfo.CITY, city);
-        address.setField(AddressInfo.COUNTY, county);
-        address.setField(AddressInfo.DISTRICT, district);
-        address.setField(AddressInfo.STATE, state);
-        address.setField(AddressInfo.COUNTRY, country);
-        address.setField(AddressInfo.COUNTRY_CODE, country_code);
-        address.setField(AddressInfo.BUILDING_NAME, building_name);
-        address.setField(AddressInfo.BUILDING_FLOOR, building_floor);
-        address.setField(AddressInfo.BUILDING_ROOM, building_room);
-        address.setField(AddressInfo.BUILDING_ZONE, building_zone);
-        address.setField(AddressInfo.CROSSING1, crossing1);
-        address.setField(AddressInfo.CROSSING2, crossing2);
-        address.setField(AddressInfo.URL, url);
-        address.setField(AddressInfo.PHONE_NUMBER, phone_number);
-        Landmark lm = new Landmark(name, desc, coords, address);
-
-        ls = getDefaultLandmarkStore();
-
-        // Save the landmark
-        ls.addLandmark(lm, iCategory);
-
-        Landmark fetchedLm = null;
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, desc, coords, address);
-
-        // Remove decription
-        lm.setDescription(null);
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, null, coords, address);
-
-        // Remove QualifiedCoordinates
-        lm.setQualifiedCoordinates(null);
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, null, null, address);
-
-        // Remove AddressInfo
-        lm.setAddressInfo(null);
-        ls.updateLandmark(lm);
-
-        fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        // Finally, remove the landmark
-        ls.deleteLandmark(lm);
-    }
-
-    void testUpdateLandmarkTruncate() throws Exception
-    {
-        setCurrentTest("testUpdateLandmarkTruncate()");
-
-        ls = getDefaultLandmarkStore();
-
-        String name = "Update with lots of info later";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, iCategory);
-
-        String maxDescription = new String(new char[MAX_DESCRIPTION_LENGTH]);
-        String tooLongDescription = maxDescription + "could be a lot more";
-
-        String maxAddrField = new String(new char[MAX_ADDRESSFIELD_LENGTH]);
-        String tooLongAddrField = maxAddrField + "some more";
-        AddressInfo tooLongAddr = new AddressInfo();
-        for (int i = 0; i < 17; ++i)
-        {
-            tooLongAddr.setField(i + 1, tooLongAddrField);
-        }
-
-        // Update the landmark with info that has length longer than max
-        lm.setDescription(tooLongDescription);
-        lm.setAddressInfo(tooLongAddr);
-        ls.updateLandmark(lm);
-
-        // All fields should be truncated to max length
-        AddressInfo expectedAddr = new AddressInfo();
-        for (int i = 0; i < 17; ++i)
-        {
-            expectedAddr.setField(i + 1, maxAddrField);
-        }
-
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, maxDescription, null, expectedAddr);
-
-        ls.deleteLandmark(lm);
-    }
-
-    void testAddDeleteUpdateLandmark() throws Exception
-    {
-        setCurrentTest("testAddDeleteUpdateLandmark()");
-
-        ls = getDefaultLandmarkStore();
-
-        String name = "AddDeleteUpdateLandmark";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        // Add, get and delete the landmark
-        ls.addLandmark(lm, iCategory);
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        ls.deleteLandmark(lm);
-
-        // Try to update the landmark we just deleted
-        try
-        {
-            fetchedLm.setDescription("Description");
-            ls.updateLandmark(fetchedLm);
-            assertTrue(false, "LandmarkException not thrown");
-        }
-        catch (LandmarkException le)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(le);
-        }
-    }
-
-    // List all landmarks.
-    void testGetAllLandmarks() throws Exception
-    {
-        setCurrentTest("testGetAllLandmarks()");
-
-        final String BASE_NAME = "GetLandmarksTest";
-        final int NUM_LANDMARKS = 10;
-        String[] names = new String[NUM_LANDMARKS];
-
-        ls = getDefaultLandmarkStore();
-
-        for (int i = 0; i < NUM_LANDMARKS; ++i)
-        {
-            names[i] = BASE_NAME + i;
-            Landmark lm = new Landmark(names[i], null, null, null);
-            ls.addLandmark(lm, iCategory);
-        }
-
-        // Retrieve the enumeration of landmarks
-        Enumeration e = ls.getLandmarks();
-
-        int count = findLandmarks(e, names);
-        assertTrue(count == NUM_LANDMARKS, "Wrong number of Landmarks found");
-
-        // Delete all the added landmarks
-        e = ls.getLandmarks();
-        while (e.hasMoreElements())
-        {
-            ls.deleteLandmark((Landmark) e.nextElement());
-        }
-    }
-
-    void testAddCategoryBadArguments() throws Exception
-    {
-        setCurrentTest("testAddCategoryBadArguments()");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            ls.addCategory(null); // Add category with null parameter
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-        }
-
-        try
-        {
-            ls.addCategory(""); // Add category with empty string parameter
-            assertTrue(false, "IllegalArgumentException not thrown");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        String category = "Try to add this category twice";
-        ls.addCategory(category);
-
-        try
-        {
-            ls.addCategory(category); // Category already exists
-            assertTrue(false, "IllegalArgumentException not thrown");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-        }
-
-        ls.deleteCategory(category);
-    }
-
-    void testDeleteCategoryBadArguments() throws Exception
-    {
-        setCurrentTest("testDeleteCategoryBadArguments()");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            ls.deleteCategory(null); // Delete category with null parameter
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-        }
-
-        String category = "Nonexisting category";
-        ls.deleteCategory(category); // This should be a silent failure
-        ls.deleteCategory(category); // Try again just to make sure :)
-
-        ls.deleteCategory(""); // Empty string should fail silently
-
-        // Silent failure if category name is too long
-        ls.deleteCategory(new String(new char[MAX_CATEGORY_LENGTH + 1]));
-    }
-
-    // Tests that new categories can be added and deleted.
-    void testAddDeleteCategory() throws Exception
-    {
-        setCurrentTest("testAddDeleteCategory()");
-
-        String category = "AddCategoryTest Category";
-
-        ls = getDefaultLandmarkStore();
-
-        // Add category
-        ls.addCategory(category);
-
-        // Check that the category was added
-        Enumeration e = ls.getCategories();
-        findCategory(e, category);
-
-        // Delete the category
-        ls.deleteCategory(category);
-
-        // Check that category has been removed
-        e = ls.getCategories();
-        while (e.hasMoreElements())
-        {
-            String s = (String) e.nextElement();
-            assertTrue(!s.equals(category), "Category was not removed");
-        }
-    }
-
-    void testAddDeleteManyCategories() throws Exception
-    {
-        setCurrentTest("testAddDeleteManyCategories()");
-
-        // A variety of valid category names
-        String[] categories = new String[] { "q", "Dots ...", "Exclamation!",
-                                             "(parentesis)", "percentage%", "hashmark#", "at@", "et&",
-                                             "commas,,,"
-                                           };
-
-        ls = getDefaultLandmarkStore();
-
-        // Quick Add and Delete of categories
-        for (int i = 0; i < categories.length; ++i)
-        {
-            ls.addCategory(categories[i]);
-            ls.deleteCategory(categories[i]);
-        }
-
-        // Add many categories
-        String category = "Test_Category_";
-
-        // Add categories
-        for (int i = 0; i < 100; ++i)
-        {
-            ls.addCategory(category + i);
-        }
-
-        // Delete categories
-        for (int i = 0; i < 100; ++i)
-        {
-            ls.deleteCategory(category + i);
-        }
-    }
-
-    void testAddCategoryTruncate() throws Exception
-    {
-        setCurrentTest("testAddCategoryTruncate()");
-
-        ls = getDefaultLandmarkStore();
-
-        String maxCategoryName = new String(new char[MAX_CATEGORY_LENGTH]);
-
-        // Add category with too long name
-        String tooLongCategoryName = maxCategoryName + "extra";
-        ls.addCategory(tooLongCategoryName);
-
-        // Check that the category was added
-        Enumeration e = ls.getCategories();
-        // Category name should be truncated to max length
-        findCategory(e, maxCategoryName);
-
-        // Try to delete with the too long category name
-        ls.deleteCategory(tooLongCategoryName);
-        // Make sure the category is still there
-        e = ls.getCategories();
-        findCategory(e, maxCategoryName);
-
-        // Delete the category
-        ls.deleteCategory(maxCategoryName);
-
-        // Check that category has been removed
-        e = ls.getCategories();
-        while (e.hasMoreElements())
-        {
-            String s = (String) e.nextElement();
-            assertTrue(!maxCategoryName.equals(s), "Category was not removed");
-        }
-    }
-
-    void testAddLandmarkToCategory1() throws Exception
-    {
-        setCurrentTest("testAddLandmarkToCategory1()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Create a category
-        String category = "ViperTest Sightseeing";
-        ls.addCategory(category);
-
-        // Create a new Landmark in the category
-        String name = "Eiffel Tower";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, category);
-
-        // Get Landmarks by category
-        Enumeration e = ls.getLandmarks(category, null);
-        int count = findLandmarks(e, new String[] { name });
-        assertTrue(count == 1, "Wrong number of Landmarks found");
-
-        ls.deleteLandmark(lm);
-        ls.deleteCategory(category);
-    }
-
-    void testAddLandmarkToCategory2() throws Exception
-    {
-        setCurrentTest("testAddLandmarkToCategory2()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Add a new Landmark to default category
-        String name = "Liseberg";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, null);
-
-        // Create a category
-        String category = "Amuzement Parks";
-        ls.addCategory(category);
-
-        // Get Landmarks by category
-        Enumeration e = ls.getLandmarks(category, null);
-        assertTrue(e == null, "Category should have been empty");
-
-        // Add the Landmark to the category
-        ls.addLandmark(lm, category);
-
-        // Get Landmarks by category
-        Enumeration e2 = ls.getLandmarks(category, null);
-        int count = findLandmarks(e2, new String[] { name });
-        assertTrue(count == 1, "Wrong number of Landmarks found");
-
-        ls.deleteLandmark(lm);
-        ls.deleteCategory(category);
-    }
-
-    void testAddLandmarkToCategory3() throws Exception
-    {
-        setCurrentTest("testAddLandmarkToCategory3()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Add category1
-        String category1 = "Food";
-        ls.addCategory(category1);
-        findCategory(ls.getCategories(), category1);
-
-        // Add category2
-        String category2 = "Restuarants";
-        ls.addCategory(category2);
-        findCategory(ls.getCategories(), category2);
-
-        // Create a new Landmark in category1
-        String name = "Da Pizza place";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, category1);
-
-        // Add the Landmark to category2
-        ls.addLandmark(lm, category2);
-
-        // Get Landmarks by category1
-        Enumeration e1 = ls.getLandmarks(category1, null);
-        int count1 = findLandmarks(e1, new String[] { name });
-        assertTrue(count1 == 1, "Wrong number of Landmarks found");
-
-        // Get Landmarks by category2
-        Enumeration e2 = ls.getLandmarks(category2, null);
-        int count2 = findLandmarks(e2, new String[] { name });
-        assertTrue(count2 == 1, "Wrong number of Landmarks found");
-
-        ls.deleteLandmark(lm);
-        ls.deleteCategory(category1);
-        ls.deleteCategory(category2);
-    }
-
-    void testAddLandmarkEmptyStrings() throws Exception
-    {
-        setCurrentTest("testAddLandmarkEmptyStrings()");
-
-        ls = getDefaultLandmarkStore();
-
-        try
-        {
-            Landmark lm = new Landmark("name", null, null, null);
-            ls.addLandmark(lm, ""); // Try to use empty string for category
-            assertTrue(false, "IllegalArgumentException not thrown");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-        }
-
-        // Create AddressInfo with all fields set to empty strings
-        AddressInfo addr = new AddressInfo();
-        for (int i = 0; i < 17; ++i)
-        {
-            addr.setField(i + 1, "");
-        }
-
-        String name = "";
-        String description = " ";
-        Landmark lm = new Landmark(name, description, null, addr);
-        ls.addLandmark(lm, iCategory); // Should be ok
-
-        // Get Landmarks
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, description, null, addr);
-
-        ls.deleteLandmark(lm);
-    }
-
-    void testAddLandmarkToCategoryDeleteCategory() throws Exception
-    {
-        setCurrentTest("testAddLandmarkToCategoryDeleteCategory()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Create a category
-        String category = "Museums";
-        ls.addCategory(category);
-
-        // Create a new Landmark in the category
-        String name = "Guggenheim";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, category);
-
-        // Delete the category
-        ls.deleteCategory(category);
-
-        // Get Landmarks by category
-        Enumeration e = ls.getLandmarks(null, category);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Make sure Landmark still exists
-        Landmark fetchedLm = findLandmark(ls.getLandmarks(), name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        ls.deleteLandmark(lm);
-    }
-
-    void testAddLandmarkSameNameDifferentCategory() throws Exception
-    {
-        setCurrentTest("testAddLandmarkSameNameDifferentCategory()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Create categories
-        String category1 = "category1";
-        String category2 = "category2";
-        ls.addCategory(category1);
-        ls.addCategory(category2);
-
-        String name = "Same name";
-
-        // Create a new Landmark in category1
-        String desc1 = "This landmark has a description";
-        Landmark lm1 = new Landmark(name, desc1, null, null);
-        ls.addLandmark(lm1, category1);
-
-        // Create a new Landmark in category2
-        Landmark lm2 = new Landmark(name, null, null, null);
-        ls.addLandmark(lm2, category2);
-
-        // Get Landmarks by category1
-        Enumeration e = ls.getLandmarks(category1, null);
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, desc1, null, null);
-
-        // Get Landmarks by category2
-        e = ls.getLandmarks(category2, null);
-        fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        // Get Landmarks by name
-        e = ls.getLandmarks(null, name);
-        int count = findLandmarks(e, new String[] { name, name });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        ls.deleteLandmark(lm1);
-        ls.deleteLandmark(lm2);
-        ls.deleteCategory(category1);
-        ls.deleteCategory(category2);
-    }
-
-    void testRemoveLandmarkFromCategoryBadArguments() throws Exception
-    {
-        setCurrentTest("testRemoveLandmarkFromCategoryBadArguments");
-
-        ls = getDefaultLandmarkStore();
-
-        String category1 = "Cat1";
-        String category2 = "Cat2";
-        ls.addCategory(category1);
-        ls.addCategory(category2);
-
-        // Add a landmark to category1
-        Landmark lm = new Landmark("name", null, null, null);
-        ls.addLandmark(lm, category1);
-
-        try
-        {
-            // Remove landmark from category with null Landmark parameter
-            ls.removeLandmarkFromCategory(null, category1);
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-        }
-
-        try
-        {
-            // Remove landmark from category with null category parameter
-            ls.removeLandmarkFromCategory(lm, null);
-            assertTrue(false, "NullPointerException not thrown");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-        }
-
-        // Silent failure if Landmark does not belong to category
-        ls.removeLandmarkFromCategory(lm, category2);
-
-        // Silent failure if category does not exist
-        ls.removeLandmarkFromCategory(lm, "NonexistingCategory");
-
-        // Silent failure if category is empty string
-        ls.removeLandmarkFromCategory(lm, "");
-
-        // Silent failure if category name is too long
-        String tooLongCategory = new String(new char[MAX_CATEGORY_LENGTH + 1]);
-        ls.removeLandmarkFromCategory(lm, tooLongCategory);
-
-        // Silent failure if Landmark does not belong to LandmarkStore
-        Landmark newLm = new Landmark("Not added", null, null, null);
-        ls.removeLandmarkFromCategory(newLm, category1);
-
-        ls.deleteLandmark(lm);
-        ls.deleteCategory(category1);
-        ls.deleteCategory(category2);
-    }
-
-    void testRemoveLandmarkFromCategory() throws Exception
-    {
-        setCurrentTest("testRemoveLandmarkFromCategory");
-
-        String category = "Category";
-        String name = "lm";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        ls = getDefaultLandmarkStore();
-        ls.addCategory(category);
-        ls.addLandmark(lm, category);
-
-        Enumeration e = ls.getLandmarks(category, name);
-        Landmark fetchedLm = findLandmark(e, name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        ls.removeLandmarkFromCategory(lm, category);
-
-        Enumeration e2 = ls.getLandmarks(category, name);
-        assertTrue(e2 == null, "Landmark not removed from category");
-
-        // Delete the category and Landmark from the store
-        ls.deleteCategory(category);
-        ls.deleteLandmark(lm);
-    }
-
-    void testRemoveLandmarkFromCategory2() throws Exception
-    {
-        setCurrentTest("testRemoveLandmarkFromCategory2()");
-
-        ls = getDefaultLandmarkStore();
-
-        // Add categories
-        String category1 = "category1";
-        String category2 = "category2";
-        ls.addCategory(category1);
-        ls.addCategory(category2);
-
-        String name = "lm";
-        Landmark lm = new Landmark(name, null, null, null);
-
-        // Add landmark to category1 and category2
-        ls.addLandmark(lm, category1);
-        ls.addLandmark(lm, category2);
-
-        // Remove landmark from category1
-        ls.removeLandmarkFromCategory(lm, category1);
-
-        Enumeration e = ls.getLandmarks(category1, name);
-        assertTrue(e == null, "Landmark not removed from category");
-
-        // Make sure landmark still belongs to category2
-        Enumeration e2 = ls.getLandmarks(category2, name);
-        Landmark fetchedLm = findLandmark(e2, name);
-        checkLandmark(fetchedLm, name, null, null, null);
-
-        // Remove landmark from category2
-        ls.removeLandmarkFromCategory(lm, category2);
-
-        Enumeration e3 = ls.getLandmarks(category2, name);
-        assertTrue(e3 == null, "Landmark not removed from category");
-
-        // Delete the categories and Landmark from the store
-        ls.deleteCategory(category1);
-        ls.deleteCategory(category2);
-        ls.deleteLandmark(lm);
-    }
-
-    void testGetLandmarksByNameBadArguments() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByNameBadArguments()");
-
-        String maxName = new String(new char[MAX_NAME_LENGTH]);
-
-        ls = getDefaultLandmarkStore();
-        Landmark lm = new Landmark(maxName, null, null, null);
-        ls.addLandmark(lm, null);
-
-        // Sanity check, find landmark by name
-        Enumeration e = ls.getLandmarks(null, maxName);
-        int count = findLandmarks(e, new String[] { maxName });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search with too long name
-        e = ls.getLandmarks(null, maxName + "x");
-        assertTrue(e == null, "Expected getLandmarks to return null (1)");
-
-        // Search with empty string for name
-        e = ls.getLandmarks(null, "");
-        assertTrue(e == null, "Expected getLandmarks to return null (2)");
-
-        ls.deleteLandmark(lm);
-    }
-
-    void testGetLandmarksByName() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByName()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        Enumeration e;
-        int count;
-
-        // Search for landmark that does not exist
-        e = ls.getLandmarks(null, searchName0);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks(null, searchName1);
-        count = findLandmarks(e, new String[] { searchName1 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 2
-        e = ls.getLandmarks(null, searchName2);
-        count = findLandmarks(e, new String[] { searchName2, searchName2 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks 3
-        e = ls.getLandmarks(null, searchName3);
-        count = findLandmarks(e, new String[] { searchName3, searchName3,
-                                                searchName3
-                                              });
-        assertTrue(count == 3, "Wrong number of landmarks found");
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByNameUncategorized() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByNameUncategorized()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        Enumeration e;
-        int count;
-
-        // Find all landmarks that do not belong to a category
-        e = ls.getLandmarks("", null);
-        count = findLandmarks(e, new String[] { searchName1, searchName2 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks("", searchName1);
-        count = findLandmarks(e, new String[] { searchName1 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 3
-        e = ls.getLandmarks("", searchName3);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByNameWildcards() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByNameWildcards()");
-
-        ls = getDefaultLandmarkStore();
-
-        String[] names = { "Hepa", "Huupa", "Lupa", "upo", "upa", "Lu?a", "*" };
-        int length = names.length;
-        Landmark[] lms = new Landmark[length];
-
-        for (int i = 0; i < length; ++i)
-        {
-            lms[i] = new Landmark(names[i], null, null, null);
-            ls.addLandmark(lms[i], null);
-        }
-
-        searchAndMatch("H*", new String[] { "Hepa", "Huupa" });
-        searchAndMatch("*o", new String[] { "upo" });
-        searchAndMatch("*upa", new String[] { "Huupa", "Lupa", "upa" });
-        searchAndMatch("L*a", new String[] { "Lupa", "Lu?a" });
-        searchAndMatch("*e*", new String[] { "Hepa" });
-
-        searchAndMatch("?", new String[] { "*" });
-        searchAndMatch("up?", new String[] { "upa", "upo" });
-        searchAndMatch("?upa", new String[] { "Lupa" });
-        searchAndMatch("H?pa", new String[] { "Hepa" });
-        searchAndMatch("?u??", new String[] { "Lupa", "Lu?a" });
-        searchAndMatch("???", new String[] { "upo", "upa" });
-        searchAndMatch("?????", new String[] { "Huupa" });
-
-        // Some complicated searches
-        searchAndMatch("*??pa", new String[] { "Hepa", "Huupa", "Lupa" });
-        searchAndMatch("*u?a", new String[] { "Huupa", "Lupa", "upa", "Lu?a" });
-        searchAndMatch("*up?", new String[] { "Huupa", "Lupa", "upo", "upa" });
-        searchAndMatch("?*up?", new String[] { "Huupa", "Lupa" });
-        searchAndMatch("*?*o*", new String[] { "upo" });
-
-        // Find all landmarks
-        searchAndMatch("*", names);
-        searchAndMatch("?*", names);
-        searchAndMatch("*?", names);
-        searchAndMatch("*?*", names);
-
-        for (int i = 0; i < length; ++i)
-        {
-            ls.deleteLandmark(lms[i]);
-        }
-    }
-
-    void testGetLandmarksByCategoryBadArguments() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByCategoryBadArguments()");
-
-        ls = getDefaultLandmarkStore();
-
-        String maxCategoryName = new String(new char[MAX_CATEGORY_LENGTH]);
-        ls.addCategory(maxCategoryName);
-
-        String name = "Wherever";
-        Landmark lm = new Landmark(name, null, null, null);
-        ls.addLandmark(lm, maxCategoryName);
-
-        // Sanity check, find landmark by category
-        Enumeration e = ls.getLandmarks(maxCategoryName, null);
-        int count = findLandmarks(e, new String[] { name });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search with too long category name
-        e = ls.getLandmarks(maxCategoryName + "x", null);
-        assertTrue(e == null, "Expected getLandmarks to return null (1)");
-
-        // Search with empty string for category name
-        e = ls.getLandmarks("", null);
-        assertTrue(e == null, "Expected getLandmarks to return null (2)");
-
-        ls.deleteLandmark(lm);
-        ls.deleteCategory(maxCategoryName);
-    }
-
-    void testGetLandmarksByCategory() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByCategory()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        Enumeration e;
-        int count;
-
-        // Search for category that does not exist
-        e = ls.getLandmarks(searchCategory0, null);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks(searchCategory1, null);
-        count = findLandmarks(e, new String[] { searchName3 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 2
-        e = ls.getLandmarks(searchCategory2, null);
-        count = findLandmarks(e, new String[] { searchName2, searchName3,
-                                                searchName3
-                                              });
-        assertTrue(count == 3, "Wrong number of landmarks found");
-
-        // Delete the categories and Landmarks from the store
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByNameAndCategory() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByNameAndCategory()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        Enumeration e;
-        int count;
-
-        // Search with a category that does not exist
-        e = ls.getLandmarks(searchCategory0, searchName1);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search with a name that does not exist
-        e = ls.getLandmarks(searchCategory2, searchName0);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search with a name that does not exist in the category
-        e = ls.getLandmarks(searchCategory1, searchName1);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks(searchCategory1, searchName3);
-        count = findLandmarks(e, new String[] { searchName3 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 2
-        e = ls.getLandmarks(searchCategory2, searchName3);
-        count = findLandmarks(e, new String[] { searchName3, searchName3 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks 3
-        e = ls.getLandmarks(searchCategory2, searchName2);
-        Landmark fetchedLm = findLandmark(e, searchName2);
-        checkLandmark(fetchedLm, searchName2, searchCategory2, null, null);
-
-        // Delete the categories and Landmarks from the store
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByAreaBadArguments() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByAreaBadArguments()");
-        ls = getDefaultLandmarkStore();
-
-        double minLat = -10.0d;
-        double maxLat = 10.0d;
-        double minLon = -110.0d;
-        double maxLon = 110.0d;
-
-        // Bad minLat values
-        assertBadGetLandmarksByArea(-90.1d, maxLat, minLon, maxLon);
-        assertBadGetLandmarksByArea(90.1d, maxLat, minLon, maxLon);
-
-        // Bad maxLat values
-        assertBadGetLandmarksByArea(minLat, -90.1d, minLon, maxLon);
-        assertBadGetLandmarksByArea(minLat, 90.1d, minLon, maxLon);
-
-        // minLat > maxLat
-        assertBadGetLandmarksByArea(40.0d, 30.0d, minLon, maxLon);
-
-        // Bad minLon values
-        assertBadGetLandmarksByArea(minLat, maxLat, -180.1d, maxLon);
-        assertBadGetLandmarksByArea(minLat, maxLat, 180.0d, maxLon);
-
-        // Bad maxLon values
-        assertBadGetLandmarksByArea(minLat, maxLat, minLon, -180.1d);
-        assertBadGetLandmarksByArea(minLat, maxLat, minLon, 180.0d);
-
-        try
-        {
-            Enumeration e = ls.getLandmarks(null, minLat, minLon, maxLat,
-                                            maxLon);
-            assertTrue(false,
-                       "IllegalArgumentException not thrown for long category name");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertTrue(iae.getMessage() == null,
-                       "Message not allowed for exception: " + iae);
-        }
-
-    }
-
-    void testGetLandmarksByArea() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByArea()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        // -180 0 180
-        // |---------|- 90 1 = searchName1
-        // | | | 2 = searchName2
-        // | 1 | | 3 = searchName3, searchCategory1
-        // |----+----|- 0 4 = searchName3, searchCategory2
-        // |2 |4 5| 5 = searchName3, searchCategory2
-        // | 3 | |
-        // |---------|- -90
-
-        Enumeration e;
-        int count;
-
-        // Search an area where there are no landmarks
-        e = ls.getLandmarks(null, 0.0d, 90.0d, 0.0d, 179.9d);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks(null, 0.0d, 90.0d, -180.0d, 0.0d);
-        count = findLandmarks(e, new String[] { searchName1 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 2
-        e = ls.getLandmarks(null, -90.0d, 0.0d, -180.0d, 0.0d);
-        count = findLandmarks(e, new String[] { searchName2, searchName3 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks 3
-        e = ls.getLandmarks(null, -90.0d, 0.0d, 0.0d, 179.9d);
-        count = findLandmarks(e, new String[] { searchName3, searchName3 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks - find lm2, smallest possible area
-        e = ls.getLandmarks(null, -5.0d, -5.0d, -180.0d, -180.0d);
-        count = findLandmarks(e, new String[] { searchName2 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks - search lon [-180, 0] and [100, 180)
-        e = ls.getLandmarks(null, -90.0d, 90.0d, 100.0d, 0.0d);
-        count = findLandmarks(e, new String[] { searchName1, searchName2,
-                                                searchName3, searchName3
-                                              });
-        assertTrue(count == 4, "Wrong number of landmarks found");
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByArea2() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByArea2()");
-
-        ls = getDefaultLandmarkStore();
-        Landmark lm1 = new Landmark("Landmark1", "description",
-                                    new QualifiedCoordinates(10.0, 20.0, Float.NaN, Float.NaN,
-                                                             Float.NaN), null);
-        ls.addLandmark(lm1, null);
-        ls.addLandmark(new Landmark("Landmark2", null,
-                                    new QualifiedCoordinates(40.0, 30.0, 0, 0, 0), null), null);
-        ls.addLandmark(new Landmark("Landmark3", null,
-                                    new QualifiedCoordinates(30.0, -10.0, 0, 0, 0), null), null);
-        ls.addLandmark(new Landmark("Landmark4", null,
-                                    new QualifiedCoordinates(30.0, 165.0, 0, 0, 0), null), null);
-        ls.addLandmark(new Landmark("Landmark5", null,
-                                    new QualifiedCoordinates(30.0, -165.0, 0, 0, 0), null), null);
-
-        Enumeration e = ls.getLandmarks(null, -30.0, 50.0, 5.0, 25.0);
-        Landmark gotLandmark = findLandmark(e, "Landmark1");
-        checkLandmark(gotLandmark, lm1.getName(), lm1.getDescription(), lm1
-                      .getQualifiedCoordinates(), lm1.getAddressInfo());
-        assertTrue(!e.hasMoreElements(), "Wrong number of landmarks found");
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testGetLandmarksByAreaAndCategory() throws Exception
-    {
-        setCurrentTest("testGetLandmarksByAreaAndCategory()");
-
-        ls = getDefaultLandmarkStore();
-
-        addLandmarksAndCategoriesForSearch();
-
-        // -180 0 180
-        // |---------|- 90 1 = searchName1
-        // | | | 2 = searchName2
-        // | 1 | | 3 = searchName3, searchCategory1
-        // |----+----|- 0 4 = searchName3, searchCategory2
-        // |2 |4 5| 5 = searchName3, searchCategory2
-        // | 3 | |
-        // |---------|- -90
-
-        Enumeration e;
-        int count;
-
-        // Search a category that does not contain any landmarks
-        e = ls.getLandmarks(searchCategory0, -90.0d, 90.0d, -180.0d, 179.9d);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search an area that does not contain any landmarks in the category
-        e = ls.getLandmarks(searchCategory2, -90.0d, 90.0d, -180.0d, 0.0d);
-        assertTrue(e == null, "Expected getLandmarks to return null");
-
-        // Search for landmarks 1
-        e = ls.getLandmarks(searchCategory1, -90.0d, 90.0d, -180.0d, 179.9d);
-        count = findLandmarks(e, new String[] { searchName3 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 2
-        e = ls.getLandmarks(searchCategory2, -90.0d, 0.0d, -180.0d, 179.9d);
-        count = findLandmarks(e, new String[] { searchName3, searchName3 });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        // Search for landmarks 3
-        e = ls.getLandmarks(searchCategory2, -90.0d, 0.0d, 100.0d, 179.9d);
-        count = findLandmarks(e, new String[] { searchName3 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        // Search for landmarks 4 - smallest possible search area
-        e = ls.getLandmarks(searchCategory1, -90.0d, -90.0d, -21.0d, -21.0d);
-        count = findLandmarks(e, new String[] { searchName3 });
-        assertTrue(count == 1, "Wrong number of landmarks found");
-
-        deleteAllLandmarksAndCategories();
-    }
-
-    void testEnumerationDeleteLandmark1() throws Exception
-    {
-        setCurrentTest("testEnumerationDeleteLandmark1()");
-
-        ls = getDefaultLandmarkStore();
-
-        Landmark lm1 = new Landmark("lm1", null, null, null);
-        Landmark lm2 = new Landmark("lm2", null, null, null);
-        Landmark lm3 = new Landmark("lm3", null, null, null);
-
-        ls.addLandmark(lm1, null);
-        ls.addLandmark(lm2, null);
-        ls.addLandmark(lm3, null);
-
-        Enumeration e = ls.getLandmarks();
-        assertTrue(e.hasMoreElements(), "Enumeration is empty");
-        ls.deleteLandmark(lm1);
-        ls.deleteLandmark(lm2);
-
-        // Expect lm1 because hasMoreElements should cache a Landmark
-        int count = findLandmarks(e, new String[] { "lm1", "lm3" });
-        assertTrue(count == 2, "Wrong number of landmarks found");
-
-        ls.deleteLandmark(lm3);
-    }
-
-    void testEnumerationDeleteLandmark2() throws Exception
-    {
-        setCurrentTest("testEnumerationDeleteLandmark2()");
-
-        ls = getDefaultLandmarkStore();
-
-        Landmark lm1 = new Landmark("lm1", null, null, null);
-        Landmark lm2 = new Landmark("lm2", null, null, null);
-        Landmark lm3 = new Landmark("lm3", null, null, null);
-
-        ls.addLandmark(lm1, null);
-        ls.addLandmark(lm2, null);
-        ls.addLandmark(lm3, null);
-
-        Enumeration e = ls.getLandmarks();
-        ls.deleteLandmark(lm1);
-        ls.deleteLandmark(lm2);
-        ls.deleteLandmark(lm3);
-
-        assertTrue(!e.hasMoreElements(), "Wrong number of landmarks found");
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void searchAndMatch(String aPattern, String[] aNames)
-    throws Exception
-    {
-
-        Enumeration e = ls.getLandmarks(null, aPattern);
-        int count = findLandmarks(e, aNames);
-        assertTrue(count == aNames.length, "Wrong number of landmarks found");
-    }
-
-    // Add landmarks for testing getLandmarks
-    private void addLandmarksAndCategoriesForSearch() throws Exception
-    {
-        // -180 0 180
-        // |---------|- 90 1 = searchName1
-        // | | | 2 = searchName2
-        // | 1 | | 3 = searchName3, searchCategory1
-        // |----+----|- 0 4 = searchName3, searchCategory2
-        // |2 |4 5| 5 = searchName3, searchCategory2
-        // | 3 | |
-        // |---------|- -90
-
-        float alt = 0.0f;
-        float hacc = 100.0f;
-        float vacc = 100.0f;
-
-        QualifiedCoordinates qc1 = new QualifiedCoordinates(27.0d, -17.0d, alt,
-                hacc, vacc);
-        QualifiedCoordinates qc2 = new QualifiedCoordinates(-5.0d, -180.0d,
-                alt, hacc, vacc);
-        QualifiedCoordinates qc3 = new QualifiedCoordinates(-90.0d, -21.0d,
-                alt, hacc, vacc);
-        QualifiedCoordinates qc4 = new QualifiedCoordinates(-5.0d, 5.0d, alt,
-                hacc, vacc);
-        QualifiedCoordinates qc5 = new QualifiedCoordinates(-5.0d, 179.0d, alt,
-                hacc, vacc);
-
-        // | Category | Landmarks
-        // |-----------------|--------------------------------------
-        // | null | searchName1, searchName2
-        // | searchCategory1 | searchName3
-        // | searchCategory2 | searchName2, searchName3, searchName3
-
-        // Add categories
-        ls.addCategory(searchCategory1);
-        ls.addCategory(searchCategory2);
-
-        // Add landmarks to default category
-        Landmark lm1 = new Landmark(searchName1, null, qc1, null);
-        Landmark lm2 = new Landmark(searchName2, null, qc2, null);
-        ls.addLandmark(lm1, null);
-        ls.addLandmark(lm2, null);
-
-        // Add landmarks to searchCategory1 (description = category)
-        Landmark lm3 = new Landmark(searchName3, searchCategory1, qc3, null);
-        ls.addLandmark(lm3, searchCategory1);
-
-        // Add landmark to searchCategory2 (description = category)
-        Landmark lm4 = new Landmark(searchName3, searchCategory2, qc4, null);
-        Landmark lm5 = new Landmark(searchName3, searchCategory2, qc5, null);
-        Landmark lm6 = new Landmark(searchName2, searchCategory2, null, null);
-        ls.addLandmark(lm4, searchCategory2);
-        ls.addLandmark(lm5, searchCategory2);
-        ls.addLandmark(lm6, searchCategory2);
-    }
-
-    private LandmarkStore getDefaultLandmarkStore()
-    {
-        LandmarkStore store = LandmarkStore.getInstance(null);
-        assertTrue(store != null, "LandmarkStore is null");
-        return store;
-    }
-
-    private void assertEmptyLandmarkStore() throws Exception
-    {
-        setCurrentTest("assertEmptyLandmarkStore");
-        ls = getDefaultLandmarkStore();
-        Enumeration le = ls.getLandmarks();
-        assertTrue(le == null, "Landmarks exist in LandmarkStore");
-
-        Enumeration ce = ls.getCategories();
-        assertTrue(!ce.hasMoreElements(), "Categories exist in LandmarkStore");
-    }
-
-    private void saveRetrieveDelete(Landmark aLm) throws Exception
-    {
-        String name = aLm.getName();
-        String description = aLm.getDescription();
-        QualifiedCoordinates coords = aLm.getQualifiedCoordinates();
-        AddressInfo address = aLm.getAddressInfo();
-
-        // Get the LandmarkStore
-        ls = LandmarkStore.getInstance(null);
-        assertTrue(ls != null, "LandmarkStore is null");
-
-        // Save the landmark
-        ls.addLandmark(aLm, iCategory);
-
-        // Get all landmarks and search for the one we added
-        Enumeration e = ls.getLandmarks();
-        Landmark fetchedLm = findLandmark(e, name);
-
-        ls.deleteLandmark(aLm);
-        assertTrue(e != null, "No landmarks found in database");
-        checkLandmark(fetchedLm, name, description, coords, address);
-
-        ls.deleteLandmark(aLm); // Try to delete again, should be silently
-        // ignored
-    }
-
-    private Landmark findLandmark(Enumeration e, String aName)
-    {
-        Landmark foundLm = null;
-
-        if (e != null)
-        {
-            // Search for the saved one
-            while (e.hasMoreElements())
-            {
-                Landmark aLandmark = (Landmark) e.nextElement();
-                assertTrue(aLandmark != null, "Enumeration contains a null");
-
-                if (aName.equals(aLandmark.getName()))
-                {
-                    assertTrue(foundLm == null,
-                               "More that one landmark called " + aName);
-                    foundLm = aLandmark;
-                    break;
-                }
-            }
-        }
-
-        return foundLm;
-    }
-
-    // Returns number of Landmarks in the enumeration
-    // Also checks that Landmarks with correct names are found
-    private int findLandmarks(Enumeration e, String[] aNames)
-    {
-        int length = aNames != null ? aNames.length : 0;
-
-        boolean[] found = new boolean[length];
-        int numLandmarks = 0;
-
-        if (e != null)
-        {
-            // Search for the saved one
-            while (e.hasMoreElements())
-            {
-                Landmark aLandmark = (Landmark) e.nextElement();
-                assertTrue(aLandmark != null, "Enumeration contains a null");
-                ++numLandmarks;
-
-                for (int i = 0; i < length; ++i)
-                {
-                    if (aNames[i].equals(aLandmark.getName()))
-                    {
-                        found[i] = true;
-                    }
-                }
-            }
-        }
-
-        for (int i = 0; i < length; ++i)
-        {
-            assertTrue(found[i], "Landmark '" + aNames[i] + "' not found");
-        }
-
-        return numLandmarks;
-    }
-
-    private void findCategory(Enumeration e, String aCategory)
-    {
-        assertTrue(e != null, "Categories enumeration is null");
-        assertTrue(e.hasMoreElements(), "Categories enumeration is empty");
-
-        // Check that both category is present
-        boolean found = false;
-        while (e.hasMoreElements())
-        {
-            String s = (String) e.nextElement();
-            if (aCategory.equals(s))
-            {
-                found = true;
-            }
-        }
-
-        assertTrue(found, "Category " + aCategory + " not found");
-    }
-
-    private void assertEqual(String errorMsg, String dis, String dat)
-    {
-        if (dis == null)
-        {
-            assertTrue(dat == null, errorMsg + ": " + dat + " != null");
-        }
-        else
-        {
-            assertTrue(dis.equals(dat), errorMsg + ": " + dis + " != " + dat);
-        }
-    }
-
-    private void assertBadGetLandmarksByArea(double aMinLat, double aMaxLat,
-            double aMinLon, double aMaxLon) throws Exception
-    {
-        try
-        {
-            Enumeration e = ls.getLandmarks(null, aMinLat, aMinLon, aMaxLat,
-                                            aMaxLon);
-            String args = "getLandmarks(null, " + aMinLat + ", " + aMaxLat
-                          + ", " + aMinLon + ", " + aMaxLon + ")";
-
-            assertTrue(false, "IllegalArgumentException not thrown for " + args);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception was thrown correctly
-            assertTrue(iae.getMessage() == null,
-                       "Message not allowed for exception: " + iae);
-        }
-    }
-
-    private void checkLandmark(Landmark aLm, String aName, String aDescription,
-                               QualifiedCoordinates aCoords, AddressInfo aAddress)
-    {
-
-        assertTrue(aLm != null, "Landmark is null");
-
-        // echo("name = " + aLm.getName() + ", desc = " + aLm.getDescription());
-
-        // Check the values
-        String incorrect = "Wrong value retrieved from LandmarkStore: ";
-        assertEqual(incorrect + "name", aName, aLm.getName());
-        assertEqual(incorrect + "description", aDescription, aLm
-                    .getDescription());
-
-        checkCoordinates(aCoords, aLm.getQualifiedCoordinates());
-        checkAddressInfo(aAddress, aLm.getAddressInfo());
-    }
-
-    private void checkCoordinates(QualifiedCoordinates aCorrectCoords,
-                                  QualifiedCoordinates aThatCoords)
-    {
-        if (aCorrectCoords == null)
-        {
-            assertTrue(aThatCoords == null, "Coordinates should have been null");
-            return;
-        }
-
-        assertTrue(aThatCoords != null,
-                   "Coordinate null when retrieved from LandmarkStore");
-
-        // echo("lat = " + aThatCoords.getLatitude() +
-        // ", lon = " + aThatCoords.getLongitude() +
-        // ", alt = " + aThatCoords.getAltitude() +
-        // ", hacc = " + aThatCoords.getHorizontalAccuracy() +
-        // ", vacc = " + aThatCoords.getVerticalAccuracy());
-
-        assertTrue(aThatCoords.getLatitude() == aCorrectCoords.getLatitude(),
-                   "Latitude incorrect when retrieved from LandmarkStore");
-        assertTrue(aThatCoords.getLongitude() == aCorrectCoords.getLongitude(),
-                   "Longitude incorrect when retrieved from LandmarkStore");
-        assertTrue(isSameFloat(aThatCoords.getAltitude(), aCorrectCoords
-                               .getAltitude()),
-                   "Altitude incorrect when retrieved from LandmarkStore");
-        assertTrue(isSameFloat(aThatCoords.getHorizontalAccuracy(),
-                               aCorrectCoords.getHorizontalAccuracy()),
-                   "HorizontalAccuracy incorrect when retrieved from LandmarkStore");
-        assertTrue(isSameFloat(aThatCoords.getVerticalAccuracy(),
-                               aCorrectCoords.getVerticalAccuracy()),
-                   "VerticalAccuracy incorrect when retrieved from LandmarkStore");
-    }
-
-    private void checkAddressInfo(AddressInfo aCorrectAddress,
-                                  AddressInfo aThatAddress)
-    {
-        if (aCorrectAddress == null)
-        {
-            assertTrue(aThatAddress == null,
-                       "AddressInfo should have been null");
-            return;
-        }
-
-        assertTrue(aThatAddress != null,
-                   "AddressInfo null when retrieved from LandmarkStore");
-
-        // Check that address strings are the same as the input ones
-        for (int i = 1; i <= 17; ++i)
-        {
-            String original = aCorrectAddress.getField(i);
-            String stored = aThatAddress.getField(i);
-            if (original != null)
-            {
-                assertTrue(original.equals(stored), "AddressInfo incorrect ("
-                           + i + "): " + original + " != " + stored);
-            }
-            else
-            {
-                assertTrue(stored == null, "AddressInfo incorrect: (" + i
-                           + "): " + stored + " != null");
-            }
-        }
-    }
-
-    private boolean isSameFloat(float aF1, float aF2)
-    {
-        if (new Float(aF1).equals(new Float(aF2)))
-        {
-            return true;
-        }
-        echo("Floats are different: " + aF1 + " != " + aF2);
-        echo("IntBits1 = " + Float.floatToIntBits(aF1));
-        echo("IntBits2 = " + Float.floatToIntBits(aF2));
-        return false;
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/LandmarkTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +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:
-*
-*/
-import javax.microedition.location.*;
-
-public class LandmarkTest extends ViperUnitTest
-{
-
-    public LandmarkTest()
-    {
-        super("LandmarkTest");
-    }
-
-    protected void runTest() throws java.lang.Throwable
-    {
-        testBadConstructor();
-        testConstructor();
-        testBadSetter();
-        testSetters();
-    }
-
-    void testBadConstructor()
-    {
-        setCurrentTest("testBadConstructor()");
-
-        try
-        {
-            // Trying to create a landmark where name is null
-            Landmark lm = new Landmark(null, null, null, null);
-            assertTrue(false, "No exception thrown for constructor values");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-    }
-
-    void testConstructor()
-    {
-        setCurrentTest("testConstructor()");
-
-        // Create a Landmark object with correct parameters and check that
-        // the values are unchanged when read.
-        String name = "Office";
-        Landmark lm1 = new Landmark(name, null, null, null);
-
-        String description = "Where I work";
-        Landmark lm2 = new Landmark(name, description, null, null);
-
-        float hacc = 50.0f;
-        float vacc = 80.0f;
-        QualifiedCoordinates coords = new QualifiedCoordinates(57.0f, 17.0f,
-                34.0f, hacc, vacc);
-
-        Landmark lm3 = new Landmark(name, null, coords, null);
-        Landmark lm4 = new Landmark(name, description, coords, null);
-
-        AddressInfo address = new AddressInfo();
-
-        Landmark lm5 = new Landmark(name, null, null, address);
-        Landmark lm6 = new Landmark(name, description, null, address);
-        Landmark lm7 = new Landmark(name, null, coords, address);
-
-        Landmark lm = new Landmark(name, description, coords, address);
-
-        // Check the Landmark's values
-        assertTrue(lm.getName() == name && lm.getDescription() == description
-                   && lm.getQualifiedCoordinates() == coords
-                   && lm.getAddressInfo() == address,
-                   "Retrieved Landmark values incorrect");
-
-    }
-
-    void testBadSetter()
-    {
-        setCurrentTest("testBadSetter()");
-        String name = "Office";
-
-        // Create a new unmodified Landmark object
-        Landmark lm = new Landmark(name, null, null, null);
-
-        try
-        {
-            lm.setName(null);
-            assertTrue(false, "No exception thrown for bad argument");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception thrown correctly
-        }
-
-    }
-
-    void testSetters()
-    {
-        setCurrentTest("testSetters()");
-
-        String name = "Office";
-
-        // Create a new unmodified Landmark object
-        Landmark lm = new Landmark(name, null, null, null);
-
-        String newName = "Home";
-        String description = "Where I live";
-        QualifiedCoordinates coords = new QualifiedCoordinates(57.0f, 17.0f,
-                34.0f, 20.0f, 20.0f);
-        AddressInfo address = new AddressInfo();
-
-        lm.setName(newName);
-        lm.setDescription(description);
-        lm.setQualifiedCoordinates(coords);
-        lm.setAddressInfo(address);
-
-        // Check the Landmark's values
-        assertTrue(lm.getName() == newName
-                   && lm.getDescription() == description
-                   && lm.getQualifiedCoordinates() == coords
-                   && lm.getAddressInfo() == address,
-                   "Retrieved Landmark values incorrect");
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/MultipleLandmarkStoresTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,403 +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:
-*
-*/
-import javax.microedition.location.*;
-
-import java.util.*;
-import java.io.IOException;
-
-public class MultipleLandmarkStoresTest extends ViperUnitTest
-{
-    private static final String STORE_NAME = "store1";
-
-    public MultipleLandmarkStoresTest()
-    {
-        super("MultipleLandmarkStoresTest");
-    }
-
-    // These tests assume that you can create/delete LandmarkStores
-    protected void runTest() throws java.lang.Throwable
-    {
-        testGetInstanceDefaultOnly();
-        testListLandmarkStoresOnlyDefault();
-        testCreateLandmarkStoreBadArguments();
-        testDeleteLandmarkStoreBadArguments();
-        testCreateListDeleteLandmarkStore();
-        testCreateLandmarkStoreAlreadyExists();
-        testCreateGetInstanceSameObject();
-        testCaseInsensitivity();
-        testCreateDeleteUse();
-        testAddLandmarkAndCategoryToStore();
-    }
-
-    // Test getInstance when only the default store exists
-    void testGetInstanceDefaultOnly() throws Exception
-    {
-        setCurrentTest("testGetInstanceDefaultOnly()");
-        removeExistingStores();
-
-        LandmarkStore ls = null;
-
-        // Try to get nonexisting store
-        ls = LandmarkStore.getInstance("Apa");
-        assertTrue(ls == null, "Got an instance for nonexisting store1");
-
-        ls = LandmarkStore.getInstance("c:Heppa");
-        assertTrue(ls == null, "Got an instance for nonexisting store");
-
-        ls = LandmarkStore.getInstance("Huppa (d:)");
-        assertTrue(ls == null, "Got an instance for nonexisting store");
-
-        // Get default store
-        ls = LandmarkStore.getInstance(null);
-        assertTrue(ls != null, "Instance was null for default store");
-    }
-
-    void testListLandmarkStoresOnlyDefault() throws Exception
-    {
-        setCurrentTest("testListLandmarkStoresOnlyDefault()");
-
-        // List all landmark stores, should return null
-        String[] stores = LandmarkStore.listLandmarkStores();
-        assertTrue(stores == null, "Landmarkstore found, should have been null");
-    }
-
-    void testCreateLandmarkStoreBadArguments() throws Exception
-    {
-        setCurrentTest("testCreateLandmarkStoreBadArguments()");
-
-        try
-        {
-            // Create with null
-            LandmarkStore.createLandmarkStore(null);
-            assertTrue(false,
-                       "No Exception thrown for createLandmarkStore(null)");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(npe);
-        }
-
-        assertBadCreateStore("file://Helloworld");
-        assertBadCreateStore("c:Heppa");
-        assertBadCreateStore("Heppa (d:)");
-        assertBadCreateStore("x:Heppa");
-        assertBadCreateStore("/Bad \\Name %&#");
-        assertBadCreateStore("..\\Heppa");
-        assertBadCreateStore("../Heppa");
-        assertBadCreateStore("");
-    }
-
-    void testDeleteLandmarkStoreBadArguments() throws Exception
-    {
-        setCurrentTest("testDeleteLandmarkStoreBadArguments()");
-
-        try
-        {
-            // Delete with null
-            LandmarkStore.deleteLandmarkStore(null);
-            assertTrue(false, "No exception thrown for DeleteLandmarkStore()");
-        }
-        catch (NullPointerException npe)
-        {
-            // Exception was thrown correctly
-            assertNoMessage(npe);
-        }
-
-        LandmarkStore.deleteLandmarkStore("Nonexisting"); // Silently fail
-        LandmarkStore.deleteLandmarkStore("x:Nonexisting"); // Silently fail
-        LandmarkStore.deleteLandmarkStore("/Bad \\Name %&#"); // Silently fail
-    }
-
-    void testCreateListDeleteLandmarkStore() throws Exception
-    {
-        setCurrentTest("testCreateListDeleteLandmarkStore()");
-        String name = "store";
-
-        // Create the store
-        LandmarkStore.createLandmarkStore(name);
-
-        // Check that store is returned in list
-        assertTrue(storeExists(name), "Created store not found in list");
-
-        // Delete the store
-        LandmarkStore.deleteLandmarkStore(name);
-        assertTrue(!storeExists(name), "Deleted store found in list");
-    }
-
-    void testCreateLandmarkStoreAlreadyExists() throws Exception
-    {
-        setCurrentTest("testCreateLandmarkStoreAlreadyExists()");
-        String name = "Create me twice";
-
-        // Create the store
-        LandmarkStore.createLandmarkStore(name);
-        assertTrue(storeExists(name), "Created store not found in list");
-
-        // Create again with the same name
-        try
-        {
-            LandmarkStore.createLandmarkStore(name);
-            assertTrue(false, "No exception thrown for createLandmarkStore!");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Exception thrown correctly
-        }
-
-        // Delete the store
-        LandmarkStore.deleteLandmarkStore(name);
-        assertTrue(!storeExists(name), "Deleted store found in list");
-    }
-
-    void testCreateGetInstanceSameObject() throws Exception
-    {
-        setCurrentTest("testCreateGetInstanceSameObject()");
-
-        // Create the store
-        LandmarkStore.createLandmarkStore(STORE_NAME);
-        assertTrue(storeExists(STORE_NAME), "Created store not found in list");
-
-        LandmarkStore ls1 = LandmarkStore.getInstance(STORE_NAME);
-        LandmarkStore ls2 = LandmarkStore.getInstance(STORE_NAME);
-
-        assertTrue(ls1.equals(ls2), "Not the same instance!");
-
-        // Delete the store
-        LandmarkStore.deleteLandmarkStore(STORE_NAME);
-        assertTrue(!storeExists(STORE_NAME), "Deleted store found in list");
-    }
-
-    void testCaseInsensitivity() throws Exception
-    {
-        setCurrentTest("testCaseInsensitivity()");
-        String lowerName1 = "store";
-        String upperName1 = "STORE";
-        String mixedName1 = "sToRe";
-
-        String lowerName2 = "smores";
-        String upperName2 = "SMORES";
-        String mixedName2 = "SmoRES";
-
-        String lowerName3 = "da store";
-        String upperName3 = "DA STORE";
-        String mixedName3 = "dA sToRe";
-
-        // Create
-        LandmarkStore.createLandmarkStore(lowerName1);
-        LandmarkStore.createLandmarkStore(mixedName2);
-        LandmarkStore.createLandmarkStore(upperName3);
-
-        // Open
-        LandmarkStore ls1 = LandmarkStore.getInstance(upperName1);
-        assertTrue(ls1 != null, "Instance was null for store: " + upperName1);
-
-        LandmarkStore ls2 = LandmarkStore.getInstance(lowerName2);
-        assertTrue(ls2 != null, "Instance was null for store: " + lowerName2);
-
-        LandmarkStore ls3 = LandmarkStore.getInstance(mixedName3);
-        assertTrue(ls3 != null, "Instance was null for store: " + mixedName3);
-
-        // Delete
-        LandmarkStore.deleteLandmarkStore(mixedName1);
-        LandmarkStore.deleteLandmarkStore(upperName2);
-        LandmarkStore.deleteLandmarkStore(lowerName3);
-    }
-
-    void testCreateDeleteUse() throws Exception
-    {
-        setCurrentTest("testCreateDeleteUse()");
-
-        // Create LandmarkStore
-        LandmarkStore.createLandmarkStore(STORE_NAME);
-        LandmarkStore ls = LandmarkStore.getInstance(STORE_NAME);
-
-        // Add a Landmark
-        Landmark lm = new Landmark("Hepp", null, null, null);
-        ls.addLandmark(lm, null);
-
-        // Get landmarks enumeration
-        Enumeration eLms = ls.getLandmarks();
-        assertTrue(eLms != null, "getLandmarks returned null");
-
-        // Get categories enumeration
-        Enumeration eCats = ls.getCategories();
-        assertTrue(eCats != null, "getCategories returned null");
-
-        // Delete the store
-        LandmarkStore.deleteLandmarkStore(STORE_NAME);
-
-        // All operations should fail now
-        try
-        {
-            assertTrue(!eLms.hasMoreElements(), "eLms should not have elements");
-            Object o = eLms.nextElement();
-            assertTrue(false, "No Exception thrown for eLms");
-        }
-        catch (NoSuchElementException nsee)
-        {
-            // Exception thrown correctly
-        }
-        catch (Exception e)
-        {
-            assertTrue(false, "Wrong Exception thrown for eLms: " + e);
-        }
-
-        try
-        {
-            assertTrue(!eCats.hasMoreElements(),
-                       "eCats should not have elements");
-            Object o = eCats.nextElement();
-            assertTrue(false, "No Exception thrown for eCats");
-        }
-        catch (NoSuchElementException nsee)
-        {
-            // Exception thrown correctly
-        }
-        catch (Exception e)
-        {
-            assertTrue(false, "Wrong Exception thrown for eCats: " + e);
-        }
-
-        for (int i = 0; i <= 8; ++i)
-        {
-            try
-            {
-                failWithIOException(ls, lm, i);
-                assertTrue(false, "No IOException thrown: " + i);
-            }
-            catch (IOException ioe)
-            {
-                // Exception thrown correctly
-            }
-            catch (Exception e)
-            {
-                assertTrue(false, "Wrong Exception thrown: " + i + ", " + e);
-            }
-        }
-
-        assertTrue(ls.getCategories() == null,
-                   "Expected getCategories to return null");
-    }
-
-    void testAddLandmarkAndCategoryToStore() throws Exception
-    {
-        setCurrentTest("addLandmarkAndCategoryToStore()");
-
-        removeExistingStores();
-
-        LandmarkStore.createLandmarkStore(STORE_NAME);
-        LandmarkStore ls = LandmarkStore.getInstance(STORE_NAME);
-
-        // add category to store
-        String category = "test category";
-        ls.addCategory(category);
-
-        // add Landmark in category to store
-        Landmark landmark = new Landmark("test landmark", "test description",
-                                         new QualifiedCoordinates(80d, 45d, 250f, 20f, 30f), null);
-
-        addLandmarkToStore(ls, landmark, category);
-
-        // delete landmark and category
-        ls.deleteLandmark(landmark);
-        ls.deleteCategory(category);
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertBadCreateStore(String aStoreName) throws Exception
-    {
-        try
-        {
-            LandmarkStore.createLandmarkStore(aStoreName);
-            assertTrue(false, "No exception thrown for createLandmarkStore()");
-        }
-        catch (IllegalArgumentException e)
-        {
-            // Exception was thrown correctly
-        }
-        catch (Exception e)
-        {
-            assertTrue(false,
-                       "Wrong exception thrown for createLandmarkStore(\""
-                       + aStoreName + "\"): " + e);
-        }
-    }
-
-    private boolean storeExists(String aStoreName) throws Exception
-    {
-        String[] stores = LandmarkStore.listLandmarkStores();
-        if (stores == null)
-        {
-            return false;
-        }
-
-        String listName = null;
-        for (int i = 0; i < stores.length; ++i)
-        {
-            assertTrue(stores[i] != null, "Null found in listLandmarkStores");
-            if (aStoreName.equals(stores[i]))
-            {
-                listName = stores[i];
-                break;
-            }
-        }
-
-        return aStoreName.equals(listName);
-    }
-
-    private void failWithIOException(LandmarkStore aLs, Landmark aLm, int aIndex)
-    throws Exception
-    {
-        Enumeration e = null;
-
-        switch (aIndex)
-        {
-        case 0:
-            aLs.addLandmark(aLm, null);
-            break;
-        case 1:
-            e = aLs.getLandmarks(null, null);
-            break;
-        case 2:
-            e = aLs.getLandmarks();
-            break;
-        case 3:
-            e = aLs.getLandmarks(null, -90, 90, -180, 179);
-            break;
-        case 4:
-            aLs.removeLandmarkFromCategory(aLm, "categoryName");
-            break;
-        case 5:
-            aLs.updateLandmark(aLm);
-            break;
-        case 6:
-            aLs.deleteLandmark(aLm);
-            break;
-        case 7:
-            aLs.addCategory("categoryName");
-            break;
-        case 8:
-            aLs.deleteCategory("categoryName");
-            break;
-        default:
-            assertTrue(false, "No test for index: " + aIndex);
-        }
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/PeriodicUpdateTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,391 +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:
-*
-*/
-import javax.microedition.location.*;
-
-class PeriodicUpdateTest extends ViperUnitTest implements LocationListener
-{
-    final static int ONLY_STATUS_INTERVAL = 0;
-
-    final static int DEFAULT_INTERVAL = -1;
-
-    final static int INTERVAL = 10;
-
-    final static int TIMEOUT = 3;
-
-    final static int MAXAGE = 2;
-
-    final static int LARGE_TIMEOUT = 12;
-
-    final static int LARGE_MAXAGE = 11;
-
-    final static int[] badInterval = new int[] { -2, -12345, Integer.MIN_VALUE };
-
-    final static int[] badTimeout = new int[] { 0, -2, -12345,
-            Integer.MIN_VALUE
-                                              };
-
-    final static int[] badMaxAge = badTimeout;
-
-    private Coordinates currentCoords;
-
-    private Location[] iLocations;
-
-    private int iNumUpdates;
-
-    private long[] iLocUpdateCallbackTime;
-
-    PeriodicUpdateTest()
-    {
-        super("PeriodicUpdateTest");
-    }
-
-    protected void runTest() throws Throwable
-    {
-        testBadArguments();
-        testGoodArguments();
-        testLocationListenerDefault();
-        testLocationListenerInterval_1s();
-        testLocationListenerInterval_3s();
-        testLocationListenerInterval_7s();
-        testLocationListenerTimeout();
-        testLocationListenerMaxAge();
-        testChangeListener();
-    }
-
-    private void testBadArguments()
-    {
-        setCurrentTest("testBadArguments()");
-        providerSetUp(null);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        assertBad(INTERVAL, TIMEOUT, LARGE_MAXAGE); // MaxAge > Interval
-        assertBad(INTERVAL, LARGE_TIMEOUT, MAXAGE); // Timeout > Interval
-        assertBad(INTERVAL, LARGE_TIMEOUT, LARGE_MAXAGE);
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            assertBad(badInterval[i], TIMEOUT, MAXAGE);
-        }
-
-        for (int i = 0; i < badTimeout.length; ++i)
-        {
-            assertBad(INTERVAL, badTimeout[i], MAXAGE);
-            assertBad(INTERVAL, badTimeout[i], LARGE_MAXAGE);
-        }
-
-        for (int i = 0; i < badMaxAge.length; ++i)
-        {
-            assertBad(INTERVAL, TIMEOUT, badMaxAge[i]);
-            assertBad(INTERVAL, LARGE_TIMEOUT, badMaxAge[i]);
-        }
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            for (int j = 0; j < badTimeout.length; ++j)
-            {
-                for (int k = 0; k < badMaxAge.length; ++k)
-                {
-                    assertBad(badInterval[i], badTimeout[j], badMaxAge[k]);
-                }
-            }
-        }
-
-    }
-
-    private void testGoodArguments()
-    {
-        setCurrentTest("testGoodArguments()");
-        providerSetUp(null);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        // These arguments should not throw exceptions
-        testGoodWithBad(this, DEFAULT_INTERVAL);
-        testGoodWithBad(this, ONLY_STATUS_INTERVAL);
-
-        testGoodWithBad(null, INTERVAL);
-        testGoodWithBad(null, DEFAULT_INTERVAL);
-        testGoodWithBad(null, ONLY_STATUS_INTERVAL);
-
-        for (int i = 0; i < badInterval.length; ++i)
-        {
-            testGoodWithBad(null, badInterval[i]);
-        }
-
-        int bigValue = Integer.MAX_VALUE / 1000000;
-        assertGood(this, bigValue, bigValue, bigValue);
-
-        assertGood(this, Integer.MAX_VALUE, Integer.MAX_VALUE,
-                   Integer.MAX_VALUE);
-    }
-
-    private void testLocationListenerDefault()
-    {
-        setCurrentTest("testLocationListenerDefault()");
-        final int MAXTIME = 1000 * (TIMETOFIX + 13 + 1); // Interval ~ 6.25
-
-        providerSetUp(null); // Simulation PSY should be default
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        // Start listening for location changes
-        iLP.setLocationListener(this, -1, -1, -1);
-
-        getUpdates(2, MAXTIME);
-
-        checkLocationData(iLocations[0]);
-        checkLocationData(iLocations[1]);
-
-        iLocations = null;
-    }
-
-    private void testLocationListenerInterval_1s()
-    {
-        setCurrentTest("testLocationListenerInterval_1s()");
-
-        testInterval(1, 4);
-    }
-
-    private void testLocationListenerInterval_3s()
-    {
-        setCurrentTest("testLocationListenerInterval_3s()");
-
-        testInterval(3, 5);
-    }
-
-    private void testLocationListenerInterval_7s()
-    {
-        setCurrentTest("testLocationListenerInterval_7s()");
-
-        testInterval(7, 3);
-    }
-
-    private void testLocationListenerTimeout()
-    {
-    }
-
-    private void testLocationListenerMaxAge()
-    {
-    }
-
-    private void testChangeListener()
-    {
-        setCurrentTest("testChangeListener()");
-        providerSetUp(null);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        final int PERIOD1 = 10; // seconds
-        final int PERIOD2 = 7; // seconds
-
-        LocationListener listener = new LocationListener()
-        {
-            public void providerStateChanged(LocationProvider lp, int s)
-            {
-            }
-
-            public void locationUpdated(LocationProvider lp, Location l)
-            {
-            }
-        };
-
-        // Change interval
-        iLP.setLocationListener(this, PERIOD1, -1, -1);
-        int maxtime = 1000 * (2 * PERIOD1 + TIMETOFIX);
-        getUpdates(2, maxtime);
-
-        iLP.setLocationListener(this, PERIOD2, -1, -1);
-        maxtime = 1000 * (2 * PERIOD2 + TIMETOFIX);
-        getUpdates(2, maxtime);
-
-        // Change listener
-        iLP.setLocationListener(listener, -1, -1, -1);
-
-        tearDown();
-    }
-
-    private void tearDown()
-    {
-        // Remove this class as listener
-        try
-        {
-            if (iLP != null)
-            {
-                iLP.setLocationListener(null, -1, -1, -1);
-            }
-        }
-        catch (Exception e)
-        {
-            echo("PeriodicUpdateTest: Could not remove listener!");
-            echo("PeriodicUpdateTest: Exception thrown: " + e);
-        }
-    }
-
-    public void providerStateChanged(LocationProvider l, int event)
-    {
-    }
-
-    public void locationUpdated(LocationProvider l, Location fix)
-    {
-        iLocUpdateCallbackTime[iNumUpdates] = System.currentTimeMillis();
-
-        echo("PeriodicUpdateTest.locationUpdated() called");
-        iLocations[iNumUpdates] = fix;
-        ++iNumUpdates;
-        assertTrue(l != null, "LocationProvider is null");
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertBad(int aInterval, int aTimeout, int aMaxAge)
-    {
-        try
-        {
-            iLP.setLocationListener(this, aInterval, aTimeout, aMaxAge);
-            // Oops, no exception thrown, remove listener
-            iLP.setLocationListener(null, -1, -1, -1);
-            assertTrue(false, "Bad arguments should throw exception: "
-                       + aInterval + "," + aTimeout + "," + aMaxAge);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-            assertNoMessage(iae);
-        }
-        catch (Exception e)
-        {
-            assertTrue(false, "Unknown error: " + e);
-        }
-    }
-
-    private void testGoodWithBad(LocationListener aListener, int aInterval)
-    {
-        assertGood(aListener, aInterval, LARGE_TIMEOUT, LARGE_MAXAGE);
-
-        for (int i = 0; i < badTimeout.length; ++i)
-        {
-            assertGood(aListener, aInterval, badTimeout[i], LARGE_MAXAGE);
-        }
-
-        for (int i = 0; i < badMaxAge.length; ++i)
-        {
-            assertGood(aListener, aInterval, LARGE_TIMEOUT, badMaxAge[i]);
-        }
-
-        for (int j = 0; j < badTimeout.length; ++j)
-        {
-            for (int k = 0; k < badMaxAge.length; ++k)
-            {
-                assertGood(aListener, aInterval, badTimeout[j], badMaxAge[k]);
-            }
-        }
-    }
-
-    private void assertGood(LocationListener aListener, int aInterval,
-                            int aTimeout, int aMaxAge)
-    {
-        try
-        {
-            iLP.setLocationListener(aListener, aInterval, aTimeout, aMaxAge);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setLocationListener(" + aListener + ","
-                       + aInterval + "," + aTimeout + "," + aMaxAge
-                       + ") threw exception:\n" + iae);
-        }
-
-        // remove listener
-        tearDown();
-    }
-
-    private void testInterval(int aInterval, int aNumberOfFixes)
-    {
-        assertTrue(aNumberOfFixes > 0, "Must test with at least one fix!");
-
-        final int TIMETOFIX = 100; // 100 ms
-        final int TIMEOUT = 1000 + 2 * TIMETOFIX;
-        final int MAXTIME = 1000 * (aNumberOfFixes * aInterval) + TIMEOUT;
-
-        Criteria criteria = new Criteria();
-        criteria.setPreferredResponseTime(TIMETOFIX);
-
-        providerSetUp(criteria);
-        assertTrue(iLP != null, "LocationProvider is null");
-
-        // Start listening for location changes
-        iLP.setLocationListener(this, aInterval, -1, -1);
-
-        getUpdates(aNumberOfFixes, MAXTIME);
-
-        checkLocationData(iLocations[0]);
-        // Fixes at interval starts after first fix
-        long startTime = iLocUpdateCallbackTime[0];
-        long lastTimeOfFix = startTime;
-
-        for (int i = 1; i < aNumberOfFixes; ++i)
-        {
-            checkLocationData(iLocations[i]);
-            long timeOfFix = iLocUpdateCallbackTime[i];
-            long timeDiff = timeOfFix - lastTimeOfFix;
-            assertTrue(timeDiff > (aInterval - TIMEOUT) * 1000,
-                       "Period difference is less than allowed for fix" + i + ": "
-                       + timeDiff);
-            assertTrue(timeDiff < (aInterval + TIMEOUT) * 1000,
-                       "Period difference is more than allowed for fix" + i + ": "
-                       + timeDiff);
-            assertTrue((timeOfFix - startTime) < ((i + 1) * aInterval * 1000),
-                       "Timestamp too late for fix" + i);
-            lastTimeOfFix = timeOfFix;
-        }
-
-        iLocations = null;
-    }
-
-    private void getUpdates(int aNumUpdates, int aTimeout)
-    {
-        iLocations = new Location[aNumUpdates];
-        iLocUpdateCallbackTime = new long[aNumUpdates];
-        iNumUpdates = 0;
-
-        // Wait for the first result or timeout
-        boolean timeout = false;
-        long startTime = System.currentTimeMillis();
-        while (iNumUpdates < aNumUpdates)
-        {
-            // Wait a moment before checking things
-            try
-            {
-                Thread.sleep(250);
-            }
-            catch (InterruptedException ie)
-            {
-            }
-
-            // Use a safeguard timeout in case the updating thread hangs
-            // or takes too long
-            if (System.currentTimeMillis() - startTime > aTimeout)
-            {
-                echo("Timeout (updates = " + iNumUpdates + ")");
-                timeout = true;
-                break;
-            }
-        }
-
-        tearDown();
-
-        assertTrue(!timeout, "Got a timeout");
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/QualifiedCoordinatesTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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:
-*
-*/
-import javax.microedition.location.*;
-
-/**
- * This suite of testcases tests that: - Coordinates object can be created and
- * changed - legal parameters are accepted - illegal parameters are not accepted
- */
-public class QualifiedCoordinatesTest extends CoordinatesTest
-{
-    private float iHacc;
-
-    private float iVacc;
-
-    private final static float[] LEGAL_ACC_VALUES = { 0, Float.NaN,
-            Float.MAX_VALUE, Float.MIN_VALUE, Float.POSITIVE_INFINITY,
-                                                    };
-
-    public QualifiedCoordinatesTest()
-    {
-        super("QualifiedCoordinatesTest");
-    }
-
-    protected void runTest() throws Throwable
-    {
-        testGoodArguments();
-        testBadArguments();
-        testArgumentsRange();
-    }
-
-    void testGoodArguments()
-    {
-        setCurrentTest("testGoodArguments()");
-
-        float iHacc = 100.0f;
-        float iVacc = 150.0f;
-
-        super.testGoodArguments();
-
-        double lat = 57.111111d;
-        double lon = 17.111111d;
-        float alt = 31.111111f;
-
-        // Test legal values for hacc
-        for (int i = 0; i < LEGAL_ACC_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, alt, LEGAL_ACC_VALUES[i], iVacc);
-        }
-
-        // Test legal values for vacc
-        for (int i = 0; i < LEGAL_ACC_VALUES.length; ++i)
-        {
-            assertGood(lat, lon, alt, iHacc, LEGAL_ACC_VALUES[i]);
-        }
-    }
-
-    void testBadArguments()
-    {
-        setCurrentTest("testBadArguments()");
-
-        super.testBadArguments();
-    }
-
-    // Tests range of allowed values.
-    void testArgumentsRange()
-    {
-        setCurrentTest("testArgumentsRange()");
-
-        super.testArgumentsRange();
-
-        // Test maximum allowed values
-        double lat = 90.0d;
-        double lon = 179.99999999999d;
-        float alt = Float.POSITIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test minimum allowed values
-        lat = -90.0d;
-        lon = -180.0d;
-        alt = Float.NEGATIVE_INFINITY;
-        assertGood(lat, lon, alt);
-
-        // Test out of range positive values
-        lat = 0;
-        lon = 0;
-        double badLat = 90.0000000000001d;
-        double badLon = 180.0d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-
-        // Test out of range negative values
-        badLat = -90.000000000001d;
-        badLon = -180.00000000001d;
-
-        assertBad(badLat, lon, alt);
-        assertBad(lat, badLon, alt);
-        assertBad(badLat, badLon, alt);
-    }
-
-    // Inherited from CoordinatesTest
-    protected Coordinates newCoordinates()
-    {
-        return new QualifiedCoordinates(iLat, iLon, iAlt, iHacc, iVacc);
-    }
-
-    // Inherited from CoordinatesTest
-    protected Coordinates newZeroCoordinates()
-    {
-        return new QualifiedCoordinates(0, 0, 0, 0, 0);
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    private void assertGood(double aLat, double aLon, float aAlt, float aHacc,
-                            float aVacc)
-    {
-        iHacc = aHacc;
-        iVacc = aVacc;
-        assertGood(aLat, aLon, aAlt);
-
-        QualifiedCoordinates coords = (QualifiedCoordinates) newCoordinates();
-
-        assertTrue(
-            (Float.isNaN(aHacc) ^ coords.getHorizontalAccuracy() == aHacc)
-            && (Float.isNaN(aVacc) ^ coords.getVerticalAccuracy() == aVacc),
-            "Coordinates values not equal to constructor input");
-
-        // Test setters
-        coords = (QualifiedCoordinates) newZeroCoordinates();
-
-        try
-        {
-            coords.setHorizontalAccuracy(aHacc);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setHorizontalAccuracy(" + aHacc + ") failed");
-        }
-
-        try
-        {
-            coords.setVerticalAccuracy(aVacc);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            assertTrue(false, "setVerticalAccuracy(" + aVacc + ") failed");
-        }
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/ViperPreferences.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +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:
-*
-*/
-import javax.microedition.lcdui.*;
-import javax.microedition.location.*;
-
-class ViperPreferences extends Form implements CommandListener
-{
-    int iInterval = -1;
-
-    int iTimeout = 10;
-
-    int iMaxAge = -1;
-
-    int iCoordFormat = 0;
-
-    private Command iOkCmd = new Command("OK", Command.OK, 1);
-
-    private Display iDisplay;
-
-    private Displayable iPreviousScreen;
-
-    private TextField iIntervalField = new TextField("Interval",
-            "" + iInterval, 5, TextField.NUMERIC);
-
-    private TextField iTimeoutField = new TextField("Timeout", "" + iTimeout,
-            5, TextField.NUMERIC);
-
-    private TextField iMaxAgeField = new TextField("Max age", "" + iMaxAge, 5,
-            TextField.NUMERIC);
-
-    // private ChoiceGroup iCoordFormatChoice =
-    // new ChoiceGroup("Coordinate display format",
-    // Choice.POPUP,
-    // new String[] {"DD",
-    // "DD MM",
-    // "DD MM SS"},
-    // null);
-
-    ViperPreferences(Display aDisplay, Displayable aPreviousScreen)
-    {
-        super("Preferences");
-        iDisplay = aDisplay;
-        iPreviousScreen = aPreviousScreen;
-        addCommand(iOkCmd);
-        setCommandListener(this);
-        append(iIntervalField);
-        append(iTimeoutField);
-        append(iMaxAgeField);
-        // append(iCoordFormatChoice);
-    }
-
-    public void commandAction(Command c, Displayable d)
-    {
-        if (c == iOkCmd)
-        {
-            iInterval = Integer.parseInt(iIntervalField.getString());
-            iTimeout = Integer.parseInt(iTimeoutField.getString());
-            iMaxAge = Integer.parseInt(iMaxAgeField.getString());
-            // iCoordFormat = 0;
-            // switch (iCoordFormatChoice.getSelectedIndex())
-            // {
-            // case 1:
-            // iCoordFormat = Coordinates.DD_MM;
-            // break;
-            // case 2:
-            // iCoordFormat = Coordinates.DD_MM_SS;
-            //                break;
-            //            }
-            iDisplay.setCurrent(iPreviousScreen);
-        }
-    }
-}
--- a/javaextensions/location/tsrc/vipertest/src/ViperTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,567 +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:
-*
-*/
-import javax.microedition.midlet.*;
-import javax.microedition.lcdui.*;
-import javax.microedition.location.*;
-import java.util.*;
-
-public class ViperTest extends MIDlet implements CommandListener,
-        LocationListener
-{
-    private Command iExitCmd = new Command("Quit", Command.EXIT, 1);
-
-    private Command iSelectCmd = new Command("Choose Provider", Command.SCREEN,
-            1);
-
-    private Command iGetLocationCmd = new Command("Get location",
-            Command.SCREEN, 1);
-
-    private Command iGetLastKnownLocationCmd = new Command(
-        "Last known location", Command.SCREEN, 1);
-
-    private Command iStartTrackingCmd = new Command("Start tracking",
-            Command.SCREEN, 1);
-
-    private Command iStopTrackingCmd = new Command("Stop tracking",
-            Command.SCREEN, 1);
-
-    private Command iGetStatusCmd = new Command("Get status", Command.SCREEN, 1);
-
-    private Command iRunTestCmd1 = new Command("Run tests", Command.SCREEN, 1);
-
-    private Command iRunTestCmd2 = new Command("Run LP tests", Command.SCREEN,
-            1);
-
-    private Command iPreferencesCmd = new Command("Set preferences",
-            Command.SCREEN, 1);
-
-    private Display iDisplay;
-
-    private Form iForm;
-
-    private ViperPreferences iPrefs;
-
-    private ProviderSelecter iSelecter = new ProviderSelecter();
-
-    private LocationProvider iLocationProvider = null;
-
-    private static int iN = 0;
-
-    private long iLastUpdate;
-
-    private long iLastTimestamp;
-
-    public ViperTest()
-    {
-    }
-
-    protected void destroyApp(boolean unconditional)
-    {
-        System.out.println("ViperTest.destroyApp");
-        iLocationProvider = null;
-        iForm = null;
-        // iPrefs = null;
-        iDisplay = null;
-    }
-
-    protected void pauseApp()
-    {
-        System.out.println("pauseApp");
-        iDisplay.setCurrent(null);
-    }
-
-    protected void startApp()
-    {
-        iForm = new Form("ViperTest");
-        iForm.addCommand(iExitCmd);
-        iForm.addCommand(iRunTestCmd1);
-        iForm.addCommand(iRunTestCmd2);
-        iForm.addCommand(iSelectCmd);
-        iForm.addCommand(iGetLocationCmd);
-        iForm.addCommand(iGetLastKnownLocationCmd);
-        iForm.addCommand(iGetStatusCmd);
-        iForm.addCommand(iStartTrackingCmd);
-        iForm.addCommand(iPreferencesCmd);
-        iForm.append("LAPI version: "
-                     + System.getProperty("microedition.location.version"));
-        iDisplay = Display.getDisplay(this);
-        iDisplay.setCurrent(iForm);
-        iForm.setCommandListener(this);
-        iPrefs = new ViperPreferences(iDisplay, iForm);
-    }
-
-    public void commandAction(Command c, Displayable d)
-    {
-        try
-        {
-            handleCommand(c);
-        }
-        catch (Exception e)
-        {
-            iForm.append("Exception: " + e);
-        }
-    }
-
-    public void locationUpdated(LocationProvider provider, Location location)
-    {
-        if (provider != iLocationProvider)
-        {
-            System.out.println("provider = " + provider);
-            System.out.println("iLocationProvider = " + iLocationProvider);
-        }
-
-        long now = System.currentTimeMillis();
-        long timeDiff = now - iLastUpdate;
-        iLastUpdate = now;
-
-        iForm.deleteAll();
-
-        iForm.append("Tracking #" + (++iN) + "\n");
-        showLocation(location);
-
-        iForm.append("Last update = " + timeDiff + " (ms) ago\n");
-
-        System.out.println("------ locationUpdated #" + iN + " ------");
-        System.out.println("Time of fix: " + time(now));
-        System.out.println("Last update = " + timeDiff + " (ms) ago");
-
-        long ts = location.getTimestamp();
-        System.out.println("Timestamp: " + time(ts));
-        if (location.isValid())
-        {
-            QualifiedCoordinates qc = location.getQualifiedCoordinates();
-            System.out.println("Lat: " + format(qc.getLatitude()) + ", Lon: "
-                               + format(qc.getLongitude()));
-            System.out.println("Timestamp diff = " + (ts - iLastTimestamp)
-                               + " (ms)");
-        }
-        else
-        {
-            System.out.println("Invalid location!");
-        }
-        iLastTimestamp = ts;
-    }
-
-    public void providerStateChanged(LocationProvider provider, int newState)
-    {
-        iForm.deleteAll();
-        iForm.append("State changed\n");
-        showState(newState);
-    }
-
-    private void handleCommand(Command c) throws Exception
-    {
-        iForm.deleteAll();
-
-        if (c == iExitCmd)
-        {
-            notifyDestroyed();
-        }
-        else if (c == iSelectCmd)
-        {
-            System.out.println("Choose a LocationProvider");
-            iDisplay.setCurrent(iSelecter);
-        }
-        else if (c == iPreferencesCmd)
-        {
-            iDisplay.setCurrent(iPrefs);
-        }
-        else if (c == iRunTestCmd1)
-        {
-            iForm.append("Running unit tests\n");
-            Thread t = new Thread()
-            {
-                public void run()
-                {
-                    iForm.append(ViperUnitTest.run1() + "\n");
-                }
-            };
-            t.start();
-        }
-        else if (c == iRunTestCmd2)
-        {
-            iForm.append("Running LocationProvider tests\n");
-            Thread t = new Thread()
-            {
-                public void run()
-                {
-                    iForm.append(ViperUnitTest.run2(iDisplay) + "\n");
-                }
-            };
-            t.start();
-        }
-        else if (c == iGetLastKnownLocationCmd)
-        {
-            iForm.append("Last known location\n");
-            Location loc = LocationProvider.getLastKnownLocation();
-            showLocation(loc);
-        }
-        else
-        {
-
-            if (iLocationProvider == null)
-            {
-                iLocationProvider = LocationProvider.getInstance(null);
-                if (iLocationProvider == null)
-                {
-                    iForm.append("No location provider meets criteria\n");
-                    return;
-                }
-            }
-
-            if (c == iGetStatusCmd)
-            {
-                iForm.append("Get status\n");
-                showState(iLocationProvider.getState());
-            }
-            else if (c == iGetLocationCmd)
-            {
-                iForm.append("Get location\n");
-                Location loc = iLocationProvider.getLocation(iPrefs.iTimeout);
-                showLocation(loc);
-            }
-            else if (c == iStartTrackingCmd)
-            {
-                iForm.append("Start tracking\n");
-                int interval = iPrefs.iInterval;
-                int timeout = iPrefs.iTimeout;
-                int maxage = iPrefs.iMaxAge;
-
-                iLastUpdate = System.currentTimeMillis();
-                iLocationProvider.setLocationListener(this, interval, timeout,
-                                                      maxage);
-                iForm.addCommand(iStopTrackingCmd);
-                iForm.removeCommand(iStartTrackingCmd);
-            }
-            else if (c == iStopTrackingCmd)
-            {
-                iForm.append("Stop tracking\n");
-                iLocationProvider.setLocationListener(null, 0, 0, 0);
-                iForm.addCommand(iStartTrackingCmd);
-                iForm.removeCommand(iStopTrackingCmd);
-            }
-        }
-    }
-
-    private void showLocation(Location loc)
-    {
-        if (loc == null)
-        {
-            iForm.append("Location is null\n");
-            return;
-        }
-        else if (!loc.isValid())
-        {
-            iForm.append("Location is not valid\n");
-            return;
-        }
-
-        QualifiedCoordinates qc = loc.getQualifiedCoordinates();
-
-        iForm.append("Lat = " + format(qc.getLatitude()) + "\n");
-        iForm.append("Lon = " + format(qc.getLongitude()) + "\n");
-        iForm.append("Altitude = " + qc.getAltitude() + "\n");
-        iForm.append("Hacc = " + qc.getHorizontalAccuracy() + ", ");
-        iForm.append("Vacc = " + qc.getVerticalAccuracy() + "\n");
-
-        iForm.append("Speed = " + loc.getSpeed() + ", ");
-        iForm.append("Course = " + loc.getCourse() + "\n");
-        iForm.append("Method = " + lm(loc.getLocationMethod()) + "\n");
-
-        // DateField dateFld = new DateField("Time of fix",
-        // DateField.DATE_TIME);
-        // dateFld.setDate(new Date(loc.getTimestamp()));
-        // iForm.append(dateFld);
-        iForm.append("Timestamp = " + time(loc.getTimestamp()) + "\n");
-
-        AddressInfo addrInfo = loc.getAddressInfo();
-        if (addrInfo != null)
-        {
-            printAddress(addrInfo);
-        }
-
-        String extra = loc.getExtraInfo("application/X-jsr179-location-nmea");
-        if (extra != null)
-        {
-            System.out.println("Extra info:\n" + extra);
-        }
-    }
-
-    private String format(double aCoord)
-    {
-        // if (iPrefs.iCoordFormat > 0) {
-        // return Coordinates.convert(aCoord, iPrefs.iCoordFormat);
-        // } else {
-        return Double.toString(aCoord);
-        // }
-    }
-
-    private String lm(int aMethod)
-    {
-        String s = "";
-        if ((aMethod & Location.MTE_SATELLITE) > 0)
-        {
-            s = "Sat,";
-        }
-        if ((aMethod & Location.MTY_NETWORKBASED) > 0)
-        {
-            s += "Netw";
-        }
-        if ((aMethod & Location.MTY_TERMINALBASED) > 0)
-        {
-            s += "Term";
-        }
-        if ((aMethod & Location.MTA_ASSISTED) > 0)
-        {
-            s += ",assist";
-        }
-        if ((aMethod & Location.MTA_UNASSISTED) > 0)
-        {
-            s += ",unassist";
-        }
-        if ((aMethod & ~(Location.MTE_SATELLITE | Location.MTY_NETWORKBASED
-                         | Location.MTY_TERMINALBASED | Location.MTA_ASSISTED | Location.MTA_UNASSISTED)) > 0)
-        {
-            s = "Illegal";
-        }
-        return s;
-    }
-
-    private String time(long aTimestamp)
-    {
-        Calendar cal = Calendar.getInstance();
-        cal.setTime(new Date(aTimestamp));
-        int h = cal.get(Calendar.HOUR_OF_DAY);
-        int m = cal.get(Calendar.MINUTE);
-        int s = cal.get(Calendar.SECOND);
-        int ms = cal.get(Calendar.MILLISECOND);
-        return (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":"
-               + (s < 10 ? "0" : "") + s + "." + ms;
-    }
-
-    private void showState(int aState)
-    {
-        switch (aState)
-        {
-        case LocationProvider.AVAILABLE:
-            iForm.append("Available");
-            break;
-        case LocationProvider.TEMPORARILY_UNAVAILABLE:
-            iForm.append("Temp. unavailable");
-            break;
-        case LocationProvider.OUT_OF_SERVICE:
-            iForm.append("Out of service");
-            break;
-        default:
-            iForm.append("Unknown state");
-            break;
-        }
-    }
-
-    private void printAddress(AddressInfo a)
-    {
-        System.out.println("--- AddressInfo ---");
-        System.out.println("Floor: " + a.getField(AddressInfo.BUILDING_FLOOR));
-        System.out.println("Room: " + a.getField(AddressInfo.BUILDING_ROOM));
-        System.out.println("B name: " + a.getField(AddressInfo.BUILDING_NAME));
-        System.out.println("B zone: " + a.getField(AddressInfo.BUILDING_ZONE));
-        System.out.println("City: " + a.getField(AddressInfo.CITY));
-        System.out.println("Country: " + a.getField(AddressInfo.COUNTRY));
-        System.out.println("C code: " + a.getField(AddressInfo.COUNTRY_CODE));
-        System.out.println("County: " + a.getField(AddressInfo.COUNTY));
-        System.out.println("Xing1: " + a.getField(AddressInfo.CROSSING1));
-        System.out.println("Xing2: " + a.getField(AddressInfo.CROSSING2));
-        System.out.println("District: " + a.getField(AddressInfo.DISTRICT));
-        System.out.println("Extension: " + a.getField(AddressInfo.EXTENSION));
-        System.out.println("Phone: " + a.getField(AddressInfo.PHONE_NUMBER));
-        System.out.println("P Code: " + a.getField(AddressInfo.POSTAL_CODE));
-        System.out.println("Street: " + a.getField(AddressInfo.STREET));
-        System.out.println("State: " + a.getField(AddressInfo.STATE));
-        System.out.println("URL: " + a.getField(AddressInfo.URL));
-    }
-
-    private class ProviderSelecter extends Form implements CommandListener
-    {
-        private Command iOkCmd = new Command("OK", Command.OK, 1);
-
-        private Command iDefaultCmd = new Command("Null Criteria",
-                Command.SCREEN, 1);
-
-        private Command iNullCmd = new Command("Dereference", Command.SCREEN, 1);
-
-        private Command iGcCmd = new Command("Garbage collect", Command.SCREEN,
-                                             1);
-
-        private TextField iHaccField = new TextField("Horizontal Accuracy",
-                "0", 5, TextField.NUMERIC);
-
-        private TextField iVaccField = new TextField("Vertical Accuracy", "0",
-                5, TextField.NUMERIC);
-
-        private TextField iRespTimeField = new TextField("Response time", "0",
-                5, TextField.NUMERIC);
-
-        private ChoiceGroup iPowerChoice = new ChoiceGroup("Power consumption",
-                Choice.POPUP, new String[] { "No requirement", "Low", "Medium",
-                                             "High"
-                                           }, null);
-
-        private ChoiceGroup iChoices = new ChoiceGroup("Choices",
-                Choice.MULTIPLE, new String[] { "AddressInfo", "Cost allowed",
-                                                "Altitude", "Speed + Course"
-                                              }, null);
-
-        ProviderSelecter()
-        {
-            super("Criteria");
-            addCommand(iOkCmd);
-            addCommand(iDefaultCmd);
-            addCommand(iNullCmd);
-            addCommand(iGcCmd);
-            setCommandListener(this);
-            append(iHaccField);
-            append(iVaccField);
-            append(iRespTimeField);
-            append(iPowerChoice);
-            append(iChoices);
-        }
-
-        public void commandAction(Command c, Displayable d)
-        {
-            if (c == iOkCmd || c == iDefaultCmd)
-            {
-                iForm.deleteAll();
-
-                try
-                {
-                    LocationProvider l;
-                    if (c == iOkCmd)
-                    {
-                        l = LocationProvider.getInstance(getCriteria());
-                    }
-                    else
-                    {
-                        l = LocationProvider.getInstance(null);
-                    }
-                    if (l == null)
-                    {
-                        iForm.append("Criteria too restrictive!\n");
-                    }
-                    else if (l != iLocationProvider)
-                    {
-                        iForm.append("New provider selected\n");
-                        iLocationProvider = l;
-                    }
-                }
-                catch (Exception e)
-                {
-                    iForm.append("Exception: " + e);
-                }
-            }
-            else if (c == iNullCmd)
-            {
-                System.out.println("Setting LocationProvider to null");
-                iLocationProvider = null;
-            }
-            else if (c == iGcCmd)
-            {
-                System.out.println("Calling System.gc()");
-                System.gc();
-            }
-            iDisplay.setCurrent(iForm);
-        }
-
-        private Criteria getCriteria()
-        {
-            Criteria cr = new Criteria();
-            int hacc = Integer.parseInt(iHaccField.getString());
-            cr.setHorizontalAccuracy(hacc);
-
-            int vacc = Integer.parseInt(iVaccField.getString());
-            cr.setVerticalAccuracy(vacc);
-
-            int resp = Integer.parseInt(iRespTimeField.getString());
-            cr.setPreferredResponseTime(resp);
-
-            int power = iPowerChoice.getSelectedIndex();
-            cr.setPreferredPowerConsumption(power);
-
-            boolean[] flags = new boolean[4];
-            int numselected = iChoices.getSelectedFlags(flags);
-            cr.setAddressInfoRequired(flags[0]);
-            cr.setCostAllowed(flags[1]);
-            cr.setAltitudeRequired(flags[2]);
-            cr.setSpeedAndCourseRequired(flags[3]);
-
-            print(cr);
-            return cr;
-        }
-
-        void print(Criteria cr)
-        {
-            System.out.println("\n-- Criterias --");
-            int hacc = cr.getHorizontalAccuracy();
-            if (hacc != Criteria.NO_REQUIREMENT)
-            {
-                System.out.println("Required horizontal accuracy = " + hacc);
-            }
-            int vacc = cr.getVerticalAccuracy();
-            if (vacc != Criteria.NO_REQUIREMENT)
-            {
-                System.out.println("Required vertical accuracy = " + vacc);
-            }
-            int resp = cr.getPreferredResponseTime();
-            if (resp != Criteria.NO_REQUIREMENT)
-            {
-                System.out.println("Preferred response time = " + resp);
-            }
-
-            switch (cr.getPreferredPowerConsumption())
-            {
-            case Criteria.POWER_USAGE_LOW:
-                System.out.println("Low power usage wanted");
-                break;
-            case Criteria.POWER_USAGE_MEDIUM:
-                System.out.println("Medium power usage acceptable");
-                break;
-            case Criteria.POWER_USAGE_HIGH:
-                System.out.println("High power usage acceptable");
-                break;
-            }
-
-            if (cr.isAddressInfoRequired())
-            {
-                System.out.println("AddressInfo required");
-            }
-            if (!cr.isAllowedToCost())
-            {
-                System.out.println("Cost is not allowed");
-            }
-            if (cr.isAltitudeRequired())
-            {
-                System.out.println("Altitude required");
-            }
-            if (cr.isSpeedAndCourseRequired())
-            {
-                System.out.println("Speed and course info required");
-            }
-            System.out.println("---------------");
-        }
-
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertest/src/ViperUnitTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,347 +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:
-*
-*/
-import java.util.Enumeration;
-
-import javax.microedition.location.*;
-import javax.microedition.lcdui.*;
-
-public class ViperUnitTest
-{
-    final static int TIMETOFIX = 5;
-
-    protected LocationProvider iLP = null;
-
-    final protected String iTestSuite;
-
-    protected String iTestName;
-
-    long[] iTimeArray;
-
-    private static Display iDisplay;
-
-    ViperUnitTest()
-    {
-        iTestSuite = "Test (no name)";
-    }
-
-    protected ViperUnitTest(String aTestSuite)
-    {
-        iTestSuite = aTestSuite;
-    }
-
-    static String run1()
-    {
-        ViperUnitTest testRunner = new ViperUnitTest();
-        String title = "Running fast unit tests";
-        ViperUnitTest[] tests = new ViperUnitTest[] { new CoordinatesTest(),
-                new QualifiedCoordinatesTest(), new AddressInfoTest(),
-                new CriteriaTest(), new LandmarkTest(),
-                new LandmarkStoreTest(), new MultipleLandmarkStoresTest(),
-                new ErrorsTest()
-                                                    };
-
-        return testRunner.run(tests, title);
-    }
-
-    static String run2(Display aDisplay)
-    {
-        iDisplay = aDisplay;
-        ViperUnitTest testRunner = new ViperUnitTest();
-        String title = "Running LocationProvider unit tests";
-        ViperUnitTest[] tests = new ViperUnitTest[] { new GetLocationTest(),
-                new PeriodicUpdateTest()
-                                                    };
-
-        return testRunner.run(tests, title);
-    }
-
-    String run(ViperUnitTest[] tests, String title)
-    {
-        echo(title);
-        String result = null;
-        int current = 0;
-        iTimeArray = new long[tests.length];
-        long startTime = System.currentTimeMillis();
-
-        try
-        {
-            for (current = 0; current < tests.length; ++current)
-            {
-                tests[current].runTest();
-                iTimeArray[current] = System.currentTimeMillis();
-            }
-
-            echo("\n-= Time info =-");
-            long testStartTime = startTime;
-            for (int i = 0; i < tests.length; ++i)
-            {
-                long time = iTimeArray[i] - testStartTime;
-                echo(tests[i].iTestSuite + ": " + time + " ms");
-                testStartTime = iTimeArray[i];
-            }
-            echo("---------------");
-            echo("Total = " + (iTimeArray[tests.length - 1] - startTime) + "ms");
-            echo("---------------\n");
-
-            result = "All tests completed successfully";
-        }
-        catch (Throwable t)
-        {
-            echo("\n\n##### TEST FAILED #####\n\n");
-            ViperUnitTest tst = tests[current];
-            result = tst.iTestSuite + "." + tst.iTestName + " failed!\n" + t;
-        }
-        echo(result);
-        return result;
-    }
-
-    protected void runTest() throws Throwable
-    {
-    }
-
-    // ------------------------ Helper methods -----------------------
-
-    // Unit test helper methods
-
-    protected void assertTrue(boolean aCondition, String aErrorMessage)
-    throws Error
-    {
-        if (!aCondition)
-            throw new Error(aErrorMessage);
-    }
-
-    protected void assertFalse(boolean aCondition, String aErrorMessage)
-    throws Error
-    {
-        if (aCondition)
-            throw new Error(aErrorMessage);
-    }
-
-    protected void assertNoMessage(Exception e)
-    {
-        assertTrue(e.getMessage() == null,
-                   "Message not allowed for exception: " + e);
-    }
-
-    protected void setCurrentTest(String aTestName)
-    {
-        iTestName = aTestName;
-        System.out.println("Running: " + aTestName);
-    }
-
-    protected void echo(String aStr)
-    {
-        System.out.println(aStr);
-    }
-
-    protected String diff(String s1, String s2)
-    {
-        if (s1.length() != s2.length())
-        {
-            return "Different length";
-        }
-
-        char[] chs = new char[s1.length()];
-
-        for (int i = 0; i < s1.length(); i++)
-        {
-            if (s1.charAt(i) != s2.charAt(i))
-            {
-                chs[i] = '^';
-            }
-            else
-            {
-                chs[i] = ' ';
-            }
-        }
-
-        return new String(chs);
-    }
-
-    protected void userMessage(String aStr)
-    {
-        if (iDisplay == null)
-        {
-            throw new Error("userMessage: No display set");
-        }
-        Alert a = new Alert(iTestName, aStr, null, AlertType.INFO);
-
-        CommandListener cl = new CommandListener()
-        {
-            public void commandAction(Command c, Displayable d)
-            {
-                synchronized (this)
-                {
-                    notifyAll();
-                }
-            }
-        };
-
-        a.setCommandListener(cl);
-        a.setTimeout(Alert.FOREVER);
-
-        Displayable d = iDisplay.getCurrent();
-        iDisplay.setCurrent(a);
-        try
-        {
-            synchronized (cl)
-            {
-                cl.wait();
-            }
-        }
-        catch (InterruptedException ie)
-        {
-        }
-        iDisplay.setCurrent(d);
-    }
-
-    // Location API specific helper methods
-
-    protected void providerSetUp(Criteria aCriteria)
-    {
-        iLP = null;
-        try
-        {
-            iLP = LocationProvider.getInstance(aCriteria);
-            // if (aCriteria == null) {
-            // echo("Default provider: " + iLP);
-            // } else {
-            // echo("Selected provider: " + iLP);
-            // }
-            if (iLP != null)
-            {
-                int state = iLP.getState();
-                assertTrue(state == LocationProvider.AVAILABLE,
-                           "Initial state=" + state + ", expected AVAILABLE");
-            }
-        }
-        catch (LocationException le)
-        {
-            echo("Could not create location provider: " + le);
-        }
-    }
-
-    protected void checkLocationData(Location aLoc)
-    {
-        assertTrue(aLoc != null, "Location is null");
-        assertTrue(aLoc.isValid(), "Location is invalid");
-        assertTrue(aLoc.getQualifiedCoordinates() != null,
-                   "Location is valid, but Coordinates are null");
-
-        long timestamp = aLoc.getTimestamp();
-        long now = System.currentTimeMillis();
-        assertTrue(now >= timestamp && (now - timestamp < 30000)
-                   && timestamp > 0, "Timestamp incorrect: t=" + timestamp
-                   + ", now=" + now);
-
-        QualifiedCoordinates coords = aLoc.getQualifiedCoordinates();
-        double lat = coords.getLatitude();
-        double lon = coords.getLongitude();
-
-        // echo("Lat: " + lat + " Lon: " + lon);
-
-        assertTrue(lat >= -90.0 || lat <= 90.0, "Latitude out of range");
-        assertTrue(lon >= -180.0 || lon < 180.0, "Longitude out of range");
-
-        float hacc = coords.getHorizontalAccuracy();
-        assertTrue(Float.isNaN(hacc) || hacc >= 0,
-                   "Horizontal accuracy is negative");
-
-        float vacc = coords.getVerticalAccuracy();
-        assertTrue(Float.isNaN(vacc) || vacc >= 0,
-                   "Vertical accuracy is negative");
-
-        float speed = aLoc.getSpeed();
-        assertTrue(Float.isNaN(speed) || speed >= 0, "Speed is negative");
-
-        float course = aLoc.getCourse();
-        assertTrue(Float.isNaN(course) || (course >= 0 && course < 360),
-                   "Course out of range");
-
-        String nmea = aLoc.getExtraInfo("application/X-jsr179-location-nmea");
-        if (nmea != null)
-        {
-            assertTrue(nmea.startsWith("$GP"), "Bad NMEA data");
-            echo("Extra info:\n" + nmea);
-        }
-    }
-
-    protected void addLandmarkToStore(LandmarkStore ls, Landmark landmark,
-                                      String category) throws Exception
-    {
-
-        Enumeration e = ls.getLandmarks();
-        int numLandmarksBefore = 0;
-        if (e != null)
-        {
-            while (e.hasMoreElements())
-            {
-                Object o = e.nextElement();
-                ++numLandmarksBefore;
-            }
-        }
-
-        ls.addLandmark(landmark, category);
-
-        // check that landmark was added
-        e = ls.getLandmarks();
-        assertTrue(e != null, "Landmarks enumeration is null");
-
-        int numLandmarksAfter = 0;
-        while (e.hasMoreElements())
-        {
-            ++numLandmarksAfter;
-            Object o = e.nextElement();
-        }
-
-        assertTrue(numLandmarksAfter - numLandmarksBefore == 1,
-                   "Expected only one landmark to be added");
-    }
-
-    protected void removeExistingStores() throws Exception
-    {
-        String[] stores = LandmarkStore.listLandmarkStores();
-        if (stores != null)
-        {
-            for (int i = 0; i < stores.length; ++i)
-            {
-                LandmarkStore.deleteLandmarkStore(stores[i]);
-            }
-        }
-    }
-
-    protected void deleteAllLandmarksAndCategories() throws Exception
-    {
-        // Delete all the categories and Landmarks from the store
-        LandmarkStore ls = LandmarkStore.getInstance(null);
-        Enumeration c = ls.getCategories();
-        while (c.hasMoreElements())
-        {
-            ls.deleteCategory((String) c.nextElement());
-        }
-
-        Enumeration l = ls.getLandmarks();
-        if (l != null)
-        {
-            while (l.hasMoreElements())
-            {
-                ls.deleteLandmark((Landmark) l.nextElement());
-            }
-        }
-    }
-
-}
--- a/javaextensions/location/tsrc/vipertestpsy/group/bld.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Master bld.inf file for Location API simulation PSY
-*
-*/
-
-
-PRJ_EXPORTS
-../../vipertest/bin/101F7A81.txt            /epoc32/release/winscw/udeb/Z/private/10202be9/101F7A81.txt
-../../vipertest/bin/vipertestsimpsY.sps    /epoc32/release/winscw/udeb/Z/system/data/vipertestsimpsy.sps
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_MMPFILES
-vipertestpsy.mmp
-gnumakefile vipertestpsyext.mak
-
--- a/javaextensions/location/tsrc/vipertestpsy/group/vipertestpsy.mmp	Tue May 11 16:07:20 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: 
-*
-*/
-
-TARGET    vipertestpsy.dll
-TARGETTYPE      PLUGIN
-UID             0x10009D8D 0x13070BF3
-
-VENDORID        VID_DEFAULT
-CAPABILITY      CAP_ECOM_PLUGIN
-
-SOURCEPATH  ../src
-SOURCE    ViperTestPsy.cpp
-
-
-start resource  ../resource/13070BF3.rss
-TARGET          vipertestpsy.rsc
-end
-USERINCLUDE     ../resource
-
-SYSTEMINCLUDE /Epoc32/Include
-SYSTEMINCLUDE   /Epoc32/Include/ECom
-
-LIBRARY     euser.lib
-LIBRARY     lbs.lib
-LIBRARY     epospluginfw.lib
--- a/javaextensions/location/tsrc/vipertestpsy/group/vipertestpsyext.mak	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-# runs after 'abld makefile'
-MAKMAKE:
-#	@echo *** MAKMAKE ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# runs after 'abld library'
-LIB:
-#	@echo *** LIB ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# runs after 'abld resource'
-RESOURCE:
-#	@echo *** RESOURCE ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# runs after 'abld target'
-BLD:
-#	@echo *** BLD ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# runs after 'abld final'
-FINAL:
-	copy /y ..\resource\01010176.txt %EPOCROOT%epoc32\release\${PLATFORM}\${CFG}\z\private\10202BE9
-#	@echo *** FINAL ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# runs after clean operations
-CLEAN:
-	del %EPOCROOT%epoc32\release\${PLATFORM}\${CFG}\z\private\10202BE9\01010176.txt
-#	@echo *** CLEAN ${PLATFORM} ${CFG} ${TO_ROOT}
-
-# End of File
\ No newline at end of file
Binary file javaextensions/location/tsrc/vipertestpsy/resource/01010176.txt has changed
--- a/javaextensions/location/tsrc/vipertestpsy/resource/13070BF3.rss	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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: 
-*
-*/
-//  RESOURCE IDENTIFIER
-//NAME VIPS
-
-//  INCLUDES
-#include <RegistryInfoV2.rh>
-#include "ViperTestPsy.hrh"
-
-//  RESOURCE DEFINITIONS
-
-RESOURCE REGISTRY_INFO r_reginfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x13070BF3;
-    interfaces =
-        {
-        INTERFACE_INFO
-            {
-            interface_uid = 0x101f7a7c;
-            implementations =
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = KPosImplementationUid;
-                    version_no = 1;
-                    display_name = "Viper Test PSY";
-                    default_data = 0;
-                    opaque_data = 0;
-                    rom_only = 0;
-                    }
-                };
-            }
-        };
-    }
-
-// End of File
--- a/javaextensions/location/tsrc/vipertestpsy/resource/ViperTestPsy.hrh	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +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: 
-*
-*/
-
-#define KPosImplementationUid   0x01010176
--- a/javaextensions/location/tsrc/vipertestpsy/src/vipertestpsy.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +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:
-*
-*/
-// INCLUDES
-#include <e32base.h>
-#include <Lbs.h>
-#include <LbsSatellite.h>
-#include <ImplementationProxy.h>
-#include "ViperTestPsy.hrh"
-#include "EPos_CPositioner.h"
-
-// CONSTANTS
-const TReal32 KHorizontalAcc = 40;
-const TReal32 KVerticalAcc = 40;
-
-const TReal64 KLatitude = 2;
-const TReal64 KLongitude = 3;
-const TReal32 KAltitude = 200;
-
-_LIT(KPositionTime, "20801027:161600");//YYYYMMDD:HHMMSS.MMMMMM
-
-const TReal32 KSpeed = 20;
-const TReal32 KHeading = 30;
-const TReal32 KSpeedAcc = 2;
-const TReal32 KHeadingAcc = 3;
-
-const TInt KSatelliteId = 30;
-const TReal32 KAzimuth = 30;
-const TReal32 KElevation = 30;
-const TBool KIsUsed = ETrue;
-const TInt KSignalStrength = 10;
-
-const TReal32 KAzimuthOdd = 35;
-const TReal32 KElevationOdd = 35;
-const TBool KIsUsedOdd = EFalse;
-const TInt KSignalStrengthOdd = 5;
-
-const TUint KNumberOfSatellitesInView = 12;
-const TUint KNumberOfSatellitesUsed = 6;
-_LIT(KSatelliteTime, "20021027:161600");
-const TReal32 KHorizontalDoPValue = 1;
-const TReal32 KVerticalDoPValue = 2;
-const TReal32 KTimeDoPValue = 20;
-_LIT(KModuleName, "ViperTest PSY");
-
-// CLASS DECLARATION
-
-class CViperTestPsy: public CPositioner
-{
-public:
-    // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CViperTestPsy* NewL(TAny* aConstructionParameters);
-
-    /**
-     * Destructor.
-     */
-    ~CViperTestPsy();
-
-protected:
-    // Functions from base classes
-
-    /**
-     * From CPositioner. Requests position info asynchronously.
-     *
-     * @param aPosInfo A reference to a position info object. This object
-     *                 must be in scope until the request has completed.
-     * @param aStatus The request status
-     */
-    void NotifyPositionUpdate(
-        /* IN/OUT */TPositionInfoBase& aPosInfo,
-        /* OUT    */TRequestStatus& aStatus);
-
-    /**
-     * From CPositioner. Cancels position info request.
-     */
-    void CancelNotifyPositionUpdate();
-
-private:
-
-    /**
-     * C++ default constructor.
-     */
-    CViperTestPsy();
-
-    /**
-     * By default EPOC constructor is private.
-     */
-    void ConstructL(TAny* aConstructionParameters);
-
-    void SetTPositionInfo(TPositionInfo& aInfo);
-    void SetTPositionCourseInfo(TPositionCourseInfo& aCourseInfo);
-    void SetTPositionSatelliteInfo(TPositionSatelliteInfo& aSatelliteInfo);
-    void SetHPositionGenericInfo(HPositionGenericInfo& aGenericInfo);
-
-    // By default, prohibit copy constructor
-    CViperTestPsy(const CViperTestPsy&);
-    // Prohibit assigment operator
-    CViperTestPsy& operator=(const CViperTestPsy&);
-
-};
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-const TImplementationProxy KFactoryPtr = IMPLEMENTATION_PROXY_ENTRY(
-            KPosImplementationUid, CViperTestPsy::NewL);
-
-//
-// ---------------------------------------------------------
-// ImplementationGroupProxy
-// Required PSY interface.
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
-    TInt& aTableCount)
-{
-    aTableCount = 1;
-    return &KFactoryPtr;
-}
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CViperTestPsy::CViperTestPsy()
-{
-}
-
-// EPOC default constructor can leave.
-void CViperTestPsy::ConstructL(TAny* aConstructionParameters)
-{
-    BaseConstructL(aConstructionParameters);
-}
-
-// Two-phased constructor.
-CViperTestPsy* CViperTestPsy::NewL(TAny* aConstructionParameters)
-{
-    CViperTestPsy* self = new(ELeave) CViperTestPsy;
-    CleanupStack::PushL(self);
-    self->ConstructL(aConstructionParameters);
-    CleanupStack::Pop();
-    return self;
-}
-
-// Destructor
-CViperTestPsy::~CViperTestPsy()
-{
-}
-
-void CViperTestPsy::NotifyPositionUpdate(TPositionInfoBase& aPosInfo,
-        TRequestStatus& aStatus)
-{
-    TRequestStatus* status = &aStatus;
-
-    TUid implUid =
-        { KPosImplementationUid };
-    aPosInfo.SetModuleId(implUid);
-    TUint32 classType = aPosInfo.PositionClassType();
-
-    if (classType == (classType & EPositionInfoClass))
-    {
-        TPositionInfo* position = static_cast<TPositionInfo*>(&aPosInfo);
-        SetTPositionInfo(*position);
-    }
-    else if (classType & EPositionGenericInfoClass)
-    {
-        HPositionGenericInfo& generic =
-            static_cast<HPositionGenericInfo&>(aPosInfo);
-        SetHPositionGenericInfo(generic);
-    }
-    else
-    {
-        User::RequestComplete(status, KErrGeneral);
-        return;
-    }
-
-    User::RequestComplete(status, KErrNone);
-}
-
-void CViperTestPsy::CancelNotifyPositionUpdate()
-{
-}
-
-void CViperTestPsy::SetTPositionInfo(TPositionInfo& aInfo)
-{
-    TCoordinate coor(KLatitude, KLongitude, KAltitude);
-    TLocality loc(coor, KHorizontalAcc, KVerticalAcc);
-    TTime now;
-    now.UniversalTime();
-    TPosition pos(loc, now);
-    aInfo.SetPosition(pos);
-}
-
-void CViperTestPsy::SetHPositionGenericInfo(HPositionGenericInfo& aGenericInfo)
-{
-    SetTPositionInfo(aGenericInfo);
-    if (aGenericInfo.IsRequestedField(EPositionFieldHorizontalSpeed))
-    {
-        aGenericInfo.SetValue(EPositionFieldHorizontalSpeed, KSpeed);
-    }
-    if (aGenericInfo.IsRequestedField(EPositionFieldHeading))
-    {
-        aGenericInfo.SetValue(EPositionFieldHeading, KHeading);
-    }
-}
-
-//  End of File
--- a/javaextensions/midppush/build/javapushregistry_0x2002DCC9.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/midppush/build/javapushregistry_0x2002DCC9.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -97,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/midppush/pushcontroller/build/javapushcontroller_0x2002DCC8.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/midppush/pushcontroller/build/javapushcontroller_0x2002DCC8.mmp	Tue May 25 12:34:19 2010 +0300
@@ -84,6 +84,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -104,10 +117,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/midppush/pushregistryplugin/build/javacaptain_ext_pushregistryplugin_0x2002DCA2.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/midppush/pushregistryplugin/build/javacaptain_ext_pushregistryplugin_0x2002DCA2.mmp	Tue May 25 12:34:19 2010 +0300
@@ -89,6 +89,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -109,10 +122,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/midprms_db/build/javarms_0x2002DCCB.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/midprms_db/build/javarms_0x2002DCCB.mmp	Tue May 25 12:34:19 2010 +0300
@@ -74,6 +74,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -94,10 +107,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/midprms_db/rmsplugin/build/javacaptain_ext_ondemand_2_0x2002DD01.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/midprms_db/rmsplugin/build/javacaptain_ext_ondemand_2_0x2002DD01.mmp	Tue May 25 12:34:19 2010 +0300
@@ -78,6 +78,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -98,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/mobinfo/build/mobinfo_0x2002DCC3.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/mobinfo/build/mobinfo_0x2002DCC3.mmp	Tue May 25 12:34:19 2010 +0300
@@ -80,6 +80,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -100,10 +113,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/mobinfo/tsrc/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="mobinfotests" basedir="." default="deploy.ut">
-
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-  <property name="build.dir" location="../build"/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="installer.jar.dir" location="${dist}"/>
-  <property name="installer.jar.filename" value="installer.jar"/>
-  <property name="mobinfotests.jar.filename" value="mobinfotests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-<!-- Choose appropriate path depending on the platform -->
-  <target name="init.component.properties">
-      <property name="dist"
-               value="${vm.extension.directory}"/>
-      <echo message="dist = ${dist}"/>  
-      <echo message="java.src.paths = ${java.src.paths}"/>
-  </target>
-
-  <target name="clean" depends="init.properties">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${mobinfotests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${java.src.paths}"/>
-    </javac>
-  </target>
-
-  <target name="deploy.ut" depends="compile.ut">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${mobinfotests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="run" depends="deploy.ut">
-      <echo>Running MobInfo Tests</echo>
-      <exec executable="${java.bin.root}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.properties.mobinfo.TestProperties"/>
-      </exec>
-  </target>
-  <target name="main" depends="clean,run"/>
-
-</project>
--- a/javaextensions/mobinfo/tsrc/build/jiut.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-rem Script for running MobInfo unit tests from S60 eshell
-rem Starting tests
-rem javainstaller test -mainclass=com.nokia.mj.impl.properties.mobinfo.TestProperties
\ No newline at end of file
--- a/javaextensions/mobinfo/tsrc/javasrc/com/nokia/mj/impl/properties/mobinfo/TestProperties.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.properties.mobinfo;
-
-import j2meunit.framework.Test;
-import j2meunit.framework.TestCase;
-import j2meunit.framework.TestMethod;
-import j2meunit.framework.TestSuite;
-
-import com.nokia.mj.impl.installer.utils.InstallerMain;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-
-/**
- * Checks cases related to canRead()
- */
-public class TestProperties extends TestCase implements InstallerMain
-{
-    String path;
-
-    // Begin j2meunit test framework setup
-    public void installerMain(String[] args)
-    {
-        TestSuite suite = new TestSuite(this.getClass().getName());
-
-        suite.addTest(new TestProperties("testProperties", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestProperties) tc).testProperties();
-            }
-        }));
-
-        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
-    }
-
-    public TestProperties()
-    {
-    }
-
-    public TestProperties(String aTestName, TestMethod aTestMethod)
-    {
-        super(aTestName, aTestMethod);
-    }
-
-    public void assertFalse(String aMsg, boolean aCondition)
-    {
-        assertTrue(aMsg, !aCondition);
-    }
-
-    protected void setUp()
-    {
-        //path = TestEnvironment.Main_Test_Folder + "testcanread/";
-    }
-
-    private static final String NETWORK_ACCESS = "com.nokia.network.access";
-    private static final String BATTERY_LEVEL = "com.nokia.batterylevel";
-    private static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
-    private static final String IMEI = "com.nokia.mid.imsi";
-    private static final String IMSI = "com.nokia.mid.imei";
-    private static final String NETWORK_AVAILABILITY = "com.nokia.mid.networkavailability";
-    private static final String NETWORK_ID = "com.nokia.mid.networkid";
-    private static final String NETWORK_SIGNAL = "com.nokia.mid.networksignal";
-    private static final String EMAIL_RECIEVE_SETTINGS = "com.nokia.mid.settings.email-receive-protocol";
-    private static final String EMAIL_SEND_SETTINGS = "com.nokia.mid.settings.email-send-protocol";
-    private static final String CELLID = "com.nokia.mid.cellid";
-    private static final String MSISDN = "com.nokia.mid.msisdn";
-    private static final String DATEFORMAT = "com.nokia.mid.dateformat";
-    private static final String TIMEFORMAT = "com.nokia.mid.timeformat";
-    private static final String NETWORKSTATUS = "com.nokia.mid.networkstatus";
-
-
-    public void testProperties()
-    {
-        try
-        {
-            System.out.println("BATTERY_LEVEL: "+System.getProperty(BATTERY_LEVEL));
-            System.out.println("COUNTRY_CODE: "+System.getProperty(COUNTRY_CODE));
-            System.out.println("IMEI: "+System.getProperty(IMEI));
-            System.out.println("IMSI: "+System.getProperty(IMSI));
-            System.out.println("NETWORK_AVAILABILITY: "+System.getProperty(NETWORK_AVAILABILITY));
-            System.out.println("NETWORK_ID: "+System.getProperty(NETWORK_ID));
-            System.out.println("NETWORK_SIGNAL: "+System.getProperty(NETWORK_SIGNAL));
-            System.out.println("CELLID: "+System.getProperty(CELLID));
-            System.out.println("MSISDN: "+System.getProperty(MSISDN));
-            System.out.println("DATEFORMAT: "+System.getProperty(DATEFORMAT));
-            System.out.println("TIMEFORMAT: "+System.getProperty(TIMEFORMAT));
-            System.out.println("NETWORKSTATUS: "+System.getProperty(NETWORKSTATUS));
-        }
-        catch (Exception e)
-        {
-            assertTrue("Test Properties Failed: "+e, false);
-        }
-    }
-}
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<project name="MobInfoProp" default="jar" basedir=".">
-    <description>Builds, tests, and runs the project .</description>
-    <import file="nbproject/buildimpl.xml"/>
-    <!--
-
-            There exist several targets which are by default empty and which can be
-            used for execution of your tasks. These targets are usually executed
-            before and after some main targets. They are:
-
-            pre-init:                 called before initialization of project properties
-            post-init:                called after initialization of project properties
-            pre-preprocess:           called before text preprocessing of sources
-            post-preprocess:          called after text preprocessing of sources
-            pre-compile:              called before source compilation
-            post-compile:             called after source compilation
-            pre-obfuscate:            called before obfuscation 
-            post-obfuscate:           called after obfuscation
-            pre-preverify:            called before preverification
-            post-preverify:           called after preverification
-            pre-jar:                  called before jar building
-            post-jar:                 called after jar building
-            pre-build:                called before final distribution building
-            post-build:               called after final distribution building
-            pre-clean:                called before cleaning build products
-            post-clean:               called after cleaning build products
-
-            Example of pluging a my-special-task after the compilation could look like
-
-            <target name="post-compile">
-            <my-special-task>
-            <fileset dir="${build.classes.dir}"/>
-            </my-special-task>
-            </target>
-
-            For list of available properties check the imported
-            nbproject/buildimpl.xml file.
-
-            Other way how to customize the build is by overriding existing main targets.
-            The target of interest are:
-
-            preprocess:               preprocessing
-            extract-libs:             extraction of libraries and resources
-            compile:                  compilation
-            create-jad:               construction of jad and jar manifest source
-            obfuscate:                obfuscation
-            preverify:                preverification
-            jar:                      jar archive building
-            run:                      execution
-            debug:                    execution in debug mode
-            build:                    building of the final distribution
-            javadoc:                  javadoc generation
-
-            Example of overriding the target for project execution could look like
-
-            <target name="run" depends="init,jar">
-            <my-special-exec jadfile="${dist.dir}/${dist.jad}"/>
-            </target>
-
-            Be careful about correct dependencies when overriding original target. 
-            Again, for list of available properties which you can use check the target 
-            you are overriding in nbproject/buildimpl.xml file.
-
-            A special target for-all-configs can be used to run some specific targets for
-            all project configurations in a sequence. File nbproject/buildimpl.xml 
-            already contains some "for-all" targets:
-    
-            jar-all
-            javadoc-all
-            clean-all
-      
-            Example of definition of target iterating over all project configurations:
-    
-            <target name="jar-all">
-            <property name="target.to.call" value="jar"/>
-            <antcall target="for-all-configs"/>
-            </target>
-
-            -->
-</project>
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/build/preprocessed/hello/HelloMIDlet.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +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:
-*
-*/
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package hello;
-
-import javax.microedition.midlet.*;
-import javax.microedition.lcdui.*;
-
-/**
- * Class HelloMIDlet tests system properties
- */
-public class HelloMIDlet extends MIDlet implements CommandListener
-{
-
-    private static final String NETWORK_ACCESS = "com.nokia.mid.network.access";
-    private static final String BATTERY_LEVEL = "com.nokia.mid.batterylevel";
-    private static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
-    private static final String IMEI = "com.nokia.mid.imsi";
-    private static final String IMSI = "com.nokia.mid.imei";
-    private static final String NETWORK_AVAILABILITY = "com.nokia.mid.networkavailability";
-    private static final String NETWORK_ID = "com.nokia.mid.networkid";
-    private static final String NETWORK_SIGNAL = "com.nokia.mid.networksignal";
-    private static final String EMAIL_RECIEVE_SETTINGS = "com.nokia.mid.settings.email-receive-protocol";
-    private static final String EMAIL_SEND_SETTINGS = "com.nokia.mid.settings.email-send-protocol";
-    private static final String CELLID = "com.nokia.mid.cellid";
-    private static final String MSISDN = "com.nokia.mid.msisdn";
-    private static final String DATEFORMAT = "com.nokia.mid.dateformat";
-    private static final String TIMEFORMAT = "com.nokia.mid.timeformat";
-    private static final String NETWORKSTATUS = "com.nokia.mid.networkstatus";
-    private boolean midletPaused = false;
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
-    private Command exitCommand;
-    private Form form;
-    //</editor-fold>//GEN-END:|fields|0|
-
-    /**
-     * The HelloMIDlet constructor.
-     */
-    public HelloMIDlet()
-    {
-    }
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
-    //</editor-fold>//GEN-END:|methods|0|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
-    /**
-     * Initilizes the application.
-     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
-     */
-    private void initialize()  //GEN-END:|0-initialize|0|0-preInitialize
-    {
-        // write pre-initialize user code here
-//GEN-LINE:|0-initialize|1|0-postInitialize
-        // write post-initialize user code here
-    }//GEN-BEGIN:|0-initialize|2|
-    //</editor-fold>//GEN-END:|0-initialize|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
-    /**
-     * Performs an action assigned to the Mobile Device - MIDlet Started point.
-     */
-    public void startMIDlet()  //GEN-END:|3-startMIDlet|0|3-preAction
-    {
-        // write pre-action user code here
-        switchDisplayable(null, getForm());//GEN-LINE:|3-startMIDlet|1|3-postAction
-        // write post-action user code here
-    }//GEN-BEGIN:|3-startMIDlet|2|
-    //</editor-fold>//GEN-END:|3-startMIDlet|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
-    /**
-     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
-     */
-    public void resumeMIDlet()  //GEN-END:|4-resumeMIDlet|0|4-preAction
-    {
-        // write pre-action user code here
-//GEN-LINE:|4-resumeMIDlet|1|4-postAction
-        // write post-action user code here
-    }//GEN-BEGIN:|4-resumeMIDlet|2|
-    //</editor-fold>//GEN-END:|4-resumeMIDlet|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
-    /**
-     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
-     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
-     * @param nextDisplayable the Displayable to be set
-     */
-    public void switchDisplayable(Alert alert, Displayable nextDisplayable)  //GEN-END:|5-switchDisplayable|0|5-preSwitch
-    {
-        // write pre-switch user code here
-        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
-        if (alert == null)
-        {
-            display.setCurrent(nextDisplayable);
-        }
-        else
-        {
-            display.setCurrent(alert, nextDisplayable);
-        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
-        // write post-switch user code here
-    }//GEN-BEGIN:|5-switchDisplayable|2|
-    //</editor-fold>//GEN-END:|5-switchDisplayable|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
-    /**
-     * Called by a system to indicated that a command has been invoked on a particular displayable.
-     * @param command the Command that was invoked
-     * @param displayable the Displayable where the command was invoked
-     */
-    public void commandAction(Command command, Displayable displayable)  //GEN-END:|7-commandAction|0|7-preCommandAction
-    {
-        // write pre-action user code here
-        if (displayable == form)  //GEN-BEGIN:|7-commandAction|1|19-preAction
-        {
-            if (command == exitCommand)  //GEN-END:|7-commandAction|1|19-preAction
-            {
-                // write pre-action user code here
-                exitMIDlet();//GEN-LINE:|7-commandAction|2|19-postAction
-                // write post-action user code here
-            }//GEN-BEGIN:|7-commandAction|3|7-postCommandAction
-        }//GEN-END:|7-commandAction|3|7-postCommandAction
-        // write post-action user code here
-    }//GEN-BEGIN:|7-commandAction|4|
-    //</editor-fold>//GEN-END:|7-commandAction|4|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|18-getter|0|18-preInit
-    /**
-     * Returns an initiliazed instance of exitCommand component.
-     * @return the initialized component instance
-     */
-    public Command getExitCommand()
-    {
-        if (exitCommand == null)  //GEN-END:|18-getter|0|18-preInit
-        {
-            // write pre-init user code here
-            exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
-            // write post-init user code here
-        }//GEN-BEGIN:|18-getter|2|
-        return exitCommand;
-    }
-    //</editor-fold>//GEN-END:|18-getter|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: form ">//GEN-BEGIN:|14-getter|0|14-preInit
-    /**
-     * Returns an initiliazed instance of form component.
-     * @return the initialized component instance
-     */
-    public Form getForm()
-    {
-        if (form == null)  //GEN-END:|14-getter|0|14-preInit
-        {
-            // write pre-init user code here
-            form = new Form("MobInfo Properties", new Item[] { });//GEN-BEGIN:|14-getter|1|14-postInit
-            form.addCommand(getExitCommand());
-            form.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
-            // write post-init user code here
-        }//GEN-BEGIN:|14-getter|2|
-        return form;
-    }
-    //</editor-fold>//GEN-END:|14-getter|2|
-
-
-
-    /**
-     * Returns a display instance.
-     * @return the display instance.
-     */
-    public Display getDisplay()
-    {
-        return Display.getDisplay(this);
-    }
-
-    /**
-     * Exits MIDlet.
-     */
-    public void exitMIDlet()
-    {
-        switchDisplayable(null, null);
-        destroyApp(true);
-        notifyDestroyed();
-    }
-
-    /**
-     * Called when MIDlet is started.
-     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
-     */
-    public void startApp()
-    {
-        if (midletPaused)
-        {
-            resumeMIDlet();
-        }
-        else
-        {
-            initialize();
-            startMIDlet();
-        }
-        midletPaused = false;
-        form.append("\n");
-        testProperties();
-    }
-
-    /**
-     * Called when MIDlet is paused.
-     */
-    public void pauseApp()
-    {
-        midletPaused = true;
-    }
-
-    /**
-     * Called to signal the MIDlet to terminate.
-     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
-     */
-    public void destroyApp(boolean unconditional)
-    {
-    }
-
-    public void testProperties()
-    {
-        try
-        {
-            logResult("BATTERY_LEVEL: ",System.getProperty(BATTERY_LEVEL));
-            logResult("COUNTRY_CODE: ",System.getProperty(COUNTRY_CODE));
-            logResult("IMEI: ",System.getProperty(IMEI));
-            logResult("IMSI: ",System.getProperty(IMSI));
-            logResult("NETWORK_AVAILABILITY: ",System.getProperty(NETWORK_AVAILABILITY));
-            logResult("NETWORK_ID: ",System.getProperty(NETWORK_ID));
-            logResult("NETWORK_SIGNAL: ",System.getProperty(NETWORK_SIGNAL));
-            logResult("CELLID: ",System.getProperty(CELLID));
-            logResult("MSISDN: ",System.getProperty(MSISDN));
-            logResult("DATEFORMAT: ",System.getProperty(DATEFORMAT));
-            logResult("TIMEFORMAT: ",System.getProperty(TIMEFORMAT));
-            logResult("NETWORKSTATUS: ",System.getProperty(NETWORKSTATUS));
-        }
-        catch (Exception e)
-        {
-            System.out.println("Test Properties Failed: "+e);
-        }
-    }
-
-    private void logResult(String name, String msg)
-    {
-        form.append(name+"\n");
-        form.append(msg+"\n");
-        System.out.println(name+msg);
-    }
-
-}
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/dist/MobInfoProp.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-MIDlet-1: HelloMIDlet,,hello.HelloMIDlet
-MIDlet-Jar-Size: 3043
-MIDlet-Jar-URL: MobInfoProp.jar
-MIDlet-Name: MobInfoProp
-MIDlet-Vendor: Vendor
-MIDlet-Version: 1.0
-MicroEdition-Configuration: CLDC-1.1
-MicroEdition-Profile: MIDP-2.0
Binary file javaextensions/mobinfo/tsrc/midlet/mobinfoprop/dist/MobInfoProp.jar has changed
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/buildimpl.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
-<project name="MobInfoProp-impl" default="jar" basedir="..">
-    <!--load-properties-->
-    <target name="pre-load-properties">
-        <property file="nbproject/private/private.properties"/>
-        <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
-        <available property="user.properties.file.exists" file="${user.properties.file}"/>
-    </target>
-    <target name="exists.config.active" unless="config.active">
-        <echo level="warning" message="Active configuration (config.active property) is not set - using default."/>
-        <property value="" name="config.active"/>
-    </target>
-    <target name="exists.netbeans.user" unless="netbeans.user">
-        <echo level="warning" message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically."/>
-    </target>
-    <target name="exists.user.properties.file" unless="user.properties.file.exists">
-        <echo level="warning" message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)."/>
-    </target>
-    <target name="load-properties" depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file">
-        <loadproperties srcfile="nbproject/project.properties">
-            <filterchain>
-                <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
-                <concatfilter prepend="nbproject/project.properties"/>
-                <containsregex pattern="^platform.active=|^deployment.method=|^deployment.instance="/>
-            </filterchain>
-        </loadproperties>
-        <property name="deployment.instance" value="default"/>
-        <loadproperties srcfile="${user.properties.file}">
-            <filterchain>
-                <replaceregex pattern="^platforms\.${platform.active}\." replace="platform."/>
-                <replaceregex pattern="^deployment\.${deployment.method}\.scriptfile=" replace="deployment.scriptfile="/>
-                <replaceregex pattern="^deployments\.${deployment.method}\.${deployment.instance}\.([^=]+)=" replace="\1="/>
-            </filterchain>
-        </loadproperties>
-        <loadproperties srcfile="nbproject/project.properties">
-            <filterchain>
-                <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
-                <concatfilter prepend="nbproject/project.properties"/>
-            </filterchain>
-        </loadproperties>
-    </target>
-    <!--basic-init-->
-    <target name="exists.platform.active" unless="platform.active">
-        <echo level="warning" message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)."/>
-    </target>
-    <target name="exists.platform.configuration" unless="platform.configuration">
-        <echo level="warning" message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration."/>
-        <property name="platform.configuration" value="CLDC-1.0"/>
-    </target>
-    <target name="exists.platform.profile" unless="platform.profile">
-        <echo level="warning" message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile."/>
-        <property name="platform.profile" value="MIDP-1.0"/>
-    </target>
-    <target name="basic-init" depends="exists.platform.active,exists.platform.configuration,exists.platform.profile">
-        <fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory.</fail>
-        <fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
-        <fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
-        <fail unless="src.dir">Must set src.dir</fail>
-        <fail unless="build.dir">Must set build.dir</fail>
-        <fail unless="dist.dir">Must set dist.dir</fail>
-        <fail unless="dist.jar">Must set dist.jar</fail>
-        <property name="javac.source" value="1.3"/>
-        <property name="javac.target" value="1.1"/>
-        <property name="javac.encoding" value="${file.encoding}"/>
-        <property name="deployment.number" value="0.0.1"/>
-        <property name="deployment.counter" value="000002"/>
-        <condition property="no.deps">
-            <istrue value="${no.dependencies}"/>
-        </condition>
-        <condition property="no.preprocess">
-            <isfalse value="${use.preprocessor}"/>
-        </condition>
-        <condition property="no.javadoc.preview">
-            <isfalse value="${javadoc.preview}"/>
-        </condition>
-        <condition property="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes},**/*Test.java,**/test,**/test/**">
-            <istrue value="${filter.exclude.tests}"/>
-        </condition>
-        <property name="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes}"/>
-        <condition property="deployment.do.override.jarurl" value="">
-            <istrue value="${deployment.override.jarurl}"/>
-        </condition>
-        <condition property="config.active.name" value="DefaultConfiguration">
-            <length string="${config.active}" trim="true" length="0"/>
-        </condition>
-        <property name="config.active.name" value="${config.active}"/>
-        <taskdef resource="org/netbeans/mobility/antext/defs.properties">
-            <classpath>
-                <pathelement path="${libs.j2me_ant_ext.classpath}"/>
-            </classpath>
-        </taskdef>
-        <condition property="skip.deployment">
-            <equals arg1="${deployment.method}" arg2="NONE" casesensitive="false" trim="true"/>
-        </condition>
-        <condition property="app-version.autoincrement.trigger">
-            <istrue value="${app-version.autoincrement}"/>
-        </condition>
-        <nb-overrideproperty name="buildsystem.baton" value="${src.dir}"/>
-    </target>
-    <!--cldc-init-->
-    <target name="cldc-pre-init">
-        <condition property="cldc-platform.trigger">
-            <equals arg1="CLDC" arg2="${platform.trigger}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="cldc-init" depends="cldc-pre-init" if="cldc-platform.trigger">
-        <property name="preverify.sources.dir" location="${build.dir}/preverifysrc"/>
-        <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
-        <property name="platform.device" value=""/>
-        <property name="dist.jad.url" value="file://"/>
-        <property name="run.cmd.options" value=""/>
-        <condition property="evaluated.run.security.domain" value="">
-            <isfalse value="${run.use.security.domain}"/>
-        </condition>
-        <property name="evaluated.run.security.domain" value="${run.security.domain}"/>
-        <condition property="override.jarurl.trigger">
-            <and>
-                <istrue value="${cldc-platform.trigger}"/>
-                <istrue value="${deployment.override.jarurl}"/>
-            </and>
-        </condition>
-        <property name="deployment.jad" location="${dist.dir}/${dist.jad}"/>
-        <property name="deployment.jar" location="${dist.dir}/${dist.jar}"/>
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="${dist.jad}"/>
-            <include name="${dist.jar}"/>
-        </patternset>
-    </target>
-    <!--cdc-init-->
-    <target name="cdc-init">
-        <condition property="cdc-platform.trigger">
-            <equals arg1="CDC" arg2="${platform.trigger}" casesensitive="false"/>
-        </condition>
-        <available file="${manifest.file}" property="manifest.available"/>
-        <condition property="main.class.applet">
-            <equals arg1="${main.class.class}" arg2="applet" casesensitive="false"/>
-        </condition>
-        <condition property="main.class.xlet">
-            <equals arg1="${main.class.class}" arg2="xlet" casesensitive="false"/>
-        </condition>
-        <condition property="manifest.available+main.class+fat.jar">
-            <and>
-                <isset property="manifest.available"/>
-                <isset property="main.class"/>
-                <istrue value="${platform.fat.jar}"/>
-                <not>
-                    <equals arg1="${main.class}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition property="manifest.available+main.class">
-            <and>
-                <isset property="manifest.available"/>
-                <isset property="main.class"/>
-                <isfalse value="${platform.fat.jar}"/>
-                <not>
-                    <equals arg1="${main.class}" arg2="" trim="true"/>
-                </not>
-            </and>
-        </condition>
-        <condition property="application.version.invalid" value="true">
-            <equals arg1="${deployment.number}" arg2="" trim="true"/>
-        </condition>
-        <fail if="application.version.invalid" message="Property deployment.number must not be empty and must contain version in format %d.%d.%d!"/>
-    </target>
-    <!--ricoh-init-->
-    <target name="ricoh-pre-init" if="cdc-platform.trigger">
-        <condition property="ricoh-platform.trigger">
-            <equals arg1="ricoh" arg2="${platform.type}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="ricoh-init" depends="ricoh-pre-init" if="ricoh-platform.trigger">
-        <available property="jcifs" classname="jcifs.smb.SmbFile" classpath="${libs.RicohAntTools.classpath}"/>
-        <condition property="no.vendor.name" value="true">
-            <equals arg1="${application.vendor}" arg2="" trim="true"/>
-        </condition>
-        <condition property="ricoh.dalp.install.mode" value="auto" else="manual">
-            <istrue value="${ricoh.dalp.install.mode.auto}"/>
-        </condition>
-        <condition property="ricoh.dalp.display-mode.type" value="COLOR" else="MONO">
-            <istrue value="${ricoh.dalp.display-mode.color}"/>
-        </condition>
-        <property name="xml.dir" value="${build.dir}/dalp"/>
-        <property name="xlet.dalp" value="${application.name}.dalp"/>
-        <property name="xlet.dalp.name-only" value="${application.name}.dalp"/>
-        <property name="deploy.dir" value="${dist.dir}/deploy"/>
-        <property name="rideploy.zip" value="${dist.dir}/${application.name}.zip"/>
-        <property name="ricoh.dalp.is-managed" value="true"/>
-        <property name="ricoh.dalp.information.is-icon-used" value="true"/>
-        <property name="ricoh.platform.target.version" value="2.0"/>
-        <property name="ricoh.dalp.version" value="${deployment.number}"/>
-        <property name="ricoh.dalp.application-desc.visible" value="true"/>
-        <property name="ricoh.dalp.install.destination" value="hdd"/>
-        <property name="ricoh.dalp.install.work-dir" value="hdd"/>
-        <property name="ricoh.dalp.information.abbreviation" value="RICOH"/>
-        <taskdef name="taskIf" classname="ricoh.ant.ConditionalTask" classpath="${libs.ricoh-ant-utils.classpath}"/>
-        <taskdef name="dalp" classname="org.netbeans.modules.j2me.cdc.project.ricoh.DalpBuilder" classpath="${libs.ricoh-ant-utils.classpath}"/>
-        <property name="dalp.dist" value="${build.dir}/dalp/${application.name}.dalp"/>
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="${dist.jar}"/>
-            <include name="${application.name}.dalp"/>
-            <include name="lib/*"/>
-        </patternset>
-    </target>
-    <!--semc-init-->
-    <target name="semc-pre-init" if="cdc-platform.trigger">
-        <condition property="semc-platform.trigger">
-            <equals arg1="semc" arg2="${platform.type}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="semc-init" depends="semc-pre-init" if="semc-platform.trigger">
-        <condition property="semc.icon.invalid" value="true">
-            <or>
-                <contains string="${semc.application.icon}" substring="$${"/>
-                <equals arg1="${semc.application.icon}" arg2="" trim="true"/>
-            </or>
-        </condition>
-        <condition property="no.certificateorkey" value="true">
-            <or>
-                <isset property="no.application.uid"/>
-                <equals arg1="${semc.certificate.path}" arg2="" trim="true"/>
-                <contains string="${semc.certificate.path}" substring="$${semc.certificate.path"/>
-                <equals arg1="${semc.private.key.path}" arg2="" trim="true"/>
-                <contains string="${semc.private.key.path}" substring="$${semc.private.key.path"/>
-            </or>
-        </condition>
-        <property name="j9.dist" location="${build.dir}/j9/${semc.application.uid}.j9"/>
-        <taskdef resource="org/netbeans/modules/j2me/cdc/project/defs.properties">
-            <classpath>
-                <pathelement path="${libs.cdc-ant-utils.classpath}"/>
-            </classpath>
-        </taskdef>
-        <taskdef resource="org/netbeans/modules/j2me/cdc/project/semc/defs.properties">
-            <classpath>
-                <pathelement path="${libs.semc-ant-utils.classpath}"/>
-            </classpath>
-        </taskdef>
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="*.sis"/>
-            <include name="*.SIS"/>
-        </patternset>
-    </target>
-    <!--savaje-init-->
-    <target name="savaje-pre-init" if="cdc-platform.trigger">
-        <condition property="savaje-platform.trigger">
-            <equals arg1="savaje" arg2="${platform.type}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="savaje-init" depends="savaje-pre-init" if="savaje-platform.trigger">
-        <property name="savaje.application.uid" value="TBD"/>
-        <condition property="savaje.bundle.base.invalid" value="true">
-            <or>
-                <equals arg1="${savaje.bundle.base}" arg2="" trim="true"/>
-                <contains string="${savaje.bundle.base}" substring="$${savaje.bundle.base"/>
-            </or>
-        </condition>
-        <condition property="savaje.unsupported.main" value="true">
-            <or>
-                <equals arg1="${main.class.applet}" arg2="true"/>
-            </or>
-        </condition>
-        <condition property="savaje.icon.invalid" value="true">
-            <or>
-                <isset property="no.application.uid"/>
-                <contains string="${savaje.application.icon}" substring="$${"/>
-                <equals arg1="${savaje.application.icon}" arg2="" trim="true"/>
-            </or>
-        </condition>
-        <property name="jnlp.dist" value="${build.dir}/jnlp/bundle.jnlp"/>
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="bundle.jnlp"/>
-            <include name="bundle.policy"/>
-            <include name="lib/*"/>
-        </patternset>
-    </target>
-    <!--nokiaS80-init-->
-    <target name="nokiaS80-pre-init" if="cdc-platform.trigger">
-        <condition property="nokiaS80-platform.trigger">
-            <equals arg1="nokiaS80" arg2="${platform.type}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="nokiaS80-init" depends="nokiaS80-pre-init" if="nokiaS80-platform.trigger">
-        <property name="j9.dist" location="${build.dir}/j9/NOKIA.j9"/>
-        <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
-        <condition property="nokia.icon.invalid">
-            <or>
-                <contains string="${nokiaS80.application.icon}" substring="$${"/>
-                <equals arg1="${nokiaS80.application.icon}" arg2="" trim="true"/>
-            </or>
-        </condition>
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="${dist.jar}"/>
-        </patternset>
-    </target>
-    <!--nsicom-init-->
-    <target name="nsicom-pre-init" if="cdc-platform.trigger">
-        <condition property="nsicom-platform.trigger">
-            <equals arg1="nsicom" arg2="${platform.type}" casesensitive="false"/>
-        </condition>
-    </target>
-    <target name="nsicom-init" depends="nsicom-pre-init" if="nsicom-platform.trigger">
-        <property name="deployment.dir" location="${dist.dir}"/>
-        <patternset id="deployment.patternset">
-            <include name="${dist.jar}"/>
-        </patternset>
-    </target>
-    <!--init-->
-    <target name="pre-init"/>
-    <target name="post-init"/>
-    <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,ricoh-init,semc-init,savaje-init,nokiaS80-init,nsicom-init,post-init"/>
-    <!--conditional clean-->
-    <target name="conditional-clean-init">
-        <uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp">
-            <srcfiles dir="nbproject">
-                <include name="project.properties"/>
-                <include name="buildimpl.xml"/>
-            </srcfiles>
-        </uptodate>
-    </target>
-    <target name="conditional-clean" depends="init,conditional-clean-init" unless="no.clean.before.build" description="Clean project in case its meta information has changed.">
-        <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
-    </target>
-    <!--deps-jar-->
-    <target name="deps-jar" depends="conditional-clean" unless="no.deps"/>
-    <!--preprocess-->
-    <target name="pre-preprocess"/>
-    <target name="do-preprocess" unless="no.preprocess">
-        <fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
-        <property name="abilities" value=""/>
-        <property name="debug.level" value="debug"/>
-        <mkdir dir="${preprocessed.dir}"/>
-        <echo message="ignore me" file="${build.dir}/.timestamp"/>
-        <nb-prep destdir="${preprocessed.dir}" preprocessfor="${config.active.name},${abilities},DebugLevel=${debug.level}" encoding="${javac.encoding}">
-            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated}"/>
-        </nb-prep>
-        <copy todir="${preprocessed.dir}">
-            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
-        </copy>
-        <nb-overrideproperty name="buildsystem.baton" value="${preprocessed.dir}"/>
-    </target>
-    <target name="post-preprocess"/>
-    <target name="preprocess" depends="deps-jar,pre-preprocess,do-preprocess,post-preprocess" description="Preprocess project sources."/>
-    <!--compile-->
-    <target name="pre-compile"/>
-    <target name="do-compile">
-        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
-        <mkdir dir="${build.classes.dir}"/>
-        <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" destdir="${build.classes.dir}" srcdir="${buildsystem.baton}" bootclasspath="${platform.bootclasspath}" encoding="${javac.encoding}">
-            <classpath>
-                <path path="${libs.classpath}"/>
-            </classpath>
-        </javac>
-        <copy todir="${build.classes.dir}">
-            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
-        </copy>
-        <nb-overrideproperty name="buildsystem.baton" value="${build.classes.dir}"/>
-    </target>
-    <target name="extract-libs" description="Extracts all bundled libraries.">
-        <mkdir dir="${build.classes.dir}"/>
-        <nb-extract dir="${build.classes.dir}" excludeManifest="true" classpath="${libs.classpath}" excludeclasspath="${extra.classpath}"/>
-    </target>
-    <target name="post-compile"/>
-    <target name="compile" depends="preprocess,pre-compile,extract-libs,do-compile,post-compile" description="Compile project classes."/>
-    <!--compile-single-->
-    <target name="pre-compile-single"/>
-    <target name="do-compile-single">
-        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
-        <mkdir dir="${build.classes.dir}"/>
-        <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" srcdir="${buildsystem.baton}" destdir="${build.classes.dir}" bootclasspath="${platform.bootclasspath}" includes="${javac.includes}" encoding="${javac.encoding}">
-            <classpath>
-                <path path="${libs.classpath}"/>
-            </classpath>
-        </javac>
-    </target>
-    <target name="post-compile-single"/>
-    <target name="compile-single" depends="preprocess,pre-compile-single,do-compile-single,post-compile-single" description="Compile selected project classes."/>
-    <!--proguard-->
-    <target name="proguard-init" description="Up-to-date check before obfuscation.">
-        <property name="obfuscation.level" value="0"/>
-        <condition property="no.obfusc">
-            <or>
-                <equals arg1="${obfuscation.level}" arg2="0"/>
-                <uptodate targetfile="${obfuscator.destjar}">
-                    <srcfiles dir="${buildsystem.baton}"/>
-                </uptodate>
-            </or>
-        </condition>
-        <uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}">
-            <srcfiles dir="${buildsystem.baton}"/>
-        </uptodate>
-    </target>
-    <target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date">
-        <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
-        <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
-    </target>
-    <target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc">
-        <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
-        <fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
-        <fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
-        <property name="obfuscator.classpath" value=""/>
-        <dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/>
-        <dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/>
-        <mkdir dir="${obfuscator.srcjar.dir}"/>
-        <mkdir dir="${obfuscator.destjar.dir}"/>
-        <jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/>
-        <property name="obfuscation.custom" value=""/>
-        <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>
-        <mkdir dir="${obfuscated.classes.dir}"/>
-        <unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/>
-        <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
-    </target>
-    <!--obfuscate-->
-    <target name="pre-obfuscate"/>
-    <target name="post-obfuscate"/>
-    <target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/>
-    <!--preverify-->
-    <target name="pre-preverify"/>
-    <target name="do-preverify" if="cldc-platform.trigger">
-        <fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
-        <mkdir dir="${preverify.sources.dir}"/>
-        <copy todir="${preverify.sources.dir}">
-            <fileset dir="${buildsystem.baton}" includes="**/*.class"/>
-        </copy>
-        <mkdir dir="${preverify.classes.dir}"/>
-        <nb-preverify srcdir="${preverify.sources.dir}" destdir="${preverify.classes.dir}" classpath="${platform.bootclasspath}:${extra.classpath}" configuration="${platform.configuration}" platformhome="${platform.home}" platformtype="${platform.type}" commandline="${platform.preverifycommandline}"/>
-        <copy todir="${preverify.classes.dir}">
-            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
-        </copy>
-        <nb-overrideproperty name="buildsystem.baton" value="${preverify.classes.dir}"/>
-    </target>
-    <target name="post-preverify"/>
-    <target name="preverify" depends="obfuscate,pre-preverify,do-preverify,post-preverify" description="Preverify project classes."/>
-    <!--set-password-->
-    <target name="set-password-init">
-        <property name="sign.enabled" value="false"/>
-        <condition property="skip-sign-keystore-password-input">
-            <or>
-                <isfalse value="${sign.enabled}"/>
-                <and>
-                    <isset property="sign.keystore"/>
-                    <isset property="sign.keystore.password"/>
-                    <not>
-                        <equals arg1="${sign.keystore}" arg2="" trim="true"/>
-                    </not>
-                    <not>
-                        <equals arg1="${sign.keystore.password}" arg2="" trim="true"/>
-                    </not>
-                </and>
-            </or>
-        </condition>
-        <condition property="skip-sign-alias-password-input">
-            <or>
-                <isfalse value="${sign.enabled}"/>
-                <and>
-                    <isset property="sign.keystore"/>
-                    <isset property="sign.alias"/>
-                    <isset property="sign.alias.password"/>
-                    <not>
-                        <equals arg1="${sign.keystore}" arg2="" trim="true"/>
-                    </not>
-                    <not>
-                        <equals arg1="${sign.alias}" arg2="" trim="true"/>
-                    </not>
-                    <not>
-                        <equals arg1="${sign.alias.password}" arg2="" trim="true"/>
-                    </not>
-                </and>
-            </or>
-        </condition>
-    </target>
-    <target name="set-keystore-password" if="netbeans.home" unless="skip-sign-keystore-password-input">
-        <nb-enter-password keystore="${sign.keystore}" passwordproperty="sign.keystore.password"/>
-    </target>
-    <target name="set-alias-password" if="netbeans.home" unless="skip-sign-alias-password-input">
-        <nb-enter-password keystore="${sign.keystore}" keyalias="${sign.alias}" passwordproperty="sign.alias.password"/>
-    </target>
-    <target name="set-password" depends="set-password-init,set-keystore-password,set-alias-password"/>
-    <!--create JAD-->
-    <target name="add-configuration" unless="contains.manifest.configuration">
-        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
-</nb-output>
-        <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
-</nb-output>
-    </target>
-    <target name="add-profile" unless="contains.manifest.profile">
-        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
-</nb-output>
-        <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
-</nb-output>
-    </target>
-    <target name="create-jad" if="cldc-platform.trigger">
-        <fail unless="dist.jad">Must set dist.jad</fail>
-        <mkdir dir="${build.dir}"/>
-        <dirname file="${dist.dir}/${dist.jad}" property="dist.jad.dir"/>
-        <mkdir dir="${dist.jad.dir}"/>
-        <condition property="evaluated.manifest.apipermissions" value="${manifest.apipermissions}">
-            <not>
-                <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
-            </not>
-        </condition>
-        <condition property="evaluated.manifest.pushregistry" value="${manifest.pushregistry}">
-            <not>
-                <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
-            </not>
-        </condition>
-        <condition property="contains.manifest.configuration">
-            <contains substring="MicroEdition-Configuration: " string="${manifest.others}"/>
-        </condition>
-        <condition property="contains.manifest.profile">
-            <contains substring="MicroEdition-Profile: " string="${manifest.others}"/>
-        </condition>
-        <property value="" name="evaluated.manifest.apipermissions"/>
-        <property value="" name="evaluated.manifest.pushregistry"/>
-        <property name="manifest.jad" value=""/>
-        <property name="manifest.manifest" value=""/>
-        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</nb-output>
-        <nb-output file="${manifest.build.file}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</nb-output>
-        <antcall target="add-configuration" inheritall="true" inheritrefs="true"/>
-        <antcall target="add-profile" inheritall="true" inheritrefs="true"/>
-        <property name="manifest.available" value="true"/>
-    </target>
-    <!--do-extra-libs-->
-    <target name="do-extra-libs" if="extra.classpath">
-        <property name="dist.lib.dir" value="${dist.dir}/lib"/>
-        <mkdir dir="${dist.lib.dir}"/>
-        <copypath destdir="${dist.lib.dir}" path="${extra.classpath}">
-            <flattenmapper/>
-        </copypath>
-    </target>
-    <!--nokiaS80-manifest-->
-    <target name="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger">
-        <fail message="Main class is not set!">
-            <condition>
-                <equals arg1="${main.class}" arg2="" trim="true"/>
-            </condition>
-        </fail>
-        <mkdir dir="${build.dir}/j9"/>
-        <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
-        <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
-        <copy file="${manifest.file}" tofile="${manifest.build.file}" failonerror="false"/>
-        <property name="manifest.available" value="true"/>
-        <loadfile property="nokia.manifest.j9" srcFile="${j9.dist}"/>
-    </target>
-    <target name="nokiaS80-prepare-manifest" depends="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger" unless="nokia.icon.invalid">
-        <pathconvert property="logo.icon.name" pathsep=" ">
-            <path path="${nokiaS80.application.icon}"/>
-            <chainedmapper>
-                <flattenmapper/>
-                <globmapper from="*" to="*"/>
-            </chainedmapper>
-        </pathconvert>
-        <copy file="${nokiaS80.application.icon}" todir="${buildsystem.baton}"/>
-        <manifest file="${manifest.build.file}" mode="update">
-            <attribute name="Main-Class" value="${main.class}"/>
-            <attribute name="PproApp-Name" value="${application.name}"/>
-            <attribute name="PproApp-Vendor" value="${application.vendor}"/>
-            <attribute name="PproApp-Version" value="${deployment.number}"/>
-            <attribute name="PproApp-Icon" value="${logo.icon.name}"/>
-            <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
-        </manifest>
-    </target>
-    <target name="nokiaS80-prepare-manifest-no-icon" depends="nokiaS80-prepare-j9" if="nokia.icon.invalid">
-        <manifest file="${manifest.build.file}" mode="update">
-            <attribute name="Main-Class" value="${main.class}"/>
-            <attribute name="PproApp-Name" value="${application.name}"/>
-            <attribute name="PproApp-Vendor" value="${application.vendor}"/>
-            <attribute name="PproApp-Version" value="${deployment.number}"/>
-            <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
-        </manifest>
-    </target>
-    <target name="nokiaS80-create-manifest" depends="nokiaS80-prepare-j9,nokiaS80-prepare-manifest,nokiaS80-prepare-manifest-no-icon" if="nokiaS80-platform.trigger"/>
-    <!--semc-build-j9-->
-    <target name="semc-build-j9" if="semc-platform.trigger">
-        <epocpathsetter home="${platform.home}"/>
-        <property name="semc.application.caps" value=""/>
-        <mkdir dir="${platform.home}/epoc32/winscw/c/private/${semc.application.uid}"/>
-        <mkdir dir="${build.dir}/j9"/>
-        <fail message="Main class is not set!">
-            <condition>
-                <equals arg1="${main.class}" arg2="" trim="true"/>
-            </condition>
-        </fail>
-        <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
-    </target>
-    <!--do-jar-->
-    <target name="do-jar" if="manifest.available">
-        <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <property name="manifest.build.file" location="${manifest.file}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}" manifest="${manifest.build.file}" manifestencoding="UTF-8">
-            <fileset dir="${buildsystem.baton}"/>
-        </jar>
-    </target>
-    <!--nsicom-create-manifest-->
-    <target name="nsicom-create-manifest" if="nsicom-platform.trigger">
-        <jar jarfile="${dist.dir}/${dist.jar}" compress="${jar.compress}" update="true">
-            <manifest>
-                <attribute name="Main-Class" value="${main.class}"/>
-            </manifest>
-        </jar>
-    </target>
-    <!--do-jar-no-manifest-->
-    <target name="do-jar-no-manifest" unless="manifest.available">
-        <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
-        <mkdir dir="${dist.jar.dir}"/>
-        <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}">
-            <fileset dir="${buildsystem.baton}"/>
-        </jar>
-    </target>
-    <!--update-jad-->
-    <target name="update-jad" if="cldc-platform.trigger">
-        <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${dist.jar}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
-    </target>
-    <!--ricoh-init-dalp-->
-    <target name="ricoh-init-dalp" if="ricoh-platform.trigger">
-        <property name="ricoh.application.telephone" value=""/>
-        <property name="ricoh.application.fax" value=""/>
-        <property name="ricoh.application.email" value=""/>
-        <condition property="no.unmanaged.dalp">
-            <and>
-                <isfalse value="${ricoh.dalp.is-managed}"/>
-                <not>
-                    <available file="./${application.name}.dalp"/>
-                </not>
-            </and>
-        </condition>
-        <fail if="no.unmanaged.dalp" message="Dalp file ${application.name}.dalp is required in project directory when DALP management is set to off."/>
-        <condition property="no.vendor.name" value="true">
-            <equals arg1="${application.vendor}" arg2="" trim="true"/>
-        </condition>
-        <condition property="ricoh.icon.invalid" value="true">
-            <or>
-                <contains string="${ricoh.application.icon}" substring="$${"/>
-                <equals arg1="${ricoh.application.icon}" arg2="" trim="true"/>
-            </or>
-        </condition>
-        <mkdir dir="${dist.dir}/lib"/>
-    </target>
-    <!--ricoh-add-app-icon-->
-    <target name="ricoh-add-app-icon" depends="ricoh-init-dalp" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
-        <pathconvert property="icon.name" pathsep=" ">
-            <path path="${ricoh.application.icon}"/>
-            <chainedmapper>
-                <flattenmapper/>
-                <globmapper from="*" to="*"/>
-            </chainedmapper>
-        </pathconvert>
-        <jar jarfile="${dist.jar}" compress="${jar.compress}" update="true">
-            <fileset file="${ricoh.application.icon}"/>
-        </jar>
-    </target>
-    <!--ricoh-build-dalp-with-icon-->
-    <target name="ricoh-build-dalp-with-icon" depends="ricoh-add-app-icon" if="ricoh-platform.trigger" unless="ricoh.icon.invalid">
-        <mkdir dir="${build.dir}/dalp/"/>
-        <taskIf if="ricoh.dalp.is-managed" value="true">
-            <dalp file="${dalp.dist}" iconname="${icon.name}">
-                <fileset dir="${dist.dir}/lib"/>
-            </dalp>
-            <echo message="Managed dalp file ${dalp.dist} created w/ icon"/>
-        </taskIf>
-        <taskIf if="ricoh.dalp.is-managed" value="false">
-            <copy tofile="${dalp.dist}">
-                <fileset file="./${application.name}.dalp"/>
-            </copy>
-            <echo message="Non-managed dalp file ${dalp.dist} w/ icon imported"/>
-        </taskIf>
-    </target>
-    <!--ricoh-build-dalp-without-icon-->
-    <target name="ricoh-build-dalp-without-icon" if="ricoh.icon.invalid">
-        <mkdir dir="${build.dir}/dalp/"/>
-        <taskIf if="ricoh.dalp.is-managed" value="true">
-            <dalp file="${dalp.dist}">
-                <fileset dir="${dist.dir}/lib"/>
-            </dalp>
-            <echo message="Managed dalp file ${dalp.dist} created w/o icon"/>
-        </taskIf>
-        <taskIf if="ricoh.dalp.is-managed" value="false">
-            <copy tofile="${dalp.dist}">
-                <fileset file="./${application.name}.dalp"/>
-            </copy>
-            <echo message="Non-managed dalp file ${dalp.dist} w/o icon imported"/>
-        </taskIf>
-    </target>
-    <target name="ricoh-build-dalp" depends="ricoh-build-dalp-with-icon,ricoh-build-dalp-without-icon" if="ricoh-platform.trigger">
-        <copy todir="${dist.dir}" file="${dalp.dist}" overwrite="true"/>
-    </target>
-    <!--savaje-build-jnlp-->
-    <target name="savaje-prepare-icon" if="savaje-platform.trigger" unless="savaje.icon.invalid">
-        <pathconvert property="savaje.application.icon.name" pathsep=" ">
-            <path path="${savaje.application.icon}"/>
-            <chainedmapper>
-                <flattenmapper/>
-                <globmapper from="*" to="*"/>
-            </chainedmapper>
-        </pathconvert>
-        <mkdir dir="${dist.dir}/lib"/>
-        <copy tofile="${dist.dir}/lib/${savaje.application.icon.name}" file="${savaje.application.icon}" overwrite="true" failonerror="false"/>
-    </target>
-    <target name="savaje-build-jnlp" depends="savaje-prepare-icon" if="savaje-platform.trigger">
-        <mkdir dir="${build.dir}/jnlp/"/>
-        <taskdef resource="org/netbeans/modules/j2me/cdc/project/savaje/defs.properties">
-            <classpath>
-                <pathelement path="${libs.savaje-ant-utils.classpath}"/>
-            </classpath>
-        </taskdef>
-        <jnlp dir="${build.dir}/jnlp/" file="bundle.jnlp" codebase="WTK_AGUI" distjar="lib/${dist.jar.name}" applicationicon="lib/${savaje.application.icon.name}" smallicon="${savaje.application.icon.small}" focusedicon="${savaje.application.icon.focused}" applicationtitle="${application.name}" applicationvendor="${application.vendor}" applicationDescription="${application.description}" applicationArgs="${application.args}" mainClass="${main.class}" debug="${savaje.bundle.debug}" debugport="${savaje.bundle.debug.port}">
-            <fileset dir="${dist.dir}/lib"/>
-        </jnlp>
-        <policy file="${build.dir}/jnlp/bundle.policy" codebase="WTK_AGUI"/>
-        <copy tofile="${dist.dir}/lib/classes.jar" file="${dist.dir}/${dist.jar}" overwrite="true"/>
-        <copy todir="${dist.dir}" file="${build.dir}/jnlp/bundle.jnlp" overwrite="true"/>
-        <copy tofile="${dist.dir}/bundle.policy" file="${build.dir}/jnlp/bundle.policy" overwrite="true"/>
-        <copy todir="${dist.dir}/lib" overwrite="true" failonerror="false">
-            <fileset dir="${resources.dir}"/>
-        </copy>
-    </target>
-    <!--jar-->
-    <target name="pre-jar"/>
-    <target name="post-jar"/>
-    <target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,semc-build-j9,do-jar,nsicom-create-manifest,do-jar-no-manifest,update-jad,ricoh-build-dalp,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/>
-    <!--override-jad-->
-    <target name="override-jad" if="override.jarurl.trigger">
-        <property name="deployment.jarurl" value="${dist.jar}"/>
-        <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${deployment.jarurl}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
-    </target>
-    <!--semc-make-sis-->
-    <target name="semc-ppro-arm" if="semc-platform.trigger" description="Builds neccessary files for semc device">
-        <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
-            <arg value="arm"/>
-            <arg value="${application.name}"/>
-            <arg value="${semc.application.uid}"/>
-            <arg value="${j9.dist}"/>
-            <arg value="${semc.application.caps}"/>
-            <env key="SDKDRIVE" value="${sdkdrive}"/>
-            <env key="EPOCROOT" value="${epocroot}"/>
-            <env key="Path" value="${epocpath}"/>
-        </exec>
-    </target>
-    <target name="semc-make-sis-icon" if="semc-platform.trigger" unless="semc.icon.invalid">
-        <copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}/${semc.application.uid}.mbm" failonerror="false"/>
-    </target>
-    <target name="semc-make-sis" depends="semc-ppro-arm,semc-make-sis-icon" if="semc-platform.trigger" unless="no.application.uid" description="Builds SIS file for device">
-        <property name="dll.dir" location="dll"/>
-        <mkdir dir="${dll.dir}"/>
-        <copy todir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-        </copy>
-        <copy todir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-            <fileset dir="${dll.dir}">
-                <include name="**/*.dll"/>
-            </fileset>
-        </copy>
-        <pkgmake workdir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}" id="${semc.application.uid}" appname="${application.name}" appicon="${semc.application.uid}.mbm" vendor="${application.vendor}" version="${deployment.number}" logo="${logo.image}" logoinstallonly="${logo.image.installonly}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-            <fileset dir="${dll.dir}">
-                <include name="**/*.dll"/>
-            </fileset>
-        </pkgmake>
-        <exec executable="${platform.home}/epoc32/tools/makesis" dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-            <arg value="-d${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
-            <arg value="PProLauncher${semc.application.uid}.pkg"/>
-            <arg value="SYMBIAN.sis"/>
-            <env key="SDKDRIVE" value="${sdkdrive}"/>
-            <env key="EPOCROOT" value="${epocroot}"/>
-            <env key="Path" value="${epocpath}"/>
-        </exec>
-        <copy todir="${dist.dir}">
-            <fileset dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-                <include name="**/*.SIS"/>
-                <include name="**/*.sis"/>
-            </fileset>
-        </copy>
-    </target>
-    <target name="semc-sign-sis" if="semc-platform.trigger" depends="semc-make-sis" unless="no.certificateorkey" description="Sign SIS file">
-        <exec executable="${platform.home}/epoc32/tools/signsis" dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-            <arg value="-s"/>
-            <arg value="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}/SYMBIAN.sis"/>
-            <arg value="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}/SYMBIAN-SIGNED.sis"/>
-            <arg value="${semc.certificate.path}"/>
-            <arg value="${semc.private.key.path}"/>
-            <arg value="${semc.private.key.password}"/>
-            <env key="SDKDRIVE" value="${sdkdrive}"/>
-            <env key="EPOCROOT" value="${epocroot}"/>
-            <env key="Path" value="${epocpath}"/>
-        </exec>
-        <copy todir="${dist.dir}">
-            <fileset dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}">
-                <include name="**/*.SIS"/>
-                <include name="**/*.sis"/>
-            </fileset>
-        </copy>
-    </target>
-    <target name="semc-no-sign-sis" depends="semc-make-sis" if="no.certificateorkey" unless="no.application.uid" description="Prints out only info when SIS is not signed ">
-        <echo message="Signed SIS was not created! Set up path to certificate and private key in project properties!"/>
-    </target>
-    <target name="semc-sis" if="semc-platform.trigger" depends="semc-sign-sis,semc-no-sign-sis" unless="no.application.uid"/>
-    <!--increment-app-version-->
-    <target name="increment-app-version" if="app-version.autoincrement.trigger">
-        <propertyfile file="nbproject/private/private.properties">
-            <entry key="deployment.counter" type="int" operation="+" default="2" pattern="0"/>
-            <entry key="deployment.number" value="000000${deployment.counter}"/>
-        </propertyfile>
-        <property name="deployment.number.pattern" value="\2\3.\5\6.\8\9"/>
-        <replaceregexp byline="true" file="nbproject/private/private.properties" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" replace="deployment.number=${deployment.number.pattern}"/>
-    </target>
-    <!--build-->
-    <target name="pre-build"/>
-    <target name="post-build"/>
-    <target name="build" depends="jar,pre-build,override-jad,semc-sis,increment-app-version,post-build" description="Builds final distribution of the application."/>
-    <!--cldc-run-->
-    <target name="cldc-run" if="cldc-platform.trigger">
-        <nb-run jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" jadurl="${dist.jad.url}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.runcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
-    </target>
-    <!--ricoh-run-->
-    <target name="ricoh-run" if="ricoh-platform.trigger">
-        <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
-            <fileset dir="${dist.dir}">
-                <patternset refid="deployment.patternset"/>
-            </fileset>
-            <flattenmapper/>
-        </copy>
-        <ant antfile="${platform.home}/startemulator.xml" target="start_emulator" dir="${platform.home}">
-            <property name="emulator.skin" value="WVGA.xml"/>
-            <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
-        </ant>
-    </target>
-    <!--semc-run-and-debug-prepare-targets-->
-    <target name="semc-icon-assembly" if="semc-platform.trigger" unless="semc.icon.invalid">
-        <copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm" failonerror="false"/>
-        <iconassembly home="${platform.home}" uid="${semc.application.uid}" count="${application.icon.count}"/>
-    </target>
-    <target name="semc-ppro-emulator" if="semc-platform.trigger" description="Builds neccessary files for semc emulator">
-        <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
-            <arg value="win32"/>
-            <arg value="${application.name}"/>
-            <arg value="${semc.application.uid}"/>
-            <arg value="${j9.dist}"/>
-            <arg value="${semc.application.caps}"/>
-            <env key="SDKDRIVE" value="${sdkdrive}"/>
-            <env key="EPOCROOT" value="${epocroot}"/>
-            <env key="Path" value="${epocpath}"/>
-        </exec>
-    </target>
-    <target name="semc-do-run" if="semc-platform.trigger" description="Prepare log folders, copy necessary files">
-        <copy todir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-        </copy>
-        <mkdir dir="${platform.home}/epoc32/winscw/c/logs/j9vm"/>
-        <epocinipath file="${platform.home}/epoc32/data/epoc.ini"/>
-        <exec executable="${platform.home}/epoc32/release/winscw/udeb/epoc.exe">
-            <env key="SDKDRIVE" value="${sdkdrive}"/>
-            <env key="EPOCROOT" value="${epocroot}"/>
-            <env key="Path" value="${epocpath}"/>
-        </exec>
-    </target>
-    <!--semc-run-->
-    <target name="semc-run" depends="semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
-    <!--savaje-run-->
-    <target name="savaje-run" if="savaje-platform.trigger">
-        <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.jvmargs}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-        </sunEmulatorExec>
-    </target>
-    <!--nokiaS80-run-->
-    <target name="nokiaS80-run" if="nokiaS80-platform.trigger">
-        <mkdir dir="${platform.home}/epoc32/wins/c/PP_Applications"/>
-        <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
-        <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
-        <nokiaexec jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-        </nokiaexec>
-    </target>
-    <!--nsicom-run-->
-    <target name="nsicom-run" if="nsicom-platform.trigger">
-        <nsicomExecDeploy home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.jvmargs}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" verbose="${nsicom.application.runverbose}" hostip="${nsicom.application.monitorhost}" runondevice="${nsicom.application.runremote}" remotevmlocation="${nsicom.remotevm.location}" remoteDataLocation="${nsicom.remoteapp.location}">
-            <fileset dir="${dist.dir}">
-                <exclude name="javadoc/**"/>
-            </fileset>
-        </nsicomExecDeploy>
-    </target>
-    <!--run-->
-    <target name="pre-run"/>
-    <target name="run" depends="jar,pre-run,cldc-run,ricoh-run,semc-run,savaje-run,nokiaS80-run,nsicom-run" description="Run MIDlet suite."/>
-    <target name="run-no-build" depends="init,pre-run,cldc-run,ricoh-run,semc-run,savaje-run,nokiaS80-run,nsicom-run" description="Quick Run already built MIDlet suite."/>
-    <!--cldc-debug-->
-    <target name="cldc-debug" if="cldc-platform.trigger">
-        <parallel>
-            <nb-run debug="true" debugsuspend="true" debugserver="true" debuggeraddressproperty="jpda.port" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadfile="${dist.dir}/${dist.jad}" jadurl="${dist.jad.url}" jarfile="${dist.dir}/${dist.jar}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.debugcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
-            <sequential>
-                <sleep seconds="5"/>
-                <antcall target="nbdebug"/>
-            </sequential>
-        </parallel>
-    </target>
-    <!--ricoh-debug-->
-    <target name="ricoh-debug" if="ricoh-platform.trigger">
-        <copy todir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}" overwrite="true">
-            <fileset dir="${dist.dir}">
-                <patternset refid="deployment.patternset"/>
-            </fileset>
-            <flattenmapper/>
-        </copy>
-        <parallel>
-            <ant antfile="${platform.home}/startemulator_debug.xml" target="debug_emulator" dir="${platform.home}">
-                <property name="emulator.skin" value="WVGA.xml"/>
-                <property name="emulator.autolaunchid" value="${ricoh.application.uid}"/>
-            </ant>
-            <sequential>
-                <sleep seconds="5"/>
-                <property name="jpda.port" value="8000"/>
-                <property name="debug.period" value="3000"/>
-                <property name="debug.timeout" value="30000"/>
-                <antcall target="nbdebug" inheritall="true" inheritrefs="true"/>
-            </sequential>
-        </parallel>
-    </target>
-    <!--semc-debug-->
-    <!--semc-build-j9-debug-->
-    <target name="semc-build-j9-debug" if="semc-platform.trigger">
-        <fail message="Main class is not set!">
-            <condition>
-                <equals arg1="${main.class}" arg2=""/>
-            </condition>
-        </fail>
-        <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
-    </target>
-    <target name="semc-debug-start" if="semc-platform.trigger">
-        <nbjpdastart transport="dt_socket" addressproperty="jpda.port" name="${main.class}">
-            <classpath>
-                <path path="${build.classes.dir}"/>
-            </classpath>
-            <bootclasspath>
-                <path path="${platform.bootclasspath}"/>
-            </bootclasspath>
-        </nbjpdastart>
-    </target>
-    <target name="semc-debug" depends="semc-debug-start,semc-build-j9-debug,semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
-    <!--savaje-debug-->
-    <target name="savaje-debug" if="savaje-platform.trigger">
-        <parallel>
-            <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.jvmargs}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
-                <fileset dir="${dist.dir}">
-                    <exclude name="javadoc/**"/>
-                </fileset>
-            </sunEmulatorExec>
-            <sequential>
-                <sleep seconds="5"/>
-                <antcall target="nbdebug"/>
-            </sequential>
-        </parallel>
-    </target>
-    <!--nokiaS80-debug-->
-    <target name="nokiaS80-debug" if="nokiaS80-platform.trigger">
-        <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
-        <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
-        <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
-        <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
-        <parallel>
-            <nokiaexec debug="true" debuggeraddressproperty="jpda.port" jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
-                <fileset dir="${dist.dir}">
-                    <exclude name="javadoc/**"/>
-                </fileset>
-            </nokiaexec>
-            <sequential>
-                <sleep seconds="10"/>
-                <antcall target="nbdebug"/>
-            </sequential>
-        </parallel>
-    </target>
-    <!--nsicom-debug-->
-    <target name="nsicom-debug" if="nsicom-platform.trigger">
-        <fail message="Debugging is not supported in this NSIcom VM version. Use monitoring facility instead!"/>
-    </target>
-    <!--debug-->
-    <target name="remove-timestamp">
-        <delete file="$/.timestamp"/>
-    </target>
-    <target name="pre-debug"/>
-    <target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,ricoh-debug,semc-debug,savaje-debug,nokiaS80-debug,nsicom-debug"/>
-    <target name="nbdebug" description="Start NetBeans debugger" if="netbeans.home">
-        <property name="debug.delay" value="5000"/>
-        <nb-mobility-debug address="${jpda.port}" name="${app.codename}" delay="${debug.delay}" timeout="30000" period="2000"/>
-    </target>
-    <!--javadoc-->
-    <target name="browse-javadoc" if="netbeans.home" unless="no.javadoc.preview">
-        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
-    </target>
-    <target name="javadoc" depends="preprocess">
-        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
-        <mkdir dir="${dist.javadoc.dir}"/>
-        <javadoc source="${javac.source}" destdir="${dist.javadoc.dir}" bootclasspath="${platform.bootclasspath}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" encoding="${javac.encoding}" docencoding="${javac.encoding}" charset="${javac.encoding}">
-            <classpath>
-                <path path="${libs.classpath}"/>
-            </classpath>
-            <sourcepath>
-                <pathelement location="${buildsystem.baton}"/>
-            </sourcepath>
-        </javadoc>
-        <antcall target="browse-javadoc"/>
-    </target>
-    <!--clean and build-->
-    <target name="rebuild" depends="clean,build" description="Rebuild the application."/>
-    <target name="clean-timestamp">
-        <delete file="${build.dir}/.timestamp"/>
-    </target>
-    <target name="clean-preprocessed">
-        <delete dir="${preprocessed.dir}"/>
-    </target>
-    <target name="clean-classes">
-        <delete dir="${build.classes.dir}"/>
-    </target>
-    <target name="clean-obfuscated">
-        <delete file="${obfuscator.srcjar}"/>
-        <delete file="${obfuscator.destjar}"/>
-        <delete dir="${obfuscated.classes.dir}"/>
-    </target>
-    <target name="clean-preverified">
-        <delete dir="${preverify.sources.dir}"/>
-        <delete dir="${preverify.classes.dir}"/>
-    </target>
-    <target name="clean-manifest" if="manifest.build.file">
-        <delete file="${manifest.build.file}"/>
-    </target>
-    <target name="clean-jar">
-        <delete file="${dist.dir}/${dist.jar}"/>
-    </target>
-    <target name="clean-jad">
-        <delete file="${dist.dir}/${dist.jad}"/>
-    </target>
-    <target name="clean-javadoc">
-        <delete dir="${dist.javadoc.dir}"/>
-    </target>
-    <target name="clean-j9" if="j9.dist">
-        <delete file="${j9.dist}"/>
-    </target>
-    <target name="clean-ricoh" if="ricoh-platform.trigger">
-        <delete dir="${platform.home}/mnt/sd3/sdk/dsdk/dist/${ricoh.application.uid}"/>
-        <delete dir="${build.dir}/dalp"/>
-        <delete file="${dist.dir}/$.dalp"/>
-        <delete dir="${dist.dir}/lib"/>
-    </target>
-    <target name="clean-semc" if="semc-platform.trigger">
-        <delete dir="${dist.dir}" includes="*.sis,*.SIS"/>
-        <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/win32/PProLauncher${semc.application.uid}"/>
-        <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
-        <delete file="${platform.home}/epoc32/release/winscw/udeb/PProLauncher${semc.application.uid}.exe"/>
-        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
-        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
-        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
-        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm"/>
-        <delete file="${platform.home}/epoc32/data/Z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
-        <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
-        <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
-        <delete dir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}"/>
-    </target>
-    <target name="clean-savaje" if="savaje-platform.trigger">
-        <delete dir="${build.dir}/jnlp"/>
-        <delete file="${dist.dir}/bundle.jnlp"/>
-        <delete file="${dist.dir}/bundle.policy"/>
-        <delete dir="${dist.dir}/lib"/>
-    </target>
-    <!--clean-->
-    <target name="pre-clean"/>
-    <target name="post-clean"/>
-    <target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-ricoh,clean-semc,clean-savaje,post-clean"/>
-    <target name="clean" depends="conditional-clean" if="no.clean.before.build" description="Clean build products.">
-        <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
-    </target>
-    <!--deploy-->
-    <target name="pre-deploy"/>
-    <target name="do-deploy" if="deployment.method" unless="skip.deployment">
-        <fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail>
-        <ant antfile="${deployment.scriptfile}" inheritall="true" inheritrefs="true"/>
-        <antcall target="post-deploy" inheritall="true" inheritrefs="true"/>
-    </target>
-    <target name="post-deploy"/>
-    <target name="deploy" depends="build,pre-deploy,do-deploy,post-deploy"/>
-    <!--for-all-configs targets-->
-    <target name="for-all-configs" depends="load-properties">
-        <fail unless="libs.ant-contrib.classpath">Classpath to Ant Contrib library (libs.ant-contrib.classpath property) is not set.</fail>
-        <property name="selected.configurations" value="${all.configurations}"/>
-        <taskdef resource="net/sf/antcontrib/antlib.xml">
-            <classpath>
-                <pathelement path="${libs.ant-contrib.classpath}"/>
-            </classpath>
-        </taskdef>
-        <for list="${selected.configurations}" param="cfg" keepgoing="true" trim="true">
-            <sequential>
-                <echo>Active project configuration: @{cfg}</echo>
-                <antcall target="${target.to.call}" inheritall="false" inheritrefs="false">
-                    <param name="config.active" value="@{cfg}"/>
-                    <propertyset>
-                        <propertyref name="no.deps"/>
-                    </propertyset>
-                </antcall>
-                <property name="no.deps" value="true"/>
-            </sequential>
-        </for>
-    </target>
-    <target name="jar-all">
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="jar"/>
-        </antcall>
-    </target>
-    <target name="build-all">
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="build"/>
-        </antcall>
-    </target>
-    <target name="javadoc-all">
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="javadoc"/>
-        </antcall>
-    </target>
-    <target name="deploy-all">
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="deploy"/>
-        </antcall>
-    </target>
-    <target name="rebuild-all">
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="rebuild"/>
-        </antcall>
-    </target>
-    <target name="clean-all">
-        <property file="nbproject/project.properties"/>
-        <fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail>
-        <fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail>
-        <delete dir="${build.root.dir}"/>
-        <delete dir="${dist.root.dir}"/>
-        <antcall target="for-all-configs">
-            <param name="target.to.call" value="clean"/>
-        </antcall>
-    </target>
-</project>
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/genfiles.properties	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# This file is used by a NetBeans-based IDE to track changes in generated files such as buildimpl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-build.xml.data.CRC32=5c5026e6
-build.xml.script.CRC32=ce593f69
-build.xml.stylesheet.CRC32=03eab09b
-nbproject/buildimpl.xml.data.CRC32=5c5026e6
-nbproject/buildimpl.xml.script.CRC32=f8335f3b
-nbproject/buildimpl.xml.stylesheet.CRC32=2a2b5990
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/private/private.properties	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#Fri May 29 10:40:08 IST 2009
-netbeans.user=C\:\\Documents and Settings\\dlakshmi\\.netbeans\\6.0
-javadoc.preview=true
-config.active=
-deployment.counter=4
-app-version.autoincrement=true
-deployment.number=0.0.3
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/private/private.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
-    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
-</project-private>
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/project.properties	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-abilities=WMA=2.0,JSR75=1.0,ScreenHeight=320,CLDC=1.1,OBEX=1.0,MMAPI=1.1,JSR184=1.0,JSR172=1.0,ScreenWidth=240,ScreenColorDepth=8,MIDP=2.0,ColorScreen,JSR82=1.0,
-all.configurations=\ 
-application.args=
-application.description=
-application.description.detail=
-application.name=
-application.vendor=Vendor
-build.classes.dir=${build.dir}/compiled
-build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.mvd,**/*.wsclient,**/*.vmd
-build.dir=build/${config.active}
-build.root.dir=build
-debug.level=debug
-deployment.copy.target=deploy
-deployment.instance=default
-deployment.jarurl=${dist.jar}
-deployment.method=NONE
-deployment.override.jarurl=false
-dist.dir=dist/${config.active}
-dist.jad=MobInfoProp.jad
-dist.jar=MobInfoProp.jar
-dist.javadoc.dir=${dist.dir}/doc
-dist.root.dir=dist
-extra.classpath=
-filter.exclude.tests=false
-filter.excludes=
-filter.more.excludes=
-filter.use.standard=true
-jar.compress=true
-javac.debug=true
-javac.deprecation=false
-javac.encoding=windows-1252
-javac.optimize=false
-javac.source=1.3
-javac.target=1.3
-javadoc.author=false
-javadoc.encoding=
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-libs.classpath=
-main.class=
-main.class.class=applet
-manifest.apipermissions=
-manifest.file=manifest.mf
-manifest.jad=
-manifest.manifest=
-manifest.midlets=MIDlet-1: HelloMIDlet,,hello.HelloMIDlet\n
-manifest.others=MIDlet-Vendor: Vendor\nMIDlet-Version: 1.0\nMIDlet-Name: MobInfoProp\n
-manifest.pushregistry=
-name=MobInfoProp
-no.dependencies=false
-nokiaS80.application.icon=
-nsicom.application.monitorhost=
-nsicom.application.runremote=
-nsicom.application.runverbose=
-nsicom.remoteapp.location=\\My Documents\\NetBeans Applications
-nsicom.remotevm.location=\\Windows\\creme\\bin\\CrEme.exe
-obfuscated.classes.dir=${build.dir}/obfuscated
-obfuscation.custom=
-obfuscation.level=0
-obfuscator.destjar=${build.dir}/obfuscated.jar
-obfuscator.srcjar=${build.dir}/before-obfuscation.jar
-platform.active=J2ME_Wireless_Toolkit_2_2
-platform.active.description=J2ME Wireless Toolkit 2.2
-platform.apis=JSR75-1.0,JSR172-1.0,JSR82-1.0,JSR184-1.0,MMAPI-1.1,OBEX-1.0,WMA-2.0
-platform.bootclasspath=${platform.home}/lib/wma20.jar:${platform.home}/lib/jsr082.jar:${platform.home}/lib/jsr184.jar:${platform.home}/lib/j2me-ws.jar:${platform.home}/lib/mmapi.jar:${platform.home}/lib/jsr75.jar:${platform.home}/lib/cldcapi11.jar:${platform.home}/lib/midpapi20.jar
-platform.configuration=CLDC-1.1
-platform.device=DefaultColorPhone
-platform.fat.jar=true
-platform.profile=MIDP-2.0
-platform.trigger=CLDC
-platform.type=UEI-1.0.1
-preprocessed.dir=${build.dir}/preprocessed
-preverify.classes.dir=${build.dir}/preverified
-preverify.sources.dir=${build.dir}/preverifysrc
-resources.dir=resources
-ricoh.application.email=
-ricoh.application.fax=
-ricoh.application.icon=
-ricoh.application.target-jar=
-ricoh.application.telephone=
-ricoh.application.uid=13772814
-ricoh.application.version=
-ricoh.dalp.application-desc.auto-run=false
-ricoh.dalp.application-desc.energy-save=
-ricoh.dalp.application-desc.exec-auth=
-ricoh.dalp.application-desc.visible=true
-ricoh.dalp.argument=
-ricoh.dalp.codebase=
-ricoh.dalp.display-mode.color=true
-ricoh.dalp.display-mode.is-4line-support=false
-ricoh.dalp.display-mode.is-hvga-support=true
-ricoh.dalp.display-mode.is-vga-support=false
-ricoh.dalp.display-mode.is-wvga-support=false
-ricoh.dalp.information.abbreviation=
-ricoh.dalp.information.icon.basepath=
-ricoh.dalp.information.icon.location=
-ricoh.dalp.information.is-icon-used=true
-ricoh.dalp.install.destination=hdd
-ricoh.dalp.install.mode.auto=true
-ricoh.dalp.install.work-dir=hdd
-ricoh.dalp.is-managed=true
-ricoh.dalp.resources.dsdk.version=2.0
-ricoh.dalp.resources.jar.basepath=
-ricoh.dalp.resources.jar.version=
-ricoh.dalp.version=
-ricoh.icon.invert=false
-ricoh.platform.target.version=
-run.cmd.options=
-run.jvmargs=
-run.method=STANDARD
-run.security.domain=trusted
-run.use.security.domain=false
-savaje.application.icon=
-savaje.application.icon.focused=
-savaje.application.icon.small=
-savaje.application.uid=TBD
-savaje.bundle.base=
-savaje.bundle.debug=false
-savaje.bundle.debug.port=
-semc.application.caps=
-semc.application.icon=
-semc.application.icon.count=
-semc.application.icon.splash=
-semc.application.icon.splash.installonly=false
-semc.application.uid=E9763094
-semc.certificate.path=
-semc.private.key.password=
-semc.private.key.path=
-sign.alias=
-sign.enabled=false
-sign.keystore=
-src.dir=src
-use.emptyapis=true
-use.preprocessor=true
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/nbproject/project.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.kjava.j2meproject</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/j2me-project">
-            <name>MobInfoProp</name>
-            <minimum-ant-version>1.6</minimum-ant-version>
-        </data>
-    </configuration>
-</project>
--- a/javaextensions/mobinfo/tsrc/midlet/mobinfoprop/src/hello/HelloMIDlet.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +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:
-*
-*/
-
-package hello;
-
-import javax.microedition.midlet.*;
-import javax.microedition.lcdui.*;
-
-/**
- * Class HelloMIDlet tests system properties
- */
-public class HelloMIDlet extends MIDlet implements CommandListener
-{
-
-    private static final String NETWORK_ACCESS = "com.nokia.mid.network.access";
-    private static final String BATTERY_LEVEL = "com.nokia.mid.batterylevel";
-    private static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
-    private static final String IMEI = "com.nokia.mid.imsi";
-    private static final String IMSI = "com.nokia.mid.imei";
-    private static final String NETWORK_AVAILABILITY = "com.nokia.mid.networkavailability";
-    private static final String NETWORK_ID = "com.nokia.mid.networkid";
-    private static final String NETWORK_SIGNAL = "com.nokia.mid.networksignal";
-    private static final String EMAIL_RECIEVE_SETTINGS = "com.nokia.mid.settings.email-receive-protocol";
-    private static final String EMAIL_SEND_SETTINGS = "com.nokia.mid.settings.email-send-protocol";
-    private static final String CELLID = "com.nokia.mid.cellid";
-    private static final String MSISDN = "com.nokia.mid.msisdn";
-    private static final String DATEFORMAT = "com.nokia.mid.dateformat";
-    private static final String TIMEFORMAT = "com.nokia.mid.timeformat";
-    private static final String NETWORKSTATUS = "com.nokia.mid.networkstatus";
-    private boolean midletPaused = false;
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
-    private Command exitCommand;
-    private Form form;
-    //</editor-fold>//GEN-END:|fields|0|
-
-    /**
-     * The HelloMIDlet constructor.
-     */
-    public HelloMIDlet()
-    {
-    }
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
-    //</editor-fold>//GEN-END:|methods|0|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
-    /**
-     * Initilizes the application.
-     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
-     */
-    private void initialize()  //GEN-END:|0-initialize|0|0-preInitialize
-    {
-        // write pre-initialize user code here
-//GEN-LINE:|0-initialize|1|0-postInitialize
-        // write post-initialize user code here
-    }//GEN-BEGIN:|0-initialize|2|
-    //</editor-fold>//GEN-END:|0-initialize|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
-    /**
-     * Performs an action assigned to the Mobile Device - MIDlet Started point.
-     */
-    public void startMIDlet()  //GEN-END:|3-startMIDlet|0|3-preAction
-    {
-        // write pre-action user code here
-        switchDisplayable(null, getForm());//GEN-LINE:|3-startMIDlet|1|3-postAction
-        // write post-action user code here
-    }//GEN-BEGIN:|3-startMIDlet|2|
-    //</editor-fold>//GEN-END:|3-startMIDlet|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
-    /**
-     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
-     */
-    public void resumeMIDlet()  //GEN-END:|4-resumeMIDlet|0|4-preAction
-    {
-        // write pre-action user code here
-//GEN-LINE:|4-resumeMIDlet|1|4-postAction
-        // write post-action user code here
-    }//GEN-BEGIN:|4-resumeMIDlet|2|
-    //</editor-fold>//GEN-END:|4-resumeMIDlet|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
-    /**
-     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
-     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
-     * @param nextDisplayable the Displayable to be set
-     */
-    public void switchDisplayable(Alert alert, Displayable nextDisplayable)  //GEN-END:|5-switchDisplayable|0|5-preSwitch
-    {
-        // write pre-switch user code here
-        Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
-        if (alert == null)
-        {
-            display.setCurrent(nextDisplayable);
-        }
-        else
-        {
-            display.setCurrent(alert, nextDisplayable);
-        }//GEN-END:|5-switchDisplayable|1|5-postSwitch
-        // write post-switch user code here
-    }//GEN-BEGIN:|5-switchDisplayable|2|
-    //</editor-fold>//GEN-END:|5-switchDisplayable|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
-    /**
-     * Called by a system to indicated that a command has been invoked on a particular displayable.
-     * @param command the Command that was invoked
-     * @param displayable the Displayable where the command was invoked
-     */
-    public void commandAction(Command command, Displayable displayable)  //GEN-END:|7-commandAction|0|7-preCommandAction
-    {
-        // write pre-action user code here
-        if (displayable == form)  //GEN-BEGIN:|7-commandAction|1|19-preAction
-        {
-            if (command == exitCommand)  //GEN-END:|7-commandAction|1|19-preAction
-            {
-                // write pre-action user code here
-                exitMIDlet();//GEN-LINE:|7-commandAction|2|19-postAction
-                // write post-action user code here
-            }//GEN-BEGIN:|7-commandAction|3|7-postCommandAction
-        }//GEN-END:|7-commandAction|3|7-postCommandAction
-        // write post-action user code here
-    }//GEN-BEGIN:|7-commandAction|4|
-    //</editor-fold>//GEN-END:|7-commandAction|4|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|18-getter|0|18-preInit
-    /**
-     * Returns an initiliazed instance of exitCommand component.
-     * @return the initialized component instance
-     */
-    public Command getExitCommand()
-    {
-        if (exitCommand == null)  //GEN-END:|18-getter|0|18-preInit
-        {
-            // write pre-init user code here
-            exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
-            // write post-init user code here
-        }//GEN-BEGIN:|18-getter|2|
-        return exitCommand;
-    }
-    //</editor-fold>//GEN-END:|18-getter|2|
-
-    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: form ">//GEN-BEGIN:|14-getter|0|14-preInit
-    /**
-     * Returns an initiliazed instance of form component.
-     * @return the initialized component instance
-     */
-    public Form getForm()
-    {
-        if (form == null)  //GEN-END:|14-getter|0|14-preInit
-        {
-            // write pre-init user code here
-            form = new Form("MobInfo Properties", new Item[] { });//GEN-BEGIN:|14-getter|1|14-postInit
-            form.addCommand(getExitCommand());
-            form.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
-            // write post-init user code here
-        }//GEN-BEGIN:|14-getter|2|
-        return form;
-    }
-    //</editor-fold>//GEN-END:|14-getter|2|
-
-
-
-    /**
-     * Returns a display instance.
-     * @return the display instance.
-     */
-    public Display getDisplay()
-    {
-        return Display.getDisplay(this);
-    }
-
-    /**
-     * Exits MIDlet.
-     */
-    public void exitMIDlet()
-    {
-        switchDisplayable(null, null);
-        destroyApp(true);
-        notifyDestroyed();
-    }
-
-    /**
-     * Called when MIDlet is started.
-     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
-     */
-    public void startApp()
-    {
-        if (midletPaused)
-        {
-            resumeMIDlet();
-        }
-        else
-        {
-            initialize();
-            startMIDlet();
-        }
-        midletPaused = false;
-        form.append("\n");
-        testProperties();
-    }
-
-    /**
-     * Called when MIDlet is paused.
-     */
-    public void pauseApp()
-    {
-        midletPaused = true;
-    }
-
-    /**
-     * Called to signal the MIDlet to terminate.
-     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
-     */
-    public void destroyApp(boolean unconditional)
-    {
-    }
-
-    public void testProperties()
-    {
-        try
-        {
-            logResult("BATTERY_LEVEL: ",System.getProperty(BATTERY_LEVEL));
-            logResult("COUNTRY_CODE: ",System.getProperty(COUNTRY_CODE));
-            logResult("IMEI: ",System.getProperty(IMEI));
-            logResult("IMSI: ",System.getProperty(IMSI));
-            logResult("NETWORK_AVAILABILITY: ",System.getProperty(NETWORK_AVAILABILITY));
-            logResult("NETWORK_ID: ",System.getProperty(NETWORK_ID));
-            logResult("NETWORK_SIGNAL: ",System.getProperty(NETWORK_SIGNAL));
-            logResult("CELLID: ",System.getProperty(CELLID));
-            logResult("MSISDN: ",System.getProperty(MSISDN));
-            logResult("DATEFORMAT: ",System.getProperty(DATEFORMAT));
-            logResult("TIMEFORMAT: ",System.getProperty(TIMEFORMAT));
-            logResult("NETWORKSTATUS: ",System.getProperty(NETWORKSTATUS));
-        }
-        catch (Exception e)
-        {
-            System.out.println("Test Properties Failed: "+e);
-        }
-    }
-
-    private void logResult(String name, String msg)
-    {
-        form.append(name+"\n");
-        form.append(msg+"\n");
-        System.out.println(name+msg);
-    }
-
-}
--- a/javaextensions/pim/agnadapter/inc.s60/cpimagnlistadapter.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/inc.s60/cpimagnlistadapter.h	Tue May 25 12:34:19 2010 +0300
@@ -267,8 +267,7 @@
      *
      * @param aEntryType Entry type for change callbacks (ToDo/Event/all).
      */
-    void ConstructL(MCalChangeCallBack::TChangeEntryType aEntryType,
-        CCalSession* aCalSession);
+    void ConstructL(MCalChangeCallBack::TChangeEntryType aEntryType);
 
     void DoClose();
 
--- a/javaextensions/pim/agnadapter/inc.s60/cpimeventadapteraccess.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/inc.s60/cpimeventadapteraccess.h	Tue May 25 12:34:19 2010 +0300
@@ -73,17 +73,13 @@
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenEventListL(
-        CCalSession* aCalSession,
-
-        const TDesC* aListName, 
+        const TDesC* aListName,
         MPIMEventAdapterManager** aRetAdapterManager,
         MPIMEventListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenToDoListL(
-        CCalSession* aCalSession,
-
-        const TDesC* aListName, 
+        const TDesC* aListName,
         MPIMToDoAdapterManager** aRetAdapterManager,
         MPIMToDoListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData);
--- a/javaextensions/pim/agnadapter/inc.s60/cpimeventlistadapter.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/inc.s60/cpimeventlistadapter.h	Tue May 25 12:34:19 2010 +0300
@@ -27,7 +27,6 @@
 // FORWARD DECLARATIONS
 class MPIMEventItem;
 class CPIMAgnEventAdapter;
-class CCalSession;
 
 // CLASS DECLARATION
 
@@ -48,8 +47,7 @@
     static CPIMEventListAdapter* NewL(
         CCalEntry::TType aEntryType,
         CPIMAgnEventAdapter* aEventAdapter,
-        java::util::FunctionServer* aFuncServer,
-        CCalSession *aCalSession);
+        java::util::FunctionServer* aFuncServer);
 
     /**
      * Destructor.
@@ -224,9 +222,7 @@
      */
     void ConstructL(
         CCalEntry::TType aEntryType,
-
-        CPIMAgnEventAdapter* aEventAdapter,
-        TInt aCalSessionInt);
+        CPIMAgnEventAdapter* aEventAdapter);
 
 private: // Member data
 
--- a/javaextensions/pim/agnadapter/inc.s60/cpimtodoadapteraccess.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/inc.s60/cpimtodoadapteraccess.h	Tue May 25 12:34:19 2010 +0300
@@ -67,17 +67,13 @@
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenEventListL(
-        CCalSession* aCalSession,
-
-        const TDesC* aListName, 
+        const TDesC* aListName,
         MPIMEventAdapterManager** aRetAdapterManager,
         MPIMEventListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenToDoListL(
-        CCalSession* aCalSession,
-
-        const TDesC* aListName, 
+        const TDesC* aListName,
         MPIMToDoAdapterManager** aRetAdapterManager,
         MPIMToDoListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData);
--- a/javaextensions/pim/agnadapter/inc.s60/cpimtodolistadapter.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/inc.s60/cpimtodolistadapter.h	Tue May 25 12:34:19 2010 +0300
@@ -44,8 +44,7 @@
     /**
      * Two-phased constructor.
      */
-    static CPIMToDoListAdapter* NewL(java::util::FunctionServer* aFuncServer,
-        CCalSession *aCalSession);
+    static CPIMToDoListAdapter* NewL(java::util::FunctionServer* aFuncServer);
 
     /**
      * Destructor.
@@ -218,7 +217,7 @@
     /**
      * By default Symbian 2nd phase constructor is private.
      */
-    void ConstructL(TInt aCalSessionInt );
+    void ConstructL();
 
 private: // Member data
 
--- a/javaextensions/pim/agnadapter/src.s60/cpimagnlistadapter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/src.s60/cpimagnlistadapter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -54,15 +54,13 @@
 // -----------------------------------------------------------------------------
 //
 void CPIMAgnListAdapter::ConstructL(
-
-    MCalChangeCallBack::TChangeEntryType aEntryType,
-    CCalSession* aCalSession)
-    {
+    MCalChangeCallBack::TChangeEntryType aEntryType)
+{
     JELOG2(EPim);
-    
-    iServerWait = CPIMAgnServerWait::NewL();      
-    iCalSession = aCalSession;    
-    iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait);    	
+    iServerWait = CPIMAgnServerWait::NewL();
+    iCalSession = CCalSession::NewL();
+    iCalSession->OpenL(iCalSession->DefaultFileNameL());
+    iCalEntryView = CCalEntryView::NewL(*iCalSession, *iServerWait);
     iServerWait->WaitCompleteL(KServerMaxWait);
 
     iCalSession->StartChangeNotification(this, aEntryType, ETrue, // include undated ToDos, if ToDos are observed
@@ -287,9 +285,10 @@
 void CPIMAgnListAdapter::CloseAgendaSession()
 {
     JELOG2(EPim);
-    iCalSession->StopChangeNotification();
     delete iCalEntryView;
-    iCalEntryView = NULL;   
+    iCalEntryView = NULL;
+
+    delete iCalSession;
     iCalSession = NULL;
 
     iChangesRead = ETrue;
--- a/javaextensions/pim/agnadapter/src.s60/cpimeventadapteraccess.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/src.s60/cpimeventadapteraccess.cpp	Tue May 25 12:34:19 2010 +0300
@@ -139,8 +139,7 @@
     return EFalse;
 }
 
-TBool CPIMEventAdapterAccess::OpenEventListL(CCalSession* aCalSession, 
-        const TDesC* aListName, 
+TBool CPIMEventAdapterAccess::OpenEventListL(const TDesC* aListName,
         MPIMEventAdapterManager** aRetAdapterManager,
         MPIMEventListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData)
@@ -182,9 +181,9 @@
         CPIMAgnApptAdapter* adapter = CPIMAgnApptAdapter::NewL(iFuncServer);
         CleanupStack::PushL(adapter);
 
-        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EAppt,adapter,
-                      iFuncServer, aCalSession);
-			
+        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EAppt, adapter,
+                      iFuncServer);
+
         CleanupStack::Pop(adapter);
         CleanupStack::Pop(adapterManager);
 
@@ -201,8 +200,8 @@
         CPIMAgnMemoAdapter* adapter = CPIMAgnMemoAdapter::NewL(iFuncServer);
         CleanupStack::PushL(adapter);
 
-        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EEvent,adapter,
-                      iFuncServer, aCalSession);
+        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EEvent, adapter,
+                      iFuncServer);
 
         CleanupStack::Pop(adapter);
         CleanupStack::Pop(adapterManager);
@@ -220,8 +219,8 @@
         CPIMAgnAnnivAdapter* adapter = CPIMAgnAnnivAdapter::NewL(iFuncServer);
         CleanupStack::PushL(adapter);
 
-        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EAnniv,adapter,
-                      iFuncServer, aCalSession);
+        listAdapter = CPIMEventListAdapter::NewL(CCalEntry::EAnniv, adapter,
+                      iFuncServer);
 
         CleanupStack::Pop(adapter);
         CleanupStack::Pop(adapterManager);
@@ -245,11 +244,9 @@
     return ETrue;
 }
 
-TBool CPIMEventAdapterAccess::OpenToDoListL(CCalSession* /*aCalSession*/, 
-        const TDesC* /*aListName*/, 
+TBool CPIMEventAdapterAccess::OpenToDoListL(const TDesC* /*aListName*/,
         MPIMToDoAdapterManager** /*aRetAdapterManager*/,
-        MPIMToDoListAdapter** /*aRetListAdapter*/, 
-        MPIMLocalizationData** /*aRetLocalizationData*/)
+        MPIMToDoListAdapter** /*aRetListAdapter*/, MPIMLocalizationData** /*aRetLocalizationData*/)
 {
     JELOG2(EPim);
     // no ToDo lists
--- a/javaextensions/pim/agnadapter/src.s60/cpimeventlistadapter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/src.s60/cpimeventlistadapter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -48,14 +48,11 @@
 // Symbian 2nd phase constructor can leave.
 // -----------------------------------------------------------------------------
 //
-void CPIMEventListAdapter::ConstructL(CCalEntry::TType aEntryType, 
-
-									  CPIMAgnEventAdapter* aEventAdapter,
-                                      TInt aCalSessionInt)
-    {
+void CPIMEventListAdapter::ConstructL(CCalEntry::TType aEntryType,
+                                      CPIMAgnEventAdapter* aEventAdapter)
+{
     JELOG2(EPim);
-    CCalSession* calSession = reinterpret_cast <CCalSession*> (aCalSessionInt);
-    CPIMAgnListAdapter::ConstructL(MCalChangeCallBack::EChangeEntryEvent, calSession);
+    CPIMAgnListAdapter::ConstructL(MCalChangeCallBack::EChangeEntryEvent);
     iEntryType = aEntryType;
     iAgnAdapter = aEventAdapter;
 }
@@ -65,19 +62,15 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CPIMEventListAdapter* CPIMEventListAdapter::NewL(CCalEntry::TType aEntryType,        
-        CPIMAgnEventAdapter* aEventAdapter, 
-        java::util::FunctionServer* aFuncServer, CCalSession *aCalSession
-        	)
-    {
+CPIMEventListAdapter* CPIMEventListAdapter::NewL(CCalEntry::TType aEntryType,
+        CPIMAgnEventAdapter* aEventAdapter, java::util::FunctionServer* aFuncServer)
+{
     JELOG2(EPim);
     CPIMEventListAdapter* self = new(ELeave) CPIMEventListAdapter(aFuncServer);
     CleanupStack::PushL(self);
-    TInt calSessionInt = reinterpret_cast <TInt> (aCalSession);
     CallMethodL(self, &CPIMEventListAdapter::ConstructL, aEntryType,
-                aEventAdapter, calSessionInt,self->iFuncServer);
-
-    CleanupStack::Pop( self );
+                aEventAdapter, self->iFuncServer);
+    CleanupStack::Pop(self);
     return self;
 }
 
--- a/javaextensions/pim/agnadapter/src.s60/cpimtodoadapteraccess.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/src.s60/cpimtodoadapteraccess.cpp	Tue May 25 12:34:19 2010 +0300
@@ -106,20 +106,16 @@
     return EFalse;
 }
 
-TBool CPIMToDoAdapterAccess::OpenEventListL(CCalSession* /*aCalSession*/, 
-        const TDesC* /*aListName*/,
+TBool CPIMToDoAdapterAccess::OpenEventListL(const TDesC* /*aListName*/,
         MPIMEventAdapterManager** /*aRetAdapterManager*/,
-        MPIMEventListAdapter** /*aRetListAdapter*/, 
-        MPIMLocalizationData** /*aRetLocalizationData*/
-        )
+        MPIMEventListAdapter** /*aRetListAdapter*/, MPIMLocalizationData** /*aRetLocalizationData*/)
 {
     JELOG2(EPim);
     // no Event lists
     return EFalse;
 }
 
-TBool CPIMToDoAdapterAccess::OpenToDoListL(CCalSession* aCalSession, 
-        const TDesC* aListName,
+TBool CPIMToDoAdapterAccess::OpenToDoListL(const TDesC* aListName,
         MPIMToDoAdapterManager** aRetAdapterManager,
         MPIMToDoListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData)
@@ -140,7 +136,7 @@
                 (*iToDoListNames)[0]);
     CleanupDeletePushL(adapterManager);
 
-    MPIMToDoListAdapter* listAdapter = CPIMToDoListAdapter::NewL(iFuncServer, aCalSession);
+    MPIMToDoListAdapter* listAdapter = CPIMToDoListAdapter::NewL(iFuncServer);
     CleanupStack::Pop(adapterManager);
 
     MPIMLocalizationData* localizationData = iToDoLocalizationData;
--- a/javaextensions/pim/agnadapter/src.s60/cpimtodolistadapter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/agnadapter/src.s60/cpimtodolistadapter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -49,11 +49,10 @@
 // Symbian 2nd phase constructor can leave.
 // -----------------------------------------------------------------------------
 //
-void CPIMToDoListAdapter::ConstructL(TInt aCalSessionInt)
-    {
+void CPIMToDoListAdapter::ConstructL()
+{
     JELOG2(EPim);
-    CCalSession* calSession = reinterpret_cast <CCalSession*> (aCalSessionInt);
-    CPIMAgnListAdapter::ConstructL(MCalChangeCallBack::EChangeEntryTodo, calSession);
+    CPIMAgnListAdapter::ConstructL(MCalChangeCallBack::EChangeEntryTodo);
     iAgnToDoAdapter = CPIMAgnToDoAdapter::NewL(iFuncServer);
 }
 
@@ -62,15 +61,14 @@
 // Two-phased constructor.
 // -----------------------------------------------------------------------------
 //
-CPIMToDoListAdapter* CPIMToDoListAdapter::NewL(java::util::FunctionServer* aFuncServer, 
-CCalSession *aCalSession)
-    {
+CPIMToDoListAdapter* CPIMToDoListAdapter::NewL(
+    java::util::FunctionServer* aFuncServer)
+{
     JELOG2(EPim);
     CPIMToDoListAdapter* self = new(ELeave) CPIMToDoListAdapter(aFuncServer);
     CleanupStack::PushL(self);
-    TInt calSessionInt = reinterpret_cast <TInt> (aCalSession);
-    CallMethodL(self, &CPIMToDoListAdapter::ConstructL,calSessionInt,self->iFuncServer);
-    CleanupStack::Pop( self );
+    CallMethodL(self, &CPIMToDoListAdapter::ConstructL, self->iFuncServer);
+    CleanupStack::Pop(self);
     return self;
 }
 
--- a/javaextensions/pim/build/javapim_0x2002DCC5.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/build/javapim_0x2002DCC5.mmp	Tue May 25 12:34:19 2010 +0300
@@ -193,6 +193,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -213,10 +225,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 SOURCEPATH ../javapimloc/data
 
 START RESOURCE pimcm.rss
--- a/javaextensions/pim/cntadapter/inc.s60/cpimcmadapteraccess.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/cntadapter/inc.s60/cpimcmadapteraccess.h	Tue May 25 12:34:19 2010 +0300
@@ -26,7 +26,6 @@
 // FORWARD DECLARATIONS
 class MPIMLocalizationManager;
 class MPIMLocalizationData;
-class CCalSession;
 
 // CLASS DECLARATION
 /**
@@ -64,14 +63,12 @@
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenEventListL(
-        CCalSession* aCalSession,
         const TDesC* aListName,
         MPIMEventAdapterManager** aRetAdapterManager,
         MPIMEventListAdapter** aRetListAdapter,
         MPIMLocalizationData** aRetLocalizationData);
 
     TBool OpenToDoListL(
-        CCalSession* aCalSession,
         const TDesC* aListName,
         MPIMToDoAdapterManager** aRetAdapterManager,
         MPIMToDoListAdapter** aRetListAdapter,
--- a/javaextensions/pim/cntadapter/src.s60/cpimcmadapteraccess.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/cntadapter/src.s60/cpimcmadapteraccess.cpp	Tue May 25 12:34:19 2010 +0300
@@ -75,16 +75,16 @@
     return ETrue;
 }
 
-TBool CPIMCMAdapterAccess::OpenEventListL(CCalSession* /*aCalSession*/, const TDesC* /*aListName*/, 
+TBool CPIMCMAdapterAccess::OpenEventListL(const TDesC* /*aListName*/,
         MPIMEventAdapterManager** /*aRetAdapterManager*/,
-        MPIMEventListAdapter** /*aRetListAdapter*/, MPIMLocalizationData** /*aRetLocalizationData*/ )
+        MPIMEventListAdapter** /*aRetListAdapter*/, MPIMLocalizationData** /*aRetLocalizationData */)
 {
     JELOG2(EPim);
     // no Event lists
     return EFalse;
 }
 
-TBool CPIMCMAdapterAccess::OpenToDoListL(CCalSession* /*aCalSession*/, const TDesC* /*aListName*/, 
+TBool CPIMCMAdapterAccess::OpenToDoListL(const TDesC* /*aListName*/,
         MPIMToDoAdapterManager** /*aRetAdapterManager*/,
         MPIMToDoListAdapter** /*aRetListAdapter*/, MPIMLocalizationData** /*aRetLocalizationData */)
 {
--- a/javaextensions/pim/common/inc.s60/mpimadapteraccess.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/common/inc.s60/mpimadapteraccess.h	Tue May 25 12:34:19 2010 +0300
@@ -31,7 +31,6 @@
 class MPIMToDoAdapterManager;
 class MPIMToDoListAdapter;
 class MPIMLocalizationData;
-class CCalSession;
 
 // CLASS DECLARATION
 
@@ -130,8 +129,7 @@
      * @li \c KErrNotFound - The native database does not exist any more.
      * @li Other - The system is non-functional.
      */
-     virtual TBool OpenEventListL(CCalSession* aCalSession, 
-                                 const TDesC* aListName,
+    virtual TBool OpenEventListL(const TDesC* aListName,
                                  MPIMEventAdapterManager** aRetAdapterManager,
                                  MPIMEventListAdapter** aRetListAdapter,
                                  MPIMLocalizationData** aRetLocalizationData) = 0;
@@ -165,8 +163,7 @@
      * @li \c KErrNotFound - The native database does not exist any more.
      * @li Other - The system is non-functional.
      */
-     virtual TBool OpenToDoListL(CCalSession* aCalSession,
-                                const TDesC* aListName,
+    virtual TBool OpenToDoListL(const TDesC* aListName,
                                 MPIMToDoAdapterManager** aRetAdapterManager,
                                 MPIMToDoListAdapter** aRetListAdapter,
                                 MPIMLocalizationData** aRetLocalizationData) = 0;
--- a/javaextensions/pim/framework/inc.s60/cpimmanager.h	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/framework/inc.s60/cpimmanager.h	Tue May 25 12:34:19 2010 +0300
@@ -43,7 +43,6 @@
 class CPIMEventValidator;
 class CPIMToDoValidator;
 class MPIMAdapterAccess;
-class CCalSession;
 
 // CLASS DECLARATION
 
@@ -78,7 +77,7 @@
      * Destructor.
      */
     virtual ~CPIMManager();
-	void DeleteSessions();
+
 public: // New functions
 
     /**
@@ -207,7 +206,7 @@
     pimbaselist* DoOpenPimListL(
         const TPIMListType& aPimListType,
         const TDesC* aPimListName);
-	void CreateCalSessionL();
+
     void dispose();
 
 private: // Constructors
@@ -241,13 +240,6 @@
     /** Owned. */
     CPIMToDoValidator* iToDoValidator;
 
-    RLibrary iLocalizationLibrary;
-	
-    
-    /** Session to calendar server. Owned. */
-    CCalSession* iCalSession;
-    
-    
 
 };
 
--- a/javaextensions/pim/framework/src.s60/cpimmanager.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/pim/framework/src.s60/cpimmanager.cpp	Tue May 25 12:34:19 2010 +0300
@@ -20,7 +20,6 @@
 #include "cpimmanager.h"
 #include <e32std.h>
 #include <badesca.h>
-#include <calsession.h>
 #include "pimcommon.h"
 #include "mpimcontactadaptermanager.h"
 #include "mpimeventadaptermanager.h"
@@ -45,14 +44,9 @@
 #include "pimjnitools.h"
 #include "pimutils.h"
 #include "jstringutils.h"
-#include "fs_methodcall.h"
 #include "logger.h"
 #include "cpimlocalizationmanager.h"
 
-#include "s60commonutils.h"
-
-
-
 // CONSTANTS
 
 /**
@@ -80,23 +74,7 @@
     = (MPIMLocalizationManager*)(CPIMLocalizationManager::NewL());
 
     createServerToNewThread();
-        CallMethodL(this, &CPIMManager::CreateCalSessionL, this);
-    }
-
-void CPIMManager::CreateCalSessionL()
-    {
-    		iCalSession = CCalSession::NewL();    	   		
-    		TRAPD(err, iCalSession->OpenL(iCalSession->DefaultFileNameL()));
-        if ( KErrNotFound == err)
-        {
-          iCalSession->CreateCalFileL(iCalSession->DefaultFileNameL());
-          iCalSession->OpenL(iCalSession->DefaultFileNameL());
-        }
-        else
-        {
-          User::LeaveIfError(err);
-        }      			    			
-    }
+}
 
 pimbasemanager* pimbasemanager::getInstance()
 {
@@ -156,17 +134,10 @@
     iContactValidator = NULL;
     delete iEventValidator;
     iEventValidator = NULL;
-    delete iToDoValidator;    
-    CallMethod(this, &CPIMManager::DeleteSessions, this);   
-
+    delete iToDoValidator;
     iToDoValidator = NULL;
     stopServer();
 }
-void CPIMManager::DeleteSessions()
-	{
-    delete iCalSession;
-    iCalSession = NULL;
-	}
 
 void CPIMManager::dispose()
 {
@@ -364,11 +335,12 @@
 
     MPIMEventAdapterManager* eventAdapterManager = NULL;
     MPIMEventListAdapter* eventListAdapter = NULL;
-    MPIMLocalizationData* localizationData = NULL;    
+    MPIMLocalizationData* localizationData = NULL;
+
     const TInt n = iAdapterAccesses.Count();
     for (TInt i = 0; i < n; i++)
     {
-        if (iAdapterAccesses[i]->OpenEventListL(iCalSession,aListName,
+        if (iAdapterAccesses[i]->OpenEventListL(aListName,
                                                 &eventAdapterManager, &eventListAdapter, &localizationData))
         {
             // got one
@@ -397,11 +369,12 @@
 
     MPIMToDoAdapterManager* toDoAdapterManager = NULL;
     MPIMToDoListAdapter* toDoListAdapter = NULL;
-    MPIMLocalizationData* localizationData = NULL;    
+    MPIMLocalizationData* localizationData = NULL;
+
     const TInt n = iAdapterAccesses.Count();
     for (TInt i = 0; i < n; i++)
     {
-        if (iAdapterAccesses[i]->OpenToDoListL(iCalSession,aListName, &toDoAdapterManager,
+        if (iAdapterAccesses[i]->OpenToDoListL(aListName, &toDoAdapterManager,
                                                &toDoListAdapter, &localizationData))
         {
             // got one
--- a/javaextensions/pim/tsrc/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-Created-By: 1.3.1_14 (Sun Microsystems Inc.)
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-MIDlet-1: JsrTestRunner,,JsrTestRunner.JsrTestRunner
-MIDlet-Name: JsrTestRunner
-MIDlet-Jar-Size: 7354
-MIDlet-Jar-URL: JsrTestRunner.jar
-ModuleName: PIM
-TestClassName1: com.nokia.mj.test.pim.adaptation.MIDPTest
-MIDlet-Permissions: javax.microedition.pim.ContactList.read,javax.microedition.pim.EventList.read,javax.microedition.pim.ToDoList.read,javax.microedition.pim.ContactList.write,javax.microedition.pim.EventList.write,javax.microedition.pim.ToDoList.write
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
Binary file javaextensions/pim/tsrc/JsrTestRunner.jar has changed
--- a/javaextensions/pim/tsrc/ReadMe.txt	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-
-
-
-Configure properly the path to WTK (Wireless Toolkit)
------------------------------------------------------
-Check that the property 
-	<property name="wtk.home" value="c:/WTK25"/>
-set inside the following file:
-JAVA_SRC_ROOT\tools\junit\JsrTestRunner\build\build.xml
-
-points to the root of the WTK installation
-
-
-RUNNING THE TESTS
-=================
-Execute the following commands at current location
-
-1) ant
-
-After executing the above command the JsrTestRunner.jad , JsrTestRunner.jar in the current directory
-OmjPIMTests.jar files will be created at epoc32\release\winscw\udeb\z\resource\java\jvm\lib\common\
-
-For testing on device,
-
-Transfer JsrTestRunner jad & jar files to c:\Data\installs of the device .
-Transfer OmjPIMTests.jar to epoc32\release\winscw\udeb\z\resource\java\jvm\lib\common\ of the device.
-Install and run the JsrTestRunner MIDlet.
--- a/javaextensions/pim/tsrc/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="OmjPIMTests" default="deploy.ut" basedir=".">
-
-  
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <import file="../../../../build/utilities.xml"/>
-
-  <property name="src.dir" location="./src"/>
-  <property name="build.dir" location="."/>
-  <property name="resource_path" value="${build.dir}/res"/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="jar_dir" value="${classes.dir};${resource_path}"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="pimtests.jar.filename" value="OmjPIMTests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-  
-  <target name="init.my.properties" depends="init.properties">
-      <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${pimtests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-
-  
-
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    
-    <ant antfile="${java.src.root}/tools/junit/JsrTestRunner/build/build.xml">
-    </ant>
-    
-  </target>
-
-  <target name="jar.resources">
-    		<mkdir dir="${classes.dir}/res"/>
-			<copy todir="${classes.dir}/res">
-			    <fileset dir="${resource_path}" />
-			</copy>
-	</target>
-
-  <target name="deploy.ut" depends="compile.ut,init.my.properties,jar.resources">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${pimtests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean"/>
-
-  <target name="cdc" >
-  <antcall target="deploy.ut">
-        <param name="src.dir" location="./javasrc.cdc"/> 
-        <param name="classes.dir" location="${build.dir}/javabuild.cdc"/>
-       </antcall>
-  </target>
-
- </project> 
--- a/javaextensions/pim/tsrc/res/1.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-BEGIN:VCARD
-FN:Jesson Sean John William
-
-N:Jesson;Sean;John William
-;;
-ADR;TYPE=pref,work:;;Manchester
-;Greater Manchester
-;M20 3QX
-;United Kingdom
-;Gubbins
-,More Gubbins
-,Huge heaps of Gubbins
-,Mountain of Gubbins, higher than is possibly feasible.
-,
-NOTE:634 Wilmslow Road
-,Manchester
-,Greater Manchester
-,M20 3QX
-,United Kingdom
-,Gubbins
-,More Gubbins
-,Huge heaps of Gubbins
-,Mountain of Gubbins, higher than is possibly feasible.
-,
-TEL;TYPE=pref,voice,work:0161 447 6808
-
-TEL;TYPE=voice:(home) 0161 860 5306
-
-TEL;TYPE=fax:0161 447 6801
-
-EMAIL;TYPE=internet,pref,work:Sean.Jesson@teleca.com
-
-TITLE:Software Engineer
-
-ORG:Teleca Ltd.
-
-VERSION:3.0
-CLASS:PUBLIC
-END:VCARD
--- a/javaextensions/pim/tsrc/res/3.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-BEGIN:VCARD
-N:Internet Mail Consortium
-FN:Internet Mail Consortium
-ORG:Internet Mail Consortium;
-EMAIL;INTERNET;WORK:info@imc.org
-TEL;WORK;VOICE:+1 831 426 9827
-TEL;WORK;FAX:+1 831 426 7301
-ADR;POSTAL:;;127 Segre Place;Santa Cruz;CA;95060;USA
-LABEL;POSTAL;DOM;ENCODING=QUOTED-PRINTABLE:127 Segre Place=0D=0A=
-     Santa Cruz, CA  95060=0D=0A                        USA
-URL:http://www.imc.org/
-TZ:-08:00
-LOGO;GIF;ENCODING=BASE64:
-    R0lGODlhogBNAPEAAP////+AgP8AAAAAACH5BAEAAAAALAAAAACiAE0AAAL/BISpy+1i
-    opy02ouz3rzTB4aMR5bmiXriCqbuC8cVSy/yjeddzev+/+PRgMRiTLgyKpckZIgJjWKc
-    D6n1eqCOsFyo1tYNG7+J0+B8FqszZEgJDV/LP18T/D7PG+qku18/p2XnFwcoRzVImGa4
-    5mSmuMiohvQIKXlYk2J52TjkQsgZyAKDF4opYpp6kqTauvPkGrsBK1tr0WKbO+Og2yvB
-    6xucBfYT+TZQobihHLOJspXz11coAWlMYY2smX2toiCTrRFeza1Nzl1ZfhKgEPBZbo6t
-    bgB/XR+/fI/fEcCO0L8N3QV49PRF0LdvIEIT/fw1DDjOAkGEaSjmK3UOo4eG/+w4NmMm
-    bt7BehMiKtRYktpGjiw/guIgMGXMjC8lSjuZUAPLnaRAhvQpzxrOm0FVniyxk+cLZz+J
-    2gQqs2ZUo0+RJm35TmoGpk+dJoNa0OvXnBeuKoWIEgPXsWKnUgUAdiwJs2fTpR361i2a
-    pnfjBl1J1yPavGzv6u1WtK/WG4HrHluMd+9WvyMXr43R2PE0yF0N0yRc2etlGJk1dxhd
-    GHTYtp8lt0b8onRSu6pfkw3tGTdV1Chkz07EOnFt3qvTEmfo2zTf2rpdR4ZtW7hz0smV
-    T+acenp26M27CZVR/beH491vFx8O9Tv18FjHUz5sHu57+ZbJc2AvHub88su1S//3bp9O
-    +FnXGXPn+Qdff4ipl8KA+SkYH3/XBXfgggGW5SCB/0VYYXzHXWYSchm2B+Fp830YV4iA
-    jSjYRRRGN2FuHRb4ogUsPvgch/S9iCJ2MyVDwY040shdgjGqxiB8iu0j5JBKRqiibdxF
-    2aFIETTppEVSbqLllrtRxCSWpnVZJZcLPZnXmRKIOSSZO5L0JkFoIhjnhcLokeSd8ugJ
-    Vy/m6AgFoBJt5YOgyxykRjyGvlEoEIs2Co42Ff3pmmSTyofpOat9lak9kXyq1qeWImMM
-    NYVcGsciqkpKKqsljUQPogXNmimtrnYaqq2yghorp32KqmufsQJbq7C9GktpsMeL/imr
-    scLiw6yzkqrVbELROlvNq9kie2y3z2q7bLXijsvted5GK81t11JaabPgnhtuWPBiqyi5
-    625bbr74xmsttfzie+279MabLbTzEnxvtwkjiy64t3470LirkpsSObCWyyyxBku8MLv0
-    0drpqB6HXKq1E5OM6V4InlrpxKa2DG2ryU56a5F8ykIACgA7
-
-REV:19970726T000001
-VERSION:2.1
-END:VCARD
--- a/javaextensions/pim/tsrc/res/6.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-BEGIN:VCARD
-VERSION:3.0
-N:Dawson;Frank
-FN:Frank Dawson
-ORG:Lotus Development Corporation;Communications Products Division
-TZ:-05:00
-TITLE:Consulting Engineer
-EMAIL;TYPE=WORK,PREF,INTERNET:Frank_Dawson@Lotus.com
-EMAIL;TYPE=WORK,INTERNET:fdawson@earthlink.net
-LABEL;TYPE=WORK,PARCEL,POSTAL:6544 Battleford Drive\nRaleigh, NC 27613-
- 3502\nUS
-TEL;TYPE=WORK,PREF,MSG:+1 617-693-8728
-TEL;TYPE=WORK:+1 919-676-9515
-TEL;TYPE=WORK;FAX:+1 617-693-8728
-TEL;TYPE=CELL:+1 919-604-1515 
-ADR;TYPE=WORK,PARCEL,POSTAL:;;6544 Battleford Drive;Raleigh;NC;27613-3502;US
-X-COMPANY-URL:http://www.Lotus.com/calendar
-END:VCARD
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/agent.dat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-ClientClass=com.digia.javatest.Agent.MIDPClient
-ServerAddrs=http://localhost
-TestClass=com.digia.runtime.tests.juttutesti
-ResultEndKey=Connection
-ResultEndValue=completed
-DebugKey=Connection
-DebugValue=debug
-StartTime=StartTime
-Duration=Duration
-Fail=Fail
-Passed=Passed
-LogKey=LogKey
-StartTimer=StartTimer
-StopTimer=StopTimer
-FreeMemory=FreeMemory
-Platform=Platform
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/appointment.vcs	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
-VERSION:1.0
-BEGIN:VEVENT
-DTSTART:20040112T200000Z
-DTEND:20040112T203000Z
-RRULE:D1 20040120T000000Z
-UID:040000008200E00074C5B7101A82E00800000000E0459C0FF85BBF010000000000000000100
- 000003D9A36404FC8D3118F6700C04FA958E9
-CATEGORIES;ENCODING=QUOTED-PRINTABLE:Business
-DESCRIPTION;ENCODING=QUOTED-PRINTABLE:timed appointment
-SUMMARY;ENCODING=QUOTED-PRINTABLE:timed appointment
-PRIORITY:3
-CLASS:PRIVATE
-END:VEVENT
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/res/broken.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-this file is broken
-it is not a vcard file
-beautiful morning
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/invalid1.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-VERSION:1.0
-END:VCALENDAR
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/invalid2.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-BEGIN:VCALENDAR
-BEGIN:VTODO
-END:VTODO
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/res/invalid3.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VTODO
-MYPROPERTY:Test
-END:VTODO
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/res/invalid4.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VEVENT
-CLASS;MyParam:PUBLIC
-END:VEVENT
-END:VCALENDAR
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/invalid5.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VEVENT
-URL;ENCODING=MyEnc:Test
-END:VEVENT
-END:VCALENDAR
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/invalid6.vcf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VEVENT
-END:VCALENDAR
\ No newline at end of file
--- a/javaextensions/pim/tsrc/res/timed-appointment.vcs	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
-VERSION:1.0
-BEGIN:VEVENT
-DTSTART:20000112T200000Z
-DTEND:20000112T203000Z
-UID:040000008200E00074C5B7101A82E00800000000E0459C0FF85BBF010000000000000000100
- 000003D9A36404FC8D3118F6700C04FA958E9
-CATEGORIES;ENCODING=QUOTED-PRINTABLE:Business
-DESCRIPTION;ENCODING=QUOTED-PRINTABLE:timed appointment
-SUMMARY;ENCODING=QUOTED-PRINTABLE:timed appointment
-PRIORITY:3
-CLASS:PRIVATE
-END:VEVENT
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/res/todoPriority1.vcs	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VTODO
-CATEGORIES:X-Unfiled
-STATUS:NEEDS ACTION
-PRIORITY:1
-DESCRIPTION:Priority1
-UID:4104196
-END:VTODO
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/res/todoPriority2.vcs	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:1.0
-BEGIN:VTODO
-CATEGORIES:X-Unfiled
-STATUS:NEEDS ACTION
-PRIORITY:2
-SUMMARY:Priority2
-DESCRIPTION:Priority2
-UID:4104196
-END:VTODO
-END:VCALENDAR
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/ItemTool.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,907 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.adaptation;
-//IMPORTS
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-
-// CLASS DEFINITION
-/**
- * Tool for filling and comparing items.
- */
-public class ItemTool
-{
-    // Constants
-    /**
-     * Constant indicating that only differences between two items
-     * should be logged.
-     */
-    public static final int LOG_DIFF = 1;
-
-    /**
-     * Constant indicating that only equalities within two items
-     * should be logged.
-     */
-    public static final int LOG_EQUAL = 2;
-
-    /**
-     * Constant indicating that both differences and equalities
-     * within two items should be logged.
-     * Same as LOG_DIFF | LOG_EQUAL.
-     */
-    public static final int LOG_ALL = 3;
-
-    // Test data
-    public static final boolean TEST_BOOLEAN = true;
-    public static final long TEST_DATE = 946080000000L;
-    public static final int TEST_INT_CLASS = 200; // Fits also to CLASS
-    public static final int TEST_INT = 5; // Priority etc...
-    public static final String TEST_STRING = "TestString";
-    public static final String TEST_BINARY = "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof\nHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR\nCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA\nAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK\nFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG\nh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl\n5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA\nAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk\nNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE\nhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk\n5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1fx940tvAfhd9Yng+0yGVIYLfeU812OSN\nwU7cKGbkfw46kV80+IPij4m1rcNQvr+380LKkdvOIo45Y5mZGCqu4BRkYLFiyqxY7VA9G/aX\nvriPTvDtgsmLWaWeaRNo+Z0CBTnrwJH/AD9hXimBPZbYV2qtrnzbckYIX51kXP8AEV698DrT\njiZUJKUUvmdeFwqxCkr6rb+v+GV2rnqdp8e9c0/Q4YWtbCe5MQ8hpJDLn96/LkSbhtRVQK2X\nb77OeA3S+F/jfqPiXVBYx6JAjNdWylllysMElyI3dskFmAlhQAD7xZjx8o8CsLXdZh/szyvK\nwEaKgJYqeW3FSFTkA9cn0Ga6/wCDgVPjPo0UcheKNrlYyWz8vky4/wAfxrd4ylNtKmr37smr\ng5UqUaknv/X5a/d0aZ9E/E7wj/wmnga902Jd19F/pNlzj98gOF+8B8wLJknA3Z7V8kvp0f7+\nCVDDqSx7BaMjK8bxkhwwxwx2Hg85J9jX3NXPeIfA3hvxVeW95rGmCe6t0KRzJNJE4U9iyMCR\n1wDnGTjqc8k4uS0dmGGrQpy/eR5ov/hrrzSbt0vr0Pj1rLZbrEbu4a2hZ1usNhAVwcKD3JOB\nnqecV7j8B/h9rGhahe+JdVt5bBJ4HtLezuEImILqxdgcbR8mACMnJPAxu9N8PfD7wr4VnM+j\n6PFBMW3CR3eVkOCuVLk7SQxB24yOua6WlTg47u5eLxEK1uSNred/Ky8v1bP/2Q=="; // an evil face, 32 x 32 pixels, base64-encoded, divided into multiple lines
-
-
-    /**
-     * Hidden constructor.
-     */
-    private ItemTool()
-    {
-    }
-
-
-    /**
-     * Fills given item with all supported fields and attributes,
-     * single value per field. Unexportable fields are not filled.
-     *
-     * Notes:
-     * @li RepeatRule is not filled for Event.
-     */
-    public static void fillItem(PIMItem aItem, PIMList aList)
-    {
-        int[] supportedFields = aList.getSupportedFields();
-        for (int fieldIndex = 0;
-                fieldIndex < supportedFields.length;
-                fieldIndex++)
-        {
-            int field = supportedFields[ fieldIndex ];
-
-            if (!isExportable(field, aItem))
-            {
-                // The field is not OK to export for this item - skip
-                continue;
-            }
-
-            int fieldDataType = aList.getFieldDataType(field);
-            int attributes = getSupportedAttributesCombined(field, aList);
-
-            if (fieldDataType == PIMItem.BINARY)
-            {
-                byte[] binaryValue = createBinaryValue(field, aItem);
-                aItem.addBinary(field,
-                                attributes,
-                                binaryValue,
-                                0,
-                                binaryValue.length);
-            }
-            else if (fieldDataType == PIMItem.BOOLEAN)
-            {
-                aItem.addBoolean(field, attributes, TEST_BOOLEAN);
-            }
-            else if (fieldDataType == PIMItem.DATE)
-            {
-                aItem.addDate(field, attributes, TEST_DATE);
-            }
-            else if (fieldDataType == PIMItem.INT)
-            {
-                if ((field == Contact.CLASS) ||
-                        (field == Event.CLASS) ||
-                        (field == ToDo.CLASS))
-                {
-                    aItem.addInt(field, attributes, TEST_INT_CLASS);
-                }
-                else
-                {
-                    aItem.addInt(field, attributes, TEST_INT);
-                }
-            }
-            else if (fieldDataType == PIMItem.STRING)
-            {
-                aItem.addString(field, attributes, TEST_STRING);
-            }
-            else if (fieldDataType == PIMItem.STRING_ARRAY)
-            {
-                String[] stringArrayValue = createStringArrayValue(
-                                                field,
-                                                aList);
-
-                aItem.addStringArray(field, attributes, stringArrayValue);
-            }
-            // else ..? assume sane types, we're not testing them here
-        }
-    }
-
-
-    /**
-     * Checks whether given field is ok to export for given item
-     * (type), i.e. can it be transformed to serialized form and back
-     * without loss of data, distortion etc.
-     */
-    public static boolean isExportable(int aField, PIMItem aItem)
-    {
-        // principle: pass by default, fail for specific reason
-
-        boolean isOk = true;
-        if (aItem instanceof Contact)
-        {
-            if (aField == Contact.UID)
-            {
-                isOk = false;
-            }
-        }
-        else if (aItem instanceof Event)
-        {
-            if (aField == Event.UID)
-            {
-                isOk = false;
-            }
-        }
-        else  // assume ToDo
-        {
-            if (aField == ToDo.UID)
-            {
-                isOk = false;
-            }
-        }
-        return isOk;
-    }
-
-
-    /**
-     * Works only on Contact.PHOTO which is the only supported
-     * BINARY field in the system.
-     */
-    public static byte[] createBinaryValue(int aField, PIMItem aItem)
-    {
-        return TEST_BINARY.getBytes();
-    }
-
-
-    public static String[] createStringArrayValue(int aField, PIMList aList)
-    {
-        String[] stringArray = null;
-        int numElems = aList.stringArraySize(aField);
-        stringArray = new String[ numElems ];
-        int[] supportedElems = aList.getSupportedArrayElements(aField);
-        // iterate throught the supported elements and fill corresponding
-        // indexes in the string array
-        for (int i = 0; i < supportedElems.length; i++)
-        {
-            int elem = supportedElems[ i ];
-            stringArray[ elem ] = TEST_STRING;
-        }
-        return stringArray;
-    }
-
-
-    public static int getSupportedAttributesCombined(
-        int aField,
-        PIMList aList)
-    {
-        int[] supportedAttributes = aList.getSupportedAttributes(aField);
-        int supportedAttributesCombined = 0;
-        for (int i = 0; i < supportedAttributes.length; i++)
-        {
-            supportedAttributesCombined += supportedAttributes[ i ];
-        }
-        return supportedAttributesCombined;
-    }
-
-
-    //@{
-    /**
-     * Compares two items for equality.
-     *
-     * If the \a aLog has been given, complete comparison is carried
-     * out to some reasonable extent and all found differences are
-     * logged (unless they are of completely different types).
-     *
-     * @param aItem1 First item to be compared.
-     * @param aItem2 Second item to be compared.
-     * @param aLog If not null, log messages about the comparison
-     *        are written here.
-     * @param aList If not null, labels are resolved from this list.
-     * @param aLogOpt Logging options: LOG_DIFF, LOG_EQUAL or LOG_ALL
-     *        or a bitwise combination of these.
-     */
-    public static boolean isEqualItems(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        StringBuffer aLog,
-        PIMList aList)
-    {
-        return isEqualItems(
-                   aItem1,
-                   aItem2,
-                   aLog,
-                   aList,
-                   LOG_ALL);
-    }
-
-    public static boolean isEqualItems(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        StringBuffer aLog,
-        PIMList aList,
-        int aLogOpt)
-    {
-        // Implementation note: The &= assignment for boolean results in
-        // true if and only if both the old value and assigned value
-        // are true. (I.e. the value of a boolean assigned with &= can only
-        // change from true to false, not from false to true.)
-
-        // Compares equality of two items
-        // Logs differences
-
-        logLn(aLog, "Comparison of two items started.");
-
-        boolean isEqual = true;
-
-        isEqual &= isEqualItemType(aItem1, aItem2, aLog);
-
-        // Carry on with the comparison only if the items are of
-        // same item type.
-        if (isEqual)
-        {
-            isEqual &= isEqualContent(aItem1, aItem2, aLog, aList, aLogOpt);
-        }
-
-        if (isEqual)
-        {
-            logLn(aLog, "--- The items are EQUAL.");
-        }
-        else
-        {
-            logLn(aLog, "--- The items DIFFER.");
-        }
-
-        return isEqual;
-    }
-    // @}
-
-
-    public static boolean isEqualItemType(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        StringBuffer aLog)
-    {
-        // it is essential that the initial values are:
-        // 1) not the same
-        // 2) not any of the valid item (list) types
-        int itemType1 = -1;
-        int itemType2 = -2;
-
-        if (aItem1 instanceof Contact)
-        {
-            itemType1 = PIM.CONTACT_LIST;
-            log(aLog, "  First item is Contact, ");
-        }
-        else if (aItem1 instanceof Event)
-        {
-            itemType1 = PIM.EVENT_LIST;
-            log(aLog, "  First item is Event, ");
-        }
-        else if (aItem1 instanceof ToDo)
-        {
-            itemType1 = PIM.TODO_LIST;
-            log(aLog, "  First item is ToDo, ");
-        }
-        else
-        {
-            log(aLog, "First item is of unknown type, ");
-        }
-
-        if (aItem2 instanceof Contact)
-        {
-            itemType2 = PIM.CONTACT_LIST;
-            logLn(aLog, "second item is Contact.");
-        }
-        else if (aItem2 instanceof Event)
-        {
-            itemType2 = PIM.EVENT_LIST;
-            logLn(aLog, "second item is Event.");
-        }
-        else if (aItem2 instanceof ToDo)
-        {
-            itemType2 = PIM.TODO_LIST;
-            logLn(aLog, "second item is ToDo.");
-        }
-        else
-        {
-            logLn(aLog, "second item is of unknown type.");
-        }
-
-        return (itemType1 == itemType2);
-    }
-
-
-    public static boolean isEqualContent(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        StringBuffer aLog,
-        PIMList aList,
-        int aLogOpt)
-    {
-        boolean isEqual = true;
-
-        int[] fields1 = aItem1.getFields();
-        int[] fields2 = aItem2.getFields();
-
-        if (fields1.length == fields2.length)
-        {
-            logLn(aLog, "    Equal amount of fields: " + fields1.length,
-                  LOG_EQUAL, aLogOpt);
-        }
-        else
-        {
-            isEqual = false;
-            logLn(aLog, "    - Different number of fields: "
-                  + fields1.length + " vs " + fields2.length,
-                  LOG_DIFF, aLogOpt);
-        }
-
-        // Iterate through fields in first item.
-        // Log commonalities and fields only in first item.
-        for (int fi1 = 0; fi1 < fields1.length; fi1++)
-        {
-            String fieldString = getFieldId(fields1[ fi1 ], aList);
-
-            int fi2;
-            for (fi2 = 0; fi2 < fields2.length; fi2++)
-            {
-                if (fields1[ fi1 ] == fields2[ fi2 ])
-                {
-                    logLn(aLog, "    Common field: " + fieldString,
-                          LOG_EQUAL, aLogOpt);
-
-                    isEqual &= isEqualValues(
-                                   aItem1,
-                                   aItem2,
-                                   fields1[ fi1 ],
-                                   aLog,
-                                   aList,
-                                   aLogOpt);
-
-                    break; // next field from first item
-                }
-            }
-            if (fi2 == fields2.length)
-            {
-                // no match in the second item
-                isEqual = false;
-                logLn(aLog,  "    - Field in first item only: "
-                      + fieldString,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-
-        // Iterate through fields in second item.
-        // Log fields only in second item.
-        for (int fi2 = 0; fi2 < fields2.length; fi2++)
-        {
-            String fieldString = getFieldId(fields2[ fi2 ], aList);
-
-            int fi1;
-            for (fi1 = 0; fi1 < fields1.length; fi1++)
-            {
-                if (fields2[ fi2 ] == fields1[ fi1 ])
-                {
-                    break; // match - skip; it has been logged already
-                }
-            }
-            if (fi1 == fields1.length)
-            {
-                isEqual = false;
-                logLn(aLog, "    - Field in second item only: "
-                      + fieldString,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-
-        return isEqual;
-    }
-
-
-    public static boolean isEqualValues(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        int aField,
-        StringBuffer aLog,
-        PIMList aList,
-        int aLogOpt)
-    {
-        boolean isEqual = true;
-
-        int numValues1 = aItem1.countValues(aField);
-        int numValues2 = aItem2.countValues(aField);
-
-        String fieldString = getFieldId(aField, aList);
-
-        if (numValues1 == numValues2)
-        {
-            logLn(aLog, "    Equal number of values: " + numValues1,
-                  LOG_EQUAL, aLogOpt);
-        }
-        else
-        {
-            isEqual = false;
-            logLn(aLog, "    * Different number of values in field "
-                  + fieldString + ": "
-                  + numValues1 + " vs " + numValues2,
-                  LOG_DIFF, aLogOpt);
-        }
-
-        if (aList != null)
-        {
-            // Values can be compared only if the list has been
-            // given; without one we cannot determine field types
-
-            int fieldType = aList.getFieldDataType(aField);
-
-            for (int vi1 = 0; vi1 < numValues1; vi1++)
-            {
-                int vi2;
-                for (vi2 = 0; vi2 < numValues2; vi2++)
-                {
-                    isEqual &= isEqualValue(
-                                   aItem1,
-                                   aItem2,
-                                   aField,
-                                   fieldType,
-                                   vi1,
-                                   vi2,
-                                   aLog,
-                                   aList,
-                                   aLogOpt);
-
-                    isEqual &= isEqualAttributes(
-                                   aItem1,
-                                   aItem2,
-                                   aField,
-                                   fieldType,
-                                   vi1,
-                                   vi2,
-                                   aLog,
-                                   aList,
-                                   aLogOpt);
-                }
-            }
-        }
-
-        return isEqual;
-    }
-
-
-    public static boolean isEqualValue(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        int aField,
-        int aFieldType,
-        int aI1,
-        int aI2,
-        StringBuffer aLog,
-        PIMList aList,
-        int aLogOpt)
-    {
-        boolean isEqual = true;
-
-        String fieldId = getFieldId(aField, aList);
-
-        if (aFieldType == PIMItem.BINARY)
-        {
-            byte[] value1 = aItem1.getBinary(aField, aI1);
-            byte[] value2 = aItem2.getBinary(aField, aI2);
-            if (value1.length == value2.length)
-            {
-                for (int i = 0; i < value1.length; i++)
-                {
-                    if (value1[ i ] != value2[ i ])
-                    {
-                        isEqual = false;
-                        break;
-                    }
-                }
-            }
-            else
-            {
-                isEqual = false;
-            }
-
-            if (isEqual == true)
-            {
-                logLn(aLog, "      Equal binary values.",
-                      LOG_EQUAL, aLogOpt);
-            }
-            else
-            {
-                logLn(aLog, "      Binary values differ in field "
-                      + fieldId + " value " + aI1,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-        else if (aFieldType == PIMItem.BOOLEAN)
-        {
-            boolean value1 = aItem1.getBoolean(aField, aI1);
-            boolean value2 = aItem2.getBoolean(aField, aI2);
-            if (value1 == value2)
-            {
-                logLn(aLog, "      Equal values: " +
-                      booleanString(value1),
-                      LOG_EQUAL, aLogOpt);
-            }
-            else
-            {
-                isEqual = false;
-                logLn(aLog, "      Boolean values differ in field "
-                      + fieldId + " value " + aI1 + ": " +
-                      booleanString(value1) + " vs " +
-                      booleanString(value2),
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-        else if (aFieldType == PIMItem.DATE)
-        {
-            long value1 = aItem1.getDate(aField, aI1);
-            long value2 = aItem2.getDate(aField, aI2);
-            if (value1 == value2)
-            {
-                logLn(aLog, "      Equal values: " + value1,
-                      LOG_EQUAL, aLogOpt);
-            }
-            else
-            {
-                isEqual = false;
-                logLn(aLog, "      Date values differ in field "
-                      + fieldId + " value " + aI1 + ": " +
-                      value1 + " vs " + value2,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-        else if (aFieldType == PIMItem.INT)
-        {
-            int value1 = aItem1.getInt(aField, aI1);
-            int value2 = aItem2.getInt(aField, aI2);
-            if (value1 == value2)
-            {
-                logLn(aLog, "      Equal values: " + value1,
-                      LOG_EQUAL, aLogOpt);
-            }
-            else
-            {
-                isEqual = false;
-                logLn(aLog, "      Int values differ in field "
-                      + fieldId + " value " + aI1 + ": " +
-                      value1 + " vs " + value2,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-        else if (aFieldType == PIMItem.STRING)
-        {
-            String value1 = aItem1.getString(aField, aI1);
-            String value2 = aItem2.getString(aField, aI2);
-            if (value1.equals(value2))
-            {
-                logLn(aLog, "      Equal values: \"" + value1 + "\"",
-                      LOG_EQUAL, aLogOpt);
-            }
-            else
-            {
-                isEqual = false;
-                logLn(aLog, "      String values differ in field "
-                      + fieldId + " value " + aI1 + ": \"" + value1
-                      + "\" vs \"" + value2 + "\"",
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-        else if (aFieldType == PIMItem.STRING_ARRAY)
-        {
-            String[] value1 = aItem1.getStringArray(aField, aI1);
-            String[] value2 = aItem2.getStringArray(aField, aI2);
-            // assume that we can only get string arrays of correct size
-            for (int i = 0; i < value1.length; i++)
-            {
-                String elementString = "" + i;
-                if (aList != null &&
-                        aList.isSupportedArrayElement(aField, i))
-                {
-                    elementString = aList.getArrayElementLabel(aField, i)
-                                    + "(" + i + ")";
-                }
-
-                String elem1 = value1[ i ];
-                String elem2 = value2[ i ];
-                if (elem1 == null)
-                {
-                    if (elem2 == null)
-                    {
-                        continue; // two null elements are not very interesting
-                    }
-                    else
-                    {
-                        isEqual = false;
-                        logLn(aLog, "          > Field " + fieldId
-                              + " value " + aI1
-                              + " element " + elementString
-                              + " \"" + elem2 + "\" "
-                              + "only in the second item.",
-                              LOG_DIFF, aLogOpt);
-                    }
-                }
-                else
-                {
-                    if (elem2 == null)
-                    {
-                        isEqual = false;
-                        logLn(aLog, "          < Field " + fieldId
-                              + " value " + aI1
-                              + " element " + elementString
-                              + "\"" + elem1 + "\""
-                              + "only in the first item.",
-                              LOG_DIFF, aLogOpt);
-                    }
-                    else
-                    {
-                        if (elem1.equals(elem2))
-                        {
-                            logLn(aLog, "          Equal elements "
-                                  + elementString + ": "
-                                  + "\"" + elem1 + "\"",
-                                  LOG_EQUAL, aLogOpt);
-                        }
-                        else
-                        {
-                            isEqual = false;
-                            logLn(aLog, "          * Different elements in field "
-                                  + fieldId + " value " + aI1
-                                  + " element " + elementString + ": "
-                                  + "\"" + elem1 + "\" vs \""
-                                  + elem2 + "\"",
-                                  LOG_DIFF, aLogOpt);
-                        }
-                    }
-                }
-            }
-        }
-        // else? assume that we'll get only sane field types
-
-        return isEqual;
-    }
-
-
-    public static String booleanString(boolean aValue)
-    {
-        return (aValue ? "true" : "false");
-    }
-
-
-    public static boolean isEqualAttributes(
-        PIMItem aItem1,
-        PIMItem aItem2,
-        int aField,
-        int aFieldType,
-        int aI1,
-        int aI2,
-        StringBuffer aLog,
-        PIMList aList,
-        int aLogOpt)
-    {
-        boolean isEqual = true;
-
-        String fieldId = getFieldId(aField, aList);
-
-        int attributesCombined1 = aItem1.getAttributes(aField, aI1);
-        int attributesCombined2 = aItem2.getAttributes(aField, aI2);
-
-        int[] attributes1 = extractAttributes(attributesCombined1);
-        int[] attributes2 = extractAttributes(attributesCombined2);
-
-        if (attributes1.length == attributes2.length)
-        {
-            logLn(aLog, "      Equal number of attributes: "
-                  + attributes1.length,
-                  LOG_EQUAL, aLogOpt);
-        }
-        else
-        {
-            isEqual = false;
-            logLn(aLog, "      * Different number of attributes in field "
-                  + fieldId + " value " + aI1 + ": "
-                  + attributes1.length + " vs " + attributes2.length,
-                  LOG_DIFF, aLogOpt);
-        }
-
-        // Iterate through attributes in the first set.
-        // Log commonalities and attributes on in first set.
-        for (int ai1 = 0; ai1 < attributes1.length; ai1++)
-        {
-            String attributeString = getAttributeId(
-                                         attributes1[ ai1 ], aList);
-
-            int ai2;
-            for (ai2 = 0; ai2 < attributes2.length; ai2++)
-            {
-                if (attributes1[ ai1 ] == attributes2[ ai2 ])
-                {
-                    logLn(aLog, "        Equal attribute: "
-                          + attributeString,
-                          LOG_EQUAL, aLogOpt);
-
-                    break; // next attribute from the first set
-                }
-            }
-            if (ai2 == attributes2.length)
-            {
-                // no match in the second set
-                isEqual = false;
-                logLn(aLog, "        - Field " + fieldId
-                      + " value " + aI1
-                      + " attribute in first item only: "
-                      + attributeString,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-
-        // Iterate through attributes in the second set.
-        // Log attributes only in second set.
-        for (int ai2 = 0; ai2 < attributes2.length; ai2++)
-        {
-            String attributeString = getAttributeId(
-                                         attributes2[ ai2 ], aList);
-
-            int ai1;
-            for (ai1 = 0; ai1 < attributes1.length; ai1++)
-            {
-                if (attributes2[ ai2 ] == attributes1[ ai1 ])
-                {
-                    break; // match - skip; it has been logged already
-                }
-            }
-            if (ai1 == attributes1.length)
-            {
-                isEqual = false;
-                logLn(aLog, "        - Field " + fieldId
-                      + " value " + aI1
-                      + " attribute in second item only: "
-                      + attributeString,
-                      LOG_DIFF, aLogOpt);
-            }
-        }
-
-        return isEqual;
-    }
-
-
-    public static int[] extractAttributes(int aAttributes)
-    {
-        Vector attributeArray = new Vector(); // contains Integer objects
-
-        int attributes = aAttributes;
-        int mask = 1;
-        while (attributes > 0)
-        {
-            if ((attributes & mask) == mask)
-            {
-                attributeArray.addElement(new Integer(mask));
-                attributes &= ~mask;
-            }
-            mask *= 2;
-        }
-
-        int[] retVal = new int[ attributeArray.size()];
-        for (int i = 0; i < attributeArray.size(); i++)
-        {
-            retVal[ i ] = ((Integer)(attributeArray.elementAt(i)))
-                          .intValue();
-        }
-        return retVal;
-    }
-
-
-    public static String getFieldId(
-        int aField,
-        PIMList aList)
-    {
-        return aList != null?
-               aList.getFieldLabel(aField) + "(" + aField + ")" :
-               "" + aField;
-    }
-
-
-    public static String getAttributeId(
-        int aAttribute,
-        PIMList aList)
-    {
-        return aList != null ?
-               aList.getAttributeLabel(aAttribute) + "(" + aAttribute + ")" :
-               "" + aAttribute;
-    }
-
-
-    // @{
-    /**
-     * Appends given string to \a aLog if \a aLog is non-null.
-     * Otherwise does nothing.
-     * @param aLog The log to write into.
-     * @param aMsg The message to write.
-     * @param aMsgType Type of the message, LOG_DIFF or LOG_EQUAL.
-     * @param aLogOpt Logging options. If \a aMsgType is found among
-     *        \a aLogOpt, the message is logged; otherwise it is
-     *        discarded.
-     */
-
-    public static void log(
-        StringBuffer aLog,
-        String aMsg)
-    {
-        // Just write it without caring any options
-        log(aLog, aMsg, LOG_ALL, LOG_ALL);
-    }
-
-    public static void log(
-        StringBuffer aLog,
-        String aMsg,
-        int aMsgType,
-        int aLogOpt)
-    {
-        if (aLog != null && ((aLogOpt & aMsgType) == aMsgType))
-        {
-            aLog.append(aMsg);
-        }
-    }
-    // @}
-
-    // @{
-    /**
-     * As log() but appends a newline to the end.
-     */
-    public static void logLn(
-        StringBuffer aLog,
-        String aMsg)
-    {
-        // Just write it without caring any options
-        logLn(aLog, aMsg, LOG_ALL, LOG_ALL);
-    }
-
-
-    public static void logLn(
-        StringBuffer aLog,
-        String aMsg,
-        int aMsgType,
-        int aLogOpt)
-    {
-        if (aLog != null && ((aLogOpt & aMsgType) == aMsgType))
-        {
-            aLog.append(aMsg).append('\n');
-        }
-    }
-    // @}
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/MIDPTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1308 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.test.pim.adaptation;
-
-import j2meunit.framework.*;
-import javax.microedition.lcdui.*;
-import javax.microedition.midlet.MIDlet;
-
-
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.Contact.CConstants.*;
-import com.nokia.mj.test.pim.automatic.Contact.CgetPreferredIndex.*;
-import com.nokia.mj.test.pim.automatic.Contact.CgetPreferredIndexEx.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLcreateContact.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLimportContact.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLmultipleLists.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLremoveContact.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLremoveContactEx.*;
-import com.nokia.mj.test.pim.automatic.Event.EConstants.*;
-import com.nokia.mj.test.pim.automatic.Event.ERepeat.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELConstants.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELcreateEvent.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELgetSupportedRRFields.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELimportEvent.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELitems.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELitemsEx.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELmultipleLists.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELremoveEvent.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELremoveEventEx.*;
-import com.nokia.mj.test.pim.automatic.FieldEmptyException.FEEgetField.*;
-import com.nokia.mj.test.pim.automatic.FieldFullException.FFEgetField.*;
-import com.nokia.mj.test.pim.automatic.PIM.PConstants.*;
-import com.nokia.mj.test.pim.automatic.PIM.PlistPIMlists.*;
-import com.nokia.mj.test.pim.automatic.PIM.PopenPIMlist.*;
-import com.nokia.mj.test.pim.automatic.PIM.PopenPIMlist2.*;
-import com.nokia.mj.test.pim.automatic.PIM.Pserialization.*;
-import com.nokia.mj.test.pim.automatic.PIM.PsupportedSerialFormats.*;
-import com.nokia.mj.test.pim.automatic.PIMException.PEconstants.*;
-import com.nokia.mj.test.pim.automatic.PIMException.PEgetReason.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddBinary.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddBinaryEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddBoolean.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddDate.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddDateEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddInt.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddString.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddStringArray.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIaddStringArrayEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIcategories.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIcommit.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIcommit2.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIConstants.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIgetAttributes.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIgetFields.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIgetPIMList.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIremoveValue.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIremoveValueEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetBinary.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetBinaryEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetBoolean.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetDate.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetDateEx.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetInt.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetString.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetStringArray.*;
-import com.nokia.mj.test.pim.automatic.PIMItem.PIsetStringArrayEx.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLaddCategory.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLattributes.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLclose.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLConstants.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLdeleteCategory.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLfields.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLgetName.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLisCategory.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLitems.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLitems2.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLitems2Ex.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLitemsByCategory.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLrenameCategory.*;
-import com.nokia.mj.test.pim.automatic.PIMList.PLstringArrays.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRintField.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRConstants.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRdates.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRdates2.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRdates3.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRdates4.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRdatesExcept.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRequals.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRequals2.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRexceptDates.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRgetDate.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRgetFields.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRsetDate.*;
-import com.nokia.mj.test.pim.automatic.System.Properties.*;
-import com.nokia.mj.test.pim.automatic.ToDo.TConstants.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLcreateToDo.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLimportToDo.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLitems.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLitemsEx.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLmultipleLists.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLremoveToDo.*;
-import com.nokia.mj.test.pim.automatic.UnsupportedFieldException.UFEgetField.*;
-import com.nokia.mj.test.pim.automatic.OpenMultipleLists.*;
-import com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSerialFormat.*;
-import com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSerialFormatEx.*;
-import com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSFormatInvalid.*;
-import com.nokia.mj.test.pim.automatic.PIM.PtoSerialFormat.PtoSerialFormat.*;
-import com.nokia.mj.test.pim.automatic.PIM.PtoSerialFormat.PtoSerialFormatEx.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldCount.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInMonth.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInWeek.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInYear.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldFrequency.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldInterval.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldMonthInYear.*;
-import com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldWeekInMonth.*;
-
-// Variation imports
-import com.nokia.mj.test.pim.automatic.ContactList.CLcategoryTests.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLfieldsOrder.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLgetAttributes.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLmaxValues.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLserialFormatTests.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLstringMaxLen.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLsupportedArrayElements.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLsupportedAttributes.*;
-import com.nokia.mj.test.pim.automatic.ContactList.CLsupportedFields.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELfieldsOrder.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELserialFormatTests.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELstringMaxLen.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELsupportedFields.*;
-import com.nokia.mj.test.pim.automatic.EventList.ELsupportedRRFields2.*;
-
-import com.nokia.mj.test.pim.automatic.ToDoList.TLfieldsOrder.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLpriorityMappings.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLserialFormatTests.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLstringMaxLen.*;
-import com.nokia.mj.test.pim.automatic.ToDoList.TLsupportedFields.*;
-import com.nokia.mj.test.pim.automatic.Event.Ecommit.*;
-import com.nokia.mj.test.pim.automatic.ToDo.Tcommit.*;
-import com.nokia.mj.test.pim.automatic.Contact.CcommitPartial.*;
-import com.nokia.mj.test.pim.automatic.Contact.CcommitUpdate.*;
-
-import com.nokia.mj.test.pim.automatic.*;
-/**
-
- * <b>TEST CASE SPECIFICATION</b>
- *
-  * <br><br><b>Short description of the module test:</b>
- * <p>
- *
- * <br><br><b>Used stubs and description:</b>
- * <p>
- *
- * <br><br><b>Setting up the environment:</b> See the general test environment specification. <!-- change this if necessary -->
- *
- * <br><br><b>Included test files:</b>
- * <p>
- *
- * <br><br><b>Note whether the test case belongs to the MRT set:</b> No
- * <p>
- *
- */
-
-public class MIDPTest extends TestCase
-{
-    //protected SpedeRunner spede;
-
-    private long iFreeMemoryAtStart;
-
-    public MIDPTest()
-    {
-    }
-
-    public MIDPTest(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-//      spede = (SpedeRunner)SpedeRunner.getInstance();
-    }
-
-    /**
-     * Any pretest setup can be done here
-     */
-    protected void setUp() throws Exception
-    {
-//        if (spede == null) {
-//          spede = (SpedeRunner)SpedeRunner.getInstance();
-//      }
-        iFreeMemoryAtStart = Runtime.getRuntime().freeMemory();
-    }
-
-    /***************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-        try
-        {
-            aSuite.addTest(new CConstants("CConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CgetPreferredIndex("CgetPreferredIndex", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CgetPreferredIndex) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CgetPreferredIndexEx("CgetPreferredIndexEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CgetPreferredIndexEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLcreateContact("CLcreateContact", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLcreateContact) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLimportContact("CLimportContact", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLimportContact) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLmultipleLists("CLmultipleLists", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLmultipleLists) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLremoveContact("CLremoveContact", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLremoveContact) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLremoveContactEx("CLremoveContactEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLremoveContactEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new EConstants("EConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((EConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ERepeat("ERepeat", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ERepeat) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELConstants("ELConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELcreateEvent("ELcreateEvent", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELcreateEvent) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELsupportedRRFields("ELsupportedRRFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELsupportedRRFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELimportEvent("ELimportEvent", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELimportEvent) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELitems("ELitems", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELitems) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELitemsEx("ELitemsEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELitemsEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELmultipleLists("ELmultipleLists", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELmultipleLists) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELremoveEvent("ELremoveEvent", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELremoveEvent) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELremoveEventEx("ELremoveEventEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELremoveEventEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new FEEgetField("FEEgetField", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((FEEgetField) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new FFEgetField("FFEgetField", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((FFEgetField) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PConstants("PConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PfromSerialFormat("PfromSerialFormat", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PfromSerialFormat) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PlistPIMlists("PlistPIMlists", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PlistPIMlists) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PopenPIMlist("PopenPIMlist", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PopenPIMlist) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PopenPIMlist2("PopenPIMlist2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PopenPIMlist2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new Pserialization("Pserialization", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((Pserialization) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PsupportedSerialFormats("PsupportedSerialFormats", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PsupportedSerialFormats) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PtoSerialFormat("PtoSerialFormat", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PtoSerialFormat) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PEconstants("PEconstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PEconstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PEgetReason("PEgetReason", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PEgetReason) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddBinary("PIaddBinary", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddBinary) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddBinaryEx("PIaddBinaryEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddBinaryEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddBoolean("PIaddBoolean", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddBoolean) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddDate("PIaddDate", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddDate) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddDateEx("PIaddDateEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddDateEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddInt("PIaddInt", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddInt) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddString("PIaddString", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddString) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddStringArray("PIaddStringArray", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddStringArray) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIaddStringArrayEx("PIaddStringArrayEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIaddStringArrayEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIcategories("PIcategories", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIcategories) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIcommit("PIcommit", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIcommit) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIcommit2("PIcommit2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIcommit2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIConstants("PIConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIgetAttributes("PIgetAttributes", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIgetAttributes) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIgetFields("PIgetFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIgetFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIgetPIMList("PIgetPIMList", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIgetPIMList) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIremoveValue("PIremoveValue", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIremoveValue) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIremoveValueEx("PIremoveValueEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIremoveValueEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetBinary("PIsetBinary", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetBinary) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetBinaryEx("PIsetBinaryEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetBinaryEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetBoolean("PIsetBoolean", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetBoolean) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetDate("PIsetDate", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetDate) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetDateEx("PIsetDateEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetDateEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetInt("PIsetInt", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetInt) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetString("PIsetString", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetString) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetStringArray("PIsetStringArray", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetStringArray) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PIsetStringArrayEx("PIsetStringArrayEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PIsetStringArrayEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLaddCategory("PLaddCategory", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLaddCategory) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLattributes("PLattributes", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLattributes) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLclose("PLclose", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLclose) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLConstants("PLConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLConstants) tc).runTest();
-                }
-            }));
-
-//          aSuite.addTest(new PLdeleteCategory("PLdeleteCategory", new TestMethod()
-//          {public void run(TestCase tc) throws Throwable {((PLdeleteCategory) tc).runTest();}}));
-
-            aSuite.addTest(new PLfields("PLfields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLfields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLgetName("PLgetName", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLgetName) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLisCategory("PLisCategory", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLisCategory) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLitems("PLitems", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLitems) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLitems2("PLitems2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLitems2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLitems2Ex("PLitems2Ex", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLitems2Ex) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLitemsByCategory("PLitemsByCategory", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLitemsByCategory) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLrenameCategory("PLrenameCategory", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLrenameCategory) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLstringArrays("PLstringArrays", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLstringArrays) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRConstants("RRConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRdates("RRdates", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRdates) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRdates2("RRdates2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRdates2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRdates3("RRdates3", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRdates3) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRdates4("RRdates4", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRdates4) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRdatesExcept("RRdatesExcept", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRdatesExcept) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRequals("RRequals", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRequals) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRequals2("RRequals2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRequals2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRexceptDates("RRexceptDates", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRexceptDates) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRgetDate("RRgetDate", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRgetDate) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRgetFields("RRgetFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRgetFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRsetDate("RRsetDate", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRsetDate) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new SystemPropertiesTest("SystemPropertiesTest", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((SystemPropertiesTest) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TConstants("TConstants", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TConstants) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLcreateToDo("TLcreateToDo", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLcreateToDo) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLimportToDo("TLimportToDo", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLimportToDo) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLitems("TLitems", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLitems) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLitemsEx("TLitemsEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLitemsEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLmultipleLists("TLmultipleLists", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLmultipleLists) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLremoveToDo("TLremoveToDo", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLremoveToDo) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new UFEgetField("UFEgetField", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((UFEgetField) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PfromSerialFormatExTest("PfromSerialFormatExTest", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PfromSerialFormatExTest) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PfromSerialFormatTest("PfromSerialFormatTest", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PfromSerialFormatTest) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PfromSerialFormatInvalid("PfromSerialFormatInvalid", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PfromSerialFormatInvalid) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PtoSerialFormatTest("PtoSerialFormatTest", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PtoSerialFormatTest) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PtoSerialFormatEx("PtoSerialFormatEx", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PtoSerialFormatEx) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldCount("RRintFieldCount", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldCount) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldDayInMonth("RRintFieldDayInMonth", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldDayInMonth) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldDayInWeek("RRintFieldDayInWeek", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldDayInWeek) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldDayInYear("RRintFieldDayInYear", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldDayInYear) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldFrequency("RRintFieldFrequency", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldFrequency) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldInterval("RRintFieldInterval", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldInterval) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldMonthInYear("RRintFieldMonthInYear", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldMonthInYear) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new RRintFieldWeekInMonth("RRintFieldWeekInMonth", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((RRintFieldWeekInMonth) tc).runTest();
-                }
-            }));
-
-            // Variation tests start here. Each release may have different features so tests must
-            // be variated (e.g S60 3.1, S60 3.2, S60 ... )
-
-            aSuite.addTest(new CLcategoryTests("CLcategoryTests", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLcategoryTests) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLfieldsOrder("CLfieldsOrder", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLfieldsOrder) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLgetAttributes("CLgetAttributes", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLgetAttributes) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLmaxValues("CLmaxValues", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLmaxValues) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLserialFormatTests("CLserialFormatTests", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLserialFormatTests) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLstringMaxLen("CLstringMaxLen", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLstringMaxLen) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLsupportedArrayElements("CLsupportedArrayElements", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLsupportedArrayElements) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLsupportedAttributes("CLsupportedAttributes", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLsupportedAttributes) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CLsupportedFields("CLsupportedFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CLsupportedFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELfieldsOrder("ELfieldsOrder", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELfieldsOrder) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELserialFormatTests("ELserialFormatTests", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELserialFormatTests) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELstringMaxLen("ELstringMaxLen", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELstringMaxLen) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELsupportedFields("ELsupportedFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELsupportedFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new ELsupportedRRFields2("ELsupportedRRFields2", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((ELsupportedRRFields2) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLfieldsOrder("TLfieldsOrder", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLfieldsOrder) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLpriorityMappings("TLpriorityMappings", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLpriorityMappings) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLserialFormatTests("TLserialFormatTests", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLserialFormatTests) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLstringMaxLen("TLstringMaxLen", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLstringMaxLen) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new TLsupportedFields("TLsupportedFields", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((TLsupportedFields) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new Ecommit("Ecommit", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((Ecommit) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new Tcommit("Tcommit", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((Tcommit) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CcommitPartial("CcommitPartial", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CcommitPartial) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new CcommitUpdate("CcommitUpdate", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((CcommitUpdate) tc).runTest();
-                }
-            }));
-
-            aSuite.addTest(new PLdeleteCategory("PLdeleteCategory", new TestMethod()
-            {
-                public void run(TestCase tc) throws Throwable
-                {
-                    ((PLdeleteCategory) tc).runTest();
-                }
-            }));
-        }
-        catch (Throwable t)
-        {
-            System.out.println("Exception in test suite framework : "+t.toString());
-            t.printStackTrace();
-            //spede.addToResultsList("<debug>com.digia.javatest.agent.MIDPTest.suite: "+t.toString()+" thrown</debug>");
-        }
-        return aSuite;
-    }
-
-
-    public void passTest()
-    {
-        assertTrue("",true);
-    }
-
-    public void failTest(String aReason)
-    {
-        assertTrue(aReason, false);
-    }
-
-    public void debug(String aDebug)
-    {
-        //spede.addToResultsList("<debug>"+aDebug+"</debug>");
-    }
-
-    public void log(String aLog)
-    {
-        //spede.addToResultsList("<debug>"+aLog+"</debug>");
-    }
-
-    public void startTimer(String aName)
-    {
-        //spede.addToResultsList("<debug>Timer start: "+aName+" "+System.currentTimeMillis()+"</debug>");
-    }
-
-    public void stopTimer(String aName)
-    {
-        //spede.addToResultsList("<debug>Timer stop: "+aName+" "+System.currentTimeMillis()+"</debug>");
-    }
-
-    public void usedMemory()
-    {
-        //spede.addToResultsList("<debug>"+(Runtime.getRuntime().freeMemory()-iFreeMemoryAtStart)+"</debug>");
-    }
-
-    public void assertString(boolean aCondition, String aMessage) throws TestEndThrowable
-    {
-        if (!aCondition)
-        {
-            throw new TestEndThrowable(aMessage);
-        }
-    }
-}
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TestEndThrowable.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.adaptation;
-
-
-// CLASS DEFINITION
-/**
- * This is the test end notification
-
- */
-public class TestEndThrowable extends Throwable
-{
-    public TestEndThrowable()
-    {
-        super();
-    }
-
-    public TestEndThrowable(String aReason)
-    {
-        super(aReason);
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TestParameters.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.adaptation;
-
-
-// IMPORTS
-import java.util.Hashtable;
-import java.util.Vector;
-import java.io.*;
-
-// CLASS DEFINITION
-/**
- * This class is used for obtaining parameters from the parameter
- * file that is in jar. By default it is named as "agent.dat" in
- * root of jar.
- */
-
-
-public class TestParameters
-{
-    // Protected fields
-    //protected String iParameterFile; // = "/res/agent.dat";
-    protected Hashtable iParameters;
-
-    // Private fields
-    //private static TestParameters iInstance;
-
-    /**
-     * Constructs a new TestParameter instance and loads
-     * parameters from the "/agent.dat" file.
-     *
-     * @param ?parameter ?parameter_description
-     * @exception ? exception ?exception_description
-     */
-    /*
-    private TestParameters()
-        {
-        loadParameters( iParameterFile );
-        }
-    */
-    /**
-     * Constructs a new TestParameter instance and loads
-     * parameters from the specified file.
-     *
-     * @param aParameterFile Filename for parameters
-     */
-    public TestParameters(String aParameterFile)
-    {
-        loadParameters(aParameterFile);
-    }
-
-    /**
-     * Deletes this instance just in case.
-     * This is needed if the VM does not do it
-     * or some other strangel problem
-     */
-    public void close()
-    {
-        //iInstance = null;
-    }
-
-    /**
-     * Returns whether the specified key is mapped in
-     * parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return if the searched key exists
-     *
-     */
-    public boolean containsKey(String aKey)
-    {
-        if (iParameters == null)
-        {
-            return false;
-        }
-        return iParameters.containsKey(aKey);
-    }
-
-
-    /**
-     * Returns the value to which the specified key is mapped in
-     * parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return The value of the specified key or <code>null</code>
-     *         if key cannot be found.
-     *
-     */
-    public String getParameter(String aKey)
-    {
-        if (!containsKey(aKey))
-        {
-            System.out.println("Key "+aKey+" not found in properties file(s).");
-            return null;
-        }
-        return (String)iParameters.get(aKey);
-
-    }
-
-    /**
-     * Returns multiple values to which the specified key
-     * is mapped in parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return The values of the specified key or <code>null</code>
-     *         if key cannot be found.
-     *
-     */
-    public String[] getArrayParameter(String aKey)
-    {
-        Vector v = getVectorParameter(aKey);
-
-        String[] ret = new String[ v.size()];
-        for (int i = 0; i < v.size(); i++)
-        {
-            ret[i] = (String) v.elementAt(i);
-        }
-        return ret;
-    }
-
-    /**
-     * Returns multiple values to which the specified key
-     * is mapped in parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return The values of the specified key or <code>null</code>
-     *         if key cannot be found.
-     *
-     */
-    public Vector getVectorParameter(String aKey)
-    {
-        String value = getParameter(aKey);
-
-        Vector v = new Vector();
-        int commaIndex = value.indexOf(',');
-        while (commaIndex > 0)
-        {
-            String item = value.substring(0, commaIndex);
-            v.addElement(item.trim());
-            value = value.substring(commaIndex+1);
-            commaIndex = value.indexOf(',');
-        }
-        // add last one
-        if (value.length() > 0)
-        {
-            v.addElement(value.trim());
-        }
-
-        return v;
-    }
-
-    /**
-     * Returns the value to which the specified key is mapped in
-     * parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return The integer value of the specified key or 0
-     *         if key cannot be found.
-     *
-     */
-    public int getIntParameter(String aKey)
-    {
-        String val = getParameter(aKey);
-        int ret = parseInt(val);
-        return ret;
-    }
-
-    /**
-     * Returns multiple values to which the specified key
-     * is mapped in parameters
-     *
-     * @param aKey Searched key from the parameters
-     * @return The values of the specified key or <code>null</code>
-     *         if key cannot be found.
-     *
-     */
-    public int[] getArrayParameterInt(String aKey)
-    {
-        Vector v = getVectorParameter(aKey);
-
-        int[] ret = new int[ v.size()];
-        for (int i = 0; i < v.size(); i++)
-        {
-            String val = (String)v.elementAt(i);
-            ret[i] = parseInt(val);
-        }
-        return ret;
-    }
-
-    // converts String to int
-    private int parseInt(String aValue)
-    {
-        int ret = 0;
-
-        try
-        {
-            if (aValue.startsWith("0x"))    // hexadecimal
-            {
-                ret = Integer.parseInt(aValue.substring(2), 16);
-            }
-            else                        // decimal
-            {
-                ret = Integer.parseInt(aValue, 10);
-            }
-        }
-        catch (NumberFormatException e)
-        {
-            System.out.println("Exception while parsing String <"+aValue+"> to int. returned 0.");
-            return ret;
-        }
-        return ret;
-    }
-
-    /**
-     * Loads the parameter file. Overwrite to read parameters
-     * from somewhere else than file.
-     *
-     * @param aName Filename for the parameters
-     */
-    protected void loadParameters(String aName)
-    {
-        InputStream paraStream = getClass().getResourceAsStream(aName);
-        if (paraStream == null)
-        {
-            return;
-        }
-        // InputStreamReader is used for possible char encoding reasons
-        InputStreamReader isr = new InputStreamReader(paraStream);
-        char[] params = new char[ 5543 * 4 ];   // ask AL, JH, MV & ES for more
-        int bytesRead = 0;
-        try
-        {
-            bytesRead = isr.read(params);
-        }
-        catch (IOException ioe)
-        {
-            System.out.println("com.digia.javatest.agent.TestParameters.loadParameters: Exception while reading: " + ioe);
-            ioe.printStackTrace();
-            throw new RuntimeException("Failed to read parameter file");
-        }
-        finally
-        {
-            try
-            {
-                isr.close();
-                paraStream.close();
-            }
-            catch (IOException ioe)
-            {
-                // ignored
-            }
-        }
-        if (bytesRead > 0)
-        {
-            //parsing string
-            parseString(new String(params, 0, bytesRead));
-        }
-    }
-
-    /**
-     * Parses the parameters from the string and puts them
-     * to the hashtable. Parameters must be in the following syntax:
-     * <code>
-     * key=value;
-     * key2=value 2;
-     * </code>
-     * notice that key and value can contain spaces but only value can
-     * contain '=' char. Overwrite to make parser for other syntax.
-     *
-     * @param aParams Parsed String
-     */
-    protected void parseString(String aParams)
-    {
-        iParameters = new Hashtable();
-        int indx = 0;
-        int startIndx = 0;
-        while ((indx = aParams.indexOf('\n', indx)) != -1)
-        {
-            String line = aParams.substring(startIndx, indx);
-            int keyEnd = line.indexOf('=');
-            String key = line.substring(0, line.length() - 1);
-            if (keyEnd > 0)
-            {
-                key = line.substring(0, keyEnd);
-            }
-            String value = "";
-            try
-            {
-                // from '=' to the end, without carriage return
-                value = line.substring(keyEnd + 1, line.length() - 1);
-            }
-            catch (IndexOutOfBoundsException ioobe)
-            {
-                // there is no value, adding empty
-            }
-            // also remove whitespace from the end and beginning of Strings
-            iParameters.put(key.trim(), value.trim());
-            indx++;
-            startIndx = indx;
-        }
-
-        // last line may not have line break
-        try
-        {
-            String line = aParams.substring(startIndx);
-            String key = line.substring(0, line.indexOf('='));
-            String value = line.substring(line.indexOf('=') + 1);
-            iParameters.put(key.trim(), value.trim());
-        }
-        catch (Exception e)
-        {
-            // there was not valid last line
-        }
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/adaptation/TimeTool.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.adaptation;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-
-// CLASS DEFINITION
-/**
- */
-public class TimeTool
-{
-    private static long iMillis2000 = 946677600000L;
-    private static long[] daysInMonth = { 31L, 28L, 31L, 30L, 31L, 30L, 31L, 31L, 30L, 31L, 30L, 31L };
-
-    // datestamp must be in format: YYMMDD:HHMMSS.sss, in which first part
-    // must be present. If millisecond part is missing it will be 0.
-    // If also the HHMMSS part is missing it will also be 0.
-    //
-    // Note: years begin from 00 (==2000)
-    // Note: months begin from 01
-    // Note: days begin from 01
-    public static long getTimeInMillis(String datestamp)
-    {
-        long years, months, days, hours, minutes, seconds, millis;
-
-        // parse milliseconds
-        int pIndex = datestamp.indexOf('.');
-        if (pIndex < 0)
-        {
-            millis = 0;
-        }
-        else
-        {
-            millis = Long.parseLong(datestamp.substring(pIndex + 1));
-        }
-
-        // parse hours, minutes and seconds
-        int cIndex = datestamp.indexOf(':');
-        if (cIndex < 0)
-        {
-            millis = 0;
-            seconds = 0;
-            minutes = 0;
-            hours = 0;
-        }
-        else
-        {
-            hours = Long.parseLong(datestamp.substring(cIndex + 1, cIndex + 1 + 2));
-            minutes = Long.parseLong(datestamp.substring(cIndex + 1 + 2, cIndex + 1 + 4));
-            seconds = Long.parseLong(datestamp.substring(cIndex + 1 + 4, cIndex + 1 + 6));
-        }
-
-        // parse years, months and days
-        years = Long.parseLong(datestamp.substring(0, 2));
-        months = Long.parseLong(datestamp.substring(2, 4));
-        days = Long.parseLong(datestamp.substring(4, 6));
-
-        // then just simple calculations
-
-        long value = iMillis2000;
-
-        // add millis
-        value += millis;
-
-        // add seconds
-        value += seconds * 1000L;
-
-        // add minutes
-        value += minutes * 60 * 1000L;
-
-        // add hours
-        value += hours * 60 * 60 * 1000L;
-
-        // add days
-        value += (days-1) * 24 * 60 * 60 * 1000L;
-
-        // add months
-        long tmp = 0;
-        for (int i=0; i < months-1; i++)
-        {
-            tmp += daysInMonth[i];
-        }
-        value += tmp * 24 * 60 * 60 * 1000L;
-
-        // add years
-        value += years * 365 * 24 * 60 * 60 * 1000L;
-
-        // add leapdays
-        value += (years/4) * (24 * 60* 60 * 1000L); // add 1 day after each 4 years
-
-        // 2000 is a leap year, so add 1 day in any year if february is passed
-        if (months > 2)
-        {
-            value += (24 * 60* 60 * 1000L);
-        }
-
-        // that's it folks!
-        return value;
-    }
-
-    public static long[] getTimeInMillis(String aDates[])
-    {
-        long[] values = new long[aDates.length];
-
-        for (int i=0; i < aDates.length; i++)
-        {
-            values[i] = getTimeInMillis(aDates[i]);
-        }
-        return values;
-    }
-
-    public static void test()
-    {
-        String[] dates = { "000101:000000.000", "000101:000000", "000101",
-                           "010101:235959.999", "010102:000000.000",
-                           "010131:080000", "010201:080000",
-                           "000229:235959.999", "000301:000000.000",
-                           "040101:000000", "040201:000000"
-                         };
-
-        System.out.println("TimeTool TEST:");
-
-        for (int i=0; i < dates.length; i++)
-        {
-            System.out.println("Time "+dates[i]+" as long= "+getTimeInMillis(dates[i]));
-        }
-
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CConstants/CConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Contact.CConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.Contact;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests that Contact class constants equal specification.
- *
- */
-public class CConstants
-        extends MIDPTest
-{
-
-    public CConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        if (Contact.ADDR_POBOX != 0)
-        {
-            failTest("Contact.ADDR_POBOX != 0");
-        }
-        if (Contact.NAME_FAMILY != 0)
-        {
-            failTest("Contact.NAME_FAMILY != 0");
-        }
-        if (Contact.ADDR_EXTRA != 1)
-        {
-            failTest("Contact.ADDR_EXTRA != 1");
-        }
-        if (Contact.ATTR_ASST != 1)
-        {
-            failTest("Contact.ATTR_ASST != 1");
-        }
-        if (Contact.NAME_GIVEN != 1)
-        {
-            failTest("Contact.NAME_GIVEN != 1");
-        }
-        if (Contact.ADDR_STREET != 2)
-        {
-            failTest("Contact.ADDR_STREET != 2");
-        }
-        if (Contact.ATTR_AUTO != 2)
-        {
-            failTest("Contact.ATTR_AUTO != 2");
-        }
-        if (Contact.NAME_OTHER != 2)
-        {
-            failTest("Contact.NAME_OTHER != 2");
-        }
-        if (Contact.ADDR_LOCALITY != 3)
-        {
-            failTest("Contact.ADDR_LOCALITY != 3");
-        }
-        if (Contact.NAME_PREFIX != 3)
-        {
-            failTest("Contact.NAME_PREFIX != 3");
-        }
-        if (Contact.ADDR_REGION != 4)
-        {
-            failTest("Contact.ADDR_REGION != 4");
-        }
-        if (Contact.ATTR_FAX != 4)
-        {
-            failTest("Contact.ATTR_FAX != 4");
-        }
-        if (Contact.NAME_SUFFIX != 4)
-        {
-            failTest("Contact.NAME_SUFFIX != 4");
-        }
-        if (Contact.ADDR_POSTALCODE != 5)
-        {
-            failTest("Contact.ADDR_POSTALCODE != 5");
-        }
-        if (Contact.ADDR_COUNTRY != 6)
-        {
-            failTest("Contact.ADDR_COUNTRY != 6");
-        }
-        if (Contact.ATTR_HOME != 8)
-        {
-            failTest("Contact.ATTR_HOME != 8");
-        }
-        if (Contact.ATTR_MOBILE != 16)
-        {
-            failTest("Contact.ATTR_MOBILE != 16");
-        }
-        if (Contact.ATTR_OTHER != 32)
-        {
-            failTest("Contact.ATTR_OTHER != 32");
-        }
-        if (Contact.ATTR_PAGER != 64)
-        {
-            failTest("Contact.ATTR_PAGER != 64");
-        }
-        if (Contact.ADDR != 100)
-        {
-            failTest("Contact.ADDR != 100");
-        }
-        if (Contact.BIRTHDAY != 101)
-        {
-            failTest("Contact.BIRTHDAY != 101");
-        }
-        if (Contact.CLASS != 102)
-        {
-            failTest("Contact.CLASS != 102");
-        }
-        if (Contact.EMAIL != 103)
-        {
-            failTest("Contact.EMAIL != 103");
-        }
-        if (Contact.FORMATTED_ADDR != 104)
-        {
-            failTest("Contact.FORMATTED_ADDR != 104");
-        }
-        if (Contact.FORMATTED_NAME != 105)
-        {
-            failTest("Contact.FORMATTED_NAME != 105");
-        }
-        if (Contact.NAME != 106)
-        {
-            failTest("Contact.NAME != 106");
-        }
-        if (Contact.NICKNAME != 107)
-        {
-            failTest("Contact.NICKNAME != 107");
-        }
-        if (Contact.NOTE != 108)
-        {
-            failTest("Contact.NOTE != 108");
-        }
-        if (Contact.ORG != 109)
-        {
-            failTest("Contact.ORG != 109");
-        }
-        if (Contact.PHOTO != 110)
-        {
-            failTest("Contact.PHOTO != 110");
-        }
-        if (Contact.PHOTO_URL != 111)
-        {
-            failTest("Contact.PHOTO_URL != 111");
-        }
-        if (Contact.PUBLIC_KEY != 112)
-        {
-            failTest("Contact.PUBLIC_KEY != 112");
-        }
-        if (Contact.PUBLIC_KEY_STRING != 113)
-        {
-            failTest("Contact.PUBLIC_KEY_STRING != 113");
-        }
-        if (Contact.REVISION != 114)
-        {
-            failTest("Contact.REVISION != 114");
-        }
-        if (Contact.TEL != 115)
-        {
-            failTest("Contact.TEL != 115");
-        }
-        if (Contact.TITLE != 116)
-        {
-            failTest("Contact.TITLE != 116");
-        }
-        if (Contact.UID != 117)
-        {
-            failTest("Contact.UID != 117");
-        }
-        if (Contact.URL != 118)
-        {
-            failTest("Contact.URL != 118");
-        }
-        if (Contact.ATTR_PREFERRED != 128)
-        {
-            failTest("Contact.ATTR_PREFERRED != 128");
-        }
-        if (Contact.CLASS_CONFIDENTIAL != 200)
-        {
-            failTest("Contact.CLASS_CONFIDENTIAL != 200");
-        }
-        if (Contact.CLASS_PRIVATE != 201)
-        {
-            failTest("Contact.CLASS_PRIVATE != 201");
-        }
-        if (Contact.CLASS_PUBLIC != 202)
-        {
-            failTest("Contact.CLASS_PUBLIC != 202");
-        }
-        if (Contact.ATTR_SMS != 256)
-        {
-            failTest("Contact.ATTR_SMS != 256");
-        }
-        if (Contact.ATTR_WORK != 512)
-        {
-            failTest("Contact.ATTR_WORK != 512");
-        }
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CcommitPartial/CcommitPartial.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,494 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Contact.CcommitPartial;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests that partial contacts work correctly
- */
-public class CcommitPartial
-        extends MIDPTest
-{
-
-    private ContactList iContactList;
-    private Contact iContact;
-    Date iCurrentDate = new Date();
-    private static final String TEST_CATEGORY = "my category";
-
-    private static final String iPicture =
-        "/9j/4AAQSkZJRgABAQAAAQABAAD//gAoCgoKMDUuMDMuMjAwNAoxMTo0NjozNgpNb2RlPTIK\n" +
-        "MC4xCjMuMAr/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0\n" +
-        "KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7\n" +
-        "Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABgAFADASIAAhEB\n" +
-        "AxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\n" +
-        "AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0\n" +
-        "NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZ\n" +
-        "mqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3\n" +
-        "+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQA\n" +
-        "AQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygp\n" +
-        "KjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaX\n" +
-        "mJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3\n" +
-        "+Pn6/9oADAMBAAIRAxEAPwCiGFO3ColjlPAFWI7G4cdMVy8jZ2upFbke4dqCxq6mlkDMkmKe\n" +
-        "be1iHLFz7VSpNmbrx6GaXPpik3segq1LJGeEQAe1QhSfYVqsO3uR7fyIwJCOlTJauwyWFJwK\n" +
-        "tWrEtt9a0dBJEuvIZHYFyBmm3dmkDhBycc1twRCJC561k3MhknZiMc9DWE4pIqlOUpasnRkT\n" +
-        "7q804zSEYXgUskXluRjNM5Y4BrY5rjNryPjJYmmSQOZCozxV+3RUOTVyOOJ+wOaqLsS2ZBsm\n" +
-        "SPeR9Kqywui7mGB2rpii4wQMCqM1uLqTk4UdKtTfUSZgc59q0tOi3SA+9V7u1Nu+M5B5BqxZ\n" +
-        "SlFUjtW2jQ2zTnzuC/wis69tTkSoOCOfrV3zhKQOhqyEXyCrYOa5JxvoXCbi7lG7ADZ9DUGe\n" +
-        "gqxd8OR71WwDIabIJogCCzH5RU8V3GrbSvHrVeQHAj9OTU0USuhUiglluQkoSpypHFQzApbh\n" +
-        "V4Lnn6Ulqx3tCx5HSn3OFRCxFAindW5a2weccg1mRM0Z61u8S2zAcnFYTLiTBraDtoWiykp3\n" +
-        "DmtK0uPNwjHmshetOWYqcg9DVNXQ7GpfJ827HeqQI8zHvV26fcGFZu75s5wRXOxFlm5JqWKT\n" +
-        "C5FUzJjP5ikWcLwTxSCxGb95L4/NtwcCp793kgXbOHYH7oNZl1JGZdyDBPU0QXBUjmspTsbx\n" +
-        "pX1NrTpT5YD9e9Z9wrfaG28jJ6UG5GMhuab9oOzKH5u9Cr26FKixu8gE0m/jGaGUldx6VEzb\n" +
-        "RXZCSZk0bVyTjNZUzsrZ6VqykOtZ9xDxzWDEtyo1y2eTTTIXHJpzw4qAoQeKyaZupR7CnFJ9\n" +
-        "M07Y3YU9Ld3PJAFRys050Rg/UmpBuzjnPoKsG3VMKPxq1bQx5zgZqlDuZyq9jP8AmUYK9e9M\n" +
-        "foc1f2bpMe9STWiOQuO3UVvBqJi5N7k21iuVYE+lRurYyw4qAmUkHPNSC4kXhsGpuKwPFG6Z\n" +
-        "RsH3qubcdSwqUneM4x9KnitY3AZpoxnsz4pXCxXihQDkbjUot8HKg1pQ2KkDEkJ+ki/41YFk\n" +
-        "QMb4s/8AXRf8aegWZlCDKkEZJojgkQ5ArU+xspHzw/8Af1f8anjsmIzui/7+L/jRoFjEWB1c\n" +
-        "sV709twkDbTitg2LH+KP/v4v+NRy2jKCS0eP+ui/40aAAP/Z";
-
-    public CcommitPartial(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        openContactList();
-        try
-        {
-            Enumeration items = iContactList.items();
-            while (items.hasMoreElements())
-            {
-                Contact contact = (Contact)items.nextElement();
-                iContactList.removeContact(contact);
-
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitPartial::initTest - unable to remove all contacts");
-        }
-
-        closeContactList();
-    }
-
-    public void runTest() throws Throwable
-    {
-        initTest();
-
-        int valueCount = 0;
-        // Open the default contact list
-        openContactList();
-        // Create a new contact item
-        iContact = iContactList.createContact();
-
-        // Initialize the new contact with test data
-        int[] supportedFields = iContactList.getSupportedFields();
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            String label = iContactList.getFieldLabel(supportedFields[ i ]);
-            addField(iContact, supportedFields[ i ], label);
-            valueCount++;
-        }
-
-        log("CcommitPartial::runTest - phase 1");
-        // Check that the values are correct
-        checkContact(iContact, supportedFields, valueCount);
-        // Commit the changes and check the value count again
-        iContact.commit();
-        checkContact(iContact, supportedFields, valueCount);
-        // Close the list, get new list and check the partial contact
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 2");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        checkContact(iContact, supportedFields, valueCount);
-        // Commit the changes and check the value count again
-        iContact.commit();
-        checkContact(iContact, supportedFields, valueCount);
-        // Close the list, get new list and check the partial contact
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 3");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        // Commit the contact and check the value count
-        iContact.commit();
-        checkContact(iContact, supportedFields, valueCount);
-        // Close the list, get new list and check the partial contact
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 4");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        // Commit the contact and check the value count
-        iContact.commit();
-        checkFieldByField(iContact, supportedFields, valueCount);
-        // Close the list, get new list and check the partial contact
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 5");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        checkFieldByField(iContact, supportedFields, valueCount);
-        // Commit the contact and check the value count
-        iContact.commit();
-        checkFieldByField(iContact, supportedFields, valueCount);
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 6");
-        openContactList();
-        iContactList.addCategory(TEST_CATEGORY);
-
-        iContact = (Contact)iContactList.items().nextElement();
-        iContact.addToCategory(TEST_CATEGORY);
-        checkCategoryInformation(iContact, TEST_CATEGORY, true);
-        iContact.commit();
-        checkCategoryInformation(iContact, TEST_CATEGORY, true);
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 7");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        checkCategoryInformation(iContact, TEST_CATEGORY, true);
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 8");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        iContact.commit();
-        checkCategoryInformation(iContact, TEST_CATEGORY, true);
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 9");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        iContact.removeFromCategory(TEST_CATEGORY);
-        checkCategoryInformation(iContact, TEST_CATEGORY, false);
-        iContact.commit();
-        checkCategoryInformation(iContact, TEST_CATEGORY, false);
-        closeContactList();
-
-        log("CcommitPartial::runTest - phase 10");
-        openContactList();
-        iContact = (Contact)iContactList.items().nextElement();
-        checkCategoryInformation(iContact, TEST_CATEGORY, false);
-        checkContact(iContact, supportedFields, valueCount);
-
-        iContactList.deleteCategory(TEST_CATEGORY, false);
-        closeContactList();
-    }
-
-    private void checkCategoryInformation(Contact aContact, String aCategory, boolean aBelongsToCategory)
-    {
-        String[] categories = aContact.getCategories();
-        boolean found = false;
-
-        for (int i = 0; i < categories.length; i++)
-        {
-            if (categories[ i ].equals(aCategory))
-            {
-                found = true;
-            }
-        }
-
-        if (aBelongsToCategory && !found)
-        {
-            failTest("CcommitPartial::checkCategoryInformation - The item does not belongs to the category as it should");
-        }
-        else if (!aBelongsToCategory && found)
-        {
-            failTest("CcommitPartial::checkCategoryInformation - The item belongs to the category when it shouldn't");
-        }
-    }
-
-    private void checkFieldByField(
-        Contact aContact,
-        int[] aFields,
-        int aExpectedValueCount)
-    throws TestEndThrowable
-    {
-        // Check each field
-        for (int i = 0; i < aFields.length; i++)
-        {
-            String label = iContactList.getFieldLabel(aFields[ i ]);
-            int field = aFields[ i ];
-            System.out.println("CcommitPartial::checkFieldByField - testing field " + field);
-            switch (iContactList.getFieldDataType(field))
-            {
-            case PIMItem.STRING:
-            {
-                if (field != Contact.UID &&
-                        field != Contact.FORMATTED_NAME &&
-                        !(aContact.getString(field, 0).equals(label)))
-                {
-                    failTest("CcommitPartial::checkFieldByField - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] array = new String[ iContactList.stringArraySize(field)];
-                for (int j = 0; j < array.length; j++)
-                {
-                    array[ j ] = label + j;
-                }
-                String[] retArray = aContact.getStringArray(field, 0);
-                for (int j = 0; j < array.length; j++)
-                {
-                    if (!retArray[ j ].equals(array[ j ]))
-                    {
-                        failTest("CcommitPartial::checkFieldByField - field's " + field + " array element " + j + " value is incorrect");
-                    }
-                }
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                long date = aContact.getDate(field, 0);
-                if (field != Contact.REVISION &&
-                        field != Contact.BIRTHDAY &&
-                        field != 0x1005008 &&
-                        date != iCurrentDate.getTime())
-                {
-                    failTest("CcommitPartial::checkFieldByField - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                if (aContact.getBoolean(field, 0) != true)
-                {
-                    failTest("CcommitPartial::checkFieldByField - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.INT:
-            {
-                if (aContact.getInt(field, 0) != 202)
-                {
-                    failTest("CcommitPartial::checkFieldByField - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                String picture = new String(aContact.getBinary(field, 0));
-                System.out.println("CcommitPartial::checkContact - binary " + picture);
-                break;
-            }
-            default:
-            {
-                break;
-            }
-            }
-            try
-            {
-                aContact.commit();
-                if (aContact.getFields().length != aExpectedValueCount)
-                {
-                    failTest("CcommitPartial::checkFieldByField - unexpected number of values in the contact");
-                }
-                aContact.commit();
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-                failTest("CcommitPartial::checkFieldByField - unable to commit item");
-            }
-        }
-    }
-
-    private void checkContact(
-        Contact aContact,
-        int[] aFields,
-        int aExpectedValueCount)
-    throws TestEndThrowable
-    {
-        if (aContact.getFields().length != aExpectedValueCount)
-        {
-            failTest("CcommitPartial::checkContact - unexpected number of values in the contact");
-        }
-
-        // Check each field
-        for (int i = 0; i < aFields.length; i++)
-        {
-            String label = iContactList.getFieldLabel(aFields[ i ]);
-            int field = aFields[ i ];
-            switch (iContactList.getFieldDataType(field))
-            {
-            case PIMItem.STRING:
-            {
-                if (field != Contact.UID &&
-                        field != Contact.FORMATTED_NAME &&
-                        !(aContact.getString(field, 0).equals(label)))
-                {
-                    failTest("CcommitPartial::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] array = new String[ iContactList.stringArraySize(field)];
-                for (int j = 0; j < array.length; j++)
-                {
-                    array[ j ] = label + j;
-                }
-                String[] retArray = aContact.getStringArray(field, 0);
-                for (int j = 0; j < array.length; j++)
-                {
-                    if (!retArray[ j ].equals(array[ j ]))
-                    {
-                        failTest("CcommitPartial::checkContact - field's " + field + " array element " + j + " value is incorrect");
-                    }
-                }
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                long date = aContact.getDate(field, 0);
-                if (field != Contact.REVISION &&
-                        field != Contact.BIRTHDAY &&
-                        field != 0x1005008 &&
-                        date != iCurrentDate.getTime())
-                {
-                    failTest("CcommitPartial::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                if (aContact.getBoolean(field, 0) != true)
-                {
-                    failTest("CcommitPartial::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.INT:
-            {
-                if (aContact.getInt(field, 0) != 202)
-                {
-                    failTest("CcommitPartial::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                String picture = new String(aContact.getBinary(field, 0));
-                System.out.println("CcommitPartial::checkContact - binary " + picture);
-                break;
-            }
-            default:
-            {
-                break;
-            }
-            }
-        }
-    }
-
-    private void openContactList() throws TestEndThrowable
-    {
-        try
-        {
-            iContactList = (ContactList)PIM.getInstance().openPIMList(
-                               PIM.CONTACT_LIST, PIM.READ_WRITE);
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitPartial::openContactList - unable to open contact list");
-        }
-    }
-
-    private void closeContactList()
-    {
-        try
-        {
-            iContactList.close();
-            iContactList = null;
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitPartial::closeContactList - unable to close the list");
-        }
-    }
-
-    private void addField(Contact aContact, int aField, String aLabel) throws TestEndThrowable
-    {
-        try
-        {
-            switch (iContactList.getFieldDataType(aField))
-            {
-            case PIMItem.STRING:
-            {
-                aContact.addString(aField, PIMItem.ATTR_NONE, aLabel);
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] array = new String[ iContactList.stringArraySize(aField)];
-                for (int i = 0; i < array.length; i++)
-                {
-                    array[ i ] = aLabel + i;
-                }
-                aContact.addStringArray(aField, PIMItem.ATTR_NONE, array);
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                aContact.addDate(aField, PIMItem.ATTR_NONE, iCurrentDate.getTime());
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                aContact.addBoolean(aField, PIMItem.ATTR_NONE, true);
-                break;
-            }
-            case PIMItem.INT:
-            {
-                aContact.addInt(aField, PIMItem.ATTR_NONE, 202);
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                aContact.addBinary(aField, PIMItem.ATTR_NONE, iPicture.getBytes(), 0, iPicture.getBytes().length);
-                break;
-            }
-            default:
-            {
-                break;
-            }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitPartial::addField - unable add value to field " + aField);
-        }
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CcommitUpdate/CcommitUpdate.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,607 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Contact.CcommitUpdate;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that partial contacts work correctly
- */
-public class CcommitUpdate
-        extends MIDPTest
-{
-
-    private ContactList iContactList;
-    private Contact iContact;
-    Date iCurrentDate = new Date();
-    private static final String TEST_CATEGORY = "my category";
-    private static final String UPDATE = "upd";
-
-    private static final String iPicture =
-        "/9j/4AAQSkZJRgABAQAAAQABAAD//gAoCgoKMDUuMDMuMjAwNAoxMTo0NjozNgpNb2RlPTIK\n" +
-        "MC4xCjMuMAr/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0\n" +
-        "KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7\n" +
-        "Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCABgAFADASIAAhEB\n" +
-        "AxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\n" +
-        "AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0\n" +
-        "NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZ\n" +
-        "mqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3\n" +
-        "+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQA\n" +
-        "AQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygp\n" +
-        "KjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaX\n" +
-        "mJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3\n" +
-        "+Pn6/9oADAMBAAIRAxEAPwCiGFO3ColjlPAFWI7G4cdMVy8jZ2upFbke4dqCxq6mlkDMkmKe\n" +
-        "be1iHLFz7VSpNmbrx6GaXPpik3segq1LJGeEQAe1QhSfYVqsO3uR7fyIwJCOlTJauwyWFJwK\n" +
-        "tWrEtt9a0dBJEuvIZHYFyBmm3dmkDhBycc1twRCJC561k3MhknZiMc9DWE4pIqlOUpasnRkT\n" +
-        "7q804zSEYXgUskXluRjNM5Y4BrY5rjNryPjJYmmSQOZCozxV+3RUOTVyOOJ+wOaqLsS2ZBsm\n" +
-        "SPeR9Kqywui7mGB2rpii4wQMCqM1uLqTk4UdKtTfUSZgc59q0tOi3SA+9V7u1Nu+M5B5BqxZ\n" +
-        "SlFUjtW2jQ2zTnzuC/wis69tTkSoOCOfrV3zhKQOhqyEXyCrYOa5JxvoXCbi7lG7ADZ9DUGe\n" +
-        "gqxd8OR71WwDIabIJogCCzH5RU8V3GrbSvHrVeQHAj9OTU0USuhUiglluQkoSpypHFQzApbh\n" +
-        "V4Lnn6Ulqx3tCx5HSn3OFRCxFAindW5a2weccg1mRM0Z61u8S2zAcnFYTLiTBraDtoWiykp3\n" +
-        "DmtK0uPNwjHmshetOWYqcg9DVNXQ7GpfJ827HeqQI8zHvV26fcGFZu75s5wRXOxFlm5JqWKT\n" +
-        "C5FUzJjP5ikWcLwTxSCxGb95L4/NtwcCp793kgXbOHYH7oNZl1JGZdyDBPU0QXBUjmspTsbx\n" +
-        "pX1NrTpT5YD9e9Z9wrfaG28jJ6UG5GMhuab9oOzKH5u9Cr26FKixu8gE0m/jGaGUldx6VEzb\n" +
-        "RXZCSZk0bVyTjNZUzsrZ6VqykOtZ9xDxzWDEtyo1y2eTTTIXHJpzw4qAoQeKyaZupR7CnFJ9\n" +
-        "M07Y3YU9Ld3PJAFRys050Rg/UmpBuzjnPoKsG3VMKPxq1bQx5zgZqlDuZyq9jP8AmUYK9e9M\n" +
-        "foc1f2bpMe9STWiOQuO3UVvBqJi5N7k21iuVYE+lRurYyw4qAmUkHPNSC4kXhsGpuKwPFG6Z\n" +
-        "RsH3qubcdSwqUneM4x9KnitY3AZpoxnsz4pXCxXihQDkbjUot8HKg1pQ2KkDEkJ+ki/41YFk\n" +
-        "QMb4s/8AXRf8aegWZlCDKkEZJojgkQ5ArU+xspHzw/8Af1f8anjsmIzui/7+L/jRoFjEWB1c\n" +
-        "sV709twkDbTitg2LH+KP/v4v+NRy2jKCS0eP+ui/40aAAP/Z";
-
-    public CcommitUpdate(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        openContactList();
-        try
-        {
-            Enumeration items = iContactList.items();
-            while (items.hasMoreElements())
-            {
-                Contact contact = (Contact)items.nextElement();
-                iContactList.removeContact(contact);
-
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitUpdate::initTest - unable to remove all contacts");
-        }
-
-        closeContactList();
-    }
-
-    public void runTest() throws Throwable
-    {
-        initTest();
-
-        // Open the default contact list
-        openContactList();
-        int[] supportedFields = iContactList.getSupportedFields();
-
-        log("CcommitUpdate::runTest - phase 1");
-        // Create a new contact item
-        iContact = createAndInitializeContact();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        iContact.commit();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        closeContactList();
-
-        log("CcommitUpdate::runTest - phase 2");
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            int field = supportedFields[ i ];
-
-            // Ignore read-only fields
-            if (field == Contact.REVISION ||
-                    field == Contact.UID)
-            {
-                continue;
-            }
-
-            log("CcommitUpdate::runTest - testing field " + supportedFields[ i ]);
-
-            openContactList();
-            iContact = (Contact)iContactList.items().nextElement();
-            // Change one value and test that the item data is correctly changed
-            setField(iContact, supportedFields, i);
-
-            log("CcommitUpdate::runTest - testing field before commit" + supportedFields[ i ]);
-            checkFieldChange(iContact, supportedFields, i);
-            // Commit the contact
-            iContact.commit();
-
-            log("CcommitUpdate::runTest - testing field after commit" + supportedFields[ i ]);
-            checkFieldChange(iContact, supportedFields, i);
-            resetField(iContact, supportedFields[ i ]);
-
-            if (iContact.getFields().length != supportedFields.length)
-            {
-                failTest("CcommitUpdate::checkContact - unexpected number of values in the contact");
-            }
-
-            checkContact(iContact, supportedFields, supportedFields.length);
-            iContact.commit();
-
-            if (iContact.getFields().length != supportedFields.length)
-            {
-                failTest("CcommitUpdate::checkContact - unexpected number of values in the contact");
-            }
-
-            checkContact(iContact, supportedFields, supportedFields.length);
-            closeContactList();
-        }
-
-        initTest(); // Initialize again
-
-        log("CcommitUpdate::runTest - phase 3");
-
-        openContactList();
-        iContact = createAndInitializeContact();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        iContact.commit();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        closeContactList();
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            int field = supportedFields[ i ];
-
-            // Ignore read-only fields
-            if (field == Contact.REVISION ||
-                    field == Contact.UID)
-            {
-                continue;
-            }
-
-            log("CcommitUpdate::runTest - testing field " + supportedFields[ i ]);
-
-            openContactList();
-            iContact = (Contact)iContactList.items().nextElement();
-            // Change one value and test that the item data is correctly changed
-            setField(iContact, supportedFields, i);
-
-            log("CcommitUpdate::runTest - testing field before commit" + supportedFields[ i ]);
-            checkFieldChange(iContact, supportedFields, i);
-            // Commit the contact
-            iContact.commit();
-
-            log("CcommitUpdate::runTest - testing field after commit" + supportedFields[ i ]);
-            checkFieldChange(iContact, supportedFields, i);
-
-            closeContactList();
-        }
-
-        initTest(); // Initialize again
-
-        openContactList();
-        iContact = createAndInitializeContact();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        iContact.commit();
-        checkContact(iContact, supportedFields, supportedFields.length);
-        closeContactList();
-
-        log("CcommitUpdate::runTest - phase 4");
-
-        Vector skippedFields = new Vector();
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            int field = supportedFields[ i ];
-
-            // Ignore read-only fields
-            if (field == Contact.REVISION ||
-                    field == Contact.UID)
-            {
-                skippedFields.addElement(new Integer(field));
-                continue;
-            }
-
-            log("CcommitUpdate::runTest - testing field " + supportedFields[ i ]);
-
-            openContactList();
-            iContact = (Contact)iContactList.items().nextElement();
-            // Change one value and test that the item data is correctly changed
-            try
-            {
-                String label = iContactList.getFieldLabel(field);
-                addField(iContact, supportedFields[ i ], label);
-            }
-            catch (Exception e)
-            {
-                // Ignore illegal arguments and field full exceptions
-                skippedFields.addElement(new Integer(field));
-                continue;
-            }
-
-            log("CcommitUpdate::runTest - testing field before commit" + supportedFields[ i ]);
-            if (iContact.countValues(field) != 2)
-            {
-                failTest("CcommitUpdate::runTest - incorrect count of values in field " + field);
-            }
-
-            // Commit the contact
-            iContact.commit();
-
-            for (int j = 0; j < i; j++)
-            {
-                if (!isSkipped(skippedFields, supportedFields[ j ]) &&
-                        iContact.countValues(supportedFields[ j ]) != 2)
-                {
-                    failTest("CcommitUpdate::runTest - incorrect count of values in field " + supportedFields[ j ]);
-                }
-            }
-
-            closeContactList();
-        }
-    }
-
-    private boolean isSkipped(Vector aSkippedFields, int aField)
-    {
-        int size = aSkippedFields.size();
-
-        for (int i = 0; i < size; i++)
-        {
-            if (((Integer)aSkippedFields.elementAt(i)).intValue() == aField)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void resetField(Contact aContact, int aField)
-    {
-        switch (iContactList.getFieldDataType(aField))
-        {
-        case PIMItem.STRING:
-        {
-            String label = iContactList.getFieldLabel(aField);
-            aContact.setString(aField, 0, PIMItem.ATTR_NONE, label);
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        {
-            String label = iContactList.getFieldLabel(aField);
-            String[] array = new String[ iContactList.stringArraySize(aField)];
-            for (int i = 0; i < array.length; i++)
-            {
-                array[ i ] = label + i;
-            }
-            aContact.setStringArray(aField, 0, PIMItem.ATTR_NONE, array);
-            log("Done");
-            break;
-        }
-        case PIMItem.DATE:
-        {
-            aContact.setDate(aField, 0, PIMItem.ATTR_NONE, iCurrentDate.getTime());
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            aContact.setBoolean(aField, 0, PIMItem.ATTR_NONE, true);
-            break;
-        }
-        case PIMItem.INT:
-        {
-            aContact.setInt(aField, 0, PIMItem.ATTR_NONE, 202);
-            break;
-        }
-        case PIMItem.BINARY:
-        {
-            aContact.setBinary(aField, 0, PIMItem.ATTR_NONE, iPicture.getBytes(), 0, iPicture.getBytes().length);
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        }
-    }
-
-    private void checkFieldChange(Contact aContact, int[] aFields, int aIndex)
-    {
-        int field = aFields[ aIndex ];
-        String label = iContactList.getFieldLabel(field);
-        switch (iContactList.getFieldDataType(field))
-        {
-        case PIMItem.STRING:
-        {
-            if (!(aContact.getString(field, 0).equals(label + UPDATE)))
-            {
-                failTest("CcommitUpdate::checkFieldChange - field " + field + " value was not changed!");
-            }
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        {
-            String[] array = new String[ iContactList.stringArraySize(field)];
-            for (int j = 0; j < array.length; j++)
-            {
-                array[ j ] = label + j + UPDATE;
-            }
-            String[] temp = aContact.getStringArray(field, 0);
-            for (int j = 0; j < array.length; j++)
-            {
-                if (!(array[ j ].equals(temp[ j ])))
-                {
-                    failTest("CcommitUpdate::checkFieldChange - field " + field + " value in element " + j + " was not changed!");
-                }
-            }
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            if (aContact.getBoolean(field, 0) != false)
-            {
-                failTest("CcommitUpdate::checkFieldChange - field " + field + " value was not changed!");
-            }
-            break;
-        }
-        case PIMItem.INT:
-        {
-            if (aContact.getInt(field, 0) != 200)
-            {
-                failTest("CcommitUpdate::checkFieldChange - field " + field + " value was not changed!");
-            }
-            break;
-        }
-        case PIMItem.BINARY:
-        case PIMItem.DATE:
-        default:
-        {
-            log("CcommitUpdate::setField - skipping field " + field);
-            break;
-        }
-        }
-    }
-
-    private void setField(Contact aContact, int[] aFields, int aIndex)
-    {
-        int field = aFields[ aIndex ];
-        String label = iContactList.getFieldLabel(field);
-        switch (iContactList.getFieldDataType(field))
-        {
-        case PIMItem.STRING:
-        {
-            aContact.setString(field, 0, PIMItem.ATTR_NONE, label + UPDATE);
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        {
-            String[] array = new String[ iContactList.stringArraySize(field)];
-            for (int j = 0; j < array.length; j++)
-            {
-                array[ j ] = label + j + UPDATE;
-            }
-            aContact.setStringArray(field, 0, PIMItem.ATTR_NONE, array);
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            aContact.setBoolean(field, 0, PIMItem.ATTR_NONE, false);
-            break;
-        }
-        case PIMItem.INT:
-        {
-            aContact.setInt(field, 0, PIMItem.ATTR_NONE, 200);
-            break;
-        }
-        case PIMItem.BINARY:
-        case PIMItem.DATE:
-        default:
-        {
-            log("CcommitUpdate::setField - skipping field " + field);
-            break;
-        }
-        }
-    }
-
-    private Contact createAndInitializeContact() throws Throwable
-    {
-        Contact contact = iContactList.createContact();
-
-        // Initialize the new contact with test data
-        int[] supportedFields = iContactList.getSupportedFields();
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            String label = iContactList.getFieldLabel(supportedFields[ i ]);
-            try
-            {
-                addField(contact, supportedFields[ i ], label);
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-                failTest("CcommitUpdate::addField - unable add value to field " + supportedFields[ i ]);
-            }
-
-        }
-
-        return contact;
-    }
-
-    private void checkContact(
-        Contact aContact,
-        int[] aFields,
-        int aExpectedValueCount)
-    throws TestEndThrowable
-    {
-
-        // Check each field
-        for (int i = 0; i < aFields.length; i++)
-        {
-            String label = iContactList.getFieldLabel(aFields[ i ]);
-            int field = aFields[ i ];
-            switch (iContactList.getFieldDataType(field))
-            {
-            case PIMItem.STRING:
-            {
-                if (field != Contact.UID &&
-                        field != Contact.FORMATTED_NAME &&
-                        !(aContact.getString(field, 0).equals(label)))
-                {
-                    failTest("CcommitUpdate::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] array = new String[ iContactList.stringArraySize(field)];
-                for (int j = 0; j < array.length; j++)
-                {
-                    array[ j ] = label + j;
-                }
-                String[] retArray = aContact.getStringArray(field, 0);
-                for (int j = 0; j < array.length; j++)
-                {
-                    if (!retArray[ j ].equals(array[ j ]))
-                    {
-                        log("CcommitUpdate::checkContact  - got value " + retArray[ j ] + " expected " + array[ j ]);
-                        failTest("CcommitUpdate::checkContact - field's " + field + " array element " + j + " value is incorrect");
-                    }
-                }
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                long date = aContact.getDate(field, 0);
-                if (field != Contact.REVISION &&
-                        field != Contact.BIRTHDAY &&
-                        field != 0x1005008 &&
-                        date != iCurrentDate.getTime())
-                {
-                    failTest("CcommitUpdate::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                if (aContact.getBoolean(field, 0) != true)
-                {
-                    failTest("CcommitUpdate::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.INT:
-            {
-                if (aContact.getInt(field, 0) != 202)
-                {
-                    failTest("CcommitUpdate::checkContact - field's " + field + " value is incorrect");
-                }
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                String picture = new String(aContact.getBinary(field, 0));
-                System.out.println("CcommitUpdate::checkContact - binary " + picture);
-                break;
-            }
-            default:
-            {
-                break;
-            }
-            }
-        }
-    }
-
-    private void openContactList() throws TestEndThrowable
-    {
-        try
-        {
-            iContactList = (ContactList)PIM.getInstance().openPIMList(
-                               PIM.CONTACT_LIST, PIM.READ_WRITE);
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitUpdate::openContactList - unable to open contact list");
-        }
-    }
-
-    private void closeContactList()
-    {
-        try
-        {
-            iContactList.close();
-            iContactList = null;
-        }
-        catch (Exception e)
-        {
-            failTest("CcommitUpdate::closeContactList - unable to close the list");
-        }
-    }
-
-    private void addField(Contact aContact, int aField, String aLabel) throws TestEndThrowable
-    {
-        switch (iContactList.getFieldDataType(aField))
-        {
-        case PIMItem.STRING:
-        {
-            aContact.addString(aField, PIMItem.ATTR_NONE, aLabel);
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        {
-            String[] array = new String[ iContactList.stringArraySize(aField)];
-            for (int i = 0; i < array.length; i++)
-            {
-                array[ i ] = aLabel + i;
-            }
-            aContact.addStringArray(aField, PIMItem.ATTR_NONE, array);
-            break;
-        }
-        case PIMItem.DATE:
-        {
-            aContact.addDate(aField, PIMItem.ATTR_NONE, iCurrentDate.getTime());
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            aContact.addBoolean(aField, PIMItem.ATTR_NONE, true);
-            break;
-        }
-        case PIMItem.INT:
-        {
-            aContact.addInt(aField, PIMItem.ATTR_NONE, 202);
-            break;
-        }
-        case PIMItem.BINARY:
-        {
-            aContact.addBinary(aField, PIMItem.ATTR_NONE, iPicture.getBytes(), 0, iPicture.getBytes().length);
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        }
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CgetPreferredIndex/CgetPreferredIndex.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Contact.CgetPreferredIndex;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.ContactList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.Contact.getPreferredIndex()
- *
- */
-public class CgetPreferredIndex
-        extends MIDPTest
-{
-
-    public CgetPreferredIndex(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        ContactList contactList = null;
-        Contact c1 = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactList =
-                (ContactList)p.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
-            c1 = contactList.createContact();
-            String[] nameArray = new String[ contactList.stringArraySize(Contact.NAME)];
-            nameArray[ 0 ] = "Smith";
-            nameArray[ 1 ] = "John";
-            c1.addStringArray(Contact.NAME, PIMItem.ATTR_NONE, nameArray);
-            if (!contactList.isSupportedField(Contact.TEL))
-            {
-                failTest("TEL is not Supported");
-            } // end of if (!contactList.isSupportedField( Contact.TEL ))
-            c1.addString(Contact.TEL, PIMItem.ATTR_NONE, "+1234567890");
-            if (!contactList.isSupportedAttribute(Contact.TEL,
-                                                  Contact.ATTR_PREFERRED))
-            {
-                log("ATTR_PREFERRED is not supported, cannot be tested.");
-                passTest();
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-
-        // Test steps
-        // step s1
-        testGetPreferredIndex(c1, Contact.TEL, -1);
-
-        // step s2
-        testAddString(c1, Contact.TEL, Contact.ATTR_PREFERRED,
-                      "+0987654321");
-
-        // step s3
-        testGetPreferredIndex(c1, Contact.TEL, 1);
-
-        // step s4
-        testGetAttributes(c1, Contact.TEL, 0, 0);
-
-        // step s5
-        testGetAttributes(c1, Contact.TEL, 1, Contact.ATTR_PREFERRED);
-
-        // step s6
-        testSetString(c1, Contact.TEL, 0, Contact.ATTR_PREFERRED,
-                      "+1234567890");
-
-        // step s7
-        testGetPreferredIndex(c1, Contact.TEL, 0);
-
-        // step s8
-        testRemoveValue(c1, Contact.TEL, 0);
-
-        // test step s9
-        testGetPreferredIndex(c1, Contact.TEL, -1);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1, s3, s7, s9
-     */
-    private void testGetPreferredIndex(Contact aContact, int aField,
-                                       int aExpected)
-    throws TestEndThrowable
-    {
-        int preferredIndex = 0;
-        try
-        {
-            preferredIndex = aContact.getPreferredIndex(aField);
-
-        }
-        catch (Throwable e)
-        {
-            failTest("getPreferredIndex threw: " + e.toString());
-        } // end of try-catch
-        if (preferredIndex != aExpected)
-        {
-            failTest("getPreferredIndex returned " + preferredIndex +
-                     ", expecting " + aExpected);
-        } // end of if (preferredIndex != aExpected)
-    }
-
-    /**
-     * Test step s2
-     */
-    private void testAddString(Contact aContact, int aField, int aAttributes,
-                               String aString)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aContact.addString(aField, aAttributes, aString);
-        }
-        catch (Throwable e)
-        {
-            failTest("addString threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testGetAttributes(Contact aContact, int aField, int aIndex,
-                                   int aExpected)
-    throws TestEndThrowable
-    {
-        int attributes = 0;
-        try
-        {
-            attributes = aContact.getAttributes(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("getAttributes threw: " + e.toString());
-        } // end of try-catch
-        if (attributes != aExpected)
-        {
-            failTest("getAttributes returned " + attributes +
-                     ", instead of " + aExpected);
-        }
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testSetString(Contact aContact, int aField, int aIndex,
-                               int aAttributes,
-                               String aString)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aContact.setString(aField, aIndex, aAttributes, aString);
-        }
-        catch (Throwable e)
-        {
-            failTest("steString threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testRemoveValue(Contact aContact, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aContact.removeValue(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-}
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Contact/CgetPreferredIndexEx/CgetPreferredIndexEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Contact.CgetPreferredIndexEx;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.Contact.getPreferredIndex()
- *
- */
-public class CgetPreferredIndexEx
-        extends MIDPTest
-{
-
-    public CgetPreferredIndexEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public CgetPreferredIndexEx()
-    {
-        log("DEBUG Constructor");
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        log("DEBUG initTest");
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        log("DEBUG 1");
-        // preconditions
-        PIM p = null;
-        ContactList contactList = null;
-        Contact c1 = null;
-        int unsupportedField = 0;
-        log("DEBUG 2");
-        try
-        {
-            p = PIM.getInstance();
-            contactList =
-                (ContactList)p.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
-            c1 = contactList.createContact();
-            // 119 is the largest field + 1
-            log("DEBUG 3");
-            for (int i = Contact.ADDR; i < 119; i++)
-            {
-                log("DEBUG 4");
-                if (!contactList.isSupportedField(i))
-                {
-                    unsupportedField = i;
-                    break;
-                } // end of if (!contactList.isSupportedField( i ))
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-
-        // Test steps
-        // step s1
-        log("DEBUG 5");
-        testIAE(c1, 888);
-
-        // step s2
-        log("DEBUG 6");
-        testIAE(c1, -1);
-
-        // step s3
-        log("DEBUG 7");
-        testUFE(c1, unsupportedField);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1, s2
-     */
-    private void testIAE(Contact aContact, int aField)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            log("DEBUG 8");
-            aContact.getPreferredIndex(aField);
-            log("DEBUG 9");
-        }
-        catch (IllegalArgumentException e)
-        {
-            log("DEBUG 10");
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            log("DEBUG 11");
-            failTest("Not IAE: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            log("DEBUG 12");
-            failTest("IAE not thrown for: " + aField);
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s3
-     */
-    private void testUFE(Contact aContact, int aField)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            log("DEBUG 13");
-            aContact.getPreferredIndex(aField);
-            log("DEBUG 14");
-        }
-        catch (UnsupportedFieldException e)
-        {
-            log("DEBUG 15");
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            log("DEBUG 16");
-            failTest("Not UFE: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            log("DEBUG 17");
-            failTest("UFE not thrown for: " + aField);
-        } // end of if (!exceptionThrown)
-    }
-
-}
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLcategoryTests/CLcategoryTests.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLcategoryTests;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.lang.String;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests the contact list's category support
- *
- * Class PLcategoryTester tests the actual
- * functions. This class only initializes the
- * data and calls the right testing fuction
- *
- */
-
-public class CLcategoryTests
-        extends MIDPTest
-{
-
-    public CLcategoryTests(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test. CLcategoryTests");
-        // Create category
-
-        String error = PLcategoryTester.testMaxCategories(iPIMList,
-                       -1, // unlimited categories
-                       0, // No static categories
-                       null);
-        CheckError(error);
-
-        // Test passed
-        passTest();
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Helper function
-     */
-    private void CheckError(String aError)
-    throws TestEndThrowable
-    {
-        // Check and fail if error string has some data
-        if (aError != null)
-        {
-            failTest(aError);
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLcreateContact/CLcreateContact.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLcreateContact;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ContactList.createContact()
- *
- */
-public class CLcreateContact
-        extends MIDPTest
-{
-
-    public CLcreateContact(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        ContactList cl = null;
-        int count = 0;
-
-        // open first Contact list
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            cl = (ContactList)p.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE, contactListNames[0]);
-
-            Enumeration e = cl.items();
-            count = itemCount(e);
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        }
-
-        log("ContactList has "+ count + " items.");
-
-        log("Test that creating new Contact item does not increase item count in ContactList.");
-
-        Contact c = null;
-
-        try
-        {
-            c = cl.createContact();
-
-            Enumeration en = cl.items();
-            cl.close();
-
-            if (itemCount(en) != count)
-            {
-                failTest("Creating new Contact changed ContactList item count!");
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Contact item creation: " + t);
-        }
-
-        log("Test that created Contact item is empty.");
-        int[] fields = c.getFields();
-        if (fields.length != 0)
-        {
-            failTest("Created new Contact item has not got all fields empty!");
-        }
-
-        passTest();
-    }
-
-    private int itemCount(Enumeration e)
-    {
-        int tmp = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            tmp++;
-        }
-        return tmp;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLfieldsOrder/CLfieldsOrder.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLfieldsOrder;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that fields of the contact list are in right order
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields. Order was
- * also checked from the emulator
- *
- * ATTENTION: Update fields if needed when the API specification
- * is approved
- *
- */
-
-public class CLfieldsOrder
-        extends MIDPTest
-{
-
-    public CLfieldsOrder(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Test data containing supported field values in right order */
-    private SupportTestData iOrderedFieldsData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize supported fields list. Check that the
-        // order is the same as in the native side contact list
-        iOrderedFieldsData.addSupportedField(Contact.PHOTO);
-        iOrderedFieldsData.addSupportedField(Contact.NAME);
-        iOrderedFieldsData.addSupportedField(Contact.NICKNAME);
-        iOrderedFieldsData.addSupportedField(Contact.TEL);
-        iOrderedFieldsData.addSupportedField(Contact.EMAIL);
-        iOrderedFieldsData.addSupportedField(0x1005003);                // DTMF
-        iOrderedFieldsData.addSupportedField(0x1005009);                // VOIP
-        iOrderedFieldsData.addSupportedField(0x100500A);                // PTT
-        iOrderedFieldsData.addSupportedField(0x100500B);                // SWIS
-        iOrderedFieldsData.addSupportedField(0x1005002);                // SIP
-        iOrderedFieldsData.addSupportedField(Contact.ORG);
-        iOrderedFieldsData.addSupportedField(0x1005004);                // Department
-        iOrderedFieldsData.addSupportedField(Contact.TITLE);
-        iOrderedFieldsData.addSupportedField(0x1005005);                // Assistant name
-        iOrderedFieldsData.addSupportedField(0x1005007);                // Spouse
-        iOrderedFieldsData.addSupportedField(0x1005006);                // Children
-        iOrderedFieldsData.addSupportedField(Contact.URL);
-        iOrderedFieldsData.addSupportedField(Contact.ADDR);
-        iOrderedFieldsData.addSupportedField(Contact.BIRTHDAY);
-        iOrderedFieldsData.addSupportedField(0x1005008);                // Anniversary
-        iOrderedFieldsData.addSupportedField(Contact.NOTE);
-        iOrderedFieldsData.addSupportedField(Contact.CLASS);
-        iOrderedFieldsData.addSupportedField(0x1005001);                // WV ID
-        iOrderedFieldsData.addSupportedField(Contact.UID);
-        iOrderedFieldsData.addSupportedField(Contact.REVISION);
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLsupportTester.testFieldsOrder(
-                         iPIMList,
-                         iOrderedFieldsData);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLgetAttributes/CLgetAttributes.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLgetAttributes;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * Tests attribute combinations of contact list fields
- *
- * Reference for supported field values in this point was
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update test when the specification is valid
- *
- */
-
-public class CLgetAttributes
-        extends MIDPTest
-{
-
-    public CLgetAttributes(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List and item */
-    private PIMList iPIMList;
-    private PIMItem iPIMItem;
-
-    /* Test data including fields, attributes and field values */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        String[] nameArrayValues = { "Pre", "Suf", "First", "Last", "Middle", "Read", "Read" };
-        String[] addrArrayValues = { "P.O box", "LPR", null, null, null, null, null };
-        String binaryString = "R0lGODdhAQABAPYAAAAAAP////8AAP8UAP8sAP9FAP9dAP91AP+OAP+mAP++AP/XAP/vAPf/\r\nAN//AMf/AK7/AJb/AH3/AGX/AE3/ADT/AAT/AAD/DAD/JAD/PAD/VQD/bQD/hgD/ngD/tgD/\r\nzwD/5wD//wDn/wDP/wC2/wCe/wCG/wBt/wBV/wA8/wAk/wAM/wQA/xwA/zQA/00A/2UA/30A\r\n/5YA/64A/8cA/98A//cA//8A7/8A1/8Avv8Apv8Ajv8Adf8AXf8ARf8ALP8AFMPDw89dXX19\r\nfXV1dQAAgoKCgv//AFFR+/sUQWFhYZqamjz7NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAQABAAAHA4AFgQA7";
-        String testString = "TestString";
-
-        // Contact.EMAIL field. 1st field type, 2nd attributes, 3rd value, 4th versit conversion result
-        iTestData.addFieldData(Contact.EMAIL, 0,                 "testing@domain.com", null);
-        iTestData.addFieldData(Contact.EMAIL, Contact.ATTR_HOME, "testing@home.com",   null);
-        iTestData.addFieldData(Contact.EMAIL, Contact.ATTR_WORK, "testing@work.com",   null);
-
-        // Contact.TEL field
-        iTestData.addFieldData(Contact.TEL, 0,                     "1234567890", null);
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_HOME,     "1234567890", null);
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE,   "1234567890", null);
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX,      "1234567890", null);
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_PAGER,    "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE |
-                               Contact.ATTR_WORK,     "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE |
-                               Contact.ATTR_HOME,     "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX |
-                               Contact.ATTR_HOME,     "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX |
-                               Contact.ATTR_WORK,     "1234567890", null);
-
-        // Video call attributes
-        iTestData.addFieldData(Contact.TEL, 16777216,              "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, 16777216 |
-                               Contact.ATTR_HOME,     "1234567890", null);
-
-        iTestData.addFieldData(Contact.TEL, 16777216 |
-                               Contact.ATTR_WORK,     "1234567890", null);
-
-        // Assistant phone
-        iTestData.addFieldData(Contact.TEL, 1,                     "1234567890", null);
-        // Car phone
-        iTestData.addFieldData(Contact.TEL, 2,                     "1234567890", null);
-        // Preferred SMS
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_SMS,      "1234567890", null);
-        // VOIP number
-        iTestData.addFieldData(0x1005009, 0,                 testString, null);
-        iTestData.addFieldData(0x1005009, Contact.ATTR_HOME, testString, null);
-        iTestData.addFieldData(0x1005009, Contact.ATTR_WORK, testString, null);
-
-        // Fields that have no attributes
-        iTestData.addFieldData(Contact.URL,      0, testString,      null);
-        iTestData.addFieldData(Contact.NOTE,     0, testString,      null);
-        iTestData.addFieldData(Contact.NAME,     0, nameArrayValues, null);
-        iTestData.addFieldData(Contact.ORG,      0, testString,      null);
-        iTestData.addFieldData(Contact.TITLE,    0, testString,      null);
-        iTestData.addFieldData(Contact.BIRTHDAY, 0, 130293923,       null);
-        iTestData.addFieldData(Contact.ADDR,     0, addrArrayValues, null);
-        iTestData.addFieldData(Contact.PHOTO,    0, binaryString,    null);
-        iTestData.addFieldData(Contact.NICKNAME, 0, testString,      null);
-        iTestData.addFieldData(0x1005002,        0, testString,      null);
-        iTestData.addFieldData(0x1005003,        0, testString,      null);
-        iTestData.addFieldData(0x1005004,        0, testString,      null);
-        iTestData.addFieldData(0x1005005,        0, testString,      null);
-        iTestData.addFieldData(0x1005006,        0, testString,      null);
-        iTestData.addFieldData(0x1005007,        0, testString,      null);
-        iTestData.addFieldData(0x1005008,        0, 123455555,       null);
-
-        // Initialize contact list and contact item
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iPIMList = pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
-            iPIMItem = ((ContactList) iPIMList).createContact();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-        log("Running test CLgetAttributes");
-        error = PLitemTester.testAttributeCombinations(
-                    iPIMList,
-                    iPIMItem,
-                    iTestData);
-        if (error != null)
-        {
-            failTest(error);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            ((ContactList) iPIMList).removeContact(
-                (Contact) iPIMItem);
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Helper function
-     */
-    private void checkError(String aError)
-    throws TestEndThrowable
-    {
-        if (aError != null)
-        {
-            failTest(aError);
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLimportContact/CLimportContact.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLimportContact;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ContactList.importContact()
- *
- */
-public class CLimportContact
-        extends MIDPTest
-{
-
-    public CLimportContact(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private ContactList cl = null;
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        Contact c1 = null;
-        int count = 0;
-
-        // open first Contact list
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            cl = (ContactList)p.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE, contactListNames[0]);
-
-            count = countItems(cl);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        }
-
-        // read Contact from serial format
-        InputStream is = null;
-        try
-        {
-            is = getClass().getResourceAsStream("/res/3.vcf");
-            PIMItem[] items = p.fromSerialFormat(is, "UTF-8");
-            c1 = (Contact) items[0];
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to read an Contact from file: " + e);
-        }
-
-        log("ContactList has "+ count + " items.");
-
-        log("Test that importing new Contact item does not increase item count in ContactList.");
-        Contact c2 = null;
-        try
-        {
-            c2 = cl.importContact(c1);
-
-            if (countItems(cl) != count)
-            {
-                failTest("Importing new Contact changed ContactList item count!");
-            }
-            // test that imported item is ok.
-            if (cl.isSupportedField(Contact.URL))
-            {
-                String url = c2.getString(Contact.URL, 0);
-                if (!url.equals("http://www.imc.org/"))
-                {
-                    failTest("Contact item import failed to set URL to http://www.imc.org/, was: "+url);
-                }
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test Contact item import: " + e);
-        }
-
-        log("Test that commiting the imported Contact item increases item count in ContactList.");
-        try
-        {
-            c2.commit();
-            if (countItems(cl) != (count + 1))
-            {
-                failTest("Commiting imported Contact did not increase ContactList item count by one!");
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to commit imported Contact to list: " + e);
-        }
-
-        log("Test that removing imported Contact item decreases item count.");
-        try
-        {
-            cl.removeContact(c2);
-            if (countItems(cl) != count)
-            {
-                failTest("Removing imported Contact did not decrease ContactList item count by one!");
-            }
-            cl.close();
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to remove imported Contact from list: " + e);
-        }
-
-        passTest();
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLmaxValues/CLmaxValues.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLmaxValues;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests the maximum values of contact list items
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update maximum values when the specification
- *            is updated
- */
-
-public class CLmaxValues
-        extends MIDPTest
-{
-
-    public CLmaxValues(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Hash table including fields and maximum values */
-    private Hashtable iMaximumValues = new Hashtable();
-
-    /* Unlimited values */
-    private static int UNLIMITED = -1;
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize maximum values. -1 means unlimiited value
-        iMaximumValues.put(new Integer(Contact.ADDR), new Integer(3));
-        iMaximumValues.put(new Integer(Contact.BIRTHDAY), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.CLASS), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.EMAIL), new Integer(UNLIMITED));
-        iMaximumValues.put(new Integer(Contact.FORMATTED_ADDR), new Integer(0));
-        iMaximumValues.put(new Integer(Contact.FORMATTED_NAME), new Integer(0));
-        iMaximumValues.put(new Integer(Contact.NAME), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.NICKNAME), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.NOTE), new Integer(UNLIMITED));
-        iMaximumValues.put(new Integer(Contact.ORG), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.PHOTO), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.PHOTO_URL), new Integer(0));
-        iMaximumValues.put(new Integer(Contact.PUBLIC_KEY), new Integer(0));
-        iMaximumValues.put(new Integer(Contact.PUBLIC_KEY_STRING), new Integer(0));
-        iMaximumValues.put(new Integer(Contact.REVISION), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.TEL), new Integer(UNLIMITED));
-        iMaximumValues.put(new Integer(Contact.TITLE), new Integer(UNLIMITED));
-        iMaximumValues.put(new Integer(Contact.UID), new Integer(1));
-        iMaximumValues.put(new Integer(Contact.URL), new Integer(UNLIMITED));
-
-        // Extended fields
-        iMaximumValues.put(new Integer(0x1005001), new Integer(1));                                  // WV ID
-        iMaximumValues.put(new Integer(0x1005002), new Integer(UNLIMITED));                          // SIP
-        iMaximumValues.put(new Integer(0x1005003), new Integer(UNLIMITED));                          // DTMF
-        iMaximumValues.put(new Integer(0x1005004), new Integer(1));                                  // Department
-        iMaximumValues.put(new Integer(0x1005005), new Integer(1));                                  // Assistant name
-        iMaximumValues.put(new Integer(0x1005006), new Integer(1));                                  // Children
-        iMaximumValues.put(new Integer(0x1005007), new Integer(1));                                  // Spouse
-        iMaximumValues.put(new Integer(0x1005008), new Integer(1));                                  // Anniversary
-        iMaximumValues.put(new Integer(0x1005009), new Integer(UNLIMITED));                          // VOIP
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLitemTester.testMaximumValues(
-                         iPIMList,
-                         iMaximumValues);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLmultipleLists/CLmultipleLists.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLmultipleLists;
-//IMPORTS
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * See OpenMultipleLists.java.
- */
-public class CLmultipleLists extends OpenMultipleLists
-{
-
-    public CLmultipleLists(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    protected int listType()
-    {
-        return PIM.CONTACT_LIST;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLremoveContact/CLremoveContact.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLremoveContact;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.ContactList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ContactList.removeContact()
- */
-public class CLremoveContact
-        extends MIDPTest
-{
-
-    public CLremoveContact(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // preconditions
-    PIM p = null;
-    String[] contactListNames = null;
-    ContactList cl = null;
-    int count = 0;
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        // open first Contact list
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            cl = (ContactList)p.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE, contactListNames[0]);
-
-            count = countItems(cl);
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        }
-
-        log("ContactList has "+ count + " items.");
-
-        log("Test that creating new Contact item and adding it to the list does increase item count in ContactList.");
-
-        Contact c = null;
-
-        try
-        {
-            c = cl.createContact();
-            if (cl.isSupportedField(Contact.URL))
-            {
-                c.addString(Contact.URL, PIMItem.ATTR_NONE, "testing");
-            }
-            else
-            {
-                failTest("Error while creating Contact item!");
-            }
-            c.commit();
-
-            if (countItems(cl) != count+1)
-            {
-                failTest("Creating new Contact did not increase ContactList item count by one!");
-            }
-
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Contact item creation: " + t);
-        }
-
-        log("Test that removing Contact item decreases ContactList item count by one.");
-
-        try
-        {
-            cl.removeContact(c);
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Contact item removal: " + t);
-        }
-
-        if (countItems(cl) != count)
-        {
-            failTest("Removing Contact did not decrease ContactList item count by one!");
-        }
-
-        try
-        {
-            cl.close();
-        }
-        catch (Throwable t)
-        {
-            failTest("Error while closing list: " + t);
-        }
-
-        passTest();
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLremoveContactEx/CLremoveContactEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLremoveContactEx;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.ContactList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ContactList.removeContact()
- *
- */
-public class CLremoveContactEx
-        extends MIDPTest
-{
-
-    public CLremoveContactEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // preconditions
-    PIM p = null;
-    ContactList cl = null;
-    int count = 0;
-
-    public void runTest() throws TestEndThrowable
-    {
-        try
-        {
-            p = PIM.getInstance();
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        }
-
-        cl = openContactList(PIM.READ_WRITE);
-        count = countItems(cl);
-
-        log("ContactList has "+ count + " items.");
-
-        log("Test that creating new Contact item and adding it to the list does increase item count in ContactList.");
-
-        Contact c = null;
-
-        try
-        {
-            c = cl.createContact();
-            if (cl.isSupportedField(Contact.URL))
-            {
-                c.addString(Contact.URL, PIMItem.ATTR_NONE, "testing");
-            }
-            else
-            {
-                failTest("Error while creating Contact item!");
-            }
-            c.commit();
-
-            if (countItems(cl) != count+1)
-            {
-                failTest("Creating new Contact did not increase ContactList item count by one!");
-            }
-
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Contact item creation: " + t);
-        }
-
-        log("Test that removing Contact item from a read only list causes SecurityException.");
-        try
-        {
-            cl.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-        cl = openContactList(PIM.READ_ONLY);
-
-        try
-        {
-            cl.removeContact(find(cl, c));
-            failTest("SecurityException was not thrown when removing Contact from a read only list.");
-        }
-        catch (SecurityException se)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Contact from a read only list threw wrong exception: "+ex);
-        }
-
-        if (countItems(cl) != count+1)
-        {
-            failTest("Removing Contact from a read only list decreased item count by one!");
-        }
-
-        try
-        {
-            cl.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-        cl = openContactList(PIM.READ_WRITE);
-
-        log("Test that removing null Contact item does not change ContactList item count.");
-        try
-        {
-            cl.removeContact(null);
-            failTest("Removing null Contact did not throw any exception!");
-        }
-        catch (NullPointerException npe)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing null Contact threw wrong exception: "+ex);
-        }
-
-        if (countItems(cl) != count+1)
-        {
-            failTest("Removing null Contact changed ContactList item count!");
-        }
-
-        log("Test that removing Contact item decreases ContactList item count by one.");
-
-        try
-        {
-            c = find(cl, c);
-            cl.removeContact(c);
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Contact item removal: " + t);
-        }
-
-        if (countItems(cl) != count)
-        {
-            failTest("Removing Contact did not decrease ContactList item count by one!");
-        }
-
-        log("Test that removing Contact item not in list does not change ContactList item count.");
-
-        try
-        {
-            cl.removeContact(c);
-            failTest("Removing Contact not in list did not throw any exception!");
-        }
-        catch (PIMException pime)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Contact not in list threw wrong exception: "+ex);
-        }
-
-        if (countItems(cl) != count)
-        {
-            failTest("Removing Contact not in list changed ContactList item count!");
-        }
-
-        log("Test that removing Contact from a closed list throws PIMException.");
-        try
-        {
-            cl.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-
-        try
-        {
-            cl.removeContact(c);
-            failTest("Removing Contact from a closed list did not throw any exception!");
-        }
-        catch (PIMException pime)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Contact from a closed list threw wrong exception: "+ex);
-        }
-
-        cl = openContactList(PIM.READ_WRITE);
-
-        if (countItems(cl) != count)
-        {
-            failTest("Removing Contact from a closed list changed ContactList item count!");
-        }
-        try
-        {
-            cl.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-
-        passTest();
-    }
-
-    private Contact find(ContactList cl, Contact c) throws TestEndThrowable
-
-    {
-        String id = c.getString(Contact.UID, 0);
-        try
-        {
-            Enumeration e = cl.items();
-            while (e.hasMoreElements())
-            {
-                Contact tmp = (Contact)e.nextElement();
-                String tmpid = tmp.getString(Contact.UID, 0);
-                if (tmpid.equals(id))
-                {
-                    return tmp;
-                }
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return null;
-        }
-        catch (Exception e)
-        {
-            failTest("Error while getting items from list!");
-        }
-        return null;
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-
-    private ContactList openContactList(int mode) throws TestEndThrowable
-    {
-        // open first Contact list
-        try
-        {
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            cl = (ContactList)p.openPIMList(PIM.CONTACT_LIST, mode, contactListNames[0]);
-            return cl;
-        }
-        catch (Throwable e)
-        {
-            failTest("ContactList opening failed: " + e);
-        }
-        return null;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLserialFormatTests/CLserialFormatTests.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLserialFormatTests;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class initializes the test data for PIM serialization tests
- * Only Contact List specific are tested in this class
- *
- * Tested functions:
- * javax.microedition.pim.PIM.toSerialFormat()
- * javax.microedition.pim.PIM.fromSerialFormat()
- *
- */
-
-public class CLserialFormatTests
-        extends MIDPTest
-{
-
-    public CLserialFormatTests(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List and item */
-    private PIMList iPIMList;
-    private PIMItem iPIMItem;
-
-    /* Test data including fields, attributes and field values */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        String[] nameArrayValues = { "Last", "First", "Middle", "Pre", "Suf", "LNR", "FNR" };
-        String[] addrArrayValues = { "P.O box", "Extra", "Street", "Locality", "Region", "Postal", "Country" };
-        // Initialize test data. the final string value indicates what string must be
-        // found from the data after versit conversion
-        iTestData.addFieldData(Contact.NICKNAME, 0, "nickname", "X-NICKNAME:nickname");
-
-        // Contact.EMAIL
-        iTestData.addFieldData(Contact.EMAIL, 0,                 "testing@none.com", "EMAIL;ENCODING=QUOTED-PRINTABLE:testing=40none.com");
-        iTestData.addFieldData(Contact.EMAIL, Contact.ATTR_HOME, "testing@home.com", "EMAIL;HOME;ENCODING=QUOTED-PRINTABLE:testing=40home.com");
-        iTestData.addFieldData(Contact.EMAIL, Contact.ATTR_WORK, "testing@work.com", "EMAIL;WORK;ENCODING=QUOTED-PRINTABLE:testing=40work.com");
-
-        // Contact.TEL
-        iTestData.addFieldData(Contact.TEL, 0,                     "Tel",        "TEL;VOICE:Tel");
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_HOME,     "TelHome",    "TEL;VOICE;HOME:TelHome");
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE,   "TelMobile",  "TEL;CELL;VOICE:TelMobile");
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX,      "Fax",        "TEL;FAX:Fax");
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_PAGER,    "Pager",      "TEL;PAGER:Pager");
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE |
-                               Contact.ATTR_WORK,     "MobileWork", "TEL;CELL;VOICE;WORK:MobileWork");
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_MOBILE |
-                               Contact.ATTR_HOME,     "MobileHome", "TEL;CELL;VOICE;HOME:MobileHome");
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX |
-                               Contact.ATTR_HOME,     "FaxHome",    "TEL;FAX;HOME:FaxHome");
-
-        iTestData.addFieldData(Contact.TEL, Contact.ATTR_FAX |
-                               Contact.ATTR_WORK,     "FaxWork",    "TEL;FAX;WORK:FaxWork");
-
-        // Video call attributes
-        iTestData.addFieldData(Contact.TEL, 16777216,              "VideoCall",  "TEL;VIDEO:VideoCall");
-
-        iTestData.addFieldData(Contact.TEL, 16777216 |
-                               Contact.ATTR_HOME,     "VidHome",    "TEL;VIDEO;HOME:VidHome");
-
-        iTestData.addFieldData(Contact.TEL, 16777216 |
-                               Contact.ATTR_WORK,     "VidWork",    "TEL;VIDEO;WORK:VidWork");
-
-        // Assistant phone
-        iTestData.addFieldData(Contact.TEL, 1,                     "Assistant",  "X-ASSISTANT-TEL:Assistant");
-        // Car phone
-        iTestData.addFieldData(Contact.TEL, 2,                     "CarPhone",   "TEL;CAR:CarPhone");
-
-        // VOIP number
-        iTestData.addFieldData(0x1005009, 0,                 "VOIPNone", "X-SIP;VOIP:VOIPNone");
-        iTestData.addFieldData(0x1005009, Contact.ATTR_HOME, "VOIPHome", "X-SIP;VOIP;HOME:VOIPHome");
-        iTestData.addFieldData(0x1005009, Contact.ATTR_WORK, "VOIPWork", "X-SIP;VOIP;WORK:VOIPWork");
-
-        // Fields that have no attributes
-        iTestData.addFieldData(Contact.URL,      0, "www.url.com",  "URL:www.url.com");
-        iTestData.addFieldData(Contact.NOTE,     0, "Note",         "NOTE:Note");
-        iTestData.addFieldData(Contact.ORG,      0, "Organisation", "ORG:Organisation");
-        iTestData.addFieldData(Contact.TITLE,    0, "Title",        "TITLE:Title");
-
-        // String arrays
-        iTestData.addFieldData(Contact.ADDR,     0, addrArrayValues,
-                               "ADR:P.O box;Extra;Street;Locality;Region;Postal;Country");
-        iTestData.addFieldData(Contact.ADDR, Contact.ATTR_HOME, addrArrayValues,
-                               "ADR;HOME:P.O box;Extra;Street;Locality;Region;Postal;Country");
-        iTestData.addFieldData(Contact.ADDR, Contact.ATTR_WORK, addrArrayValues,
-                               "ADR;WORK:P.O box;Extra;Street;Locality;Region;Postal;Country");
-        iTestData.addFieldData(Contact.NAME,     0, nameArrayValues,
-                               "N:Last;First;Middle;Pre;Suf");
-
-        // Extended fields
-        iTestData.addFieldData(0x1005002, 0, "SIP",            "X-SIP:SIP");
-        iTestData.addFieldData(0x1005003, 0, "DTMF",           "X-DTMF:DTMF");
-        iTestData.addFieldData(0x1005004, 0, "Department",     "ORG:;Department");
-        iTestData.addFieldData(0x1005005, 0, "Assistant name", "X-ASSISTANT:Assistant name");
-        iTestData.addFieldData(0x1005006, 0, "Children",       "X-CHILDREN:Children");
-        iTestData.addFieldData(0x1005007, 0, "Spouse",         "X-SPOUSE:Spouse");
-        iTestData.addFieldData(0x100500A, 0, "POC",            "X-SIP;POC:POC");
-        iTestData.addFieldData(0x100500B, 0, "SWIS",           "X-SIP;SWIS:SWIS");
-
-        // Initialize contact list and contact item
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iPIMList = pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
-            iPIMItem = ((ContactList) iPIMList).createContact();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-        log("Running CLserialFormatTests. Testing vCard 2.1");
-        error = PserializationTester.testToSerialFormat(
-                    iPIMList,
-                    iPIMItem,
-                    iTestData,
-                    "UTF-8",
-                    "VCARD/2.1");
-
-        if (error != null)
-        {
-            failTest(error);
-        }
-        passTest();
-        cleanupTest();
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            // NOTE: The test class doesn't commit the item so
-            // we don't have to remove it
-            //( ( ContactList ) iPIMList ).removeContact(
-            //    ( Contact ) iPIMItem );
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLstringMaxLen/CLstringMaxLen.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLstringMaxLen;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * Tests maximum lengths of string values and string array elements in
- * ContactList.
- *
- * Requirement: a PIMException is thrown when an item with string
- * value or string array element too long to fit in the corresponding
- * native application UI. Maximum editable lengths are specified in
- * Phonebook and Calendar UI specs.
- *
- * The test body is in PLstringMaxLen class.
- */
-public class CLstringMaxLen
-        extends PLstringMaxLen
-{
-
-    public CLstringMaxLen(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     * Creates test items.
-     */
-    public void initTest() throws TestEndThrowable
-    {
-        log("CLstringMaxLen.initTest()");
-
-        // TEST DATA: Contact string field max lengths
-        iStringFieldMaxLengths.put(new Integer(Contact.EMAIL), new Integer(150));
-        iStringFieldMaxLengths.put(new Integer(Contact.FORMATTED_NAME), new Integer(IGNORE));       // not supported
-        iStringFieldMaxLengths.put(new Integer(Contact.NICKNAME), new Integer(50));             // not supported
-        iStringFieldMaxLengths.put(new Integer(Contact.NOTE), new Integer(1000));
-        iStringFieldMaxLengths.put(new Integer(Contact.ORG), new Integer(50));
-        iStringFieldMaxLengths.put(new Integer(Contact.TEL), new Integer(48));
-        iStringFieldMaxLengths.put(new Integer(Contact.TITLE), new Integer(50));
-        iStringFieldMaxLengths.put(new Integer(Contact.UID), new Integer(IGNORE));                  // internal
-        iStringFieldMaxLengths.put(new Integer(Contact.URL), new Integer(1000));
-        iStringFieldMaxLengths.put(new Integer(0x1005001), new Integer(50));                     // WV ID
-        iStringFieldMaxLengths.put(new Integer(0x1005002), new Integer(100));                    // SIP
-        iStringFieldMaxLengths.put(new Integer(0x1005003), new Integer(60));                     // DTMF
-        iStringFieldMaxLengths.put(new Integer(0x1005004), new Integer(50));                     // Department
-        iStringFieldMaxLengths.put(new Integer(0x1005005), new Integer(50));                     // Assistant name
-        iStringFieldMaxLengths.put(new Integer(0x1005006), new Integer(50));                     // Children
-        iStringFieldMaxLengths.put(new Integer(0x1005007), new Integer(50));                     // Spouse
-        iStringFieldMaxLengths.put(new Integer(0x1005009), new Integer(100));                    // VOIP
-        iStringFieldMaxLengths.put(new Integer(0x100500A), new Integer(100));                    // PTT
-        iStringFieldMaxLengths.put(new Integer(0x100500B), new Integer(100));                    // SWIS
-
-        // TEST DATA: Contact NAME string array element max lengths
-
-        int[] nameElemLengths = new int[ 7 ];
-        nameElemLengths[ 0 ] = 50; // NAME_FAMILY
-        nameElemLengths[ 1 ] = 50; // NAME_GIVEN
-        nameElemLengths[ 2 ] = 50; // NAME_OTHER
-        nameElemLengths[ 3 ] = 10; // NAME_PREFIX
-        nameElemLengths[ 4 ] = 10; // NAME_SUFFIX
-        nameElemLengths[ 5 ] = 50; // NAME_READING
-        nameElemLengths[ 6 ] = 50; // NAME_READING
-
-        // TEST DATA: Contact ADDR string array element max lengths
-
-        int[] addrElemLengths = new int[ 7 ];
-        addrElemLengths[ 0 ] = 20; // ADDR_POBOX
-        addrElemLengths[ 1 ] = 50; // ADDR_EXTRA
-        addrElemLengths[ 2 ] = 50; // ADDR_STREET
-        addrElemLengths[ 3 ] = 50; // ADDR_LOCALITY
-        addrElemLengths[ 4 ] = 50; // ADDR_REGION
-        addrElemLengths[ 5 ] = 20; // ADDR_POSTALCODE
-        addrElemLengths[ 6 ] = 50; // ADDR_COUNTRY
-
-        iStringArrayElemMaxLengths.put(new Integer(Contact.NAME), nameElemLengths);
-        iStringArrayElemMaxLengths.put(new Integer(Contact.ADDR), addrElemLengths);
-
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPimList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-
-            iPimItem = ((ContactList) iPimList).createContact();
-            iPimItem.commit();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        log("CLstringMaxLen.cleanupTest()");
-        try
-        {
-            ((ContactList) iPimList).removeContact((Contact) iPimItem);
-            iPimList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of Filé
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedArrayElements/CLsupportedArrayElements.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLsupportedArrayElements;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * Tests the contact list's supported array elements
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update supported and unsupported fields when
- * the PIM API specification is approved
- *
- */
-
-public class CLsupportedArrayElements
-        extends MIDPTest
-{
-
-    public CLsupportedArrayElements(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Test data including supported field values */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize test data. Contact.NAME field
-        iTestData.addSupportedArrayElement(Contact.NAME, Contact.NAME_GIVEN);
-        iTestData.addSupportedArrayElement(Contact.NAME, Contact.NAME_FAMILY);
-        iTestData.addSupportedArrayElement(Contact.NAME, Contact.NAME_PREFIX);
-        iTestData.addSupportedArrayElement(Contact.NAME, Contact.NAME_SUFFIX);
-        iTestData.addSupportedArrayElement(Contact.NAME, Contact.NAME_OTHER);
-        iTestData.addSupportedArrayElement(Contact.NAME, 5);    // Last name reading
-        iTestData.addSupportedArrayElement(Contact.NAME, 6);    // First name reading
-        // Contact.ADDR field
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_POBOX);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_STREET);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_POSTALCODE);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_LOCALITY);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_REGION);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_COUNTRY);
-        iTestData.addSupportedArrayElement(Contact.ADDR, Contact.ADDR_EXTRA);
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLsupportTester.testSupportedArrayElements(
-                         iPIMList,
-                         iTestData);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedAttributes/CLsupportedAttributes.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLsupportedAttributes;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * Tests supported attributes of the contact list
- *
- * Reference for supported attribute values was only
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some attributes.
- *
- * ATTENTION: Update supported attributes when
- * the PIM API specification is approved
- *
- */
-
-public class CLsupportedAttributes
-        extends MIDPTest
-{
-
-    public CLsupportedAttributes(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Supported attributes test data */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize test data
-        iTestData.addSupportedAttributes(Contact.NICKNAME       , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.NAME           , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.ORG            , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.TITLE          , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.BIRTHDAY       , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.NOTE           , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.PHOTO          , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.UID            , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(Contact.REVISION       , Contact.ATTR_NONE);
-        iTestData.addSupportedAttributes(0x1005002              , Contact.ATTR_NONE);   // SIP
-        iTestData.addSupportedAttributes(0x1005003              , Contact.ATTR_NONE);   // DTMF
-        iTestData.addSupportedAttributes(0x1005001              , Contact.ATTR_NONE);   // WV ID
-        iTestData.addSupportedAttributes(0x1005004              , Contact.ATTR_NONE);   // Department
-        iTestData.addSupportedAttributes(0x1005005              , Contact.ATTR_NONE);   // Assistant name
-        iTestData.addSupportedAttributes(0x1005006              , Contact.ATTR_NONE);   // Children
-        iTestData.addSupportedAttributes(0x1005007              , Contact.ATTR_NONE);   // Spouse
-        iTestData.addSupportedAttributes(0x1005008              , Contact.ATTR_NONE);   // Anniversary
-        iTestData.addSupportedAttributes(Contact.CLASS          , Contact.ATTR_NONE);
-
-        iTestData.addSupportedAttributes(Contact.ADDR,
-                                         Contact.ATTR_HOME | Contact.ATTR_WORK);
-
-        iTestData.addSupportedAttributes(Contact.TEL,
-                                         Contact.ATTR_HOME   | Contact.ATTR_WORK |
-                                         Contact.ATTR_MOBILE | Contact.ATTR_FAX  |
-                                         Contact.ATTR_PAGER  | Contact.ATTR_PREFERRED |
-                                         16777216            | 1 |   // VIDEO_CALL, ASST, AUTO
-                                         2 | Contact.ATTR_OTHER  | Contact.ATTR_SMS);
-
-        iTestData.addSupportedAttributes(Contact.EMAIL,
-                                         Contact.ATTR_HOME | Contact.ATTR_WORK | Contact.ATTR_PREFERRED);
-
-        iTestData.addSupportedAttributes(Contact.URL,
-                                         Contact.ATTR_HOME | Contact.ATTR_WORK);
-
-        // VOIP extended field
-        iTestData.addSupportedAttributes(0x1005009,
-                                         Contact.ATTR_HOME | Contact.ATTR_WORK | Contact.ATTR_PREFERRED);
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLsupportTester.testSupportedAttributes(
-                         iPIMList,
-                         iTestData);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ContactList/CLsupportedFields/CLsupportedFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ContactList.CLsupportedFields;
-// IMPORTS
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * Tests the supported fields of the contact list
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update supported and unsupported fields when
- * the PIM API specification is approved
- *
- */
-
-public class CLsupportedFields
-        extends MIDPTest
-{
-
-    public CLsupportedFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Support test data */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-
-        // Initialize supported fields
-        iTestData.addSupportedField(Contact.NICKNAME);
-        iTestData.addSupportedField(Contact.NAME);
-        iTestData.addSupportedField(Contact.ORG);
-        iTestData.addSupportedField(Contact.TITLE);
-        iTestData.addSupportedField(Contact.ADDR);
-        iTestData.addSupportedField(Contact.TEL);
-        iTestData.addSupportedField(Contact.EMAIL);
-        iTestData.addSupportedField(Contact.URL);
-        iTestData.addSupportedField(Contact.BIRTHDAY);
-        iTestData.addSupportedField(Contact.NOTE);
-        iTestData.addSupportedField(Contact.PHOTO);
-        iTestData.addSupportedField(Contact.UID);
-        iTestData.addSupportedField(Contact.REVISION);
-        iTestData.addSupportedField(0x1005002);                // SIP
-        iTestData.addSupportedField(0x1005003);                // DTMF
-        iTestData.addSupportedField(0x1005001);                // WV ID
-        iTestData.addSupportedField(0x1005004);                // Department
-        iTestData.addSupportedField(0x1005005);                // Assistant name
-        iTestData.addSupportedField(0x1005006);                // Children
-        iTestData.addSupportedField(0x1005007);                // Spouse
-        iTestData.addSupportedField(0x1005008);                // Anniversary
-        iTestData.addSupportedField(0x1005009);                // VOIP
-        iTestData.addSupportedField(Contact.CLASS);
-        iTestData.addSupportedField(0x100500A);                // PTT
-        iTestData.addSupportedField(0x100500B);                // SWIS
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.CONTACT_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLsupportTester.testSupportedFields(
-                         iPIMList,
-                         iTestData);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/EConstants/EConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Event.EConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.Event;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that Contact class constants equal specification.
- */
-public class EConstants
-        extends MIDPTest
-{
-
-    public EConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        if (Event.ALARM != 100)
-        {
-            failTest("Event.ALARM != 100");
-        }
-        if (Event.CLASS != 101)
-        {
-            failTest("Event.CLASS != 101");
-        }
-        if (Event.END != 102)
-        {
-            failTest("Event.END != 102");
-        }
-        if (Event.LOCATION != 103)
-        {
-            failTest("Event.LOCATION != 103");
-        }
-        if (Event.NOTE != 104)
-        {
-            failTest("Event.NOTE != 104");
-        }
-        if (Event.REVISION != 105)
-        {
-            failTest("Event.REVISION != 105");
-        }
-        if (Event.START != 106)
-        {
-            failTest("Event.START != 106");
-        }
-        if (Event.SUMMARY != 107)
-        {
-            failTest("Event.SUMMARY != 107");
-        }
-        if (Event.UID != 108)
-        {
-            failTest("Event.UID != 108");
-        }
-        if (Event.CLASS_CONFIDENTIAL != 200)
-        {
-            failTest("Event.CLASS_CONFIDENTIAL != 200");
-        }
-        if (Event.CLASS_PRIVATE != 201)
-        {
-            failTest("Event.CLASS_PRIVATE != 201");
-        }
-        if (Event.CLASS_PUBLIC != 202)
-        {
-            failTest("Event.CLASS_PUBLIC != 202");
-        }
-
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/ERepeat/ERepeat.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Event.ERepeat;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.EventList;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.Event.setRepeat() and
- * javax.microedition.pim.Event.getRepeat()
- *
- */
-public class ERepeat
-        extends MIDPTest
-{
-
-    public ERepeat(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        RepeatRule rr1 = null;
-        PIM p = null;
-        EventList eventList = null;
-        Event e = null;
-        try
-        {
-            rr1 = new RepeatRule();
-            rr1.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-            p = PIM.getInstance();
-            eventList =
-                (EventList)p.openPIMList(PIM.EVENT_LIST, PIM.READ_ONLY);
-            e = eventList.createEvent();
-        }
-        catch (Throwable ex)
-        {
-            failTest("preconditions failed: " + ex.toString());
-        } // end of try-catch
-
-
-        // Test steps
-        // step s1
-        testGetRepeat(e, null);
-
-        // step s2
-        RepeatRule rr2 = testSetRepeat(e, rr1);
-
-        // step s3
-        rr2.setInt(RepeatRule.FREQUENCY, RepeatRule.WEEKLY);
-        testSetRepeat(e, rr2);
-        if (rr1.getInt(RepeatRule.FREQUENCY) != RepeatRule.DAILY)
-        {
-            failTest("rr1 has been modified");
-        }
-
-        // step s4
-        testGetRepeat(e, rr2);
-
-        // step s5
-        testSetRepeat(e, null);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1, s2, s4, s5
-     */
-    private RepeatRule testGetRepeat(Event aEvent, RepeatRule aExpected)
-    throws TestEndThrowable
-    {
-        RepeatRule repeat = null;
-        try
-        {
-            repeat = aEvent.getRepeat();
-        }
-        catch (Throwable e)
-        {
-            failTest("getRepeat threw: " + e.toString());
-        } // end of try-catch
-        if (aExpected == null)
-        {
-            if (repeat != null)
-            {
-                failTest("getRepeat did not return null");
-            } // end of if (repeat != null)
-        } // end of if (aExpected == null)
-        else
-        {
-            if (!aExpected.equals(repeat))
-            {
-                failTest("the repeat rules do not match");
-            } // end of if (!aExpected.equals( repeat ))
-        } // end of else
-        return repeat;
-    }
-
-    /**
-     * Test steps s2, s3, s5
-     */
-    private RepeatRule testSetRepeat(Event aEvent, RepeatRule aRepeat)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aEvent.setRepeat(aRepeat);
-        }
-        catch (Throwable e)
-        {
-            failTest("setRepeat threw:" + e.toString());
-        } // end of try-catch
-        return testGetRepeat(aEvent, aRepeat);
-    }
-
-}
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/Event/Ecommit/Ecommit.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,335 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.Event.Ecommit;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that Event.commit() persists values correctly
- */
-public class Ecommit
-        extends MIDPTest
-{
-    private String[] iEventLists;
-    private String iItemSubject;
-    private Date iStartDate;
-    private Date iEndDate;
-    private int iAlarm = 900;
-    private int iDefaultAlarm = -43200;
-
-    public Ecommit(String sTestName,
-                   j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Init test data
-        init();
-        // Do not close lists between commit
-        doTest(false);
-        // Close lists between commit
-        doTest(true);
-    }
-
-    public void doTest(boolean aCloseList) throws TestEndThrowable
-    {
-        try
-        {
-            debug("Ecommit::doTest - testing appointments");
-            EventList appts = openList(iEventLists[ 0 ]);
-            // Test first event list (appointments)
-
-            // Create an appointment and initialize data to it
-            Event appt = createAndCommitItem(appts);
-
-            if (aCloseList)
-            {
-                appts.close();
-                appts = openList(iEventLists[ 0 ]);
-                appt  = getSpecificEventItem(appts, iItemSubject);
-            }
-
-            // Check commited appointment item that data was scaled correctly
-            testField(appts, appt, Event.SUMMARY, iItemSubject);
-            testField(appts, appt, Event.START, iStartDate);
-            testField(appts, appt, Event.END, iEndDate);
-            testField(appts, appt, Event.ALARM, new Integer(iAlarm));
-            // Change alarm to future
-            appt.setInt(Event.ALARM, 0, PIMItem.ATTR_NONE, -90000);
-            appt.commit();
-
-            if (aCloseList)
-            {
-                appts.close();
-                appts = openList(iEventLists[ 0 ]);
-                appt  = getSpecificEventItem(appts, iItemSubject);
-            }
-
-            // Alarm occurs at 12:00 o'clock but the offset must be calculated from the start time
-            Date alarmDate = new Date((getStartOfDay(iStartDate).getTime() + (43200000)));
-            int alarmInt = getDifferenceInSeconds(iStartDate, alarmDate);
-            testField(appts, appt, Event.ALARM, new Integer(alarmInt));
-            appts.removeEvent(appt);
-            appts.close();
-
-            debug("Ecommit::doTest - testing memos");
-
-            // Test second event list (memos)
-            EventList memos = openList(iEventLists[ 1 ]);
-            // Create a memo and initialize data to it
-            Event memo = createAndCommitItem(memos);
-
-            if (aCloseList)
-            {
-                memos.close();
-                memos = openList(iEventLists[ 1 ]);
-                memo  = getSpecificEventItem(memos, iItemSubject);
-            }
-
-            // Check commited memo item that data was scaled correctly
-            testField(memos, memo, Event.SUMMARY, iItemSubject);
-            testField(memos, memo, Event.START, iStartDate);
-            testField(memos, memo, Event.END, iEndDate);
-
-            testField(memos, memo, Event.ALARM, new Integer(iAlarm));
-            // Change alarm to future
-            memo.setInt(Event.ALARM, 0, PIMItem.ATTR_NONE, -90000);
-            memo.commit();
-
-            if (aCloseList)
-            {
-                memos.close();
-                memos = openList(iEventLists[ 1 ]);
-                memo  = getSpecificEventItem(memos, iItemSubject);
-            }
-
-            // Alarm occurs at 12:00 o'clock but the offset must be calculated from the start time
-            alarmDate = new Date((getStartOfDay(iStartDate).getTime() + (43200000)));
-            alarmInt = getDifferenceInSeconds(iStartDate, alarmDate);
-            testField(memos, memo, Event.ALARM, new Integer(alarmInt));
-
-            memos.removeEvent(memo);
-            memos.close();
-
-            debug("Ecommit::doTest - testing annivs");
-
-            // Test third event list (anniversaries)
-            EventList annivs = openList(iEventLists[ 2 ]);
-            // Create an appointment and initialize data to it
-            Event anniv = createAndCommitItem(annivs);
-
-            if (aCloseList)
-            {
-                annivs.close();
-                annivs = openList(iEventLists[ 2 ]);
-                anniv  = getSpecificEventItem(annivs, iItemSubject);
-            }
-
-            // Check commited appointment item that data was scaled correctly
-            testField(annivs, anniv, Event.SUMMARY, iItemSubject);
-            testField(annivs, anniv, Event.START, getStartOfDay(iStartDate));
-            alarmDate = new Date((iStartDate.getTime() - iAlarm*1000));
-            // Date has been converted to start of day
-            alarmInt = getDifferenceInSeconds(getStartOfDay(iStartDate), alarmDate);
-            testField(annivs, anniv, Event.ALARM, new Integer(alarmInt));
-            // Change alarm to future
-            anniv.setInt(Event.ALARM, 0, PIMItem.ATTR_NONE, -90000);
-            anniv.commit();
-
-            if (aCloseList)
-            {
-                annivs.close();
-                annivs = openList(iEventLists[ 2 ]);
-                anniv  = getSpecificEventItem(annivs, iItemSubject);
-            }
-
-            // test default value since start time is set to 00:00
-            testField(annivs, anniv, Event.ALARM, new Integer(iDefaultAlarm));
-            annivs.removeEvent(anniv);
-            annivs.close();
-        }
-        catch (Throwable e)
-        {
-            failTest("Event.commit() test failed: " + e.toString());
-        }
-
-        passTest();
-    }
-
-    private EventList openList(String aListName)
-    {
-        try
-        {
-            PIM pim = PIM.getInstance();
-            return (EventList)pim.openPIMList(PIM.EVENT_LIST,
-                                              PIM.READ_WRITE,
-                                              aListName);
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to open PIM list");
-        }
-        return null;
-    }
-
-    private Event getSpecificEventItem(EventList aList, String aSubject) throws Exception
-    {
-        Event matchingItem = aList.createEvent();
-        matchingItem.addString(Event.SUMMARY, PIMItem.ATTR_NONE, aSubject);
-        Enumeration items = aList.items(matchingItem);
-        // There should be at least one element
-        return (Event)items.nextElement();
-    }
-
-    private Event createAndCommitItem(EventList aList)
-    {
-        Event event = aList.createEvent();
-        // Initialize data
-        if (aList.isSupportedField(Event.SUMMARY))
-        {
-            event.addString(Event.SUMMARY, PIMItem.ATTR_NONE, iItemSubject);
-        }
-        if (aList.isSupportedField(Event.START))
-        {
-            event.addDate(Event.START, PIMItem.ATTR_NONE, iStartDate.getTime());
-        }
-        if (aList.isSupportedField(Event.END))
-        {
-            event.addDate(Event.END, PIMItem.ATTR_NONE, iEndDate.getTime());
-        }
-        if (aList.isSupportedField(Event.ALARM))
-        {
-            event.addInt(Event.ALARM, PIMItem.ATTR_NONE, iAlarm);
-        }
-        try
-        {
-            event.commit();
-        }
-        catch (Exception e)
-        {
-            failTest("Ecommit::createAndCommitItem() - Exception when creating item");
-        }
-        return event;
-    }
-
-    private void init()
-    {
-        // Clean lists
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iEventLists = pim.listPIMLists(PIM.EVENT_LIST);
-
-            for (int i = 0; i < iEventLists.length; i++)
-            {
-                EventList list = openList(iEventLists[ i ]);
-                Enumeration items = list.items();
-                while (items.hasMoreElements())
-                {
-                    Event event = (Event)items.nextElement();
-                    list.removeEvent(event);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Ecommit::init() - Exception when cleaning lists");
-        }
-
-        iStartDate = new Date(System.currentTimeMillis());
-        // End date to next day
-        iEndDate = new Date(iStartDate.getTime() + 86400000);
-        iItemSubject = "TestEventItem" + iStartDate.toString();
-    }
-
-    private Date getStartOfDay(Date aDate)
-    {
-        Calendar cal = Calendar.getInstance();
-
-        cal.setTime(aDate);
-        cal.set(Calendar.HOUR_OF_DAY, 0);
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-
-        return cal.getTime();
-    }
-
-    private int getDifferenceInSeconds(Date aFirstDate, Date aSecondDate)
-    {
-        double diff = (aFirstDate.getTime() - aSecondDate.getTime());
-        int diffSecs = (((int)diff) / 1000);
-        // Round full seconds
-        diffSecs /= 60;
-        return diffSecs*60;
-    }
-
-    private void testField(EventList aList, Event aItem, int aField, Object aExpectedResult)
-    throws TestEndThrowable
-    {
-        boolean result = false;
-        int type = aList.getFieldDataType(aField);
-        debug("Ecommit::testField - testing field: " + aField + " + with value: " + aExpectedResult);
-        switch (type)
-        {
-        case PIMItem.STRING:
-        {
-            String value = ((String)aExpectedResult);
-            result = value.equals(aItem.getString(aField, 0));
-            debug("Ecommit::testField - returned value: " + aItem.getString(aField, 0));
-            break;
-        }
-        case PIMItem.INT:
-        {
-            Integer value = ((Integer)aExpectedResult);
-            result = value.intValue() == aItem.getInt(aField, 0);
-            debug("Ecommit::testField - returned value: " + aItem.getInt(aField, 0));
-            debug("ATTENTION!!! Note that Java may have problems handling daylight saving times. Check that when this case fails");
-            break;
-        }
-        case PIMItem.DATE:
-        {
-            Date value = ((Date)aExpectedResult);
-            result = value.getTime() == aItem.getDate(aField, 0);
-            debug("Ecommit::testField - returned value: " + new Date(aItem.getDate(aField, 0)).toString());
-            debug("ATTENTION!!! Note that Java may have problems handling daylight saving times. Check that when this case fails");
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            Boolean value = ((Boolean)aExpectedResult);
-            result = value.booleanValue() == aItem.getBoolean(aField, 0);
-            debug("Ecommit::testField - returned value: " + aItem.getBoolean(aField, 0));
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        default:
-            assertString(false, "Ecommit::testField - test does not support field type: " + type);
-            break;
-        }
-        assertString(result, "Ecommit::testField - incorrect value returned from field: " + aField);
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELConstants/ELConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.EventList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList constants.
- */
-public class ELConstants
-        extends MIDPTest
-{
-
-    public ELConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        int[] constants = { EventList.STARTING, 0,
-                            EventList.ENDING, 1,
-                            EventList.OCCURRING, 2
-                          };
-
-        for (int i=0; i < constants.length; i += 2)
-        {
-            if (constants[i] != constants[i+1])
-            {
-                failTest("Class field (" + (i+1) + ") is not correct.");
-            }
-        }
-        // all is well
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELcreateEvent/ELcreateEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELcreateEvent;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.createEvent()
- */
-public class ELcreateEvent
-        extends MIDPTest
-{
-
-    public ELcreateEvent(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] eventListNames = null;
-        EventList el = null;
-        int count = 0;
-
-        // open first event list
-        try
-        {
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            el = (EventList)p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE, eventListNames[0]);
-
-            Enumeration e = el.items();
-            count = itemCount(e);
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        }
-
-        log("EventList has "+ count + " items.");
-
-        log("Test that creating new Event item does not increase item count in EventList.");
-
-        Event e = null;
-
-        try
-        {
-            e = el.createEvent();
-
-            Enumeration en = el.items();
-            el.close();
-
-            if (itemCount(en) != count)
-            {
-                failTest("Creating new Event changed EventList item count!");
-            }
-
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Event item creation: " + t);
-        }
-
-        log("Test that created Event item is empty.");
-        int[] fields = e.getFields();
-        if (fields.length != 0)
-        {
-            failTest("Created new Event item has not got all fields empty!");
-        }
-
-        passTest();
-    }
-
-    private int itemCount(Enumeration e)
-    {
-        int tmp = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            tmp++;
-        }
-        return tmp;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELfieldsOrder/ELfieldsOrder.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELfieldsOrder;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that fields of the event lists are in right order
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields. Order was
- * also checked from the emulator
- *
- * ATTENTION: Update fields if needed when the API specification
- * is approved
- */
-
-public class ELfieldsOrder
-        extends MIDPTest
-{
-
-    public ELfieldsOrder(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM lists */
-    private PIMList iAptList = null;
-    private PIMList iEventList = null;
-    private PIMList iAnvList = null;
-
-    /* List names */
-    private String[] iListNames = null;
-
-    /* Test data containing supported field values in right order */
-    private SupportTestData iOrderedAptFields = new SupportTestData();
-    private SupportTestData iOrderedEventFields = new SupportTestData();
-    private SupportTestData iOrderedAnvFields = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize supported fields list. Check that the
-        // order is the same as in the native side event list
-        iOrderedAptFields.addSupportedField(Event.SUMMARY);
-        iOrderedAptFields.addSupportedField(Event.NOTE);
-        iOrderedAptFields.addSupportedField(Event.LOCATION);
-        iOrderedAptFields.addSupportedField(Event.START);
-        iOrderedAptFields.addSupportedField(Event.END);
-        iOrderedAptFields.addSupportedField(Event.ALARM);
-        iOrderedAptFields.addSupportedField(Event.CLASS);
-        iOrderedAptFields.addSupportedField(Event.UID);
-        iOrderedAptFields.addSupportedField(Event.REVISION);
-
-        // Ordered event fields
-        iOrderedEventFields.addSupportedField(Event.SUMMARY);
-        iOrderedEventFields.addSupportedField(Event.NOTE);
-        iOrderedEventFields.addSupportedField(Event.START);
-        iOrderedEventFields.addSupportedField(Event.END);
-        iOrderedEventFields.addSupportedField(Event.ALARM);
-        iOrderedEventFields.addSupportedField(Event.CLASS);
-        iOrderedEventFields.addSupportedField(Event.UID);
-        iOrderedEventFields.addSupportedField(Event.REVISION);
-
-        // Ordered anniversary fields
-        iOrderedAnvFields.addSupportedField(Event.SUMMARY);
-        iOrderedAnvFields.addSupportedField(Event.NOTE);
-        iOrderedAnvFields.addSupportedField(Event.START);
-        iOrderedAnvFields.addSupportedField(Event.ALARM);
-        iOrderedAnvFields.addSupportedField(Event.CLASS);
-        iOrderedAnvFields.addSupportedField(Event.UID);
-        iOrderedAnvFields.addSupportedField(Event.REVISION);
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iListNames = pim.listPIMLists(PIM.EVENT_LIST);
-            // Open appointments lists
-            iAptList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 0 ]);
-            // Open events list
-            iEventList = pim.openPIMList(
-                             PIM.EVENT_LIST,
-                             PIM.READ_WRITE,
-                             iListNames[ 1 ]);
-            // Open anniversaries list
-            iAnvList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 2 ]);
-
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        // Test appointment's fields
-        log("Testing " + iAptList.getName() + " list ");
-        String err = PLsupportTester.testFieldsOrder(
-                         iAptList,
-                         iOrderedAptFields);
-        CheckError(err);
-        log(iAptList.getName() + " list tested ");
-
-        // Test event's fields
-        log("Testing " + iEventList.getName() + " list ");
-        err = PLsupportTester.testFieldsOrder(
-                  iEventList,
-                  iOrderedEventFields);
-        CheckError(err);
-        log(iEventList.getName() + " list tested ");
-
-        // Test anniversary's fields
-        log("Testing " + iAnvList.getName() + " list ");
-        err = PLsupportTester.testFieldsOrder(
-                  iAnvList,
-                  iOrderedAnvFields);
-        CheckError(err);
-        log(iAnvList.getName() + " list tested ");
-
-        passTest();
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iAptList.close();
-            iEventList.close();
-            iAnvList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     *  Helper function
-     */
-    private void CheckError(String aError)
-    throws TestEndThrowable
-    {
-        // Fail if error string was returned
-        if (aError != null)
-        {
-            failTest(aError);
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELgetSupportedRRFields/ELsupportedRRFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELgetSupportedRRFields;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.EventList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.getSupportedRepeatRuleFields().
- *
- */
-public class ELsupportedRRFields
-        extends MIDPTest
-{
-
-    public ELsupportedRRFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private String[] iRequiredEventLists = null;
-    private Vector iRequiredFrequencies = new Vector(); // vector of int[]
-    private Vector iRequiredFields = new Vector();  // vector of int[]
-    private PIM p = null;
-    private String[] eventListNames = null;
-    private EventList[] el = null;
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        // setup test preconditions
-        try
-        {
-            // get data from property file
-            //log("parse properties");
-            parseProperties();
-
-            //log("open lists");
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-
-            int listCount = eventListNames.length;
-            el = new EventList[ listCount ];
-
-            for (int i = 0; i < listCount; i++)
-            {
-                el[ i ] = (EventList) p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE,
-                                                    eventListNames[ i ]);
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-        // check that required number of event lists is found
-        if (eventListNames.length != iRequiredEventLists.length)
-        {
-            log("Number of EventLists not equal to required.");
-            if (eventListNames.length < iRequiredEventLists.length)
-            {
-                failTest("Implementation lacks the required EventLists.");
-            }
-        }
-
-        // test that all EventLists supports only required fields for all required frequencies
-        for (int i=0; i < el.length; i++)
-        {
-            // get required frequencies first
-            int[] reqArr = (int[]) iRequiredFrequencies.elementAt(i);
-            log("EventList "+ iRequiredEventLists[i] + " requires frequencies: " + listAsString(reqArr));
-
-            if (reqArr[0] != -1)
-            {
-                testFields(el[i], reqArr, (Vector) iRequiredFields.elementAt(i));
-            }
-        }
-
-        // test that IAE is thrown if invalid frequency field is given as parameter
-        int[] invalids = {-1000, -1, 0, 1, 15, 20, 200, 4096};
-        for (int i=0; i < invalids.length; i++)
-        {
-            try
-            {
-                el[0].getSupportedRepeatRuleFields(invalids[i]);
-                failTest("EventList.getSupportedRepeatRuleFields("+invalids[i]+") did not throw IAE!");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                //ok
-            }
-            catch (Exception e)
-            {
-                failTest("EventList.getSupportedRepeatRuleFields("+invalids[i]+") threw wrong exception: "+e);
-            }
-        }
-
-        // all is well
-        passTest();
-
-    }
-
-    // test that EventList supports only required fields for all required frequencies
-    private void testFields(EventList el, int[] frequencies, Vector validFieldVectors) throws TestEndThrowable
-    {
-        log("Testing required fields for frequencies for EventList "+ el.getName());
-
-        // test all required frequencies
-        for (int i=0; i < frequencies.length; i++)
-        {
-            // get supporteg fields
-            int[] fields = el.getSupportedRepeatRuleFields(frequencies[i]);
-
-            // get valid fields
-            int[] reqArr = (int[]) validFieldVectors.elementAt(i);
-
-            // compare fields
-            if (reqArr[0] != -1)
-            {
-                log("Required fields for frequency "+frequencies[i] +": "+ listAsString(reqArr));
-                if (!areEqual(fields, reqArr))
-                {
-                    log("Supported fields for frequency "+frequencies[i] +": "+ listAsString(fields));
-                    failTest("EventList does not have the required" +
-                             " fields for frequency "+ frequencies[i]);
-                }
-            }
-            else
-            {
-                log("Required fields for frequency "+frequencies[i] +": EMPTY");
-                if (fields.length != 0)
-                {
-                    log(listAsString(fields));
-                    failTest("EventList has more than required" +
-                             " fields for frequency "+ frequencies[i]);
-                }
-            }
-        }
-    }
-
-    // tests that two int arrays have same values (may be in different order)
-    private boolean areEqual(int[] a1, int[] a2)
-    {
-        if (a1.length != a2.length)
-        {
-            return false;
-        }
-
-        int[] arr1 = sort(a1);
-        int[] arr2 = sort(a2);
-
-        for (int i = 0; i < arr1.length; i++)
-        {
-            if (arr1[i] != arr2[i])
-            {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    // sorts an int array to ascending order
-    // bubblesort is fine
-    private int[] sort(int[] arr)
-    {
-        if (arr.length < 2)
-        {
-            return arr;
-        }
-        for (int j = 0; j < arr.length-1; j++)
-        {
-            for (int i = 0; i < arr.length-1-j; i++)
-            {
-                if (arr[i] > arr[i+1])
-                {
-                    int tmp = arr[i];
-                    arr[i] = arr[i+1];
-                    arr[i+1] = tmp;
-                }
-            }
-        }
-        return arr;
-    }
-
-    private String listAsString(int[] arr)
-    {
-        String val = "";
-        for (int i = 0; i < arr.length; i++)
-        {
-            val += arr[i] + " ";
-        }
-        return val.trim();
-    }
-
-    private void parseProperties()
-    {
-        iRequiredEventLists = new String[] { "appointment", "event", "anniversary" };
-
-        iRequiredFrequencies.addElement(new int[] { 16, 17, 18, 19 });
-        iRequiredFrequencies.addElement(new int[] { -1 });
-        iRequiredFrequencies.addElement(new int[] { 19 });
-
-        // required fields for each frequency in list appointment
-        Vector v1 = new Vector();
-        v1.addElement(new int[] { 0 });
-        v1.addElement(new int[] { 0, 128 });
-        v1.addElement(new int[] { 0 });
-        v1.addElement(new int[] { 0 });
-        iRequiredFields.addElement(v1);
-
-        // required fields for each frequency in list event
-        Vector v2 = new Vector();
-        iRequiredFields.addElement(v2);
-
-        // required fields for each frequency in list anniversary
-        Vector v3 = new Vector();
-        v3.addElement(new int[] { 0 });
-        iRequiredFields.addElement(v3);
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELimportEvent/ELimportEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELimportEvent;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.importToDo()
- */
-public class ELimportEvent
-        extends MIDPTest
-{
-
-    public ELimportEvent(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private EventList el = null;
-    private String[] stringDates = { "040101:000000", "040113:000000", "040201:000000"};
-    private long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] eventListNames = null;
-        Event e1 = null;
-        int count = 0;
-        int countR = 0;
-
-        // open first todo list
-        try
-        {
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            el = (EventList)p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE, eventListNames[0]);
-
-            Enumeration e = el.items(EventList.OCCURRING, dates[0], dates[1], true);
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                count++;
-            }
-            Enumeration e2 = el.items(EventList.OCCURRING, dates[1], dates[2], false);
-            while (e2.hasMoreElements())
-            {
-                e2.nextElement();
-                countR++;
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // read Event from serial format
-        InputStream is = null;
-        try
-        {
-            is = getClass().getResourceAsStream("/res/appointment.vcs");
-            PIMItem[] items = p.fromSerialFormat(is, "UTF-8");
-            e1 = (Event) items[0];
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to read an Event from file: " + e);
-        }
-
-        log("EventList has "+ count + " (initial only) items at range: "+dates[0]+"-"+dates[1]);
-        log("EventList has "+ countR + " (repeating also) items at range: "+dates[1]+"-"+dates[2]);
-
-        log("Test that importing new Event item does not increase item count in EventList.");
-        Event e2 = null;
-        try
-        {
-            e2 = el.importEvent(e1);
-
-            if (countItems(el, dates[0], dates[2], true) != count)
-            {
-                failTest("Importing new Event changed EventList item count!");
-            }
-            // test that imported item is ok.
-            String summary = e2.getString(Event.SUMMARY, 0);
-            if (!summary.equals("timed appointment"))
-            {
-                failTest("Event item import failed to set summary to timed appointment, was: "+summary);
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test Event item import: " + e);
-        } // end of try-catch
-
-        log("Test that commiting the imported Event item increases item count in EventList.");
-        try
-        {
-            e2.commit();
-            log("Event added: " +e2.getDate(Event.START, 0)+"-"+e2.getDate(Event.END, 0));
-
-            if (countItems(el, dates[0], dates[2], true) != (count + 1))
-            {
-                log("Range: "+dates[0]+"-"+dates[2]);
-                cleanup(e2);
-                failTest("Commiting imported Event did not increase EventList item count by one!");
-            }
-            if (countItems(el, dates[1], dates[2], true) != countR)
-            {
-                log("Range: "+dates[1]+"-"+dates[2]);
-                cleanup(e2);
-                failTest("Commiting imported Event increased EventList item count by one when checking for initial event only and range out of imported event!");
-            }
-            if (countItems(el, dates[1], dates[2], false) != (countR + 1))
-            {
-                log("Range: "+dates[1]+"-"+dates[2]);
-                cleanup(e2);
-                failTest("Commiting imported Event did not increase EventList item count for other than initial event only!");
-            }
-        }
-        catch (Exception e)
-        {
-            cleanup(e2);
-            failTest("Failed to commit imported Event to list: " + e);
-        }
-
-        log("Test that removing imported Event item decreases item count.");
-        try
-        {
-            el.removeEvent(e2);
-            if (countItems(el, dates[0], dates[2], true) != count)
-            {
-                failTest("Removing imported Event did not decrease EventList item count by one!");
-            }
-            if (countItems(el, dates[1], dates[2], false) != countR)
-            {
-                failTest("Removing imported Event did not decrease EventList item&repeat count by one!");
-            }
-            el.close();
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to remove imported Event from list: " + e);
-        }
-
-
-        passTest();
-    }
-
-    private void cleanup(Event e2)
-    {
-        try
-        {
-            el.removeEvent(e2);
-            el.close();
-        }
-        catch (Exception e)
-        {
-            log("Error while cleaning up: "+e);
-        }
-    }
-
-    private int countItems(EventList ael, long date1, long date2, boolean initialOnly) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = ael.items(EventList.OCCURRING, date1, date2, initialOnly);
-            while (e.hasMoreElements())
-            {
-                Event ev = (Event)e.nextElement();
-                log("Event found at: " +ev.getDate(Event.START, 0)+"-"+ev.getDate(Event.END, 0));
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-        log(tmp+" Events found at: "+date1+"-"+date2+", initialOnly="+initialOnly);
-        return tmp;
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELitems/ELitems.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELitems;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.items().
- */
-public class ELitems
-        extends MIDPTest
-{
-
-    public ELitems(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private PIM p = null;
-    private String[] eventListNames = null;
-    private EventList el = null;
-    private long[] dates;
-
-    public void initTest() throws TestEndThrowable
-    {
-        log("Initializing test.");
-        System.out.println("initTest +");
-        long hourInMillis = 60 * 60 * 1000;
-        String[] stringDates = { "040427:080000", "040429:080000", "040501:080000",
-                                 "040506:080000", "040106:080000", "041231:080000",
-                                 "040430:080000", "040502:080000", "040430:180000",
-                                 "040503:080000", "040428:080000", "040505:080000"
-                               };
-        dates = TimeTool.getTimeInMillis(stringDates);
-
-        // setup test preconditions
-        try
-        {
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-
-            // just get first eventlist
-            el= (EventList) p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE, eventListNames[0]);
-
-            // count how many events between 27.4.2004-6.5.2004
-            Enumeration e = el.items(EventList.OCCURRING, dates[0], dates[3], false);
-            if (countItems(e) != 0)
-            {
-                failTest("preconditions failed. Eventlist " + eventListNames[0] +
-                         " has event(s) during 27.4.2004-6.5.2004. Cannot execute tests.");
-            }
-
-            // create event e1 for 29.4.2004-1.5.2004
-            Event e1 = el.createEvent();
-            e1.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "Test Event 1");
-            e1.addDate(Event.START, PIMItem.ATTR_NONE, dates[1]);
-            e1.addDate(Event.END, PIMItem.ATTR_NONE, dates[2]);
-            log("Created Event with START: " + e1.getDate(Event.START, 0)
-                + " and END: " + e1.getDate(Event.END, 0));
-
-            // create event e2, which is repeated every tuesday during year 2004 (6.1.2004 is a tuesday)
-            Event e2 = el.createEvent();
-            e2.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "Test Event 2");
-            e2.addDate(Event.START, PIMItem.ATTR_NONE, dates[4]);
-            e2.addDate(Event.END, PIMItem.ATTR_NONE, dates[4] + hourInMillis*6);
-            RepeatRule rr = new RepeatRule();
-            rr.setInt(RepeatRule.FREQUENCY, RepeatRule.WEEKLY);
-            rr.setDate(RepeatRule.END, dates[5]);
-            e2.setRepeat(rr);
-            log("Created Event with START: " + e2.getDate(Event.START, 0)
-                + " and END: " + e2.getDate(Event.END, 0)
-                + " repeating weekly until: " + rr.getDate(RepeatRule.END));
-
-            // commit events to the list
-            e1.commit();
-            e2.commit();
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-        log("Initialization OK.");
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        System.out.println("runtest +");
-        testItems(EventList.STARTING, dates[0], dates[3], true, 1);
-        System.out.println("runtest ++");
-        testItems(EventList.STARTING, dates[0], dates[3], false, 2);
-
-        testItems(EventList.OCCURRING, dates[0], dates[3], false, 2);
-
-        testItems(EventList.ENDING, dates[0], dates[3], false, 2);
-
-        testItems(EventList.STARTING, dates[0], dates[6], true, 1);
-
-        testItems(EventList.STARTING, dates[6], dates[7], true, 0);
-
-        testItems(EventList.OCCURRING, dates[6], dates[8], true, 1);
-
-        testItems(EventList.ENDING, dates[6], dates[9], true, 1);
-
-        testItems(EventList.ENDING, dates[0], dates[10], true, 0);
-
-        testItems(EventList.ENDING, dates[7], dates[11], true, 0);
-
-        // all is well
-        passTest();
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            // remove "Test Event" items
-            Enumeration e = el.items();
-            while (e.hasMoreElements())
-            {
-                Event ev = (Event)e.nextElement();
-                if (ev.getString(Event.SUMMARY, 0).startsWith("Test Event"))
-                {
-                    el.removeEvent(ev);
-                }
-            }
-            // close list
-            el.close();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-
-    private void testItems(int searchType, long startDate, long endDate, boolean initialOnly, int okCount) throws TestEndThrowable
-    {
-        log("Test that el.items( "+searchType+", "+startDate+", "+endDate+", "+initialOnly+" ) returns "+okCount+" items");
-        try
-        {
-            Enumeration e = el.items(searchType, startDate, endDate, initialOnly);
-
-            if (countItems(e) != okCount)
-            {
-                failTest("EventList.items( "+searchType+", "+startDate+", "+endDate+", "+initialOnly+" ) failed!");
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("EventList.items( "+searchType+", "+startDate+", "+endDate+", "+initialOnly+" ) failed!" +e);
-        }
-    }
-
-    private int countItems(Enumeration e)
-    {
-        int val = 0;
-
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            val++;
-        }
-        return val;
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELitemsEx/ELitemsEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELitemsEx;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.items().
- */
-public class ELitemsEx
-        extends MIDPTest
-{
-
-    public ELitemsEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private PIM p = null;
-    private String[] eventListNames = null;
-    private EventList el = null;
-
-    public void runTest() throws TestEndThrowable
-    {
-        String[] stringDates = { "040101:080000", "041231:080000" };
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        // setup test preconditions
-        try
-        {
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-
-            // just get first eventlist
-            el= (EventList) p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE, eventListNames[0]);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-        log("Test that calling el.items() using invalid searchtype causes IAE");
-        int[] invalids = { -1, 3, 4 };
-        for (int i = 0; i < invalids.length; i++)
-        {
-            try
-            {
-                el.items(invalids[i], dates[0], dates[1], true);
-                failTest("Invalid searchtype did not cause IAE!");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("Invalid searchtype did not cause IAE, but: " +e);
-            }
-        }
-
-        log("Test that calling el.items() using bigger startdate than enddate causes IAE");
-        try
-        {
-            el.items(EventList.OCCURRING, dates[1], dates[0], true);
-            failTest("bigger startdate than enddate did not cause IAE!");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // ok
-        }
-        catch (Exception e)
-        {
-            failTest("bigger startdate than enddate did not cause IAE, but: " +e);
-        }
-
-        log("Test that calling el.items() when el is closed causes PIME");
-        try
-        {
-            el.close();
-            el.items(EventList.OCCURRING, dates[0], dates[1], true);
-            failTest("closed list did not cause PIME!");
-        }
-        catch (PIMException pime)
-        {
-            // ok
-        }
-        catch (Exception e)
-        {
-            failTest("closed list did not cause PIME, but: " +e);
-        }
-
-        log("Open eventlist in WRITE_ONLY mode and test that calling items() causes SecurityException.");
-        try
-        {
-            // just get first eventlist
-            el= (EventList) p.openPIMList(PIM.EVENT_LIST, PIM.WRITE_ONLY, eventListNames[0]);
-            el.items(EventList.OCCURRING, dates[0], dates[1], true);
-            failTest("calling items() using WRITE_ONLY list did not cause SecurityException!");
-        }
-        catch (SecurityException se)
-        {
-            // ok
-        }
-        catch (Exception e)
-        {
-            failTest("calling items() using WRITE_ONLY list did not cause SecurityException, but: " + e);
-        } // end of try-catch
-
-        // all is well
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELmultipleLists/ELmultipleLists.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELmultipleLists;
-//IMPORTS
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * See OpenMultipleLists.java.
- *
- */
-public class ELmultipleLists extends OpenMultipleLists
-{
-
-    public ELmultipleLists(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    protected int listType()
-    {
-        return PIM.EVENT_LIST;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELremoveEvent/ELremoveEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELremoveEvent;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.EventList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.removeEvent()
- *
- */
-public class ELremoveEvent
-        extends MIDPTest
-{
-
-    public ELremoveEvent(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // preconditions
-    PIM p = null;
-    String[] eventListNames = null;
-    EventList el = null;
-    int count = 0;
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        // open first Event list
-        try
-        {
-            p = PIM.getInstance();
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            el = (EventList)p.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE, eventListNames[0]);
-
-            count = countItems(el);
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        } // end of try-catch
-
-        log("EventList has "+ count + " items.");
-
-        log("Test that creating new Event item and adding it to the list does increase item count in EventList.");
-
-        Event e = null;
-
-        try
-        {
-            e = el.createEvent();
-            if (el.isSupportedField(Event.SUMMARY))
-            {
-                e.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "testing");
-            }
-            else
-            {
-                failTest("Error while creating Event item!");
-            }
-            e.commit();
-
-            if (countItems(el) != count+1)
-            {
-                failTest("Creating new Event did not increase EventList item count by one!");
-            }
-
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Event item creation: " + t);
-        }
-
-        log("Test that removing Event item decreases EventList item count by one.");
-
-        try
-        {
-            el.removeEvent(e);
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Event item removal: " + t);
-        }
-
-        if (countItems(el) != count)
-        {
-            failTest("Removing Event did not decrease EventList item count by one!");
-        }
-
-        passTest();
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELremoveEventEx/ELremoveEventEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELremoveEventEx;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.EventList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList.removeEvent()
- *
- */
-public class ELremoveEventEx
-        extends MIDPTest
-{
-
-    public ELremoveEventEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // preconditions
-    PIM p = null;
-    EventList el = null;
-    int count = 0;
-
-    public void runTest() throws TestEndThrowable
-    {
-        try
-        {
-            p = PIM.getInstance();
-        }
-        catch (Throwable t)
-        {
-            failTest("preconditions failed: " + t);
-        }
-
-        el = openEventList(PIM.READ_WRITE);
-        count = countItems(el);
-
-        log("EventList has "+ count + " items.");
-
-        log("Test that creating new Event item and adding it to the list does increase item count in EventList.");
-
-        Event e = null;
-
-        try
-        {
-            e = el.createEvent();
-            if (el.isSupportedField(Event.SUMMARY))
-            {
-                e.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "testing");
-            }
-            else
-            {
-                failTest("Error while creating Event item!");
-            }
-            e.commit();
-
-            if (countItems(el) != count+1)
-            {
-                failTest("Creating new Event did not increase EventList item count by one!");
-            }
-
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Event item creation: " + t);
-        }
-
-        log("Test that removing Event item from a read only list causes SecurityException.");
-        try
-        {
-            el.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-        el = openEventList(PIM.READ_ONLY);
-
-        try
-        {
-            e = find(el, e);
-            el.removeEvent(e);
-            failTest("SecurityException was not thrown when removing event from a read only list.");
-        }
-        catch (SecurityException se)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Event from a read only list threw wrong exception: "+ex);
-        }
-
-        if (countItems(el) != count+1)
-        {
-            failTest("Removing Event from a read only list decreased item count by one!");
-        }
-
-        try
-        {
-            el.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-        el = openEventList(PIM.READ_WRITE);
-
-        log("Test that removing null Event item does not change EventList item count.");
-        try
-        {
-            el.removeEvent(null);
-            failTest("Removing null Event did not throw any exception!");
-        }
-        catch (NullPointerException npe)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing null Event threw wrong exception: "+ex);
-        }
-
-        if (countItems(el) != count+1)
-        {
-            failTest("Removing null Event changed EventList item count!");
-        }
-
-        log("Test that removing Event item decreases EventList item count by one.");
-
-        try
-        {
-            e = find(el, e);
-            el.removeEvent(e);
-        }
-        catch (Throwable t)
-        {
-            failTest("Failed to test Event item removal: " + t);
-        }
-
-        if (countItems(el) != count)
-        {
-            failTest("Removing Event did not decrease EventList item count by one!");
-        }
-
-        log("Test that removing Event item not in list does not change EventList item count.");
-
-        try
-        {
-            el.removeEvent(e);
-            failTest("Removing Event not in list did not throw any exception!");
-        }
-        catch (PIMException pime)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Event not in list threw wrong exception: "+ex);
-        }
-
-        if (countItems(el) != count)
-        {
-            failTest("Removing Event not in list changed EventList item count!");
-        }
-
-        log("Test that removing Event from a closed list throws PIMException.");
-        try
-        {
-            el.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-
-        try
-        {
-            el.removeEvent(e);
-            failTest("Removing Event from a closed list did not throw any exception!");
-        }
-        catch (PIMException pime)
-        {
-            // ok.
-        }
-        catch (Exception ex)
-        {
-            failTest("Removing Event from a closed list threw wrong exception: "+ex);
-        }
-        el = openEventList(PIM.READ_WRITE);
-
-        if (countItems(el) != count)
-        {
-            failTest("Removing Event from a closed list changed EventList item count!");
-        }
-        try
-        {
-            el.close();
-        }
-        catch (Exception ex)
-        {
-            failTest("Failed to close list: " + ex);
-        }
-
-        passTest();
-    }
-
-    private Event find(EventList el, Event e) throws TestEndThrowable
-
-    {
-        String id = e.getString(Event.UID, 0);
-        try
-        {
-            Enumeration en = el.items();
-            while (en.hasMoreElements())
-            {
-                Event tmp = (Event)en.nextElement();
-                String tmpid = tmp.getString(Event.UID, 0);
-                if (tmpid.equals(id))
-                {
-                    return tmp;
-                }
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return null;
-        }
-        catch (Exception ex)
-        {
-            failTest("Error while getting items from list!"+ex);
-        }
-        return null;
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-
-    private EventList openEventList(int mode) throws TestEndThrowable
-    {
-        // open first Event list
-        try
-        {
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            el = (EventList)p.openPIMList(PIM.EVENT_LIST, mode, eventListNames[0]);
-            return el;
-        }
-        catch (Throwable e)
-        {
-            failTest("EventList opening failed: " + e);
-        }
-        return null;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELserialFormatTests/ELserialFormatTests.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELserialFormatTests;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class initializes the test data for PIM serialization tests
- * Only Event List specific are tested in this class
- *
- * Tested functions:
- * javax.microedition.pim.PIM.toSerialFormat()
- * javax.microedition.pim.PIM.fromSerialFormat()
- *
- *
- */
-
-public class ELserialFormatTests
-        extends MIDPTest
-{
-
-    public ELserialFormatTests(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List and item */
-    private PIMList iPIMList;
-    private PIMItem iPIMItem;
-
-    /* Test data including fields, attributes and field values */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        int synchronization = 200;
-        // Add test data. The last value is the result of the versit conversion
-        iTestData.addFieldData(Event.SUMMARY,  0, "Summary",       "SUMMARY:Summary");
-        iTestData.addFieldData(Event.NOTE,     0, "Description",   "DESCRIPTION:Description");
-        iTestData.addFieldData(Event.LOCATION, 0, "Location",      "LOCATION:Location");
-        iTestData.addFieldData(Event.CLASS,    0, 200,             "CLASS:CONFIDENTIAL");
-
-        // Start date
-        long currentTime = System.currentTimeMillis();
-        Date date = new Date(currentTime);
-        iTestData.addFieldData(Event.START,
-                               0,
-                               date.getTime(),
-                               "DTSTART:" + creteVersitTimeStringFromDate(date));
-        // End date
-        currentTime = System.currentTimeMillis();
-        date.setTime(currentTime);
-        iTestData.addFieldData(Event.END,
-                               0,
-                               date.getTime(),
-                               "DTEND:" + creteVersitTimeStringFromDate(date));
-        // Revision
-        currentTime = System.currentTimeMillis();
-        date.setTime(currentTime);
-        iTestData.addFieldData(Event.REVISION,
-                               0,
-                               date.getTime(),
-                               "LAST-MODIFIED:" + creteVersitTimeStringFromDate(date));
-
-        // Initialize contact list and contact item
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iPIMList = pim.openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
-            iPIMItem = ((EventList) iPIMList).createEvent();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-        log("Running ELserialFormatTests. Testing vCalendar 1.0");
-        error = PserializationTester.testToSerialFormat(
-                    iPIMList,
-                    iPIMItem,
-                    iTestData,
-                    "UTF-8",
-                    "VCALENDAR/1.0");
-
-        if (error != null)
-        {
-            failTest(error);
-        }
-        passTest();
-        cleanupTest();
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            // NOTE: The test class doesn't commit the item so
-            // we don't have to remove it
-            //( ( EventList ) iPIMList ).removeEvent(
-            //    ( Contact ) iPIMItem );
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    private String creteVersitTimeStringFromDate(Date aDate)
-    {
-        long dateInMillis = aDate.getTime();
-        String timeString = "";
-        Calendar cal = Calendar.getInstance();
-
-        // set time to calendar
-        cal.setTime(aDate);
-
-        // Time must be converted to UTC
-        TimeZone tz = cal.getTimeZone();
-        int hoursInMillis = tz.getRawOffset();
-
-        dateInMillis -= hoursInMillis;
-        // Remove daylight saving. TODO fix. useDaylightTime returns always true if
-        // the zone supports daylight. This is not what we want when winter time is used
-        /**if( tz.useDaylightTime() )
-            {
-            dateInMillis -= 3600000;
-            } */
-        cal.setTime(new Date(dateInMillis));
-
-        timeString += cal.get(Calendar.YEAR) +
-                      // +1 needs to be added because month numbers start from zero
-                      addZeroIfNeeded(cal.get(Calendar.MONTH) + 1) +
-                      addZeroIfNeeded(cal.get(Calendar.DATE)) + "T" +
-                      addZeroIfNeeded(cal.get(Calendar.HOUR_OF_DAY)) +
-                      addZeroIfNeeded(cal.get(Calendar.MINUTE)) +
-                      addZeroIfNeeded(cal.get(Calendar.SECOND)) + "Z";
-
-        return timeString;
-    }
-
-    private String addZeroIfNeeded(int aInt)
-    {
-        if (aInt < 10)
-        {
-            String zero = "0";
-            zero += Integer.toString(aInt);
-            return zero;
-        }
-        return Integer.toString(aInt);
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELstringMaxLen/ELstringMaxLen.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELstringMaxLen;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests maximum lengths of string values and string array elements in
- * EventList.
- *
- * Requirement: a PIMException is thrown when an item with string
- * value or string array element too long to fit in the corresponding
- * native application UI. Maximum editable lengths are specified in
- * Phonebook and Calendar UI specs.
- *
- * The test body is in PLstringMaxLen class.
- */
-public class ELstringMaxLen
-        extends PLstringMaxLen
-{
-
-    public ELstringMaxLen(
-        String sTestName,
-        j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     * Creates test items.
-     */
-    public void initTest() throws TestEndThrowable
-    {
-        //log( "ELstringMaxLen.initTest()" );
-
-        // TEST DATA: Event string field max lengths
-        // LOCATION, NOTE, SUMMARY, UID
-        iStringFieldMaxLengths.put(new Integer(Event.LOCATION), new Integer(160));
-        iStringFieldMaxLengths.put(new Integer(Event.NOTE), new Integer(160));
-        iStringFieldMaxLengths.put(new Integer(Event.SUMMARY), new Integer(160));
-        iStringFieldMaxLengths.put(new Integer(Event.UID), new Integer(IGNORE));            // internal
-
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPimList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE);
-
-            iPimItem = ((EventList) iPimList).createEvent();
-            iPimItem.commit();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        //log( "ELstringMaxLen.cleanupTest()" );
-        try
-        {
-            ((EventList) iPimList).removeEvent((Event) iPimItem);
-            iPimList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of Filé
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELsupportedFields/ELsupportedFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.EventList.ELsupportedFields;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests the event list's supported fields
- * Remember to test all event lists separately
- * (for 3.0 there are Appoinments, Events and Anniversaries)
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update supported and unsupported fields when
- * the PIM API specification is approved
- */
-
-public class ELsupportedFields
-        extends MIDPTest
-{
-
-    public ELsupportedFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM lists */
-    private String[] iListNames;
-    private PIMList iAptList = null;
-    private PIMList iEventList = null;
-    private PIMList iAnvList = null;
-
-    /* Test data including supported field values */
-    private SupportTestData iSupportedAptFields = new SupportTestData();
-    private SupportTestData iSupportedEventFields = new SupportTestData();
-    private SupportTestData iSupportedAnvFields = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize supported fields. Appointments
-        iSupportedAptFields.addSupportedField(Event.SUMMARY);
-        iSupportedAptFields.addSupportedField(Event.NOTE);
-        iSupportedAptFields.addSupportedField(Event.LOCATION);
-        iSupportedAptFields.addSupportedField(Event.START);
-        iSupportedAptFields.addSupportedField(Event.END);
-        iSupportedAptFields.addSupportedField(Event.ALARM);
-        iSupportedAptFields.addSupportedField(Event.UID);
-        iSupportedAptFields.addSupportedField(Event.CLASS);
-        iSupportedAptFields.addSupportedField(Event.REVISION);
-
-        // Memo (Event) event's fields
-        iSupportedEventFields.addSupportedField(Event.SUMMARY);
-        iSupportedEventFields.addSupportedField(Event.NOTE);
-        iSupportedEventFields.addSupportedField(Event.START);
-        iSupportedEventFields.addSupportedField(Event.END);
-        iSupportedEventFields.addSupportedField(Event.ALARM);
-        iSupportedEventFields.addSupportedField(Event.UID);
-        iSupportedEventFields.addSupportedField(Event.CLASS);
-        iSupportedEventFields.addSupportedField(Event.REVISION);
-        // Unsupported fields
-        iSupportedEventFields.addUnsupportedField(Event.LOCATION);
-        // Anniversary event's fields
-        iSupportedAnvFields.addSupportedField(Event.SUMMARY);
-        iSupportedAnvFields.addSupportedField(Event.NOTE);
-        iSupportedAnvFields.addSupportedField(Event.START);
-        iSupportedAnvFields.addSupportedField(Event.ALARM);
-        iSupportedAnvFields.addSupportedField(Event.UID);
-        iSupportedAnvFields.addSupportedField(Event.CLASS);
-        iSupportedAnvFields.addSupportedField(Event.REVISION);
-        // Unsupported fields
-        iSupportedAnvFields.addUnsupportedField(Event.LOCATION);
-        iSupportedAnvFields.addUnsupportedField(Event.END);
-
-        // Initialize event lists
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iListNames = pim.listPIMLists(PIM.EVENT_LIST);
-            // Open appointments lists
-            iAptList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 0 ]);
-            // Open events list
-            iEventList = pim.openPIMList(
-                             PIM.EVENT_LIST,
-                             PIM.READ_WRITE,
-                             iListNames[ 1 ]);
-            // Open anniversaries list
-            iAnvList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 2 ]);
-
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String err = null;
-        log("Running test.");
-
-        // Test anniversary's fields
-        log("Testing " + iListNames[ 2 ] + " list ");
-        err = PLsupportTester.testSupportedFields(
-                  iAnvList,
-                  iSupportedAnvFields);
-        CheckError(err);
-        log(iListNames[ 2 ] + " list tested ");
-
-        // Test appointment's fields
-        log("Testing " + iListNames[ 0 ] + " list ");
-        err = PLsupportTester.testSupportedFields(
-                  iAptList,
-                  iSupportedAptFields);
-        CheckError(err);
-        log(iListNames[ 0 ] + " list tested ");
-
-        // Test event's fields
-        log("Testing " + iListNames[ 1 ] + " list ");
-        err = PLsupportTester.testSupportedFields(
-                  iEventList,
-                  iSupportedEventFields);
-        CheckError(err);
-        log(iListNames[ 1 ] + " list tested ");
-
-        log("Test has been run");
-        passTest();
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iAnvList.close();
-            iAptList.close();
-            iEventList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-    private void CheckError(String aError)
-    throws TestEndThrowable
-    {
-        // Fail if error string was returned
-        if (aError != null)
-        {
-            failTest(aError);
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/EventList/ELsupportedRRFields2/ELsupportedRRFields2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-
-package com.nokia.mj.test.pim.automatic.EventList.ELsupportedRRFields2;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests the event list's supported repeat rule fields
- * for all three event lists
- *
- * Reference for supported field values in this point was
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update supported and unsupported fields when
- * the PIM API specification is approved
- *
- */
-
-public class ELsupportedRRFields2
-        extends MIDPTest
-{
-
-    public ELsupportedRRFields2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM lists */
-    private String[] iListNames;
-    private PIMList iAptList = null;
-    private PIMList iEventList = null;
-    private PIMList iAnvList = null;
-
-    /* Test dataincluding supported repeat rule field values */
-    private SupportTestData iAptTestData = new SupportTestData();
-    private SupportTestData iAnvTestData = new SupportTestData();
-    private SupportTestData iEventTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // NOTE: We can use supported attribute functions, thus they provide the same
-        // data structure that repeat rule fields
-        iAptTestData.addSupportedAttributes(RepeatRule.DAILY  , RepeatRule.FREQUENCY);
-        iAptTestData.addSupportedAttributes(RepeatRule.MONTHLY, RepeatRule.FREQUENCY);
-        iAptTestData.addSupportedAttributes(RepeatRule.YEARLY , RepeatRule.FREQUENCY);
-        iAptTestData.addSupportedAttributes(RepeatRule.WEEKLY , RepeatRule.FREQUENCY |
-                                            RepeatRule.INTERVAL);
-        // -1 means no repeat rules
-        iEventTestData.addSupportedAttributes(RepeatRule.DAILY  , -1);
-        iEventTestData.addSupportedAttributes(RepeatRule.MONTHLY, -1);
-        iEventTestData.addSupportedAttributes(RepeatRule.YEARLY , -1);
-        iEventTestData.addSupportedAttributes(RepeatRule.WEEKLY , -1);
-
-        iAnvTestData.addSupportedAttributes(RepeatRule.DAILY  , -1);
-        iAnvTestData.addSupportedAttributes(RepeatRule.MONTHLY, -1);
-        iAnvTestData.addSupportedAttributes(RepeatRule.YEARLY , RepeatRule.FREQUENCY);
-        iAnvTestData.addSupportedAttributes(RepeatRule.WEEKLY , -1);
-
-        // Initialize Event list
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iListNames = pim.listPIMLists(PIM.EVENT_LIST);
-            // Open appointments lists
-            iAptList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 0 ]);
-            // Open events list
-            iEventList = pim.openPIMList(
-                             PIM.EVENT_LIST,
-                             PIM.READ_WRITE,
-                             iListNames[ 1 ]);
-            // Open anniversaries list
-            iAnvList = pim.openPIMList(
-                           PIM.EVENT_LIST,
-                           PIM.READ_WRITE,
-                           iListNames[ 2 ]);
-
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-        log("Running test.");
-
-        // Test appointment's fields
-        log("Testing " + iListNames[ 0 ] + " list ");
-        error = PLsupportTester.testSupportedRRFields(
-                    iAptList,
-                    iAptTestData);
-        CheckError(error);
-        log(iListNames[ 0 ] + " list tested ");
-
-        // Test event's fields
-        log("Testing " + iListNames[ 1 ] + " list ");
-        error = PLsupportTester.testSupportedRRFields(
-                    iEventList,
-                    iEventTestData);
-        CheckError(error);
-        log(iListNames[ 1 ] + " list tested ");
-
-        // Test anniversary's fields
-        log("Testing " + iListNames[ 2 ] + " list ");
-        error = PLsupportTester.testSupportedRRFields(
-                    iAnvList,
-                    iAnvTestData);
-        CheckError(error);
-        log(iListNames[ 2 ] + " list tested ");
-
-        log("Test finished.");
-        passTest();
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iAnvList.close();
-            iAptList.close();
-            iEventList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     *  Assistance method
-     */
-    private void CheckError(String aError)
-    throws TestEndThrowable
-    {
-        // Fail if error string was returned
-        if (aError != null)
-        {
-            failTest(aError);
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/FieldEmptyException/FEEgetField/FEEgetField.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.FieldEmptyException.FEEgetField;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.FieldEmptyException.getField().
- */
-public class FEEgetField extends MIDPTest
-{
-
-    public FEEgetField(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        FieldEmptyException fee1 = new FieldEmptyException();
-        if (fee1.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        FieldEmptyException fee2 = new FieldEmptyException("test");
-        if (!(fee2.getMessage().equals("test")))
-        {
-            failTest("Field given in constructor parameter was not returned by getField()!");
-        }
-        if (fee2.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        for (int i=0; i < 10; i++)
-        {
-            FieldEmptyException fee = new FieldEmptyException("Testing Field:" + i, i);
-
-            if (fee.getField() != i)
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-            if (!(fee.getMessage()).equals("Testing Field:" + i))
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/FieldFullException/FFEgetField/FFEgetField.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.FieldFullException.FFEgetField;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.FieldFullException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.FieldFullException.getField().
- */
-public class FFEgetField extends MIDPTest
-{
-
-    public FFEgetField(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        FieldFullException ffe1 = new FieldFullException();
-        if (ffe1.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        FieldFullException ffe2 = new FieldFullException("test");
-        if (!(ffe2.getMessage().equals("test")))
-        {
-            failTest("Field given in constructor parameter was not returned by getField()!");
-        }
-        if (ffe2.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        for (int i=0; i < 10; i++)
-        {
-            FieldFullException ffe = new FieldFullException("Testing Field:" + i, i);
-
-            if (ffe.getField() != i)
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-            if (!(ffe.getMessage()).equals("Testing Field:" + i))
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/OpenMultipleLists.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic;
-//IMPORTS
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ContactList.createContact()
- */
-public abstract class OpenMultipleLists
-        extends MIDPTest
-{
-    /** Test-wide PIM instance. */
-    private PIM iPim;
-
-    /** Test-wide list type from derived class. */
-    private int iListType;
-
-    public OpenMultipleLists(String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-        iPim = PIM.getInstance();
-        iListType = listType();
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        log("+runTest()");
-        runTestByMode(PIM.READ_WRITE);
-        runTestByMode(PIM.READ_ONLY);
-        runTestByMode(PIM.WRITE_ONLY);
-
-        log("-runTest()");
-        passTest();
-    }
-
-
-    /**
-     * TEMPLATE METHOD: Determines the list type.
-     *
-     * Filled in derived classes.
-     */
-    abstract protected int listType();
-
-
-    /**
-     * Runs the test in given list access mode.
-     */
-    private void runTestByMode(
-        int aMode)
-    throws TestEndThrowable
-    {
-        log("+runTestByMode()");
-        log("List type: " + iListType);
-        log("List mode: " + aMode);
-        try
-        {
-            String[] listNames = iPim.listPIMLists(iListType);
-
-            log("Iterating through " + listNames.length + " different lists.");
-            for (int i = 0; i < listNames.length; i++)
-            {
-                String listName = listNames[ i ];
-                int numListInstances = 3;
-
-                log("Part 1: open several instances & close them at the end.");
-
-                log("Opening " + numListInstances
-                    + " list instances of " + listName);
-
-                PIMList[] listInstances = openMultipleListInstances(
-                                              iListType,
-                                              listName,
-                                              aMode,
-                                              numListInstances);
-
-                closeMultipleListInstances(listInstances);
-
-                log("Part 2: open and close several instances right away.");
-
-                iterateOpenAndCloseList(
-                    iListType,
-                    listName,
-                    aMode,
-                    numListInstances);
-            }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            failTest("Unexpected exception: " + e);
-        }
-
-        log("-runTestByMode()");
-    }
-
-    /**
-     * Opens given number of instances of given list at the same time
-     * and closes all the instances at the end.
-     */
-    private PIMList[] openMultipleListInstances(
-        int aListType,
-        String aListName,
-        int aMode,
-        int aNumListInstances)
-    throws PIMException
-    {
-        log("+openMultipleListInstances()");
-
-        PIMList[] listInstances = new PIMList[ aNumListInstances ];
-        for (int i = 0; i < aNumListInstances; i++)
-        {
-            listInstances[ i ] = iPim.openPIMList(
-                                     aListType,
-                                     aMode,
-                                     aListName);
-        }
-
-        log("-openMultipleListInstances()");
-        return listInstances;
-    }
-
-
-    /**
-     * Closes given lists.
-     */
-    private void closeMultipleListInstances(
-        PIMList[] aListInstances)
-    throws PIMException
-    {
-        log("+closeMultipleListInstances()");
-        for (int i = 0; i < aListInstances.length; i++)
-        {
-            aListInstances[ i ].close();
-        }
-        log("-closeMultipleListInstances()");
-    }
-
-
-    /**
-     * Opens and closes given list given times. The list is closed
-     * before a new instance is opened.
-     */
-    private void iterateOpenAndCloseList(
-        int aListType,
-        String aListName,
-        int aMode,
-        int aNumIterations)
-    throws PIMException
-    {
-        log("+iterateOpenAndCloseList()");
-
-        for (int i = 0; i < aNumIterations; i++)
-        {
-            log("Opening list " + aListName + ", iteration "
-                + i + "/" + aNumIterations + "...");
-
-            PIMList list = iPim.openPIMList(aListType, aMode, aListName);
-            list.close();
-        }
-
-        log("-iterateOpenAndCloseList()");
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PConstants/PConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that PIM class constants equal specification.
- *
- */
-public class PConstants
-        extends MIDPTest
-{
-
-    public PConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        if (PIM.CONTACT_LIST != 1)
-        {
-            failTest("PIM.CONTACT_LIST != 1");
-        } // end of if (PIM.CONTACT_LIST != 1)
-        if (PIM.EVENT_LIST != 2)
-        {
-            failTest("PIM.EVENT_LIST != 2");
-        }
-        if (PIM.READ_ONLY != 1)
-        {
-            failTest("PIM.READ_ONLY != 1");
-        } // end of if (PIM.READ_ONLY != 1)
-        if (PIM.READ_WRITE != 3)
-        {
-            failTest("PIM.READ_WRITE != 3");
-        }
-        if (PIM.TODO_LIST != 3)
-        {
-            failTest("PIM.TODO_LIST != 3");
-        } // end of if (PIM.TODO_LIST != 3)
-        if (PIM.WRITE_ONLY != 2)
-        {
-            failTest("PIM.WRITE_ONLY != 2");
-        } // end of if (PIM.WRITE_ONLY != 2)
-
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSFormatInvalid/PfromSerialFormatInvalid.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSFormatInvalid;
-//IMPORTS
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.fromSerialFormat()
- */
-public class PfromSerialFormatInvalid extends PfromSerialFormat
-{
-
-    public PfromSerialFormatInvalid(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = null;
-        InputStream isArray[] = null;
-
-        try
-        {
-            p = PIM.getInstance();
-
-            int maxValue = 6;
-            isArray = new InputStream[ maxValue ];
-            for (int i = 0; i < maxValue; i++)
-            {
-                int value = i + 1;
-                isArray[ i ] =
-                    getClass().getResourceAsStream("/res/invalid" + value + ".vcf");
-            } // end of for (int i = 0; i < maxValue; i++)
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-
-        for (int i = 0; i < isArray.length; i++)
-        {
-            // Apparently the objects
-            // invalid3.vcf, invalid4.vcf and invalid5.vcf
-            // are not that invalid; we don't expect an exception
-            // for them.
-            if (i == 2 || i == 3 || i == 4)
-            {
-                log("skipping item " + i);
-            }
-            else
-            {
-                log("testing invalid item " + i);
-                testPIME2(p, isArray[ i ]);
-            }
-        } // end of for (int i = 0; i < isArray.length; i++)
-
-        passTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSerialFormat/PfromSerialFormatTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSerialFormat;
-//IMPORTS
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.fromSerialFormat()
- */
-public class PfromSerialFormatTest extends PfromSerialFormat
-{
-
-    public PfromSerialFormatTest(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = null;
-        InputStream ise = null;
-        InputStream isc = null;
-        InputStream ist = null;
-        debug("pfrmserialformat");
-
-        try
-        {
-            p = PIM.getInstance();
-            ise = getClass().getResourceAsStream("/res/timed-appointment.vcs");
-            isc = getClass().getResourceAsStream("/res/3.vcf");
-            ist = getClass().getResourceAsStream("/res/todoPriority2.vcs");
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-
-        // s1 and s2
-        testEvent(p, ise);
-
-        // s3 and s4
-        testContact(p, isc);
-
-        // s5 and s6
-        testToDo(p, ist);
-
-        passTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PfromSerialFormat/PfromSerialFormatEx/PfromSerialFormatExTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PfromSerialFormat.PfromSerialFormatEx;
-//IMPORTS
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.fromSerialFormat()
- */
-public class PfromSerialFormatExTest extends PfromSerialFormat
-{
-
-    public PfromSerialFormatExTest(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = null;
-        InputStream is = null; // valid
-        InputStream is1 = null; // these are invalid
-        InputStream is2 = null;
-        InputStream is3 = null;
-
-        try
-        {
-            p = PIM.getInstance();
-            is = getClass().getResourceAsStream("/res/3.vcf");
-            // 1.vcf is separated by CRCRLF instead of CRLF
-            is1 = getClass().getResourceAsStream("/res/1.vcf");
-            // 6.vcf is VCARD 3.0
-            is2 = getClass().getResourceAsStream("/res/6.vcf");
-            // broken.cvf is not a vcard at all
-            is3 = getClass().getResourceAsStream("/res/broken.vcf");
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-
-        testNullPointer(p);
-        testUEE(p, is, "bug");
-        testPIME1(p, is1, "vCard with CRCRLF");
-        testPIME1(p, is2, "vCard 3.0");
-        testPIME2(p, is3);
-
-        passTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PlistPIMlists/PlistPIMlists.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PlistPIMlists;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.listPIMlists()
- *
-
- */
-public class PlistPIMlists
-        extends MIDPTest
-{
-
-    public PlistPIMlists(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        PIM p = PIM.getInstance();
-
-        TestAndLog(p, PIM.CONTACT_LIST);
-        TestAndLog(p, PIM.EVENT_LIST);
-        TestAndLog(p, PIM.TODO_LIST);
-
-        TestException(p, -1);
-        TestException(p, 0);
-        TestException(p, 4);
-
-        passTest();
-    }
-
-    private void TestAndLog(PIM aP, int aListType)
-    throws TestEndThrowable
-    {
-        String[] listNames = null;
-        try
-        {
-            listNames = aP.listPIMLists(aListType);
-        }
-        catch (SecurityException e)
-        {
-            log("SecurityException:" + e.getMessage());
-        } // end of try-catch
-
-        if (listNames == null)
-        {
-            failTest("listNames == null");
-        } // end of if (listNames == null)
-
-        log("list names:");
-        for (int i = 0; i < listNames.length; i++)
-        {
-            log(listNames[ i ]);
-        } // end of for (int i = 0; i < listNames.length; i++)
-    }
-
-    private void TestException(PIM aP, int aListType)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.listPIMLists(aListType);
-        }
-        catch (IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown( listtype -1 )");
-        } // end of if (!exceptionThrown)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PopenPIMlist/PopenPIMlist.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PopenPIMlist;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.EventList;
-import javax.microedition.pim.ToDoList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.openPIMlist(int, int)
- */
-public class PopenPIMlist
-        extends MIDPTest
-{
-
-    public PopenPIMlist(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        PIM p = PIM.getInstance();
-
-        PIMList readContactList =
-            openAndCheck(p, PIM.CONTACT_LIST, PIM.READ_ONLY);
-        PIMList writeContactList =
-            openAndCheck(p, PIM.CONTACT_LIST, PIM.WRITE_ONLY);
-        PIMList readWriteContactList =
-            openAndCheck(p, PIM.CONTACT_LIST, PIM.READ_WRITE);
-
-        testRead(writeContactList);
-        boolean exceptionthrown = false;
-        try
-        {
-            ContactList cList = (ContactList)readContactList;
-            Contact contact = cList.createContact();
-            contact.commit();
-        }
-        catch (SecurityException e)
-        {
-            exceptionthrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-
-        if (!exceptionthrown)
-        {
-            failTest("Write to READ_ONLY Contact List succeeded");
-        } // end of if (!exceptionthrown)
-
-
-
-        PIMList readEventList =
-            openAndCheck(p, PIM.EVENT_LIST, PIM.READ_ONLY);
-        PIMList writeEventList =
-            openAndCheck(p, PIM.EVENT_LIST, PIM.WRITE_ONLY);
-        PIMList readWriteEventList =
-            openAndCheck(p, PIM.EVENT_LIST, PIM.READ_WRITE);
-
-        testRead(writeEventList);
-        testRead(writeContactList);
-        exceptionthrown = false;
-        try
-        {
-            EventList cList = (EventList)readEventList;
-            Event event = cList.createEvent();
-            event.commit();
-        }
-        catch (SecurityException e)
-        {
-            exceptionthrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-        if (!exceptionthrown)
-        {
-            failTest("Write to READ_ONLY Event List succeeded");
-        } // end of if (!exceptionthrown)
-
-        PIMList readToDoList =
-            openAndCheck(p, PIM.TODO_LIST, PIM.READ_ONLY);
-        PIMList writeToDoList =
-            openAndCheck(p, PIM.TODO_LIST, PIM.WRITE_ONLY);
-        PIMList readWriteToDoList =
-            openAndCheck(p, PIM.TODO_LIST, PIM.READ_WRITE);
-
-        testRead(writeToDoList);
-        exceptionthrown = false;
-        try
-        {
-            ToDoList cList = (ToDoList)readToDoList;
-            ToDo todo = cList.createToDo();
-            todo.commit();
-        }
-        catch (SecurityException e)
-        {
-            exceptionthrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-        if (!exceptionthrown)
-        {
-            failTest("Write to READ_ONLY ToDo List succeeded");
-        } // end of if (!exceptionthrown)
-
-        TestException(p, -1, PIM.READ_ONLY);
-        TestException(p, 0 , PIM.READ_ONLY);
-        TestException(p, 4 , PIM.READ_ONLY);
-        TestException(p, PIM.CONTACT_LIST, -1);
-        TestException(p, PIM.CONTACT_LIST, 0);
-        TestException(p, PIM.CONTACT_LIST, 4);
-
-        passTest();
-    }
-
-    private void testRead(PIMList aList) throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.items();
-        }
-        catch (SecurityException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("Reading from WRITE_ONLY list succeeded");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList openAndCheck(PIM aP, int aListType, int aMode)
-    throws TestEndThrowable
-    {
-        PIMList list = null;
-        try
-        {
-            list = aP.openPIMList(aListType, aMode);
-        }
-        catch (SecurityException e)
-        {
-            failTest("SecurityException: " + e.getMessage());
-        }
-        catch (Throwable e)
-        {
-            failTest("Throwable:" + e.toString());
-        } // end of catch
-
-        switch (aListType)
-        {
-        case PIM.CONTACT_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.ContactList))
-            {
-                failTest("Not a contact list.");
-            }
-            break;
-        }
-        case PIM.EVENT_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.EventList))
-            {
-                failTest("Not an event list.");
-            }
-            break;
-        }
-        case PIM.TODO_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.ToDoList))
-            {
-                failTest("Not a todo list.");
-            }
-            break;
-        }
-        default:
-        {
-            failTest("Test internal error");
-            break;
-        }
-        } // end of switch (aListType)
-        return list;
-    }
-
-
-    private void TestException(PIM aP, int aListType, int aMode)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.openPIMList(aListType, aMode);
-        }
-        catch (IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("Not IAE: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown( listtype -1 )");
-        } // end of if (!exceptionThrown)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PopenPIMlist2/PopenPIMlist2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,335 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PopenPIMlist2;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.EventList;
-import javax.microedition.pim.ToDoList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.PIMException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.openPIMlist(int, int, String)
- */
-public class PopenPIMlist2
-        extends MIDPTest
-{
-
-    public PopenPIMlist2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = PIM.getInstance();
-
-        String[] contactLists = p.listPIMLists(PIM.CONTACT_LIST);
-        String[] eventLists = p.listPIMLists(PIM.EVENT_LIST);
-        String[] todoLists = p.listPIMLists(PIM.TODO_LIST);
-
-        // Test steps
-        PIMList[] readContactLists =
-            openAndCheckAllNames(p, PIM.CONTACT_LIST, PIM.READ_ONLY,
-                                 contactLists);
-        PIMList[] writeContactLists =
-            openAndCheckAllNames(p, PIM.CONTACT_LIST, PIM.WRITE_ONLY,
-                                 contactLists);
-        PIMList[] readWriteContactLists =
-            openAndCheckAllNames(p, PIM.CONTACT_LIST, PIM.READ_WRITE,
-                                 contactLists);
-
-        testRead(writeContactLists);
-        testWrite(readContactLists);
-
-        PIMList[] readEventLists =
-            openAndCheckAllNames(p, PIM.EVENT_LIST, PIM.READ_ONLY,
-                                 eventLists);
-        PIMList[] writeEventLists =
-            openAndCheckAllNames(p, PIM.EVENT_LIST, PIM.WRITE_ONLY,
-                                 eventLists);
-        PIMList[] readWriteEventLists =
-            openAndCheckAllNames(p, PIM.EVENT_LIST, PIM.READ_WRITE,
-                                 eventLists);
-
-        testRead(writeEventLists);
-        testWrite(readEventLists);
-
-        PIMList[] readToDoLists =
-            openAndCheckAllNames(p, PIM.TODO_LIST, PIM.READ_ONLY,
-                                 todoLists);
-        PIMList[] writeToDoLists =
-            openAndCheckAllNames(p, PIM.TODO_LIST, PIM.WRITE_ONLY,
-                                 todoLists);
-        PIMList[] readWriteToDoLists =
-            openAndCheckAllNames(p, PIM.TODO_LIST, PIM.READ_WRITE,
-                                 todoLists);
-
-        testRead(writeToDoLists);
-        testWrite(readToDoLists);
-
-        TestIAException(p, -1, PIM.READ_ONLY, contactLists[ 0 ]);
-        TestIAException(p, 0 , PIM.READ_ONLY, contactLists[ 0 ]);
-        TestIAException(p, 4 , PIM.READ_ONLY, contactLists[ 0 ]);
-        TestIAException(p, PIM.CONTACT_LIST, -1, contactLists[ 0 ]);
-        TestIAException(p, PIM.CONTACT_LIST, 0, contactLists[ 0 ]);
-        TestIAException(p, PIM.CONTACT_LIST, 4, contactLists[ 0 ]);
-
-        TestPIMException(p, PIM.CONTACT_LIST, PIM.READ_ONLY, "notalistname");
-        TestPIMException(p, PIM.EVENT_LIST, PIM.READ_ONLY,
-                         contactLists[ 0 ]);
-
-        TestNPException(p, PIM.CONTACT_LIST, PIM.READ_ONLY, null);
-
-        passTest();
-    }
-
-    private void testRead(PIMList[] aLists) throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testSingleRead(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testSingleRead(PIMList aList) throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.items();
-        }
-        catch (SecurityException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("Reading from WRITE_ONLY list succeeded");
-        } // end of if (!exceptionThrown)
-    }
-
-    private void testWrite(PIMList[] aLists) throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testSingleWrite(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testSingleWrite(PIMList aList) throws TestEndThrowable
-    {
-        boolean exceptionthrown = false;
-
-        try
-        {
-            if (aList instanceof ContactList)
-            {
-                ContactList cList = (ContactList)aList;
-                Contact contact = cList.createContact();
-                contact.commit();
-            } // end of if (aList instanceof ContactList)
-            if (aList instanceof EventList)
-            {
-                EventList eList = (EventList)aList;
-                Event event = eList.createEvent();
-                event.commit();
-            } // end of if (aList instanceof EventList)
-            if (aList instanceof ToDoList)
-            {
-                ToDoList tList = (ToDoList)aList;
-                ToDo todo = tList.createToDo();
-                todo.commit();
-            } // end of if (aList instanceof ToDoList)
-        }
-        catch (SecurityException e)
-        {
-            exceptionthrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not SE: " + e.toString());
-        } // end of catch
-
-        if (!exceptionthrown)
-        {
-            failTest("Write to READ_ONLY Contact List succeeded");
-        } // end of if (!exceptionthrown)
-    }
-
-    private PIMList[] openAndCheckAllNames(PIM aP, int aListType, int aMode,
-                                           String[] aNames)
-    throws TestEndThrowable
-    {
-        int listCount = aNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = openAndCheck(aP, aListType, aMode, aNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private PIMList openAndCheck(PIM aP, int aListType, int aMode,
-                                 String aName)
-    throws TestEndThrowable
-    {
-        PIMList list = null;
-        try
-        {
-            list = aP.openPIMList(aListType, aMode, aName);
-        }
-        catch (SecurityException e)
-        {
-            failTest("SecurityException: " + e.getMessage());
-        }
-        catch (Throwable e)
-        {
-            failTest("Throwable:" + e.toString());
-        } // end of catch
-
-        switch (aListType)
-        {
-        case PIM.CONTACT_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.ContactList))
-            {
-                failTest("Not a contact list.");
-            }
-            break;
-        }
-        case PIM.EVENT_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.EventList))
-            {
-                failTest("Not an event list.");
-            }
-            break;
-        }
-        case PIM.TODO_LIST:
-        {
-            if (!(list instanceof javax.microedition.pim.ToDoList))
-            {
-                failTest("Not a todo list.");
-            }
-            break;
-        }
-        default:
-        {
-            failTest("Test internal error");
-            break;
-        }
-        } // end of switch (aListType)
-        return list;
-    }
-
-
-    private void TestIAException(PIM aP, int aListType, int aMode,
-                                 String aName)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.openPIMList(aListType, aMode, aName);
-        }
-        catch (IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("Not IAE: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    private void TestPIMException(PIM aP, int aListType, int aMode,
-                                  String aName)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.openPIMList(aListType, aMode, aName);
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("Not PIMException: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    private void TestNPException(PIM aP, int aListType, int aMode,
-                                 String aName)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.openPIMList(aListType, aMode, aName);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("Not NPException: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/Pserialization/Pserialization.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.Pserialization;
-//IMPORTS
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.fromSerialFormat() and
- * javax.microedition.PIM.toSerialFormat().
- *
- * The test involves creation of items, converting them to
- * serialized format and back and checking whether the original
- * and resulting items are equal.
- */
-public class Pserialization extends MIDPTest
-{
-
-    public Pserialization(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // PIM manager
-    PIM iPim = null;
-
-    // Lists with which the original test items are associated
-    ContactList[] iContactLists;
-    EventList[] iEventLists;
-    ToDoList[] iToDoLists;
-
-    // Original test items, one per list.
-    // The indexes correspond with the list indexes in the iXyzLists.
-    Contact[] iOriginalContacts;
-    Event[] iOriginalEvents;
-    ToDo[] iOriginalToDos;
-
-    public void initTest() throws TestEndThrowable
-    {
-        try
-        {
-            // Get PIM instance
-            iPim = PIM.getInstance();
-
-            // Get list names per type
-            String[] contactListNames = iPim.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = iPim.listPIMLists(PIM.EVENT_LIST);
-            String[] toDoListNames = iPim.listPIMLists(PIM.TODO_LIST);
-
-            // Create list arrays as we now know their amount
-            iContactLists = new ContactList[ contactListNames.length ];
-            iEventLists = new EventList[ eventListNames.length ];
-            iToDoLists = new ToDoList[ toDoListNames.length ];
-
-            // Create original test item arraya as we now know their amount
-            iOriginalContacts = new Contact[ contactListNames.length ];
-            iOriginalEvents = new Event[ eventListNames.length ];
-            iOriginalToDos = new ToDo[ toDoListNames.length ];
-
-            // Open lists and create original test items
-
-            // Contact
-            for (int i = 0; i < contactListNames.length; i++)
-            {
-                iContactLists[ i ] = (ContactList) iPim.openPIMList(
-                                         PIM.CONTACT_LIST,
-                                         PIM.READ_WRITE,
-                                         contactListNames[ i ]);
-
-                iOriginalContacts[ i ] = iContactLists[ i ].createContact();
-                ItemTool.fillItem(iOriginalContacts[ i ], iContactLists[ i ]);
-            }
-
-            // Event
-            for (int i = 0; i < eventListNames.length; i++)
-            {
-                iEventLists[ i ] = (EventList) iPim.openPIMList(
-                                       PIM.EVENT_LIST,
-                                       PIM.READ_WRITE,
-                                       eventListNames[ i ]);
-
-                iOriginalEvents[ i ] = iEventLists[ i ].createEvent();
-                ItemTool.fillItem(iOriginalEvents[ i ], iEventLists[ i ]);
-            }
-
-            // ToDo
-            for (int i = 0; i < toDoListNames.length; i++)
-            {
-                iToDoLists[ i ] = (ToDoList) iPim.openPIMList(
-                                      PIM.TODO_LIST,
-                                      PIM.READ_WRITE,
-                                      toDoListNames[ i ]);
-
-                iOriginalToDos[ i ] = iToDoLists[ i ].createToDo();
-                ItemTool.fillItem(iOriginalToDos[ i ], iToDoLists[ i ]);
-            }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            failTest("Test initialization failed: " + e);
-        }
-
-        // OK, what we now got is:
-        // - full arrays of ContactLists, EventLists and ToDoLists
-        // - full arrays of original test Contacts, Events and ToDos,
-        //   one per each list, all exportable fields filled
-        log("initTest() finished.");
-    }
-
-
-    public void cleanupTest()
-    {
-        // Nothing necessary
-    }
-
-
-    public String toSerialFormat(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        String format = (aItem instanceof Contact) ?
-                        "VCARD/2.1" : "VCALENDAR/1.0";
-
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        try
-        {
-            iPim.toSerialFormat(aItem,
-                                bos,
-                                null,  // default encoding used
-                                format);
-        }
-        catch (Exception e)
-        {
-            failTest("Unexpected exception: " + e);
-            e.printStackTrace();
-        }
-
-        return bos.toString();
-    }
-
-    /**
-     * Single-entry versit objects assumed.
-     */
-    public PIMItem fromSerialFormat(String aVersitObject)
-    throws TestEndThrowable
-    {
-        PIMItem[] resultingItems = null;
-        ByteArrayInputStream bis = new ByteArrayInputStream(
-            aVersitObject.getBytes());
-        try
-        {
-            resultingItems = iPim.fromSerialFormat(
-                                 bis,
-                                 null);  // default encoding used
-        }
-        catch (Exception e)
-        {
-            failTest("Unexpected exception: " + e);
-            e.printStackTrace();
-        }
-
-        return resultingItems[ 0 ]; // return first (and only) item
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        StringBuffer log = new StringBuffer();
-
-        for (int i = 0; i < iOriginalContacts.length; i++)
-        {
-            String versitString = toSerialFormat(
-                                      iOriginalContacts[ i ]);
-
-            Contact resultingContact = (Contact)fromSerialFormat(
-                                           versitString);
-
-            boolean isEqual = ItemTool.isEqualItems(
-                                  iOriginalContacts[ i ],
-                                  resultingContact,
-                                  log,
-                                  iContactLists[ i ],
-                                  ItemTool.LOG_DIFF);
-
-            if (!isEqual)
-            {
-// versit string probably has something that chokes xml-parser/encoder
-//              log( "Resulting versit string:" );
-//              log( versitString + '\n' );
-//              log( log.toString() );
-
-                log("Not all data is preserved during conversion.");
-                // failTest( "Serialization corrupts the item." );
-            }
-        }
-        passTest();
-        cleanupTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PsupportedSerialFormats/PsupportedSerialFormats.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PsupportedSerialFormats;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.supportedSerialFormats()
- */
-public class PsupportedSerialFormats
-        extends MIDPTest
-{
-
-    public PsupportedSerialFormats(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        PIM p = PIM.getInstance();
-
-        TestSupportedFormats(p, PIM.CONTACT_LIST, "VCARD/2.1");
-        TestSupportedFormats(p, PIM.EVENT_LIST, "VCALENDAR/1.0");
-        TestSupportedFormats(p, PIM.TODO_LIST, "VCALENDAR/1.0");
-
-        TestException(p, -1);
-        TestException(p, 0);
-        TestException(p, 4);
-
-        passTest();
-    }
-
-    private void TestSupportedFormats(PIM aP, int aListType, String aFormat)
-    throws TestEndThrowable
-    {
-        String[] supportedFormats = aP.supportedSerialFormats(aListType);
-        if (supportedFormats == null)
-        {
-            failTest("supportedFormats == null");
-        }
-        boolean found = false;
-        for (int i = 0; i < supportedFormats.length; i++)
-        {
-            if (supportedFormats[ i ].compareTo(aFormat) == 0)
-            {
-                found = true;
-            }
-        }
-        if (!found)
-        {
-            failTest(aFormat + " not found");
-        }
-    }
-
-    private void TestException(PIM aP, int aListType)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.supportedSerialFormats(aListType);
-        }
-        catch (IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("exception not thrown( listtype -1 )");
-        } // end of if (!exceptionThrown)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PtoSerialFormat/PtoSerialFormat/PtoSerialFormatTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PtoSerialFormat.PtoSerialFormat;
-//IMPORTS
-import java.io.*;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.toSerialFormat()
- */
-public class PtoSerialFormatTest extends PtoSerialFormat
-{
-
-    public PtoSerialFormatTest(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = null;
-        Contact c1 = null;
-        Event e1 = null;
-        ToDo t1 = null;
-        String[] cFormats = null;
-        String[] eFormats = null;
-        String[] tFormats = null;
-
-        try
-        {
-            p = PIM.getInstance();
-            c1 = createContact(p);
-            e1 = createEvent(p);
-            t1 = createToDo(p);
-            cFormats = p.supportedSerialFormats(PIM.CONTACT_LIST);
-            eFormats = p.supportedSerialFormats(PIM.EVENT_LIST);
-            tFormats = p.supportedSerialFormats(PIM.TODO_LIST);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-        // Test steps
-
-        // s1 and s2
-        testSerialFormats(p, e1, eFormats);
-        // s3 and s4
-
-        testSerialFormats(p, c1, cFormats);
-        // s5 and s6
-        testSerialFormats(p, t1, tFormats);
-
-        passTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIM/PtoSerialFormat/PtoSerialFormatEx/PtoSerialFormatEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIM.PtoSerialFormat.PtoSerialFormatEx;
-//IMPORTS
-import java.io.*;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.automatic.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.toSerialFormat()
- */
-public class PtoSerialFormatEx extends PtoSerialFormat
-{
-
-    public PtoSerialFormatEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Preconditions
-        PIM p = null;
-        Contact c1 = null;
-        Event e1 = null;
-        ToDo t1 = null;
-        String[] cFormats = null;
-        String[] eFormats = null;
-        String[] tFormats = null;
-        OutputStream os = null;
-
-        try
-        {
-            p = PIM.getInstance();
-            c1 = createContact(p);
-            e1 = createEvent(p);
-            t1 = createToDo(p);
-            cFormats = p.supportedSerialFormats(PIM.CONTACT_LIST);
-            eFormats = p.supportedSerialFormats(PIM.EVENT_LIST);
-            tFormats = p.supportedSerialFormats(PIM.TODO_LIST);
-
-            os = new ByteArrayOutputStream();
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-        // Test steps
-        // s1
-        testNullPointer(p, c1, cFormats, os);
-        testNullPointer(p, e1, eFormats, os);
-        testNullPointer(p, t1, tFormats, os);
-
-        // s2
-        testUEE(p, c1, cFormats, os);
-        testUEE(p, e1, eFormats, os);
-        testUEE(p, t1, tFormats, os);
-
-        // s3
-        testIAE(p, c1, os);
-        testIAE(p, e1, os);
-        testIAE(p, t1, os);
-
-        passTest();
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMException/PEconstants/PEconstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMException.PEconstants;
-//IMPORTS
-import javax.microedition.pim.PIMException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.UnsupportedFieldException.getField().
- */
-public class PEconstants
-        extends MIDPTest
-{
-
-    public PEconstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // Expected constants
-    private static final int TEST_FEATURE_NOT_SUPPORTED   = 0;
-    private static final int TEST_GENERAL_ERROR           = 1;
-    private static final int TEST_LIST_CLOSED             = 2;
-    private static final int TEST_LIST_NOT_ACCESSIBLE     = 3;
-    private static final int TEST_MAX_CATEGORIES_EXCEEDED = 4;
-    private static final int TEST_UNSUPPORTED_VERSION     = 5;
-    private static final int TEST_UPDATE_ERROR            = 6;
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        assertTest(
-            PIMException.FEATURE_NOT_SUPPORTED == TEST_FEATURE_NOT_SUPPORTED,
-            "FEATURE_NOT_SUPPORTED is " + TEST_FEATURE_NOT_SUPPORTED);
-
-        assertTest(
-            PIMException.GENERAL_ERROR == TEST_GENERAL_ERROR,
-            "GENERAL_ERROR is " + TEST_GENERAL_ERROR);
-
-        assertTest(
-            PIMException.LIST_CLOSED == TEST_LIST_CLOSED,
-            "LIST_CLOSED is " + TEST_LIST_CLOSED);
-
-        assertTest(
-            PIMException.LIST_NOT_ACCESSIBLE == TEST_LIST_NOT_ACCESSIBLE,
-            "LIST_NOT_ACCESSIBLE is " + TEST_LIST_NOT_ACCESSIBLE);
-
-        assertTest(
-            PIMException.MAX_CATEGORIES_EXCEEDED == TEST_MAX_CATEGORIES_EXCEEDED,
-            "MAX_CATEGORIES_EXCEEDED is " + TEST_MAX_CATEGORIES_EXCEEDED);
-
-        assertTest(
-            PIMException.UNSUPPORTED_VERSION == TEST_UNSUPPORTED_VERSION,
-            "UNSUPPORTED_VERSION is " + TEST_UNSUPPORTED_VERSION);
-
-        assertTest(
-            PIMException.UPDATE_ERROR == TEST_UPDATE_ERROR,
-            "UPDATE_ERROR is " + TEST_UPDATE_ERROR);
-
-        passTest();
-    }
-
-
-    private void assertTest(boolean aCondition, String aDescription)
-    throws TestEndThrowable
-    {
-        if (!aCondition)
-        {
-            failTest("False assertTestion: " + aDescription);
-        }
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMException/PEgetReason/PEgetReason.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMException.PEgetReason;
-//IMPORTS
-import javax.microedition.pim.PIMException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.UnsupportedFieldException.getField().
- */
-public class PEgetReason
-        extends MIDPTest
-{
-
-    public PEgetReason(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // Test messages for PIMException
-    private static final String TEST_MESSAGE = "Test message.";
-    private static final String[] TEST_MESSAGES = { null, TEST_MESSAGE };
-
-    // Test reasons for PIMException
-    private static final int[] TEST_REASONS =
-        { 0, 1, 2, 3, 4, 5, 6, 10, 100, -1 };
-
-    public void runTest() throws TestEndThrowable
-    {
-        testDefaultConstructor();
-        testMessageWithDefaultReason();
-        testMessageAndReason();
-
-        passTest();
-    }
-
-
-    private void testDefaultConstructor()
-    throws TestEndThrowable
-    {
-        PIMException pe = new PIMException();
-
-        assertTest(
-            pe.getMessage() == null,
-            "Message is null with default constructor.");
-
-        assertTest(
-            pe.getReason() == PIMException.GENERAL_ERROR,
-            "Reason is GENERAL_ERROR with default constructor.");
-    }
-
-
-    private void testMessageWithDefaultReason()
-    throws TestEndThrowable
-    {
-        for (int i = 0; i < TEST_MESSAGES.length; i++)
-        {
-            PIMException pe = new PIMException(TEST_MESSAGES[ i ]);
-
-            assertTest(
-                pe.getMessage() == TEST_MESSAGES[ i ],
-                "Message is set correctly with PIMException( String ) " +
-                "constructor.");
-
-            assertTest(
-                pe.getReason() == PIMException.GENERAL_ERROR,
-                "Reason is GENERAL_ERROR with PIMException( String ) "+
-                "constructor.");
-        }
-    }
-
-
-    private void testMessageAndReason()
-    throws TestEndThrowable
-    {
-        for (int mi = 0; mi < TEST_MESSAGES.length; mi++)  // message index
-        {
-            for (int ri = 0; ri < TEST_REASONS.length; ri++)  // reason index
-            {
-                PIMException pe = new PIMException(
-                    TEST_MESSAGES[ mi ],
-                    TEST_REASONS[ ri ]);
-
-                assertTest(
-                    pe.getMessage() == TEST_MESSAGES[ mi ],
-                    "Message is set correctly with " +
-                    "PIMException( String, int ) constructor.");
-
-                assertTest(
-                    pe.getReason() == TEST_REASONS[ ri ],
-                    "Reason is set correctly with " +
-                    "PIMException( String, int ) constructor. ");
-            }
-        }
-    }
-
-
-    private void assertTest(boolean aCondition, String aDescription)
-    throws TestEndThrowable
-    {
-        if (!aCondition)
-        {
-            failTest("False assertTestion: " + aDescription);
-        }
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIConstants/PIConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIMItem;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that PIMItem class constants equal specification.
- */
-public class PIConstants
-        extends MIDPTest
-{
-
-    public PIConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        if (PIMItem.ATTR_NONE != 0)
-        {
-            failTest("PIMItem.ATTR_NONE != 0");
-        }
-        if (PIMItem.BINARY != 0)
-        {
-            failTest("PIMItem.BINARY != 0");
-        }
-        if (PIMItem.BOOLEAN != 1)
-        {
-            failTest("PIMItem.BOOLEAN != 1");
-        }
-        if (PIMItem.DATE != 2)
-        {
-            failTest("PIMItem.DATE != 2");
-        }
-        if (PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE != 16777216)
-        {
-            failTest("PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE != 16777216");
-        }
-        if (PIMItem.EXTENDED_FIELD_MIN_VALUE != 16777216)
-        {
-            failTest("PIMItem.EXTENDED_FIELD_MIN_VALUE != 16777216");
-        }
-        if (PIMItem.INT != 3)
-        {
-            failTest("PIMItem.INT != 3");
-        }
-        if (PIMItem.STRING != 4)
-        {
-            failTest("PIMItem.STRING != 4");
-        }
-        if (PIMItem.STRING_ARRAY != 5)
-        {
-            failTest("PIMItem.STRING_ARRAY != 5");
-        }
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBinary/PIaddBinary.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddBinary;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addBinary() and
- * javax.microedition.pim.PIMItem.getBinary()
- */
-public class PIaddBinary
-        extends MIDPTest
-{
-
-    public PIaddBinary(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s9
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s10
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1 -s9
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s9
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s9
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BINARY)
-        {
-            // test step s3
-            byte[][] binary = new byte[1][];
-            int valueCount = testGetBinary(aItem, aField, binary);
-            // test step s4
-            testIsModified(aItem, false);
-            // test step s5
-            testRemoveBinary(aItem, aField, valueCount);
-            // test step s6
-            testCountValues(aItem, aField, valueCount - 1);
-            // test step s7
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s8
-            testAddBinary(aItem, aField, binary[0], valueCount);
-            // test step s9
-            testIsModified(aItem, true);
-        } // end of if (dataType = PIMItem.BINARY)
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetBinary(PIMItem aItem, int aField, byte[][] aData)
-    throws TestEndThrowable
-    {
-        byte[] data = null;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getBinary(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBinary threw: " + e.toString());
-        } // end of try-catch
-        aData[0] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, byte[] aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        byte[] newData = null;
-        try
-        {
-            newData = aItem.getBinary(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getBinary threw:" + e.toString());
-        } // end of try-catch
-        int dataLength = aData.length;
-        if (newData.length != dataLength)
-        {
-            failTest("data has changed, datalength:" + newData.length);
-        } // end of if (newData.length != dataLength)
-        for (int i = 0; i < dataLength; i++)
-        {
-            if (newData[ i ] != aData[ i ])
-            {
-                failTest("data has changed at offset:" + i);
-            } // end of if (newData[ i ] != aData[ i ])
-        } // end of for (int i = 0; i < dataLength; i++)
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testAddBinary(PIMItem aItem, int aField, byte[] aData,
-                               int aValueCount)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addBinary(aField, PIMItem.ATTR_NONE, aData, 0,
-                            aData.length);
-        }
-        catch (Throwable e)
-        {
-            failTest("addBinary threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s4, s9
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testRemoveBinary(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    /**
-     * Test step s7
-     */
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getBinary(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S7: getBinary threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getBinary did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBinaryEx/PIaddBinaryEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,338 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddBinaryEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addBinary() and
- * javax.microedition.pim.PIMItem.getBinary()
- */
-public class PIaddBinaryEx
-        extends MIDPTest
-{
-
-    public PIaddBinaryEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s10
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s11 makes no sense
-
-        // step s12
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s10
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s10
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s11
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s10
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BINARY)
-        {
-            // test step s3
-            byte[] binary = testGetBinary(aItem, aField);
-            // test step s4
-            testAddBinary(aItem, aField, null, binary.length, 0, 0, 1);
-            // test step s5
-            testAddBinary(aItem, 1, binary, binary.length, 0, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, binary, binary.length, 0, 0, 3);
-            // test step s7
-            testAddBinary(aItem, aField, binary, binary.length, 0, -1, 2);
-            testAddBinary(aItem, aField, binary, binary.length, 0,
-                          binary.length, 2);
-            // test step s8
-            testAddBinary(aItem, aField, binary, -1, 0, 0, 2);
-            testAddBinary(aItem, aField, binary, 0, 0, 0, 2);
-            // test step s9
-            testAddBinary(aItem, aField, new byte[ 0 ],
-                          binary.length, 0, 0, 2);
-
-
-            // test step s10
-            // Minor deviation from test plan: isModified is not tested
-            // for each field, as the method only tests the entire item.
-            // however, we still run it only for thos items which we have
-            // changed
-            testIsModified(aItem);
-        } // end of if (dataType = PIMItem.BINARY)
-    }
-
-    /**
-     * Test step s3
-     */
-    private byte[] testGetBinary(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        byte[] data = null;
-        try
-        {
-            data = aItem.getBinary(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBinary threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-s9
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testAddBinary(PIMItem aItem, int aField,
-                               byte[] aData, int aDataLength,
-                               int aAttributes, int aOffset, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.addBinary(aField, aAttributes, aData, aOffset,
-                            aDataLength);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("addBinary threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("addBinary threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField,
-                         byte[] aData, int aDataLength,
-                         int aAttributes, int aOffset, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 112;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testAddBinary(aItem, field, aData, aDataLength,
-                          aAttributes, aOffset, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s10
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddBoolean/PIaddBoolean.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,423 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddBoolean;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addBoolean() and
- * javax.microedition.pim.PIMItem.getBoolean()
- */
-public class PIaddBoolean
-        extends MIDPTest
-{
-
-    public PIaddBoolean(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s8
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s9
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s8
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s8
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BOOLEAN)
-        {
-            // test step s3
-            boolean[] data = new boolean[ 1 ];
-            int valueCount = testGetBoolean(aItem, aField, data);
-            // this is not in (original) test plan
-            testIsModified(aItem, false);
-            // test step s4
-            testRemoveValue(aItem, aField, valueCount);
-            // these is not in (original) test plan
-            testCountValues(aItem, aField, valueCount - 1);
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s5
-            testAddBoolean(aItem, aField, data[ 0 ], valueCount,
-                           PIMItem.ATTR_NONE);
-            // test step s6
-            testIsModified(aItem, true);
-            // test step s7
-            // NOTE that in this case there might be maximum number of supported values in the item
-            // if it is associateed to a list... this test case should be fixed completely to
-            // initilize its own test data...
-            if (aItem.countValues(aField) == aList.maxValues(aField))
-            {
-                aItem.removeValue(aField, aList.maxValues(aField) -1);
-            }
-            testAddBoolean(aItem, aField, data[ 0 ], valueCount, -1);
-
-            // test step s8
-            testFFE(aList, aItem, aField, data[ 0 ], PIMItem.ATTR_NONE);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetBoolean(PIMItem aItem, int aField, boolean[] aData)
-    throws TestEndThrowable
-    {
-        boolean data = false;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getBoolean(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBoolean threw: " + e.toString());
-        } // end of try-catch
-        aData[ 0 ] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, boolean aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        boolean newData = false;
-        try
-        {
-            newData = aItem.getBoolean(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getBoolean threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, old data: " + aData +
-                     ", new data: " + newData);
-        }
-    }
-
-    /**
-     * Test step s5,s7
-     */
-    private void testAddBoolean(PIMItem aItem, int aField, boolean aData,
-                                int aValueCount, int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addBoolean(aField, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("addBoolean threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s6
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testFFE(PIMList aList, PIMItem aItem, int aField,
-                         boolean aData,
-                         int aAttributes)
-    throws TestEndThrowable
-    {
-        int maxValues = aList.maxValues(aField);
-        if (maxValues == -1)
-        {
-            // unlimited
-            return;
-        }
-        if (maxValues == 0)
-        {
-            failTest("maxValues returned 0, field has values");
-        } // end of if (maxValues == 0)
-        int valueCount = aItem.countValues(aField);
-        // This many adds should not fail
-        int needToAdd = maxValues - valueCount;
-        for (int i = 0; i < needToAdd; i++)
-        {
-            try
-            {
-                aItem.addBoolean(aField, aAttributes, aData);
-            }
-            catch (Throwable e)
-            {
-                failTest("S8: addBoolean threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < needToAdd; i++)
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addBoolean(aField, aAttributes, aData);
-        }
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("S8: last addBoolean threw: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("FFE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getBoolean(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getBoolean threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getBoolean did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddDate/PIaddDate.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,365 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddDate;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addDate() and
- * javax.microedition.pim.PIMItem.getDate()
- */
-public class PIaddDate
-        extends MIDPTest
-{
-
-    public PIaddDate(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            // this is not in (original) test plan
-            testIsModified(item, false);
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                if ((fields[ i ] == Contact.REVISION) ||
-                        (fields[ i ] == Event.REVISION) ||
-                        (fields[ i ] == ToDo.REVISION))
-                {
-                    continue;
-                }
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s6
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.DATE)
-        {
-            // test step s3
-            long[] date = new long[ 1 ];
-            int valueCount = testGetDate(aItem, aField, date);
-
-            // test step s4
-            testRemoveValue(aItem, aField, valueCount);
-            // these is not in (original) test plan
-            testCountValues(aItem, aField, valueCount - 1);
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s5
-            testAddDate(aItem, aField, date[ 0 ], valueCount);
-            // test step s6
-            testIsModified(aItem, true);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetDate(PIMItem aItem, int aField, long[] aData)
-    throws TestEndThrowable
-    {
-        long data = 0;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getDate(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getDate threw: " + e.toString());
-        } // end of try-catch
-        aData[ 0 ] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, long aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        long newData = 0;
-        try
-        {
-            newData = aItem.getDate(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getDate threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, old data: " + aData +
-                     ", new data: " + newData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testAddDate(PIMItem aItem, int aField, long aData,
-                             int aValueCount)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addDate(aField, PIMItem.ATTR_NONE, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("addDate threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s4, s9
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getDate(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getDate threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getDate did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddDateEx/PIaddDateEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddDateEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addDate() and
- * javax.microedition.pim.PIMItem.getDate()
- */
-public class PIaddDateEx
-        extends MIDPTest
-{
-
-    public PIaddDateEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s8
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s11
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s9
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s9
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.DATE)
-        {
-            // test step s3
-            long date = testGetDate(aItem, aField);
-            // test step s4 is not done because negative values may be valid
-            // test step s5
-            testAddDate(aItem, 1, date, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, date, 0, 3);
-            // test step s7
-            testIsModified(aItem);
-            testFFE(aList, aItem, aField, date, 0);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private long testGetDate(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        long data = 0;
-        try
-        {
-            data = aItem.getDate(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getDate threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-s6
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testAddDate(PIMItem aItem, int aField,
-                             long aData,
-                             int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.addDate(aField, aAttributes, aData);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("addDate threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("addDate threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField,
-                         long aData,
-                         int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 0;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testAddDate(aItem, field, aData,
-                        aAttributes, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s7
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testFFE(PIMList aList, PIMItem aItem, int aField, long aData,
-                         int aAttributes)
-    throws TestEndThrowable
-    {
-        int maxValues = aList.maxValues(aField);
-        if (maxValues == -1)
-        {
-            // unlimited
-            return;
-        }
-        if (maxValues == 0)
-        {
-            failTest("maxValues returned 0, field has values");
-        } // end of if (maxValues == 0)
-        int valueCount = aItem.countValues(aField);
-        // This many adds should not fail
-        int needToAdd = maxValues - valueCount;
-        for (int i = 0; i < needToAdd; i++)
-        {
-            try
-            {
-                aItem.addDate(aField, aAttributes, aData);
-            }
-            catch (Throwable e)
-            {
-                failTest("S8: addDate threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < needToAdd; i++)
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addDate(aField, aAttributes, aData);
-        }
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("S8: last addDate threw: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("FFE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddInt/PIaddInt.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,413 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddInt;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addInt() and
- * javax.microedition.pim.PIMItem.getInt()
- */
-public class PIaddInt
-        extends MIDPTest
-{
-
-    public PIaddInt(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s7
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s8
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s7
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.INT)
-        {
-            // test step s3
-            int[] data = new int[ 1 ];
-            int valueCount = testGetInt(aItem, aField, data);
-            // this is not in (original) test plan
-            //testIsModified( aItem, false );
-            // test step s4
-            testRemoveValue(aItem, aField, valueCount);
-            // these is not in (original) test plan
-            testCountValues(aItem, aField, valueCount - 1);
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s5
-            testAddInt(aItem, aField, data[ 0 ], valueCount,
-                       PIMItem.ATTR_NONE);
-            // test step s6
-            testIsModified(aItem, true);
-            // test step s8
-            testFFE(aList, aItem, aField, data[ 0 ], PIMItem.ATTR_NONE);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetInt(PIMItem aItem, int aField, int[] aData)
-    throws TestEndThrowable
-    {
-        int data = 0;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getInt(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getInt threw: " + e.toString());
-        } // end of try-catch
-        aData[ 0 ] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, int aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        int newData = 0;
-        try
-        {
-            newData = aItem.getInt(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getInt threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, old data: " + aData +
-                     ", new data: " + newData);
-        }
-    }
-
-    /**
-     * Test step s5,s7
-     */
-    private void testAddInt(PIMItem aItem, int aField, int aData,
-                            int aValueCount, int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addInt(aField, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("addInt threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s6
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test step s7
-     */
-    private void testFFE(PIMList aList, PIMItem aItem, int aField,
-                         int aData,
-                         int aAttributes)
-    throws TestEndThrowable
-    {
-        int maxValues = aList.maxValues(aField);
-        if (maxValues == -1)
-        {
-            // unlimited
-            return;
-        }
-        if (maxValues == 0)
-        {
-            failTest("maxValues returned 0, field has values");
-        } // end of if (maxValues == 0)
-        int valueCount = aItem.countValues(aField);
-        // This many adds should not fail
-        int needToAdd = maxValues - valueCount;
-        for (int i = 0; i < needToAdd; i++)
-        {
-            try
-            {
-                aItem.addInt(aField, aAttributes, aData);
-            }
-            catch (Throwable e)
-            {
-                failTest("S7: addInt threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < needToAdd; i++)
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addInt(aField, aAttributes, aData);
-        }
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("S7: last addInt threw: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("FFE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getInt(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getInt threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getInt did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddString/PIaddString.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddString;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addString() and
- * javax.microedition.pim.PIMItem.getString()
- */
-public class PIaddString
-        extends MIDPTest
-{
-
-    public PIaddString(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    private static final String VERY_LONG_STRING =
-        "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s9
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s10
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s9
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            // this is not in (original) test plan
-            testIsModified(item, false);
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s9
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s7
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING)
-        {
-            // test step s3
-            String[] data = new String[ 1 ];
-            int valueCount = testGetString(aItem, aField, data);
-
-            // test step s4
-            if (testRemoveValue(aItem, aField, valueCount))
-            {
-                return;
-            }
-            // these is not in (original) test plan
-            testCountValues(aItem, aField, valueCount - 1);
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s5
-            testAddString(aItem, aField, data[ 0 ], valueCount,
-                          PIMItem.ATTR_NONE);
-            // test step s6
-            testIsModified(aItem, true);
-            // test step s7
-            valueCount++;
-            testAddString(aItem, aField, "", valueCount, PIMItem.ATTR_NONE);
-            // test step s8
-            valueCount++;
-            testAddString(aItem, aField, VERY_LONG_STRING, valueCount,
-                          PIMItem.ATTR_NONE);
-            // test step s9
-            testFFE(aList, aItem, aField, data[ 0 ], PIMItem.ATTR_NONE);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetString(PIMItem aItem, int aField, String[] aData)
-    throws TestEndThrowable
-    {
-        String data = null;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getString(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getString threw: " + e.toString());
-        } // end of try-catch
-        aData[ 0 ] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, String aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        String newData = null;
-        try
-        {
-            newData = aItem.getString(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getString threw:" + e.toString());
-        } // end of try-catch
-        if (newData.compareTo(aData) != 0)
-        {
-            failTest("data has changed, old data: " + aData +
-                     ", new data: " + newData);
-        }
-    }
-
-    /**
-     * Test step s5,s7-s8
-     */
-    private void testAddString(PIMItem aItem, int aField, String aData,
-                               int aValueCount, int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addString(aField, aAttributes, aData);
-        }
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            log("Field is already full");
-            return;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("addString threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s6
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s4
-     */
-    private boolean testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (IllegalArgumentException e)
-        {
-            log("skipping read only field");
-            return true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-        return false;
-    }
-
-    /**
-     * Test step s9
-     */
-    private void testFFE(PIMList aList, PIMItem aItem, int aField,
-                         String aData,
-                         int aAttributes)
-    throws TestEndThrowable
-    {
-        int maxValues = aList.maxValues(aField);
-        if (maxValues == -1)
-        {
-            // unlimited
-            return;
-        }
-        if (maxValues == 0)
-        {
-            failTest("maxValues returned 0, field has values");
-        } // end of if (maxValues == 0)
-        int valueCount = aItem.countValues(aField);
-        // This many adds should not fail
-        int needToAdd = maxValues - valueCount;
-        for (int i = 0; i < needToAdd; i++)
-        {
-            try
-            {
-                aItem.addString(aField, aAttributes, aData);
-            }
-            catch (Throwable e)
-            {
-                failTest("S9: addString threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < needToAdd; i++)
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addString(aField, aAttributes, aData);
-        }
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("S9: last addString threw: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("FFE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getString(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getString threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getStringArray did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddStringArray/PIaddStringArray.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,381 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddStringArray;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addStringArray() and
- * javax.microedition.pim.PIMItem.getStringArray()
- */
-public class PIaddStringArray
-        extends MIDPTest
-{
-
-    public PIaddStringArray(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            // this is not in (original) test plan
-            testIsModified(item, false);
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s6
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING_ARRAY)
-        {
-            // test step s3
-            String[][] stringArray = new String[1][];
-            int valueCount = testGetStringArray(aItem, aField, stringArray);
-
-            // test step s4
-            testRemoveValue(aItem, aField, valueCount);
-            // these is not in (original) test plan
-            testCountValues(aItem, aField, valueCount - 1);
-            testIOOBE(aItem, aField, valueCount - 1);
-            // test step s5
-            testAddStringArray(aItem, aField, stringArray[0], valueCount);
-            // test step s6
-            testIsModified(aItem, true);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetStringArray(PIMItem aItem, int aField,
-                                   String[][] aData)
-    throws TestEndThrowable
-    {
-        String[] data = null;
-        int values = 0;
-        try
-        {
-            values = aItem.countValues(aField);
-            data = aItem.getStringArray(aField, values - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("getStringArray threw: " + e.toString());
-        } // end of try-catch
-        aData[0] = data;
-        return values;
-    }
-
-    private void compareData(PIMItem aItem, int aField, String[] aData,
-                             int aIndex)
-    throws TestEndThrowable
-    {
-        String[] newData = null;
-        try
-        {
-            newData = aItem.getStringArray(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getStringArray threw:" + e.toString());
-        } // end of try-catch
-        int dataLength = aData.length;
-        if (newData.length != dataLength)
-        {
-            failTest("data has changed, datalength:" + newData.length);
-        } // end of if (newData.length != dataLength)
-        for (int i = 0; i < dataLength; i++)
-        {
-            if (newData[ i ] == null)
-            {
-                if (aData[ i ] == null)
-                {
-                    continue;
-                } // end of if (aData[ i ] == null)
-                else
-                {
-                    log("oldData: " + aData[ i ]);
-                    failTest("newData is null at offset: " + i);
-                } // end of else
-            } // end of if (newData[ i ] == null)
-            if (newData[ i ].compareTo(aData[ i ]) != 0)
-            {
-                log("oldData: " + aData[ i ]);
-                log("newData: " + newData[ i ]);
-                failTest("data has changed at offset:" + i);
-            } // end of if (newData[ i ] != aData[ i ])
-        } // end of for (int i = 0; i < dataLength; i++)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testAddStringArray(PIMItem aItem, int aField, String[] aData,
-                                    int aValueCount)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.addStringArray(aField, PIMItem.ATTR_NONE, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("addBinary threw: " + e.toString());
-        } // end of try-catch
-        compareData(aItem, aField, aData, aValueCount - 1);
-    }
-
-    /**
-     * Test steps s4, s9
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    private void testCountValues(PIMItem aItem, int aField,
-                                 int aExpected)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        if (valueCount != aExpected)
-        {
-            failTest("countValues returned:" + valueCount);
-        } // end of if (valueCount != aExpected)
-    }
-
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getStringArray(aField, aIndex);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getStringArray threw: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getStringArray did not throw IOOBE");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIaddStringArrayEx/PIaddStringArrayEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIaddStringArrayEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.addStringArray() and
- * javax.microedition.pim.PIMItem.getStringArray()
- */
-public class PIaddStringArrayEx
-        extends MIDPTest
-{
-
-    public PIaddStringArrayEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s9
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s10 makes no sense
-
-        // step s11
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s9
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s9
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s9
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s9
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING_ARRAY)
-        {
-            // test step s3
-            String[] stringArray = testGetStringArray(aItem, aField);
-            // test step s4
-            testAddStringArray(aItem, aField, null, 0, 1);
-            // test step s5
-            testAddStringArray(aItem, 1, stringArray, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, stringArray, 0, 3);
-            // test step s7
-            testAddStringArray(aItem, aField, new String[ 0 ],
-                               0, 2);
-            // test step s8
-            String[] nullArray = new String[ stringArray.length ];
-            testAddStringArray(aItem, aField, nullArray, 0, 2);
-
-            // test step s9
-            testIsModified(aItem);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private String[] testGetStringArray(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String[] data = null;
-        try
-        {
-            data = aItem.getStringArray(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getStringArray threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-s9
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testAddStringArray(PIMItem aItem, int aField,
-                                    String[] aData,
-                                    int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.addStringArray(aField, aAttributes, aData);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (javax.microedition.pim.FieldFullException e)
-        {
-            log("Field is already full");
-            return;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("addStringArray threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("addStringArray threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField,
-                         String[] aData,
-                         int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 0;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testAddStringArray(aItem, field, aData,
-                               aAttributes, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s10
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcategories/PIcategories.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,567 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIcategories;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.getCategories(),
- * javax.microedition.pim.PIMItem.maxCategories(),
- * javax.microedition.pim.PIMItem.removeFromCategory() and
- * javax.microedition.pim.PIMItem.addToCategory()
- *
- */
-public class PIcategories extends MIDPTest
-{
-
-    public PIcategories(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        String[][] contactCategories = null;
-        String[][] eventCategories = null;
-        String[][] todoCategories = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-
-        int contactMaxC = -1;
-        int eventMaxC = 0;
-        int todoMaxC = 0;
-
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactCategories = getCategories(contactLists);
-            eventCategories = getCategories(eventLists);
-            todoCategories = getCategories(todoLists);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (java.lang.OutOfMemoryError e)
-        {
-            failTest("preconditions threw OOME:" + e.getMessage());
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // steps s1-s9
-        testAll(contactItems, contactCategories, contactMaxC);
-        testAll(eventItems, eventCategories, eventMaxC);
-        testAll(todoItems, todoCategories, todoMaxC);
-        // step s10
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-
-        passTest();
-    }
-
-    private void testAll(Enumeration[] aItems, String[][] aCategories,
-                         int aListMaxC)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testAll(aItems[ i ], aCategories[ i ], aListMaxC);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testAll(Enumeration aItems, String[] aCategories,
-                         int aListMaxC)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            // Test step s1
-            String[] itemCategories = testCategories(item, aCategories);
-            // Test step s2
-            testMaxC(item, aListMaxC);
-            // Test step s3
-            testNullCategory(item);
-            // Test step s4
-            testInvalidCategory(item);
-            // Test step s5
-            String[] addedCategories = testAddCategories(item, itemCategories,
-                                       aCategories);
-            // Test step s6
-            testDoubleAdd(item, addedCategories);
-            // Test step s7
-            testNullRemove(item);
-            // Test step s8
-            testRemoveCategories(item, addedCategories);
-            // Test step s9
-            testDoubleRemoveCategories(item, addedCategories);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test Step S1
-     */
-    private String[] testCategories(PIMItem aItem, String[] aCategories)
-    throws TestEndThrowable
-    {
-        String[] categories = null;
-        try
-        {
-            categories = aItem.getCategories();
-        }
-        catch (Throwable e)
-        {
-            failTest("aItem.getCategories threw: " + e.toString());
-        } // end of try-catch
-
-        int categoryCount = categories.length;
-        int listCategoryCount = aCategories.length;
-        for (int i = 0; i < categoryCount; i++)
-        {
-            boolean found = false;
-            for (int j = 0; j < listCategoryCount; j++)
-            {
-                if (categories[ i ].compareTo(aCategories[ j ]) == 0)
-                {
-                    found = true;
-                    break;
-                }
-            } // end of for (int j = 0; j < listCategoryCount; j++)
-            if (!found)
-            {
-                failTest("item category not in list: " + categories[ i ]);
-            } // end of if (!found)
-        } // end of for (int i = 0; i < categoryCount; i++)
-        return categories;
-    }
-
-    /**
-     * Test Step S2
-     */
-    private void testMaxC(PIMItem aItem, int aListMaxC)
-    throws TestEndThrowable
-    {
-        int maxCategories = 0;
-        try
-        {
-            maxCategories = aItem.maxCategories();
-        }
-        catch (Throwable e)
-        {
-            failTest("aItem.maxCategories threw: " + e.toString());
-        } // end of try-catch
-        if (maxCategories != aListMaxC)
-        {
-            failTest("Item returned wrong maxCategories: " + maxCategories);
-        } // end of if (maxCategories != aListMaxC)
-    }
-
-    /**
-     * Test step S3
-     */
-    private void testNullCategory(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        int categoryCount = aItem.getCategories().length;
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addToCategory(null);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("addToCategory(null) threw:" + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("addToCategory(null) did not throw NullPointer");
-        } // end of if (!exceptionThrown)
-        int newCategoryCount = aItem.getCategories().length;
-        if (newCategoryCount != categoryCount)
-        {
-            failTest("addToCategory(null) changed category count");
-        } // end of if (newCategoryCount != categoryCount)
-    }
-
-    /**
-     * Test step S4
-     */
-    private void testInvalidCategory(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        int categoryCount = aItem.getCategories().length;
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.addToCategory("ThisIsNotACateogry");
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("addToCategory(<invalid>) did not throw PIMException");
-        } // end of if (!exceptionThrown)
-        int newCategoryCount = aItem.getCategories().length;
-        if (newCategoryCount != categoryCount)
-        {
-            failTest("addToCategory(<invalid>) changed category count");
-        } // end of if (newCategoryCount != categoryCount)
-    }
-
-    /**
-     * Test step s5
-     */
-    private String[] testAddCategories(PIMItem aItem,
-                                       String[] aItemCategories,
-                                       String[] aListCategories)
-    throws TestEndThrowable
-    {
-        int itemCategoryCount = aItemCategories.length;
-        int itemCategoryListCount = aItemCategories.length;
-        int listCategoryCount = aListCategories.length;
-        int maxCategories = aItem.maxCategories();
-        String[] addedCategories =
-            new String[ listCategoryCount - itemCategoryCount ];
-        int addCount = 0;
-        for (int i = 0; i < listCategoryCount; i++)
-        {
-            boolean found = false;
-            for (int j = 0; j < itemCategoryListCount; j++)
-            {
-                log("comparing: \"" + aListCategories[ i ] + "\" and \"" + aItemCategories[ j ] + "\"");
-                if (aListCategories[ i ].compareTo(aItemCategories[ j ])
-                        == 0)
-                {
-                    log("found category:" + aItemCategories[ j ]);
-                    found = true;
-                    break;
-                }
-            }
-            for (int j = 0; j < addCount; j++)
-            {
-                if (aListCategories[ i ].compareTo(addedCategories[ j ])
-                        == 0)
-                {
-                    found = true;
-                    break;
-                }
-            }
-            if (!found)
-            {
-                // we must add it
-                boolean exceptionThrown = false;
-                try
-                {
-                    aItem.addToCategory(aListCategories[ i ]);
-                }
-                catch (PIMException e)
-                {
-                    exceptionThrown = true;
-                    if (itemCategoryCount < maxCategories)
-                    {
-                        failTest("addToCategory threw PIMException");
-                    } // end of if (itemCategoryCount < maxCategories)
-                } // end of try-catch
-                catch (Throwable e)
-                {
-                    failTest("addToCategory threw: " + e.toString());
-                } // end of catch
-                itemCategoryCount++;
-                if ((maxCategories != -1) &&
-                        (itemCategoryCount > maxCategories))
-                {
-                    if (!exceptionThrown)
-                    {
-                        log("itemCategoryCount = " + itemCategoryCount);
-                        log("maxCategories = " + maxCategories);
-                        failTest("addToCategory did not throw PIMException");
-                    } // end of if (!exceptionThrown)
-                }
-                int newCategoryCount = aItem.getCategories().length;
-                if (newCategoryCount != itemCategoryCount)
-                {
-                    failTest("category was not added");
-                } // end of if (newCategoryCount != itemCategoryCount)
-                addedCategories[ addCount++ ] = aListCategories[ i ];
-            } // end of if (!found)
-        } // end of for (int i = 0; i < listCategoryCount; i++)
-        String[] retVal = new String[ addCount ];
-        for (int i = 0; i < addCount; i++)
-        {
-            retVal[ i ] = addedCategories[ i ];
-        } // end of for (int i = 0; i < addCount; i++)
-
-        return retVal;
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testAddCategories2(PIMItem aItem,
-                                    String[] aAddedCategories)
-    throws TestEndThrowable
-    {
-        int addedCategoryCount = aAddedCategories.length;
-        for (int i = 0; i < addedCategoryCount; i++)
-        {
-            try
-            {
-                aItem.addToCategory(aAddedCategories[ i ]);
-            }
-            catch (PIMException e)
-            {
-                failTest("S6: addToCategory threw PIMException");
-            } // end of try-catch
-            catch (Throwable e)
-            {
-                failTest("S6: addToCategory threw: " + e.toString());
-            } // end of catch
-        }
-        return;
-    }
-
-
-    private void testDoubleAdd(PIMItem aItem, String[] aAddedCategories)
-    throws TestEndThrowable
-    {
-        String[] itemOldCategories = null;
-        String[] itemNewCategories = null;
-        try
-        {
-            itemOldCategories = aItem.getCategories();
-            testAddCategories2(aItem, aAddedCategories);
-            itemNewCategories = aItem.getCategories();
-
-        }
-        catch (TestEndThrowable e)
-        {
-            throw e;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Test step s6: " + e.toString());
-        } // end of catch
-        if (itemOldCategories.length != itemNewCategories.length)
-        {
-            failTest("repeating step 5 changed category count");
-        }
-    }
-
-    /**
-     * Test step S7
-     */
-    private void testNullRemove(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        int categoryCount = aItem.getCategories().length;
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.removeFromCategory(null);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("removeFromCategory(null) threw:" + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("removeFromCategory(null) did not throw NullPointer");
-        } // end of if (!exceptionThrown)
-        int newCategoryCount = aItem.getCategories().length;
-        if (newCategoryCount != categoryCount)
-        {
-            failTest("removeFromCategory(null) changed category count");
-        } // end of if (newCategoryCount != categoryCount)
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testRemoveCategories(PIMItem aItem, String[] aAddedCategories)
-    throws TestEndThrowable
-    {
-        String[] itemCategories = null;
-        try
-        {
-            itemCategories = aItem.getCategories();
-        }
-        catch (Throwable e)
-        {
-            failTest("S8: getCategories threw:" + e.toString());
-        } // end of try-catch
-        int itemCategoryCount = itemCategories.length;
-        int addedCategoryCount = aAddedCategories.length;
-        for (int i = 0; i < addedCategoryCount; i++)
-        {
-            try
-            {
-                aItem.removeFromCategory(aAddedCategories[ i ]);
-                itemCategories = aItem.getCategories();
-            }
-            catch (Throwable e)
-            {
-                failTest("S8: " + e.toString());
-            } // end of try-catch
-            itemCategoryCount--;
-            if (itemCategoryCount != itemCategories.length)
-            {
-                failTest("removeFromCategory did not remove from category");
-            }
-        }
-    }
-
-    /**
-     * Test step s9
-     */
-    private void testDoubleRemoveCategories(PIMItem aItem,
-                                            String[] aAddedCategories)
-    throws TestEndThrowable
-    {
-        String[] itemCategories = null;
-        try
-        {
-            itemCategories = aItem.getCategories();
-        }
-        catch (Throwable e)
-        {
-            failTest("S9: getCategories threw:" + e.toString());
-        } // end of try-catch
-        int itemCategoryCount = itemCategories.length;
-        int addedCategoryCount = aAddedCategories.length;
-        for (int i = 0; i < addedCategoryCount; i++)
-        {
-            try
-            {
-                aItem.removeFromCategory(aAddedCategories[ i ]);
-                itemCategories = aItem.getCategories();
-            }
-            catch (Throwable e)
-            {
-                failTest("S8: " + e.toString());
-            } // end of try-catch
-            if (itemCategoryCount != itemCategories.length)
-            {
-                failTest("double removeFromCategory removed from category");
-            }
-        }
-    }
-
-    /**
-     * Test step s10
-     */
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-
-    private String[][] getCategories(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        String[][] categories= new String[ listCount ][];
-        for (int i = 0; i < listCount; i++)
-        {
-            categories[ i ] = aLists[ i ].getCategories();
-        } // end of for (int i = 0; i < listCount; i++)
-        return categories;
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_ONLY,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-}
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcommit/PIcommit.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIcommit;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.commit()
- */
-public class PIcommit
-        extends MIDPTest
-{
-
-    public PIcommit(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, PIM.READ_WRITE,
-                                     contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, PIM.READ_WRITE,
-                                   eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, PIM.READ_WRITE,
-                                  todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1
-        testCommit(contactItems, contactLists);
-        testCommit(eventItems, eventLists);
-        testCommit(todoItems, todoLists);
-
-        // step s2
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        // step s3
-        try
-        {
-            contactLists = openLists(p, PIM.CONTACT_LIST, PIM.READ_ONLY,
-                                     contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, PIM.READ_ONLY,
-                                   eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, PIM.READ_ONLY,
-                                  todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("s3: " + e.toString());
-        } // end of try-catch
-
-        // step s4
-        testPIME(contactItems, contactLists);
-        testPIME(eventItems, eventLists);
-        testPIME(todoItems, todoLists);
-
-        // step s5
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1
-     */
-    private void testCommit(Enumeration[] aItems,
-                            PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testCommit(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1
-     */
-    private void testCommit(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            testCommit(item);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test step s1
-     */
-    private void testCommit(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.commit();
-        }
-        catch (Throwable e)
-        {
-            failTest("commit threw: " + e.toString());
-        } // end of try-catch
-    }
-
-    /**
-     * Test steps s4
-     */
-    private void testPIME(Enumeration[] aItems,
-                          PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testPIME(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s4
-     */
-    private void testPIME(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            testPIME(item);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testPIME(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.commit();
-        }
-        catch (java.lang.SecurityException e)
-        {
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("not PIMException: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("PIMException not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, int aMode,
-                                String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIcommit2/PIcommit2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIcommit2;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.commit(),
- * javax.microedition.pim.PIMItem.isModified()
- */
-public class PIcommit2
-        extends MIDPTest
-{
-
-    public PIcommit2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, PIM.READ_WRITE,
-                                     contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, PIM.READ_WRITE,
-                                   eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, PIM.READ_WRITE,
-                                  todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s4
-        testCommit(contactItems, contactLists);
-        testCommit(eventItems, eventLists);
-        testCommit(todoItems, todoLists);
-
-        // step s5
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1
-     */
-    private void testCommit(Enumeration[] aItems,
-                            PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testCommit(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1
-     */
-    private void testCommit(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            testCommit(item, aList);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test step s1-s4
-     */
-    private void testCommit(PIMItem aItem, PIMList aList)
-    throws TestEndThrowable
-    {
-        int[] fields = null;
-        try
-        {
-            fields = aItem.getFields();
-        }
-        catch (Throwable e)
-        {
-            failTest("getFields threw: " + e.toString());
-        } // end of try-catch
-        int fieldCount = fields.length;
-        boolean stop = false;
-        for (int i = 0; (i < fieldCount) && (!stop) ; i++)
-        {
-            // test step s2
-            stop = testFieldDataType(aItem, fields[ i ], aList);
-        } // end of for (int i = 0; i < fieldCount; i++)
-        // test step s3
-        if (!stop)
-        {
-            log("Item had no string fields, it can't be tested");
-            return;
-        } // end of if (!stop)
-
-        testIsModified(aItem, true);
-        // test step s4
-        try
-        {
-            aItem.commit();
-        }
-        catch (Throwable e)
-        {
-            failTest("commit threw: " + e.toString());
-        } // end of try-catch
-        testIsModified(aItem, false);
-    }
-
-    /**
-     * Test step s2
-     */
-    private boolean testFieldDataType(PIMItem aItem, int aField,
-                                      PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING)
-        {
-            if ((aItem instanceof Contact) && (aField == Contact.UID))
-            {
-                return false;
-            }
-            else if ((aItem instanceof Event) && (aField == Event.UID))
-            {
-                return false;
-            }
-            else if ((aItem instanceof ToDo) && (aField == ToDo.UID))
-            {
-                return false;
-            }
-
-            String data = testGetString(aItem, aField);
-            testSetString(aItem, aField, data, 0);
-            return true;
-        }
-        return false;
-    }
-
-    private String testGetString(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String data = null;
-        try
-        {
-            data = aItem.getString(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getString threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void testSetString(PIMItem aItem, int aField, String aData,
-                               int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setString(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setString threw: " + e.toString());
-        } // end of try-catch
-    }
-    /**
-     * Test step s3, s4
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, int aMode,
-                                String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetAttributes/PIgetAttributes.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,370 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIgetAttributes;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.getFields() and
- * javax.microedition.pim.PIMItem.getAttributes()
- */
-public class PIgetAttributes
-        extends MIDPTest
-{
-
-    public PIgetAttributes(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1 -s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-    * Test steps s1-s6
-    */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                if (!aList.isSupportedField(fields[ i ]))
-                {
-                    failTest("getFields returned unsupported field: " +
-                             fields[ i ]);
-                } // end of if (!aList.isSupportedField( fields[ i ] ))
-                // test steps s2-s4
-                testCountValues(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-            // test step s5
-            testIAE(item, 1);
-            // test step s6
-            testUFE(item, aList);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s4
-     */
-    private void testCountValues(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        // Test step s3
-        testGetAttributes(aItem, aField, valueCount, aList);
-        // Test step s4
-        testIOOBE(aItem, aField, valueCount);
-    }
-
-    private void checkAttributes(PIMList aList, int aField, int aAttributes)
-    throws TestEndThrowable
-    {
-        int singleBit = 1;
-        while (singleBit < PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE)
-        {
-            int singleAttribute = (aAttributes & singleBit);
-            if (singleAttribute != 0)
-            {
-                if (!aList.isSupportedAttribute(aField, singleAttribute))
-                {
-                    failTest("unsupported attribute:" + singleAttribute);
-                }
-            }
-            singleBit <<= 1;
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private void testGetAttributes(PIMItem aItem, int aField,
-                                   int aValueCount, PIMList aList)
-    throws TestEndThrowable
-    {
-        for (int i = 0; i < aValueCount; i++)
-        {
-            int attributes = 0;
-            try
-            {
-                attributes = aItem.getAttributes(aField, i);
-            }
-            catch (Throwable e)
-            {
-                failTest("getAttributes threw: " + e.toString());
-            } // end of try-catch
-            checkAttributes(aList, aField, attributes);
-        } // end of for (int i = 0; i < aValueCount; i++)
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testIOOBE(PIMItem aItem, int aField, int aValueCount)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getAttributes(aField, -1);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("getAttributes threw instead of IOOBE: "
-                     + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getAttributes did not throw IOOBE for -1");
-        } // end of if (!exceptionThrown)
-        exceptionThrown = false;
-        try
-        {
-            aItem.getAttributes(aField, aValueCount);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("getAttributes threw instead of IOOBE: "
-                     + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getAttributes did not throw IOOBE for " + aValueCount);
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIAE(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.getAttributes(aField, 0);
-        }
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (UnsupportedFieldException e)
-        {
-            failTest("getAttributes threw UFE: " + e.getMessage());
-        } // end of catch
-
-        catch (Throwable e)
-        {
-            failTest("getAttributes threw instead of IAE: " +
-                     e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("getAttributes did not throw IAE");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, PIMList aList)
-    throws TestEndThrowable
-    {
-        int maxField = 0;
-        if (aItem instanceof Contact)
-        {
-            maxField = Contact.URL + 1;
-        }
-        if (aItem instanceof Event)
-        {
-            maxField = Event.UID + 1;
-        }
-        if (aItem instanceof ToDo)
-        {
-            maxField = ToDo.UID + 1;
-        }
-        for (int i = Contact.ADDR; i < maxField; i++)
-        {
-            if (!aList.isSupportedField(i))
-            {
-                boolean exceptionThrown = false;
-                try
-                {
-                    aItem.getAttributes(i, 0);
-                }
-                catch (UnsupportedFieldException e)
-                {
-                    exceptionThrown = true;
-                } // end of try-catch
-                catch (Throwable e)
-                {
-                    failTest("getAttributes threw instead of UFE: "
-                             + e.toString());
-                } // end of catch
-                if (!exceptionThrown)
-                {
-                    failTest("getAttributes did not throw UFE");
-                } // end of if (!exceptionThrown)
-            } // end of if (!aList.isSupportedField( i ))
-        }
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetFields/PIgetFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,427 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIgetFields;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.getFields(),
- * javax.microedition.pim.PIMItem.countValues() and
- * javax.microedition.pim.PIMItem.isModified()
- */
-public class PIgetFields
-        extends MIDPTest
-{
-
-    public PIgetFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // steps s1-s7
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s8
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                if (!aList.isSupportedField(fields[ i ]))
-                {
-                    failTest("getFields returned unsupported field: " +
-                             fields[ i ]);
-                } // end of if (!aList.isSupportedField( fields[ i ] ))
-                // test steps s2-s4
-                testCountValues(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-            // test step s5
-            testIAE(item, 1);
-            // test step s6
-            testUFE(item, aList);
-            // test step s7
-            testIsModified(item);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s4
-     */
-    private void testCountValues(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw: " + e.toString());
-        } // end of try-catch
-        // Test step s3
-        testGetData(aItem, aField, valueCount, dataType);
-        // Test step s4
-        testIOOBE(aItem, aField, valueCount, dataType);
-    }
-
-    private void getData(PIMItem aItem, int aField, int aIndex,
-                         int aDataType)
-    throws TestEndThrowable
-    {
-        switch (aDataType)
-        {
-        case PIMItem.BINARY:
-        {
-            aItem.getBinary(aField, aIndex);
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            aItem.getBoolean(aField, aIndex);
-            break;
-        }
-        case PIMItem.DATE:
-        {
-            aItem.getDate(aField, aIndex);
-            break;
-        }
-        case PIMItem.INT:
-        {
-            aItem.getInt(aField, aIndex);
-            break;
-        }
-        case PIMItem.STRING:
-        {
-            aItem.getString(aField, aIndex);
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        {
-            aItem.getStringArray(aField, aIndex);
-            break;
-        }
-        default:
-        {
-            failTest("unknown datatype: " + aDataType);
-            break;
-        }
-        } // end of switch (aDataType)
-    }
-
-    /**
-     * Test step s3
-     */
-    private void testGetData(PIMItem aItem, int aField, int aValueCount,
-                             int aDataType)
-    throws TestEndThrowable
-    {
-        for (int i = 0; i < aValueCount; i++)
-        {
-            try
-            {
-                getData(aItem, aField, i, aDataType);
-            }
-            catch (Throwable e)
-            {
-                failTest("get<datatype> threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < aValueCount; i++)
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testIOOBE(PIMItem aItem, int aField, int aValueCount,
-                           int aDataType)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            getData(aItem, aField, -1, aDataType);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("get<datatype> threw instead of IOOBE: "
-                     + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getData did not throw IOOBE for -1");
-        } // end of if (!exceptionThrown)
-        exceptionThrown = false;
-        try
-        {
-            getData(aItem, aField, aValueCount, aDataType);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("get<datatype> threw instead of IOOBE: "
-                     + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("getData did not throw IOOBE for " + aValueCount);
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIAE(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        // 0 = BINARY, 6 = one larger than the largest data type
-        for (int i = 0; i < 6; i++)
-        {
-            boolean exceptionThrown = false;
-            try
-            {
-                getData(aItem, aField, 0, i);
-            }
-            catch (java.lang.IllegalArgumentException e)
-            {
-                exceptionThrown = true;
-            } // end of try-catch
-            catch (UnsupportedFieldException e)
-            {
-                failTest("getData threw UFE: " + e.getMessage() +
-                         ", dataType: " + i);
-            } // end of catch
-
-            catch (Throwable e)
-            {
-                failTest("getData threw instead of IAE: " + e.toString());
-            } // end of catch
-            if (!exceptionThrown)
-            {
-                failTest("getData did not throw IAE");
-            } // end of if (!exceptionThrown)
-        } // end of for (int i = 0; i < 6; i++)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, PIMList aList)
-    throws TestEndThrowable
-    {
-        int maxField = 0;
-        if (aItem instanceof Contact)
-        {
-            maxField = Contact.URL + 1;
-        }
-        if (aItem instanceof Event)
-        {
-            maxField = Event.UID + 1;
-        }
-        if (aItem instanceof ToDo)
-        {
-            maxField = ToDo.UID + 1;
-        }
-        for (int i = Contact.ADDR; i < maxField; i++)
-        {
-            if (!aList.isSupportedField(i))
-            {
-                // FIXED: do not test with illegal field data types
-                //for( int j = 0; j < 6; j++ )
-                //    {
-                boolean exceptionThrown = false;
-                try
-                {
-                    getData(aItem, i, 0, aList.getFieldDataType(i));
-                }
-                catch (UnsupportedFieldException e)
-                {
-                    exceptionThrown = true;
-                } // end of try-catch
-                catch (Throwable e)
-                {
-                    failTest("getData threw instead of UFE: "
-                             + e.toString());
-                } // end of catch
-                if (!exceptionThrown)
-                {
-                    failTest("getData did not throw UFE");
-                } // end of if (!exceptionThrown)
-                //    } // end of for (int j = 0; j < 6; j++)
-            } // end of if (!aList.isSupportedField( i ))
-        }
-    }
-
-    /**
-     * Test step s7
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        if (aItem.isModified())
-        {
-            failTest("isModified returned true");
-        } // end of if (aItem.isModified())
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIgetPIMList/PIgetPIMList.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIgetPIMList;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.getCategories(),
- * javax.microedition.pim.PIMItem.maxCategories(),
- * javax.microedition.pim.PIMItem.removeFromCategory() and
- * javax.microedition.pim.PIMItem.addToCategory()
- *
- */
-public class PIgetPIMList
-        extends MIDPTest
-{
-
-    public PIgetPIMList(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        PIMItem serialItem = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-            InputStream is = getClass().getResourceAsStream("/res/3.vcf");
-            PIMItem item[] = p.fromSerialFormat(is, "UTF-8");
-            serialItem = item[ 0 ];
-        }
-        catch (java.lang.OutOfMemoryError e)
-        {
-            failTest("preconditions threw OOME:" + e.getMessage());
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1
-        testGetPIMList(contactItems, contactLists);
-        testGetPIMList(eventItems, eventLists);
-        testGetPIMList(todoItems, todoLists);
-
-        // step s2
-        testNullList(serialItem);
-
-        // step s3
-        Contact importedContact =
-            testAddToList(serialItem, contactLists[ 0 ]);
-
-        // step s4
-        testRemoveFromList(importedContact, contactLists[ 0 ]);
-
-        // step s5
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test step s1
-     */
-    private void testGetPIMList(Enumeration[] aItems,
-                                PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetPIMList(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testGetPIMList(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            PIMList itemList = null;
-            try
-            {
-                itemList = item.getPIMList();
-            }
-            catch (Throwable e)
-            {
-                failTest("getPIMList threw: " + e.toString());
-            } // end of try-catch
-            if (aList != itemList)
-            {
-                failTest("getPIMList returned wrong list");
-            } // end of if (aList != itemList)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test step s2
-     */
-    private void testNullList(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        PIMList itemList = null;
-        try
-        {
-            itemList = aItem.getPIMList();
-        }
-        catch (Throwable e)
-        {
-            failTest("s2: getPIMList threw: " + e.toString());
-        } // end of try-catch
-        if (itemList != null)
-        {
-            failTest("getPIMList returned something when expecting null");
-        } // end of if (itemList != null)
-    }
-
-    /**
-     * Test step s3
-     */
-    private Contact testAddToList(PIMItem aItem, PIMList aList)
-    throws TestEndThrowable
-    {
-        Contact importedContact = null;
-        try
-        {
-            ContactList cList = (ContactList)aList;
-            importedContact = cList.importContact((Contact)aItem);
-            importedContact.commit();
-        }
-        catch (Throwable e)
-        {
-            failTest("importing item to a list failed: " + e.toString());
-        } // end of try-catch
-
-        PIMList itemList = null;
-        try
-        {
-            itemList = importedContact.getPIMList();
-        }
-        catch (Throwable e)
-        {
-            failTest("s3: getPIMList threw: " + e.toString());
-        } // end of try-catch
-        if (itemList != aList)
-        {
-            failTest("imported getPIMList returns wrong list");
-        } // end of if (itemList != aList)
-        return importedContact;
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testRemoveFromList(PIMItem aItem, PIMList aList)
-    throws TestEndThrowable
-    {
-        try
-        {
-            ContactList cList = (ContactList)aList;
-            cList.removeContact((Contact)aItem);
-        }
-        catch (Throwable e)
-        {
-            failTest("removing item from a list failed: " + e.toString());
-        } // end of try-catch
-
-        PIMList itemList = null;
-        try
-        {
-            itemList = aItem.getPIMList();
-        }
-        catch (Throwable e)
-        {
-            failTest("s4: getPIMList threw: " + e.toString());
-        } // end of try-catch
-        if (itemList != null)
-        {
-            failTest("removed getPIMList returns something");
-        } // end of if (itemList != aList)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIremoveValue/PIremoveValue.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIremoveValue;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.removeValue()
- */
-public class PIremoveValue
-        extends MIDPTest
-{
-
-    public PIremoveValue(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s4
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s5
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s4
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s4
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                int field = fields[ i ];
-                if ((field == Contact.UID) ||
-                        (field == Event.UID) ||
-                        (field == ToDo.UID) ||
-                        (field == Contact.REVISION) ||
-                        (field == Event.REVISION) ||
-                        (field == ToDo.REVISION))
-                {
-                    continue;
-                }
-                // test step s2
-                int valueCount = testCountValues(item, field);
-                // test step s3
-                testRemoveValue(item, field, valueCount);
-                // test step s4
-                testIsModified(item, true);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s4
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s3
-     */
-    private void testRemoveValue(PIMItem aItem, int aField, int aValues)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.removeValue(aField, aValues - 1);
-        }
-        catch (Throwable e)
-        {
-            failTest("removeValue threw: " + e.toString());
-        } // end of try-catch
-        int valueCount = testCountValues(aItem, aField);
-        if (valueCount != (aValues - 1))
-        {
-            failTest("removeValue did not decrement value count");
-        } // end of if (valueCount != ( aValues -1 ))
-    }
-
-    /**
-     * test step s2
-     */
-    private int testCountValues(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        return valueCount;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIremoveValueEx/PIremoveValueEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIremoveValueEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.EventList;
-import javax.microedition.pim.ToDoList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.removeValue()
- */
-public class PIremoveValueEx
-        extends MIDPTest
-{
-
-    public PIremoveValueEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        int unsupportedField = 0;
-        if (aList instanceof ContactList)
-        {
-            unsupportedField = 112;
-        } // end of if (aList instanceof ContactList)
-        if (aList instanceof EventList)
-        {
-            unsupportedField = 0;
-        }
-        if (aList instanceof ToDoList)
-        {
-            unsupportedField = 0;
-        }
-
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                int field = fields[ i ];
-                // test step s2
-                int valueCount = testCountValues(item, field);
-                // test step s3
-                testIOOBE(item, field, valueCount);
-                testIOOBE(item, field, -1);
-            } // end of for (int i = 0; i < fieldCount; i++)
-
-            // test step s4
-            testIAE(item, 1, 0);
-            // test step s5
-            if (unsupportedField != 0)
-                testUFE(item, unsupportedField, 0);
-            // test step s6
-            testIsModified(item, false);
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s4
-     */
-    private void testIsModified(PIMItem aItem, boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isModified returned false");
-            } // end of if (aExpected)
-            else
-            {
-                failTest("isModified returned true");
-            } // end of else
-        } // end of if (!isModified)
-    }
-
-    /**
-     * Test step s3
-     */
-    private void testIOOBE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.removeValue(aField, aIndex);
-        }
-        catch (IndexOutOfBoundsException e)
-        {
-            exceptionThrown =true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("removeValue threw instead of IOOBE: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("IOOBE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s4
-     */
-    private void testIAE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.removeValue(aField, aIndex);
-        }
-        catch (IllegalArgumentException e)
-        {
-            exceptionThrown =true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("removeValue threw instead of IAE: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("IAE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testUFE(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aItem.removeValue(aField, aIndex);
-        }
-        catch (UnsupportedFieldException e)
-        {
-            exceptionThrown =true;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("removeValue threw instead of UFE: " + e.toString());
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("UFE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * test step s2
-     */
-    private int testCountValues(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        int valueCount = 0;
-        try
-        {
-            valueCount = aItem.countValues(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("countValues threw: " + e.toString());
-        } // end of try-catch
-        return valueCount;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBinary/PIsetBinary.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,302 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetBinary;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setBinary() and
- * javax.microedition.pim.PIMItem.getBinary()
- */
-public class PIsetBinary
-        extends MIDPTest
-{
-
-    public PIsetBinary(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s7
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s8
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1 -s7
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s7
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BINARY)
-        {
-            // test step s3
-            byte[] binary = testGetBinary(aItem, aField);
-            // test step s4
-            testSetBinary(aItem, aField, binary, 0, 0);
-            // test step s5
-            // Minor deviation from test plan: isModified is not tested
-            // for each field, as the method only tests the entire item.
-            // however, we still run it only for thos items which we have
-            // changed
-            testIsModified(aItem);
-            // test step s6
-            testSetBinary(aItem, aField, binary, -1, 0);
-            // test step s7
-            testSetBinary(aItem, aField, binary, 0, binary.length - 2);
-        } // end of if (dataType = PIMItem.BINARY)
-    }
-
-    /**
-     * Test step s3
-     */
-    private byte[] testGetBinary(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        byte[] data = null;
-        try
-        {
-            data = aItem.getBinary(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBinary threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, byte[] aData)
-    throws TestEndThrowable
-    {
-        byte[] newData = null;
-        try
-        {
-            newData = aItem.getBinary(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getBinary threw:" + e.toString());
-        } // end of try-catch
-        int dataLength = aData.length;
-        if (newData.length != dataLength)
-        {
-            failTest("data has changed, datalength:" + newData.length);
-        } // end of if (newData.length != dataLength)
-        for (int i = 0; i < dataLength; i++)
-        {
-            if (newData[ i ] != aData[ i ])
-            {
-                failTest("data has changed at offset:" + i);
-            } // end of if (newData[ i ] != aData[ i ])
-        } // end of for (int i = 0; i < dataLength; i++)
-    }
-
-    /**
-     * Test steps s4,s6,s7
-     */
-    private void testSetBinary(PIMItem aItem, int aField, byte[] aData,
-                               int aAttributes, int aOffset)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setBinary(aField, 0, aAttributes, aData, aOffset,
-                            aData.length);
-        }
-        catch (Throwable e)
-        {
-            failTest("setBinary threw: " + e.toString());
-        } // end of try-catch
-        if ((aAttributes == 0) && (aOffset == 0))
-        {
-            compareData(aItem, aField, aData);
-        } // end of if (( aAttributes == 0 ) && ( aOffset == 0 ))
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBinaryEx/PIsetBinaryEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,338 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetBinaryEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setBinary() and
- * javax.microedition.pim.PIMItem.getBinary()
- */
-public class PIsetBinaryEx
-        extends MIDPTest
-{
-
-    public PIsetBinaryEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s11
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s12
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s11
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s11
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s11
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s11
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BINARY)
-        {
-            // test step s3
-            byte[] binary = testGetBinary(aItem, aField);
-            // test step s4
-            testSetBinary(aItem, aField, 0, null, binary.length, 0, 0, 1);
-            // test step s5
-            testSetBinary(aItem, 1, 0, binary, binary.length, 0, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, 0, binary, binary.length, 0, 0, 3);
-            // test step s7
-            testSetBinary(aItem, aField, -1, binary, binary.length, 0, 0, 4);
-            // test step s8
-            testSetBinary(aItem, aField, 0, binary, binary.length, 0, -1, 2);
-            testSetBinary(aItem, aField, 0, binary, binary.length, 0,
-                          binary.length, 2);
-            // test step s9
-            testSetBinary(aItem, aField, 0, binary, -1, 0, 0, 2);
-            testSetBinary(aItem, aField, 0, binary, 0, 0, 0, 2);
-            // test step s10
-            testSetBinary(aItem, aField, 0, new byte[ 0 ],
-                          binary.length, 0, 0, 2);
-
-
-            // test step s11
-            // Minor deviation from test plan: isModified is not tested
-            // for each field, as the method only tests the entire item.
-            // however, we still run it only for thos items which we have
-            // changed
-            testIsModified(aItem);
-        } // end of if (dataType = PIMItem.BINARY)
-    }
-
-    /**
-     * Test step s3
-     */
-    private byte[] testGetBinary(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        byte[] data = null;
-        try
-        {
-            data = aItem.getBinary(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBinary threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-10
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testSetBinary(PIMItem aItem, int aField, int aIndex,
-                               byte[] aData, int aDataLength,
-                               int aAttributes, int aOffset, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.setBinary(aField, aIndex, aAttributes, aData, aOffset,
-                            aDataLength);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("setBinary threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("setBinary threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField, int aIndex,
-                         byte[] aData, int aDataLength,
-                         int aAttributes, int aOffset, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 112;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testSetBinary(aItem, field, aIndex, aData, aDataLength,
-                          aAttributes, aOffset, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s11
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetBoolean/PIsetBoolean.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetBoolean;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setBoolean() and
- * javax.microedition.pim.PIMItem.getBoolean()
- */
-public class PIsetBoolean
-        extends MIDPTest
-{
-
-    public PIsetBoolean(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s6
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s6
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.BOOLEAN)
-        {
-            // test step s3
-            boolean bool = testGetBoolean(aItem, aField);
-            // test step s4
-            testSetBoolean(aItem, aField, bool, 0);
-            // test step s5
-            testIsModified(aItem);
-            // test step s6
-            testSetBoolean(aItem, aField, bool, -1);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private boolean testGetBoolean(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        boolean data = false;
-        try
-        {
-            data = aItem.getBoolean(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getBoolean threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, boolean aData)
-    throws TestEndThrowable
-    {
-        boolean newData = false;
-        try
-        {
-            newData = aItem.getBoolean(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getBoolean threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, newData: " + newData +
-                     ", oldData: " + aData);
-        }
-    }
-
-    /**
-     * Test steps s4,s6
-     */
-    private void testSetBoolean(PIMItem aItem, int aField, boolean aData,
-                                int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setBoolean(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setBoolean threw: " + e.toString());
-        } // end of try-catch
-        if (aAttributes == 0)
-        {
-            compareData(aItem, aField, aData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetDate/PIsetDate.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,296 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetDate;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setDate() and
- * javax.microedition.pim.PIMItem.getDate()
- */
-public class PIsetDate
-        extends MIDPTest
-{
-
-    public PIsetDate(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s7
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s8
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s7
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                if ((fields[ i ] == Contact.REVISION) ||
-                        (fields[ i ] == Event.REVISION) ||
-                        (fields[ i ] == ToDo.REVISION))
-                {
-                    continue;
-                }
-                // test steps s2-s7
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s7
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.DATE)
-        {
-            // test step s3
-            long date = testGetDate(aItem, aField);
-            // test step s4
-            testSetDate(aItem, aField, date, 0);
-            // test step s5
-            testIsModified(aItem);
-            // test step s6
-            testSetDate(aItem, aField, date, -1);
-            // test step s7
-            testSetDate(aItem, aField, 1, 0);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private long testGetDate(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        long data = 0;
-        try
-        {
-            data = aItem.getDate(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getDate threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, long aData)
-    throws TestEndThrowable
-    {
-        long newData = 0;
-        try
-        {
-            newData = aItem.getDate(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getDate threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, newData: " + newData +
-                     ", oldData: " + aData);
-        }
-    }
-
-    /**
-     * Test steps s4,s6,s7
-     */
-    private void testSetDate(PIMItem aItem, int aField, long aData,
-                             int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setDate(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setDate threw: " + e.toString());
-        } // end of try-catch
-        if (aAttributes == 0)
-        {
-            compareData(aItem, aField, aData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetDateEx/PIsetDateEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,327 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetDateEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setDate() and
- * javax.microedition.pim.PIMItem.getDate()
- */
-public class PIsetDateEx
-        extends MIDPTest
-{
-
-    public PIsetDateEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s8
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s9
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s8
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s8
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.DATE)
-        {
-
-            // test step s3
-            long date = testGetDate(aItem, aField);
-            if ((aField == Contact.REVISION) ||
-                    (aField == Event.REVISION) ||
-                    (aField == ToDo.REVISION))
-            {
-                testSetDate(aItem, 1, 0, date, 0, 2);
-                return;
-            }
-            // test step s4 is invalid
-            // test step s5
-            testSetDate(aItem, 1, 0, date, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, 0, date, 0, 3);
-            // test step s7
-            testSetDate(aItem, aField, -1, date, 0, 4);
-            // test step s8
-            testIsModified(aItem);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private long testGetDate(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        long data = 0;
-        try
-        {
-            data = aItem.getDate(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getDate threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-s7
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testSetDate(PIMItem aItem, int aField, int aIndex,
-                             long aData,
-                             int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.setDate(aField, aIndex, aAttributes, aData);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("setDate threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("setDate threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField, int aIndex,
-                         long aData,
-                         int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 114;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testSetDate(aItem, field, aIndex, aData,
-                        aAttributes, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetInt/PIsetInt.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetInt;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setInt() and
- * javax.microedition.pim.PIMItem.getInt()
- */
-public class PIsetInt
-        extends MIDPTest
-{
-
-    public PIsetInt(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s6
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s6
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.INT)
-        {
-            // test step s3
-            int data = testGetInt(aItem, aField);
-            // test step s4
-            testSetInt(aItem, aField, data, 0);
-            // test step s5
-            testIsModified(aItem);
-            // test step s6
-            testSetInt(aItem, aField, data, -1);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private int testGetInt(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        int data = 0;
-        try
-        {
-            data = aItem.getInt(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getInt threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, int aData)
-    throws TestEndThrowable
-    {
-        int newData = 0;
-        try
-        {
-            newData = aItem.getInt(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getInt threw:" + e.toString());
-        } // end of try-catch
-        if (newData != aData)
-        {
-            failTest("data has changed, newData: " + newData +
-                     ", oldData: " + aData);
-        }
-    }
-
-    /**
-     * Test steps s4,s6
-     */
-    private void testSetInt(PIMItem aItem, int aField, int aData,
-                            int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setInt(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setInt threw: " + e.toString());
-        } // end of try-catch
-        if (aAttributes == 0)
-        {
-            compareData(aItem, aField, aData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetString/PIsetString.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,299 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetString;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setString() and
- * javax.microedition.pim.PIMItem.getString()
- */
-public class PIsetString
-        extends MIDPTest
-{
-
-    public PIsetString(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    private static final String VERY_LONG_STRING =
-        "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s8
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s9
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s8
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s6
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s8
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING)
-        {
-            if ((aField == Contact.UID) || (aField == Event.UID))
-            {
-                return;
-            }
-            // test step s3
-            String data = testGetString(aItem, aField);
-            // test step s4
-            testSetString(aItem, aField, data, 0);
-            // test step s5
-            testIsModified(aItem);
-            // test step s6
-            testSetString(aItem, aField, data, -1);
-            // test step s7
-            testSetString(aItem, aField, "", 0);
-            // test step s8
-            testSetString(aItem, aField, VERY_LONG_STRING, 0);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private String testGetString(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String data = null;
-        try
-        {
-            data = aItem.getString(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getString threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, String aData)
-    throws TestEndThrowable
-    {
-        String newData = null;
-        try
-        {
-            newData = aItem.getString(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getString threw:" + e.toString());
-        } // end of try-catch
-        if (newData.compareTo(aData) != 0)
-        {
-            failTest("data has changed, newData: " + newData +
-                     ", oldData: " + aData);
-        }
-    }
-
-    /**
-     * Test steps s4,s6-s8
-     */
-    private void testSetString(PIMItem aItem, int aField, String aData,
-                               int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setString(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setString threw: " + e.toString());
-        } // end of try-catch
-        if (aAttributes == 0)
-        {
-            compareData(aItem, aField, aData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetStringArray/PIsetStringArray.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetStringArray;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setStringArray() and
- * javax.microedition.pim.PIMItem.getStringarray()
- */
-public class PIsetStringArray
-        extends MIDPTest
-{
-
-    public PIsetStringArray(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s6
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s7
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s6
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s6
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s6
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING_ARRAY)
-        {
-            // test step s3
-            String[] stringArray = testGetStringArray(aItem, aField);
-            // test step s4
-            testSetStringArray(aItem, aField, stringArray, 0);
-            // test step s5
-            testIsModified(aItem);
-            // test step s6
-            testSetStringArray(aItem, aField, stringArray, -1);
-        }
-    }
-
-    /**
-     * Test step s3
-     */
-    private String[] testGetStringArray(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String[] data = null;
-        try
-        {
-            data = aItem.getStringArray(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getStringArray threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    private void compareData(PIMItem aItem, int aField, String[] aData)
-    throws TestEndThrowable
-    {
-        String[] newData = null;
-        try
-        {
-            newData = aItem.getStringArray(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("S4: getStringArray threw:" + e.toString());
-        } // end of try-catch
-        int dataLength = aData.length;
-        if (newData.length != dataLength)
-        {
-            failTest("data has changed, datalength:" + newData.length);
-        } // end of if (newData.length != dataLength)
-        for (int i = 0; i < dataLength; i++)
-        {
-            if (newData[ i ] == null)
-            {
-                if (aData[ i ] == null)
-                {
-                    continue;
-                } // end of if (aData[ i ] == null)
-                else
-                {
-                    log("oldData: " + aData[ i ]);
-                    failTest("newData is null at offset: " + i);
-                } // end of else
-            } // end of if (newData[ i ] == null)
-            if (newData[ i ].compareTo(aData[ i ]) != 0)
-            {
-                log("oldData: " + aData[ i ]);
-                log("newData: " + newData[ i ]);
-                failTest("data has changed at offset:" + i);
-            } // end of if (newData[ i ] != aData[ i ])
-        } // end of for (int i = 0; i < dataLength; i++)
-    }
-
-    /**
-     * Test steps s4,s6
-     */
-    private void testSetStringArray(PIMItem aItem, int aField, String[] aData,
-                                    int aAttributes)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aItem.setStringArray(aField, 0, aAttributes, aData);
-        }
-        catch (Throwable e)
-        {
-            failTest("setStringArray threw: " + e.toString());
-        } // end of try-catch
-        if (aAttributes == 0)
-        {
-            compareData(aItem, aField, aData);
-        }
-    }
-
-    /**
-     * Test step s5
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = false;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (!isModified)
-        {
-            failTest("isModified returned false");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMItem/PIsetStringArrayEx/PIsetStringArrayEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMItem.PIsetStringArrayEx;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ContactList;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIMItem.setStringArray() and
- * javax.microedition.pim.PIMItem.getStringArray()
- */
-public class PIsetStringArrayEx
-        extends MIDPTest
-{
-
-    public PIsetStringArrayEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        Enumeration[] contactItems = null;
-        Enumeration[] eventItems = null;
-        Enumeration[] todoItems = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-            contactItems = getItems(contactLists);
-            eventItems = getItems(eventLists);
-            todoItems = getItems(todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // test steps
-        // step s1-s10
-        testGetFields(contactItems, contactLists);
-        testGetFields(eventItems, eventLists);
-        testGetFields(todoItems, todoLists);
-
-        // step s11
-        closeLists(contactLists);
-        closeLists(eventLists);
-        closeLists(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test steps s1-s10
-     */
-    private void testGetFields(Enumeration[] aItems,
-                               PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aItems.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testGetFields(aItems[ i ], aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s1-s10
-     */
-    private void testGetFields(Enumeration aItems, PIMList aList)
-    throws TestEndThrowable
-    {
-        while (aItems.hasMoreElements())
-        {
-            PIMItem item = (PIMItem)aItems.nextElement();
-            int[] fields = null;
-            try
-            {
-                fields = item.getFields();
-            }
-            catch (Throwable e)
-            {
-                failTest("getFields threw: " + e.toString());
-            } // end of try-catch
-            int fieldCount = fields.length;
-            for (int i = 0; i < fieldCount; i++)
-            {
-                // test steps s2-s10
-                testFieldDataType(item, fields[ i ], aList);
-            } // end of for (int i = 0; i < fieldCount; i++)
-        } // end of while (aItems.hasMoreElements())
-    }
-
-    /**
-     * Test steps s2-s10
-     */
-    private void testFieldDataType(PIMItem aItem, int aField, PIMList aList)
-    throws TestEndThrowable
-    {
-        int dataType = 0;
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-        }
-        catch (Throwable e)
-        {
-            failTest("getFieldDataType threw:" + e.toString());
-        } // end of try-catch
-        if (dataType == PIMItem.STRING_ARRAY)
-        {
-            // test step s3
-            String[] stringArray = testGetStringArray(aItem, aField);
-            // test step s4
-            testSetStringArray(aItem, aField, 0, null, 0, 1);
-            // test step s5
-            testSetStringArray(aItem, 1, 0, stringArray, 0, 2);
-            // test step s6
-            testUFE(aItem, aField, 0, stringArray, 0, 3);
-            // test step s7
-            testSetStringArray(aItem, aField, -1, stringArray, 0, 4);
-            // test step s8
-            testSetStringArray(aItem, aField, 0, new String[ 0 ],
-                               0, 2);
-            // test step s9
-            String[] nullArray = new String[ stringArray.length ];
-            testSetStringArray(aItem, aField, 0, nullArray, 0, 2);
-
-            // test step s10
-            testIsModified(aItem);
-        } // end of if (dataType = PIMItem.BINARY)
-    }
-
-    /**
-     * Test step s3
-     */
-    private String[] testGetStringArray(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String[] data = null;
-        try
-        {
-            data = aItem.getStringArray(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getStringArray threw: " + e.toString());
-        } // end of try-catch
-        return data;
-    }
-
-    /**
-     * Test steps s4-s9
-     * @param aExpected 1 = Null, 2 = IAE, 3 = UFE, 4 = IOOBE
-     */
-    private void testSetStringArray(PIMItem aItem, int aField, int aIndex,
-                                    String[] aData,
-                                    int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int exceptionThrown = 0;
-        try
-        {
-            aItem.setStringArray(aField, aIndex, aAttributes, aData);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = 1;
-        } // end of catch
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = 2;
-        } // end of catch
-        catch (javax.microedition.pim.UnsupportedFieldException e)
-        {
-            exceptionThrown = 3;
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            exceptionThrown = 4;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("setStringArray threw: " + e.toString());
-        } // end of try-catch
-        if (exceptionThrown != aExpected)
-        {
-            failTest("setStringArray threw " + exceptionThrown +
-                     " instead of " + aExpected);
-        } // end of if (exceptionThrown != aExpected)
-    }
-
-    /**
-     * Test step s6
-     */
-    private void testUFE(PIMItem aItem, int aField, int aIndex,
-                         String[] aData,
-                         int aAttributes, int aExpected)
-    throws TestEndThrowable
-    {
-        int field = 0;
-        if (aItem instanceof Contact)
-        {
-            field = 0;
-        } // end of if (aItem instanceof Contact)
-        if (aItem instanceof Event)
-        {
-            field = 0;
-        }
-        if (aItem instanceof ToDo)
-        {
-            field = 0;
-        }
-        if (field != 0)
-        {
-            testSetStringArray(aItem, field, aIndex, aData,
-                               aAttributes, aExpected);
-        } // end of if (field != 0)
-    }
-
-    /**
-     * Test step s10
-     */
-    private void testIsModified(PIMItem aItem)
-    throws TestEndThrowable
-    {
-        boolean isModified = true;
-        try
-        {
-            isModified = aItem.isModified();
-        }
-        catch (Throwable e)
-        {
-            failTest("isModified threw: " + e.toString());
-        } // end of try-catch
-        if (isModified)
-        {
-            failTest("isModified returned true");
-        } // end of if (!isModified)
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private Enumeration[] getItems(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        Enumeration[] items = new Enumeration[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            items[ i ] = aLists[ i ].items();
-        } // end of for (int i = 0; i < listCount; i++)
-        return items;
-    }
-
-    private void closeLists(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLConstants/PLConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList constants.
- */
-public class PLConstants
-        extends MIDPTest
-{
-
-    public PLConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        if (PIMList.UNCATEGORIZED != null)
-        {
-            failTest("PIMList.UNCATEGORIZED != null");
-        } // end of if (PIMList.UNCATEGORIZED != null)
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLaddCategory/PLaddCategory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,473 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLaddCategory;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.addCategory() and
- * javax.microedition.pim.PIMList.maxCategories()
- */
-public class PLaddCategory extends MIDPTest
-{
-
-    public PLaddCategory(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private String iTestCategoryName = "PLaddCategory";
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] cl = null;
-        PIMList[] el = null;
-        PIMList[] tl = null;
-        String[][] cc = null;
-        String[][] ec = null;
-        String[][] tc = null;
-        int[] cMax = null;
-        int[] eMax = null;
-        int[] tMax = null;
-
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            cl = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            el = openLists(p, PIM.EVENT_LIST, eventListNames);
-            tl = openLists(p, PIM.TODO_LIST, todoListNames);
-            cc = getCategories(cl);
-            ec = getCategories(el);
-            tc = getCategories(tl);
-            cMax = getMax(cl);
-            eMax = getMax(el);
-            tMax = getMax(tl);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-        // step s1
-
-        testAddCategory(cl, cc, iTestCategoryName);
-        testAddCategory(el, ec, iTestCategoryName);
-        testAddCategory(tl, tc, iTestCategoryName);
-
-        // step s2
-
-        testAddCategory(cl, cc, iTestCategoryName);
-        testAddCategory(el, ec, iTestCategoryName);
-        testAddCategory(tl, tc, iTestCategoryName);
-
-        // steps s3-s5
-
-        testMaxC(cl, cMax);
-        testMaxC(el, eMax);
-        testMaxC(tl, tMax);
-
-        // steps s6-s8
-
-        testExceptions(cl);
-        testExceptions(el);
-        testExceptions(tl);
-
-
-        passTest();
-    }
-
-    private void testGetCategories(PIMList aList, String aCategory)
-    throws TestEndThrowable
-    {
-        String[] categories = null;
-        try
-        {
-            categories = aList.getCategories();
-        }
-        catch (Throwable e)
-        {
-            failTest("getCategories threw: " + e.toString());
-        } // end of try-catch
-        int categoryCount = categories.length;
-        int foundCount = 0;
-        for (int i = 0; i < categoryCount; i++)
-        {
-            if (categories[ i ].compareTo(aCategory) == 0)
-            {
-                foundCount++;
-            } // end of if (categories[ i ].compareTo( aCategory ) == 0)
-        } // end of for (int = 0; i < categoryCount; i++)
-        if (foundCount == 0)
-        {
-            failTest("getCategories did not return: " + aCategory);
-        } // end of if (foundCount == 0)
-        if (foundCount > 1)
-        {
-            failTest("getCategories returned " + aCategory +
-                     " " + foundCount + " times");
-        } // end of if (foundCount > 1)
-    }
-
-    private String makeNewCategory(String aCategory, String[] aOldCategories)
-    {
-        int suffix = 0;
-        String newCategory = aCategory;
-        int categoryCount = aOldCategories.length;
-        while (true)
-        {
-            boolean found = false;
-            for (int i = 0; i < categoryCount; i++)
-            {
-                if (aOldCategories[ i ].compareTo(newCategory) == 0)
-                {
-                    found = true;
-                    break;
-                }
-            } // end of for (int i = 0; i < categoryCount; i++)
-            if (!found)
-            {
-                return newCategory;
-            } // end of if (!found)
-            newCategory = aCategory + suffix++;
-        } // end of while (true)
-    }
-
-    private void testAddCategory(PIMList aList, String[] aOldCategories,
-                                 String aCategory)
-    throws TestEndThrowable
-    {
-        // figure out a new category name
-        String newCategoryName = makeNewCategory(aCategory, aOldCategories);
-        try
-        {
-            aList.addCategory(newCategoryName);
-        }
-        catch (PIMException e)
-        {
-            // categories may be unsupported, which is not an error
-            int reason = e.getReason();
-            if ((reason == PIMException.FEATURE_NOT_SUPPORTED) ||
-                    (reason == PIMException.MAX_CATEGORIES_EXCEEDED))
-            {
-                return;
-            }
-            failTest("addCategory threw PIME: " + e.getMessage());
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("addCategory threw: " + e.toString());
-        } // end of try-catch
-        testGetCategories(aList, aCategory);
-    }
-
-    /**
-     * Test steps s1,s2
-     */
-    private void testAddCategory(PIMList[] aLists, String[][] aOldCategories,
-                                 String aCategory)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testAddCategory(aLists[ i ], aOldCategories[ i ], aCategory);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test steps s3-s5
-     */
-    private void testMaxC(PIMList[] aLists, int[] aMax)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testMaxC(aLists[ i ], aMax[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testMaxC(PIMList aList, int aMax)
-    throws TestEndThrowable
-    {
-
-        int categoryCount = 0;
-        try
-        {
-            String[] categories = aList.getCategories();
-
-            categoryCount = categories.length;
-        }
-        catch (Throwable e)
-        {
-            failTest("getCategories threw: " + e.toString());
-        } // end of try-catch
-        int addCount = 0;
-        if (aMax == -1)
-        {
-            addCount = 10;
-        } // end of if (aMax == -1)
-        else
-        {
-            addCount = aMax - categoryCount;
-        } // end of else
-
-        String prefix = iTestCategoryName;
-
-        String[] addedCategories = new String[ addCount ];
-        for (int i = 0; i < addCount; i++)
-        {
-            String[] categories = null;
-            try
-            {
-                categories = aList.getCategories();
-
-            }
-            catch (Throwable e)
-            {
-                failTest("getCategories threw: " + e.toString());
-            } // end of try-catch
-            String newCategoryName = makeNewCategory(prefix, categories);
-            try
-            {
-                aList.addCategory(newCategoryName);
-            }
-            catch (Throwable e)
-            {
-                failTest("addCategory threw: " + e.toString());
-            } // end of try-catch
-            addedCategories[ i ] = newCategoryName;
-        } // end of for (int i = 0; i < addCount; i++)
-
-        // step s4
-        if (aMax != -1)
-        {
-            String[] categories = null;
-            try
-            {
-                categories = aList.getCategories();
-            }
-            catch (Throwable e)
-            {
-                failTest("getCategories threw: " + e.toString());
-            }
-            String newCategoryName = makeNewCategory(prefix, categories);
-            testPIME(aList, newCategoryName);
-        } // end of if (aMax != -1)
-
-        // step s5
-        for (int i = 0; i < addCount; i++)
-        {
-            try
-            {
-                aList.deleteCategory(addedCategories[ i ], false);
-            }
-            catch (Throwable e)
-            {
-                failTest("deleteCategory threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < addCount; i++)
-
-    }
-
-    /**
-     * test step s4
-     */
-    private void testPIME(PIMList aList, String aCategory)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.addCategory(aCategory);
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("PIMException not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * test step s6-s8
-     */
-    private void testExceptions(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testInvalid(aLists[ i ]);
-            testNull(aLists[ i ]);
-            testClose(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testInvalid(PIMList aList)
-    throws TestEndThrowable
-    {
-        tryInvalid(aList, "");
-        tryInvalid(aList, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
-        tryInvalid(aList, "\b\t\n\f\r");
-    }
-
-    private void tryInvalid(PIMList aList, String aCategory)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.addCategory(aCategory);
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("addCategory threw: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            try
-            {
-                aList.deleteCategory(aCategory, false);
-            }
-            catch (Throwable e)
-            {
-                failTest("deleteCategory threw: " + e.toString());
-            } // end of try-catch
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s7
-     */
-    private void testNull(PIMList aList)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.addCategory(null);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not NPE: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("NullPointer not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * Test step s8
-     */
-    private void testClose(PIMList aList)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aList.close();
-        }
-        catch (Throwable e)
-        {
-            failTest("close threw: " + e.toString());
-        } // end of try-catch
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.addCategory("test");
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("not PIME: " + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("PIMException not thrown for closed list");
-        } // end of if (!exceptionThrown)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private String[][] getCategories(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        String[][] categories = new String[ listCount ][];
-        for (int i = 0; i < listCount; i++)
-        {
-            categories[ i ] = aLists[ i ].getCategories();
-        } // end of for (int = 0; i < listCount; i++)
-        return categories;
-    }
-
-    private int[] getMax(PIMList[] aLists)
-    {
-        int listCount = aLists.length;
-        int[] maxC = new int[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            maxC[ i ] = aLists[ i ].maxCategories();
-        } // end of for (int = 0; i < listCount; i++)
-        return maxC;
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLattributes/PLattributes.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,534 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLattributes;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.items()
- */
-public class PLattributes
-        extends MIDPTest
-{
-
-    public PLattributes(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // PIMItem.ATTR_NONE is not tested because it is not clear should it be returned
-    // by getSupportedAttributes() and what isSupportedAttribute() should return.
-    private int[] contactAttributes =
-    {
-        Contact.ATTR_ASST, Contact.ATTR_AUTO, Contact.ATTR_FAX,
-        Contact.ATTR_HOME, Contact.ATTR_MOBILE, Contact.ATTR_OTHER,
-        Contact.ATTR_PAGER, Contact.ATTR_PREFERRED, Contact.ATTR_SMS,
-        Contact.ATTR_WORK
-    };
-    private int[] eventAttributes = { };
-    private int[] todoAttributes = { };
-
-    private int[] contactFields = { Contact.ADDR, Contact.BIRTHDAY, Contact.CLASS,
-                                    Contact.EMAIL, Contact.FORMATTED_ADDR, Contact.FORMATTED_NAME,
-                                    Contact.NAME, Contact.NICKNAME, Contact.NOTE, Contact.ORG,
-                                    Contact.PHOTO, Contact.PHOTO_URL, Contact.PUBLIC_KEY,
-                                    Contact.PUBLIC_KEY_STRING, Contact.REVISION, Contact.TEL,
-                                    Contact.TITLE, Contact.UID, Contact.URL
-                                  };
-    private int[] eventFields = { Event.ALARM, Event.CLASS, Event.END,
-                                  Event.LOCATION, Event.NOTE, Event.REVISION, Event.START,
-                                  Event.SUMMARY, Event.UID
-                                };
-    private int[] todoFields = { ToDo.CLASS, ToDo.COMPLETED, ToDo.COMPLETION_DATE,
-                                 ToDo.DUE, ToDo.NOTE, ToDo.PRIORITY, ToDo.REVISION,
-                                 ToDo.SUMMARY, ToDo.UID
-                               };
-
-    private int[] invalidFields = { -100, -1, 0, 666, 2147483647 };
-    private int[] invalidAttributes = { -100, -1, 2147483647 };
-
-    private Hashtable supportedFields = new Hashtable();
-    private Hashtable unsupportedFields = new Hashtable();
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-        classifyFields(allLists);
-
-        // Test steps
-        // step s1-s4
-        testAttributes(allLists);
-
-        // step s5
-        testAttributesUnsupportedFields(allLists);
-
-        // step s6
-        testAttributesIllegalFields(allLists);
-
-        // step s7 & 8
-        testIsSupportedFalse(allLists);
-
-        // step 9
-        testGetAttributeLabelUFExceptions(allLists);
-
-        // step 10
-        testGetAttributeLabelIAExceptions(allLists);
-
-        // step s11
-        closeLists(allLists);
-
-        passTest();
-    }
-
-    private void classifyFields(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i=0; i < lists.length; i++)
-        {
-            try
-            {
-                int[] fields = lists[i].getSupportedFields();
-                String name = lists[i].getName();
-                supportedFields.put(name, fields);
-
-                log("supported fields for '"+name+"': "+ asString(fields));
-
-                int[] tmpFields = null;
-                if (lists[i] instanceof ContactList)
-                {
-                    tmpFields = valuesNotInSecondList(contactFields, fields);
-                }
-                else if (lists[i] instanceof EventList)
-                {
-                    tmpFields = valuesNotInSecondList(eventFields, fields);
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    tmpFields = valuesNotInSecondList(todoFields, fields);
-                }
-                unsupportedFields.put(lists[i].getName(), tmpFields);
-
-                log("unsupported fields for '"+name+"': "+ asString(tmpFields));
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while classifying fields: " + ex);
-            }
-        }
-    }
-
-    private String asString(int[] values)
-    {
-        String ret = "";
-        for (int i=0; i < values.length-1; i++)
-        {
-            ret += values[i] +", ";
-        }
-        if (values.length > 0)
-        {
-            ret += values[values.length-1];
-        }
-        return ret;
-    }
-
-    // returns array containing those values in the first list
-    // that are not contained in the  second list
-    private int[] valuesNotInSecondList(int[] first, int[] second)
-    {
-        int[] ret = new int[ first.length ];
-        int index = 0;
-
-        for (int i=0; i<first.length; i++)
-        {
-            boolean found = false;
-            for (int j=0; j<second.length; j++)
-            {
-                if (first[i] == second[j])
-                {
-                    found = true;
-                }
-            }
-            if (!found)
-            {
-                ret[index++] = first[i];
-            }
-        }
-
-        // remove empty space from the array
-        int[] ret2 = new int[ index ];
-        for (int i=0; i<ret2.length; i++)
-        {
-            ret2[i] = ret[i];
-        }
-        return ret2;
-    }
-
-    private void testGetAttributeLabelUFExceptions(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // get attributes supported in this list
-            Vector supported = new Vector();
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                int[] attributes = lists[i].getSupportedAttributes(fields[j]);
-                addAttributesTo(attributes, supported);
-            }
-            //test that no exception is thrown for supported attributes
-            for (int j = 0; j<supported.size(); j++)
-            {
-                Integer tmp = (Integer)supported.elementAt(j);
-                try
-                {
-                    lists[i].getAttributeLabel(tmp.intValue());
-                }
-                catch (Exception e)
-                {
-                    failTest("getAttributeLabel(supported) threw: " + e);
-                }
-            }
-
-            // get those attributes that are not supported
-            Vector unsupported = new Vector();
-            int[] attributes = null;
-            if (lists[i] instanceof ContactList)
-            {
-                attributes = contactAttributes;
-            }
-            else if (lists[i] instanceof EventList)
-            {
-                attributes = eventAttributes;
-            }
-            else if (lists[i] instanceof ToDoList)
-            {
-                attributes = todoAttributes;
-            }
-            // add all possible attributes...
-            for (int j=0; j< attributes.length; j++)
-            {
-                unsupported.addElement(new Integer(attributes[j]));
-            }
-            // ...remove those that are supported.
-            for (int j=0; j< supported.size(); j++)
-            {
-                if (unsupported.contains((Integer)supported.elementAt(j)))
-                {
-                    unsupported.removeElement((Integer)supported.elementAt(j));
-                }
-            }
-            //test that UnsupportedFieldException is thrown for unsupported attributes
-            for (int j = 0; j<unsupported.size(); j++)
-            {
-                Integer tmp = (Integer)unsupported.elementAt(j);
-                try
-                {
-                    lists[i].getAttributeLabel(tmp.intValue());
-                    failTest("getAttributeLabel(unsupported) did not throw UnsupportedFieldException!");
-                }
-                catch (UnsupportedFieldException ufe)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest("getAttributeLabel(unsupported) threw: " + e);
-                }
-            }
-        }
-    }
-
-    private void addAttributesTo(int[] attributes, Vector v)
-    {
-        for (int i=0; i < attributes.length; i++)
-        {
-            Integer tmp = new Integer(attributes[i]);
-            if (!v.contains(tmp))
-            {
-                v.addElement(tmp);
-            }
-        }
-    }
-
-    private void testGetAttributeLabelIAExceptions(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test invalid attributes first
-            int[] attributes = null;
-            if (lists[i] instanceof ContactList)
-            {
-                attributes = contactAttributes;
-            }
-            else if (lists[i] instanceof EventList)
-            {
-                attributes = eventAttributes;
-            }
-            else if (lists[i] instanceof ToDoList)
-            {
-                attributes = todoAttributes;
-            }
-            for (int j = -100; (j < 5000) && (j < PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE); j++)
-            {
-                boolean found = false;
-                for (int k=0; k< attributes.length; k++)
-                {
-                    if (j == attributes[k])
-                    {
-                        found = true;
-                    }
-                }
-                // do not test valid values
-                if (!found)
-                {
-                    try
-                    {
-                        lists[i].getAttributeLabel(j);
-                        log("List: "+lists[i].getName()+", attribute: "+j);
-                        failTest("getAttributeLabel(<invalid>) did not throw IllegalArgumentException!");
-                    }
-                    catch (IllegalArgumentException iae)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest("getAttributeLabel(<invalid>) did not throw IllegalArgumentException but: " + e);
-                    }
-                }
-            }
-        }
-    }
-
-    private void testIsSupportedFalse(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            try
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    //test first with valid field but unsupported attribute
-                    int[] attributes = lists[i].getSupportedAttributes(fields[j]);
-
-                    int[] unsupportedAttributes = null;
-                    if (lists[i] instanceof ContactList)
-                    {
-                        unsupportedAttributes = valuesNotInSecondList(contactAttributes, attributes);
-                    }
-                    else if (lists[i] instanceof EventList)
-                    {
-                        unsupportedAttributes = valuesNotInSecondList(eventAttributes, attributes);
-                    }
-                    else if (lists[i] instanceof ToDoList)
-                    {
-                        unsupportedAttributes = valuesNotInSecondList(todoAttributes, attributes);
-                    }
-
-                    for (int k = 0; k < unsupportedAttributes.length; k++)
-                    {
-                        if (lists[i].isSupportedAttribute(fields[j], unsupportedAttributes[k]))
-                        {
-                            log("List: "+lists[i].getName()+", Field: "+fields[j]+", attribute: "+unsupportedAttributes[k]);
-                            failTest("isSupportedAttribute() returned true for valid field & unsupported attribute.");
-                        }
-                    }
-                    //test also with valid field but invalid attribute
-                    for (int k = 0; k < invalidAttributes.length; k++)
-                    {
-                        if (lists[i].isSupportedAttribute(fields[j], invalidAttributes[k]))
-                        {
-                            failTest("isSupportedAttribute() returned true for valid field & invalid attribute ");
-                        }
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while testing isSupported(): " + ex);
-            }
-        }
-    }
-
-    private void testAttributesUnsupportedFields(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            int[] fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                try
-                {
-                    int[] attributes = lists[i].getSupportedAttributes(fields[j]);
-                    failTest("No exception was thrown for PIMList.getSupportedAttributes(<unsupportedfield>)");
-                }
-                catch (UnsupportedFieldException ufe)
-                {
-                    // ok
-                }
-                catch (Exception ex)
-                {
-                    log("list: "+lists[i].getName()+", field: "+fields[j]);
-                    failTest("UnsupportedFieldException not thrown but: " + ex);
-                }
-            }
-        }
-    }
-
-    private void testAttributesIllegalFields(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                try
-                {
-                    int[] attributes = lists[i].getSupportedAttributes(invalidFields[j]);
-                    failTest("No exception was thrown for PIMList.getSupportedAttributes(<invalidfield>)");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    // ok
-                }
-                catch (Exception ex)
-                {
-                    failTest("IllegalArgumentException not thrown but: " + ex);
-                }
-            }
-        }
-    }
-
-    private void testAttributes(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            try
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-                for (int j = 0; j<fields.length; j++)
-                {
-                    int[] attributes = lists[i].getSupportedAttributes(fields[j]);
-                    for (int k = 0; k<attributes.length; k++)
-                    {
-
-                        if (!lists[i].isSupportedAttribute(fields[j], attributes[k]))
-                        {
-                            failTest("PIMList.isSupportedAttribute("+fields[j]+", "+
-                                     attributes[k]+") failed for list "+lists[i].getName());
-                        }
-                        String label = lists[i].getAttributeLabel(attributes[k]);
-                        if (label == null)
-                        {
-                            failTest("PIMList.getAttributeLabel("+ attributes[k] +
-                                     ") returned null label for list "+lists[i].getName());
-                        }
-                        else if (label.length() == 0)
-                        {
-                            failTest("PIMList.getAttributeLabel(" + attributes[k] +
-                                     ") returned empty label for list " + lists[i].getName());
-                        }
-                        log(lists[i].getName()+".field:(" + fields[j] +
-                            "), attribute "+attributes[k]+" label: "+label);
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while testing attributes: " + ex);
-            }
-        }
-    }
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws PIMException
-    {
-        PIMList[] pimLists = new PIMList[ aNames.length ];
-        for (int i = 0; i < aNames.length; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode, aNames[ i ]);
-        }
-        return pimLists;
-    }
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLclose/PLclose.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLclose;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.close()
- */
-public class PLclose
-        extends MIDPTest
-{
-
-    public PLclose(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-        // step s1
-        testClose(contactLists);
-        testClose(eventLists);
-        testClose(todoLists);
-
-        // step s2
-        testPIME(contactLists);
-        testPIME(eventLists);
-        testPIME(todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test step s1
-     */
-    private void testClose(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * Test step s2
-     */
-    private void testPIME(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            boolean exceptionThrown = false;
-            try
-            {
-                aLists[ i ].close();
-            }
-            catch (PIMException e)
-            {
-                exceptionThrown = true;
-            } // end of catch
-            catch (Throwable e)
-            {
-                failTest("close threw: " + e.toString());
-            } // end of try-catch
-            if (!exceptionThrown)
-            {
-                failTest("PIMException not thrown");
-            } // end of if (!exceptionThrown)
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLdeleteCategory/PLdeleteCategory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,521 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLdeleteCategory;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.deleteCategory()
- */
-public class PLdeleteCategory extends MIDPTest
-{
-
-    public PLdeleteCategory(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private Hashtable categories = new Hashtable();
-    private Hashtable newItems1 = new Hashtable();
-    private Hashtable newItems2 = new Hashtable();
-    private String[] testCategories = { "test1", "test2", "test3", "test4" };
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-
-        if (allLists.length > 0)
-        {
-            // test step 1
-            addNewCategories(allLists);
-
-            // test step 2
-            addNewItems(allLists);
-
-            // test step 3
-            testDeleteCategory(0, allLists, false, false);
-
-            // test step 4
-            testDeleteCategory(1, allLists, true, false);
-
-            // test step 5
-            testDeleteCategory(2, allLists, true, true);
-
-            // test step 6
-            testDeleteCategory2(3, allLists, false, false);
-            removeAddedItems(allLists);
-        }
-        // test step 7, 8, 9
-        testExceptions(allLists);
-
-        passTest();
-    }
-
-    private void testExceptions(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test invalid parameter
-            if (lists[i].maxCategories() == 0)
-            {
-                try
-                {
-                    lists[i].deleteCategory("gawuoeagsoufso", true);
-                    failTest("deleteCategory(<non-existing>, true) did not throw PIMException, even though categories are not supported by list.");
-                }
-                catch (PIMException pime)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest("categories are not supported by list and deleteCategory(<non-existing>, true) threw : "+e);
-                }
-            }
-            else
-            {
-                try
-                {
-                    lists[i].deleteCategory("gawuoeagsoufso", true);
-                }
-                catch (Exception e)
-                {
-                    failTest("deleteCategory(<non-existing>, true) threw : "+e);
-                }
-            }
-            // test null parameter
-            try
-            {
-                lists[i].deleteCategory(null, true);
-                failTest("deleteCategory(null, true) did not throw NullPointerException.");
-            }
-            catch (NullPointerException npe)
-            {
-                //ok
-            }
-            catch (Exception e)
-            {
-                failTest("deleteCategory(<null>, true) threw : "+e);
-            }
-
-            // close list
-            try
-            {
-                lists[i].close();
-            }
-            catch (Exception e)
-            {
-                failTest("Error while closing list: " +e);
-            }
-
-            // test closed list parameter
-            try
-            {
-                lists[i].deleteCategory("oguguo", true);
-                failTest("<closed list>.deleteCategory(name, true) did not throw PIMException.");
-            }
-            catch (PIMException npe)
-            {
-                //ok
-            }
-            catch (Exception e)
-            {
-                failTest("<closed list>.deleteCategory(name, true) threw : "+e);
-            }
-        }
-    }
-
-    private void removeAddedItems(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                if (lists[i] instanceof EventList)
-                {
-                    ((EventList)lists[i]).removeEvent((Event)newItems2.get(lists[i]));
-                }
-                else if (lists[i] instanceof ContactList)
-                {
-                    ((ContactList)lists[i]).removeContact((Contact)newItems2.get(lists[i]));
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    ((ToDoList)lists[i]).removeToDo((ToDo)newItems2.get(lists[i]));
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while removing added items from list: "+e);
-        }
-    }
-
-    private void testDeleteCategory2(int index, PIMList[] lists, boolean delUnassigned, boolean shouldBeDeleted) throws TestEndThrowable
-    {
-        String cat = testCategories[index];
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                log("itemcount before: "+ itemCount(lists[i]));
-                lists[i].deleteCategory(cat, delUnassigned);
-                log("itemcount after: "+ itemCount(lists[i]));
-
-                String[] cats = lists[i].getCategories();
-                if (find(cats, cat))
-                {
-                    failTest("Category: "+cat+" was not delete from list "+ lists[i].getName());
-                }
-                PIMItem item = (PIMItem) newItems2.get(lists[i]);
-                // test if item is still in list
-                boolean found = find(lists[i], item);
-                if (found == shouldBeDeleted)
-                {
-                    if (shouldBeDeleted)
-                    {
-                        failTest("Item2 was NOT removed from the list when category was deleted!");
-                    }
-                    failTest("Item2 was removed from the list when category was deleted!");
-                }
-
-                if (find(lists[i], item, cat))
-                {
-                    failTest("Category: "+cat+" was deleted from list "+ lists[i].getName() +
-                             ", but item2 "+item+" is still associated with category.");
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while testing deleteCategory(): "+e);
-        }
-    }
-
-    private void testDeleteCategory(int index, PIMList[] lists, boolean delUnassigned, boolean shouldBeDeleted) throws TestEndThrowable
-    {
-        String cat = testCategories[index];
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].deleteCategory(cat, delUnassigned);
-
-                String[] cats = lists[i].getCategories();
-                if (find(cats, cat))
-                {
-                    failTest("Category: "+cat+" was not delete from list "+ lists[i].getName());
-                }
-                PIMItem item = (PIMItem) newItems1.get(lists[i]);
-                // test if item is still in list
-                if (find(lists[i], item) == shouldBeDeleted)
-                {
-                    if (shouldBeDeleted)
-                    {
-                        failTest("Item1 was NOT removed from the list when category was deleted!");
-                    }
-                    failTest("Item1 was removed from the list when category was deleted!");
-                }
-
-                if (find(lists[i], item, cat))
-                {
-                    failTest("Category: "+cat+" was deleted from list "+ lists[i].getName() +
-                             ", but item1 "+item+" is still associated with category.");
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while testing deleteCategory(): "+e);
-        }
-    }
-    private int itemCount(PIMList list) throws TestEndThrowable
-    {
-        int count = 0;
-        try
-        {
-            Enumeration items = list.items();
-            while (items.hasMoreElements())
-            {
-                PIMItem tmp = (PIMItem) items.nextElement();
-                count++;
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error counting items in list: "+e);
-        }
-        return count;
-    }
-
-    private boolean find(PIMList list, PIMItem item, String category) throws TestEndThrowable
-    {
-        try
-        {
-            Enumeration items = list.items(item);
-            while (items.hasMoreElements())
-            {
-                PIMItem tmp = (PIMItem) items.nextElement();
-                String[] cats = tmp.getCategories();
-                if (find(cats, category))
-                {
-                    return true;
-                }
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return false;
-        }
-        catch (Exception e)
-        {
-            failTest("Error finding item: "+e);
-        }
-        return false;
-    }
-
-    private boolean find(PIMList list, PIMItem item) throws TestEndThrowable
-    {
-        try
-        {
-            Enumeration items = list.items(item);
-            if (items.hasMoreElements())
-            {
-                return true;
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return false;
-        }
-        catch (Exception e)
-        {
-            failTest("Error finding item: "+e);
-        }
-        return false;
-    }
-
-    private boolean find(String[] array, String item)
-    {
-        for (int i = 0; i < array.length; i++)
-        {
-            if (item.equals(array[i]))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void addNewItems(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                if (lists[i] instanceof EventList)
-                {
-                    Event e1 = ((EventList)lists[i]).createEvent();
-                    e1.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "test1");
-                    e1.addDate(Event.START, PIMItem.ATTR_NONE, 1010101010L);
-                    e1.addToCategory(testCategories[0]);
-                    e1.addToCategory(testCategories[1]);
-                    e1.addToCategory(testCategories[2]);
-                    e1.commit();
-                    newItems1.put(lists[i], e1);
-
-                    Event e2 = ((EventList)lists[i]).createEvent();
-                    e2.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "test2");
-                    e2.addDate(Event.START, PIMItem.ATTR_NONE, 1010101010L);
-                    e2.addToCategory(testCategories[3]);
-                    e2.commit();
-                    newItems2.put(lists[i], e2);
-                }
-                else if (lists[i] instanceof ContactList)
-                {
-                    Contact c1 = ((ContactList)lists[i]).createContact();
-                    c1.addString(Contact.EMAIL, PIMItem.ATTR_NONE, "test1");
-                    c1.addToCategory(testCategories[0]);
-                    c1.addToCategory(testCategories[1]);
-                    c1.addToCategory(testCategories[2]);
-                    c1.commit();
-                    newItems1.put(lists[i], c1);
-
-                    Contact c2 = ((ContactList)lists[i]).createContact();
-                    c2.addString(Contact.EMAIL, PIMItem.ATTR_NONE, "test2");
-                    c2.addToCategory(testCategories[3]);
-                    c2.commit();
-                    newItems2.put(lists[i], c2);
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    ToDo t1 = ((ToDoList)lists[i]).createToDo();
-                    t1.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "test1");
-                    t1.addToCategory(testCategories[0]);
-                    t1.addToCategory(testCategories[1]);
-                    t1.addToCategory(testCategories[2]);
-                    t1.commit();
-                    newItems1.put(lists[i], t1);
-
-                    ToDo t2 = ((ToDoList)lists[i]).createToDo();
-                    t2.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "test2");
-                    t2.addToCategory(testCategories[3]);
-                    t2.commit();
-                    newItems2.put(lists[i], t2);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while adding new items to lists: "+e);
-        }
-    }
-
-    private void addNewCategories(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int max1 = lists[i].maxCategories();
-                for (int j = 0; j < testCategories.length; j++)
-                {
-                    lists[i].addCategory(testCategories[j]);
-                }
-                int max2 = lists[i].maxCategories();
-                if (max2 != -1 && (max2-max1 != 4))
-                {
-                    log("max categories before adding: "+max1+", after adding: "+max2);
-                    failTest("error while adding new categories to lists.");
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("error while adding new categories to lists: "+e);
-        }
-    }
-
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws TestEndThrowable
-    {
-        Vector v = new Vector();
-        for (int i = 0; i < aNames.length; i++)
-        {
-            PIMList pl = null;
-            try
-            {
-                pl = aP.openPIMList(aListType, aMode, aNames[ i ]);
-                String[] names = pl.getCategories();
-                int max = pl.maxCategories();
-                if (max > -1 && (max-names.length < 4))
-                {
-                    log(pl.getName() + " cannot be tested. Too few categories ("+max+") left.");
-                    pl.close();
-                }
-                else if (max < -1)
-                {
-                    failTest(pl.getName() +".maxCategories() returned "+max+"!");
-                }
-                else
-                {
-                    log(pl.getName()+ " can be tested. Max categories = "+max+".");
-                    categories.put(pl.getName(), names);
-                    v.addElement(pl);
-                }
-            }
-            catch (Exception e)
-            {
-                failTest("error while opening lists: "+e);
-            }
-        }
-        PIMList[] pimLists = new PIMList[ v.size()];
-        for (int i = 0; i < v.size(); i++)
-        {
-            pimLists[i] = (PIMList) v.elementAt(i);
-        }
-        return pimLists;
-    }
-
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLfields/PLfields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,561 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLfields;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList
- *
- */
-public class PLfields
-        extends MIDPTest
-{
-
-    public PLfields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private int[] contactFields = { Contact.ADDR,
-                                    Contact.BIRTHDAY,
-                                    Contact.CLASS,
-                                    Contact.EMAIL,
-                                    Contact.FORMATTED_ADDR,
-                                    Contact.FORMATTED_NAME,
-                                    Contact.NAME,
-                                    Contact.NICKNAME,
-                                    Contact.NOTE,
-                                    Contact.ORG,
-                                    Contact.PHOTO,
-                                    Contact.PHOTO_URL,
-                                    Contact.PUBLIC_KEY,
-                                    Contact.PUBLIC_KEY_STRING,
-                                    Contact.REVISION,
-                                    Contact.TEL,
-                                    Contact.TITLE,
-                                    Contact.UID,
-                                    Contact.URL,
-                                    0x1005001,  // Extended fiels
-                                    0x1005002,
-                                    0x1005003,
-                                    0x1005004,
-                                    0x1005005,
-                                    0x1005006,
-                                    0x1005007,
-                                    0x1005008,
-                                    0x1005009,
-                                    0x100500A,
-                                    0x100500B
-                                  };
-
-    private int[] eventFields = { Event.ALARM,
-                                  Event.CLASS,
-                                  Event.END,
-                                  Event.LOCATION,
-                                  Event.NOTE,
-                                  Event.REVISION,
-                                  Event.START,
-                                  Event.SUMMARY,
-                                  Event.UID
-                                };
-
-    private int[] todoFields = { ToDo.CLASS,
-                                 ToDo.COMPLETED,
-                                 ToDo.COMPLETION_DATE,
-                                 ToDo.DUE,
-                                 ToDo.NOTE,
-                                 ToDo.PRIORITY,
-                                 ToDo.REVISION,
-                                 ToDo.SUMMARY,
-                                 ToDo.UID,
-                                 0x1005001  // Extended fiels
-                               };
-
-    private int[] invalidFields = { -100, -1, 0, 666, 2147483647 };
-
-    private Hashtable supportedFields = new Hashtable();
-    private Hashtable unsupportedFields = new Hashtable();
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-        // test step 1
-        classifyFields(allLists);
-
-        // Test steps 2 & 3
-        log("Testing field support");
-        testIsSupportedField(allLists);
-
-        // Test steps 4
-        log("Testing field maxValues");
-        testMaxValues(allLists);
-
-        // Test steps 5, 6, 7
-        log("Testing field labels");
-        testGetFieldLabel(allLists);
-
-        // test steps 8, 9, 10
-        log("Testing field data types");
-        testGetFieldDatatype(allLists);
-
-        closeLists(allLists);
-
-        passTest();
-    }
-
-    private void testGetFieldDatatype(PIMList[] lists) throws TestEndThrowable
-    {
-        // first test for fields that are supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    int dtype = lists[i].getFieldDataType(fields[j]);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling getFieldDataType(<supportedfield>): " + e);
-        }
-
-        // test also fields that are not supported
-        for (int i = 0; i < lists.length; i++)
-        {
-            int[] fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                try
-                {
-                    int dtype = lists[i].getFieldDataType(fields[j]);
-                    failTest(lists[i].getName()+".getFieldDataType(" + fields[j] +
-                             ") returned "+dtype+". Field not supported and should throw UFE.");
-                }
-                catch (UnsupportedFieldException ufe)
-                {
-                    // ok
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    // ok
-                }
-                catch (Exception e)
-                {
-                    failTest("Error while calling getFieldDatatype(<unsupportedfield>): " + e);
-                }
-            }
-        }
-
-        // test also invalid fields
-        for (int i = 0; i < lists.length; i++)
-        {
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                try
-                {
-                    int dtype = lists[i].getFieldDataType(invalidFields[j]);
-                    failTest(lists[i].getName()+".getFieldDataType(" + invalidFields[j] +
-                             ") returned "+dtype+". Field is invalid and should throw IAE.");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest("Error while calling getFieldDataType(<invalidfield>): " + e);
-                }
-            }
-        }
-    }
-
-    private void testGetFieldLabel(PIMList[] lists) throws TestEndThrowable
-    {
-        // first test for fields that are supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    log("Testing: " + lists[i].getName()+".field:(" + fields[j] +")");
-                    String label = lists[i].getFieldLabel(fields[j]);
-                    log(lists[i].getName()+".field:(" + fields[j] +") has label: "+label);
-                    if (label == null || label.length() < 1)
-                    {
-                        failTest(lists[i].getName()+".getFieldLabel(" + fields[j] +") returned null/empty String");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling getFieldLabel(<supportedfield>): " + e);
-        }
-
-        // test also fields that are not supported
-        for (int i = 0; i < lists.length; i++)
-        {
-            int[] fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                try
-                {
-                    log("Testing: " + lists[i].getName()+".field:(" + fields[j] +")");
-                    String label = lists[i].getFieldLabel(fields[j]);
-                    failTest(lists[i].getName()+".getFieldLabel(" + fields[j] +
-                             ") returned "+label+". Rield is not supported. Should throw UFE.");
-                }
-                catch (UnsupportedFieldException ufe)
-                {
-                    // ok
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    // ok
-                }
-                catch (Exception e)
-                {
-                    failTest("Error while calling getFieldLabel(<unsupportedfield>): " + e);
-                }
-            }
-        }
-
-        // test also invalid fields
-        for (int i = 0; i < lists.length; i++)
-        {
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                try
-                {
-                    String label = lists[i].getFieldLabel(invalidFields[j]);
-                    failTest(lists[i].getName()+".getFieldLabel(" + invalidFields[j] +
-                             ") returned "+label+", even though the field is invalid and should throw IAE.");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest("Error while calling getFieldLabel(<invalidfield>): " + e);
-                }
-            }
-        }
-    }
-
-    private void testMaxValues(PIMList[] lists) throws TestEndThrowable
-    {
-        // first test for fields that are supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    int val = lists[i].maxValues(fields[j]);
-                    if (val < -1 || val == 0)
-                    {
-                        failTest(lists[i].getName()+".maxValue(" + fields[j] +") returned "+val);
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling maxValue(<supportedfield>): " + e);
-        }
-
-        // test also fields that are not supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    int val = lists[i].maxValues(fields[j]);
-                    if (val != 0)
-                    {
-                        failTest(lists[i].getName()+".maxValue(" + fields[j] +
-                                 ") returned "+val+", even though the field is not supported and should return 0.");
-                    }
-                }
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // Ok
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling maxValue(<unsupportedfield>): " + e);
-        }
-
-        // test also invalid fields
-        for (int i = 0; i < lists.length; i++)
-        {
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                try
-                {
-                    int val = lists[i].maxValues(invalidFields[j]);
-                    failTest(lists[i].getName()+".maxValue(" + invalidFields[j] +
-                             ") returned "+val+", even though it should throw IAE!");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest("Error while calling maxValue(<invalidfield>): " + e);
-                }
-            }
-        }
-    }
-
-
-    private void testIsSupportedField(PIMList[] lists) throws TestEndThrowable
-    {
-        // first test for fields that are supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    if (!lists[i].isSupportedField(fields[j]))
-                    {
-                        failTest(lists[i].getName()+".isSupportedField(" + fields[j] +
-                                 ") returned false, even though .getSupportedFields() returned it.");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling isSupportedField(<supportedfield>): " + e);
-        }
-
-        // test also fields that are not supported
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int[] fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-                for (int j = 0; j<fields.length; j++)
-                {
-                    if (lists[i].isSupportedField(fields[j]))
-                    {
-                        failTest(lists[i].getName()+".isSupportedField(" + fields[j] +
-                                 ") returned true, even though .getSupportedFields() did not return it.");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling isSupportedField(<unsupportedfield>): " + e);
-        }
-
-        // test also invalid fields
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                for (int j = 0; j<invalidFields.length; j++)
-                {
-                    if (lists[i].isSupportedField(invalidFields[j]))
-                    {
-                        failTest(lists[i].getName()+".isSupportedField(" + invalidFields[j] +
-                                 ") returned true, even though .getSupportedFields() did not return it.");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while calling isSupportedField(<invalidfield>): " + e);
-        }
-    }
-
-    private void classifyFields(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i=0; i < lists.length; i++)
-        {
-            try
-            {
-                int[] fields = lists[i].getSupportedFields();
-                String name = lists[i].getName();
-                supportedFields.put(name, fields);
-
-                log("supported fields for list '"+name+"': "+ asString(fields));
-
-                int[] tmpFields = null;
-                if (lists[i] instanceof ContactList)
-                {
-                    tmpFields = valuesNotInSecondList(contactFields, fields);
-                }
-                else if (lists[i] instanceof EventList)
-                {
-                    tmpFields = valuesNotInSecondList(eventFields, fields);
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    tmpFields = valuesNotInSecondList(todoFields, fields);
-                }
-                unsupportedFields.put(lists[i].getName(), tmpFields);
-
-                log("unsupported fields for list '"+name+"': "+ asString(tmpFields));
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while classifying fields: " + ex);
-            }
-        }
-    }
-
-    private String asString(int[] values)
-    {
-        String ret = "";
-        for (int i=0; i < values.length-1; i++)
-        {
-            ret += values[i] +", ";
-        }
-        if (values.length > 0)
-        {
-            ret += values[values.length-1];
-        }
-        return ret;
-    }
-    // returns array containing those values in the first list
-    // that are not contained in the  second list
-    private int[] valuesNotInSecondList(int[] first, int[] second)
-    {
-        int[] ret = new int[ first.length - second.length ];
-        int index = 0;
-
-        for (int i=0; i<first.length; i++)
-        {
-            boolean found = false;
-            for (int j=0; j<second.length; j++)
-            {
-                if (first[i] == second[j])
-                {
-                    found = true;
-                }
-            }
-            if (!found)
-            {
-                ret[index++] = first[i];
-            }
-        }
-        return ret;
-    }
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws PIMException
-    {
-        PIMList[] pimLists = new PIMList[ aNames.length ];
-        for (int i = 0; i < aNames.length; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode, aNames[ i ]);
-        }
-        return pimLists;
-    }
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLgetName/PLgetName.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLgetName;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.getName()
- */
-public class PLgetName
-        extends MIDPTest
-{
-
-    public PLgetName(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] contactLists = null;
-        PIMList[] eventLists = null;
-        PIMList[] todoLists = null;
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            eventLists = openLists(p, PIM.EVENT_LIST, eventListNames);
-            todoLists = openLists(p, PIM.TODO_LIST, todoListNames);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-        // step s1
-        testListNames(contactListNames, contactLists);
-        testListNames(eventListNames, eventLists);
-        testListNames(todoListNames, todoLists);
-
-        passTest();
-    }
-
-    /**
-     * Test step s1
-     */
-    private void testListNames(String[] aListNames, PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            String listName = null;
-            try
-            {
-                listName = aLists[ i ].getName();
-            }
-            catch (Throwable e)
-            {
-                failTest("getName threw: " + e.toString());
-            } // end of try-catch
-            if (listName.compareTo(aListNames[ i ]) != 0)
-            {
-                failTest("list " + aListNames[ i ] + " returned " +
-                         listName);
-            } // end of if (listName.compareTo( aListNames[ i ] ) != 0)
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLisCategory/PLisCategory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,381 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLisCategory;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.close()
- */
-public class PLisCategory extends MIDPTest
-{
-
-    public PLisCategory(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private String iTestCategoryName = "PLisCategory";
-    private String iTestCategoryNewName = "PLisCategoryNew";
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] contactListNames = null;
-        String[] eventListNames = null;
-        String[] todoListNames = null;
-        PIMList[] cl = null;
-        PIMList[] el = null;
-        PIMList[] tl = null;
-        String[][] cc = null;
-        String[][] ec = null;
-        String[][] tc = null;
-
-        try
-        {
-            p = PIM.getInstance();
-            contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            cl = openLists(p, PIM.CONTACT_LIST, contactListNames);
-            el = openLists(p, PIM.EVENT_LIST, eventListNames);
-            tl = openLists(p, PIM.TODO_LIST, todoListNames);
-            cc = getCategories(cl);
-            ec = getCategories(el);
-            tc = getCategories(tl);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // Test steps
-        // step s1
-        testIsCategory(cl, cc);
-        testIsCategory(el, ec);
-        testIsCategory(tl, tc);
-
-        // step s2
-        testRenameCategory(cl, cc);
-        testRenameCategory(el, ec);
-        testRenameCategory(tl, tc);
-
-        // steps s3, s4
-        testAddCategory(cl);
-        testAddCategory(el);
-        testAddCategory(tl);
-
-        // step s5
-        testNull(cl);
-        testNull(el);
-        testNull(tl);
-
-        // step s6
-        testPIME(cl);
-        testPIME(el);
-        testPIME(tl);
-
-        passTest();
-    }
-
-    private void testIsCategory(PIMList aList, String aCategory,
-                                boolean aExpected)
-    throws TestEndThrowable
-    {
-        boolean isCategory = false;
-        try
-        {
-            isCategory = aList.isCategory(aCategory);
-        }
-        catch (Throwable e)
-        {
-            failTest("isCategory threw: " + e.toString());
-        } // end of try-catch
-
-        if (isCategory != aExpected)
-        {
-            if (aExpected)
-            {
-                failTest("isCategory returned false for " + aCategory);
-            } // end of if (aExpected)
-            failTest("isCategory returned true for " + aCategory);
-        } // end of if (isCategory != aExpected)
-    }
-
-    /**
-     * Test step s1
-     */
-    private void testIsCategory(PIMList[] aLists, String[][] aCategories)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testIsCategory(aLists[ i ], aCategories[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testIsCategory(PIMList aList, String[] aCategories)
-    throws TestEndThrowable
-    {
-        int categoryCount = aCategories.length;
-        for (int i = 0; i < categoryCount; i++)
-        {
-            testIsCategory(aList, aCategories[ i ], true);
-        } // end of for (int = 0; i < categoryCount; i++)
-    }
-
-    /**
-     * test step s2
-     */
-    private void testRenameCategory(PIMList[] aLists, String[][] aCategories)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testRenameCategory(aLists[ i ], aCategories[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testRenameCategory(PIMList aList, String[] aCategories)
-    throws TestEndThrowable
-    {
-        if (aCategories.length == 0)
-        {
-            // we can't test
-            String listName = aList.getName();
-            log("list " + listName + " does not have any categories");
-            return;
-        } // end of if (aCategories.length == 0)
-
-        int categoryIndex = 0;
-        String oldCategoryName = aCategories[ categoryIndex ];
-        while (iTestCategoryName.equals(oldCategoryName))
-        {
-            if (++categoryIndex == aCategories.length)
-            {
-                log("No suitable categories found from " + aList.getName());
-                return;
-            } // end of if (++categoryIndex == aCategories.length)
-            oldCategoryName = aCategories[ categoryIndex ];
-        } // end of while (newCategoryName.equals( oldCategoryName ))
-
-        try
-        {
-            log("aList.renameCategory( \"" + oldCategoryName +
-                "\", \"" + iTestCategoryName + "\" );");
-            aList.renameCategory(oldCategoryName, iTestCategoryName);
-        }
-        catch (Throwable e)
-        {
-            failTest("renameCategory threw " + e.toString());
-        } // end of try-catch
-
-        testIsCategory(aList, oldCategoryName, false);
-        testIsCategory(aList, iTestCategoryName, true);
-    }
-
-    /**
-     * test steps s3 and s4
-     */
-    private void testAddCategory(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testAddCategory(aLists[ i ]);
-            testDeleteCategory(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    /**
-     * test step s3
-     */
-    private void testAddCategory(PIMList aList)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aList.addCategory(iTestCategoryNewName);
-        }
-        catch (PIMException e)
-        {
-            // categories may be unsupported, which is not an error
-            int reason = e.getReason();
-            if ((reason == PIMException.FEATURE_NOT_SUPPORTED) ||
-                    (reason == PIMException.MAX_CATEGORIES_EXCEEDED))
-            {
-                return;
-            }
-            failTest("addCategory threw PIME: " + e.getMessage());
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("addCategory threw: " + e.toString());
-        } // end of catch
-        testIsCategory(aList, iTestCategoryNewName, true);
-    }
-
-    /**
-     * test step s4
-     */
-    private void testDeleteCategory(PIMList aList)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aList.deleteCategory(iTestCategoryNewName, false);
-        }
-        catch (PIMException e)
-        {
-            // categories may be unsupported, which is not an error
-            int reason = e.getReason();
-            if (reason == PIMException.FEATURE_NOT_SUPPORTED)
-            {
-                return;
-            }
-            failTest("deleteCategory threw PIME: " + e.getMessage());
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("deleteCategory threw: " + e.toString());
-        } // end of catch
-        testIsCategory(aList, iTestCategoryNewName, false);
-    }
-
-    /**
-     * test step s5
-     */
-    private void testNull(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testNull(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testNull(PIMList aList)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.isCategory(null);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("not NPE: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("NPE not thrown");
-        } // end of if (!exceptionThrown)
-
-    }
-
-    /**
-     * test step s6
-     */
-    private void testPIME(PIMList[] aLists)
-    throws TestEndThrowable
-    {
-        int listCount = aLists.length;
-        for (int i = 0; i < listCount; i++)
-        {
-            testPIME(aLists[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-    }
-
-    private void testPIME(PIMList aList)
-    throws TestEndThrowable
-    {
-        try
-        {
-            aList.close();
-        }
-        catch (Throwable e)
-        {
-            failTest("close threw: " + e.toString());
-        } // end of try-catch
-        boolean exceptionThrown = false;
-        try
-        {
-            aList.isCategory("testCategory");
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("not PIMException: " + e.toString());
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("PIMException not thrown");
-        } // end of if (!exceptionThrown)
-
-    }
-
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aListNames)
-    throws PIMException
-    {
-        int listCount = aListNames.length;
-        PIMList[] pimLists = new PIMList[ listCount ];
-        for (int i = 0; i < listCount; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, PIM.READ_WRITE,
-                                           aListNames[ i ]);
-        } // end of for (int i = 0; i < listCount; i++)
-        return pimLists;
-    }
-
-    private String[][] getCategories(PIMList[] aLists)
-    throws PIMException
-    {
-        int listCount = aLists.length;
-        String[][] categories = new String[ listCount ][];
-        for (int i = 0; i < listCount; i++)
-        {
-            categories[ i ] = aLists[ i ].getCategories();
-        } // end of for (int = 0; i < listCount; i++)
-        return categories;
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems/PLitems.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLitems;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.items()
- */
-public class PLitems
-        extends MIDPTest
-{
-
-    public PLitems(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-
-        // Test steps
-        // step s1
-        testItems(allLists, true, false);
-
-        // step s2
-        closeLists(allLists);
-
-        // step s3
-        testItems(allLists, false, false);
-
-        // step s4
-        allLists = openAllLists(PIM.WRITE_ONLY);
-
-        // step s5
-        testItems(allLists, true, false);
-
-        // step s6
-        closeLists(allLists);
-
-        passTest();
-    }
-
-    private void testItems(PIMList[] lists, boolean noPIMException, boolean noSecurityException)
-    throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            try
-            {
-                Enumeration e = lists[i].items();
-                if (!noPIMException)
-                {
-                    failTest("Calling list.items() did not throw PIMException!");
-                }
-            }
-            catch (PIMException pime)
-            {
-                if (noPIMException)
-                {
-                    failTest("PIMException thrown while calling list.items(): " + pime);
-                }
-            }
-            catch (SecurityException se)
-            {
-                if (noSecurityException)
-                {
-                    failTest("SecurityException thrown while calling list.items(): " + se);
-                }
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while calling list.items(): " + ex);
-            }
-        }
-    }
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws PIMException
-    {
-        PIMList[] pimLists = new PIMList[ aNames.length ];
-        for (int i = 0; i < aNames.length; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode, aNames[ i ]);
-        }
-        return pimLists;
-    }
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems2/PLitems2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,325 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLitems2;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.items(String)
- */
-public class PLitems2 extends MIDPTest
-{
-
-    public PLitems2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private Vector lists = null;
-    private Event e1 = null;
-    private Contact c1 = null;
-    private ToDo t1 = null;
-
-    private String[] testStrings = { "Test String #1", "tEst sTrInG #1",
-                                     "est", "eSt", " ", ""
-                                   };
-
-    // these are for testing matching for strings inside stringarrays
-    private String[] testStrings2 = { "UniqueArray", "eArray", "EaRrAy" };
-
-    private int[][] itemCounts = null;
-    private int[][] arrayItemCounts = null;
-
-    public void initTest() throws TestEndThrowable
-    {
-        // preconditions
-        openLists(PIM.READ_WRITE);
-
-        // count items in lists
-        itemCounts = countItems(testStrings);
-        arrayItemCounts = countItems(testStrings2);
-
-        // add test items & categories
-        addItems();
-    }
-
-
-    private int[][] countItems(String[] aTestStrings) throws TestEndThrowable
-    {
-
-        int[][] count = new int[lists.size()][aTestStrings.length];
-
-        try
-        {
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                for (int j=0; j< aTestStrings.length; j++)
-                {
-                    Enumeration e = pl.items(aTestStrings[j]);
-                    count[i][j] = count(e);
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Item count failed: " + t);
-        }
-
-        return count;
-    }
-
-    private void openLists(int aMode) throws TestEndThrowable
-    {
-        // open first lists of each type
-        try
-        {
-            PIM p = PIM.getInstance();
-            lists = new Vector();
-
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            lists.addElement(p.openPIMList(PIM.TODO_LIST,
-                                           aMode, todoListNames[0]));
-
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            lists.addElement(p.openPIMList(PIM.EVENT_LIST,
-                                           aMode, eventListNames[0]));
-
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            lists.addElement(p.openPIMList(PIM.CONTACT_LIST,
-                                           aMode, contactListNames[0]));
-        }
-        catch (Throwable e)
-        {
-            failTest("Opening lists failed: " + e);
-        }
-    }
-
-    private void addItems() throws TestEndThrowable
-    {
-        try
-        {
-            // add test items
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-
-                if (pl instanceof EventList)
-                {
-                    e1 = ((EventList)pl).createEvent();
-                    e1.addString(Event.SUMMARY, PIMItem.ATTR_NONE, testStrings[0]);
-                    e1.addDate(Event.START, PIMItem.ATTR_NONE, 1000000000000L);
-                    e1.commit();
-                }
-                else if (pl instanceof ContactList)
-                {
-                    c1 = ((ContactList)pl).createContact();
-                    c1.addString(Contact.EMAIL, PIMItem.ATTR_NONE, testStrings[0]);
-
-                    // add strings for stringarray testing also
-                    String[] addr = new String[((ContactList)pl).stringArraySize(Contact.ADDR)];
-                    addr[Contact.ADDR_COUNTRY] = testStrings2[0];
-                    c1.addStringArray(Contact.ADDR, PIMItem.ATTR_NONE, addr);
-                    c1.commit();
-                }
-                else if (pl instanceof ToDoList)
-                {
-                    t1 = ((ToDoList)pl).createToDo();
-                    t1.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, testStrings[0]);
-                    t1.commit();
-                }
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Adding test items failed: " + e);
-        }
-    }
-
-    private void deleteItems() throws TestEndThrowable
-    {
-        try
-        {
-            // delete test items
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-
-                if (pl instanceof EventList)
-                {
-                    ((EventList)pl).removeEvent(e1);
-                }
-                else if (pl instanceof ContactList)
-                {
-                    ((ContactList)pl).removeContact(c1);
-                }
-                else if (pl instanceof ToDoList)
-                {
-                    ((ToDoList)pl).removeToDo(t1);
-                }
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Deleting test items failed: " + e);
-        }
-    }
-
-    private void closeLists()
-    {
-        try
-        {
-            // close lists
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                if (pl != null)
-                {
-                    pl.close();
-                    pl = null;
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            log("error while closing lists: " +t);
-        }
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        int[][] testCount = countItems(testStrings);
-
-        // test step1
-        int[] allItems = countAllItems();
-        for (int i = 0; i < allItems.length; i++)
-        {
-            if (allItems[i] != testCount[i][testStrings.length-1])
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                log("Testing list " + pl.getName());
-                failTest("items(\"\") did not return same amount "+
-                         "of items that items() returned.");
-            }
-        }
-
-        // test steps 2, 3
-        for (int i = 0; i < lists.size(); i++)
-        {
-            for (int j = 0; j < testStrings.length; j++)
-            {
-                if (itemCounts[i][j] != (testCount[i][j] - 1))
-                {
-                    PIMList pl = (PIMList) lists.elementAt(i);
-                    log("Testing list " + pl.getName());
-                    failTest("items("+testStrings[j]+") did not return one more item "+
-                             "than items() returned before adding the test item.");
-                }
-            }
-        }
-
-        // test step 4
-        for (int i=0; i< lists.size(); i++)
-        {
-            PIMList pl = (PIMList) lists.elementAt(i);
-
-            if (pl instanceof ContactList)
-            {
-                for (int j=0; j< testStrings2.length; j++)
-                {
-                    try
-                    {
-                        Enumeration e = pl.items(testStrings2[j]);
-                        int ascount = count(e);
-                        log("Found "+ascount+" matches.");
-                        if (arrayItemCounts[i][j] != (ascount - 1))
-                        {
-                            log("Testing(stringarray) list " + pl.getName());
-                            failTest("items("+testStrings2[j]+") did not return one more item "+
-                                     "than items() returned before adding the test stringarrayitem.");
-                        }
-                    }
-                    catch (PIMException pime)
-                    {
-                        failTest("Could not test items("+testStrings2[j]+"): "+pime);
-                    }
-                }
-            }
-        }
-
-
-        passTest(); // does step5
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            // delete test items
-            deleteItems();
-
-            // close lists
-            closeLists();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-
-    private int[] countAllItems() throws TestEndThrowable
-    {
-        int[] counts = new int[lists.size()];
-        try
-        {
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                counts[i] = count(pl.items());
-            }
-        }
-        catch (Throwable t)
-        {
-            log("error while counting all items: " +t);
-        }
-        return counts;
-    }
-
-
-    private int count(Enumeration e)
-    {
-        int count = 0;
-
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-
-        return count;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitems2Ex/PLitems2Ex.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLitems2Ex;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.items(String)
- */
-public class PLitems2Ex extends MIDPTest
-{
-
-    public PLitems2Ex(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private Vector lists = null;
-
-    public void initTest() throws TestEndThrowable
-    {
-        // preconditions
-        openLists(PIM.READ_WRITE);
-    }
-
-    private void openLists(int aMode) throws TestEndThrowable
-    {
-        // open first lists of each type
-        try
-        {
-            PIM p = PIM.getInstance();
-            lists = new Vector();
-
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            for (int i=0; i < todoListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.TODO_LIST,
-                                               aMode, todoListNames[i]));
-            }
-
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            for (int i=0; i < eventListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.EVENT_LIST,
-                                               aMode, eventListNames[i]));
-            }
-
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            for (int i=0; i < contactListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.CONTACT_LIST,
-                                               aMode, contactListNames[i]));
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Opening lists failed: " + e);
-        }
-    }
-
-
-    private void closeLists()
-    {
-        try
-        {
-            // close lists
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                if (pl != null)
-                {
-                    pl.close();
-                    pl = null;
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            log("error while closing lists: " +t);
-        }
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        // test steps 1
-        testNullPointerException();
-
-        // test steps 2 & 3
-        closeLists();
-        testPIMException();
-
-        // test step 4 & 5
-        openLists(PIM.WRITE_ONLY);
-        testSecurityException();
-
-        passTest(); // will also close lists (step 6)
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            closeLists();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-
-    // test that lists throw NullPointerException
-    // when calling PIMList.items(null)
-    private void testNullPointerException() throws TestEndThrowable
-    {
-        for (int i=0; i< lists.size(); i++)
-        {
-            try
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                String str = null;
-                pl.items(str);
-                failTest("Calling items(null) on a closed "+
-                         "list did not throw NullPointerException!");
-            }
-            catch (NullPointerException npe)
-            {
-                // ok
-            }
-            catch (Exception ex)
-            {
-                failTest("Calling items(null) on a closed "+
-                         "list did not throw NullPointerException but " + ex);
-            }
-        }
-    }
-
-    // test that closed lists throw PIMException
-    // when calling PIMList.items("")
-    private void testPIMException() throws TestEndThrowable
-    {
-        for (int i=0; i< lists.size(); i++)
-        {
-            try
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                pl.items("");
-                failTest("Calling items(\"\") on a closed "+
-                         "list did not throw PIMException!");
-            }
-            catch (PIMException pe)
-            {
-                // ok
-            }
-            catch (Exception ex)
-            {
-                failTest("Calling items(\"\") on a closed "+
-                         "list did not throw PIMException but " + ex);
-            }
-        }
-    }
-
-    // test that write_only lists throw SecurityException
-    // when calling PIMList.items("")
-    private void testSecurityException() throws TestEndThrowable
-    {
-        for (int i=0; i< lists.size(); i++)
-        {
-            try
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                pl.items("");
-                failTest("Calling items(\"\") on a write_only "+
-                         "list did not throw SecurityException!");
-            }
-            catch (SecurityException se)
-            {
-                // ok
-            }
-            catch (Exception ex)
-            {
-                failTest("Calling items(\"\") on a write_only "+
-                         "list did not throw SecurityException but " + ex);
-            }
-        }
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLitemsByCategory/PLitemsByCategory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,416 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLitemsByCategory;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.itemsByCategory()
- */
-public class PLitemsByCategory extends MIDPTest
-{
-
-    public PLitemsByCategory(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private Vector lists = null;
-    private String testCategory = "Test1";
-    private int itemCount = 0;
-
-    public void initTest() throws TestEndThrowable
-    {
-        // preconditions
-        openLists(PIM.READ_WRITE);
-
-        // count items in lists
-        itemCount = countItems();
-
-        // add test items & categories
-        addItems();
-    }
-
-
-    private int countItems() throws TestEndThrowable
-    {
-        int count = 0;
-
-        try
-        {
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                Enumeration e = pl.items();
-                count += count(e);
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Item count failed: " + t);
-        }
-
-        return count;
-    }
-
-    private void openLists(int aMode) throws TestEndThrowable
-    {
-        // open first lists of each type
-        try
-        {
-            PIM p = PIM.getInstance();
-            lists = new Vector();
-
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            for (int i=0; i < todoListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.TODO_LIST,
-                                               aMode, todoListNames[i]));
-            }
-
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            for (int i=0; i < eventListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.EVENT_LIST,
-                                               aMode, eventListNames[i]));
-            }
-
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            for (int i=0; i < contactListNames.length; i++)
-            {
-                lists.addElement(p.openPIMList(PIM.CONTACT_LIST,
-                                               aMode, contactListNames[i]));
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Opening lists failed: " + e);
-        }
-    }
-
-    private void addItems() throws TestEndThrowable
-    {
-        try
-        {
-            // add test items and categories to those lists
-            // that support categories
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                if (catSupported(pl))
-                {
-                    pl.addCategory(testCategory);
-                    if (pl instanceof EventList)
-                    {
-                        Event e1 = ((EventList)pl).createEvent();
-                        e1.addString(Event.SUMMARY, PIMItem.ATTR_NONE, "test1");
-                        e1.addDate(Event.START, PIMItem.ATTR_NONE, 1010101010L);
-                        e1.addToCategory(testCategory);
-                        e1.commit();
-                    }
-                    else if (pl instanceof ContactList)
-                    {
-                        Contact c1 = ((ContactList)pl).createContact();
-                        c1.addString(Contact.EMAIL, PIMItem.ATTR_NONE, "test1");
-                        c1.addToCategory(testCategory);
-                        c1.commit();
-                    }
-                    else if (pl instanceof ToDoList)
-                    {
-                        ToDo t1 = ((ToDoList)pl).createToDo();
-                        t1.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "test1");
-                        t1.addToCategory(testCategory);
-                        t1.commit();
-                    }
-                }
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Adding test items & categories failed: " + e);
-        }
-    }
-
-    private void closeLists()
-    {
-        try
-        {
-            // delete categories and test items
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                if (pl != null)
-                {
-                    // also deletes items in category
-                    if (pl.maxCategories() != 0)
-                    {
-                        pl.deleteCategory(testCategory, true);
-                    }
-                }
-            }
-
-            // close lists
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                if (pl != null)
-                {
-                    pl.close();
-                    pl = null;
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            log("error while closing lists: " +t);
-        }
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        // test steps 1-3
-        testCategories();
-
-        // test steps 4-6
-        testSpecialCategories();
-
-        // test steps 7-8
-        closeLists();
-        testPIMException();
-
-        // test step 9
-        openLists(PIM.WRITE_ONLY);
-        testSecurityException();
-
-        passTest();
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            closeLists();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-
-    private void testSpecialCategories() throws TestEndThrowable
-    {
-        try
-        {
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-
-                // get number of uncategorized items
-                int uncatCount = count(
-                                     pl.itemsByCategory(PIMList.UNCATEGORIZED));
-
-                // get number of null-categorized items
-                log("testing itemsByCategory( null )");
-                int nullcatCount = count(pl.itemsByCategory(null));
-
-                if (nullcatCount != uncatCount)
-                {
-                    failTest(uncatCount+" uncategorized items and "+
-                             nullcatCount+ " null-categorized items. " +
-                             "Should be equal amount.");
-                }
-
-                log("testing itemsByCategory( \"\" )");
-                String[] cats = pl.getCategories();
-                boolean emptyCategory = false;
-
-                for (int j = 0; j < cats.length; j++)
-                {
-                    if (cats[j].equals(""))
-                    {
-                        emptyCategory = true;
-                    }
-                }
-                if (!emptyCategory)
-                {
-                    if (count(pl.itemsByCategory("")) != 0)
-                    {
-                        failTest("Calling itemsByCategory(\"\") must "+
-                                 "return empty enumeration!");
-
-                    }
-                }
-
-                log("testing itemsByCategory( <existing name in lower/uppercase> )");
-                int testCount = count(pl.itemsByCategory(testCategory));
-
-                if (testCount != 0)
-                {
-                    int lcCount = count(pl.itemsByCategory(testCategory.toLowerCase()));
-                    if (lcCount == testCount)
-                    {
-                        failTest("Calling itemsByCategory( testCategory.toLowerCase() ) "+
-                                 "must return empty enumeration!");
-                    }
-
-                    int ucCount = count(pl.itemsByCategory(testCategory.toUpperCase()));
-                    if (ucCount == testCount)
-                    {
-                        failTest("Calling itemsByCategory( testCategory.toUpperCase() ) "+
-                                 "must return empty enumeration!");
-                    }
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Error while testing special categories: " + t);
-        }
-    }
-
-    private void testCategories() throws TestEndThrowable
-    {
-        try
-        {
-            for (int i=0; i< lists.size(); i++)
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                // get number of items belonging to some category
-                String[] cats = pl.getCategories();
-                Vector items = new Vector();
-                for (int j = 0; j < cats.length; j++)
-                {
-                    Enumeration e = pl.itemsByCategory(cats[j]);
-                    addTo(items, e);
-                }
-                // get number of uncategorized items
-                int uncatCount = count(
-                                     pl.itemsByCategory(PIMList.UNCATEGORIZED));
-                // get number of items in list
-                int listCount = count(pl.items());
-
-                if (uncatCount + items.size() != listCount)
-                {
-                    failTest(listCount+" items in list "+  pl.getName() + ". "+
-                             uncatCount+" uncategorized items and "+ items.size()+
-                             " categorized items. (items != uncat + cat).");
-
-                }
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Error while testing categories: " + t);
-        }
-    }
-
-    private void addTo(Vector aV, Enumeration aE)
-    {
-        while (aE.hasMoreElements())
-        {
-            Object o = aE.nextElement();
-            if (!aV.contains(o))
-            {
-                aV.addElement(o);
-            }
-        }
-    }
-
-    // test that closed lists throw PIMException
-    // when calling PIMList.itemsByCategory("")
-    private void testPIMException() throws TestEndThrowable
-    {
-
-        for (int i=0; i< lists.size(); i++)
-        {
-            try
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                pl.itemsByCategory("");
-                failTest("Calling itemsByCategory() on a closed "+
-                         "list did not throw PIMException!");
-            }
-            catch (PIMException pe)
-            {
-                // ok
-            }
-            catch (Exception ex)
-            {
-                failTest("Calling itemsByCategory() on a closed "+
-                         "list did not throw PIMException but " + ex);
-            }
-        }
-    }
-
-    // test that write_only lists throw SecurityException
-    // when calling PIMList.itemsByCategory("")
-    private void testSecurityException() throws TestEndThrowable
-    {
-
-        for (int i=0; i< lists.size(); i++)
-        {
-            try
-            {
-                PIMList pl = (PIMList) lists.elementAt(i);
-                pl.itemsByCategory("asfdasdf");
-                failTest("Calling itemsByCategory() on a write_only "+
-                         "list did not throw SecurityException!");
-            }
-            catch (SecurityException se)
-            {
-                // ok
-            }
-            catch (Exception ex)
-            {
-                failTest("Calling itemsByCategory() on a write_only "+
-                         "list did not throw SecurityException but " + ex);
-            }
-        }
-    }
-
-    private boolean catSupported(PIMList aPL)
-    {
-        if (aPL.maxCategories() == 0)
-        {
-            return false;
-        }
-        return true;
-    }
-
-    private int count(Enumeration e)
-    {
-        int count = 0;
-
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-
-        return count;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLrenameCategory/PLrenameCategory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,539 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLrenameCategory;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.renameCategory()
- */
-public class PLrenameCategory extends MIDPTest
-{
-
-    public PLrenameCategory(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private Hashtable categories = new Hashtable();
-    private Hashtable newItems1 = new Hashtable();
-    private String[] testCategories = { "test1cat", "test2cat", "newtest1cat" };
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-
-        if (allLists.length > 0)
-        {
-            try
-            {
-                // test step 1
-                addNewCategories(allLists);
-                addNewItems(allLists);
-
-                // test step 2
-                testRenameCategories(allLists);
-
-                // test step 3
-                testRenameCategories2(allLists);
-
-                // test step 4
-                testRenameCategoryException(allLists, "gsafgsuo", "guoawgeuf");
-
-                // test step 5
-                testRenameCategoryException(allLists, "gsafgsuo", testCategories[1]);
-
-                // test step 6
-                testRenameCategoryException(allLists, testCategories[1], testCategories[1]);
-
-                // test step 7
-                testRenameCategoryException(allLists, null, testCategories[1]);
-                testRenameCategoryException(allLists, testCategories[1], null);
-            }
-            catch (TestEndThrowable tet)
-            {
-                // we only catch this to have the cleanup in finally...
-                throw tet;
-            }
-            finally
-            {
-                cleanup(allLists);
-            }
-        }
-
-        passTest();
-    }
-
-
-    private void removeAddedItems(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                if (lists[i] instanceof EventList)
-                {
-                    Event e = (Event)newItems1.get(lists[i]);
-                    if (e != null)
-                    {
-                        ((EventList)lists[i]).removeEvent(e);
-                    }
-                }
-                else if (lists[i] instanceof ContactList)
-                {
-                    Contact c = (Contact)newItems1.get(lists[i]);
-                    if (c != null)
-                    {
-                        ((ContactList)lists[i]).removeContact(c);
-                    }
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    ToDo t = (ToDo)newItems1.get(lists[i]);
-                    if (t != null)
-                    {
-                        ((ToDoList)lists[i]).removeToDo(t);
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while removing added items from list: "+e);
-        }
-    }
-
-    private int itemCount(PIMList list) throws TestEndThrowable
-    {
-        int count = 0;
-        try
-        {
-            Enumeration items = list.items();
-            while (items.hasMoreElements())
-            {
-                PIMItem tmp = (PIMItem) items.nextElement();
-                count++;
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error counting items in list: "+e);
-        }
-        return count;
-    }
-
-    private boolean find(PIMList list, PIMItem item, String category) throws TestEndThrowable
-    {
-        try
-        {
-            Enumeration items = list.items(item);
-            while (items.hasMoreElements())
-            {
-                PIMItem tmp = (PIMItem) items.nextElement();
-                String[] cats = tmp.getCategories();
-                if (find(cats, category))
-                {
-                    return true;
-                }
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return false;
-        }
-        catch (Exception e)
-        {
-            failTest("Error finding item: "+e);
-        }
-        return false;
-    }
-
-    private boolean find(PIMList list, PIMItem item) throws TestEndThrowable
-    {
-        try
-        {
-            Enumeration items = list.items(item);
-            if (items.hasMoreElements())
-            {
-                return true;
-            }
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // item does not originate from the list
-            return false;
-        }
-        catch (Exception e)
-        {
-            failTest("Error finding item: "+e);
-        }
-        return false;
-    }
-
-    private boolean find(String[] array, String item)
-    {
-        for (int i = 0; i < array.length; i++)
-        {
-            if (item.equals(array[i]))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void addNewItems(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                String[] cats = lists[i].getCategories();
-                if (cats.length != 0)
-                {
-                    if (lists[i] instanceof EventList)
-                    {
-                        Event e1 = ((EventList)lists[i]).createEvent();
-                        e1.addString(Event.SUMMARY, PIMItem.ATTR_NONE, testCategories[0]);
-                        e1.addDate(Event.START, PIMItem.ATTR_NONE, 1010101010L);
-                        e1.addToCategory(testCategories[0]);
-                        e1.commit();
-                        newItems1.put(lists[i], e1);
-                    }
-                    else if (lists[i] instanceof ContactList)
-                    {
-                        Contact c1 = ((ContactList)lists[i]).createContact();
-                        c1.addString(Contact.EMAIL, PIMItem.ATTR_NONE, testCategories[0]);
-                        c1.addToCategory(testCategories[0]);
-                        c1.commit();
-                        newItems1.put(lists[i], c1);
-                    }
-                    else if (lists[i] instanceof ToDoList)
-                    {
-                        ToDo t1 = ((ToDoList)lists[i]).createToDo();
-                        t1.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, testCategories[0]);
-                        t1.addToCategory(testCategories[0]);
-                        t1.commit();
-                        newItems1.put(lists[i], t1);
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while adding new items to lists: "+e);
-        }
-    }
-
-    private void cleanup(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].deleteCategory(testCategories[0], false);
-                lists[i].deleteCategory(testCategories[1], false);
-                lists[i].deleteCategory(testCategories[2], false);
-            }
-            removeAddedItems(lists);
-        }
-        catch (Exception e)
-        {
-            failTest("error during cleanup: "+e);
-        }
-    }
-
-    private void testRenameCategoryException(PIMList[] lists, String first, String second) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            String[] cats = null;
-            try
-            {
-                cats = lists[i].getCategories();
-                lists[i].renameCategory(first, second);
-            }
-            catch (PIMException pime)
-            {
-                if (find(cats, first))
-                {
-                    failTest("error in renaming category exceptions: "+pime);
-                }
-            }
-            catch (NullPointerException npe)
-            {
-                if (first != null && second != null)
-                {
-                    failTest("error in renaming category exceptions: "+npe);
-                }
-            }
-            catch (Exception e)
-            {
-                failTest("error in renaming category exceptions: "+e);
-            }
-
-            try
-            {
-                String[] cats2 = lists[i].getCategories();
-                if (cats.length != cats2.length)
-                {
-                    log("Rename: "+ first +" to "+second);
-                    log("Old Categories: "+ asString(cats));
-                    log("Categories found: "+ asString(cats2));
-                    failTest("Category size was changed!");
-                }
-            }
-            catch (Exception e)
-            {
-                failTest("error in renaming category exceptions: "+e);
-            }
-        }
-    }
-
-
-    private void testRenameCategories2(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                String[] cats = lists[i].getCategories();
-                if (cats.length != 0)
-                {
-
-                    lists[i].renameCategory(testCategories[2], testCategories[1]);
-
-                    String[] cats2 = lists[i].getCategories();
-
-                    if (cats.length == cats2.length)
-                    {
-                        failTest("Category #1 was not removed!");
-                    }
-                    if (find(cats2, testCategories[2]))
-                    {
-                        log("Old Categories: "+ asString(cats));
-                        log("Categories found: "+ asString(cats2));
-                        failTest("Category was renamed but old name exists!");
-                    }
-                    Enumeration e = lists[i].itemsByCategory(testCategories[1]);
-                    int count = 0;
-                    while (e.hasMoreElements())
-                    {
-                        e.nextElement();
-                        count++;
-                    }
-                    if (count != 1)
-                    {
-                        log("Old Categories: "+ asString(cats));
-                        log("Categories found: "+ asString(cats2));
-                        failTest("Category was renamed but item is not returned by list.itemsByCategory("+testCategories[1]+")!");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("error while renaming category #1 to #2: "+e);
-        }
-    }
-
-    private void testRenameCategories(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                String[] cats = lists[i].getCategories();
-                if (cats.length != 0)
-                {
-                    if (!find(cats, testCategories[0]))
-                    {
-                        log("Categories found: "+ asString(cats));
-                        failTest("Category #1 ("+testCategories[0]+") not in lists.");
-                    }
-                    lists[i].renameCategory(testCategories[0], testCategories[2]);
-
-                    String[] cats2 = lists[i].getCategories();
-
-                    if (!find(cats2, testCategories[2]))
-                    {
-                        failTest("Category #1 was not renamed!");
-                    }
-                    if (cats.length == cats2.length)
-                    {
-                        log("Old Categories: "+ asString(cats));
-                        log("Categories found: "+ asString(cats2));
-                        failTest("Category was renamed but old name exists!");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("error while renaming category #1 to lists: "+e);
-        }
-    }
-
-    private String asString(String[] values)
-    {
-        String ret = "";
-        if (values.length == 0)
-        {
-            return ret;
-        }
-
-        for (int i=0; i <values.length-1; i++)
-        {
-            ret += values[i]+", ";
-        }
-        ret += values[values.length-1];
-        return ret;
-    }
-
-    private void addNewCategories(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                int max1 = lists[i].maxCategories();
-                for (int j = 0; j < testCategories.length; j++)
-                {
-                    lists[i].addCategory(testCategories[j]);
-                }
-                int max2 = lists[i].maxCategories();
-                if (max2 != -1 && (max2-max1 != 2))
-                {
-                    log("max categories before adding: "+max1+", after adding: "+max2);
-                    failTest("error while adding new categories to lists.");
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("error while adding new categories to lists: "+e);
-        }
-    }
-
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws TestEndThrowable
-    {
-        Vector v = new Vector();
-        for (int i = 0; i < aNames.length; i++)
-        {
-            PIMList pl = null;
-            try
-            {
-                pl = aP.openPIMList(aListType, aMode, aNames[ i ]);
-                String[] names = pl.getCategories();
-                int max = pl.maxCategories();
-                if (max > -1 && (max-names.length < 2))
-                {
-                    log(pl.getName() + " cannot be tested. Too few categories ("+max+") left.");
-                    pl.close();
-                }
-                else if (max < -1)
-                {
-                    failTest(pl.getName() +".maxCategories() returned "+max+"!");
-                }
-                else
-                {
-                    log(pl.getName()+ " can be tested. Max categories = "+max+". Categories found: "+ asString(names));
-                    categories.put(pl.getName(), names);
-                    v.addElement(pl);
-                }
-            }
-            catch (Exception e)
-            {
-                failTest("error while opening lists: "+e);
-            }
-        }
-        PIMList[] pimLists = new PIMList[ v.size()];
-        for (int i = 0; i < v.size(); i++)
-        {
-            pimLists[i] = (PIMList) v.elementAt(i);
-        }
-        return pimLists;
-    }
-
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PIMList/PLstringArrays/PLstringArrays.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.PIMList.PLstringArrays;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.PIMList.items()
- */
-public class PLstringArrays
-        extends MIDPTest
-{
-
-    public PLstringArrays(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private int[] contactFields = { Contact.ADDR,
-                                    Contact.BIRTHDAY,
-                                    Contact.CLASS,
-                                    Contact.EMAIL,
-                                    Contact.FORMATTED_ADDR,
-                                    Contact.FORMATTED_NAME,
-                                    Contact.NAME,
-                                    Contact.NICKNAME,
-                                    Contact.NOTE,
-                                    Contact.ORG,
-                                    Contact.PHOTO,
-                                    Contact.PHOTO_URL,
-                                    Contact.PUBLIC_KEY,
-                                    Contact.PUBLIC_KEY_STRING,
-                                    Contact.REVISION,
-                                    Contact.TEL,
-                                    Contact.TITLE,
-                                    Contact.UID,
-                                    Contact.URL,
-                                    0x1005001,  // Extended fiels
-                                    0x1005002,
-                                    0x1005003,
-                                    0x1005004,
-                                    0x1005005,
-                                    0x1005006,
-                                    0x1005007,
-                                    0x1005008,
-                                    0x1005009,
-                                    0x100500A,
-                                    0x100500B
-                                  };
-
-    private int[] eventFields = { Event.ALARM,
-                                  Event.CLASS,
-                                  Event.END,
-                                  Event.LOCATION,
-                                  Event.NOTE,
-                                  Event.REVISION,
-                                  Event.START,
-                                  Event.SUMMARY,
-                                  Event.UID
-                                };
-
-    private int[] todoFields = { ToDo.CLASS,
-                                 ToDo.COMPLETED,
-                                 ToDo.COMPLETION_DATE,
-                                 ToDo.DUE,
-                                 ToDo.NOTE,
-                                 ToDo.PRIORITY,
-                                 ToDo.REVISION,
-                                 ToDo.SUMMARY,
-                                 ToDo.UID,
-                                 0x1005001  // Extended fiels
-                               };
-
-    private int[] invalidFields = { -100, -1, 0, 666, 2147483647 };
-    private int[] invalidIndexes = { -100, -1, 666, 2147483647 };
-    private Hashtable supportedFields = new Hashtable();
-    private Hashtable unsupportedFields = new Hashtable();
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIMList[] allLists = openAllLists(PIM.READ_WRITE);
-        // test step1
-        classifyFields(allLists);
-        // test steps 2, 3, 4, 5, 6, 8, 9
-        testStringArrays(allLists);
-        // test step 7
-        log("Testing isSupportedArrayElementFalse");
-        testIsSupportedArrayElementFalse(allLists);
-
-        // test steps 10, 11
-        log("Testing getArrayElementLabel: IAE & UFE");
-        testGetArrayElementLabelIAE(allLists);
-        testGetArrayElementLabelUFE(allLists);
-
-        // test step 12
-        log("Testing stringArraySize exceptions");
-        testStringArraySizeExceptions(allLists);
-
-        closeLists(allLists);
-
-        passTest();
-    }
-    private void testGetArrayElementLabelUFE(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test that supported fields and unsupported index throw UFE
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-            int testIndex=0;
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                try
-                {
-                    int dataType = lists[i].getFieldDataType(fields[j]);
-                    if (dataType == PIMItem.STRING_ARRAY)
-                    {
-                        int[] indexes = lists[i].getSupportedArrayElements(fields[j]);
-                        int size = lists[i].stringArraySize(fields[j]);
-                        if (size != indexes.length)
-                        {
-                            log("arraySize: "+size+", indexes: "+asString(indexes));
-                            for (int k = 0; k<indexes.length; k++)
-                            {
-                                // only one unsupported index is tested but should be enough
-                                if (k != indexes[k])
-                                {
-                                    testIndex = indexes[k];
-                                    lists[i].getArrayElementLabel(fields[j], indexes[k]);
-                                    failTest(lists[i].getName()+".getArrayElementLabel("+fields[j]+
-                                             ", <unsupportedIndex="+testIndex+">) did not throw IAE!");
-                                }
-                            }
-                        }
-                    }
-                }
-                catch (UnsupportedFieldException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest(lists[i].getName()+".getArrayElementLabel("+fields[j]+
-                             ", <unsupportedIndex="+testIndex+">) did not throw IAE but "+e);
-                }
-            }
-            // test that unsupported fields and valid index throw UFE
-            int[] ufields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<ufields.length; j++)
-            {
-                for (int k = 0; k<invalidIndexes.length; k++)
-                {
-                    try
-                    {
-                        if (isUnsupportedSA(lists[i], ufields[j]))
-                        {
-                            // assumption that 0 is alway valid field...
-                            lists[i].getArrayElementLabel(ufields[j], 0);
-                        }
-                    }
-                    catch (UnsupportedFieldException ufe)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest(lists[i].getName()+".getArrayElementLabel("+ufields[j]+
-                                 ", "+invalidIndexes[k]+") did not throw IAE but "+e);
-                    }
-                }
-            }
-        }
-    }
-
-    private void testGetArrayElementLabelIAE(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test that supported SA fields and invalid index throw IAE
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                for (int k = 0; k<invalidIndexes.length; k++)
-                {
-                    try
-                    {
-                        int dataType = lists[i].getFieldDataType(fields[j]);
-                        if (dataType == PIMItem.STRING_ARRAY)
-                        {
-                            lists[i].getArrayElementLabel(fields[j], invalidIndexes[k]);
-                        }
-                    }
-                    catch (IllegalArgumentException iae)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest(lists[i].getName()+".getArrayElementLabel("+fields[j]+
-                                 ", "+invalidIndexes[k]+") did not throw IAE but "+e);
-                    }
-                }
-            }
-            // test that unsupported SA fields and invalid index throw IAE
-            int[] ufields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<ufields.length; j++)
-            {
-                for (int k = 0; k<invalidIndexes.length; k++)
-                {
-                    try
-                    {
-                        if (isUnsupportedSA(lists[i], ufields[j]))
-                        {
-                            lists[i].getArrayElementLabel(ufields[j], invalidIndexes[k]);
-                        }
-                    }
-                    catch (IllegalArgumentException iae)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest(lists[i].getName()+".getArrayElementLabel("+ufields[j]+
-                                 ", "+invalidIndexes[k]+") did not throw IAE but "+e);
-                    }
-                }
-            }
-            // test that invalid fields and invalid index throw IAE
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                for (int k = 0; k<invalidIndexes.length; k++)
-                {
-                    try
-                    {
-                        // assumption that 0 is alway valid field...
-                        lists[i].getArrayElementLabel(invalidFields[j], 0);
-                    }
-                    catch (IllegalArgumentException iae)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest(lists[i].getName()+".getArrayElementLabel("+invalidFields[j]+
-                                 ", "+invalidIndexes[k]+") did not throw IAE but "+e);
-                    }
-                }
-            }
-        }
-    }
-
-    private void testStringArraySizeExceptions(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test that supported non-STRING_ARRAY fields throw IAE
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                try
-                {
-                    int dataType = lists[i].getFieldDataType(fields[j]);
-                    if (dataType != PIMItem.STRING_ARRAY)
-                    {
-                        lists[i].stringArraySize(fields[j]);
-                        failTest(lists[i].getName()+".stringArraySize("+fields[j]+") did not throw IAE!");
-                    }
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest(lists[i].getName()+".stringArraySize("+fields[j]+") did not throw IAE but "+e);
-                }
-            }
-            // test that invalid fields throw IAE
-            for (int j = 0; j<invalidFields.length; j++)
-            {
-                try
-                {
-                    int dataType = lists[i].getFieldDataType(invalidFields[j]);
-                    if (dataType != PIMItem.STRING_ARRAY)
-                    {
-                        lists[i].stringArraySize(invalidFields[j]);
-                        failTest(lists[i].getName()+".stringArraySize("+invalidFields[j]+") did not throw IAE!");
-                    }
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (Exception e)
-                {
-                    failTest(lists[i].getName()+".stringArraySize("+invalidFields[j]+") did not throw IAE but "+e);
-                }
-            }
-
-            // test unsupported fields
-            int[] ufields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<ufields.length; j++)
-            {
-                try
-                {
-                    lists[i].stringArraySize(ufields[j]);
-                    if (!isUnsupportedSA(lists[i], ufields[j]))
-                    {
-                        failTest(lists[i].getName()+".stringArraySize("+ufields[j]+") did not throw IAE!");
-                    }
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                    if (isUnsupportedSA(lists[i], ufields[j]))
-                    {
-                        failTest(lists[i].getName()+".stringArraySize("+ufields[j]+") threw IAE!");
-                    }
-                }
-                catch (Exception e)
-                {
-                    failTest(lists[i].getName()+".stringArraySize("+ufields[j]+") did not throw IAE but "+e);
-                }
-            }
-        }
-    }
-    private boolean isUnsupportedSA(PIMList list, int field)
-    {
-        if (list instanceof ContactList)
-        {
-            if (field == Contact.ADDR || field == Contact.NAME)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-    private String asString(int[] values)
-    {
-        String ret = "";
-        for (int i=0; i <values.length-1; i++)
-        {
-            ret += values[i]+", ";
-        }
-        ret += values[values.length-1];
-        return ret;
-    }
-
-    private void testIsSupportedArrayElementFalse(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i = 0; i < lists.length; i++)
-        {
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                int dataType = lists[i].getFieldDataType(fields[j]);
-                if (dataType == PIMItem.STRING_ARRAY)
-                {
-                    int arraySize = lists[i].stringArraySize(fields[j]);
-                    int[] arrayElements = lists[i].getSupportedArrayElements(fields[j]);
-//                  log( "arraySize: "+arraySize+", indexes: "+asString( arrayElements ) );
-
-                    // test that unsupported arrayelements return false in isSupportedArrayElement()
-                    for (int k=0; k< arraySize; k++)
-                    {
-                        if (!contains(arrayElements, k))
-                        {
-                            try
-                            {
-                                boolean supported = lists[i].isSupportedArrayElement(fields[j], k);
-                                if (supported)
-                                {
-                                    String info = "list "+lists[i].getName()+", field "+fields[j]+ " arrayelement "+k;
-                                    failTest("isSupportedArrayElement() for "+ info + "returned true!");
-                                }
-                            }
-                            catch (Exception e)
-                            {
-                                String info = "list "+lists[i].getName()+", field "+fields[j]+ " arrayelement "+k;
-                                failTest("isSupportedArrayElement() for "+ info + " threw: " +e);
-                            }
-                        }
-                    }
-                    // test that invalid arrayelements return false in isSupportedArrayElement()
-                    int[] invalids = { -1000, -128, -5, -1, arraySize, 2147483647 };
-                    for (int k=0; k< invalids.length; k++)
-                    {
-                        if (!contains(arrayElements, invalids[k]))
-                        {
-                            try
-                            {
-                                boolean supported = lists[i].isSupportedArrayElement(fields[j], invalids[k]);
-                                if (supported)
-                                {
-                                    String info = "list "+lists[i].getName()+", field "+fields[j]+ " arrayelement "+invalids[k];
-                                    failTest("isSupportedArrayElement() for "+ info + "returned true!");
-                                }
-                            }
-                            catch (Exception e)
-                            {
-                                String info = "list "+lists[i].getName()+", field "+fields[j]+ " arrayelement "+invalids[k];
-                                failTest("isSupportedArrayElement() for "+ info + " threw: " +e);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    private boolean contains(int[] array, int value)
-    {
-        for (int i=0; i < array.length; i++)
-        {
-            if (array[i] == value)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void testStringArrays(PIMList[] lists) throws TestEndThrowable
-    {
-        log("testing stringArrays");
-        for (int i = 0; i < lists.length; i++)
-        {
-            // test supported fields
-            int[] fields = (int[]) supportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                int dataType = lists[i].getFieldDataType(fields[j]);
-                if (dataType == PIMItem.STRING_ARRAY)
-                {
-                    int arraySize = lists[i].stringArraySize(fields[j]);
-                    int[] arrayElements = lists[i].getSupportedArrayElements(fields[j]);
-                    for (int k=0; k< arrayElements.length; k++)
-                    {
-                        String label = lists[i].getArrayElementLabel(fields[j], arrayElements[k]);
-                        String info = "list "+lists[i].getName()+", field "+fields[j]+
-                                      " arrayelement "+arrayElements[k] +"(label: "+label+")";
-                        log(info);
-                        if (arrayElements[k] >= arraySize)
-                        {
-                            failTest("stringArraySize() for "+ info + "is smaller than some "+
-                                     "of the indexes returned by getSupportedArrayElements()");
-                        }
-                        if (!lists[i].isSupportedArrayElement(fields[j], arrayElements[k]))
-                        {
-                            failTest("isSupportedArrayElement() for "+ info + "returned false!");
-                        }
-                        if (label == null)
-                        {
-                            failTest("getArrayElementLabel() for "+ info + "returned null!");
-                        }
-                        else if (label.length() == 0)
-                        {
-                            failTest("getArrayElementLabel() for " + info + " returned empty string!");
-                        }
-                    }
-                }
-                else
-                {
-                    String info = "list "+lists[i].getName()+", field "+fields[j];
-                    try
-                    {
-                        int[] arrayElements = lists[i].getSupportedArrayElements(fields[j]);
-                        failTest("getSupportedArrayElements() for "+ info + "did not throw IAE!");
-                    }
-                    catch (IllegalArgumentException iae)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest("getSupportedArrayElements() for "+ info + "did not throw IAE but "+e);
-                    }
-                }
-            }
-            // test unsupported fields
-            fields = (int[]) unsupportedFields.get(lists[i].getName());
-
-            for (int j = 0; j<fields.length; j++)
-            {
-                if (isUnsupportedSA(lists[i], fields[j]))
-                {
-                    String info = "list "+lists[i].getName()+", field "+fields[j];
-                    try
-                    {
-                        int[] arrayElements = lists[i].getSupportedArrayElements(fields[j]);
-                        failTest("getSupportedArrayElements() for "+ info + "did not throw UFE!");
-                    }
-                    catch (UnsupportedFieldException ufe)
-                    {
-                        //ok
-                    }
-                    catch (Exception e)
-                    {
-                        failTest("getSupportedArrayElements() for "+ info + "did not throw UFE but "+e);
-                    }
-                }
-            }
-        }
-    }
-
-    private void classifyFields(PIMList[] lists) throws TestEndThrowable
-    {
-        for (int i=0; i < lists.length; i++)
-        {
-            try
-            {
-                int[] fields = lists[i].getSupportedFields();
-                supportedFields.put(lists[i].getName(), fields);
-
-                int[] tmpFields = null;
-                if (lists[i] instanceof ContactList)
-                {
-                    tmpFields = valuesNotInSecondList(contactFields, fields);
-                }
-                else if (lists[i] instanceof EventList)
-                {
-                    tmpFields = valuesNotInSecondList(eventFields, fields);
-                }
-                else if (lists[i] instanceof ToDoList)
-                {
-                    tmpFields = valuesNotInSecondList(todoFields, fields);
-                }
-                unsupportedFields.put(lists[i].getName(), tmpFields);
-            }
-            catch (Exception ex)
-            {
-                failTest("Error while classifying fields: " + ex);
-            }
-        }
-    }
-    // returns array containing those values in the first list
-    // that are not contained in the  second list
-    private int[] valuesNotInSecondList(int[] first, int[] second)
-    {
-        int[] ret = new int[ first.length - second.length ];
-        int index = 0;
-
-        for (int i=0; i<first.length; i++)
-        {
-            boolean found = false;
-            for (int j=0; j<second.length; j++)
-            {
-                if (first[i] == second[j])
-                {
-                    found = true;
-                }
-            }
-            if (!found)
-            {
-                ret[index++] = first[i];
-            }
-        }
-        return ret;
-    }
-
-    private void closeLists(PIMList[] lists) throws TestEndThrowable
-    {
-        try
-        {
-            for (int i = 0; i < lists.length; i++)
-            {
-                lists[i].close();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing lists: " +e);
-        }
-    }
-
-    private PIMList[] openAllLists(int mode) throws TestEndThrowable
-    {
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] contactListNames = p.listPIMLists(PIM.CONTACT_LIST);
-            String[] eventListNames = p.listPIMLists(PIM.EVENT_LIST);
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            PIMList[] contactLists = openLists(p, PIM.CONTACT_LIST, contactListNames, mode);
-            PIMList[] eventLists = openLists(p, PIM.EVENT_LIST, eventListNames, mode);
-            PIMList[] todoLists = openLists(p, PIM.TODO_LIST, todoListNames, mode);
-
-            return combineLists(contactLists, eventLists, todoLists);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-        return null;
-    }
-
-    private PIMList[] openLists(PIM aP, int aListType, String[] aNames, int aMode)
-    throws PIMException
-    {
-        PIMList[] pimLists = new PIMList[ aNames.length ];
-        for (int i = 0; i < aNames.length; i++)
-        {
-            pimLists[ i ] = aP.openPIMList(aListType, aMode, aNames[ i ]);
-        }
-        return pimLists;
-    }
-
-    private PIMList[] combineLists(PIMList[] pl1, PIMList[] pl2, PIMList[] pl3)
-    {
-        PIMList[] pimLists = new PIMList[ pl1.length + pl2.length + pl3.length ];
-        int i = 0;
-        for (int j=0; j < pl1.length; j++)
-        {
-            pimLists[ i++ ] = pl1[j];
-        }
-        for (int j=0; j < pl2.length; j++)
-        {
-            pimLists[ i++ ] = pl2[j];
-        }
-        for (int j=0; j < pl3.length; j++)
-        {
-            pimLists[ i++ ] = pl3[j];
-        }
-        return pimLists;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLcategoryTester.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic ;
-// IMPORTS
-import java.lang.String;
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * Base that tests the category functionality
- *
- * This class is common for all category tests and
- * it must not be changed unless you are implementing
- * new common test or updating some old tests
- */
-
-public abstract class PLcategoryTester
-{
-
-    /**
-     * Constructor
-     */
-    public void PLcategoryTester()
-    {
-    }
-
-    /**
-     * Tries to create a category to the specified PIM API list
-     *
-     * @param aList PIM list where to create the category
-     * @param aCategoryName Category name which will be created
-     * @return true if category was successfully created, false if not
-     */
-    public static boolean testCreateCategory(
-        PIMList aList,
-        String aCategoryName)
-    {
-
-        if (aList == null)
-        {
-            // Test not initialized
-            return false;
-        }
-        // Try creating category
-        try
-        {
-            aList.addCategory(aCategoryName);
-        }
-        catch (PIMException pe)
-        {
-            // Categories not supported
-            return false;
-        }
-        // Category was created
-        return true;
-    }
-
-    /**
-     * Tries to delete a category from the specified PIM API list
-     *
-     * @param aList PIM list from where the category is deleted
-     * @param aCategoryName Category name which will be deleted
-     * @return true if category was successfully deleted, false if not
-     */
-    public static boolean testDeleteCategory(
-        PIMList aList,
-        String aCategoryName)
-    {
-
-        if (aList == null)
-        {
-            // Test not initialized
-            return false;
-        }
-        // Try creating category
-        try
-        {
-            aList.deleteCategory(aCategoryName, true);
-        }
-        catch (PIMException pe)
-        {
-            return false;
-        }
-        // Category was deleted
-        return true;
-    }
-
-    /**
-     * Tries to rename a category from the specified PIM API list
-     *
-     * @param aList PIM list which category will be renamed
-     * @param aOldName Category's old name
-     * @param aNewname Category's new name
-     * @return true if category was successfully renamed, false if not
-     */
-    public static boolean testRenameCategory(
-        PIMList aList,
-        String aOldName,
-        String aNewName)
-    {
-
-        if (aList == null)
-        {
-            // Test not initialized
-            return false;
-        }
-        // Try creating category
-        try
-        {
-            aList.renameCategory(aOldName, aNewName);
-        }
-        catch (PIMException pe)
-        {
-            return false;
-        }
-        // Category was renamed
-        return true;
-    }
-
-    /**
-     * Test that PIMList.maxCategories() returns right amount
-     * of maximun categories
-     *
-     * @param aList PIM list from where to ask maximum number of categories
-     * @param aMaxCategories Expected number of maximum categories
-     * @param aIsStaticCategories 0 or 1 indication static categories or unlimited
-     * @param aStaticCategories The names of the static categories
-     * @return null string if the test was OK, otherwise a string with
-     *         error description
-     */
-    public static String testMaxCategories(
-        PIMList aList,
-        int aMaxCategories,
-        int aIsStaticCategories,
-        String[] aStaticCategories)
-    {
-        String error = null;
-        int maxCategories = -2; // -2 not supported by the API
-        String testCategory = "testCategory12344321";
-        String renamedTestCategory = "renamedTestCategory12344321";
-
-        if (aList == null)
-        {
-            return "Test has not been initialized";
-        }
-        // Get number of categories and compare
-        // it to expected number of categories
-        maxCategories = aList.maxCategories();
-        if (maxCategories != aMaxCategories)
-        {
-            return "Number of categories didn't match. maxCategoires() returned: " +
-                   maxCategories + " Expected number was: " + aMaxCategories;
-        }
-        // If this PIM API version supports only static
-        // categories, test that the static categories
-        // are found
-        if (aIsStaticCategories == 1)
-        {
-            error = testGetCategories(aList, aStaticCategories);
-            if (error != null)
-            {
-                return error;
-            }
-        }
-        // If unlimited number of categories is supported
-        // test creation, deletion and renaming a category
-        if (aMaxCategories == -1)
-        {
-            // Create
-            System.out.println("Log::PLcategoryTester - Creating category");
-            if (!testCreateCategory(aList, testCategory))
-            {
-                return "Unable to create category: " + testCategory;
-            }
-            // Rename
-            System.out.println("Log::PLcategoryTester - Renaming category");
-            if (!testRenameCategory(aList, testCategory, renamedTestCategory))
-            {
-                return "Unable to rename category: " + testCategory;
-            }
-            // Delete
-            System.out.println("Log::PLcategoryTester - Deleting category");
-            if (!testDeleteCategory(aList, renamedTestCategory))
-            {
-                return "Unable to delete category: " + renamedTestCategory;
-            }
-        }
-
-        // Test was ok
-        return null;
-    }
-
-    /**
-     * Tests that getCategories returns the right names of
-     * categories in the PIM list
-     *
-     * @param aList PIM list from where to get categories
-     * @param aTestCategories Category names which should be found from
-     *        the categories list
-     * @return null string if the test was OK, otherwise a string with
-     *         error description
-     */
-    public static String testGetCategories(
-        PIMList aList,
-        String[] aTestCategories)
-    {
-        String[] categories = null;
-        boolean found = false;
-
-        // Check that test is initialized
-        if (aList == null)
-        {
-            return "Test has not been initalized";
-        }
-
-        // Get categories
-        try
-        {
-            categories = aList.getCategories();
-        }
-        catch (PIMException pe)
-        {
-            pe.printStackTrace();
-            return "Cannot get categories. PIMList is not accessible";
-        }
-
-        // Check that the test categories match
-        // with the categories that the API returns
-        for (int i = 0; i < aTestCategories.length; i++)
-        {
-            for (int j = 0; j < categories.length; j++)
-            {
-                if (aTestCategories[ i ].equals(categories[ j ]))
-                {
-                    found = true;
-                }
-            }
-            // Check if the category was found
-            if (!found)
-            {
-                return "Category name " + aTestCategories[ i ] +
-                       " was not found from the contact list categories";
-            }
-            found = false;
-        }
-        // Test was ok
-        return null;
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLitemTester.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic;
-// IMPORTS
-import java.lang.String;
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * Base that tests the items of a PIM list
- *
- * Tests the following features:
- '    - Maximum values of items
- *    - Different attribute combinations
- *
- * This class is common for all item test and
- * must not be changed unless you are implementing
- * new common test for all platforms or updating
- * some tests.
- *
- */
-
-public class PLitemTester
-{
-
-    /**
-     * Constructor
-     */
-    public void PLitemTester()
-    {
-    }
-
-    /**
-     * Tests maximum values of the PIM list fields
-     *
-     * @param aList PIM API list
-     * @param aFieldsData hash table containing the test data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testMaximumValues(
-        PIMList aList,
-        Hashtable aFieldsData)
-    {
-        // Check that test is ready to run
-        if (aList == null ||
-                aFieldsData == null)
-        {
-            return "Test has not been initialized";
-        }
-
-        Enumeration keys = aFieldsData.keys();
-
-        for (int i = 0; i < aFieldsData.size(); i++)
-        {
-            // Get field id and its maximum value
-            int field = ((Integer) keys.nextElement()).intValue();
-            int maximumValues = ((Integer) aFieldsData.get(new Integer(field))).intValue();
-
-            // Check that values match
-            if (maximumValues !=  aList.maxValues(field))
-            {
-                return "Field " + field + " has wrong number of maximum values "
-                       + aList.maxValues(field);
-            }
-        }
-        // Test was ok
-        return null;
-    }
-
-    /**
-     * Tests attribute combinations of the specific PIM list
-     *
-     * @param aList PIM API list
-     * @param aItem PIM API list item
-     * @param aTestData Class containing test data
-     */
-    public static String testAttributeCombinations(
-        PIMList aList,
-        PIMItem aItem,
-        SupportTestData aTestData)
-    {
-        if (aItem == null ||
-                aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-        Vector fields = aTestData.getSupportedAttributeFields();
-
-        for (int i = 0; i < fields.size(); i++)
-        {
-            // Get test data
-            int field = ((Integer) fields.elementAt(i)).intValue();
-            Vector attributeCombinations = aTestData.getFieldAttributeCombinations(field);
-            Vector fieldValues = aTestData.getFieldValue(field);
-
-            // Test all combinations
-            for (int j = 0; j < attributeCombinations.size(); j++)
-            {
-                int attributes = ((Integer) attributeCombinations.elementAt(j)).intValue();
-                Object value = fieldValues.elementAt(j);
-                System.out.println("Log: PLitemTester: Testing field: " + field +
-                                   ". Attributes: " + attributes + ". Value: " + value.toString());
-                // Commit item with specific attributes and value
-                if (!commitItem(aList, aItem, field, attributes, value))
-                {
-                    return "Could not commit item field: " + field;
-                }
-                // Check that valid attributes are returned
-                if (attributes != aItem.getAttributes(field, 0))
-                {
-                    return "Bitmask of the attributes didn't match for the field " + field
-                           + ". Expected: " + attributes + " Returned: " + aItem.getAttributes(field, 0);
-                }
-                if (!removeField(aItem, field , 0))
-                {
-                    return "Could not remove field data for field: " + field;
-                }
-            }
-        }
-
-        // Test was ok
-        return null;
-    }
-
-    /**
-     * Commits the PIM item
-     */
-    private static boolean commitItem(
-        PIMList aList,
-        PIMItem aItem,
-        int aField,
-        int aAttributes,
-        Object aValue)
-    {
-        int dataType = 0;
-        // Get data type of the current field so
-        // we know which type of date we have to add
-        // to the item
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-            System.out.println("Log: PLItemTester:commitItem: Data type of the field is: " + dataType);
-        }
-        catch (UnsupportedFieldException ufe)
-        {
-            ufe.printStackTrace();
-            return false;
-        }
-        try
-        {
-            // Add corresponding data to the PIM list item
-            switch (dataType)
-            {
-            case PIMItem.INT:
-            {
-                aItem.addInt(
-                    aField,
-                    aAttributes,
-                    ((Integer) aValue).intValue());
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                aItem.addBoolean(
-                    aField,
-                    aAttributes,
-                    ((Boolean) aValue).booleanValue());
-                break;
-            }
-            case PIMItem.STRING:
-            {
-                aItem.addString(
-                    aField,
-                    aAttributes,
-                    ((String) aValue).toString());
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                byte[] byteArray = ((String) aValue).toString().getBytes();
-                aItem.addBinary(
-                    aField,
-                    aAttributes,
-                    byteArray,
-                    0,
-                    byteArray.length);
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] stringArray = (String[]) aValue;
-                aItem.addStringArray(
-                    aField,
-                    aAttributes,
-                    stringArray);
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                aItem.addDate(
-                    aField,
-                    aAttributes,
-                    ((Long) aValue).longValue());
-                break;
-            }
-            default:
-            {
-                System.out.println("Unknown field data type: " + dataType);
-                return false;
-            }
-            }
-        }
-        catch (FieldFullException ff)
-        {
-            ff.printStackTrace();
-            return false;
-        }
-
-        // Save the item so that valid attributes are
-        // left into the item
-        try
-        {
-            aItem.commit();
-        }
-        catch (PIMException pe)
-        {
-            pe.printStackTrace();
-            return false;
-        }
-        // Success
-        return true;
-    }
-
-    /**
-     * Removes specific field from PIM item
-     */
-    private static boolean removeField(
-        PIMItem aItem,
-        int aField,
-        int aIndex)
-    {
-        try
-        {
-            aItem.removeValue(aField, aIndex);
-        }
-        catch (UnsupportedFieldException ufe)
-        {
-            ufe.printStackTrace();
-            return false;
-        }
-        // Success
-        return true;
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLpriorityTester.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic ;
-// IMPORTS
-import java.lang.String;
-import javax.microedition.pim.*;
-
-// CLASS DEFINITION
-/**
- * Base that tests the support functionality
- *
- * This class is common for all support test and
- * must not be changed unless you are implementing
- * new common test or updating some tests
- */
-
-public class PLpriorityTester
-{
-
-    /**
-     * Constructor
-     */
-    public void PLpriorityTester()
-    {
-    }
-
-    /**
-     * Tests that item of ToDo list returns right mapped priorities
-     * Tested operations: ToDo.setInt(...) ToDo.getInt(...)
-     *
-     * NOTE: The arrays must be equal length. The first array has values which
-     *       are to be tested. The second array has the values correspond to
-     *       the values of the first array but they are mapped values. E.g
-     *       in PIM API 3.0 priority value 2 is high and it must be mapped
-     *       to value 3.
-     *
-     * @param aToDoItem Newly created ToDo item
-     * @param aTestPriorityValues Tested priority values
-     * @param aMappedPriorityValues Mapped priority values
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testPriorityMappings(
-        ToDo aToDoItem,
-        int[] aTestPriorityValues,
-        int[] aMappedPriorityValues,
-        boolean aDoCommit)
-    {
-        int priority = -1;
-
-        // Check that test has been initialized
-        if (aToDoItem == null ||
-                aTestPriorityValues == null ||
-                aMappedPriorityValues == null)
-        {
-            return "Test has not been initialized";
-        }
-        // Add first priority
-        aToDoItem.addInt(ToDo.PRIORITY, PIMItem.ATTR_NONE, aTestPriorityValues[ 0 ]);
-        // Do first commit
-        if (aDoCommit)
-        {
-            try
-            {
-                aToDoItem.commit();
-            }
-            catch (PIMException pe)
-            {
-                pe.printStackTrace();
-                return "ToDo.commit() threw an unexpected exception: " + pe.toString();
-            }
-        }
-        // Check that added priority matches with expected priority
-        // and is mapped right
-        priority = aToDoItem.getInt(ToDo.PRIORITY, 0);
-        if (priority != aMappedPriorityValues[ 0 ])
-        {
-            return "Priority value " + aTestPriorityValues[ 0 ] + " was mapped "
-                   + "to value " + priority + ". Should have been "
-                   + aMappedPriorityValues[ 0 ];
-        }
-
-        // Do this for the rest of the priorities
-        for (int i = 1; i < aTestPriorityValues.length; i++)
-        {
-            // Set new priority to index 0 with no attributes
-            aToDoItem.setInt(ToDo.PRIORITY, 0, PIMItem.ATTR_NONE, aTestPriorityValues[ i ]);
-            // Do commit if needed
-            if (aDoCommit)
-            {
-                try
-                {
-                    aToDoItem.commit();
-                }
-                catch (PIMException pe)
-                {
-                    pe.printStackTrace();
-                    return "ToDo.commit() threw an unexpected exception: " + pe.toString();
-                }
-            }
-            // Check that added priority matches with expected priority
-            // and is mapped right
-            priority = aToDoItem.getInt(ToDo.PRIORITY, 0);
-            if (priority != aMappedPriorityValues[ i ])
-            {
-                return "Priority value " + aTestPriorityValues[ i ] + " was mapped "
-                       + "to value " + priority + ". Should have been "
-                       + aMappedPriorityValues[ i ];
-            }
-        }
-
-        // Test was ok
-        return null;
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLstringMaxLen.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,417 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests maximum lengths of string values and string array elements in
- * a PIMList.
- *
- * Derive the list-specific test classes from this class and implement
- * the initTest() and cleanupTest() functions.
- */
-public class PLstringMaxLen
-        extends MIDPTest
-{
-    protected static final int IGNORE = -1;
-    protected static final int UNLIMITED = -2;
-    /**
-     * TEST DATA
-     * Maximum lengths of string fields.
-     * Keys: Integer (field)
-     * Values: Integer (max length)
-     */
-    protected Hashtable iStringFieldMaxLengths = new Hashtable();
-
-    /**
-     * TEST DATA
-     * Maximum lengths of string array elements.
-     * Keys: Integer (field)
-     * Values: int[] (max lengths)
-     */
-    protected Hashtable iStringArrayElemMaxLengths = new Hashtable();
-
-    /**
-     * Derived class must place the tested list here in initTest().
-     */
-    protected PIMList iPimList;
-
-    /**
-     * Derived class must create and place a test item here in initTest().
-     */
-    protected PIMItem iPimItem;
-
-    public PLstringMaxLen(
-        String sTestName,
-        j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-    /**
-     * Test body.
-     * Runs testStringMaxLen for string fields and
-     * testStrArrElemMaxLen for string array fields.
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        if (iStringFieldMaxLengths == null ||
-                iStringArrayElemMaxLengths == null ||
-                iPimList == null ||
-                iPimItem == null)
-        {
-            failTest("The test has not been initialized. "
-                     + "Implement initTest() and cleanupTest() in derived class");
-        }
-
-        //log( "CLstringMaxLen.runTest()" );
-        int[] supportedFields = iPimList.getSupportedFields();
-
-        for (int i = 0; i < supportedFields.length; i++)
-        {
-            int field = supportedFields[ i ];
-            int fieldType = iPimList.getFieldDataType(field);
-
-            if (fieldType == PIMItem.STRING)
-            {
-                log("string field: " + field);
-
-                // determine maxLen, fiddling with the key and value objects
-                Integer fieldObj = new Integer(field);
-
-                Integer maxLengthObj =
-                    (Integer) iStringFieldMaxLengths.get(fieldObj);
-
-                if (maxLengthObj == null)
-                {
-                    failTest("Maximum length is not defined for field: "
-                             + field);
-                }
-
-                int maxLength = maxLengthObj.intValue();
-                if (maxLength > 0)
-                {
-                    log("string field maxLength: " + maxLength);
-                    testStringMaxLen(iPimItem, field, maxLength);
-                }
-                else
-                {
-                    log("skipping field " + field);
-                }
-            }
-            else if (fieldType == PIMItem.STRING_ARRAY)
-            {
-                log("string array field: " + field);
-
-                // determine array of maxLens
-                int[] maxLengths = (int[])
-                                   iStringArrayElemMaxLengths.get(new Integer(field));
-
-                if (maxLengths == null)
-                {
-                    failTest("Maximum lengths are not defined for field: "
-                             + field);
-                }
-
-                int stringArraySize = iPimList.stringArraySize(field);
-
-                int[] supportedArrayElements =
-                    iPimList.getSupportedArrayElements(field);
-
-                testStrArrElemMaxLen(
-                    iPimItem,
-                    field,
-                    stringArraySize,
-                    supportedArrayElements,
-                    maxLengths);
-            }
-        }
-        cleanupTest();
-    }
-
-
-    protected void testStringMaxLen(
-        PIMItem aItem,
-        int aField,
-        int aMaxLength)
-    throws TestEndThrowable
-    {
-        //log( "CLstringMaxLen.testStringMaxLen()" );
-        // a string with aMaxLength chars is needed
-        StringBuffer testChars = new StringBuffer(aMaxLength + 1);
-        for (int i = 0; i < aMaxLength; i++)
-        {
-            testChars.append('a');
-        }
-
-        // test with correct value
-        try
-        {
-            log("testing field " + aField + " with correct value.");
-
-            while (aItem.countValues(aField) > 0)
-            {
-                aItem.removeValue(aField, 0);
-            }
-
-            aItem.addString(aField, PIMItem.ATTR_NONE, testChars.toString());
-            aItem.commit();
-            aItem.removeValue(aField, 0);
-            aItem.commit();
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            failTest("unexpected exception when adding correct "
-                     + "value. " + e);
-        }
-
-        // test with too long a value
-        testChars.append('b');   // length now aMaxLength + 1
-        try
-        {
-
-
-            while (aItem.countValues(aField) > 0)
-            {
-                aItem.removeValue(aField, 0);
-            }
-
-            aItem.addString(aField, PIMItem.ATTR_NONE, testChars.toString());
-
-            aItem.commit();
-
-            failTest("testStringMaxLen: a PIMException should have been "
-                     + "thrown when committing with too long a value.");
-        }
-        catch (PIMException pe)
-        {
-            // OK, expected
-        }
-
-        try
-        {
-            aItem.removeValue(aField, 0);
-            aItem.commit();
-        }
-        catch (PIMException pe)
-        {
-            pe.printStackTrace();
-            failTest("Unexpected PIMException when removing test value: " + pe);
-        }
-    }
-
-
-    protected void testStrArrElemMaxLen(
-        PIMItem aItem,
-        int aField,
-        int aStringArraySize,
-        int[] aSupportedArrayElements,
-        int[] aMaxLengths)
-    throws TestEndThrowable
-    {
-        //log( "CLstringMaxLen.testStrArrElemMaxLen()" );
-
-        String[] stringArray = new String[ aStringArraySize ];
-
-        for (int i = 0; i < aSupportedArrayElements.length; i++)
-        {
-            int elemIndex = aSupportedArrayElements[ i ];
-            int maxLength = aMaxLengths[ elemIndex ];
-
-            log("string array element: " + elemIndex);
-            log("max length: " + maxLength);
-
-            for (int j = 0; j < stringArray.length; j++)
-            {
-                stringArray[ j ] = "";
-            }
-
-            // a string with aMaxLength chars is needed
-            StringBuffer testChars = new StringBuffer(maxLength + 1);
-            for (int k = 0; k < maxLength; k++)
-            {
-                testChars.append('a');
-            }
-
-            // test with correct value
-            try
-            {
-                log("testing field " + aField + " with correct value.");
-
-                System.out.println("testing field " + aField + " with correct value. element " + elemIndex);
-
-                stringArray[ elemIndex ] = testChars.toString();
-
-                aItem.addStringArray(
-                    aField,
-                    PIMItem.ATTR_NONE,
-                    stringArray);
-
-                if (aItem.countValues(aField) != 1)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after addStringArray");
-                }
-
-                aItem.commit();
-
-                if (aItem.countValues(aField) != 1)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after first commit");
-                }
-
-                String[] tempArray = aItem.getStringArray(aField, 0);
-                for (int ii = 0; ii < tempArray.length; ii++)
-                {
-                    if (ii == elemIndex)
-                    {
-                        if (tempArray[ ii ].length() != testChars.length())
-                        {
-                            failTest("testStrArrElemMaxLen: incorrect length after commit in element " + i);
-                        }
-                    }
-                    else
-                    {
-                        if (tempArray[ ii ] != null && tempArray[ ii ].length() != 0)
-                        {
-                            failTest("testStrArrElemMaxLen: incorrect length after commit in element " + i);
-                        }
-                    }
-                }
-
-                aItem.removeValue(aField, 0);
-
-                if (aItem.countValues(aField) != 0)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after removeValue");
-                }
-
-                aItem.commit();
-
-                if (aItem.countValues(aField) != 0)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after second commit");
-                }
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-
-                failTest("testStrArrElemMaxLen: unexpected exception when adding"
-                         + "correct value. " + e);
-            }
-
-            // test with too long a value
-            testChars.append('b');   // length now aMaxLength + 1
-            try
-            {
-                log("testing field " + aField + " with incorrect value.");
-                System.out.println("testing field " + aField + " with incorrect value. element " + elemIndex);
-                stringArray[ elemIndex ] = testChars.toString();
-
-                aItem.addStringArray(
-                    aField,
-                    PIMItem.ATTR_NONE,
-                    stringArray);
-
-                if (aItem.countValues(aField) != 1)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after addStringArray");
-                }
-
-                aItem.commit();
-
-                failTest("testStrArrElemMaxLen: a PIMException should have "
-                         + "been thrown when committing with too long a value.");
-            }
-            catch (PIMException pe)
-            {
-                // OK, expected
-            }
-
-            try
-            {
-                if (aItem.countValues(aField) != 1)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after addStringArray and commit");
-                }
-
-                String[] tempArray = aItem.getStringArray(aField, 0);
-                for (int ii = 0; ii < tempArray.length; ii++)
-                {
-                    if (ii == elemIndex)
-                    {
-                        if (tempArray[ ii ].length() != testChars.length())
-                        {
-                            failTest("testStrArrElemMaxLen: incorrect length after failed commit in element " + i);
-                        }
-                    }
-                    else
-                    {
-                        if (tempArray[ ii ] != null && tempArray[ ii ].length() != 0)
-                        {
-                            failTest("testStrArrElemMaxLen: incorrect length after failed commit in element " + i);
-                        }
-                    }
-                }
-
-                aItem.removeValue(aField, 0);
-
-                if (aItem.countValues(aField) != 0)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after failed commit and removevalue");
-                }
-
-                aItem.commit();
-
-                if (aItem.countValues(aField) != 0)
-                {
-                    failTest("testStrArrElemMaxLen: incorrect number of values in the item after ok commit and removevalue");
-                }
-
-            }
-            catch (PIMException pe)
-            {
-                pe.printStackTrace();
-                failTest("Unexpected PIMException when removing test value: " + pe);
-            }
-        }
-    }
-
-    protected void initTest() throws TestEndThrowable
-    {
-        log("PLstringMaxLen::initTest()");
-    }
-
-    protected void cleanupTest()
-    {
-        log("PLstringMaxLen::cleanupTest()");
-    }
-}
-
-// End of Filé
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PLsupportTester.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,450 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic ;
-// IMPORTS
-import java.lang.String;
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * Base that tests the support functionality
- *
- * Provides test functions to:
- *    - supported fields
- *    - supported attributes
- *    - supported array elements
- *    - supported repeat rule fields
- *    - fields order validation
- *
- * This class is common for all support test and
- * must not be changed unless you are implementing
- * new common test for all platforms or updating
- * some tests.
- */
-
-public class PLsupportTester
-{
-
-    private final static int FIELDS = 0;
-    private final static int ARRAY_ELEMENTS = 1;
-
-    /**
-     * Constructor
-     */
-    public void PLsupportTester()
-    {
-    }
-
-    /**
-     * Test supported fields of the list
-     *
-     * @param aList PIM API list
-     * @param aTestData Tested data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testSupportedFields(
-        PIMList aList,
-        SupportTestData aTestData)
-    {
-        int supportedCount = 0;
-
-        if (aList == null ||
-                aTestData == null)
-        {
-            return "Test not initialized";
-        }
-
-        // Test supported fields
-        Vector supportedFields = aTestData.getSupportedFields();
-        // Check all elements initialized
-        for (int i = 0; i < supportedFields.size(); i++)
-        {
-            int field = ((Integer) supportedFields.elementAt(i)).intValue();
-            boolean isSupported = aList.isSupportedField(field);
-            // Check if this field is supported or not
-            System.out.println("Log: PLsupportTester: Testing supported field: " + field);
-            if (!isSupported)
-            {
-                return "Requested field " + field + " is not supported as it should be" ;
-            }
-        }
-        // Check that the count of the tested fields and supported fields match
-        if (supportedFields.size() != aList.getSupportedFields().length)
-        {
-            return "Test has incomplete number of supported fields, "
-                   + "or getSupportedFields() returns wrong amount of data";
-        }
-
-        // Test unsupported fields
-        Vector unsupportedFields = aTestData.getUnsupportedFields();
-        // Check all elements initialized
-        for (int i = 0; i < unsupportedFields.size(); i++)
-        {
-            int field = ((Integer) unsupportedFields.elementAt(i)).intValue();
-            boolean isSupported = aList.isSupportedField(field);
-            // Check if this field is supported or not
-            System.out.println("Log: PLsupportTester: Testing unsupported field: " + field);
-            if (isSupported)
-            {
-                return "Requested field " + field + " is supported as it shouldn't be" ;
-            }
-        }
-        // Check that getSupportedFields returns the right fields
-        // Test was ok if checkSupportedFields returns null
-        return checkSupportedElements(aList, supportedFields, 0, FIELDS);
-    }
-
-    /**
-     * Test supported attributes of the list fields
-     *
-     * @param aList PIM API list
-     * @param aTestData Tested data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testSupportedAttributes(
-        PIMList aList,
-        SupportTestData aTestData)
-    {
-        boolean isSupported = false;
-        String error = null;
-        int singleBit = 1;  // 0001
-        int attributeCount = 0;
-
-        if (aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-        Vector fields = aTestData.getSupportedAttributeFields();
-
-        for (int i = 0; i < fields.size(); i++)
-        {
-            int field = ((Integer) fields.elementAt(i)).intValue();
-            // Get tested attributes of this field
-            int attributes = aTestData.getSupportedAttributes(field);
-            // Test that each attribute is supported
-            while (singleBit <= PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE)
-            {
-                int singleAttribute = (attributes & singleBit);
-
-                if (singleAttribute != 0)
-                {
-                    System.out.println("Testing attribute: " + singleAttribute
-                                       + " for field: " + field);
-                    if (!aList.isSupportedAttribute(field, singleAttribute))
-                    {
-                        return "Unsupported attribute:" + singleAttribute;
-                    }
-                    attributeCount++;
-                }
-                singleBit <<= 1;
-            }
-            // Check that the test count matches with the real count of attributes
-            if (attributeCount != aList.getSupportedAttributes(field).length)
-            {
-                return "Tested field: " + field + " has incomplete number of attributes";
-            }
-
-            // Check that supported attributes can be found from the test data
-            error = checkSupportedAttributes(aList.getSupportedAttributes(field),
-                                             attributes);
-            if (error != null)
-            {
-                return error;
-            }
-
-            // Initialize values fot the next field
-            singleBit = 1;  // Back to 0001
-            attributeCount = 0;
-        }
-        // Test was ok
-        return null;
-    }
-    /**
-     * Test supported array elements
-     *
-     * @param aList PIM API list
-     * @param aFieldsData hash table containing the test data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testSupportedArrayElements(
-        PIMList aList,
-        SupportTestData aTestData)
-    {
-        String error = null;
-
-        if (aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-        Vector fields = aTestData.getSupportedArrayElementFields();
-
-        for (int i = 0; i < fields.size(); i++)
-        {
-            int field = ((Integer) fields.elementAt(i)).intValue();
-            // Get tested attributes of this field
-            Vector arrayElements = aTestData.getSupportedArrayElements(field);
-            // Test array elements
-            System.out.println("Log: PLsupportTester: Testing field: " + field);
-            for (int j = 0; j < arrayElements.size(); j++)
-            {
-                System.out.println("Log: PLsupportTester: Testing array element: " +
-                                   arrayElements.elementAt(j));
-                boolean isSupported = aList.isSupportedArrayElement(field,
-                                      ((Integer) arrayElements.elementAt(j)).intValue());
-                if (!isSupported)
-                {
-                    return "Requested array element " + arrayElements.elementAt(j) +
-                           " is not supported in field " + field;
-                }
-            }
-            // Check that the test count matches with the real count of array elements
-            if (arrayElements.size() != aList.getSupportedArrayElements(field).length)
-            {
-                return "Tested field: " + field + " has incomplete number "
-                       + "of array elements";
-            }
-            // Check that this field's attributes are found from the test data
-            error = checkSupportedElements(aList, arrayElements,
-                                           field, ARRAY_ELEMENTS);
-            if (error != null)
-            {
-                return error;
-            }
-        }
-        // Test was ok
-        return null;
-    }
-    /**
-     * Test supported repeat rule elements for specific PIM list
-     *
-     * @param aList PIM API list
-     * @param iTestData Class containing the test data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testSupportedRRFields(
-        PIMList aList,
-        SupportTestData aTestData)
-    {
-        int fieldCount = 0;
-
-        if (aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-        // Attirbute field functions can be used, thus the
-        // structure of the test data is similar to attribute tests
-        Vector fields = aTestData.getSupportedAttributeFields();
-
-        for (int i = 0; i < fields.size(); i++)
-        {
-            int frequency = ((Integer) fields.elementAt(i)).intValue();
-            // Get tested repeat rules of this field. NOTE: attribute functions
-            // are used due to similar test data structure
-            int supportedRepeatRules = aTestData.getSupportedAttributes(frequency);
-            // Test that each repeat rule is supported
-            int[] apiSupportedFields = ((EventList)
-                                        aList).getSupportedRepeatRuleFields(frequency);
-            System.out.println("Log: PLsupportTester: Testing frequency: " + frequency);
-            for (int j = 0; j < apiSupportedFields.length; j++)
-            {
-                fieldCount++;
-                System.out.println("Log: PLsupportTester: Testing repeat rule: " +
-                                   apiSupportedFields[ j ]);
-                // Bitwise operations used to check support
-                if (supportedRepeatRules != -1)
-                {
-                    if ((supportedRepeatRules & apiSupportedFields[ j ]) == 0 &&
-                            (apiSupportedFields[ j ] != 0))
-                    {
-                        return "getSupportedRepeatRuleFields() returned unexpected "
-                               + "value: " + apiSupportedFields[ j ];
-                    }
-                    // TODO fix test
-                }
-                // No repeat rules
-                else
-                {
-                    fieldCount = 1;
-                    if (apiSupportedFields.length != 1 &&
-                            apiSupportedFields[ 0 ] != 0)
-                    {
-                        return "There is a repeat rule for frequency: " +
-                               frequency + " as there shouldn't be";
-                    }
-                }
-            }
-            if (apiSupportedFields.length != fieldCount)
-            {
-                return "Returned wrong number of supported fields for frequency: "
-                       + frequency + " Expected: " + fieldCount + " Returned: "
-                       + apiSupportedFields.length;
-            }
-            fieldCount = 0;
-        }
-
-        // Test was ok
-        return null;
-    }
-
-    /**
-     * Tests that supported fields are returned in right order
-     *
-     * @param aList PIM API list
-     * @param iTestData Class containing the test data
-     * @return String containing the error decription. null if no errors occured
-     */
-    public static String testFieldsOrder(
-        PIMList aList,
-        SupportTestData aTestData)
-    {
-        int[] fieldsArray = null;
-
-        // Check that test has been initialized
-        if (aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-
-        fieldsArray = aList.getSupportedFields();
-        Vector orderedFields = aTestData.getSupportedFields();
-
-        // Array length and test data size must be equal
-        if (orderedFields.size() != fieldsArray.length)
-        {
-            return "Tested fields and supported fields sizes doesn't match";
-        }
-
-        // Check that fields are in right order
-        for (int i = 0; i < orderedFields.size(); i++)
-        {
-            System.out.println("Log: PLsupportTester: Testing order for field: " +
-                               orderedFields.elementAt(i));
-            if (((Integer) orderedFields.elementAt(i)).intValue() !=
-                    fieldsArray[ i ])
-            {
-                return "Supported field " + fieldsArray[ i ] + " was not "
-                       + "expected to be next field. Field should be "
-                       + orderedFields.elementAt(i);
-            }
-        }
-        // Test was ok
-        return null;
-    }
-
-    /**
-     * Checks that supported elements are found
-     * from the test data. Fields or array elements can be used
-     *
-     * @param aList PIM API list
-     * @param aTestedSupportedElements Vector containing the test data
-     * @param aField Field which array elements are checked
-     * @param aElementType Element types in the test data. Look at the
-     *        top of the class for constants
-     * @return String containing the error decription. null if no errors occured
-     */
-    private static String checkSupportedElements(
-        PIMList aList,
-        Vector aTestedSupportedElements,
-        int aField,
-        int aElementsType)
-    {
-
-        int[] supportedElements = null;
-
-        if (aElementsType == ARRAY_ELEMENTS)
-        {
-            supportedElements = aList.getSupportedArrayElements(aField);
-        }
-        else if (aElementsType == FIELDS)
-        {
-            supportedElements = aList.getSupportedFields();
-        }
-        // Test that all supported elements are found
-        // from test data
-        for (int i = 0; i < supportedElements.length; i++)
-        {
-            System.out.println("Log: checkSupportedElements() Testing element: " +
-                               supportedElements[ i ]);
-            if (!aTestedSupportedElements.contains(new Integer(supportedElements[ i ])))
-            {
-                return "Supported element " + supportedElements[ i ] +
-                       " was not found from the test's supported elements list";
-            }
-        }
-        // Check was ok
-        return null;
-    }
-
-    /**
-     * Checks that supported elements are found
-     * from the test data.
-     *
-     * @param aSupportedAttributes Array containing the supported fields
-     *        that the PIM API list provides
-     * @param aTestSupportedAttributes Integer containing supported attributes which
-     *        the test expects to be supported
-     * @return String containing the error decription. null if no errors occured
-     */
-    private static String checkSupportedAttributes(
-        int[] aSupportedAttributes,
-        int aTestSupportedAttributes)
-    {
-        boolean found = false;
-        int singleBit = 1;  // 0001
-        int j = 0;
-
-        while (singleBit <= PIMItem.EXTENDED_ATTRIBUTE_MIN_VALUE)
-        {
-            int singleAttribute = (aTestSupportedAttributes & singleBit);
-
-            if (singleAttribute != 0)
-            {
-                System.out.println("Log: Checking getSupportedAttributes() "
-                                   + "attribute: " + singleAttribute);
-                for (j = 0; j < aSupportedAttributes.length; j++)
-                {
-                    if (singleAttribute == aSupportedAttributes[ j ])
-                    {
-                        found = true;
-                    }
-                }
-                // Element was not found
-                if (!found)
-                {
-                    return "Supported element " + aSupportedAttributes[ j ] +
-                           " was not found from the supported elements list";
-                }
-            }
-            singleBit <<= 1;
-            found = false;
-        }
-        return null;
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PfromSerialFormat.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,348 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic;
-//IMPORTS
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.Contact;
-import javax.microedition.pim.Event;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.fromSerialFormat()
- *
- */
-public class PfromSerialFormat extends MIDPTest
-{
-
-    public PfromSerialFormat(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-    }
-
-    protected void testNullPointer(PIM aP) throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            PIMItem item[] = aP.fromSerialFormat(null, null);
-        }
-        catch (NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not a NullPointer:" + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("NullPointer exception not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    protected void testUEE(PIM aP, InputStream aStream, String aEncoding)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            PIMItem item[] = aP.fromSerialFormat(aStream, aEncoding);
-        }
-        catch (UnsupportedEncodingException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not UEE:" + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("UEE exception not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    /**
-     * testPIME1 passes if PIMException is thrown, or no exception is thrown
-     * at all.
-     */
-    protected void testPIME1(PIM aP, InputStream aStream, String aDescription)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            PIMItem item[] = aP.fromSerialFormat(aStream, null);
-        }
-        catch (PIMException e)
-        {
-            // PIMException is expected
-            exceptionThrown = true;
-            log(aDescription + " threw PIMException");
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not PIMException:" + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            log(aDescription + " did not throw anything");
-        } // end of if (!exceptionThrown)
-
-    }
-
-    /**
-     * testPIME2 passes only if PIMException is thrown.
-     */
-    protected void testPIME2(PIM aP, InputStream aStream)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            PIMItem item[] = aP.fromSerialFormat(aStream, null);
-        }
-        catch (PIMException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not PIMException:" + e.toString());
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("PIMException not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    protected PIMItem convertItem(PIM aP, InputStream aStream)
-    throws TestEndThrowable
-    {
-        PIMItem item[] = null;
-        try
-        {
-            item = aP.fromSerialFormat(aStream, "UTF-8");
-        }
-        catch (Throwable e)
-        {
-            failTest("fromSerialFormat threw: " + e.toString());
-        } // end of try-catch
-        return item[ 0 ];
-    }
-
-
-    protected void testEvent(PIM aP, InputStream aStream)
-    throws TestEndThrowable
-    {
-        PIMItem item = convertItem(aP, aStream);
-        if (!(item instanceof Event))
-        {
-            failTest("item is not event");
-        }
-        // The contents of the date fields could be checked if TimeZone
-        // and Calendar classes worked.
-        if (item.countValues(Event.START) != 1)
-        {
-            failTest("Event does not have start field");
-        }
-        if (item.countValues(Event.END) != 1)
-        {
-            failTest("Event does not have end field");
-        }
-        String summary = null;
-        try
-        {
-            summary = item.getString(Event.SUMMARY, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("Event getString threw: " + e.toString());
-        } // end of try-catch
-        if (summary.compareTo("timed appointment") != 0)
-        {
-            failTest("Event summary: " + summary);
-        } // end of if (summary.compareTo( "timed appointment" ) != 0)
-    }
-
-    protected void testToDo(PIM aP, InputStream aStream)
-    throws TestEndThrowable
-    {
-        PIMItem item = convertItem(aP, aStream);
-        if (!(item instanceof ToDo))
-        {
-            failTest("item is not todo");
-        }
-        int priority = 0;
-        try
-        {
-            priority = item.getInt(ToDo.PRIORITY, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("Todo get int threw: " + e.toString());
-        } // end of try-catch
-        if ((priority < 1) || (priority > 10))
-        {
-            failTest("Priority not in range [1,10]: " + priority);
-        }
-
-        String summary = null;
-        try
-        {
-            summary = item.getString(ToDo.SUMMARY, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("ToDo getString threw: " + e.toString());
-        } // end of try-catch
-        if (summary.compareTo("Priority2") != 0)
-        {
-            failTest("ToDo summary: " + summary);
-        }
-    }
-
-    protected void testContact(PIM aP, InputStream aStream)
-    throws TestEndThrowable
-    {
-        PIMItem item = convertItem(aP, aStream);
-        if (!(item instanceof Contact))
-        {
-            failTest("item is not contact");
-        }
-        String[] nameArray = getStringArray(item, Contact.NAME);
-        String familyName = nameArray[ Contact.NAME_FAMILY ];
-        if (familyName.compareTo("Internet Mail Consortium") != 0)
-        {
-            failTest("family name is: " + familyName);
-        }
-        //checkString( item, Contact.FORMATTED_NAME, "Internet Mail Consortium" );
-        checkString(item, Contact.ORG, "Internet Mail Consortium");
-        checkString(item, Contact.EMAIL, "info@imc.org");
-        checkTel(item, 0);
-        checkTel(item, 1);
-        String[] addrArray = getStringArray(item, Contact.ADDR);
-        if (addrArray[ Contact.ADDR_STREET ].compareTo("127 Segre Place")
-                != 0)
-        {
-            failTest("street:" + addrArray[ Contact.ADDR_STREET ]);
-        }
-        if (addrArray[ Contact.ADDR_LOCALITY ].compareTo("Santa Cruz")
-                != 0)
-        {
-            failTest("locality:" + addrArray[ Contact.ADDR_LOCALITY ]);
-        }
-        if (addrArray[ Contact.ADDR_REGION ].compareTo("CA")
-                != 0)
-        {
-            failTest("region:" + addrArray[ Contact.ADDR_REGION ]);
-        }
-        if (addrArray[ Contact.ADDR_POSTALCODE ].compareTo("95060")
-                != 0)
-        {
-            failTest("region:" + addrArray[ Contact.ADDR_POSTALCODE ]);
-        }
-        if (addrArray[ Contact.ADDR_COUNTRY ].compareTo("USA")
-                != 0)
-        {
-            failTest("region:" + addrArray[ Contact.ADDR_COUNTRY ]);
-        }
-        checkString(item, Contact.URL, "http://www.imc.org/");
-    }
-
-    protected String[] getStringArray(PIMItem aItem, int aField)
-    throws TestEndThrowable
-    {
-        String[] stringArray = null;
-        try
-        {
-            stringArray = aItem.getStringArray(aField, 0);
-        }
-        catch (Throwable e)
-        {
-            failTest("getStringArray threw: " + e.toString());
-        } // end of try-catch
-        return stringArray;
-    }
-
-    protected void checkTel(PIMItem aItem, int aIndex)
-    throws TestEndThrowable
-    {
-        String tel = getString(aItem, Contact.TEL, aIndex);
-        int telAttr = aItem.getAttributes(Contact.TEL, aIndex);
-        if ((telAttr & Contact.ATTR_FAX) != 0)
-        {
-            if (tel.compareTo("+1 831 426 7301") != 0)
-            {
-                failTest("Fax number: " + tel);
-            } // end of if (tel.compareTo( "+1 831 426 7301" ) != 0)
-        } // end of if (( telAttr & Contact.ATTR_FAX ) != 0)
-        else
-        {
-            if (tel.compareTo("+1 831 426 9827") != 0)
-            {
-                failTest("Voice number: " + tel);
-            }
-        } // end of else
-    }
-
-
-    protected String getString(PIMItem aItem, int aField, int aIndex)
-    throws TestEndThrowable
-    {
-        String string = null;
-        try
-        {
-            string = aItem.getString(aField, aIndex);
-        }
-        catch (Throwable e)
-        {
-            failTest("getString threw: " + e.toString());
-        } // end of try-catch
-        return string;
-    }
-
-    protected void checkString(PIMItem aItem, int aField, String aString)
-    throws TestEndThrowable
-    {
-        String string = getString(aItem, aField, 0);
-        if (string.compareTo(aString) != 0)
-        {
-            failTest("unexpected string:" + string + ", wanted:" + aString);
-        } // end of if (string.compareTo( aString ) != 0)
-    }
-
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PserializationTester.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic ;
-// IMPORTS
-import java.lang.String;
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
-
-// CLASS DEFINITION
-/**
- * Base that tests the items of a PIM list
- *
- * Tests following features:
- '    - When item is exported the stream should coutain
- '      expected result
- *
- * This class is common for all item test and
- * must not be changed unless you are implementing
- * new common test for all platforms or updating
- * some tests.
- */
-
-public class PserializationTester
-{
-    // Static constants
-    public static String STRING_VCARD_FORMAT = "VCARD/2.1";
-    public static String STRING_VCALENDAR_FORMAT = "VCALENDAR/1.0";
-
-    // Private. Used in serialization check
-    private static String STRING_VCARD_START_FIELD = "BEGIN:VCARD";
-    private static String STRING_VCALENDAR_START_FIELD = "BEGIN:VCALENDAR";
-    private static String STRING_VERSION_10 = "VERSION:1.0";
-    private static String STRING_VERSION_21 = "VERSION:2.1";
-    private static String STRING_VTODO_START = "BEGIN:VTODO";
-    private static String STRING_VEVENT_START = "BEGIN:VEVENT";
-    private static String STRING_VCARD_END_FIELD = "END:VCARD";
-    private static String STRING_VCALENDAR_END_FIELD = "END:VCALENDAR";
-    private static String STRING_VTODO_END = "END:VTODO";
-    private static String STRING_VEVENT_END = "END:VEVENT";
-    /**
-     * Constructor. Prohibit construction
-     */
-    private void PserializationTester()
-    {
-    }
-
-    /**
-     * Tests PIM.toSerialFormat(). Tests that the result of the function corresponds
-     * the test data (i.e the versit result includes the expected test string
-     *
-     * @param aList Tested PIM List
-     * @param aItem Tested PIM item
-     * @param aTestData Test data including fields, values and versit results
-     * @param aEncoding Encoding used in conversion
-     * @param aSerialFormat Serial format used in conversion
-     */
-    public static String testToSerialFormat(
-        PIMList aList,
-        PIMItem aItem,
-        SupportTestData aTestData,
-        String aEncoding,
-        String aSerialFormat)
-    {
-        if (aItem == null ||
-                aList == null ||
-                aTestData == null)
-        {
-            return "Test has not been initialized";
-        }
-        Vector fields = aTestData.getSupportedAttributeFields();
-
-        for (int i = 0; i < fields.size(); i++)
-        {
-            // Get test data
-            int field = ((Integer) fields.elementAt(i)).intValue();
-            Vector attributeCombinations = aTestData.getFieldAttributeCombinations(field);
-            Vector fieldValues = aTestData.getFieldValue(field);
-            Vector versitValues = aTestData.getVersitValue(field);
-
-            // Test all combinations
-            for (int j = 0; j < attributeCombinations.size(); j++)
-            {
-                int attributes = ((Integer) attributeCombinations.elementAt(j)).intValue();
-
-                // Get test values
-                Object value = fieldValues.elementAt(j);
-                String versitValue = ((String) versitValues.elementAt(j)).toString();
-
-                System.out.println("Log: PserializationTester: Testing field: " + field +
-                                   ". Attributes: " + attributes + ". Value: " + value.toString());
-
-                // Commit item with specific attributes and value
-                if (!addFieldValue(aList, aItem, field, attributes, value))
-                {
-                    return "Could not add values to field: " + field;
-                }
-                // Serialize item
-                ByteArrayOutputStream bs = new ByteArrayOutputStream();
-                PIM pim = PIM.getInstance();
-
-                try
-                {
-                    pim.toSerialFormat(aItem, bs, aEncoding, aSerialFormat);
-                }
-                catch (PIMException pe)
-                {
-                    pe.printStackTrace();
-                    return "Error issuing PIM.toSerialFormat()";
-                }
-                catch (UnsupportedEncodingException uee)
-                {
-                    uee.printStackTrace();
-                    return "Unsupported encoding exception when issuing "
-                           + " PIM.toSerialFormat()";
-                }
-                // Check serialization
-                if (!checkSerialization(aItem, bs, versitValue, aSerialFormat))
-                {
-                    System.out.println("Serialized item: " + bs.toString());
-                    return "Serialization for field " + field + " failed";
-                }
-            }
-        }
-        // Success
-        return null;
-    }
-
-    private static boolean addFieldValue(
-        PIMList aList,
-        PIMItem aItem,
-        int aField,
-        int aAttributes,
-        Object aValue)
-    {
-        int dataType = 0;
-        // Get data type of the current field so
-        // we know which type of date we have to add
-        // to the item
-        try
-        {
-            dataType = aList.getFieldDataType(aField);
-            System.out.println("Log: PserializationTester::addFieldValue: Data type of the field is: " + dataType);
-        }
-        catch (UnsupportedFieldException ufe)
-        {
-            ufe.printStackTrace();
-            return false;
-        }
-        try
-        {
-            // Add corresponding data to the PIM list item
-            switch (dataType)
-            {
-            case PIMItem.INT:
-            {
-                float value = ((Long) aValue).longValue();
-                Float floatValue = new Float(value);
-                int intValue = floatValue.intValue();
-                aItem.addInt(
-                    aField,
-                    aAttributes,
-                    intValue);
-                break;
-            }
-            case PIMItem.BOOLEAN:
-            {
-                aItem.addBoolean(
-                    aField,
-                    aAttributes,
-                    ((Boolean) aValue).booleanValue());
-                break;
-            }
-            case PIMItem.STRING:
-            {
-                aItem.addString(
-                    aField,
-                    aAttributes,
-                    ((String) aValue).toString());
-                break;
-            }
-            case PIMItem.BINARY:
-            {
-                byte[] byteArray = ((String) aValue).toString().getBytes();
-                aItem.addBinary(
-                    aField,
-                    aAttributes,
-                    byteArray,
-                    0,
-                    byteArray.length);
-                break;
-            }
-            case PIMItem.STRING_ARRAY:
-            {
-                String[] stringArray = (String[]) aValue;
-                aItem.addStringArray(
-                    aField,
-                    aAttributes,
-                    stringArray);
-                break;
-            }
-            case PIMItem.DATE:
-            {
-                aItem.addDate(
-                    aField,
-                    aAttributes,
-                    ((Long) aValue).longValue());
-                break;
-            }
-            default:
-            {
-                System.out.println("Unknown field data type: " + dataType);
-                return false;
-            }
-            }
-        }
-        catch (FieldFullException ff)
-        {
-            ff.printStackTrace();
-            return false;
-        }
-        return true;
-    }
-
-    private static boolean checkSerialization(
-        PIMItem aItem,
-        ByteArrayOutputStream aByteStream,
-        String aExpectedValue,
-        String aSerialFormat)
-    {
-        if (aExpectedValue == null)
-        {
-            return false;
-        }
-        String stringStream = aByteStream.toString();
-
-        // Test that required fields are in place
-        if (aSerialFormat.equals(STRING_VCARD_FORMAT))
-        {
-            System.out.println("Log: Testing vCard standard fields");
-            if ((stringStream.indexOf(STRING_VCARD_START_FIELD) == -1) ||
-                    (stringStream.indexOf(STRING_VERSION_21) == -1) ||
-                    (stringStream.indexOf(STRING_VCARD_END_FIELD) == -1))
-            {
-                System.out.println("Log: Failed!!!");
-                return false;
-            }
-        }
-        // vCalendar standard fields
-        else if (aSerialFormat.equals(STRING_VCALENDAR_FORMAT))
-        {
-            System.out.println("Log: Testing vCalendar standard fields");
-            if ((stringStream.indexOf(STRING_VCALENDAR_START_FIELD) == -1) ||
-                    (stringStream.indexOf(STRING_VERSION_10) == -1) ||
-                    (stringStream.indexOf(STRING_VCALENDAR_END_FIELD) == -1))
-            {
-                System.out.println("Log: Failed!!!");
-                return false;
-            }
-            // Check specific item
-            if (aItem instanceof Event)
-            {
-                System.out.println("Log: Testing Event standard fields");
-                if ((stringStream.indexOf(STRING_VEVENT_START) == -1) ||
-                        (stringStream.indexOf(STRING_VEVENT_END) == -1))
-                {
-                    System.out.println("Log: Failed!!!");
-                    return false;
-                }
-            }
-            else if (aItem instanceof ToDo)
-            {
-                System.out.println("Log: Testing ToDo standard fields");
-                if ((stringStream.indexOf(STRING_VTODO_START) == -1) ||
-                        (stringStream.indexOf(STRING_VTODO_END) == -1))
-                {
-                    System.out.println("Log: Failed!!!");
-                    return false;
-                }
-            }
-            else
-            {
-                System.out.println("Log: Error: Incorrect item converted using vCalendar conversion");
-                return false;
-            }
-        }
-        else
-        {
-            System.out.println("Log: Error: Incorrect serial format");
-            return false;
-        }
-
-        System.out.println("Log: PSerializationTester::checkSerialization: Testing versit value "
-                           + aExpectedValue);
-        // Check that the specified string can be found from
-        // the result stream
-        if (stringStream.indexOf(aExpectedValue) != -1)
-        {
-            return true;
-        }
-
-        // Not ok
-        return false;
-    }
-}
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/PtoSerialFormat.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,784 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic;
-//IMPORTS
-import java.io.*;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests javax.microedition.pim.PIM.toSerialFormat()
- */
-public class PtoSerialFormat extends MIDPTest
-{
-
-    public PtoSerialFormat(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    protected int contactBinaryField = 110;
-    protected int contactBooleanField = 0;
-    protected int contactDateField = 101;
-    protected int contactIntField = 0;
-    protected int contactStringArray = 100;
-    protected int contactStringField = 103;
-    protected int eventBinaryField = 0;
-    protected int eventBooleanField = 0;
-    protected int eventDateField = 106;
-    protected int eventIntField = 100;
-    protected int eventStringArray = 0;
-    protected int eventStringField = 107;
-    protected int todoBinaryField = 0;
-    protected int todoBooleanField = 0;
-    protected int todoDateField = 103;
-    protected int todoIntField = 105;
-    protected int todoStringArray = 0;
-    protected int todoStringField = 107;
-
-
-    public void runTest() throws TestEndThrowable
-    {
-    }
-
-    protected Contact createContact(PIM aP) throws TestEndThrowable
-    {
-        ContactList cList = null;
-        Contact contact = null;
-        try
-        {
-            cList =
-                (ContactList)aP.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
-            contact = cList.createContact();
-            fillItem(contact, cList);
-        }
-        catch (Throwable e)
-        {
-            failTest("could not create contact: " + e);
-        } // end of try-catch
-        return contact;
-    }
-
-    protected Event createEvent(PIM aP) throws TestEndThrowable
-    {
-        EventList eList = null;
-        Event event = null;
-
-        try
-        {
-            eList =
-                (EventList)aP.openPIMList(PIM.EVENT_LIST, PIM.READ_ONLY);
-        }
-        catch (Throwable e)
-        {
-            failTest("Could not open EventList: " + e);
-
-        } // end of try-catch
-        if (eList == null)
-        {
-            failTest("eventList is null");
-        } // end of if (eList == null)
-
-        try
-        {
-            event = eList.createEvent();
-        }
-        catch (Throwable e)
-        {
-            failTest("Could not create Event: " + e);
-        }
-        try
-        {
-            fillItem(event, eList);
-        }
-        catch (Throwable e)
-        {
-            failTest("Could not fill Event: " + e);
-        }
-        return event;
-    }
-
-    protected ToDo createToDo(PIM aP) throws TestEndThrowable
-    {
-        ToDoList tList = null;
-        ToDo todo = null;
-        try
-        {
-            tList =
-                (ToDoList)aP.openPIMList(PIM.TODO_LIST, PIM.READ_ONLY);
-            todo = tList.createToDo();
-            fillItem(todo, tList);
-        }
-        catch (PIMException e)
-        {
-            failTest("Could not create ToDo: " + e);
-        } // end of try-catch
-        return todo;
-    }
-
-    private void fillItem(PIMItem aItem, PIMList aList) throws TestEndThrowable
-    {
-        int[] supportedFields = aList.getSupportedFields();
-        int fieldCount = supportedFields.length;
-        for (int i = 0; i < fieldCount; i++)
-        {
-            int field = supportedFields[ i ];
-            int fieldType = aList.getFieldDataType(field);
-            fillField(aItem, field, fieldType, aList);
-        } // end of for (int i = 0; i < fieldCount; i++)
-    }
-
-    private void fillField(PIMItem aItem, int aField, int aFieldType,
-                           PIMList aList)
-    {
-        // Get supported attributes and combine them into a single integer
-        int[] supportedAttributes = aList.getSupportedAttributes(aField);
-        int supportedAttributesCombined = 0;
-        StringBuffer supportedAttributesString = new StringBuffer();
-
-        for (int i = 0; i < supportedAttributes.length; i++)
-        {
-            supportedAttributesCombined += supportedAttributes[ i ];
-            supportedAttributesString
-            .append(aList.getAttributeLabel(supportedAttributes[ i ]))
-            .append(' ');
-        }
-
-        String itemType = null;
-
-        if (aItem instanceof Contact)
-        {
-            itemType = "Contact";
-        }
-        else if (aItem instanceof Event)
-        {
-            itemType = "Event";
-        }
-        else if (aItem instanceof ToDo)
-        {
-            itemType = "ToDo";
-        }
-        else
-        {
-            itemType = "UNKNOWN";
-        }
-
-        switch (aFieldType)
-        {
-        case PIMItem.INT:
-        {
-            fillIntField(aItem,  aField, supportedAttributesCombined);
-            break;
-        }
-
-        case PIMItem.BINARY:
-        {
-            fillBinaryField(aItem,  aField, supportedAttributesCombined);
-            break;
-        }
-
-        case PIMItem.BOOLEAN:
-        {
-            fillBooleanField(aItem,
-                             aField,
-                             supportedAttributesCombined);
-            break;
-        }
-
-        case PIMItem.DATE:
-        {
-            fillDateField(aItem,  aField, supportedAttributesCombined);
-            break;
-        }
-
-        case PIMItem.STRING_ARRAY:
-        {
-            fillStringArrayField(aItem,
-                                 aField,
-                                 aList.stringArraySize(aField),
-                                 supportedAttributesCombined);
-            break;
-        }
-
-        case PIMItem.STRING:
-        {
-            fillStringField(aItem,  aField, supportedAttributesCombined);
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        } // end of switch (aFieldType)
-    }
-
-    private void fillIntField(PIMItem aItem, int aField, int aAttributes)
-    {
-        try
-        {
-            // Priority needs to be small number as Sync is high
-            if (aField == ToDo.PRIORITY)
-                aItem.addInt(aField, aAttributes, 1);
-            else
-                aItem.addInt(aField, aAttributes, 200);
-        }
-        catch (Throwable e)
-        {
-            // We are not testing addInt here; if adding some int fails,
-            // we may still test toSerialFormat
-        } // end of try-catch
-    }
-
-    private void fillBinaryField(PIMItem aItem, int aField, int aAttributes)
-    {
-        String binaryDotGif =
-            "R0lGODdhAQABAPYAAAAAAP////8AAP8UAP8sAP9FAP9dAP91AP+OAP+mAP++AP/XAP/vAPf/\r\nAN//AMf/AK7/AJb/AH3/AGX/AE3/ADT/AAT/AAD/DAD/JAD/PAD/VQD/bQD/hgD/ngD/tgD/\r\nzwD/5wD//wDn/wDP/wC2/wCe/wCG/wBt/wBV/wA8/wAk/wAM/wQA/xwA/zQA/00A/2UA/30A\r\n/5YA/64A/8cA/98A//cA//8A7/8A1/8Avv8Apv8Ajv8Adf8AXf8ARf8ALP8AFMPDw89dXX19\r\nfXV1dQAAgoKCgv//AFFR+/sUQWFhYZqamjz7NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r\nAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAQABAAAHA4AFgQA7";
-        byte[] binaryBytes = binaryDotGif.getBytes();
-        try
-        {
-            aItem.addBinary(aField, aAttributes, binaryBytes, 0,
-                            binaryBytes.length);
-        }
-        catch (Throwable e)
-        {
-            // We are not testing addBinary here; if adding some binary fails,
-            // we may still test toSerialFormat
-        } // end of try-catch
-    }
-
-    private void fillBooleanField(PIMItem aItem, int aField, int aAttributes)
-    {
-        try
-        {
-            aItem.addBoolean(aField, aAttributes, false);
-        }
-        catch (Throwable e)
-        {
-        } // end of try-catch
-    }
-
-    private void fillDateField(PIMItem aItem, int aField, int aAttributes)
-    {
-        java.util.Date date = new java.util.Date();
-        long time = date.getTime();
-        try
-        {
-            aItem.addDate(aField, aAttributes, time);
-        }
-        catch (Throwable e)
-        {
-        } // end of try-catch
-    }
-
-    private void fillStringArrayField(PIMItem aItem,
-                                      int aField,
-                                      int aArraySize,
-                                      int aAttributes)
-    {
-        String[] stringArray = new String[ aArraySize ];
-        for (int i = 0; i < aArraySize; i++)
-        {
-            stringArray[ i ] = "Test Data";
-        } // end of for (int i = 0; i < aArraySize; i++)
-        try
-        {
-            aItem.addStringArray(aField, aAttributes, stringArray);
-        }
-        catch (Throwable e)
-        {
-        } // end of try-catch
-    }
-
-    protected void fillStringField(PIMItem aItem, int aField, int aAttributes)
-    {
-        try
-        {
-            aItem.addString(aField, aAttributes, "Test Data");
-        }
-        catch (Throwable e)
-        {
-            // no problem here
-        } // end of try-catch
-    }
-
-    protected void testSerialFormats(PIM aP, PIMItem aItem,
-                                     String[] aFormats)
-    throws TestEndThrowable
-    {
-        try
-        {
-            int formatCount = aFormats.length;
-            for (int i = 0; i < formatCount; i++)
-            {
-                testSerialFormat(aP, aItem, aFormats[ i ]);
-            }
-        }
-        catch (TestEndThrowable e)
-        {
-            throw e;
-        } // end of catch
-        catch (Throwable e)
-        {
-            failTest("unexcpected throwable: " + e);
-        } // end of try-catch
-    }
-
-    protected void testNullPointer(PIM aP, PIMItem aItem, String[] aFormats,
-                                   OutputStream aOs)
-    throws TestEndThrowable
-    {
-        try
-        {
-            int formatCount = aFormats.length;
-            for (int i = 0; i < formatCount; i++)
-            {
-                testNullPointer(aP, aItem, aFormats[ i ], aOs);
-            } // end of for (int i = 0; i < formatCount; i++)
-        }
-        catch (TestEndThrowable e)
-        {
-            throw e;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not a NullPointerException: " + e);
-        } // end of catch
-    }
-
-    protected void testUEE(PIM aP, PIMItem aItem, String[] aFormats,
-                           OutputStream aOs)
-    throws TestEndThrowable
-    {
-        // No reason to test all possible formats, the first one will do
-        String format = aFormats [ 0 ];
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.toSerialFormat(aItem, aOs, "NotAnEncodingMethod", format);
-        }
-        catch (java.io.UnsupportedEncodingException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not a UEE: " + e);
-        } // end of catch
-
-        if (!exceptionThrown)
-        {
-            failTest("UEE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    protected void testIAE(PIM aP, PIMItem aItem,
-                           OutputStream aOs)
-    throws TestEndThrowable
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.toSerialFormat(aItem, aOs, null, "NotASerialFormat");
-        }
-        catch (java.lang.IllegalArgumentException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        catch (Throwable e)
-        {
-            failTest("Not a IAE: " + e);
-        } // end of catch
-        if (!exceptionThrown)
-        {
-            failTest("IAE not thrown");
-        } // end of if (!exceptionThrown)
-    }
-
-    protected void testNullPointer(PIM aP, PIMItem aItem, String aFormat,
-                                   OutputStream aOs)
-    throws TestEndThrowable, PIMException, UnsupportedEncodingException
-    {
-        boolean exceptionThrown = false;
-        try
-        {
-            aP.toSerialFormat(aItem, null, null, aFormat);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("No NullPointer when os is null");
-        } // end of if (!exceptionThrown)
-
-        exceptionThrown = false;
-        try
-        {
-            aP.toSerialFormat(aItem, aOs, null, null);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("No NullPointer when dataFormat is null");
-        } // end of if (!exceptionThrown)
-
-        exceptionThrown = false;
-        try
-        {
-            aP.toSerialFormat(null, aOs, null, aFormat);
-        }
-        catch (java.lang.NullPointerException e)
-        {
-            exceptionThrown = true;
-        } // end of try-catch
-        if (!exceptionThrown)
-        {
-            failTest("No NullPointer when item is null");
-        } // end of if (!exceptionThrown)
-    }
-
-    protected void testSerialFormat(PIM aP, PIMItem aItem, String aFormat)
-    throws TestEndThrowable
-    {
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        try
-        {
-            aP.toSerialFormat(aItem, os, null, aFormat);
-            // serial format is not logged due to bugs in javatest
-            System.out.println("testSerialFormat(): toSerialFormat results in: " + os.toString());
-        }
-        catch (Throwable e)
-        {
-            failTest("toSerialFormat threw: " + e);
-        } // end of try-catch
-
-        byte[] byteArray = os.toByteArray();
-        String string = new String(byteArray);
-        // versit object is not logged due bugs in javatest
-        System.out.println("versit object: " + string);
-        ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
-        PIMItem[] items = null;
-        try
-        {
-            items = aP.fromSerialFormat(is, null);
-        }
-        catch (PIMException e)
-        {
-            failTest("fromSerialFormat threw PIMException: " +
-                     e.getMessage());
-        }
-        catch (java.io.UnsupportedEncodingException e)
-        {
-            failTest("fromSerialFormat threw UEE: " + e.getMessage());
-        } // end of catch
-        catch (java.lang.OutOfMemoryError e)
-        {
-            failTest("fromSerialFormat threw OOME: " + e.getMessage());
-        } // end of catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("fromSerial threw IOOBE: " + e.getMessage());
-        } // end of catch
-
-        try
-        {
-            checkItems(aItem, items[ 0 ]);
-        }
-        catch (java.lang.OutOfMemoryError e)
-        {
-            failTest("checkItems threw OOME: " + e.getMessage());
-        } // end of try-catch
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("checkItems threw IOOBE: " + e.getMessage());
-        } // end of catch
-    }
-
-    private void checkItems(PIMItem aOldItem, PIMItem aNewItem)
-    throws TestEndThrowable
-    {
-        // we only test some fields
-        if (aOldItem instanceof Contact)
-        {
-            int field = contactIntField;
-            checkIntField(aOldItem, aNewItem, field);
-
-            field = contactBinaryField;
-            checkBinaryField(aOldItem, aNewItem, field);
-
-            field = contactBooleanField;
-            checkBooleanField(aOldItem, aNewItem, field);
-
-            field = contactDateField;
-            checkDateField(aOldItem, aNewItem, field);
-
-            field = contactStringArray;
-            checkStringArray(aOldItem, aNewItem, field);
-
-            field = contactStringField;
-            checkStringField(aOldItem, aNewItem, field);
-        } // end of if (aOldItem instanceof Contact)
-
-        if (aOldItem instanceof Event)
-        {
-            int field = eventIntField;
-            checkIntField(aOldItem, aNewItem, field);
-
-            field = eventBinaryField;
-            checkBinaryField(aOldItem, aNewItem, field);
-
-            field = eventBooleanField;
-            checkBooleanField(aOldItem, aNewItem, field);
-
-            field = eventDateField;
-            checkDateField(aOldItem, aNewItem, field);
-
-            field = eventStringArray;
-            checkStringArray(aOldItem, aNewItem, field);
-
-            field = eventStringField;
-            checkStringField(aOldItem, aNewItem, field);
-        } // end of if (aOldItem instanceof Event)
-
-        if (aOldItem instanceof ToDo)
-        {
-            int field = todoIntField;
-            checkIntField(aOldItem, aNewItem, field);
-
-            field = todoBinaryField;
-            checkBinaryField(aOldItem, aNewItem, field);
-
-            field = todoBooleanField;
-            checkBooleanField(aOldItem, aNewItem, field);
-
-            field = todoDateField;
-            checkDateField(aOldItem, aNewItem, field);
-
-            field = todoStringArray;
-            checkStringArray(aOldItem, aNewItem, field);
-
-            field = todoStringField;
-            checkStringField(aOldItem, aNewItem, field);
-        }
-    }
-
-    private void checkIntField(PIMItem aOldItem, PIMItem aNewItem, int aField)
-    throws TestEndThrowable
-    {
-        if (aField == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        int oldInt = 0;
-        try
-        {
-            oldInt = aOldItem.getInt(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("old item does not have field:" + aField);
-        } // end of try-catch
-        int newInt = 0;
-        try
-        {
-            newInt = aNewItem.getInt(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("new item does not have field:" + aField);
-        } // end of try-catch
-        if (oldInt != newInt)
-        {
-            failTest("int field does not match");
-        } // end of if (oldInt != newInt)
-    }
-
-    private void checkBinaryField(PIMItem aOldItem, PIMItem aNewItem,
-                                  int field)
-    throws TestEndThrowable
-    {
-        if (field == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        byte[] oldBinary = aOldItem.getBinary(field, 0);
-        byte[] newBinary = aNewItem.getBinary(field, 0);
-        int byteCount = oldBinary.length;
-        if (newBinary.length != byteCount)
-        {
-            failTest("Binaries have different length");
-        } // end of if (newBinary.length != byteCount)
-        for (int i = 0; i < byteCount; i++)
-        {
-            if (oldBinary[ i ] != newBinary[ i ])
-            {
-                failTest("Binaries don't match");
-            } // end of if (oldBinary[ i ] != newBinary[ i ])
-        } // end of for (int i = 0; i < byteCount; i++)
-    }
-
-    private void checkBooleanField(PIMItem aOldItem, PIMItem aNewItem,
-                                   int field)
-    throws TestEndThrowable
-    {
-        if (field == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        boolean oldBool = aOldItem.getBoolean(field, 0);
-        boolean newBool = aNewItem.getBoolean(field, 0);
-        if (oldBool != newBool)
-        {
-            failTest("booleans don't match");
-        } // end of if (oldBool != newBool)
-    }
-
-    private void checkDateField(PIMItem aOldItem, PIMItem aNewItem,
-                                int aField)
-    throws TestEndThrowable
-    {
-        if (aField == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        long oldDate = 0;
-        try
-        {
-            oldDate = aOldItem.getDate(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("Old item does not have date: " + aField);
-        } // end of try-catch
-        long newDate = 0;
-        try
-        {
-            newDate = aNewItem.getDate(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("New item does not have date: " + aField);
-        } // end of try-catch
-
-        if (aField == Contact.BIRTHDAY)
-        {
-            // Comparing the dates would not be wise, as versit does not store
-            // milliseconds. Lets use Calendar and compare only YEAR+MONTH+DATE
-            Calendar oldCal = Calendar.getInstance();
-            oldCal.setTime(new Date(oldDate));
-            Calendar newCal = Calendar.getInstance();
-            newCal.setTime(new Date(newDate));
-
-            if (oldCal.get(Calendar.YEAR) != newCal.get(Calendar.YEAR) ||
-                    oldCal.get(Calendar.MONTH) != newCal.get(Calendar.MONTH) ||
-                    oldCal.get(Calendar.DATE) != newCal.get(Calendar.DATE))
-            {
-                log("old date (" + oldDate + " ms): " +
-                    oldCal.get(Calendar.DATE) + "." +
-                    (oldCal.get(Calendar.MONTH) + 1) + "." +     // January = 0
-                    oldCal.get(Calendar.YEAR) + "  " +
-                    oldCal.get(Calendar.HOUR_OF_DAY) + ":" +
-                    oldCal.get(Calendar.MINUTE) + ":" +
-                    oldCal.get(Calendar.SECOND) + "." +
-                    oldCal.get(Calendar.MILLISECOND));
-                log("new date (" + newDate + " ms): " +
-                    newCal.get(Calendar.DATE) + "." +
-                    (newCal.get(Calendar.MONTH) + 1) + "." +     // January = 0
-                    newCal.get(Calendar.YEAR) + "  " +
-                    newCal.get(Calendar.HOUR_OF_DAY) + ":" +
-                    newCal.get(Calendar.MINUTE) + ":" +
-                    newCal.get(Calendar.SECOND) + "." +
-                    newCal.get(Calendar.MILLISECOND));
-                failTest("dates don't match");
-            }
-        }
-
-        // Comparing the dates would not be wise, as versit does not store
-        // milliseconds. Lets do some rounding
-        else if (((oldDate / 1000) * 1000) != ((newDate / 1000) * 1000))
-        {
-            log("old date: " + oldDate);
-            log("new date: " + newDate);
-            failTest("dates don't match");
-        } // end of if (oldDate != newDate)
-    }
-
-    private void checkStringArray(PIMItem aOldItem, PIMItem aNewItem,
-                                  int field)
-    throws TestEndThrowable
-    {
-        if (field == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        String[] aOldArray = aOldItem.getStringArray(field, 0);
-        String[] aNewArray = aNewItem.getStringArray(field, 0);
-        int stringCount = aOldArray.length;
-        for (int i = 0; i < stringCount; i++)
-        {
-            if (aOldArray[ i ].compareTo(aNewArray[ i ]) != 0)
-            {
-                failTest("string array does not match");
-            } // end of if (aOldArray[ i ].compareTo( aNewArray[ i ] ) != 0)
-        } // end of for (int i = 0; i < stringCount; i++)
-    }
-
-    private void checkStringField(PIMItem aOldItem, PIMItem aNewItem,
-                                  int aField)
-    throws TestEndThrowable
-    {
-        if (aField == 0)
-        {
-            return;
-        } // end of if (field == 0)
-        String oldString = null;
-        try
-        {
-            oldString = aOldItem.getString(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("Old item does not have string: " + aField);
-        } // end of try-catch
-        String newString = null;
-        try
-        {
-            newString = aNewItem.getString(aField, 0);
-        }
-        catch (java.lang.IndexOutOfBoundsException e)
-        {
-            failTest("New item does not have string: " + aField);
-        } // end of try-catch
-        if (oldString.compareTo(newString) != 0)
-        {
-            failTest("Strings don't match");
-        } // end of if (aOldString.compareTo( aNewString ) != 0)
-    }
-}
-
-
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRConstants/RRConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.EventList constants.
- */
-public class RRConstants
-        extends MIDPTest
-{
-
-    public RRConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        int[] constants = { RepeatRule.DAY_IN_MONTH, 1,
-                            RepeatRule.DAY_IN_WEEK, 2,
-                            RepeatRule.DAY_IN_YEAR, 4,
-                            RepeatRule.MONTH_IN_YEAR, 8,
-                            RepeatRule.WEEK_IN_MONTH, 16,
-                            RepeatRule.COUNT, 32,
-                            RepeatRule.END, 64,
-                            RepeatRule.FREQUENCY, 0,
-                            RepeatRule.INTERVAL, 128,
-                            RepeatRule.DAILY, 16,
-                            RepeatRule.WEEKLY, 17,
-                            RepeatRule.MONTHLY, 18,
-                            RepeatRule.YEARLY, 19,
-                            RepeatRule.FIRST, 1,
-                            RepeatRule.SECOND, 2,
-                            RepeatRule.THIRD, 4,
-                            RepeatRule.FOURTH, 8,
-                            RepeatRule.FIFTH, 16,
-                            RepeatRule.LAST, 32,
-                            RepeatRule.SECONDLAST, 64,
-                            RepeatRule.THIRDLAST, 128,
-                            RepeatRule.FOURTHLAST, 256,
-                            RepeatRule.FIFTHLAST, 512,
-                            RepeatRule.SATURDAY, 1024,
-                            RepeatRule.FRIDAY, 2048,
-                            RepeatRule.THURSDAY, 4096,
-                            RepeatRule.WEDNESDAY, 8192,
-                            RepeatRule.TUESDAY, 16384,
-                            RepeatRule.MONDAY, 32768,
-                            RepeatRule.SUNDAY, 65536,
-                            RepeatRule.JANUARY, 131072,
-                            RepeatRule.FEBRUARY, 262144,
-                            RepeatRule.MARCH, 524288,
-                            RepeatRule.APRIL, 1048576,
-                            RepeatRule.MAY, 2097152,
-                            RepeatRule.JUNE, 4194304,
-                            RepeatRule.JULY, 8388608,
-                            RepeatRule.AUGUST, 16777216,
-                            RepeatRule.SEPTEMBER, 33554432,
-                            RepeatRule.OCTOBER, 67108864,
-                            RepeatRule.NOVEMBER, 134217728,
-                            RepeatRule.DECEMBER, 268435456
-                          };
-
-        for (int i=0; i < constants.length; i += 2)
-        {
-            if (constants[i] != constants[i+1])
-            {
-                failTest("Class field (" + (i+1) + ") is not correct.");
-            }
-        }
-        // all is well
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldCount/RRintFieldCount.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldCount;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldCount extends RRintField
-{
-
-    public RRintFieldCount(String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        field = 32;
-        invalids = new int[] { -1, -100 };
-        valids = new int[] { 1, 2, 3, 100, 999, 4096 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInMonth/RRintFieldDayInMonth.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInMonth;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldDayInMonth extends RRintField
-{
-    public RRintFieldDayInMonth(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        field = 1;
-        invalids = new int[] { -100, -1, 0, 32, 33, 44 };
-        valids = new int[] { 1, 2, 3, 7, 15, 28, 29, 30, 31 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInWeek/RRintFieldDayInWeek.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInWeek;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldDayInWeek extends RRintField
-{
-
-    public RRintFieldDayInWeek(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-    public void initTest() throws TestEndThrowable
-    {
-        field = 2;
-        invalids = new int[] { -1, 0, 1, 16, 32, 100, 1000, 1025, 1300481 };
-        valids = new int[] { 1024, 2048, 4096, 8192, 16384, 32768, 65536, 130048 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldDayInYear/RRintFieldDayInYear.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldDayInYear;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldDayInYear extends RRintField
-{
-
-    public RRintFieldDayInYear(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-    public void initTest() throws TestEndThrowable
-    {
-        field = 4;
-        invalids = new int[] { -1, 0, 367 };
-        valids = new int[] { 1, 2, 11, 64, 100, 200, 300, 333, 360, 365, 366 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldFrequency/RRintFieldFrequency.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldFrequency;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldFrequency extends RRintField
-{
-
-    public RRintFieldFrequency(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        defaultVal = 16;
-        field = 0;
-        invalids = new int[] { -100, -1, 0, 1, 2, 14, 15, 20, 21, 100, 1000, 4096 };
-        valids = new int[] { 16, 17, 18, 19 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldInterval/RRintFieldInterval.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldInterval;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldInterval extends RRintField
-{
-
-    public RRintFieldInterval(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        field = 128;
-        invalids = new int[] { -100, -1, 0 };
-        valids = new int[] { 1, 2, 3, 4, 100, 1000, 4096 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldMonthInYear/RRintFieldMonthInYear.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldMonthInYear;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldMonthInYear extends RRintField
-{
-
-    public RRintFieldMonthInYear(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        field = 8;
-        invalids = new int[] { -100, -1, 0, 1, 100, 4096, 65536, 2097153 };
-        valids = new int[] { 131072, 262144, 524288, 1048576, 2097152,
-                             4194304, 8388608, 16777216, 33554432, 67108864,
-                             134217728, 268435456, 268566528, 402653184
-                           };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRFieldWeekInMonth/RRintFieldWeekInMonth.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRFieldWeekInMonth;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.automatic.RepeatRule.*;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintFieldWeekInMonth extends RRintField
-{
-
-    public RRintFieldWeekInMonth(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        field = 16;
-        invalids = new int[] { -100, -1, 0, 1024, 4096, 1111, 9999 };
-        valids = new int[] { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 513, 1023 };
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates/RRdates.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRdates;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRdates
-        extends MIDPTest
-{
-
-    public RRdates(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        RepeatRule rr = new RepeatRule();
-        String[] stringDates = { "050101:080000", "050106:080000", "050111:080000"};
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        // test that calling rr.dates() returns date
-        // for every day (freq=daily as default)
-        Enumeration e = rr.dates(dates[0], dates[1], dates[2]);
-
-        int count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-        if (count != 6)
-        {
-            log(count+ " dates returned.");
-            failTest("rr.dates() did not return every day as default!");
-        }
-        // test that setting subset beginning to bigger than subset ending causes IAE
-        try
-        {
-            Enumeration e2 = rr.dates(dates[0], dates[2], dates[1]);
-            failTest("rr.dates() with bigger subset beginning than ending did not throw Exception!");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // ok
-        }
-        catch (Exception ex)
-        {
-            failTest("rr.dates() with bigger subset beginning than ending threw wrong exception: " +ex);
-        }
-
-        // all is well since we get this far
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates2/RRdates2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRdates2;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRdates2 extends MIDPTest
-{
-
-    public RRdates2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        Enumeration e;
-        int count;
-
-        long hourInMillis = 60 * 60 * 1000;
-        RepeatRule rr = new RepeatRule();
-        String[] stringDates = { "050101:080000", "050106:080000", "050111:080000",
-                                 "050116:080000", "050121:080000", "050126:080000"
-                               };
-
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        rr.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-        rr.setDate(RepeatRule.END, dates[4] + hourInMillis);
-
-        // test that rr.dates() return empty enumeration when range is after END
-        e = rr.dates(dates[0], dates[4] + hourInMillis*2, dates[5]);
-        if (e.hasMoreElements())
-        {
-            failTest("rr.dates() does not return empty enumeration when range is after END!");
-        }
-
-        // test that rr.dates() return empty enumeration when starting date is after END
-        e = rr.dates(dates[4] + hourInMillis*2, dates[0], dates[5]);
-        if (e.hasMoreElements())
-        {
-            failTest("rr.dates() does not return empty enumeration when starting date is after END!");
-        }
-
-        // test that rr.dates() return empty enumeration when range is before starting date
-        e = rr.dates(dates[3], dates[0], dates[2]);
-        if (e.hasMoreElements())
-        {
-            failTest("rr.dates() does not return empty enumeration when range is before starting date!");
-        }
-
-        // test that rr.dates() returns correct enumeration when range starts before starting date
-        e = rr.dates(dates[0], dates[0] - hourInMillis, dates[2] + hourInMillis);
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-        if (count != 11)
-        {
-            failTest("rr.dates() does not return correct enumeration when range starts before starting date!" +
-                     "Count: "+count+", should be 11.");
-        }
-
-        // test that rr.dates() returns correct enumeration when range starts after starting date
-        e = rr.dates(dates[0], dates[1] - hourInMillis, dates[3] + hourInMillis);
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-        if (count != 11)
-        {
-            failTest("rr.dates() does not return correct enumeration when range starts after starting date!" +
-                     "Count: "+count+", should be 11.");
-        }
-
-        // test that rr.dates() returns correct enumeration when range ends after END date
-        e = rr.dates(dates[0], dates[3] - hourInMillis, dates[5] + hourInMillis);
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-        if (count != 6)
-        {
-            failTest("rr.dates() does not return correct enumeration when range ends after END date!" +
-                     "Count: "+count+", should be 6.");
-        }
-
-        // move END date with one month
-        rr.setDate(RepeatRule.END, dates[0] + 31 * 24 * hourInMillis);
-
-        // test that .... something :)
-        e = rr.dates(dates[0], dates[4] - hourInMillis, dates[5] + hourInMillis);
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-        if (count != 6)
-        {
-            failTest("rr.dates() does not return correct enumeration ..." +
-                     "Count: "+count+", should be 6.");
-        }
-
-        // all is well since we get this far
-        passTest();
-    }
-
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates3/RRdates3.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRdates3;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRdates3 extends MIDPTest
-{
-
-    public RRdates3(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        Enumeration e;
-        int count;
-        long tmp;
-
-        long hourInMillis = 60 * 60 * 1000;
-        RepeatRule rr = new RepeatRule();
-        String[] stringDates = { "040101:080000", "041231:080000" };
-
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        rr.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-
-        log("test that rr.dates() FREQUENCY=DAILY return 366 dates (2004 is a leap year)");
-        e = rr.dates(dates[0], dates[0], dates[1]);
-
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-
-        if (count != 366)
-        {
-            failTest("rr.dates() does not return 366 days!");
-        }
-
-        log("test that rr.dates() FREQUENCY=DAILY & INTERVAL=2 return 183 dates (2004 is a leap year)");
-        rr.setInt(RepeatRule.INTERVAL, 2);
-        e = rr.dates(dates[0], dates[0], dates[1]);
-
-        count = 0;
-        tmp = 0;
-        while (e.hasMoreElements())
-        {
-            Date d = (Date) e.nextElement();
-            // test that every other day is skipped
-            if ((count > 1) && (d.getTime() - tmp < hourInMillis * 47))
-            {
-                failTest("rr.dates() with FREQUENCY=DAILY & INTERVAL=2 does not skip every other day!");
-            }
-            tmp = d.getTime();
-            count++;
-        }
-
-        if (count != 183)
-        {
-            failTest("rr.dates() does not return 183 days!");
-        }
-
-        log("test that rr.dates() FREQUENCY=DAILY & INTERVAL=2 & COUNT=2 return 2 dates");
-        rr.setInt(RepeatRule.COUNT, 2);
-        e = rr.dates(dates[0], dates[0], dates[1]);
-
-        count = 0;
-        tmp = 0;
-        while (e.hasMoreElements())
-        {
-            Date d = (Date) e.nextElement();
-            // test that every other day is skipped
-            if ((count > 1) && (d.getTime() - tmp < hourInMillis * 47))
-            {
-                failTest("rr.dates() with FREQUENCY=DAILY & INTERVAL=2 & COUNT=2 does not skip every other day!");
-            }
-            tmp = d.getTime();
-            count++;
-        }
-
-        if (count != 2)
-        {
-            failTest("rr.dates() does not return 2 days!");
-        }
-
-        // all is well since we get this far
-        passTest();
-    }
-
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdates4/RRdates4.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRdates4;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRdates4 extends MIDPTest
-{
-
-    public RRdates4(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        Enumeration e;
-        int count;
-        long tmp;
-
-        long hourInMillis = 60 * 60 * 1000;
-        RepeatRule rr = new RepeatRule();
-        String[] stringDates = { "040101:080000", "040128:080000" };
-
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        rr.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-
-        log("test that rr.dates() FREQUENCY=DAILY return 28 dates");
-        e = rr.dates(dates[0], dates[0], dates[1]);
-
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            e.nextElement();
-            count++;
-        }
-
-        if (count != 28)
-        {
-            failTest("rr.dates() does not return 28 days but " + count);
-        }
-
-        // all is well since we get this far
-        passTest();
-    }
-
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRdatesExcept/RRdatesExcept.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRdatesExcept;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRdatesExcept
-        extends MIDPTest
-{
-
-    public RRdatesExcept(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        Enumeration e, e2;
-        int count;
-
-        long hourInMillis = 60 * 60 * 1000;
-        RepeatRule rr = new RepeatRule();
-        String[] stringDates = { "040101:080000", "040131:080000" };
-
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        rr.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-
-        // verify that every day of the range is returned (or at least count is correct)
-        e = rr.dates(dates[0], dates[0] - hourInMillis, dates[1] + hourInMillis);
-
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            count++;
-            Date d = (Date) e.nextElement();
-            // add every other (=odd) day to except dates
-            if (count % 2 != 0)
-            {
-                rr.addExceptDate(d.getTime());
-            }
-        }
-        if (count != 31)
-        {
-            failTest("Correct number of dates was not returned. Was supposed to return 31, returned " +count);
-        }
-
-        // verify that every other day of the range is returned (or at least count is correct)
-        e = rr.dates(dates[0], dates[0] - hourInMillis, dates[1] + hourInMillis);
-        count = 0;
-        while (e.hasMoreElements())
-        {
-            count++;
-            e.nextElement();
-        }
-        if (count != 15)
-        {
-            failTest("Correct number of dates was not returned. Was supposed to return 15, returned " +count);
-        }
-
-        // tests ok
-        passTest();
-    }
-
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRequals/RRequals.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRequals;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.dates().
- */
-public class RRequals
-        extends MIDPTest
-{
-
-    public RRequals(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        long hourInMillis = 60 * 60 * 1000;
-        RepeatRule rr1 = new RepeatRule();
-        RepeatRule rr2 = new RepeatRule();
-        long date = TimeTool.getTimeInMillis("040101:080000");
-
-        log("Test that empty rrs are equal.");
-        if (!rr1.equals(rr2))
-        {
-            failTest("Two empty RepeatRules are not equal!");
-        }
-
-        log("Test int fields.");
-        rr1.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-        if (rr1.equals(rr2))
-        {
-            failTest("Two different RepeatRules are equal!");
-        }
-
-        rr2.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
-        if (!rr1.equals(rr2))
-        {
-            failTest("Two equal RepeatRules are not equal!");
-        }
-
-        log("Test exception dates.");
-        rr1.addExceptDate(date);
-        if (rr1.equals(rr2))
-        {
-            failTest("Two different RepeatRules are equal!");
-        }
-
-        rr2.addExceptDate(date);
-        if (!rr1.equals(rr2))
-        {
-            failTest("Two equal RepeatRules are notequal!");
-        }
-
-        log("Test that equal does not care about hours&minutes in dates.");
-
-        log("Replace date with date + hour.");
-        Date d = (Date) rr2.getExceptDates().nextElement();
-        rr2.removeExceptDate(d.getTime());
-        rr2.addExceptDate(d.getTime() + hourInMillis);
-
-        if (!rr1.equals(rr2))
-        {
-            failTest("Two equal RepeatRules are not equal!");
-        }
-
-        log("Test that two different dates do not make rrs equals.");
-        Date d2 = (Date) rr2.getExceptDates().nextElement();
-        rr2.removeExceptDate(d2.getTime());
-        rr2.addExceptDate(d2.getTime() + hourInMillis * 100);
-
-        if (rr1.equals(rr2))
-        {
-            failTest("Two different RepeatRules are equal!");
-        }
-
-        log("Removing exception dates.");
-        rr1.removeExceptDate(date);
-        rr2.removeExceptDate(d2.getTime() + hourInMillis * 100);
-
-        log("Test END.");
-        rr1.setDate(RepeatRule.END, date);
-        if (rr1.equals(rr2))
-        {
-            failTest("Two different RepeatRules are equal!");
-        }
-        rr2.setDate(RepeatRule.END, date);
-        if (!rr1.equals(rr2))
-        {
-            failTest("Two equal RepeatRules are notequal!");
-        }
-
-        log("Test passed.");
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRequals2/RRequals2.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRequals2;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.equals().
- */
-public class RRequals2 extends MIDPTest
-{
-
-    public RRequals2(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        RepeatRule rr1 = new RepeatRule();
-        boolean bool = true;
-
-        log("Test that rr.equals(null) returns false");
-        try
-        {
-            bool = rr1.equals(null);
-        }
-        catch (Exception e)
-        {
-            failTest("RepeatRule.equals(null) threw: "+e);
-        }
-
-        if (bool)
-        {
-            failTest("RepeatRule can not be equal with null!");
-        }
-
-        log("Test that empty rr.equals(<object of some other "+
-            "class>) returns false");
-
-        try
-        {
-            bool = rr1.equals(new Integer(352));
-        }
-        catch (Exception e)
-        {
-            failTest("RepeatRule.equals(new Integer(352)) threw: "+e);
-        }
-
-        if (bool)
-        {
-            failTest("RepeatRule can not be equal with Integer object!");
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRexceptDates/RRexceptDates.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRexceptDates;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-// CLASS DEFINITION
-/**
- */
-public class RRexceptDates
-        extends MIDPTest
-{
-
-    public RRexceptDates(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        RepeatRule rr = new RepeatRule();
-        RepeatRule rr2 = new RepeatRule();
-
-        // test that calling rr.getExceptDates() returns empty enumeration
-        Enumeration e = rr.getExceptDates();
-
-        if (e.hasMoreElements())
-        {
-            failTest("rr.getExceptDates() returned a non-empty Enumeration, when no except date is set!");
-        }
-
-        String[] stringDates = { "040101:080000", "040128:080000", "040801:080000", "050218:080000"  };
-        long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-        // test that rr.getExceptDates() returns all dates that were set using rr.addExceptDate()
-        long[] dates2 = new long[dates.length];
-
-        for (int i=0; i < dates.length; i++)
-        {
-            rr.addExceptDate(dates[i]);
-        }
-
-        Enumeration e2 = rr.getExceptDates();
-        int count = 0;
-        while (e2.hasMoreElements())
-        {
-            dates2[count] = ((Date)e2.nextElement()).getTime();
-            count++;
-        }
-        if (count != dates.length)
-        {
-            failTest("rr.getExceptDates() did not return as many dates as was set using rr.addExceptDate()!");
-        }
-
-        // use dates2 to test that date is not modified during add&get
-        for (int i=0; i < dates2.length; i++)
-        {
-            rr2.addExceptDate(dates2[i]);
-        }
-
-        Enumeration e3 = rr2.getExceptDates();
-        int count2 = 0;
-        while (e3.hasMoreElements())
-        {
-            long tmp = ((Date)e3.nextElement()).getTime();
-            count2++;
-            if (!containsLong(dates2, tmp))
-            {
-                failTest("rr2.getExceptDates() did not return the exact date as was set using rr2.addExceptDate()!");
-            }
-        }
-        if (count2 != dates2.length)
-        {
-            failTest("rr2.getExceptDates() did not return as many dates as was set using rr2.addExceptDate()!");
-        }
-
-        // test that after calling rr.removeExceptDate(), date is removed
-        Enumeration e4 = rr2.getExceptDates();
-
-        while (e4.hasMoreElements())
-        {
-            long tmp = ((Date)e4.nextElement()).getTime();
-            rr2.removeExceptDate(tmp);
-
-            if (containsExceptDate(rr2, tmp))
-            {
-                failTest("rr2.removeExceptDate() did not remove the correct date!");
-            }
-        }
-
-        if (rr2.getExceptDates().hasMoreElements())
-        {
-            failTest("rr2.removeExceptDate() did not remove all dates!");
-        }
-
-        // test that adding same date several times will result the date being added only once
-        for (int i=0; i < 10; i++)
-        {
-            rr2.addExceptDate(dates2[0]);
-        }
-        Enumeration e5 = rr2.getExceptDates();
-        e5.nextElement();   // just skip the first element...
-
-        if (e5.hasMoreElements())
-        {
-            failTest("rr2.addExceptDate() can be used to add the same date several times!");
-        }
-
-        // all is well since we get this far
-        passTest();
-    }
-
-    private boolean containsLong(long[] array, long val)
-    {
-        for (int i=0; i<array.length; i++)
-        {
-            if (array[i] == val)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean containsExceptDate(RepeatRule rr, long val)
-    {
-        Enumeration e = rr.getExceptDates();
-        while (e.hasMoreElements())
-        {
-            long tmp = ((Date)e.nextElement()).getTime();
-            if (val == tmp)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRgetDate/RRgetDate.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRgetDate;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getDate().
- */
-public class RRgetDate extends MIDPTest
-{
-
-    public RRgetDate(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private static long iMillis2000 = 946677600000L;
-
-    public void runTest() throws TestEndThrowable
-    {
-        long date=0;
-        RepeatRule r = new RepeatRule();
-
-        // test that getting unset date causes FieldEmptyException
-        try
-        {
-            date = r.getDate(RepeatRule.END);
-            failTest("rr.getDate( RepeatRule.END ) returned a "+
-                     "date when no date is set!");
-        }
-        catch (FieldEmptyException e)
-        {
-            // ok
-        }
-        catch (Exception e)
-        {
-            failTest("rr.getDate( RepeatRule.END ) threw Exception: " + e);
-        }
-
-        // test that using invalid parameter field causes IAE when date is not set
-        for (int i = -5; i < 4098; i++)  // range should be enough
-        {
-            // skip RepeatRule.END since it must not throw IAException
-            if (i == RepeatRule.END)
-            {
-                i++;
-            }
-
-            try
-            {
-                long val = r.getDate(i);
-                failTest("getDate("+i+") did not throw IllegalArgumentException!");
-            }
-            catch (IllegalArgumentException e)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("rr.getDate( "+i+", 1 ) threw wrong Exception: " + e);
-            }
-        }
-
-        for (long i = iMillis2000-1000000L; i < iMillis2000+1000000L; i+=100000L)
-        {
-            // set date to have some value
-            try
-            {
-                r.setDate(RepeatRule.END, i);
-            }
-            catch (Exception e)
-            {
-                failTest("rr.setDate( RepeatRule.END, "+i+" ) threw Exception: " + e);
-            }
-
-            // test that getting date when it is set does not cause FieldEmptyException
-            try
-            {
-                date = r.getDate(RepeatRule.END);
-            }
-            catch (FieldEmptyException e)
-            {
-                failTest("rr.getDate( RepeatRule.END ) threw FFE when date is set!");
-            }
-            catch (Exception e)
-            {
-                failTest("rr.getDate( RepeatRule.END ) threw Exception: " + e);
-            }
-
-            // test that returned date is as set, do it this way because of possible rounding...
-            r.setDate(RepeatRule.END, date);
-            long date2 = r.getDate(RepeatRule.END);
-            if (date != date2)
-            {
-                failTest("rr.getDate( RepeatRule.END ) did not return the date that was set. ");
-            }
-        }
-
-        // test that using invalid parameter field causes IAE when date is set
-        for (int i = -5; i < 4098; i++)  // range should be enough
-        {
-            // skip RepeatRule.END since it must not throw IAException
-            if (i == RepeatRule.END)
-            {
-                i++;
-            }
-
-            try
-            {
-                long val = r.getDate(i);
-                failTest("getDate("+i+") did not throw IllegalArgumentException!");
-            }
-            catch (IllegalArgumentException e)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("rr.getDate( "+i+") threw wrong Exception: " + e);
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRgetFields/RRgetFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRgetFields;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getDate().
- */
-public class RRgetFields extends MIDPTest
-{
-
-    public RRgetFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Tested fields
-        int[] fields = { 0, 1, 2, 4, 8, 16, 32, 64, 128 };
-
-        // Valid value for each field
-        int[] valids = { 16, 1, 1024, 100, 131072, 256, 1, 9466776, 2 };
-
-        // Invalid value for each field (note exception on field 64 (END))
-        int[] invalids = { 15, -1, 1, 0, 4096, -1, -1, 0, -1 };
-
-        // Create the test object
-        RepeatRule rr = new RepeatRule();
-
-        // Ensure that the test object is empty
-        if (rr.getFields().length != 0)
-        {
-            failTest("rr.getFields() returned some fields from new, " +
-                     "empty RepeatRule.");
-        }
-
-        // Ensure that no invalid values are accepted
-        trySetInvalidValues(rr, fields, invalids);
-
-        // Ensure that no invalid values were set
-        if (rr.getFields().length != 0)
-        {
-            failTest("rr.getFields() returned some fields after trying to " +
-                     "set invalid values.");
-        }
-
-        // Set a valid value for each field
-        setValidValues(rr, fields, valids);
-
-        // Ensure that each field has a value
-        if (rr.getFields().length != fields.length)
-        {
-            failTest("rr.getFields() did not return all fields after " +
-                     "setting valid values.");
-        }
-
-        // All clear
-        passTest();
-    }
-
-
-    /**
-     * Tries to set invalid values to RepeatRule fields.
-     * IllegalArgumentException is expected for each field.
-     * @param aFields The fields.
-     * @param aInvalidValues Invalid value for each field.
-     *        NOTE: value for field RepeatRule.END (64) is ignored.
-     *        The value must be large negative long, and it is set
-     *        internally.
-     */
-    protected void trySetInvalidValues(
-        RepeatRule aRepeatRule,
-        int[] aFields,
-        int[] aInvalidValues)
-    throws TestEndThrowable
-    {
-        for (int i=0; i < aFields.length; i++)
-        {
-            if (aFields[i] == RepeatRule.END)
-            {
-                try
-                {
-                    // Try to set invalid value.
-
-                    // Here's something little that needs to be explained.
-                    // We need a large negative to represent a date far
-                    // beyond year 1900, which is the start of time
-                    // for Symbian Agenda Model. Long.MIN_VALUE would be
-                    // OK if it wasn't converted from milliseconds to
-                    // microseconds in the native side, overflowing the
-                    // variable. Thus we divide it with 10k to get a
-                    // suitable number.
-                    // Note that this overrides the 0 from properties.txt
-                    // for field 64 (RepeatRule.END).
-                    long largeNegative = Long.MIN_VALUE / 10000;
-                    aRepeatRule.setDate(aFields[i], largeNegative);
-                    failTest("aRepeatRule.setDate("
-                             +aFields[i]+","+largeNegative+") on "+
-                             "RepeatRule did not throw IAE!");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    // OK, as expected
-                }
-                catch (Exception e)
-                {
-                    // Unexpected exception
-                    failTest("aRepeatRule.setDate("
-                             +aFields[i]+","+aInvalidValues[i]+") on "+
-                             "RepeatRule did not throw IAE but: "+e);
-                }
-            }
-            else // != RepeatRule.END
-            {
-                try
-                {
-                    // Try to set invalid value
-                    aRepeatRule.setInt(aFields[i], aInvalidValues[i]);
-                    failTest("aRepeatRule.setInt("
-                             +aFields[i]+","+aInvalidValues[i]+") on "+
-                             "RepeatRule did not throw IAE!");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    // OK, as expected
-                }
-                catch (Exception e)
-                {
-                    // Unexpected exception
-                    failTest("aRepeatRule.setInt("
-                             +aFields[i]+","+aInvalidValues[i]+") on "+
-                             "RepeatRule did not throw IAE but: "+e);
-                }
-            }
-        }
-    }
-
-    /**
-     * Sets valid values to fields in a RepeatRule. Fails on exception.
-     * @param aRepeatRule The RepeatRule.
-     * @param aFields The fields to set.
-     * @param aValues The values to set for each field.
-     */
-    protected void setValidValues(
-        RepeatRule aRepeatRule,
-        int[] aFields,
-        int[] aValues)
-    throws TestEndThrowable
-    {
-        // test that after setting all fields to valid value
-        // getFields() returns all fields
-        for (int i=0; i < aFields.length; i++)
-        {
-            if (aFields[i] == RepeatRule.END)
-            {
-                // Make it long and large.
-                long tmp = (long)(aValues[i] * 100000L);
-                try
-                {
-                    aRepeatRule.setDate(aFields[i], tmp);
-                }
-                catch (Exception e)
-                {
-                    failTest("aRepeatRule.setDate("
-                             +aFields[i]+","+tmp+") on "+
-                             "RepeatRule threw: "+e);
-                }
-            }
-            else
-            {
-                try
-                {
-                    aRepeatRule.setInt(aFields[i], aValues[i]);
-                }
-                catch (Exception e)
-                {
-                    failTest("aRepeatRule.setInt("
-                             +aFields[i]+","+aValues[i]+") on "+
-                             "RepeatRule threw: "+e);
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRintField.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import javax.microedition.pim.FieldEmptyException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.getInt().
- */
-public class RRintField extends MIDPTest
-{
-
-    public RRintField(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private RepeatRule rr = new RepeatRule();
-
-    protected int field = 0;
-    protected int defaultVal = -1;
-    protected int[] valids = null;
-    protected int[] invalids = null;
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        // test that created repeatrule has not the given field already set
-        if (!contains(rr.getFields(), field))
-        {
-            // test that getting field value when it is not set causes
-            // FieldEmptyException to be thrown
-            try
-            {
-                int val = rr.getInt(field);
-                failTest("rr.getInt( "+field+" ) returned a value when no value is set!");
-            }
-            catch (FieldEmptyException e)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("rr.getInt( "+field+" ) threw Exception: " + e);
-            }
-        }
-        // getFields() returned tested field in constructed RR, this
-        // may be a special case, which has a default value set
-        else
-        {
-            if (defaultVal != -1)
-            {
-                // test that the default value it is correct
-                testDefaultValue(field, defaultVal);
-            }
-            else
-            {
-                failTest("Constructed RR has "+field+" field set!");
-            }
-        }
-
-        // test that setting field to invalid value throws IAE
-        testInvalidValues(field, invalids);
-
-
-        // test that setting field to valid value works ok
-        testValidValues(field, valids);
-
-        passTest();
-        cleanupTest();
-    }
-
-    private void testDefaultValue(int field, int defaultVal) throws TestEndThrowable
-    {
-        try
-        {
-            int val = rr.getInt(field);
-
-            if (val != defaultVal)
-            {
-                failTest("rr.getInt( "+field+" ) should return "+
-                         defaultVal + " but returned "+val+"!");
-            }
-        }
-        catch (FieldEmptyException e)
-        {
-            failTest("rr.getInt( "+field+" ) threw FEE when it should"+
-                     "return value "+defaultVal+"!");
-        }
-        catch (Exception e)
-        {
-            failTest("rr.getInt( "+field+" ) threw Exception: "+e +
-                     " when it should return value "+defaultVal+"!");
-        }
-    }
-
-    private void testInvalidValues(int field, int[] values) throws TestEndThrowable
-    {
-        for (int i = 0; i < values.length; i++)
-        {
-            try
-            {
-                rr.setInt(field, values[i]);
-                failTest("rr.setInt( "+field+", "+values[i]+" ) did not throw any Exception!");
-            }
-            catch (IllegalArgumentException e)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("rr.setInt( "+field+", "+values[i]+" ) threw Exception: "+e);
-            }
-        }
-    }
-
-    private void testValidValues(int field, int[] values) throws TestEndThrowable
-    {
-        for (int i = 0; i < values.length; i++)
-        {
-            try
-            {
-                rr.setInt(field, values[i]);
-            }
-            catch (Exception e)
-            {
-                failTest("rr.setInt( "+field+", "+values[i]+" ) threw Exception: "+e);
-            }
-            try
-            {
-                int val = rr.getInt(field);
-
-                if (val != values[i])
-                {
-                    failTest("rr.getInt("+field+") did not return the value that was set!");
-                }
-            }
-            catch (Exception e)
-            {
-                failTest("rr.getInt( "+field+") threw Exception: " + e);
-            }
-        }
-    }
-
-    // returns true if field is one of values in fields[]
-    private boolean contains(int[] fields, int field)
-    {
-        for (int i=0; i < fields.length; i++)
-        {
-            if (field == fields[i])
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    protected void initTest() throws TestEndThrowable
-    {
-        log("RRIntField::initTest()");
-    }
-
-    protected void cleanupTest()
-    {
-        log("RRIntField::cleanupTest()");
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/RepeatRule/RRsetDate/RRsetDate.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.RepeatRule.RRsetDate;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.RepeatRule;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.RepeatRule.setdate().
- */
-public class RRsetDate extends MIDPTest
-{
-
-    public RRsetDate(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private static long iMillis2000 = 946677600000L;
-
-    public void runTest() throws TestEndThrowable
-    {
-        RepeatRule r = new RepeatRule();
-
-        try
-        {
-            r.setDate(RepeatRule.END, iMillis2000);
-        }
-        catch (Exception e)
-        {
-            failTest("rr.setDate( RepeatRule.END, "+iMillis2000+
-                     " ) threw Exception: " + e);
-        }
-
-        for (int i = -5; i < 4098; i++)  // range should be enough
-        {
-            // skip RepeatRule.END since it must not throw IAException
-            if (i == RepeatRule.END)
-            {
-                i++;
-            }
-
-            try
-            {
-                r.setDate(i, iMillis2000);
-                failTest("setDate("+i+","+iMillis2000+
-                         ") did not throw IllegalArgumentException!");
-            }
-            catch (IllegalArgumentException e)
-            {
-                // ok
-            }
-            catch (Exception e)
-            {
-                failTest("rr.setDate( "+i+", "+iMillis2000+
-                         " ) threw wrong Exception: " + e);
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/SupportTestData.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic;
-// IMPORTS
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * This is a data structure class for the test to easy
- * the development and maintenance of the PIM API FUTEs
- * There are functions for adding and getting the support
- * test data
- */
-
-public class SupportTestData
-{
-    private Vector iSupportedFields = null;
-    private Vector iUnsupportedFields = null;
-    private Hashtable iSupportedAttributes = null;
-    private Hashtable iSupportedArrayElements = null;
-    private Hashtable iFieldValues = null;
-    private Hashtable iVersitValues = null;
-
-    /**
-     * Constructor. Initializes the data structures
-     */
-    public SupportTestData()
-    {
-        iSupportedFields = new Vector();
-        iUnsupportedFields = new Vector();
-        iSupportedAttributes = new Hashtable();
-        iSupportedArrayElements = new Hashtable();
-        iFieldValues = new Hashtable();
-        iVersitValues = new Hashtable();
-    }
-
-    /**
-     * Adds new supported field to test data. These fields
-     * can be feched with getSupportedFields()
-     *
-     * @param aSupportedField Value of the added supported field
-     */
-    public void addSupportedField(int aSupportedField)
-    {
-        iSupportedFields.addElement(new Integer(aSupportedField));
-    }
-
-    /**
-     * Returns added supported fields. Empty vector if there are
-     * no supported fields
-     *
-     * @return Vector containing added supported fields
-     */
-    public Vector getSupportedFields()
-    {
-        return iSupportedFields;
-    }
-
-    /**
-     * Adds new unsupported field to test data. These fields
-     * can be feched with getUnsupportedFields()
-     *
-     * @param aUnsupportedField Value of the added unsupported field
-     */
-    public void addUnsupportedField(int aUnsupportedField)
-    {
-        iUnsupportedFields.addElement(new Integer(aUnsupportedField));
-    }
-
-    /**
-     * Returns added unsupported fields. Empty vector if there are
-     * no supported fields
-     *
-     * @return Vector containing added unsupported fields
-     */
-    public Vector getUnsupportedFields()
-    {
-        return iUnsupportedFields;
-    }
-
-    /**
-     * Adds new supported attributes to a field
-     *
-     * @param aField which is to be added
-     * @param aAttributes Attributes of this field
-     */
-    public void addSupportedAttributes(int aField, int aAttributes)
-    {
-        iSupportedAttributes.put(new Integer(aField), new Integer(aAttributes));
-    }
-
-    /**
-     * Returns the fields used in supported attribute tests
-     *
-     * @return Vector containing the fields of the supported attributes
-     */
-    public Vector getSupportedAttributeFields()
-    {
-        Vector fields = new Vector();
-
-        Enumeration keys = iSupportedAttributes.keys();
-
-        for (int i = 0; i < iSupportedAttributes.size(); i++)
-        {
-            int field = ((Integer) keys.nextElement()).intValue();
-            fields.addElement(new Integer(field));
-        }
-
-        return fields;
-    }
-
-    /**
-     * Returns the supported attributes of a specific field
-     *
-     * @return Array containing supported attributes of this field
-     */
-    public int getSupportedAttributes(int aField)
-    {
-        return ((Integer) iSupportedAttributes.get(
-                    new Integer(aField))).intValue();
-    }
-
-    /**
-     * Adds new supported array element to supported array elements
-     *
-     * @param aField Field which array element is to be added
-     * @param aArrayElement Array element to be added
-     */
-    public void addSupportedArrayElement(int aField, int aArrayElement)
-    {
-        Vector arrayElements = null;
-        if (iSupportedArrayElements.containsKey(new Integer(aField)))
-        {
-            arrayElements = ((Vector) iSupportedArrayElements.get(
-                                 new Integer(aField)));
-            if (arrayElements == null)
-            {
-                arrayElements = new Vector();
-            }
-            arrayElements.addElement(new Integer(aArrayElement));
-        }
-        else
-        {
-            arrayElements = new Vector();
-            arrayElements.addElement(new Integer(aArrayElement));
-        }
-
-        iSupportedArrayElements.put(new Integer(aField), arrayElements);
-    }
-
-    /**
-     * Returns the fields used in supported array elmement tests
-     *
-     * @return Vector containing the fields of the supported array elements
-     */
-    public Vector getSupportedArrayElementFields()
-    {
-        Vector fields = new Vector();
-
-        Enumeration keys = iSupportedArrayElements.keys();
-
-        for (int i = 0; i < iSupportedArrayElements.size(); i++)
-        {
-            int field = ((Integer) keys.nextElement()).intValue();
-            fields.addElement(new Integer(field));
-        }
-
-        return fields;
-    }
-
-    /**
-     * Returns the supported array elements of a specific field
-     *
-     * @param aField A fields which attributes should be returned
-     * @return Array containing supported array elements of this field
-     */
-    public Vector getSupportedArrayElements(int aField)
-    {
-        return ((Vector) iSupportedArrayElements.get(
-                    new Integer(aField)));
-    }
-
-    /**
-     * Adds values for a PIM field. This method can be used
-     * to define test data with field's value and expected versit
-     * conversion result. Attributes of the field can also be defined
-     *
-     * NOTE: There are overloaded versions for all value types or if not
-     *       please add one :)
-     */
-    public void addFieldData(
-        int aField,
-        int aAttributes,
-        String aValue,
-        String aVersitResult)
-    {
-        // Add new attributes for the field. Older attributes not overwritten
-        addFieldAttributes(aField, aAttributes);
-        addFieldValue(aField, aValue);
-        addVersitValue(aField, aVersitResult);
-    }
-
-    public void addFieldData(
-        int aField,
-        int aAttributes,
-        String[] aValues,
-        String aVersitResult)
-    {
-        // Add new attributes for the field. Older attributes not overwritten
-        addFieldAttributes(aField, aAttributes);
-        addFieldValue(aField, aValues);
-        addVersitValue(aField, aVersitResult);
-    }
-
-    public void addFieldData(
-        int aField,
-        int aAttributes,
-        long aValue,
-        String aVersitResult)
-    {
-        // Add new attributes for the field. Older attributes not overwritten
-        addFieldAttributes(aField, aAttributes);
-        addFieldValue(aField, new Long(aValue));
-        addVersitValue(aField, aVersitResult);
-    }
-
-    /**
-     * Returns initialized attribute combinations of the specified field
-     */
-    public Vector getFieldAttributeCombinations(int aField)
-    {
-        return ((Vector) iSupportedAttributes.get(new Integer(aField)));
-    }
-
-    /**
-     * Returns the test value of specific field
-     */
-    public Vector getFieldValue(int aField)
-    {
-        return ((Vector) iFieldValues.get(new Integer(aField)));
-    }
-
-    /**
-     *  Returns the versit test value of specific field
-     */
-    public Vector getVersitValue(int aField)
-    {
-        return ((Vector) iVersitValues.get(new Integer(aField)));
-    }
-
-    // PRIVATE MEMBER FUNCTIONS
-
-    private void addFieldAttributes(int aField, int aAttributes)
-    {
-        Vector attributesArray = null;
-
-        if (iSupportedAttributes.containsKey(new Integer(aField)))
-        {
-            attributesArray = ((Vector) iSupportedAttributes.get(
-                                   new Integer(aField)));
-            if (attributesArray == null)
-            {
-                attributesArray = new Vector();
-            }
-            attributesArray.addElement(new Integer(aAttributes));
-        }
-        else
-        {
-            attributesArray = new Vector();
-            attributesArray.addElement(new Integer(aAttributes));
-        }
-
-        iSupportedAttributes.put(new Integer(aField), attributesArray);
-    }
-
-    private void addFieldValue(int aField, Object aValue)
-    {
-        Vector valueArray = null;
-
-        if (iFieldValues.containsKey(new Integer(aField)))
-        {
-            valueArray = ((Vector) iFieldValues.get(
-                              new Integer(aField)));
-            if (valueArray == null)
-            {
-                valueArray = new Vector();
-            }
-            valueArray.addElement(aValue);
-        }
-        else
-        {
-            valueArray = new Vector();
-            valueArray.addElement(aValue);
-        }
-
-        iFieldValues.put(new Integer(aField), valueArray);
-    }
-
-    private void addVersitValue(int aField, Object aValue)
-    {
-        Vector valueArray = null;
-
-        if (iVersitValues.containsKey(new Integer(aField)))
-        {
-            valueArray = ((Vector) iVersitValues.get(
-                              new Integer(aField)));
-            if (valueArray == null)
-            {
-                valueArray = new Vector();
-            }
-            valueArray.addElement(aValue);
-        }
-        else
-        {
-            valueArray = new Vector();
-            valueArray.addElement(aValue);
-        }
-
-        iVersitValues.put(new Integer(aField), valueArray);
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/System/Properties/SystemPropertiesTest.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.System.Properties;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-
-// CLASS DEFINITION
-
-public class SystemPropertiesTest extends MIDPTest
-{
-
-    public SystemPropertiesTest(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        String prop = "microedition.pim.version";
-        String val = "1.0";
-
-        String sysVal = System.getProperty(prop);
-
-
-        if (sysVal == null)
-        {
-            failTest("Property '"+ prop +"' does not exist.");
-        }
-
-        // Property contains the needed value
-        if (!sysVal.equals(val))
-        {
-            failTest("Property '"+prop+"' does not contain value: '" + val + "', but '"+sysVal+"'");
-        }
-
-        passTest();
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDo/TConstants/TConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDo.TConstants;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.ToDo;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDo constants.
- */
-public class TConstants
-        extends MIDPTest
-{
-
-    public TConstants(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        int[] constants = { ToDo.CLASS, 100,
-                            ToDo.CLASS_CONFIDENTIAL, 200,
-                            ToDo.CLASS_PRIVATE, 201,
-                            ToDo.CLASS_PUBLIC, 202,
-                            ToDo.COMPLETED, 101,
-                            ToDo.COMPLETION_DATE, 102,
-                            ToDo.DUE, 103,
-                            ToDo.NOTE, 104,
-                            ToDo.PRIORITY, 105,
-                            ToDo.REVISION, 106,
-                            ToDo.SUMMARY, 107,
-                            ToDo.UID, 108
-                          };
-
-        for (int i=0; i < constants.length; i += 2)
-        {
-            if (constants[i] != constants[i+1])
-            {
-                failTest("Class field (" + (i+1) + ") is not correct. ");
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDo/Tcommit/Tcommit.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDo.Tcommit;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * Tests that ToDo.commit() persists values correctly
- */
-public class Tcommit extends MIDPTest
-{
-    private String[] iToDoLists;
-    private String iItemSubject;
-    private Date iDueDate;
-    private Date iCompletionDate;
-    private int iAlarm = 1800;
-    private int iDefaultAlarm = -43200;
-
-    public Tcommit(String sTestName,
-                   j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        // Init test data
-        init();
-        // Do not close lists between commit
-        doTest(false);
-        // Close lists between commit
-        doTest(true);
-    }
-
-    public void doTest(boolean aCloseList) throws TestEndThrowable
-    {
-        try
-        {
-            debug("Tcommit::doTest - testing Default ToDo list");
-            ToDoList todos = openList(iToDoLists[ 0 ]);
-
-            ToDo todo = createAndCommitItem(todos);
-
-            if (aCloseList)
-            {
-                todos.close();
-                todos = openList(iToDoLists[ 0 ]);
-                todo  = getSpecificToDoItem(todos, iItemSubject);
-            }
-
-            // Check commited appointment item that data was scaled correctly
-            testField(todos, todo, ToDo.SUMMARY, iItemSubject);
-            testField(todos, todo, ToDo.DUE, getStartOfDay(iDueDate));
-            testField(todos, todo, ToDo.COMPLETION_DATE, iCompletionDate);
-            testField(todos, todo, ToDo.COMPLETED, new Boolean(true));
-            assertString(todo.countValues(0x1005001) == 0, "Alarm should not be present in the item");
-
-            // Remove completed and completion date since alarm is not supported when these fields are present
-            todo.removeValue(ToDo.COMPLETION_DATE, 0);
-            todo.removeValue(ToDo.COMPLETED, 0);
-            todo.setDate(ToDo.DUE, 0, PIMItem.ATTR_NONE, iDueDate.getTime());
-            todo.addInt(0x1005001, PIMItem.ATTR_NONE, iAlarm);
-
-            todo.commit();
-            if (aCloseList)
-            {
-                todos.close();
-                todos = openList(iToDoLists[ 0 ]);
-                todo  = getSpecificToDoItem(todos, iItemSubject);
-            }
-
-            // Date has been converted to start of day
-            Date alarmDate = new Date((iDueDate.getTime() - iAlarm*1000));
-            int alarmInt = getDifferenceInSeconds(getStartOfDay(iDueDate), alarmDate);
-            testField(todos, todo, 0x1005001, new Integer(alarmInt));
-            // Change alarm to future
-            todo.setInt(0x1005001, 0, PIMItem.ATTR_NONE, -90000);
-            todo.commit();
-            if (aCloseList)
-            {
-                todos.close();
-                todos = openList(iToDoLists[ 0 ]);
-                todo  = getSpecificToDoItem(todos, iItemSubject);
-            }
-
-            // Alarm occurs at 12:00 o'clock. Due date is converted to 00:00
-            alarmInt = getDifferenceInSeconds(iDueDate, alarmDate);
-            testField(todos, todo, ToDo.DUE, getStartOfDay(iDueDate));
-            testField(todos, todo, 0x1005001, new Integer(iDefaultAlarm));
-            todos.removeToDo(todo);
-            todos.close();
-        }
-        catch (Throwable e)
-        {
-            failTest("Tcommit::doTest - test failed: " + e.toString());
-        }
-
-        passTest();
-    }
-
-    private ToDoList openList(String aListName)
-    {
-        try
-        {
-            PIM pim = PIM.getInstance();
-            return (ToDoList)pim.openPIMList(PIM.TODO_LIST,
-                                             PIM.READ_WRITE,
-                                             aListName);
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to open PIM list");
-        }
-        return null;
-    }
-
-    private ToDo getSpecificToDoItem(ToDoList aList, String aSubject) throws Exception
-    {
-        ToDo matchingItem = aList.createToDo();
-        matchingItem.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, aSubject);
-        Enumeration items = aList.items(matchingItem);
-        // There should be at least one element
-        return (ToDo)items.nextElement();
-    }
-
-    private ToDo createAndCommitItem(ToDoList aList)
-    {
-        ToDo todo = aList.createToDo();
-        // Initialize data
-        if (aList.isSupportedField(ToDo.SUMMARY))
-        {
-            todo.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, iItemSubject);
-        }
-        if (aList.isSupportedField(ToDo.DUE))
-        {
-            todo.addDate(ToDo.DUE, PIMItem.ATTR_NONE, iDueDate.getTime());
-        }
-        if (aList.isSupportedField(ToDo.COMPLETION_DATE))
-        {
-            todo.addDate(ToDo.COMPLETION_DATE, PIMItem.ATTR_NONE, iCompletionDate.getTime());
-        }
-        // Extended alarm
-        if (aList.isSupportedField(0x1005001))
-        {
-            todo.addInt(0x1005001, PIMItem.ATTR_NONE, iAlarm);
-        }
-        try
-        {
-            todo.commit();
-        }
-        catch (Exception e)
-        {
-            failTest("Tcommit::createAndCommitItem() - Exception when creating item");
-        }
-        return todo;
-    }
-
-    private void init()
-    {
-        // Clean lists
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iToDoLists = pim.listPIMLists(PIM.TODO_LIST);
-
-            for (int i = 0; i < iToDoLists.length; i++)
-            {
-                ToDoList list = openList(iToDoLists[ i ]);
-                Enumeration items = list.items();
-                while (items.hasMoreElements())
-                {
-                    ToDo todo = (ToDo)items.nextElement();
-                    list.removeToDo(todo);
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Tcommit::init() - Exception when cleaning lists");
-        }
-
-        iDueDate = new Date(System.currentTimeMillis());
-        // End date to next day
-        iCompletionDate = new Date(iDueDate.getTime() - 3600000);
-        iItemSubject = "TestToDoItem " + iDueDate.toString();
-    }
-
-    private Date getStartOfDay(Date aDate)
-    {
-        Calendar cal = Calendar.getInstance();
-
-        cal.setTime(aDate);
-        cal.set(Calendar.HOUR_OF_DAY, 0);
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-
-        return cal.getTime();
-    }
-
-    private int getDifferenceInSeconds(Date aFirstDate, Date aSecondDate)
-    {
-        double diff = (aFirstDate.getTime() - aSecondDate.getTime());
-        int diffSecs = (((int)diff) / 1000);
-        // Round full seconds
-        diffSecs /= 60;
-        return diffSecs*60;
-    }
-
-    private void testField(ToDoList aList, ToDo aItem, int aField, Object aExpectedResult)
-    throws TestEndThrowable
-    {
-        boolean result = false;
-        int type = aList.getFieldDataType(aField);
-        debug("Tcommit::testField - testing field: " + aField + " + with value: " + aExpectedResult);
-        switch (type)
-        {
-        case PIMItem.STRING:
-        {
-            String value = ((String)aExpectedResult);
-            result = value.equals(aItem.getString(aField, 0));
-            debug("Tcommit::testField - returned value: " + aItem.getString(aField, 0));
-            break;
-        }
-        case PIMItem.INT:
-        {
-            Integer value = ((Integer)aExpectedResult);
-            result = value.intValue() == aItem.getInt(aField, 0);
-            debug("Tcommit::testField - returned value: " + aItem.getInt(aField, 0));
-            debug("ATTENTION!!! Note that Java may have problems handling daylight saving times. Check that when this case fails");
-            break;
-        }
-        case PIMItem.DATE:
-        {
-            Date value = ((Date)aExpectedResult);
-            result = value.getTime() == aItem.getDate(aField, 0);
-            debug("Tcommit::testField - returned value: " + new Date(aItem.getDate(aField, 0)).toString());
-            debug("ATTENTION!!! Note that Java may have problems handling daylight saving times. Check that when this case fails");
-            break;
-        }
-        case PIMItem.BOOLEAN:
-        {
-            Boolean value = ((Boolean)aExpectedResult);
-            result = value.booleanValue() == aItem.getBoolean(aField, 0);
-            debug("Tcommit::testField - returned value: " + aItem.getBoolean(aField, 0));
-            break;
-        }
-        case PIMItem.STRING_ARRAY:
-        default:
-            assertString(false, "Tcommit::testField - test does not support field type: " + type);
-            break;
-        }
-        assertString(result, "Tcommit::testField - incorrect value returned from field: " + aField);
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLcreateToDo/TLcreateToDo.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLcreateToDo;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ToDoList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.create()
- */
-public class TLcreateToDo
-        extends MIDPTest
-{
-
-    public TLcreateToDo(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] todoListNames = null;
-        ToDoList tl = null;
-        int count = 0;
-
-        // open first todo list
-        try
-        {
-            p = PIM.getInstance();
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            tl = (ToDoList)p.openPIMList(PIM.TODO_LIST, PIM.READ_WRITE, todoListNames[0]);
-
-            Enumeration e = tl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                count++;
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        log("ToDoList has "+ count + " items.");
-
-        log("Test that creating new ToDo item does not increase item count in ToDoList.");
-
-        ToDo t = null;
-
-        try
-        {
-            t = tl.createToDo();
-
-            Enumeration e = tl.items();
-            tl.close();
-            int tmp = 0;
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-            if (tmp != count)
-            {
-                failTest("Creating new ToDo changed ToDoList item count!");
-            }
-
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test ToDo item creation: " + e.toString());
-        } // end of try-catch
-
-        log("Test that created ToDo tiem is empty.");
-        int[] fields = t.getFields();
-        if (fields.length != 0)
-        {
-            failTest("Created new ToDo item has not got all fields empty!");
-        }
-
-        passTest();
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLfieldsOrder/TLfieldsOrder.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLfieldsOrder;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Vector;
-import com.nokia.mj.test.pim.adaptation.*;
-import com.nokia.mj.test.pim.automatic.*;
-
-// CLASS DEFINITION
-/**
- * Tests that fields of the to-do list are in right order
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields. Order was
- * also checked from the emulator
- *
- * ATTENTION: Update fields if needed when the API specification
- * is approved
- */
-
-public class TLfieldsOrder
-        extends MIDPTest
-{
-
-    public TLfieldsOrder(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Test data containing supported field values in right order */
-    private SupportTestData iOrderedFields = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize supported fields list. Check that the
-        // order is the same as in the native side to-do list
-        iOrderedFields.addSupportedField(ToDo.SUMMARY);
-        iOrderedFields.addSupportedField(ToDo.NOTE);
-        iOrderedFields.addSupportedField(ToDo.DUE);
-        iOrderedFields.addSupportedField(0x1005001);                // Extended alarm field
-        iOrderedFields.addSupportedField(ToDo.PRIORITY);
-        iOrderedFields.addSupportedField(ToDo.COMPLETED);
-        iOrderedFields.addSupportedField(ToDo.COMPLETION_DATE);
-        iOrderedFields.addSupportedField(ToDo.CLASS);
-        iOrderedFields.addSupportedField(ToDo.UID);
-        iOrderedFields.addSupportedField(ToDo.REVISION);
-
-        // Initialize contact list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.TODO_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test.");
-        String err = PLsupportTester.testFieldsOrder(
-                         iPIMList,
-                         iOrderedFields);
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLimportToDo/TLimportToDo.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLimportToDo;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ToDoList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.importToDo()
- *
- */
-public class TLimportToDo
-        extends MIDPTest
-{
-
-    public TLimportToDo(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    private ToDoList tl = null;
-
-    public void runTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] todoListNames = null;
-        ToDo t = null;
-        int count = 0;
-
-        // open first todo list
-        try
-        {
-            p = PIM.getInstance();
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            tl = (ToDoList)p.openPIMList(PIM.TODO_LIST, PIM.READ_WRITE, todoListNames[0]);
-
-            Enumeration e = tl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                count++;
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e.toString());
-        } // end of try-catch
-
-        // read ToDo from serial format
-        InputStream is = null;
-        try
-        {
-            is = getClass().getResourceAsStream("/res/todoPriority1.vcs");
-            PIMItem[] items = p.fromSerialFormat(is, "UTF-8");
-            t = (ToDo) items[0];
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            failTest("Failed to read a ToDo from file: " + e);
-        }
-
-        log("ToDoList has "+ count + " items.");
-
-        log("Test that importing new ToDo item does not increase item count in ToDoList.");
-        ToDo t2 = null;
-        try
-        {
-            t2 = tl.importToDo(t);
-
-            if (countItems(tl) != count)
-            {
-                failTest("Importing new ToDo changed ToDoList item count!");
-            }
-            // test taht imported item is ok.
-            int pri = t2.getInt(ToDo.PRIORITY, 0);
-            if (pri != 1)
-            {
-                failTest("ToDo item import failed to set priority to 1.");
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test ToDo item import: " + e);
-        } // end of try-catch
-
-        log("Test that commiting the imported ToDo item increases item count in ToDoList.");
-        try
-        {
-            t2.commit();
-            if (countItems(tl) != (count + 1))
-            {
-                failTest("Commiting imported ToDo did not increase ToDoList item count by one!");
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to commit imported ToDo to list: " + e);
-        }
-
-        log("Test that importing new ToDo item again does not increase item count in ToDoList.");
-        ToDo t3 = null;
-        try
-        {
-            t3 = tl.importToDo(t);
-            if (countItems(tl) != (count + 1))
-            {
-                failTest("Importing new ToDo changed ToDoList item count!");
-            }
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test ToDo item import: " + e);
-        } // end of try-catch
-
-        log("Test that commiting the second imported ToDo item increases item count in ToDoList.");
-        try
-        {
-            t3.commit();
-            if (countItems(tl) != (count + 2))
-            {
-                failTest("Commiting second imported ToDo did not increase ToDoList item count by one!");
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to commit second imported ToDo to list: " + e);
-        }
-
-        log("Test that removing both imported ToDo items decreases item count in ToDoList by two.");
-        try
-        {
-            tl.removeToDo(t2);
-            tl.removeToDo(t3);
-            if (countItems(tl) != count)
-            {
-                failTest("Removing both imported ToDos did not decrease ToDoList item count by two!");
-            }
-            tl.close();
-        }
-        catch (Exception e)
-        {
-            failTest("Failed to remove imported ToDos from list: " + e);
-        }
-
-
-        passTest();
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLitems/TLitems.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,317 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLitems;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.items()
- */
-public class TLitems extends MIDPTest
-{
-
-    public TLitems(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     * Set of dates for item ranges in ascending order.
-     */
-    private final String[] RANGE_DATE_STRINGS =
-        { "050101:080000",
-          "050107:080000",
-          "050110:080000",
-          "050113:080000",
-          "050127:080000"
-        };
-
-    private long[] iRangeDates = null;
-
-    ToDoList iToDoList = null;
-
-    private int iDueItems0to4 = 0;
-    private int iDueItems1to2 = 0;
-    private int iDueItems2to3 = 0;
-
-    private int iCompletedItems0to4 = 0;
-    private int iCompletedItems1to2 = 0;
-    private int iCompletedItems2to3 = 0;
-
-    public TLitems()
-    {
-    }
-
-    public void initTest() throws TestEndThrowable
-    {
-        // preconditions
-        iRangeDates = TimeTool.getTimeInMillis(RANGE_DATE_STRINGS);
-        // open first todo list
-        try
-        {
-            PIM p = PIM.getInstance();
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            String toDoListName = todoListNames[ 0 ];
-            iToDoList = (ToDoList)p.openPIMList(PIM.TODO_LIST,
-                                                PIM.READ_WRITE, toDoListName);
-
-            iDueItems0to4 = countItems(iToDoList, ToDo.DUE,
-                                       iRangeDates[ 0 ],
-                                       iRangeDates[ 4 ]);
-
-            iDueItems1to2 = countItems(iToDoList, ToDo.DUE,
-                                       iRangeDates[ 1 ],
-                                       iRangeDates[ 2 ]);
-
-            iDueItems2to3 = countItems(iToDoList, ToDo.DUE,
-                                       iRangeDates[ 2 ],
-                                       iRangeDates[ 3 ]);
-
-            iCompletedItems0to4 = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                                             iRangeDates[ 0 ],
-                                             iRangeDates[ 4 ]);
-
-            iCompletedItems1to2 = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                                             iRangeDates[ 1 ],
-                                             iRangeDates[ 2 ]);
-
-            iCompletedItems2to3 = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                                             iRangeDates[ 2 ],
-                                             iRangeDates[ 3 ]);
-
-            log(iDueItems0to4 + " DUE items in range "
-                + iRangeDates[ 0 ] + "-" + iRangeDates[ 4 ]
-                + " before adding.");
-
-            log(iCompletedItems0to4 + " COMPLETION_DATE items in range "
-                + iRangeDates[ 0 ] + "-" + iRangeDates[ 4 ]
-                + " before adding.");
-
-            addItems(iToDoList);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        int count = 0;
-
-        if (iToDoList.isSupportedField(ToDo.DUE))
-        {
-            count = countItems(iToDoList, ToDo.DUE,
-                               iRangeDates[0], iRangeDates[4]);
-
-            if (count != (iDueItems0to4 + 4))
-            {
-                log(count+" DUE items in range "
-                    +iRangeDates[0]+"-"+iRangeDates[4]);
-
-                failTest("#1: ToDoList.items() did not return "
-                         +(iDueItems0to4+4) + " items");
-            }
-
-            count = countItems(iToDoList, ToDo.DUE,
-                               iRangeDates[1], iRangeDates[2]);
-
-            if (count != (iDueItems1to2 + 1))
-            {
-                log(count+" DUE items in range "
-                    +iRangeDates[1]+"-"+iRangeDates[2]);
-
-                failTest("#2: ToDoList.items() did not return "
-                         +(iDueItems0to4+1) + " items");
-            }
-
-            count = countItems(iToDoList, ToDo.DUE,
-                               iRangeDates[2], iRangeDates[3]);
-
-            if (count != iDueItems2to3)
-            {
-                log(count+" DUE items in range "
-                    +iRangeDates[2]+"-"+iRangeDates[3]);
-
-                failTest("#3: ToDoList.items() did not return "
-                         + iDueItems0to4 + " items");
-            }
-        }
-
-        if (iToDoList.isSupportedField(ToDo.COMPLETION_DATE))
-        {
-            count = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                               iRangeDates[0], iRangeDates[4]);
-
-            if (count != (iCompletedItems0to4 + 4))
-            {
-                log(count+" COMPLETION_DATE items in range "
-                    +iRangeDates[0]+"-"+iRangeDates[4]);
-
-                failTest("#4: ToDoList.items() did not return "
-                         +(iCompletedItems0to4+4) + " items");
-            }
-
-            count = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                               iRangeDates[1], iRangeDates[2]);
-
-            if (count !=  iCompletedItems1to2)
-            {
-                log(count+" COMPLETION_DATE items in range "
-                    +iRangeDates[1]+"-"+iRangeDates[2]);
-
-                failTest("#5: ToDoList.items() did not return "
-                         +iCompletedItems0to4 + " items");
-            }
-
-            count = countItems(iToDoList, ToDo.COMPLETION_DATE,
-                               iRangeDates[2], iRangeDates[3]);
-
-            if (count != (iCompletedItems2to3 + 1))
-            {
-                log(count+" COMPLETION_DATE items in range "
-                    +iRangeDates[2]+"-"+iRangeDates[3]);
-
-                failTest("#6: ToDoList.items() did not return "
-                         +(iCompletedItems0to4+1) + " items");
-            }
-        }
-        passTest();
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            // remove "TestToDo" items
-            Enumeration e = iToDoList.items();
-            while (e.hasMoreElements())
-            {
-                ToDo t = (ToDo)e.nextElement();
-                if (t.getString(ToDo.SUMMARY, 0).equals("TestToDo"))
-                {
-                    iToDoList.removeToDo(t);
-                }
-            }
-            // close list
-            iToDoList.close();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-
-    private void addItems(ToDoList aToDoList) throws TestEndThrowable
-    {
-        try
-        {
-            String[] stringDates =
-                { "050122:080000", "050126:080000", "050115:080000",
-                  "050118:080000", "050108:080000", "050112:080000",
-                  "050102:080000", "050104:080000"
-                };
-            long[] dates = TimeTool.getTimeInMillis(stringDates);
-
-            for (int i=0; i < dates.length; i++)
-            {
-                ToDo t = aToDoList.createToDo();
-                t.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "TestToDo");
-                if (i%2 == 0)
-                {
-                    if (aToDoList.isSupportedField(ToDo.DUE))
-                    {
-                        t.addDate(ToDo.DUE, PIMItem.ATTR_NONE, dates[i]);
-                    }
-                }
-                else
-                {
-                    if (aToDoList.isSupportedField(ToDo.COMPLETION_DATE))
-                    {
-                        t.addDate(ToDo.COMPLETION_DATE, PIMItem.ATTR_NONE, dates[i]);
-                        t.addBoolean(ToDo.COMPLETED, PIMItem.ATTR_NONE, true);
-                    }
-                }
-                t.commit();
-            }
-        }
-        catch (Exception e)
-        {
-            failTest("Error while adding TestToDos: " + e);
-        }
-    }
-
-    private int countItems(ToDoList aToDoList, int aType, long aBegin, long aEnd)
-    throws TestEndThrowable
-    {
-        int count = 0;
-        long prevDate = 0;
-
-        if (!aToDoList.isSupportedField(aType))
-        {
-            return 0;
-        }
-
-        try
-        {
-            Enumeration e = aToDoList.items(aType, aBegin, aEnd);
-            while (e.hasMoreElements())
-            {
-                ToDo t = (ToDo) e.nextElement();
-                int[] fields = t.getFields();
-                long tmp = 0;
-
-                tmp = t.getDate(aType, 0);
-
-                if (tmp < prevDate)
-                {
-                    log("previous date: " +prevDate+", current date: "+ tmp);
-                    failTest("Dates returned by items() are not in ascending order!");
-                }
-                prevDate = tmp;
-                count++;
-            }
-        }
-        catch (Throwable t)
-        {
-            failTest("Error while counting ToDos: " + t);
-        }
-        return count;
-    }
-
-    private boolean contains(int[] array, int value)
-    {
-        for (int i=0; i < array.length; i++)
-        {
-            if (array[i] == value)
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLitemsEx/TLitemsEx.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLitemsEx;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.items()
- */
-public class TLitemsEx extends MIDPTest
-{
-
-    public TLitemsEx(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    ToDoList tl = null;
-
-    public void initTest() throws TestEndThrowable
-    {
-        // preconditions
-        PIM p = null;
-        String[] todoListNames = null;
-
-        // open first todo list
-        try
-        {
-            p = PIM.getInstance();
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            tl = (ToDoList)p.openPIMList(PIM.TODO_LIST,
-                                         PIM.READ_WRITE, todoListNames[0]);
-
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        }
-    }
-
-    public void runTest() throws TestEndThrowable
-    {
-        initTest();
-        String[] validDates = { "050122:080000", "050126:080000" };
-        long[] dates = TimeTool.getTimeInMillis(validDates);
-
-        // test bad types
-        for (int i=-1; i < 300; i+=2)
-        {
-            if ((i != ToDo.DUE) && (i != ToDo.COMPLETION_DATE))
-            {
-                try
-                {
-                    Enumeration e = tl.items(i, dates[0], dates[1]);
-                    failTest("Bad field did not throw IAE!");
-                }
-                catch (IllegalArgumentException iae)
-                {
-                    //ok
-                }
-                catch (UnsupportedFieldException iae)
-                {
-                    log("Note! Field "+i+" threw UFE when calling "+
-                        "TL.items(field, date1, date2).");
-                }
-                catch (Exception ex)
-                {
-                    failTest("Bad field did not throw IAE, but " +ex);
-                }
-            }
-        }
-        // test valid dates in wrong order
-        try
-        {
-            Enumeration e = tl.items(ToDo.DUE, dates[1], dates[0]);
-            failTest("Dates in wrong order did not throw IAE!");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            //ok
-        }
-        catch (Exception ex)
-        {
-            failTest("Dates in wrong order did not throw IAE, but " +ex);
-        }
-
-        // test with bad dates
-        long[] badDates = { Long.MIN_VALUE, Long.MIN_VALUE,
-                            Long.MIN_VALUE, Long.MIN_VALUE+1L,
-                            0L, 0L,
-                            Long.MAX_VALUE-1L, Long.MAX_VALUE,
-                            Long.MAX_VALUE, Long.MAX_VALUE
-                          };
-
-        for (int i=0; i < badDates.length; i+=2)
-        {
-            try
-            {
-                Enumeration e = tl.items(ToDo.DUE, badDates[i], badDates[i+1]);
-                log("TL.items(DUE, "+badDates[i]+", "+badDates[i+1]+") did not throw any exception");
-            }
-            catch (IllegalArgumentException iae)
-            {
-                log("TL.items(DUE, "+badDates[i]+", "+badDates[i+1]+") threw IAE");
-            }
-            catch (PIMException pime)
-            {
-                log("TL.items(DUE, "+badDates[i]+", "+badDates[i+1]+") threw PIME");
-            }
-            catch (Exception ex)
-            {
-                failTest("TL.items(DUE, "+badDates[i]+", "+badDates[i+1]+") threw "+ex);
-            }
-        }
-
-        // test with WRITE_ONLY list
-        try
-        {
-            tl.close();
-
-            PIM p = PIM.getInstance();
-            String[] todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            tl = (ToDoList)p.openPIMList(PIM.TODO_LIST,
-                                         PIM.WRITE_ONLY, todoListNames[0]);
-
-        }
-        catch (Throwable e)
-        {
-            failTest("error while testing with WRITE_ONLY list: " + e);
-        }
-        try
-        {
-            Enumeration e = tl.items(ToDo.DUE, dates[1], dates[0]);
-            failTest("TL.items() with WRITE_ONLY list did not throw SecurityException!");
-        }
-        catch (SecurityException se)
-        {
-            //ok
-        }
-        catch (Exception ex)
-        {
-            failTest("TL.items() with WRITE_ONLY list did not throw SecurityException, but " +ex);
-        }
-
-        passTest();
-        cleanupTest();
-    }
-
-    public void cleanupTest()
-    {
-        try
-        {
-            // close list
-            tl.close();
-        }
-        catch (Throwable t)
-        {
-            log("error while cleaning up test: " +t);
-        }
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLmultipleLists/TLmultipleLists.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLmultipleLists;
-//IMPORTS
-import javax.microedition.pim.PIM;
-import com.nokia.mj.test.pim.automatic.*;
-// CLASS DEFINITION
-/**
- * See OpenMultipleLists.java.
- */
-public class TLmultipleLists extends OpenMultipleLists
-{
-
-    public TLmultipleLists(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    protected int listType()
-    {
-        return PIM.TODO_LIST;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLpriorityMappings/TLpriorityMappings.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLpriorityMappings;
-// IMPORTS
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-import com.nokia.mj.test.pim.automatic.*;
-
-// CLASS DEFINITION
-/**
- * Tests the ToDo list's priority mappings
- *
- * Reference for priority values was the internal
- * specification of PIM API. Check TLpriorityTester
- * which provides the test functions for priority testing
- * This class only has to initialize ToDo list, item and
- * test data and provide those to TLpriorityTester class
- *
- */
-
-public class TLpriorityMappings
-        extends MIDPTest
-{
-
-    public TLpriorityMappings(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* ToDo item */
-    private ToDo iToDoItem;
-
-    /* Priorities */
-    private int[] iTestPriorityValues = null;
-    private int[] iExpectedPriorityValues = null;
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Load test data
-        iTestPriorityValues = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-        iExpectedPriorityValues = new int[] { 4, 1, 1, 1, 4, 4, 4, 7, 7, 7 };
-        // Initialize ToDo list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.TODO_LIST,
-                           PIM.READ_WRITE);
-            iToDoItem = ((ToDoList) iPIMList).createToDo();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-
-        // Test priority mappings
-        error = PLpriorityTester.testPriorityMappings(
-                    iToDoItem,
-                    iTestPriorityValues,
-                    iExpectedPriorityValues,
-                    true);
-
-        // Check if the test failed or not
-        if (error != null)
-        {
-            failTest(error);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            ((ToDoList) iPIMList).removeToDo(iToDoItem);
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLremoveToDo/TLremoveToDo.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLremoveToDo;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.PIM;
-import javax.microedition.pim.PIMItem;
-import javax.microedition.pim.PIMException;
-import javax.microedition.pim.PIMList;
-import javax.microedition.pim.ToDo;
-import javax.microedition.pim.ToDoList;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.ToDoList.removeToDo()
- *
- */
-public class TLremoveToDo
-        extends MIDPTest
-{
-
-    public TLremoveToDo(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    // preconditions
-    PIM p = null;
-    String[] todoListNames = null;
-    ToDoList tl = null;
-    int count = 0;
-
-    public void runTest() throws TestEndThrowable
-    {
-
-        // open first todo list
-        try
-        {
-            p = PIM.getInstance();
-            todoListNames = p.listPIMLists(PIM.TODO_LIST);
-            tl = (ToDoList)p.openPIMList(PIM.TODO_LIST, PIM.READ_WRITE, todoListNames[0]);
-
-            count = countItems(tl);
-        }
-        catch (Throwable e)
-        {
-            failTest("preconditions failed: " + e);
-        } // end of try-catch
-
-        log("ToDoList has "+ count + " items.");
-
-        log("Test that creating new ToDo item and adding it to the list does increase item count in ToDoList.");
-
-        ToDo t = null;
-
-        try
-        {
-            t = tl.createToDo();
-            if (tl.isSupportedField(ToDo.SUMMARY))
-            {
-                t.addString(ToDo.SUMMARY, PIMItem.ATTR_NONE, "Buy going away present for Judy");
-            }
-            else if (tl.isSupportedField(ToDo.DUE))
-            {
-                t.addDate(ToDo.DUE, PIMItem.ATTR_NONE, new Date().getTime());
-            }
-            else
-            {
-                failTest("Error while creating ToDo item!");
-            }
-            t.commit();
-
-            if (countItems(tl) != count+1)
-            {
-                failTest("Creating new ToDo did not increase ToDoList item count by one!");
-            }
-
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test ToDo item creation: " + e);
-        } // end of try-catch
-
-        log("Test that removing ToDo item decreases ToDoList item count by one.");
-
-        try
-        {
-            tl.removeToDo(t);
-        }
-        catch (Throwable e)
-        {
-            failTest("Failed to test ToDo item removal: " + e);
-        } // end of try-catch
-
-        if (countItems(tl) != count)
-        {
-            failTest("Removing ToDo did not decrease ToDoList item count by one!");
-        }
-
-        log("Test that removing ToDo item not in list does not change ToDoList item count.");
-
-        try
-        {
-            tl.removeToDo(t);
-            failTest("Removing ToDo not in list did not throw any exception!");
-        }
-        catch (PIMException pime)
-        {
-            // ok.
-        }
-        catch (Exception e)
-        {
-            failTest("Removing ToDo not in list threw wrong exception: "+e);
-        }
-
-        if (countItems(tl) != count)
-        {
-            failTest("Removing ToDo not in list changed ToDoList item count!");
-        }
-
-        log("Test that removing null ToDo item does not change ToDoList item count.");
-        try
-        {
-            tl.removeToDo(null);
-            failTest("Removing null ToDo did not throw any exception!");
-        }
-        catch (NullPointerException npe)
-        {
-            // ok.
-        }
-        catch (Exception e)
-        {
-            failTest("Removing null ToDo threw wrong exception: "+e);
-        }
-
-        if (countItems(tl) != count)
-        {
-            failTest("Removing null ToDo changed ToDoList item count!");
-        }
-
-        try
-        {
-            tl.close();
-        }
-        catch (Exception e)
-        {
-            failTest("Error while closing ToDoList: "+e);
-        }
-
-        passTest();
-    }
-
-    private int countItems(PIMList pl) throws TestEndThrowable
-    {
-        int tmp = 0;
-        try
-        {
-            Enumeration e = pl.items();
-            while (e.hasMoreElements())
-            {
-                e.nextElement();
-                tmp++;
-            }
-        }
-        catch (PIMException pime)
-        {
-            failTest("Error while getting items in list!");
-        }
-
-        return tmp;
-    }
-}
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLserialFormatTests/TLserialFormatTests.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLserialFormatTests;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-import com.nokia.mj.test.pim.adaptation.*;
-import com.nokia.mj.test.pim.automatic.*;
-
-// CLASS DEFINITION
-/**
- * This class initializes the test data for PIM serialization tests
- * Only ToDo List specific are tested in this class
- *
- * Tested functions:
- * javax.microedition.pim.PIM.toSerialFormat()
- * javax.microedition.pim.PIM.fromSerialFormat()
- *
- */
-
-public class TLserialFormatTests
-        extends MIDPTest
-{
-
-    public TLserialFormatTests(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List and item */
-    private PIMList iPIMList;
-    private PIMItem iPIMItem;
-
-    /* Test data including fields, attributes and field values */
-    private SupportTestData iTestData = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        int synchronization = 200;
-        // Add test data. The last value is the result of the versit conversion
-        iTestData.addFieldData(ToDo.SUMMARY,  0, "Summary",       "SUMMARY:Summary");
-        iTestData.addFieldData(ToDo.NOTE,     0, "Description",   "DESCRIPTION:Description");
-        iTestData.addFieldData(ToDo.PRIORITY, 0, 7,               "PRIORITY:7");
-        iTestData.addFieldData(ToDo.CLASS,    0, 200,             "CLASS:CONFIDENTIAL");
-
-        // Start date
-        long current = System.currentTimeMillis();
-        Date date = new Date(current);
-        iTestData.addFieldData(ToDo.DUE,
-                               0,
-                               date.getTime(),
-                               "DUE:" + creteVersitTimeStringFromDate(date));
-
-        // Alarm
-        // iTestData.addFieldData( 0x1005001,   0, 1800, "DALARM:20041211" );
-
-        // Revision
-        current = System.currentTimeMillis();
-        date.setTime(current);
-        iTestData.addFieldData(ToDo.REVISION,
-                               0,
-                               date.getTime(),
-                               "LAST-MODIFIED:" + creteVersitTimeStringFromDate(date));
-
-        // Initialize contact list and contact item
-        try
-        {
-            PIM pim = PIM.getInstance();
-            iPIMList = pim.openPIMList(PIM.TODO_LIST, PIM.READ_WRITE);
-            iPIMItem = ((ToDoList) iPIMList).createToDo();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        String error = null;
-        log("Running ELserialFormatTests. Testing vCalendar 1.0");
-        error = PserializationTester.testToSerialFormat(
-                    iPIMList,
-                    iPIMItem,
-                    iTestData,
-                    "UTF-8",
-                    "VCALENDAR/1.0");
-
-        if (error != null)
-        {
-            failTest(error);
-        }
-        passTest();
-        cleanupTest();
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            // NOTE: The test class doesn't commit the item so
-            // we don't have to remove it
-            //( ( ToDoList ) iPIMList ).removeToDo(
-            //    ( Contact ) iPIMItem );
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-    private String creteVersitTimeStringFromDate(Date aDate)
-    {
-        long dateInMillis = aDate.getTime();
-        String timeString = "";
-        Calendar cal = Calendar.getInstance();
-
-        // set time to calendar
-        cal.setTime(aDate);
-
-        // Time must be converted to UTC
-        TimeZone tz = cal.getTimeZone();
-        int hoursInMillis = tz.getRawOffset();
-
-        dateInMillis -= hoursInMillis;
-        // Remove daylight saving. TODO fix. useDaylightTime returns always true if
-        // the zone supports daylight. This is not what we want when winter time is used
-        /**if( tz.useDaylightTime() )
-            {
-            dateInMillis -= 3600000;
-            } */
-        cal.setTime(new Date(dateInMillis));
-
-        timeString += cal.get(Calendar.YEAR) +
-                      // +1 needs to be added. I don't know why...
-                      addZeroIfNeeded(cal.get(Calendar.MONTH) + 1) +
-                      addZeroIfNeeded(cal.get(Calendar.DATE)) + "T" +
-                      addZeroIfNeeded(cal.get(Calendar.HOUR_OF_DAY)) +
-                      addZeroIfNeeded(cal.get(Calendar.MINUTE)) +
-                      addZeroIfNeeded(cal.get(Calendar.SECOND)) + "Z";
-
-        return timeString;
-    }
-
-    private String addZeroIfNeeded(int aInt)
-    {
-        if (aInt < 10)
-        {
-            String zero = "0";
-            zero += Integer.toString(aInt);
-            return zero;
-        }
-        return Integer.toString(aInt);
-    }
-}
\ No newline at end of file
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLstringMaxLen/TLstringMaxLen.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLstringMaxLen;
-//IMPORTS
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import javax.microedition.pim.*;
-import com.nokia.mj.test.pim.adaptation.*;
-import com.nokia.mj.test.pim.automatic.*;
-
-// CLASS DEFINITION
-/**
- * Tests maximum lengths of string values and string array elements in
- * S60 ToDoList.
- *
- * Requirement: a PIMException is thrown when an item with string
- * value or string array element too long to fit in the corresponding
- * native application UI. Maximum editable lengths are specified in
- * Calendar UI specs.
- *
- * The test body is in PLstringMaxLen class.
- */
-public class TLstringMaxLen
-        extends PLstringMaxLen
-{
-
-    public TLstringMaxLen(
-        String sTestName,
-        j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     * Creates test items.
-     */
-    public void initTest() throws TestEndThrowable
-    {
-        //log( "TLstringMaxLen.initTest()" );
-
-        // TEST DATA: ToDo string field max lengths
-        // NOTE, SUMMARY, UID
-        iStringFieldMaxLengths.put(new Integer(ToDo.NOTE), new Integer(160));
-        iStringFieldMaxLengths.put(new Integer(ToDo.SUMMARY), new Integer(160));
-        iStringFieldMaxLengths.put(new Integer(ToDo.UID), new Integer(IGNORE));           // internal
-
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPimList = pim.openPIMList(
-                           PIM.TODO_LIST,
-                           PIM.READ_WRITE);
-
-            iPimItem = ((ToDoList) iPimList).createToDo();
-            iPimItem.commit();
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        //log( "TLstringMaxLen.cleanupTest()" );
-        try
-        {
-            ((ToDoList) iPimList).removeToDo((ToDo) iPimItem);
-            iPimList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of Filé
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/ToDoList/TLsupportedFields/TLsupportedFields.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// PACKAGE
-package com.nokia.mj.test.pim.automatic.ToDoList.TLsupportedFields;
-// IMPORTS
-import javax.microedition.pim.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import com.nokia.mj.test.pim.adaptation.*;
-import com.nokia.mj.test.pim.automatic.*;
-
-// CLASS DEFINITION
-/**
- * Tests the ToDo list's supported fields
- *
- * Reference for supported field values in this point wwas
- * the source code because the specification wasn't approved
- * yet and it had misinformation about some fields.
- *
- * ATTENTION: Update supported and unsupported fields when
- * the PIM API specification is approved
- */
-
-public class TLsupportedFields
-        extends MIDPTest
-{
-
-    public TLsupportedFields(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /* PIM List */
-    private PIMList iPIMList;
-
-    /* Test data including supported field values */
-    private SupportTestData iSupportedFields = new SupportTestData();
-
-    /**
-     * Initializes the test
-     */
-    public void initTest()
-    throws TestEndThrowable
-    {
-        // Initialize supported fields. Key indicates the field and value indicates
-        // if the field is supported or not in thist list
-        iSupportedFields.addSupportedField(ToDo.SUMMARY);
-        iSupportedFields.addSupportedField(ToDo.DUE);
-        iSupportedFields.addSupportedField(ToDo.PRIORITY);
-        iSupportedFields.addSupportedField(ToDo.COMPLETED);
-        iSupportedFields.addSupportedField(ToDo.COMPLETION_DATE);
-        iSupportedFields.addSupportedField(ToDo.CLASS);
-        iSupportedFields.addSupportedField(ToDo.UID);
-        iSupportedFields.addSupportedField(ToDo.REVISION);
-        iSupportedFields.addSupportedField(ToDo.NOTE);
-        iSupportedFields.addSupportedField(0x1005001);                  // Extended alarm field
-
-        // Initialize ToDo list
-        try
-        {
-            PIM pim = PIM.getInstance();
-
-            iPIMList = pim.openPIMList(
-                           PIM.TODO_LIST,
-                           PIM.READ_WRITE);
-        }
-        catch (PIMException pe)
-        {
-            failTest("Unexpected PIMException in initTest().");
-            pe.printStackTrace();
-        }
-    }
-    /**
-     * Runs the test
-     */
-    public void runTest()
-    throws TestEndThrowable
-    {
-        initTest();
-        log("Running test TLsupportedFields");
-        // Test supported fields
-        String err = PLsupportTester.testSupportedFields(
-                         iPIMList,
-                         iSupportedFields);
-        // Fail if error string was returned
-        if (err != null)
-        {
-            failTest(err);
-        }
-        else
-        {
-            passTest();
-        }
-        cleanupTest();
-    }
-    /**
-     * Removes the test items.
-     */
-    public void cleanupTest()
-    {
-        try
-        {
-            iPIMList.close();
-        }
-        catch (PIMException pe)
-        {
-            // cannot call failTest
-            log("Unexpected PIMException in cleanupTest().");
-            pe.printStackTrace();
-        }
-    }
-}
-
-// End of file
-
--- a/javaextensions/pim/tsrc/src/com/nokia/mj/test/pim/automatic/UnsupportedFieldException/UFEgetField/UFEgetField.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//PACKAGE
-package com.nokia.mj.test.pim.automatic.UnsupportedFieldException.UFEgetField;
-//IMPORTS
-import java.io.IOException;
-import java.util.*;
-import javax.microedition.pim.UnsupportedFieldException;
-import com.nokia.mj.test.pim.adaptation.*;
-
-// CLASS DEFINITION
-/**
- * This class tests javax.microedition.pim.UnsupportedFieldException.getField().
- */
-public class UFEgetField extends MIDPTest
-{
-
-    public UFEgetField(
-        String sTestName, j2meunit.framework.TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public void runTest() throws TestEndThrowable
-    {
-        UnsupportedFieldException ufe1 = new UnsupportedFieldException();
-        if (ufe1.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        String testMessage = "test ";
-
-        UnsupportedFieldException ufe2 = new UnsupportedFieldException(testMessage);
-        if (!(ufe2.getMessage().equals(testMessage)))
-        {
-            failTest("Field given in constructor parameter was not returned by getField()!");
-        }
-        if (ufe2.getField() != -1)
-        {
-            failTest("Default field value returned by getField() was not -1!");
-        }
-
-        // test that getField returns value set in constructor parameter
-        for (int i=0; i < 10; i++)
-        {
-            UnsupportedFieldException ufe = new UnsupportedFieldException(testMessage + i, i);
-
-            if (ufe.getField() != i)
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-
-            if (!(ufe.getMessage()).equals(testMessage + i))
-            {
-                failTest("Field given in constructor parameter was not returned by getField()!");
-            }
-        }
-
-        passTest();
-    }
-}
\ No newline at end of file
--- a/javaextensions/satsa/apdu/javasrc.s60/com/nokia/mj/impl/APDUError.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,260 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Provides apdu specific error codes
- *
-*/
-
-
-package com.nokia.mj.impl.satsa;
-
-import java.io.IOException;
-import com.nokia.mj.impl.utils.OsErrorMessage;
-import com.nokia.mj.impl.satsa.SecurityError;
-
-import java.io.InterruptedIOException;
-import javax.microedition.io.ConnectionNotFoundException;
-
-/**
- * Native error codes which causes certain Java exception to be thrown. For
- * example ERR_ILLEGAL_ARGUMENT states that IllegalArgumentException must be
- * thrown. Values starts from -3001 to avoid confusing with other error codes.
- * In native side these error codes are defined in STSApduConstants.h file.
- */
-public final class APDUError
-{
-    // CONSTANTS
-
-    public static final int ERR_ILLEGAL_ARGUMENT = -3100;
-
-    public static final int ERR_INTERRUPTED_IO = -3200;
-
-    public static final int ERR_CONNECTION_NOT_FOUND = -3300;
-
-    public static final int ERR_SECURITY = -3400;
-
-    public static final int ERR_IO = -3500;
-
-    public static final int ERR_CANCEL = -3600;
-
-    public static final String ERR_TXT_NO_SPECIFIC_TXT = "General error";
-
-    // illegal argument related detailed errors
-    // public static final int ERR_IA_PARAM_NULL = -11;
-    public static final String TXT_IA_PARAM_NULL = "Parameter is null";
-
-    public static final int ERR_IA_SELECT_APP = -12;
-
-    public static final String TXT_IA_SELECT_APP = "Card application selection APDU not allowed";
-
-    public static final int ERR_IA_MANAGE_CHANNEL = -13;
-
-    public static final String TXT_IA_MANAGE_CHANNEL = "MANAGE CHANNEL APDU not allowed";
-
-    public static final int ERR_IA_OTHER_CLA = -14;
-
-    public static final String TXT_IA_OTHER_CLA = "CLA byte must be 0x0X, 0x8X, 0x9X or 0xAX if Channel is non-zero";
-
-    public static final int ERR_IA_MALFORMED_APDU = -15;
-
-    public static final String TXT_IA_MALFORMED_APDU = "Parameter contains a malformed APDU";
-
-    public static final int ERR_IA_INVALID_PARAMETER = -16;
-
-    public static final String TXT_IA_INVALID_PARAMETER = "Parameter is invalid";
-
-    public static final int ERR_IA_NOT_AN_ENVELOPE = -17;
-
-    public static final String TXT_IA_NOT_AN_ENVELOPE = "Not an ENVELOPE APDU";
-
-    // Interrupted IO related detailed errors
-    public static final int ERR_II_CON_CLOSED_DURING = -21;
-
-    public static final String TXT_II_CON_CLOSED_DURING = "Connection closed during exchange operation";
-
-    public static final int ERR_II_CARD_REMOVED = -22;
-
-    public static final String TXT_II_CARD_REMOVED = "Card was removed";
-
-    public static final int ERR_II_BT_SAP_IN_USE = -23;
-
-    public static final String TXT_II_BT_SAP_IN_USE = "BT SAP is in use";
-
-    // Connection not found related detailed errors
-    public static final int ERR_CNT_NO_SLOT = -31;
-
-    public static final String TXT_CNT_NO_SLOT = "Card slot does not exist";
-
-    public static final int ERR_CNT_NO_CARD = -32;
-
-    public static final String TXT_CNT_NO_CARD = "Card is not inserted or powered on";
-
-    public static final int ERR_CNT_NO_APPLICATION = -33;
-
-    public static final String TXT_CNT_NO_APPLICATION = "Card application does not exist or refused selection";
-
-    public static final int ERR_CNT_BT_SAP_IN_USE = -34;
-
-    public static final String TXT_CNT_BT_SAP_IN_USE = "BT Sap is in use";
-
-    // Security related detailed errors
-    public static final int ERR_SEC_NO_RIGHTS_PIN = -41;
-
-    public static final String TXT_SEC_NO_RIGHTS_PIN = "No rights to use PIN method";
-
-    public static final int ERR_SEC_ILLEGAL_APDU = -42;
-
-    public static final String TXT_SEC_ILLEGAL_APDU = "Sending to the card application not allowed";
-
-    public static final int ERR_SEC_ACCESS_NOT_ALLOWED = -43;
-
-    public static final String TXT_SEC_ACCESS_NOT_ALLOWED = "Accessing the application not allowed";
-
-    public static final int ERR_SEC_ILLEGAL_FILE_ID = -44;
-
-    public static final String TXT_SEC_ILLEGAL_FILE_ID = "Illegal AID";
-
-    // IO related detailed errors
-    public static final int ERR_IO_CON_CLOSED_BEFORE = -51;
-
-    public static final String TXT_IO_CON_CLOSED_BEFORE = "Connection was closed before this method was called";
-
-    public static final int ERR_IO_COMM_PROBLEMS = -52;
-
-    public static final String TXT_IO_COMM_PROBLEMS = "General communication error";
-
-    public static final int ERR_IO_ERROR_IO = -53;
-
-    public static final String TXT_IO_ERROR_IO = "I/O error";
-
-    public static final int ERR_IO_NO_FREE_CHANNELS = -54;
-
-    public static final String TXT_IO_NO_FREE_CHANNELS = "No free channels or other I/O error";
-
-    public static String[] iIllegalArgumentTexts = new String[]
-    {
-        TXT_IA_PARAM_NULL, TXT_IA_SELECT_APP, TXT_IA_MANAGE_CHANNEL,
-        TXT_IA_OTHER_CLA, TXT_IA_MALFORMED_APDU, TXT_IA_INVALID_PARAMETER,
-        TXT_IA_NOT_AN_ENVELOPE
-    };
-
-    public static String[] iInterruptedIOTexts = new String[]
-    {
-        TXT_II_CON_CLOSED_DURING, TXT_II_CARD_REMOVED, TXT_II_BT_SAP_IN_USE
-    };
-
-    public static String[] iConnectionNotFoundTexts = new String[]
-    {
-        TXT_CNT_NO_SLOT, TXT_CNT_NO_CARD, TXT_CNT_NO_APPLICATION,
-        TXT_CNT_BT_SAP_IN_USE
-    };
-
-    public static String[] iSecurityTexts = new String[]
-    {
-        TXT_SEC_NO_RIGHTS_PIN, TXT_SEC_ILLEGAL_APDU,
-        TXT_SEC_ACCESS_NOT_ALLOWED, TXT_SEC_ILLEGAL_FILE_ID
-    };
-
-    public static String[] iIOTexts = new String[] { TXT_IO_CON_CLOSED_BEFORE,
-            TXT_IO_COMM_PROBLEMS, TXT_IO_ERROR_IO, TXT_IO_NO_FREE_CHANNELS
-                                                   };
-
-    /**
-     * Do not allow construction.
-     */
-    private APDUError()
-    {
-    }
-
-    /**
-     * Checks needed error codes and throws correct exception. Out of memory
-     * error is checked in all cases.
-     */
-    public static int check(int aError, boolean aCheckIllegalArg,
-                            boolean aCheckSecurity, boolean aCheckConnNotFound,
-                            boolean aCheckInterruptedIO, boolean aIOasADefault)
-    throws IOException
-    {
-        if (aError < SecurityError.SUCCESS)
-        {
-            if (aError == SecurityError.ERR_NO_MEMORY)
-            {
-                throw new OutOfMemoryError();
-            }
-
-            if ((aCheckIllegalArg)
-                    && (belongsToErrorCategory(aError, ERR_ILLEGAL_ARGUMENT)))
-            {
-                throw new IllegalArgumentException(getExceptionText(aError,
-                                                   ERR_ILLEGAL_ARGUMENT, iIllegalArgumentTexts));
-            }
-            else if ((aCheckSecurity)
-                     && (belongsToErrorCategory(aError, ERR_SECURITY)))
-            {
-                throw new SecurityException(getExceptionText(aError,
-                                            ERR_SECURITY, iSecurityTexts));
-            }
-            else if ((aCheckConnNotFound)
-                     && (belongsToErrorCategory(aError, ERR_CONNECTION_NOT_FOUND)))
-            {
-                throw new ConnectionNotFoundException(getExceptionText(aError,
-                                                      ERR_CONNECTION_NOT_FOUND, iConnectionNotFoundTexts));
-            }
-            else if ((aCheckInterruptedIO)
-                     && (belongsToErrorCategory(aError, ERR_INTERRUPTED_IO)))
-            {
-                throw new InterruptedIOException(getExceptionText(aError,
-                                                 ERR_INTERRUPTED_IO, iInterruptedIOTexts));
-            }
-            else if (aIOasADefault)
-            {
-                // String errorTxt = NativeError.errorMessage( aError );
-                String errorTxt = OsErrorMessage.getErrorMessage(aError);
-                if (belongsToErrorCategory(aError, ERR_IO))
-                {
-                    errorTxt = getExceptionText(aError, ERR_IO, iIOTexts);
-                }
-                throw new IOException(errorTxt);
-            }
-        }
-        return aError;
-    }
-
-    /**
-     * Checks that does error code belong to gived error category.
-     */
-    private static boolean belongsToErrorCategory(int aError, int aErrorCategory)
-    {
-        // hundreds are cut
-        return ((aError / 100) == (aErrorCategory / 100));
-    }
-
-    /**
-     * Finds out detailed error message if it exists.
-     */
-    private static String getExceptionText(int aError, int aErrorCategory,
-                                           String[] aErrTxtArray)
-    {
-        String exceptionText = ERR_TXT_NO_SPECIFIC_TXT;
-        int detailedErrorValue = Math.abs(aError - aErrorCategory);
-        int decas = detailedErrorValue / 10;// decimals are cut
-        int decasFull = decas * 10;// only Full deca without smaller values
-        int index = detailedErrorValue - decasFull;
-
-        if ((index != 0) && (aErrTxtArray.length >= index))
-        {
-            exceptionText = aErrTxtArray[index - 1];
-        }
-        return exceptionText;
-    }
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/satsa/apdu/javasrc.s60/com/nokia/mj/impl/satsa/APDUError.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,260 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Provides apdu specific error codes
+ *
+*/
+
+
+package com.nokia.mj.impl.satsa;
+
+import java.io.IOException;
+import com.nokia.mj.impl.utils.OsErrorMessage;
+import com.nokia.mj.impl.satsa.SecurityError;
+
+import java.io.InterruptedIOException;
+import javax.microedition.io.ConnectionNotFoundException;
+
+/**
+ * Native error codes which causes certain Java exception to be thrown. For
+ * example ERR_ILLEGAL_ARGUMENT states that IllegalArgumentException must be
+ * thrown. Values starts from -3001 to avoid confusing with other error codes.
+ * In native side these error codes are defined in STSApduConstants.h file.
+ */
+public final class APDUError
+{
+    // CONSTANTS
+
+    public static final int ERR_ILLEGAL_ARGUMENT = -3100;
+
+    public static final int ERR_INTERRUPTED_IO = -3200;
+
+    public static final int ERR_CONNECTION_NOT_FOUND = -3300;
+
+    public static final int ERR_SECURITY = -3400;
+
+    public static final int ERR_IO = -3500;
+
+    public static final int ERR_CANCEL = -3600;
+
+    public static final String ERR_TXT_NO_SPECIFIC_TXT = "General error";
+
+    // illegal argument related detailed errors
+    // public static final int ERR_IA_PARAM_NULL = -11;
+    public static final String TXT_IA_PARAM_NULL = "Parameter is null";
+
+    public static final int ERR_IA_SELECT_APP = -12;
+
+    public static final String TXT_IA_SELECT_APP = "Card application selection APDU not allowed";
+
+    public static final int ERR_IA_MANAGE_CHANNEL = -13;
+
+    public static final String TXT_IA_MANAGE_CHANNEL = "MANAGE CHANNEL APDU not allowed";
+
+    public static final int ERR_IA_OTHER_CLA = -14;
+
+    public static final String TXT_IA_OTHER_CLA = "CLA byte must be 0x0X, 0x8X, 0x9X or 0xAX if Channel is non-zero";
+
+    public static final int ERR_IA_MALFORMED_APDU = -15;
+
+    public static final String TXT_IA_MALFORMED_APDU = "Parameter contains a malformed APDU";
+
+    public static final int ERR_IA_INVALID_PARAMETER = -16;
+
+    public static final String TXT_IA_INVALID_PARAMETER = "Parameter is invalid";
+
+    public static final int ERR_IA_NOT_AN_ENVELOPE = -17;
+
+    public static final String TXT_IA_NOT_AN_ENVELOPE = "Not an ENVELOPE APDU";
+
+    // Interrupted IO related detailed errors
+    public static final int ERR_II_CON_CLOSED_DURING = -21;
+
+    public static final String TXT_II_CON_CLOSED_DURING = "Connection closed during exchange operation";
+
+    public static final int ERR_II_CARD_REMOVED = -22;
+
+    public static final String TXT_II_CARD_REMOVED = "Card was removed";
+
+    public static final int ERR_II_BT_SAP_IN_USE = -23;
+
+    public static final String TXT_II_BT_SAP_IN_USE = "BT SAP is in use";
+
+    // Connection not found related detailed errors
+    public static final int ERR_CNT_NO_SLOT = -31;
+
+    public static final String TXT_CNT_NO_SLOT = "Card slot does not exist";
+
+    public static final int ERR_CNT_NO_CARD = -32;
+
+    public static final String TXT_CNT_NO_CARD = "Card is not inserted or powered on";
+
+    public static final int ERR_CNT_NO_APPLICATION = -33;
+
+    public static final String TXT_CNT_NO_APPLICATION = "Card application does not exist or refused selection";
+
+    public static final int ERR_CNT_BT_SAP_IN_USE = -34;
+
+    public static final String TXT_CNT_BT_SAP_IN_USE = "BT Sap is in use";
+
+    // Security related detailed errors
+    public static final int ERR_SEC_NO_RIGHTS_PIN = -41;
+
+    public static final String TXT_SEC_NO_RIGHTS_PIN = "No rights to use PIN method";
+
+    public static final int ERR_SEC_ILLEGAL_APDU = -42;
+
+    public static final String TXT_SEC_ILLEGAL_APDU = "Sending to the card application not allowed";
+
+    public static final int ERR_SEC_ACCESS_NOT_ALLOWED = -43;
+
+    public static final String TXT_SEC_ACCESS_NOT_ALLOWED = "Accessing the application not allowed";
+
+    public static final int ERR_SEC_ILLEGAL_FILE_ID = -44;
+
+    public static final String TXT_SEC_ILLEGAL_FILE_ID = "Illegal AID";
+
+    // IO related detailed errors
+    public static final int ERR_IO_CON_CLOSED_BEFORE = -51;
+
+    public static final String TXT_IO_CON_CLOSED_BEFORE = "Connection was closed before this method was called";
+
+    public static final int ERR_IO_COMM_PROBLEMS = -52;
+
+    public static final String TXT_IO_COMM_PROBLEMS = "General communication error";
+
+    public static final int ERR_IO_ERROR_IO = -53;
+
+    public static final String TXT_IO_ERROR_IO = "I/O error";
+
+    public static final int ERR_IO_NO_FREE_CHANNELS = -54;
+
+    public static final String TXT_IO_NO_FREE_CHANNELS = "No free channels or other I/O error";
+
+    public static String[] iIllegalArgumentTexts = new String[]
+    {
+        TXT_IA_PARAM_NULL, TXT_IA_SELECT_APP, TXT_IA_MANAGE_CHANNEL,
+        TXT_IA_OTHER_CLA, TXT_IA_MALFORMED_APDU, TXT_IA_INVALID_PARAMETER,
+        TXT_IA_NOT_AN_ENVELOPE
+    };
+
+    public static String[] iInterruptedIOTexts = new String[]
+    {
+        TXT_II_CON_CLOSED_DURING, TXT_II_CARD_REMOVED, TXT_II_BT_SAP_IN_USE
+    };
+
+    public static String[] iConnectionNotFoundTexts = new String[]
+    {
+        TXT_CNT_NO_SLOT, TXT_CNT_NO_CARD, TXT_CNT_NO_APPLICATION,
+        TXT_CNT_BT_SAP_IN_USE
+    };
+
+    public static String[] iSecurityTexts = new String[]
+    {
+        TXT_SEC_NO_RIGHTS_PIN, TXT_SEC_ILLEGAL_APDU,
+        TXT_SEC_ACCESS_NOT_ALLOWED, TXT_SEC_ILLEGAL_FILE_ID
+    };
+
+    public static String[] iIOTexts = new String[] { TXT_IO_CON_CLOSED_BEFORE,
+            TXT_IO_COMM_PROBLEMS, TXT_IO_ERROR_IO, TXT_IO_NO_FREE_CHANNELS
+                                                   };
+
+    /**
+     * Do not allow construction.
+     */
+    private APDUError()
+    {
+    }
+
+    /**
+     * Checks needed error codes and throws correct exception. Out of memory
+     * error is checked in all cases.
+     */
+    public static int check(int aError, boolean aCheckIllegalArg,
+                            boolean aCheckSecurity, boolean aCheckConnNotFound,
+                            boolean aCheckInterruptedIO, boolean aIOasADefault)
+    throws IOException
+    {
+        if (aError < SecurityError.SUCCESS)
+        {
+            if (aError == SecurityError.ERR_NO_MEMORY)
+            {
+                throw new OutOfMemoryError();
+            }
+
+            if ((aCheckIllegalArg)
+                    && (belongsToErrorCategory(aError, ERR_ILLEGAL_ARGUMENT)))
+            {
+                throw new IllegalArgumentException(getExceptionText(aError,
+                                                   ERR_ILLEGAL_ARGUMENT, iIllegalArgumentTexts));
+            }
+            else if ((aCheckSecurity)
+                     && (belongsToErrorCategory(aError, ERR_SECURITY)))
+            {
+                throw new SecurityException(getExceptionText(aError,
+                                            ERR_SECURITY, iSecurityTexts));
+            }
+            else if ((aCheckConnNotFound)
+                     && (belongsToErrorCategory(aError, ERR_CONNECTION_NOT_FOUND)))
+            {
+                throw new ConnectionNotFoundException(getExceptionText(aError,
+                                                      ERR_CONNECTION_NOT_FOUND, iConnectionNotFoundTexts));
+            }
+            else if ((aCheckInterruptedIO)
+                     && (belongsToErrorCategory(aError, ERR_INTERRUPTED_IO)))
+            {
+                throw new InterruptedIOException(getExceptionText(aError,
+                                                 ERR_INTERRUPTED_IO, iInterruptedIOTexts));
+            }
+            else if (aIOasADefault)
+            {
+                // String errorTxt = NativeError.errorMessage( aError );
+                String errorTxt = OsErrorMessage.getErrorMessage(aError);
+                if (belongsToErrorCategory(aError, ERR_IO))
+                {
+                    errorTxt = getExceptionText(aError, ERR_IO, iIOTexts);
+                }
+                throw new IOException(errorTxt);
+            }
+        }
+        return aError;
+    }
+
+    /**
+     * Checks that does error code belong to gived error category. 
+     */
+    private static boolean belongsToErrorCategory(int aError, int aErrorCategory)
+    {
+        // hundreds are cut
+        return ((aError / 100) == (aErrorCategory / 100));
+    }
+
+    /**
+     * Finds out detailed error message if it exists. 
+     */
+    private static String getExceptionText(int aError, int aErrorCategory,
+                                           String[] aErrTxtArray)
+    {
+        String exceptionText = ERR_TXT_NO_SPECIFIC_TXT;
+        int detailedErrorValue = Math.abs(aError - aErrorCategory);
+        int decas = detailedErrorValue / 10;// decimals are cut
+        int decasFull = decas * 10;// only Full deca without smaller values
+        int index = detailedErrorValue - decasFull;
+
+        if ((index != 0) && (aErrTxtArray.length >= index))
+        {
+            exceptionText = aErrTxtArray[index - 1];
+        }
+        return exceptionText;
+    }
+}
\ No newline at end of file
--- a/javaextensions/satsa/build/javasatsa_0x2002DCCE.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/satsa/build/javasatsa_0x2002DCCE.mmp	Tue May 25 12:34:19 2010 +0300
@@ -184,6 +184,16 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -204,10 +214,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/sensor/build/javasensor_0x2002DCD0.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/sensor/build/javasensor_0x2002DCD0.mmp	Tue May 25 12:34:19 2010 +0300
@@ -95,6 +95,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -115,10 +128,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/sensor/javasrc.s60/com/mj/impl/gcf/protocol/sensor/Connection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.sensor;
-
-import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
-import java.io.IOException;
-
-public class Connection extends J9GcfConnectionBase
-{
-    private static Protocol iProtocol = null;
-
-    public Connection()
-    {
-    }
-
-    protected javax.microedition.io.Connection createConnection(String aName,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        if (iProtocol == null)
-        {
-            iProtocol = new Protocol();
-        }
-        return iProtocol.openConnection(aName, aMode, aTimeouts);
-    }
-}
\ No newline at end of file
--- a/javaextensions/sensor/javasrc.s60/com/mj/impl/gcf/protocol/sensor/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.gcf.protocol.sensor;
-
-import java.io.IOException;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.Jvm;
-
-import com.nokia.mj.impl.sensor.SensorConnectionImpl;
-
-public class Protocol
-{
-    static
-    {
-        try
-        {
-            Jvm.loadSystemLibrary("javasensor");
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.EJavaFile, "Unable to load javasensor dll");
-        }
-    }
-
-    public Protocol()
-    {
-    }
-
-
-    public javax.microedition.io.Connection openConnection(String aUri,
-            int aMode, boolean aTimeouts) throws IOException
-    {
-        String sensor = "sensor:"+aUri;
-        return new SensorConnectionImpl(sensor);
-    }
-}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/sensor/javasrc.s60/com/nokia/mj/impl/gcf/protocol/sensor/Connection.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.sensor;
+
+import com.nokia.mj.impl.gcf.utils.J9GcfConnectionBase;
+import java.io.IOException;
+
+public class Connection extends J9GcfConnectionBase
+{
+    private static Protocol iProtocol = null;
+
+    public Connection()
+    {
+    }
+
+    protected javax.microedition.io.Connection createConnection(String aName,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+        if (iProtocol == null)
+        {
+            iProtocol = new Protocol();
+        }
+        return iProtocol.openConnection(aName, aMode, aTimeouts);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/sensor/javasrc.s60/com/nokia/mj/impl/gcf/protocol/sensor/Protocol.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.gcf.protocol.sensor;
+
+import java.io.IOException;
+import com.nokia.mj.impl.utils.Logger;
+import com.nokia.mj.impl.rt.support.Jvm;
+
+import com.nokia.mj.impl.sensor.SensorConnectionImpl;
+
+public class Protocol
+{
+    static
+    {
+        try
+        {
+            Jvm.loadSystemLibrary("javasensor");
+        }
+        catch (Exception e)
+        {
+            Logger.ELOG(Logger.EJavaFile, "Unable to load javasensor dll");
+        }
+    }
+
+    public Protocol()
+    {
+    }
+
+
+    public javax.microedition.io.Connection openConnection(String aUri,
+            int aMode, boolean aTimeouts) throws IOException
+    {
+        String sensor = "sensor:"+aUri;
+        return new SensorConnectionImpl(sensor);
+    }
+}
+
--- a/javaextensions/sensor/src.s60/cacceleratorsensor.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/sensor/src.s60/cacceleratorsensor.cpp	Tue May 25 12:34:19 2010 +0300
@@ -297,6 +297,7 @@
 
 void CAcceleratorSensor::OpenChannelL()
 {
+    TInt err;
     JELOG2(ESensor);
     LOG(ESensor,EInfo,"Creating Open Channel");
     iChannel->OpenChannelL();
@@ -305,9 +306,10 @@
     iScaleFactor = 1;
     TInt format(ESensrvChannelDataFormatAbsolute);
     TSensrvProperty property;
-    TRAPD(err1,iChannel->GetPropertyL(KSensrvPropIdChannelDataFormat, KSensrvItemIndexNone,
+    TRAP(err,iChannel->GetPropertyL(KSensrvPropIdChannelDataFormat, KSensrvItemIndexNone,
                                       property););
-    LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() One = %d",err1);
+    LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() One = %d",err);
+
     if (property.PropertyType() == ESensrvIntProperty)
     {
         property.GetValue(format);
@@ -326,18 +328,18 @@
         // Scaled value maximum
         TSensrvProperty property_scaled;
         TInt maxScaled(0);
-        TRAPD(err2,iChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone,
+        TRAP(err,iChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone,
                                           property_scaled););
-        LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Two = %d",err2);
+        LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Two = %d",err);
 
         if (property_scaled.GetArrayIndex() == ESensrvArrayPropertyInfo)
         {
             LOG(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::If");
             //for 2G Accelerometer Sensor index value is 0.
             TInt rangeIndex(0);
-            TRAPD(err3,iChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone,
+            TRAP(err,iChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone,
                                               rangeIndex, property_scaled););
-            LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Three = %d",err3);
+            LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Three = %d",err);
 
             property_scaled.GetMaxValue(maxScaled);
 
@@ -351,12 +353,13 @@
         }
         // MeasureRange can be an array property
         TReal maxMeasure;
+        TInt err1;
         TSensrvProperty property_Measured;
-        TRAPD(err4,iChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone,
+        TRAP(err1,iChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone,
                                           property_Measured););
-        LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Four = %d",err4);
+        LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Four = %d",err1);
 
-        if (err4 == KErrNone)
+        if (err1 == KErrNone)
         {
             TInt arrayIndex = property_Measured.GetArrayIndex();
             LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::KSensrvPropIdMeasureRange::arrayIndex = %d",arrayIndex);
@@ -368,9 +371,9 @@
                 TInt index2g = 0;
                 LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::Getting RangeIndex = %f",index2g);
                 //We need to TypeCast variable rangeIndex to TInt for
-                TRAPD(err5,iChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone,
+                TRAP(err,iChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone,
                                                   index2g, property_Measured););
-                LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Five = %d",err5);
+                LOG1(ESensor,EInfo,"CAcceleratorSensor::OpenChannelL()::GetPropertyL() Five = %d",err);
                 property_Measured.GetMaxValue(maxMeasure);
             }
             else
--- a/javaextensions/subsystem.mk	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -50,4 +50,8 @@
     COMPONENTS += midprms/build
 endif
 
+# Declare that release preparation removes subdirectories not in build, except
+# listed special cases
+REMOVE_NOTBUILT_EXCLUDING = inc
+
 include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/javaextensions/webservices/build/javawebservices_0x2002DCDB.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/webservices/build/javawebservices_0x2002DCDB.mmp	Tue May 25 12:34:19 2010 +0300
@@ -69,6 +69,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -89,10 +102,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/wma/mms/build/javawmamms_0x2002DCDD.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/wma/mms/build/javawmamms_0x2002DCDD.mmp	Tue May 25 12:34:19 2010 +0300
@@ -96,6 +96,17 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -116,10 +127,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/wma/mms/pushplugin/build/javammsscplugin_0x2002DCC1.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/wma/mms/pushplugin/build/javammsscplugin_0x2002DCC1.mmp	Tue May 25 12:34:19 2010 +0300
@@ -84,6 +84,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -104,10 +117,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/wma/mms/tsrc/exhaustivetests/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-Created-By: 1.3.1_14 (Sun Microsystems Inc.)
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-MIDlet-1: JsrTestRunner,,JsrTestRunner.JsrTestRunner
-MIDlet-Name: JsrTestRunner
-MIDlet-Jar-Size: 7277
-MIDlet-Jar-URL: JsrTestRunner.jar
-ModuleName: WMA20_Exhaustivetests
-TestClassName1: com.nokia.mj.test.wma.exhaustivetests.TestReceive
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
--- a/javaextensions/wma/mms/tsrc/exhaustivetests/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="exhaustivetests" default="deploy.ut" basedir=".">
-  
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  
-  <property name="src.dir" location="./javasrc;../moduletestframework/javasrc"/>
-  <property name="build.dir" location="."/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="exhaustivetests.jar.filename" value="OmjMMSExhaustiveTests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-  <target name="init.my.properties" depends="init.properties">
-    <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${exhaustivetests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-
-   
-
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    <ant antfile="${java.src.root}\tools\junit\JsrTestRunner\build\build.xml">
-   </ant>
-  </target>
-
-
-  <target name="deploy.ut" depends="compile.ut,init.my.properties">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${exhaustivetests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean"/>
-
- </project> 
Binary file javaextensions/wma/mms/tsrc/exhaustivetests/data/MMSs.zip has changed
Binary file javaextensions/wma/mms/tsrc/exhaustivetests/data/localmode.ini has changed
--- a/javaextensions/wma/mms/tsrc/exhaustivetests/javasrc/com/nokia/mj/test/wma/TestReceive.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,472 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION
- *
- * Code complexity rate (of the tested module) if measured:
- *
- * The purpose of the module test:<br>
- *
- * Test message receiving with MessageConnection.
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 Receive tests<br>
- * 1.1 Tests the handling of different kind of MMSs<br>
- *
- * Used stubs and description:
- *
- * Setting up the environment:
- *
- * How to run the test:
- *
- * Is it tested with WINSCW and/or HW:
- *
- * Outputs and expected results:
- *
- * Branch coverage percentage (explanation if it is under 70%):
- *
- * In case some of the tests cannot be run, an explanation should be given:
- *
- * Included test files:
- *
- * Build number (in which the tested module is integrated):
- *
- * Note whether the test case belongs to the MRT set:
- *
- **/
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-import javax.microedition.midlet.MIDlet;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.microedition.io.file.FileConnection;
-import java.io.*;
-
-public class TestReceive extends WmaTestBase
-{
-    public static Object lock = new Object();
-    private static final String SOURCE_PATH = "file:///c:/Data/Images/wma20/";
-    private static final String DEST_PATH = "file:///c:/Data/Images/mmstest/";
-
-    public TestReceive()
-    {
-    }
-
-    public TestReceive(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-     * Any pretest setup can be done here
-     */
-    protected void setUp() throws Exception
-    {
-    }
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new TestReceive("testReceive", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).testReceive();
-            }
-        }));
-
-
-        return aSuite;
-    }
-
-    /**
-     * 1.1 Tests the receiving of different kinf of MMSs<br>
-     */
-    public void testReceive()
-    {
-        // Test preparations.
-        String url = "mms://:javaAppID";
-        MessageConnection conn = null;
-        MultipartMessage msg;
-        int MMSs = 19;
-        try
-        {
-            // start the receiver thread first
-            try
-            {
-                conn = getConnection(url);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            MessageReceiver receiver = new MessageReceiver(lock, conn, MMSs);
-            receiver.start();
-
-            // copy the ready made MMSs from c:\wma20 into s:\mmstest
-            try
-            {
-                copyFile("Complete.mms");
-                copyFile("EmptyBcc.mms");
-                copyFile("EmptyCc.mms");
-                copyFile("EmptyCID.mms");
-                copyFile("EmptyCL.mms");
-                copyFile("SameCID.mms");
-                copyFile("EmptyContent.mms");
-                copyFile("EmptyFrom.mms");
-                copyFile("EmptyMIME.mms");
-                copyFile("EmptyReplyToAppID.mms");
-                copyFile("EmptySubject.mms");
-                copyFile("EmptyTo.mms");
-                copyFile("InvalidFrom.mms");
-                copyFile("NoAddresses.mms");
-                copyFile("NoMIME.mms");
-                copyFile("NoPriority.mms");
-                copyFile("NoReplyToAppID.mms");
-                copyFile("Null.mms");
-                copyFile("WhiteSpaces.mms");
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-                assertTrue(e.toString(), false);
-            }
-
-
-            // wait for the receiving of the MMSs
-            synchronized (lock)
-            {
-                try
-                {
-                    lock.wait();
-                }
-                catch (InterruptedException e)
-                {
-                }
-            }
-
-            if (receiver.getError() != null)
-            {
-                assertTrue(receiver.getError(), false);
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the MMS connection.
-                if (conn != null)
-                {
-                    conn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    private void copyFile(String fileName)
-    throws IOException
-    {
-        FileConnection sFileConn = null, dFileConn = null;
-        try
-        {
-            sFileConn = (FileConnection)Connector.open(SOURCE_PATH + fileName);
-            InputStream fis = sFileConn.openInputStream();
-            byte[] b = new byte[1024];
-            int length = fis.read(b, 0, 1024);
-            dFileConn = (FileConnection)Connector.open(DEST_PATH + fileName);
-            dFileConn.create();
-            OutputStream fos = dFileConn.openOutputStream();
-            fos.write(b, 0, length);
-            fos.flush();
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the file connection.
-                if (sFileConn != null)
-                {
-                    sFileConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the file connection.
-                if (dFileConn != null)
-                {
-                    dFileConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-    }
-
-    /**
-     * Thread for receiving a message from given connection.
-     */
-    static class MessageReceiver extends Thread
-    {
-        private Object owner = null;
-        private MessageConnection connection = null;
-        private String error = null;
-        private int expectedMMSs;
-
-        public MessageReceiver(Object anOwner, MessageConnection aConnection, int aExpectedMMSs)
-        {
-            owner = anOwner;
-            connection = aConnection;
-            expectedMMSs = aExpectedMMSs;
-        }
-
-        public void run()
-        {
-            for (int i=0; i<expectedMMSs; i++)
-            {
-                try
-                {
-                    MultipartMessage msg = (MultipartMessage)connection.receive();
-                    if (msg == null)
-                    {
-                        error = "MMS not received properly";
-                        break;
-                    }
-                    if (msg.getSubject() == null)
-                    {
-                        error = handleNoSubjectMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("Complete"))
-                    {
-                        error = handleCompleteMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyBc"))
-                    {
-                        error = handleNoEmptyBccMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyCc"))
-                    {
-                        error = handleEmptyCcMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyCID"))
-                    {
-                        error = handleEmptyCIDMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyCL"))
-                    {
-                        error = handleEmptyCLMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyContent"))
-                    {
-                        error = handleEmptyContentMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyFrom"))
-                    {
-                        error = handleEmptyFromMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyMIME"))
-                    {
-                        error = handleEmptyMIMEMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyReplyToAppID"))
-                    {
-                        error = handleEmptyReplyToAppIDMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("EmptyTo"))
-                    {
-                        error = handleEmptyToMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("InvalidFrom"))
-                    {
-                        error = handleInvalidFromMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("NoAddresses"))
-                    {
-                        error = handleNoAddressesMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("no--mime"))
-                    {
-                        error = handleNoMIMEMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("NoPriority"))
-                    {
-                        error = handleNoPriorityMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("NoReplyToAppID"))
-                    {
-                        error = handleNoReplyToAppIDMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("NullMMS"))
-                    {
-                        error = handleNullMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("wtspaces"))
-                    {
-                        error = handleWTSpacesMMS(connection, msg);
-                    }
-                    else if (msg.getSubject().equals("Dupl-CID"))
-                    {
-                        error = handleDuplCIDMMS(connection, msg);
-                    }
-                    else
-                    {
-                        error = "Unexpected MMS";
-                        break;
-                    }
-                }
-                catch (Exception e)
-                {
-                    error = e.toString();
-                    break;
-                }
-            }
-
-            if (owner != null)
-            {
-                synchronized (owner)
-                {
-                    owner.notify();
-                }
-            }
-        }
-
-        public String getError()
-        {
-            return error;
-        }
-
-        private String handleNoSubjectMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleCompleteMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNoEmptyBccMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyCcMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyCIDMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyCLMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyContentMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyFromMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyMIMEMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyReplyToAppIDMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleEmptyToMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleInvalidFromMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNoAddressesMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNoMIMEMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNoPriorityMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNoReplyToAppIDMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleNullMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-
-        private String handleDuplCIDMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            try
-            {
-                aConnection.send(msg);
-            }
-            catch (IllegalArgumentException e)
-            {
-                // ok
-                return null;
-            }
-            catch (Exception e)
-            {
-                // fail
-            }
-            return "Sending of an invalid MMS should have failed";
-        }
-
-        private String handleWTSpacesMMS(MessageConnection aConnection, MultipartMessage msg)
-        {
-            return null;
-        }
-    }
-}
--- a/javaextensions/wma/mms/tsrc/exhaustivetests/runTests.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-set start_path=%CD%
-
-rem ******************* Compilation and installation of the tests ************************************************************************
-call ant 
-
-rem IF THE INSTALLATION OF MIDLETS FROM COMMAND LINE WORKS THEN:
-rem    . UNCOMMENT LINE NO. 12
-rem    . COMMENT OUT LINES NO.14, 15, 16
-rem call ant install
-
-rem THIS IS A WORKAROUND FOR THE MIDLET NOT BEING INSTALLED FROM COMMAND LINE
-echo Install the MIDlet, exit the emulator and
-pause
-
-rem ********************* TEST PREPARATIONS: configure MMSEngine for the auto-receiving of some MMSs **************************************
-copy .\data\localmode.ini \epoc32\WINSCW\C\system\data\
-cd \epoc32\WINSCW\C\Data\Images\
-mkdir wma20
-mkdir mmstest
-cd %start_path%
-unzip .\data\MMSs.zip -d \epoc32\WINSCW\C\Data\Images\wma20\
-ren \epoc32\release\winscw\udeb\Z\resource\java\security\policies\untrusted.ser untrusted.ser_
-copy .\data\untrusted.ser \epoc32\release\winscw\udeb\Z\resource\java\security\policies
-
-rem IF RUNNING OF MIDLETS FROM COMMAND LINE WORKS THEN:
-rem    . UNCOMMENT LINE NO.31
-rem    . COMMENT OUT LINES NO.33, 34, 35
-rem call ant run
-
-rem THIS IS A WORKAROUND FOR NOT BEING ABLE TO RUN THE MIDLET FROM COMMAND LINE
-echo Run the MIDlet, exit the emulator and
-pause
-
-
-:cleanup
-del /Q \epoc32\WINSCW\C\system\data\localmode.ini
-del /Q \epoc32\WINSCW\C\Data\Images\mmstest\*.*
-del /Q \epoc32\WINSCW\C\Data\Images\wma20\*.*
-cd \epoc32\WINSCW\C\Data\Images\
-rmdir wma20
-rmdir mmstest
-del /Q \epoc32\release\winscw\udeb\Z\resource\java\security\policies\untrusted.ser
-ren \epoc32\release\winscw\udeb\Z\resource\java\security\policies\untrusted.ser_ untrusted.ser
-cd %start_path%
-
-:end
\ No newline at end of file
--- a/javaextensions/wma/mms/tsrc/generictests/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-MIDlet-1: JsrTestRunner,,JsrTestRunner.JsrTestRunner
-MIDlet-Jar-URL: JsrTestRunner.jar
-MIDlet-Jar-Size: 7279
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-MIDlet-Name: JsrTestRunner
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-ModuleName: WMA20
-TestClassName1: com.nokia.mj.test.wma.generictests.TestMessageConnection
-TestClassName2: com.nokia.mj.test.wma.generictests.TestOpenConnection
-TestClassName3: com.nokia.mj.test.wma.generictests.TestMessagePart
-TestClassName4: com.nokia.mj.test.wma.generictests.TestSend
-TestClassName5: com.nokia.mj.test.wma.generictests.TestReceive
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
--- a/javaextensions/wma/mms/tsrc/generictests/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="MmsGenericTests" default="deploy.ut" basedir=".">
-
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <property name="src.dir" location="./javasrc;../moduletestframework/javasrc"/>
-  <property name="build.dir" location="."/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="mmstests.jar.filename" value="MmsGenericTests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-  <target name="init.my.properties" depends="init.properties">
-    <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${mmstests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-   
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    <ant antfile="${java.src.root}\tools\junit\JsrTestRunner\build\build.xml">
-   </ant>
-  </target>
-
-  <target name="deploy.ut" depends="compile.ut,init.my.properties">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${mmstests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean,run"/>
-
-  <target name="run" depends="deploy.ut">
-      <echo>Running OpenTests</echo>
-      <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.sms.OpenTests"/>
-      </exec>
-      <echo>Running CloseTests</echo>
-      <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.sms.CloseTests"/>
-      </exec>
-  </target>
-</project>
--- a/javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestMessageConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2769 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION<br>
- *
- * Code complexity rate (of the tested module) if measured:<br>
- *
- * The purpose of the module test:<br>
- *
- * To test MessageConnection methods.<br>
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 Closed connection tests<br>
- * 1.1 Calling newMessage(String) on closed connection => OK<br>
- * 1.2 Calling newMessage(String, String) on closed connection => OK<br>
- * 1.3 Calling receive on closed connection => IOException<br>
- * 1.4 Calling receive on client connection => IOException<br>
- * 1.5 Calling send on closed connection => IOException<br>
- * 1.6 Calling numberOfSegments on closed connection => OK<br>
- * 1.7 Calling setMessageListener on closed connection  => IOException<br>
- * 1.8 Calling setMessageListener on client connection  => IOException<br>
- * 1.9 Calling close on closed connection => OK<br>
- *
- * 2 Default newMessage tests<br>
- * 2.1 newMessage with null parameter => NullPointerException<br>
- * 2.2 newMessage with invalid message type => IllegalArgumentException<br>
- * 2.3 check default state for multipart using client without address<br>
- * 2.4 check default state for multipart using server without address<br>
- * 2.5 check default state for binary using client without address<br>
- * 2.6 check default state for binary using server without address<br>
- * 2.7 check default state for text using client without address<br>
- * 2.8 check default state for text using server without address<br>
- * 2.9 check default state for multipart using client with address<br>
- * 2.10 check default state for multipart using server with address<br>
- * 2.11 check default state for binary using client with address<br>
- * 2.12 check default state for binary using server with address<br>
- * 2.13 check default state for text using client with address<br>
- * 2.14 check default state for text using server with address<br>
- *
- * 3 MessageTests - TextMessage<br>
- * 3.1 Creating a text message<br>
- * 3.2 Creating a text message with address<br>
- * 3.3 getPayloadText with a message with no payload should return null<br>
- * 3.4 setPayloadText/getPayloadText with valid string (should be ok)<br>
- * 3.5 setPayloadText/getPayloadText with zero length string (should be ok)<br>
- * 3.6 setPayloadText/getPayloadText with null parameter (should be ok)<br>
- * 3.7 Calling through the base - Message methods from TextMessage<br>
- * 3.7.1 get/setAddress - null address<br>
- * 3.7.2 get/setAddress - valid address<br>
- * 3.7.3 get/setAddress - accept invalid address<br>
- * 3.7.4 getTimestamp<br>
- * 3.7.5 getTimestamp on sent message<br>
- *
- * 4 MessageTests - BinaryMessage<br>
- * 4.1 Creating a binary message<br>
- * 4.2 Creating a binary message with address<br>
- * 4.3 getPayloadData with a message with no payload should return null<br>
- * 4.4 setPayloadData/getPayloadData with valid parameter (should be ok)<br>
- * 4.5 setPayloadData/getPayloadData with zero length array (should be ok)<br>
- * 4.6 setPayloadData/getPayloadData with null parameter (should be ok)<br>
- * 4.7 setPayloadData and then change array contents - changes should affect payload<br>
- * 4.8 Calling through the base - Message methods from BinaryMessage<br>
- * 4.8.1 get/setAddress - null address<br>
- * 4.8.2 get/setAddress - valid address<br>
- * 4.8.3 get/setAddress - accept invalid address<br>
- * 4.8.4 getTimestamp<br>
- * 4.8.5 getTimestamp on sent message<br>
- *
- * 5 MessageTests - MultiPartMessage<br>
- * 5.1 addMessagePart with valid parameter => OK<br>
- * 5.2 addMessagePart with invalid parameter (conflicting contentId) => IllegalArgumentException<br>
- * 5.3 addMessagePart with invalid parameter (too large content) => SizeExceededException<br>
- * 5.4 addMessagePart with null parameter => NullPointerException<br>
- * 5.5 addAddress with valid parameters => OK<br>
- * 5.6 addAddress with null parameter => IllegalArgumentException<br>
- * 5.7 addAddress with invalid parameter => IllegalArgumentException<br>
- * 5.8 getAddresses when more than one address exist<br>
- * 5.9 getAddresses for unknown type => returns null<br>
- * 5.10 removeAddress with valid parameters => OK<br>
- * 5.11 removeAddress with invalid parameters => IllegalArgumentException<br>
- * 5.12 removeAddresses => OK<br>
- * 5.13 set/getHeader for delivery time and priority headers<br>
- * 5.14 set/getHeader for subject, to from, cc, bcc headers => IllegalArgumentException<br>
- * 5.15 getHeader for unknown header => IllegalArgumentException<br>
- * 5.16 set/getSubject with valid value => OK<br>
- * 5.17 set/getSubject with null => OK<br>
- * 5.18 getMessagePart with valid contentId => OK<br>
- * 5.19 getMessagePart with null parameter => NullPointerException<br>
- * 5.20 getStartContentId when startMessagePart is set => OK<br>
- * 5.21 getStartContentId when startMessagePart is not set => null<br>
- * 5.22 setStartContentId with valid contentId => OK<br>
- * 5.23 setStartContentId with not matching contentId => IllegalArgumentException<br>
- * 5.24 removeMessagePart with matching messagePart parameter => OK, true<br>
- * 5.25 removeMessagePart with non-matching messagePart parameter => OK, false<br>
- * 5.26 removeMessagePart with null parameter => NullPointerException<br>
- * 5.27 removeMessagePartId with matching contentId parameter => OK, true<br>
- * 5.28 removeMessagePartId with non-matching contentId parameter => OK, false<br>
- * 5.28 removeMessagePartId with null parameter => NullPointerException<br>
- * 5.30 removeMessagePartLocation with matching contentLocation parameter => OK, true<br>
- * 5.31 removeMessagePartLocation with non-matching contentLocation parameter => OK, false<br>
- * 5.32 removeMessagePartLocation with null parameter => NullPointerException<br>
- * 5.33 Calling through the base - Message methods from MultiPartMessage<br>
- * 5.33.1 get/setAddress - null address<br>
- * 5.33.2 get/setAddress - valid address<br>
- * 5.33.3 get/setAddress - invalid address => IllegalArgumentException<br>
- * 5.33.4 getTimestamp from not sent message => null<br>
- * 5.33.5 getTimestamp on sent message => Date<br>
- * 5.34 addAddress with invalid applicationId parameter => IllegalArgumentException<br>
- *
- * 6 Text message numberOfSegments tests<br>
- * 6.1 Segmentation tests for gsm7 (message to user)<br>
- * 6.2 Segmentation tests for ucs-2 (message to user)<br>
- * 6.3 Segmentation tests for binary (message to user)<br>
- * 6.4 Segmentation tests for gsm7, port (message to application)<br>
- * 6.5 Segmentation tests for ucs-2, port (message to application)<br>
- * 6.6 Segmentation tests for binary, port (message to application)<br>
- *
- * Used stubs and description:<br>
- *
- * Setting up the environment:<br>
- *
- * How to run the test:<br>
- *
- * Is it tested with WINSCW and/or HW:<br>
- *
- * Outputs and expected results:<br>
- *
- * Branch coverage percentage (explanation if it is under 70%):<br>
- *
- * In case some of the tests cannot be run, an explanation should be given:<br>
- *
- * Included test files:<br>
- *
- * Build number (in which the tested module is integrated):<br>
- *
- * Note whether the test case belongs to the MRT set:<br>
- *
- **/
-
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-
-public class TestMessageConnection extends WmaTestBase
-{
-
-
-    public TestMessageConnection()
-    {
-    }
-
-    public TestMessageConnection(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-
-        aSuite.addTest(new TestMessageConnection("newMsgOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).newMsgOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("newMsg2OnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).newMsg2OnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("receiveOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).receiveOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("receiveOnClientConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).receiveOnClientConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("sendOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).sendOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("nrOfSegsOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).nrOfSegsOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("setListenerOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).setListenerOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("setListenerOnClientConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).setListenerOnClientConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("closeOnClosedConnection", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).closeOnClosedConnection();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("newMessageInvalidParams", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).newMessageInvalidParams();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("defaultNewMessage", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).defaultNewMessage();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("addMessagePart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).addMessagePart();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("addAddress", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).addAddress();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("removeAddress", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).removeAddress();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("getSetHeader", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).getSetHeader();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("getStartContentId", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).getStartContentId();
-            }
-        }));
-
-        aSuite.addTest(new TestMessageConnection("removeMessagePart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).removeMessagePart();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("removeMessagePartId", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).removeMessagePartId();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("removeMessagePartLocation", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).removeMessagePartLocation();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("getSetAddress", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).getSetAddress();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("getTimestamp", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).getTimestamp();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessageConnection("addAddressWithInvalidAppId", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessageConnection) tc).addAddressWithInvalidAppId();
-            }
-        }));
-
-        return aSuite;
-    }
-
-
-    /**
-     * 1.1 Calling newMessage(String) on closed connection => OK<br>
-     */
-    public void newMsgOnClosedConnection()
-    {
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create new message on closed connection.
-        try
-        {
-            Message msg = conn.newMessage(MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.2 Calling newMessage(String, String) on closed connection => OK<br>
-     */
-    public void newMsg2OnClosedConnection()
-    {
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create new message on closed connection.
-        try
-        {
-            Message msg = conn.newMessage(
-                              MessageConnection.MULTIPART_MESSAGE, getMsisdnAddress(1, true));
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.3 Calling receive on closed connection => IOException<br>
-     */
-    public void receiveOnClosedConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Call receive on closed connection.
-        try
-        {
-            Message msg = conn.receive();
-            assertTrue("receive on closed connection did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.4 Calling receive on client connection => IOException<br>
-     */
-    public void receiveOnClientConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Call receive on client connection.
-        try
-        {
-            Message msg = conn.receive();
-            assertTrue("receive on client connection did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.5 Calling send on closed connection => IOException<br>
-     */
-    public void sendOnClosedConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Call send on closed connection.
-        try
-        {
-            Message msg = conn.newMessage(MessageConnection.MULTIPART_MESSAGE);
-            // Try to send a message through a closed connection.
-            conn.send(msg);
-            assertTrue("send through closed connection did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.6 Calling numberOfSegments on closed connection => OK<br>
-     */
-    public void nrOfSegsOnClosedConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        Message msg = null;
-        try
-        {
-            msg = getDummyMultipartMessage(
-                      conn, getEmailAddress(0, true), "Test message");
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Call numberOfSegments on closed connection.
-        try
-        {
-            int nrOfSegs = conn.numberOfSegments(msg);
-            if (nrOfSegs == 1)
-            {
-                // Our implementation will always return 1 segment
-                // for MultipartMessages.
-                // OK
-            }
-            else
-            {
-                assertTrue("numberOfSegments returned incorrect result: "
-                           + nrOfSegs + ", expected 1",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("numberOfSegments failed: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.7 Calling setMessageListener on closed connection  => IOException<br>
-     */
-    public void setListenerOnClosedConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Set listener on closed connection.
-        try
-        {
-            conn.setMessageListener(new MessageListener()
-            {
-                public void notifyIncomingMessage(MessageConnection conn)
-                {
-                    // Do nothing.
-                }
-            });
-            assertTrue("Calling setMessageListener on closed connection "
-                       + "did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.8 Calling setMessageListener on client connection  => IOException<br>
-     */
-    public void setListenerOnClientConnection()
-    {
-
-
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Set listener on client connection.
-        try
-        {
-            conn.setMessageListener(new MessageListener()
-            {
-                public void notifyIncomingMessage(MessageConnection conn)
-                {
-                    // Do nothing.
-                }
-            });
-            assertTrue("Calling setMessageListener on client connection "
-                       + "did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.9 Calling close on closed connection => OK<br>
-     */
-    public void closeOnClosedConnection()
-    {
-
-        // Test preparations.
-        MessageConnection conn = null, conn2 = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-            conn2 = getClosedConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Call close on closed client connection.
-        try
-        {
-            conn.close();
-        }
-        catch (Exception e)
-        {
-            assertTrue("Client connection closing failed: " + e.toString(),false);
-        }
-
-        // Call close on closed server connection.
-        try
-        {
-            conn2.close();
-        }
-        catch (Exception e)
-        {
-            assertTrue("Server connection closing failed: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-
-    }
-
-    /**
-     * 2.1 newMessage with null parameter => NullPointerException<br>
-     * 2.2 newMessage with invalid message type => IllegalArgumentException<br>
-     */
-    public void newMessageInvalidParams()
-    {
-        // Test preparations.
-        String addr = getEmailAddress(0, true);
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Call newMessage(String) with null parameter.
-        try
-        {
-            Message msg = conn.newMessage(null);
-            assertTrue(
-                "newMessage(null) did not throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("newMessage(null) => " + e.toString(),false);
-        }
-
-        // Call newMessage(String, String) with null parameter.
-        try
-        {
-            Message msg = conn.newMessage(null, addr);
-            assertTrue(
-                "newMessage(null, addr) did not throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("newMessage(null, addr) => " + e.toString(),false);
-        }
-
-        // Call newMessage(String, String) with null parameter.
-        try
-        {
-            Message msg = conn.newMessage(MessageConnection.MULTIPART_MESSAGE, null);
-            // OPEN: Should this throw an exception?
-            //assertTrue(
-            //    "newMessage(MULTIPART_MESSAGE, null) did not throw NullPointerException");
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("newMessage(MULTIPART_MESSAGE, null) => " + e.toString(),false);
-        }
-
-        // Call newMessage(String) with invalid parameter.
-        try
-        {
-            Message msg = conn.newMessage("foo");
-            assertTrue(
-                "newMessage(foo) did not throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("newMessage(foo) => " + e.toString(),false);
-        }
-
-        // Call newMessage(String, String) with invalid parameter.
-        try
-        {
-            Message msg = conn.newMessage("foo", addr);
-            assertTrue(
-                "newMessage(foo, addr) did not throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("newMessage(foo, addr) => " + e.toString(),false);
-        }
-
-        // If we got this far test case was passed.
-        assertTrue("",true);
-    }
-
-    /**
-     * 2.3 check default state for multipart using client without address<br>
-     * 2.4 check default state for multipart using server without address<br>
-     * 2.9 check default state for multipart using client with address<br>
-     * 2.10 check default state for multipart using server with address<br>
-     */
-    public void defaultNewMessage()
-    {
-        // Test preparations.
-        String addr = getEmailAddress(0, true);
-        String msgError = null;
-        MessageConnection clientConn = null, serverConn = null;
-        try
-        {
-            clientConn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-            serverConn = getClosedConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Get default MultipartMessage and check that it contains valid fields.
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)clientConn.newMessage(
-                                       MessageConnection.MULTIPART_MESSAGE);
-            if ((msgError = validDefaultMessage(
-                                msg, getMsisdnAddress(0, true) + ":test.appid"))
-                    != null)
-            {
-                assertTrue(
-                    "Message created without address from client connection "
-                    + "does not contain valid default content:\n" + msgError,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("clientConn.newMessage => " + e.toString(),false);
-        }
-
-        // Get default MultipartMessage and check that it contains valid fields.
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)serverConn.newMessage(
-                                       MessageConnection.MULTIPART_MESSAGE);
-            if ((msgError = validDefaultMessage(msg, null)) != null)
-            {
-                assertTrue(
-                    "Message created without address from server connection "
-                    + "does not contain valid default content:\n" + msgError,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("serverConn.newMessage => " + e.toString(),false);
-        }
-
-        // Get default MultipartMessage and check that it contains valid fields.
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)clientConn.newMessage(
-                                       MessageConnection.MULTIPART_MESSAGE, addr);
-            if ((msgError = validDefaultMessage(msg, addr)) != null)
-            {
-                assertTrue(
-                    "Message created with address from client connection "
-                    + "does not contain valid default content:\n" + msgError,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("clientConn.newMessage2 => " + e.toString(),false);
-        }
-
-        // Get default MultipartMessage and check that it contains valid fields.
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)serverConn.newMessage(
-                                       MessageConnection.MULTIPART_MESSAGE, addr);
-            if ((msgError = validDefaultMessage(msg, addr)) != null)
-            {
-                assertTrue(
-                    "Message created with address from server connection "
-                    + "does not contain valid default content:\n" + msgError,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("serverConn.newMessage2 => " + e.toString(),false);
-        }
-
-        // If we got this far test case was passed.
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.1 addMessagePart with valid parameter => OK<br>
-     * 5.2 addMessagePart with invalid parameter (conflicting contentId) => IllegalArgumentException<br>
-     * 5.3 addMessagePart with invalid parameter (too large content) => SizeExceededException<br>
-     * 5.4 addMessagePart with null parameter => NullPointerException<br>
-     */
-    public void addMessagePart()
-    {
-        // Test preparations.
-        String addr = getEmailAddress(0, true);
-        String contentId = "1";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Create messagePart.
-        MessagePart msgPart = null;
-        try
-        {
-            msgPart = getDummyMessagePart(512, contentId);
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart creation failed: " + e.toString(),false);
-        }
-
-        // Add messagePart.
-        String msgInfo = null;
-        try
-        {
-            if (msg.getMessageParts() == null)
-            {
-                msgInfo = "msg.getMessageParts()=null";
-            }
-            else
-            {
-                msgInfo = "msg.getMessageParts().length="
-                          + msg.getMessageParts().length;
-            }
-            msgInfo += ", msgPart.getLength()=" + msgPart.getLength();
-            msg.addMessagePart(msgPart);
-            msgInfo += ", msgPart adding succeeded";
-            MessagePart msgPart2 = msg.getMessagePart(contentId);
-            if (msgPart != msgPart2)
-            {
-                assertTrue("getMessagePart returned wrong MessagePart",false);
-            }
-            MessagePart msgParts[] = msg.getMessageParts();
-            if (msgParts == null)
-            {
-                assertTrue("getMessageParts returned null",false);
-            }
-            if (msgParts.length != 1)
-            {
-                assertTrue(
-                    "getMessageParts returned wrong number of MessageParts: "
-                    + msgParts.length + ", expected 1",false);
-            }
-            if (msgParts[0] != msgPart)
-            {
-                assertTrue("getMessageParts returned wrong MessagePart",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart (" + msgInfo
-                       + ") adding failed: " + e.toString(),false);
-        }
-
-        // Add a new messagePart with the same contentId.
-        try
-        {
-            MessagePart msgPart2 = getDummyMessagePart(1024, contentId);
-            msg.addMessagePart(msgPart);
-            assertTrue("Adding MessagePart with existing contentId "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding MessagePart with existing contentId failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add messagePart with too large content.
-        try
-        {
-            MessagePart msgPart2 = getDummyMessagePart(
-                                       MAX_CONTENT_SIZE + 1, "2");
-            msg.addMessagePart(msgPart2);
-            assertTrue("Adding too large MessagePart "
-                       + "should throw SizeExceededException",false);
-        }
-        catch (SizeExceededException see)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding too large MessagePart failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add messagePart with null parameter.
-        try
-        {
-            msg.addMessagePart(null);
-            assertTrue("Adding MessagePart with null parameter "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding MessagePart with null parameter failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.5 addAddress with valid parameters => OK<br>
-     * 5.6 addAddress with null parameter => IllegalArgumentException<br>
-     * 5.7 addAddress with invalid parameter => IllegalArgumentException<br>
-     * 5.8 getAddresses when more than one address exist<br>
-     * 5.9 getAddresses for unknown type => IllegalArgumentException<br>
-     */
-    public void addAddress()
-    {
-        // Test preparations.
-        String addr0 = getMsisdnAddress(0, true);
-        String addr1 = getEmailAddress(0, true);
-        String addr2 = getEmailAddress(1, true);
-        String addr3 = getEmailAddress(2, true);
-        String addr4 = getEmailAddress(3, true);
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr0);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Add addresses.
-        try
-        {
-            msg.setAddress(addr1);
-            msg.addAddress("to", addr2);
-            msg.addAddress("cc", addr3);
-            msg.addAddress("bcc", addr4);
-
-            String getAddr = msg.getAddress();
-            if (getAddr == null)
-            {
-                assertTrue("getAddress should not return null",false);
-            }
-            if (!getAddr.equals(addr0))
-            {
-                assertTrue("getAddress returned wrong address, got "
-                           + getAddr + ", expected " + addr0,false);
-            }
-
-            String addrs[] = msg.getAddresses("from");
-            if (addrs != null)
-            {
-                assertTrue("getAddresses(from) should return null, got: "
-                           + getAddressString("from", addrs),false);
-            }
-
-            addrs = msg.getAddresses("to");
-            if (addrs == null)
-            {
-                assertTrue("getAddresses(to) should not return null",false);
-            }
-            if (addrs.length != 3)
-            {
-                assertTrue(
-                    "getAddresses(to) returned wrong number of addresses: "
-                    + addrs.length + ", expected 2",false);
-            }
-            if (!addr0.equals(addrs[0]) || !addr1.equals(addrs[1]) || !addr2.equals(addrs[2]))
-            {
-                assertTrue("getAddresses(to) returned wrong address, got "
-                           + addrs[0] + ", expected " + addr0 + ", got "
-                           + addrs[1] + ", expected " + addr1 + ", got "
-                           + addrs[2] + ", expected " + addr2,false);
-            }
-
-            addrs = msg.getAddresses("cc");
-            if (addrs == null)
-            {
-                assertTrue("getAddresses(cc) should not return null",false);
-            }
-            if (addrs.length != 1)
-            {
-                assertTrue(
-                    "getAddresses(cc) returned wrong number of addresses: "
-                    + addrs.length + ", expected 1",false);
-            }
-            if (!addr3.equals(addrs[0]))
-            {
-                assertTrue("getAddresses(cc) returned wrong address, got "
-                           + addrs[0] + ", expected " + addr3,false);
-            }
-
-            addrs = msg.getAddresses("bcc");
-            if (addrs == null)
-            {
-                assertTrue("getAddresses(bcc) should not return null",false);
-            }
-            if (addrs.length != 1)
-            {
-                assertTrue(
-                    "getAddresses(bcc) returned wrong number of addresses: "
-                    + addrs.length + ", expected 1",false);
-            }
-            if (!addr4.equals(addrs[0]))
-            {
-                assertTrue("getAddresses(bcc) returned wrong address, got "
-                           + addrs[0] + ", expected " + addr4,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address failed: " + e.toString(),false);
-        }
-
-
-        // Get invalid address type.
-        try
-        {
-            String addrs[] = msg.getAddresses("foo");
-            assertTrue("getAddresses(foo) should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting invalid adddres type failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add invalid address type.
-        try
-        {
-            msg.addAddress("foo", addr1);
-            assertTrue("Adding invalid address type "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres type failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add invalid address.
-        try
-        {
-            msg.addAddress("to", "mmmmss://358401234567");
-            assertTrue("Adding invalid address "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        //IPv6 not supported
-        try
-        {
-            msg.addAddress("to", "mms://1234:1234:1234:1234:1234:1234:1234:1234");
-            assertTrue("Adding IPv6 address "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        //IPv4 not supported
-        try
-        {
-            msg.addAddress("to", "mms://127.0.0.1");
-            assertTrue("Adding IPv4 address "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        //alpha numerical short code not supported, but we have
-        //to allow adding such addresses since TCK mandates it
-        /*try {
-            msg.addAddress("to", "mms://alpha");
-            assertTrue("Adding alpha-numerical short-code address "
-                + "should throw IllegalArgumentException",false);
-        } catch (IllegalArgumentException iae) {
-            // passed
-            iae.printStackTrace();
-        } catch (Exception e) {
-            assertTrue("Adding invalid adddres failed "
-                + "with wrong exception: " + e.toString(),false);
-        }*/
-
-        //MSISDN with length bigger than 256 not supported
-        try
-        {
-            msg.addAddress("to", "mms://" + getContentString(257));
-            assertTrue("MSISDN with length bigger than 256 "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        //numerical short code supported
-        try
-        {
-            msg.addAddress("to", "mms://1234");
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding invalid adddres failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add address with null parameter.
-        try
-        {
-            msg.addAddress(null, addr1);
-            assertTrue("addAddress(null, addr) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("addAddress(null, addr) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Add address with null parameter.
-        try
-        {
-            msg.addAddress("to", null);
-            assertTrue("addAddress(to, null) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("addAddress(to, null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.10 removeAddress with valid parameters => OK<br>
-     * 5.11 removeAddress with invalid parameters => IllegalArgumentException<br>
-     * 5.12 removeAddresses => OK<br>
-     */
-    public void removeAddress()
-    {
-        // Test preparations.
-        String addr0 = getMsisdnAddress(0, true);
-        String addr1 = getEmailAddress(0, true);
-        String addr2 = getEmailAddress(1, true);
-        String addr3 = getEmailAddress(2, true);
-        String addr4 = getEmailAddress(3, true);
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr0);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Add addresses.
-        try
-        {
-            msg.setAddress(addr1);
-            msg.addAddress("to", addr2);
-            msg.addAddress("cc", addr3);
-            msg.addAddress("bcc", addr4);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address failed: " + e.toString(),false);
-        }
-
-
-        // Remove address with valid parameters.
-        try
-        {
-            boolean removed = msg.removeAddress("bcc", addr4);
-            if (!removed)
-            {
-                assertTrue("Removing existing address should succeed",false);
-            }
-            String addrs[] = msg.getAddresses("bcc");
-            if (addrs != null && addrs.length > 0)
-            {
-                assertTrue("Address still exists after its removal",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Removing existing adddres failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Remove address with invalid parameters.
-        try
-        {
-            boolean removed = msg.removeAddress("to", "nomatch@domain.com");
-            if (removed)
-            {
-                assertTrue("Removing nonexisting address should not succeed",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Removing nonexisting adddres failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Remove address of unknown type.
-        try
-        {
-            boolean removed = msg.removeAddress("foo", "nomatch@domain.com");
-            assertTrue("Removing address of unknown address type "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Removing address of uknown adddress type failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove address with null parameter.
-        try
-        {
-            boolean removed = msg.removeAddress(null, addr1);
-            assertTrue("removeAddress(null, addr) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeAddress(null, addr) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove addresses with valid parameters.
-        try
-        {
-            msg.removeAddresses("to");
-            String addrs[] = msg.getAddresses("to");
-            if (addrs != null && addrs.length > 0)
-            {
-                assertTrue("Addresses still exist after their removal",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Removing adddreses failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Remove addresses of unknown type.
-        try
-        {
-            msg.removeAddresses("foo");
-            assertTrue("Removing addresses of unknown address type "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Removing addresses of uknown adddress type failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove addresses with null parameter.
-        try
-        {
-            msg.removeAddresses(null);
-            assertTrue("removeAddresses(null) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeAddresses(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.13 set/getHeader for delivery time and priority headers<br>
-     * 5.14 set/getHeader for subject, to from, cc, bcc headers => IllegalArgumentException<br>
-     * 5.15 getHeader for unknown header => IllegalArgumentException<br>
-     * 5.16 set/getSubject with valid value => OK<br>
-     * 5.17 set/getSubject with null => OK<br>
-     */
-    public void getSetHeader()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Set valid header fields.
-        try
-        {
-            msg.setHeader("X-Mms-Delivery-Time", "1");
-            msg.setHeader("X-Mms-Priority", "High");
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting header failed: " + e.toString(),false);
-        }
-
-        // Set valid header field with illegal value.
-        try
-        {
-            msg.setHeader("X-Mms-Priority", "Foo");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setHeader(X-MMS-Priority, Foo) failed with "
-                       + "wrong exception: " + e.toString(),false);
-        }
-
-        // Set header with illegal header field.
-        try
-        {
-            msg.setHeader("dummyHeader", "dummyValue");
-            assertTrue("setHeader(dummyHeader, dummyValue) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setHeader(dummyHeader, dummyValue) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Set header with illgeal X-Mms-To header field.
-        try
-        {
-            msg.setHeader("X-Mms-To", getEmailAddress(0, true));
-            assertTrue("setHeader(X-Mms-To, ...) "
-                       + "should throw SecurityException",false);
-        }
-        catch (SecurityException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setHeader(X-Mms-To, ...) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Set header with illegal subject header field.
-        try
-        {
-            msg.setHeader("subject", "Dummy mail subject");
-            assertTrue("setHeader(subject, ...) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setHeader(subject, ...) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Set header with null parameter.
-        try
-        {
-            msg.setHeader(null, "dummyValue");
-            assertTrue("setHeader(null, dummyValue) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setHeader(null, dummyValue) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Get valid header fields.
-        try
-        {
-            String header = msg.getHeader("X-Mms-Delivery-Time");
-            if (!"1".equals(header))
-            {
-                assertTrue(
-                    "Getting delivery time returned wrong value, got "
-                    + header + ", expected 1",false);
-            }
-            header = msg.getHeader("X-Mms-Priority");
-            if (!"High".equals(header))
-            {
-                assertTrue(
-                    "Getting priority returned wrong value, got "
-                    + header + ", expected High",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting header failed: " + e.toString(),false);
-        }
-
-        // Get header with illegal header field.
-        try
-        {
-            String header = msg.getHeader("foo");
-            assertTrue("getHeader(foo) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("getHeader(foo) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Get header with null parameter.
-        try
-        {
-            String header = msg.getHeader(null);
-            assertTrue("getHeader(null) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("getHeader(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.16 set/getSubject with valid value => OK<br>
-     * 5.17 set/getSubject with null => OK<br>
-     */
-    public void getSetSubject()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String subject = "Dummy mail subject";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Set subject.
-        try
-        {
-            msg.setSubject(subject);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting subject failed: " + e.toString(),false);
-        }
-
-        // Get subject.
-        try
-        {
-            if (!subject.equals(msg.getSubject()))
-            {
-                assertTrue(
-                    "Getting subject returned incorrect subject: "
-                    + msg.getSubject(),false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting subject failed: " + e.toString(),false);
-        }
-
-        // Set subject to null.
-        try
-        {
-            msg.setSubject(null);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting subject to null failed: " + e.toString(),false);
-        }
-
-        // Get subject.
-        try
-        {
-            if (msg.getSubject() != null)
-            {
-                assertTrue(
-                    "Getting subject returned incorrect subject: "
-                    + msg.getSubject(),false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting subject failed: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.18 getMessagePart with valid contentId => OK<br>
-     * 5.19 getMessagePart with null parameter => NullPointerException<br>
-     * 5.20 getStartContentId when startMessagePart is set => OK<br>
-     * 5.21 getStartContentId when startMessagePart is not set => null<br>
-     * 5.22 setStartContentId with valid contentId => OK<br>
-     * 5.23 setStartContentId with not matching contentId => IllegalArgumentException<br>
-     */
-    public void getStartContentId()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String contentId = "1";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Create MessagePart and add it to the message.
-        MessagePart msgPart = null;
-        try
-        {
-            msgPart = getDummyMessagePart(1024, contentId);
-            msg.addMessagePart(msgPart);
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart creation failed: " + e.toString(),false);
-        }
-
-        // Get MessagePart.
-        try
-        {
-            MessagePart msgPart2 = msg.getMessagePart(contentId);
-            if (msgPart != msgPart2)
-            {
-                assertTrue(
-                    "Got incorrect MessagePart: " + msgPartToString(msgPart2)
-                    + ", expected: " + msgPartToString(msgPart),false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting MessagePart failed: " + e.toString(),false);
-        }
-
-        // Get MessagePart with invalid contentId.
-        try
-        {
-            MessagePart msgPart2 = msg.getMessagePart("nomatch");
-            if (msgPart2 != null)
-            {
-                assertTrue("getMessagePart(nomatch) should return null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("getMessagePart(nomatch) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Get MessagePart with null parameter.
-        try
-        {
-            MessagePart msgPart2 = msg.getMessagePart(null);
-            assertTrue("getMessagePart(null) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("getMessagePart(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Get startContentId when startMessagePart is not set.
-        try
-        {
-            String startCid = msg.getStartContentId();
-            if (startCid != null)
-            {
-                assertTrue("getStartContentId() should return null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("getStartContentId() failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Set start content id with not matching content id.
-        try
-        {
-            msg.setStartContentId("nomatch");
-            assertTrue("setStartContentId(nomatch) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setStartContentId(nomatch) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Set start content id with matching content id.
-        try
-        {
-            msg.setStartContentId(contentId);
-        }
-        catch (Exception e)
-        {
-            assertTrue("setStartContentId(contentId) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Get startContentId when startMessagePart is set.
-        try
-        {
-            String startCid = msg.getStartContentId();
-            if (startCid == null)
-            {
-                assertTrue("getStartContentId() should not return null",false);
-            }
-            if (!startCid.equals(contentId))
-            {
-                assertTrue(
-                    "getStartContentId() did not match to expected, got "
-                    + startCid + ", expected " + contentId,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("getStartContentId() failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.24 removeMessagePart with matching messagePart parameter => OK, true<br>
-     * 5.25 removeMessagePart with non-matching messagePart parameter => OK, false<br>
-     * 5.26 removeMessagePart with null parameter => NullPointerException<br>
-     */
-    public void removeMessagePart()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String contentId = "1";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Create MessagePart and add it to the message.
-        MessagePart msgPart = null;
-        try
-        {
-            msgPart = getDummyMessagePart(1024, contentId);
-            msg.addMessagePart(msgPart);
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart creation failed: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with not matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePart(getDummyMessagePart(1024, "2"));
-            if (removed)
-            {
-                assertTrue("removeMessagePart(nomatch) should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePart(nomatch) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with null parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePart(null);
-            assertTrue("removeMessagePart(null) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePart(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePart(msgPart);
-            if (!removed)
-            {
-                assertTrue("removeMessagePart(msgPart) should return true",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePart(msgPart) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Try to re-remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePart(msgPart);
-            if (removed)
-            {
-                assertTrue("Re-calling removeMessagePart(msgPart) should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Recalling removeMessagePart(msgPart) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.27 removeMessagePartId with matching contentId parameter => OK, true<br>
-     * 5.28 removeMessagePartId with non-matching contentId parameter => OK, false<br>
-     * 5.28 removeMessagePartId with null parameter => NullPointerException<br>
-     * 5.30 removeMessagePartLocation with matching contentLocation parameter => OK, true<br>
-     * 5.31 removeMessagePartLocation with non-matching contentLocation parameter => OK, false<br>
-     * 5.32 removeMessagePartLocation with null parameter => NullPointerException<br>
-     */
-    public void removeMessagePartId()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String contentId = "1";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Create MessagePart and add it to the message.
-        MessagePart msgPart = null;
-        try
-        {
-            msgPart = getDummyMessagePart(1024, contentId);
-            msg.addMessagePart(msgPart);
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart creation failed: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with not matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartId("2");
-            if (removed)
-            {
-                assertTrue("removeMessagePartId(nomatch) should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartId(nomatch) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with null parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartId(null);
-            assertTrue("removeMessagePartId(null) "
-                       + "should throw NullPointertException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartId(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartId(contentId);
-            if (!removed)
-            {
-                assertTrue("removeMessagePartId(contentId) should return true",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartId(contentId) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Try to re-remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartId(contentId);
-            if (removed)
-            {
-                assertTrue("Re-calling removeMessagePartId(contentId) should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Recalling removeMessagePartId(contentId) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.30 removeMessagePartLocation with matching contentLocation parameter => OK, true<br>
-     * 5.31 removeMessagePartLocation with non-matching contentLocation parameter => OK, false<br>
-     * 5.32 removeMessagePartLocation with null parameter => NullPointerException<br>
-     */
-    public void removeMessagePartLocation()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String contentId = "1";
-        String contentLoc = "contentLocation";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Create MessagePart and add it to the message.
-        MessagePart msgPart = null;
-        try
-        {
-            msgPart = getDummyMessagePart(1024, contentId, contentLoc, "iso-8859-1");
-            msg.addMessagePart(msgPart);
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart creation failed: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with not matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartLocation("nomatch");
-            if (removed)
-            {
-                assertTrue("removeMessagePartLocation(nomatch) "
-                           + "should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartLocation(nomatch) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with null parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartLocation(null);
-            assertTrue("removeMessagePartLocation(null) "
-                       + "should throw NullPointerException",false);
-        }
-        catch (NullPointerException npe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartLocation(null) failed "
-                       + "with wrong exception: " + e.toString(),false);
-        }
-
-        // Remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartLocation(contentLoc);
-            if (!removed)
-            {
-                assertTrue("removeMessagePartLocation(contentLoc) should return true",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("removeMessagePartLocation(contentLoc) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        // Try to re-remove MessagePart with matching parameter.
-        try
-        {
-            boolean removed = msg.removeMessagePartLocation(contentLoc);
-            if (removed)
-            {
-                assertTrue("Re-calling removeMessagePartLocation(contentLoc) should return false",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Recalling removeMessagePartLocation(contentLoc) failed "
-                       + "with exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.33.1 get/setAddress - null address<br>
-     * 5.33.2 get/setAddress - valid address<br>
-     * 5.33.3 get/setAddress - invalid address => IllegalArgumentException<br>
-     */
-    public void getSetAddress()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        String addr2 = getMsisdnAddress(1, true) + ":test.appid";
-        String addr3 = getMsisdnAddress(2, true) + ":test.appid";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Get address.
-        try
-        {
-            String getAddr = msg.getAddress();
-            if (getAddr == null)
-            {
-                assertTrue("getAddress should not return null",false);
-            }
-            if (!getAddr.equals(addr))
-            {
-                assertTrue("getAddress returned wrong address, got "
-                           + getAddr + ", expected " + addr,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting address failed: " + e.toString(),false);
-        }
-
-        // Set address.
-        try
-        {
-            msg.setAddress(addr2);
-            String getAddr = msg.getAddress();
-            if (getAddr == null)
-            {
-                assertTrue("getAddress after setting should not return null",false);
-            }
-            if (!getAddr.equals(addr))
-            {
-                assertTrue("getAddress after setting returned wrong address, got "
-                           + getAddr + ", expected " + addr,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting address failed: " + e.toString(),false);
-        }
-
-        // Set address to null.
-        try
-        {
-            msg.addAddress("cc", addr3);
-            msg.setAddress(null);
-            // Setting address to null shouldn't do anything.
-            String getAddr = msg.getAddress();
-            if (getAddr == null)
-            {
-                assertTrue("getAddress after setting to null should not return null",false);
-            }
-            if (!getAddr.equals(addr))
-            {
-                assertTrue("getAddress after setting to null returned wrong address, got "
-                           + getAddr + ", expected " + addr,false);
-            }
-
-            String addrs[] = msg.getAddresses("to");
-            if (addrs == null)
-            {
-                assertTrue("getAddresses(to) should not return null",false);
-            }
-            if (addrs.length != 2)
-            {
-                assertTrue(
-                    "getAddresses(to) returned wrong number of addresses: "
-                    + addrs.length + ", expected 2",false);
-            }
-
-            addrs = msg.getAddresses("cc");
-            if (addrs == null)
-            {
-                assertTrue("getAddresses(cc) should not return null",false);
-            }
-            if (addrs.length != 1)
-            {
-                assertTrue(
-                    "getAddresses(cc) returned wrong number of addresses: "
-                    + addrs.length + ", expected 1",false);
-            }
-            if (!addr3.equals(addrs[0]))
-            {
-                assertTrue("getAddresses(cc) returned wrong address, got "
-                           + addrs[0] + ", expected " + addr3,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting null address failed: " + e.toString(),false);
-        }
-
-        // Set invalid address.
-        try
-        {
-            msg.setAddress("invalid.address");
-            assertTrue("setAddress(invalid.address) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setAddress(invalid.address) failed with wrong exception: "
-                       + e.toString(),false);
-        }
-        try
-        {
-            msg.setAddress("mms://");
-            assertTrue("setAddress(mms://) "
-                       + "should throw IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("setAddress(invalid.address) failed with wrong exception: "
-                       + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.33.4 getTimestamp from not sent message => null<br>
-     * 5.33.5 getTimestamp on sent message => Date<br>
-     */
-    public void getTimestamp()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, true) + ":test.appid";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(addr);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Get timestamp.
-        try
-        {
-            Date date = msg.getTimestamp();
-            if (date != null)
-            {
-                assertTrue("getTimestamp should return null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Getting timestamp failed: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5.34 addAddress with invalid applicationId parameter => IllegalArgumentException<br>
-     */
-    public void addAddressWithInvalidAppId()
-    {
-        // Test preparations.
-        MessageConnection conn = null;
-        try
-        {
-            conn = getClosedConnection(getMsisdnAddress(0, true) + ":test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation failed: " + e.toString(),false);
-        }
-
-        // Add address.
-        try
-        {
-            msg.addAddress("bcc", getMsisdnAddress(1, true) + ":test.appid");
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address failed: " + e.toString(),false);
-        }
-
-        // Add address without appId, default appId will be used.
-        try
-        {
-            msg.addAddress("to", getMsisdnAddress(2, true));
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address without appId failed with exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            msg.addAddress("cc", getMsisdnAddress(3, true) + ":test.appid.wrong");
-            assertTrue("Adding address with wrong appId should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address with wrong appId failed with wrong exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        try
-        {
-            // Open connection without appId.
-            conn = getClosedConnection(getMsisdnAddress(0, true));
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create message.
-        try
-        {
-            msg = (MultipartMessage)conn.newMessage(
-                      MessageConnection.MULTIPART_MESSAGE);
-            if (msg == null)
-            {
-                assertTrue("newMessage without appId returned null",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Message creation without appId failed: " + e.toString(),false);
-        }
-
-        // Add addresses.
-        try
-        {
-            msg.addAddress("to", getMsisdnAddress(1, true));
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address without appId failed: " + e.toString(),false);
-        }
-
-        try
-        {
-            msg.addAddress("bcc", getMsisdnAddress(2, true) + ":test.appid");
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address with appId failed with exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            msg.addAddress("cc", getMsisdnAddress(3, true) + ":test.appid.wrong");
-            assertTrue("Adding address with wrong appId should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Adding address with wrong appId failed with wrong exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    // BEGIN - Private helper methods for this test suite.
-
-    /**
-     * Checks if given message contains correct default values.
-     * Returns null if message was valid, error description otherwise.
-     */
-    private String validDefaultMessage(MultipartMessage msg, String toAddr)
-    {
-        if (msg == null)
-        {
-            return "message is null";
-        }
-
-        // Message created without address from client connection:
-        // to: toAddr X-Mms-Priority: Normal
-        // Message created without address from server connection
-        // X-Mms-Priority: Normal
-        // Message created with address from client connection
-        // to: toAddr X-Mms-Priority: Normal
-        // Message created with address from server connection
-        // to: toAddr X-Mms-Priority: Normal
-        // Note: priority header removed from default message 25.8.2005
-
-        String msgString = msgToString(msg).toLowerCase();
-        String expectedMsg =
-            "getAddress: " + toAddr + "\n" +
-            (toAddr == null? "": "to: " + toAddr + "\n");
-        //"x-mms-priority: normal\n";
-        expectedMsg = expectedMsg.toLowerCase();
-        if (!msgString.equals(expectedMsg))
-        {
-            return "invalid default message:\n" + msgString
-                   + "\nexpected:\n" + expectedMsg;
-        }
-
-        return null;
-    }
-
-    // END - Private helper methods for this test suite.
-}
--- a/javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestMessagePart.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,552 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION<br>
- *
- * Code complexity rate (of the tested module) if measured:<br>
- *
- * The purpose of the module test:<br>
- *
- * To test MessagePart methods.<br>
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 MessagePart tests<br>
- * 1.1 Construct message part with null mimeType => IllegalArgumentException<br>
- * 1.2 Construct message part with null contentId => IllegalArgumentException<br>
- * 1.3 Construct message part with non us-ascii chars in contentId => IllegalArgumentException<br>
- * 1.4 Construct message part with non us-ascii chars in contentLocation => IllegalArgumentException<br>
- * 1.5 Construct message part with too large content => SizeExceededException<br>
- * 1.6 Construct message part with valid parameters => OK (check with getters)<br>
- *
- * Used stubs and description:<br>
- *
- * Setting up the environment:<br>
- *
- * How to run the test:<br>
- *
- * Is it tested with WINSCW and/or HW:<br>
- *
- * Outputs and expected results:<br>
- *
- * Branch coverage percentage (explanation if it is under 70%):<br>
- *
- * In case some of the tests cannot be run, an explanation should be given:<br>
- *
- * Included test files:<br>
- *
- * Build number (in which the tested module is integrated):<br>
- *
- * Note whether the test case belongs to the MRT set:<br>
- *
- **/
-
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-import javax.microedition.midlet.MIDlet;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.Vector;
-
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.SizeExceededException;
-
-public class TestMessagePart extends WmaTestBase
-{
-
-    public TestMessagePart()
-    {
-    }
-
-    public TestMessagePart(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new TestMessagePart("constructMessagePartNullMimeType", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructMessagePartNullMimeType();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessagePart("constructMessagePartNullContentId", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructMessagePartNullContentId();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessagePart("constructMessagePartNonAsciiContentId", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructMessagePartNonAsciiContentId();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessagePart("constructMessagePartNonAsciiContentLocation", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructMessagePartNonAsciiContentLocation();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessagePart("constructTooLargeMessagePart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructTooLargeMessagePart();
-            }
-        }));
-
-
-        aSuite.addTest(new TestMessagePart("constructMessagePart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestMessagePart) tc).constructMessagePart();
-            }
-        }));
-
-        return aSuite;
-    }
-
-
-    /**
-     * 1.1 Construct message part with null mimeType => IllegalArgumentException<br>
-     */
-    public void constructMessagePartNullMimeType()
-    {
-        String content = "content";
-        String mimeType = null;
-        String contentId = "1";
-        String contentLoc = "contentLocation";
-        String enc = "utf-8";
-
-        testMessagePartConstructorWithIllegalArgumentException(
-            "null mimeType", content, mimeType, contentId, contentLoc, enc);
-    }
-
-    /**
-     * 1.2 Construct message part with null contentId => IllegalArgumentException<br>
-     */
-    public void constructMessagePartNullContentId()
-    {
-        String content = "content";
-        String mimeType = "text/plain";
-        String contentId = null;
-        String contentLoc = "contentLocation";
-        String enc = "utf-8";
-
-        testMessagePartConstructorWithIllegalArgumentException(
-            "null contentId", content, mimeType, contentId, contentLoc, enc);
-    }
-
-    /**
-     * 1.3 Construct message part with non us-ascii chars in contentId
-     * => IllegalArgumentException<br>
-     */
-    public void constructMessagePartNonAsciiContentId()
-    {
-        String content = "content";
-        String mimeType = "text/plain";
-        String contentId = "non us-ascii contentId: €";
-        String contentLoc = "contentLocation";
-        String enc = "utf-8";
-
-        testMessagePartConstructorWithIllegalArgumentException(
-            "non us-ascii contentId", content, mimeType, contentId,
-            contentLoc, enc);
-    }
-
-    /**
-     * 1.4 Construct message part with non us-ascii chars in contentLocation
-     * => IllegalArgumentException<br>
-     */
-    public void constructMessagePartNonAsciiContentLocation()
-    {
-        String content = "content";
-        String mimeType = "text/plain";
-        String contentId = "1";
-        String contentLoc = "non us-ascii contentLocation: €";
-        String enc = "utf-8";
-
-        testMessagePartConstructorWithIllegalArgumentException(
-            "non us-ascii contentLocation", content, mimeType, contentId,
-            contentLoc, enc);
-    }
-
-    /**
-     * 1.5 Construct message part with too large content => SizeExceededException<br>
-     */
-    public void constructTooLargeMessagePart()
-    {
-        MessagePart msgPart = null;
-        String content = getTooLargeContent();
-        String mimeType = "text/plain";
-        String contentId = "1";
-        String contentLoc = "contentLocation";
-        String enc = "iso-8859-1";
-
-        try
-        {
-            msgPart = new MessagePart(
-                content.getBytes(enc), 0, content.length(), mimeType,
-                contentId, contentLoc, enc);
-            assertTrue(
-                "MessagePart1 creation with too large content "
-                + "should not succeed, size=" + MAX_CONTENT_SIZE,false);
-        }
-        catch (SizeExceededException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue(
-                "MessagePart1 creation with too large content ("
-                + MAX_CONTENT_SIZE
-                + ") failed with wrong exception: " + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(
-                content.getBytes(enc), mimeType, contentId, contentLoc, enc);
-            assertTrue(
-                "MessagePart2 creation with too large content "
-                + "should not succeed, size=" + MAX_CONTENT_SIZE,false);
-        }
-        catch (SizeExceededException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue(
-                "MessagePart2 creation with too large content ("
-                + MAX_CONTENT_SIZE
-                + ") failed with wrong exception: " + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(
-                getInputStream(content), mimeType, contentId, contentLoc, enc);
-            assertTrue(
-                "MessagePart3 creation with too large content "
-                + "should not succeed, size=" + MAX_CONTENT_SIZE,false);
-        }
-        catch (SizeExceededException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue(
-                "MessagePart3 creation with too large content ("
-                + MAX_CONTENT_SIZE
-                + ") failed with wrong exception: " + e.toString(),false);
-        }
-
-        // construct a MessagePart with too large content location
-        try
-        {
-            msgPart = new MessagePart(
-                getInputStream(getContentString(10*1024)), getContentString(7*1024), getContentString(2*1024), getContentString(1*1024), enc);
-            assertTrue(
-                "MessagePart3 creation with too large headers "
-                + "should not succeed, size",false);
-        }
-        catch (SizeExceededException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue(
-                "MessagePart3 creation with too large headers "
-                + "failed with wrong exception: " + e.toString(),false);
-        }
-
-        // construct a MessagePart with too large headers
-        try
-        {
-            msgPart = new MessagePart(
-                getInputStream(getContentString(10*1024)), getContentString(5000), getContentString(4745), getContentString(256), enc);
-            assertTrue(
-                "MessagePart3 creation with too large headers "
-                + "should not succeed, size",false);
-        }
-        catch (SizeExceededException se)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue(
-                "MessagePart3 creation with too large headers "
-                + "failed with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.6 Construct message part with valid parameters => OK (check with getters)<br>
-     */
-    public void constructMessagePart()
-    {
-        MessagePart msgPart = null;
-        String content = "content";
-        String mimeType = "text/plain";
-        String contentId = "1";
-        String contentLoc = "\\some\\path/res/contentLocation";
-        String enc = "iso-8859-1";
-        String checkResult = null;
-
-        try
-        {
-            msgPart = new MessagePart(
-                content.getBytes(enc), 0, content.length(), mimeType,
-                contentId, contentLoc, enc);
-            checkResult = checkMessagePart(
-                              msgPart, content, mimeType, contentId, contentLoc, enc);
-            if (checkResult != null)
-            {
-                assertTrue("MessagePart1 creation failed: " + checkResult,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart1 creation failed with exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(
-                content.getBytes(enc), mimeType, contentId, contentLoc, enc);
-            checkResult = checkMessagePart(
-                              msgPart, content, mimeType, contentId, contentLoc, enc);
-            if (checkResult != null)
-            {
-                assertTrue("MessagePart2 creation failed: " + checkResult,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart2 creation failed with exception: "
-                       + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(
-                getInputStream(content), mimeType, contentId, contentLoc, enc);
-            checkResult = checkMessagePart(
-                              msgPart, content, mimeType, contentId, contentLoc, enc);
-            if (checkResult != null)
-            {
-                assertTrue("MessagePart3 creation failed: " + checkResult,false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart3 creation failed with exception: "
-                       + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    // BEGIN - Private helper methods for this test suite.
-
-    /**
-     * Calls all MessagePart constructors with given parameters and
-     * expects IllegalArgumentException to be thrown.
-     */
-    private void testMessagePartConstructorWithIllegalArgumentException(
-        String msg, String content, String mimeType, String contentId,
-        String contentLoc, String enc)
-    {
-        MessagePart msgPart = null;
-
-        try
-        {
-            msgPart = new MessagePart(content.getBytes(enc), 0,
-                                      content.length(), mimeType, contentId, contentLoc, enc);
-            assertTrue("MessagePart1 creation with " + msg
-                       + " should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart1 creation with " + msg
-                       + " failed with wrong exception: " + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(content.getBytes(enc), mimeType,
-                                      contentId, contentLoc, enc);
-            assertTrue("MessagePart2 creation with " + msg
-                       + " should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart2 creation with " + msg
-                       + " failed with wrong exception: " + e.toString(),false);
-        }
-
-        try
-        {
-            msgPart = new MessagePart(getInputStream(content), mimeType,
-                                      contentId, contentLoc, enc);
-            assertTrue("MessagePart3 creation with " + msg
-                       + " should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("MessagePart3 creation with " + msg
-                       + " failed with wrong exception: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * Checks that given MessagePart contains given data.
-     */
-    private String checkMessagePart(
-        MessagePart msgPart, String content, String mimeType,
-        String contentId, String contentLoc, String enc)
-    {
-        if (msgPart == null)
-        {
-            return "MessagePart is null";
-        }
-        if (mimeType != null && !mimeType.equals(msgPart.getMIMEType()))
-        {
-            return "wrong MimeType, got: " + msgPart.getMIMEType()
-                   + ", expected: " + mimeType;
-        }
-        if (contentId != null && !contentId.equals(msgPart.getContentID()))
-        {
-            return "wrong contentId, got: " + msgPart.getContentID()
-                   + ", expected: " + contentId;
-        }
-        if (contentLoc != null && !contentLoc.equals(msgPart.getContentLocation()))
-        {
-            return "wrong contentLoc, got: " + msgPart.getContentLocation()
-                   + ", expected: " + contentLoc;
-        }
-        if (enc != null && !enc.equals(msgPart.getEncoding()))
-        {
-            return "wrong encoding, got: " + msgPart.getEncoding()
-                   + ", expected: " + enc;
-        }
-        if (content != null)
-        {
-            // Check that getContent returns correct byte array.
-            byte contentBytes[] = content.getBytes();
-            if (enc != null)
-            {
-                try
-                {
-                    contentBytes = content.getBytes(enc);
-                }
-                catch (UnsupportedEncodingException use)
-                {
-                    return use.toString();
-                }
-            }
-            byte msgBytes[] = msgPart.getContent();
-            if (contentBytes.length != msgBytes.length)
-            {
-                return "wrong content, got getContent().length: "
-                       + msgBytes.length + ", expected: " + contentBytes.length;
-            }
-            for (int i = 0; i < contentBytes.length; i++)
-            {
-                if (contentBytes[i] != msgBytes[i])
-                {
-                    return "wrong content, got getContent[" + i + "]: "
-                           + msgBytes[i] + ", expected: " + contentBytes[i];
-                }
-            }
-            // Check that getLength returns correct length.
-            if (content.length() != msgPart.getLength())
-            {
-                return "wrong content length, got getLength(): "
-                       + msgPart.getLength() + ", expected: " + content.length();
-            }
-            // Check that getContentAsStream returns correct content.
-            InputStream contentStream = getInputStream(content);
-            InputStream msgStream = msgPart.getContentAsStream();
-            try
-            {
-                for (int i = 0; contentStream.available() > 0; i++)
-                {
-                    int i1, i2;
-                    if ((i1 = contentStream.read()) !=
-                            (i2 = msgStream.read()))
-                    {
-                        return "wrong content, got getContentAsStream["
-                               + i + "]: " + i2 + ", expected: " + i1;
-                    }
-                }
-            }
-            catch (IOException ioe)
-            {
-                return "wrong content stream, got exception: " + ioe;
-            }
-        }
-        return null;
-    }
-
-    // END - Private helper methods for this test suite.
-}
--- a/javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestOpenConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1165 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION<br>
- *
- * Code complexity rate (of the tested module) if measured:<br>
- *
- * The purpose of the module test:<br>
- *
- * To test opening and closing of MessageConnections.<br>
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 Exception tests<br>
- *<br>
- * 1.0 Open server connection but do not close it. Force garbage collection.
- * Try to re-open server connection after it is garbage collected
- * => Opening should succeed.
- * 1.0.1 Open server connection but do not close it. Later check
- * that it is closed when garbage collected.
- * 1.0.2 Try to re-open server connection after it should be
- * garbage collected.
- * 1.1 Try to open server connection on already opened server URL => IOException<br>
- * Open a server connection to URL "mms://:test.appid".
- * Open a new server connection with the same URL and check
- * that an IOException is thrown. [JSR205 D.4.0]
- *<br>
- * 1.2 Testing invalid URLs => IllegalArgumentException/ConnectionNotFoundException<br>
- * Check that the correct exception is thrown when a connection
- * is openend with invalid URLs.
- *<br>
- * "foo://3580401234567" => ConnectionNotFoundException<br>
- * "MMS://3580401234567" => ConnectionNotFoundException<br>
- * "Mms://3580401234567" => ConnectionNotFoundException<br>
- * "mms" => IllegalArgumentException<br>
- * "mms:" => IllegalArgumentException<br>
- * "mms:/" => IllegalArgumentException<br>
- * "mms://" => IllegalArgumentException<br>
- * "mms:///" => IllegalArgumentException<br>
- * "mms:/12" => IllegalArgumentException<br>
- * "mms://12shortcode:a" => IllegalArgumentException<br>
- * "mms://+5550000:app-id" => IllegalArgumentException<br>
- * "mms://user@domain.net:app-id" => IllegalArgumentException<br>
- * "mms://127.0.0.1:app.id" => IllegalArgumentException<br>
- * "mms://1:1:1:1:1:1:1:1:app.id" => IllegalArgumentException<br>
- *<br>
- *
- * 2 Open/close tests<br>
- *<br>
- * 2.1 Opening a connection with valid URL<br>
- * Open a connection with a valid URL "mms://358401234567".
- * Check that no exceptions are thrown.
- *<br>
- * 2.2 Opening and closing a connection with valid URL<br>
- * Open a connection with a valid URL "mms://358401234567" and close
- * the connection. Check that no exceptions are thrown.
- *<br>
- * 2.3 Opening, closing and reopening a connection with valid URL<br>
- * Open a connection with a valid URL "mms://358401234567", close the
- * connection, and open a new connection to the same URL. Check that
- * no exceptions are thrown.
- *<br>
- *
- * 3 Open multiple connections tests<br>
- *<br>
- * 3.1 Open many client connections to the same URL<br>
- * Open three client connections to the same URL "mms://358401234567".
- * Check that no exceptions are thrown.
- *<br>
- * 3.2 Open many client connections to different URLs<br>
- * Open three client connections to different URLs ("mms://358401234567",
- * "mms://358401234567:test.appid", and "mms://358401234567:test.appid2").
- * Check that no exceptions are thrown.
- *<br>
- * 3.3 Open many server connections<br>
- * Open three server connections to different URLs ("mms://:test.appid",
- * "mms://:test.appid2", "mms://:test.appid3").
- * Check that no exceptions are thrown.
- *<br>
- * 3.4 Open one client and server connection<br>
- * Open client connections to URLs "mms://358401234567:test.appid",
- * and server connection to URL "mms://:test.appid".
- * Check that no exceptions are thrown.
- *<br>
- *
- * 4 Read/Write tests<br>
- *<br>
- * 4.1 Connector.open(Server,Read) => OK<br>
- * Open read-only server connection to URL "mms://:test.appid".
- * Check that no exceptions are thrown.
- *<br>
- * 4.2 Connector.open(Server,Write) => OK<br>
- * Open read-write server connection to URL "mms://:test.appid".
- * Check that no exceptions are thrown.
- *<br>
- * 4.3 Connector.open(Server,Read/Write) => OK<br>
- * Open write-only server connection to URL "mms://:test.appid".
- * Check that no exceptions are thrown.
- *<br>
- * 4.4 Connector.open(Client,Read) => IllegalArgumentException<br>
- * Open read-only client connection to URL "mms://358401234567:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- * 4.5 Connector.open(Client,Write) => OK<br>
- * Open write-only client connection to URL "mms://358401234567:test.appid".
- * Check that no exceptions are thrown.
- *<br>
- * 4.6 Connector.open(Client,Read/Write) => IllegalArgumentException<br>
- * Open read-write client connection to URL "mms://358401234567:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- *
- * 5 Stream tests<br>
- *<br>
- * 5.1 openDataInputStream raises IllegalArgumentException<br>
- * Open DataInputStream to URL "mms://:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- * 5.2 openDataOutputStream raises IllegalArgumentException<br>
- * Open DataOutputStream to URL "mms://358401234567:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- * 5.3 openInputStream raises IllegalArgumentException<br>
- * Open InputStream to URL "mms://:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- * 5.4 openOutputStream raises IllegalArgumentException<br>
- * Open OutputStream to URL "mms://358401234567:test.appid".
- * Check that IllegalArgumentException is thrown.
- *<br>
- * 6 Getting MMSC tests<br>
- *<br>
- * 6.1 Check that system property wireless.messaging.mms.mmsc
- * has been defined.<br>
- *<br>
- * Used stubs and description:<br>
- *
- * Setting up the environment:<br>
- *
- * How to run the test:<br>
- *
- * Is it tested with WINSCW and/or HW:<br>
- *
- * Outputs and expected results:<br>
- *
- * Branch coverage percentage (explanation if it is under 70%):<br>
- *
- * In case some of the tests cannot be run, an explanation should be given:<br>
- *
- * Included test files:<br>
- *
- * Build number (in which the tested module is integrated):<br>
- *
- * Note whether the test case belongs to the MRT set:<br>
- *
- **/
-
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import java.io.IOException;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.ConnectionNotFoundException;
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-
-public class TestOpenConnection extends WmaTestBase
-{
-
-    public TestOpenConnection()
-    {
-    }
-
-    public TestOpenConnection(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-
-        aSuite.addTest(new TestOpenConnection("checkServerConnAfterGC", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).checkServerConnAfterGC();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openServerConnTwice", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openServerConnTwice();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openInvalidUrl", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openInvalidUrl();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openCloseClientTest", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openCloseClientTest();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openCloseServerTest", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openCloseServerTest();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openClientConnsToSameUrl", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openClientConnsToSameUrl();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openClientConnsToDiffUrls", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openClientConnsToDiffUrls();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openServerConnsToDiffUrls", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openServerConnsToDiffUrls();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openClientAndServerConn", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openClientAndServerConn();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openReadWriteConns", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openReadWriteConns();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("openConnStreams", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).openConnStreams();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("getMmscProperty", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).getMmscProperty();
-            }
-        }));
-
-
-        aSuite.addTest(new TestOpenConnection("checkServerConnAfterGC", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestOpenConnection) tc).checkServerConnAfterGC();
-            }
-        }));
-
-        return aSuite;
-    }
-
-    /** MSISDN URL used for opening and closing connections. */
-    private static final String msisdnUrl = "mms://358401234567";
-
-
-    /**
-     * 1.0.1 Open server connection but do not close it. Later check
-     * that it is closed when garbage collected.
-     */
-    public void openServerConnForGC()
-    {
-        String gcUrl= "mms://:test.appid.gc";
-        MessageConnection gcConn = null;
-
-        // Test preparations.
-        try
-        {
-            gcConn = getConnection(gcUrl);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Do nothing else. In the end try to re-open connection;
-        // if re-opening fails gc has not cleaned connection properly.
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.0.2 Try to re-open server connection after it should be
-     * garbage collected.
-     */
-    public void checkServerConnAfterGC()
-    {
-        String gcUrl= "mms://:test.appid.gc";
-        MessageConnection gcConn = null;
-
-        // Test preparations.
-        try
-        {
-            gcConn = getConnection(gcUrl);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Connection was opened successfully => cleanup was made
-        // correctly during gc => test case passed.
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            if (gcConn != null)
-            {
-                gcConn.close();
-                gcConn = null;
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection closing assertTrue: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.0 Try to re-open server connection after it should be
-     * garbage collected.
-     */
-    public void checkServerConnAfterGC2()
-    {
-        String url = "mms://:test.appid.gc";
-
-        // Open server connection.
-        try
-        {
-            MessageConnection conn = (MessageConnection)Connector.open(url);
-            if (conn == null)
-            {
-                assertTrue("Connection opening to url \"" + url + "\" assertTrue",false);
-            }
-            conn = null;
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection opening to url \"" + url + "\" assertTrue: " + e,false);
-        }
-
-        // Create some garbage strings so that garbage collector has
-        // some garbage to collect.
-        {
-            int iMax = 100000;
-            String strings[] = new String[iMax];
-            for (int i = 0; i < iMax; i++)
-            {
-                strings[i] = new String("garbage string " + i);
-            }
-        }
-
-        // Force garbage collection.
-        System.gc();
-
-        // Try to open the connection after gc.
-        MessageConnection conn = null;
-        try
-        {
-            // Open connection.
-            conn = (MessageConnection)Connector.open(url);
-            if (conn == null)
-            {
-                assertTrue("Connection re-opening to url \"" + url + "\" assertTrue",false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection re-opening to url \"" + url + "\" assertTrue: " + e,false);
-        }
-
-        // Connection was opened successfully => cleanup was made
-        // correctly during gc => test case passed.
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            if (conn != null)
-            {
-                conn.close();
-                conn = null;
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection closing assertTrue: " + e.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.1 Try to open server connection on already opened server URL
-     * => IOException<br>
-     * Open a server connection to URL "mms://:test.appid".
-     * Open a new server connection with the same URL and check
-     * that an IOException is thrown. [JSR205 D.4.0]
-     */
-    public void openServerConnTwice()
-    {
-
-        // Test preparations.
-        String url = "mms://:test.appid";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Try to open another server connection with the same url.
-        try
-        {
-            MessageConnection conn2 =
-                (MessageConnection)Connector.open(url);
-            assertTrue("Re-opening server connection did not throw IOException",false);
-        }
-        catch (IOException ioe)
-        {
-            //OK
-        }
-        catch (Exception e)
-        {
-            assertTrue(e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 1.2 Testing invalid URLs =>
-     * IllegalArgumentException/ConnectionNotFoundException<br>
-     * Check that the correct exception is thrown when a connection
-     * is openend with invalid URLs.
-     */
-    public void openInvalidUrl()
-    {
-        try
-        {
-            // RI included in WTK 2.2 crashes with ClassNotFoundException,
-            // according to javadocs the api should throw
-            // ConnectionNotFoundException.
-            //openConnCheckConnectionNotFound("foo://3580401234567");
-            //openConnCheckConnectionNotFound("MMS://3580401234567");
-            //openConnCheckConnectionNotFound("Mms://3580401234567");
-            openConnCheckIllegalArgument("mms");
-            openConnCheckIllegalArgument("mms:");
-            openConnCheckIllegalArgument("mms:/");
-            openConnCheckIllegalArgument("mms://");
-            openConnCheckIllegalArgument("mms:///");
-            openConnCheckIllegalArgument("mms:/12");
-            openConnCheckIllegalArgument("mms://12shortcode:a");
-            //openConnCheckIllegalArgument("mms/://");
-            openConnCheckIllegalArgument("mms://+5550000:app-id");
-            openConnCheckIllegalArgument("mms://user@domain.net:app.id");
-            // Following URLs work with the RI.
-            openConnCheckIllegalArgument("mms://127.0.0.1:app.id");
-            openConnCheckIllegalArgument("mms://1:1:1:1:1:1:1:1:app.id");
-            openConnCheckIllegalArgument("mms://1:1:1:1:1:1:1:1");
-            openConnCheckIllegalArgument("mms://1.1.1.1");
-            //openConnCheckIllegalArgument("mms://abc");
-            //openConnCheckIllegalArgument("mms://12abc");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2 Open/close tests<br>
-     *<br>
-     * 2.1 Opening a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://358401234567".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 2.2 Opening and closing a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://358401234567" and close
-     * the connection. Check that no exceptions are thrown.
-     *<br>
-     * 2.3 Opening, closing and reopening a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://358401234567", close the
-     * connection, and open a new connection to the same URL. Check that
-     * no exceptions are thrown.
-     */
-    public void openCloseClientTest()
-    {
-        String url = msisdnUrl;
-        MessageConnection conn = null;
-
-        // Try to open connection, if it fails, the test case fails.
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Try to close the connection, if it fails, the test case fails.
-        try
-        {
-            conn.close();
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection closing assertTrue: " + e,false);
-        }
-
-        // Try to re-open connection, if it fails, the test case fails.
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            if (conn != null)
-            {
-                // Close the client connection.
-                conn.close();
-            }
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2 Open/close tests<br>
-     *<br>
-     * 2.1 Opening a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://:test.appid.opencloseopen".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 2.2 Opening and closing a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://:test.appid.opencloseopen" and close
-     * the connection. Check that no exceptions are thrown.
-     *<br>
-     * 2.3 Opening, closing and reopening a connection with valid URL<br>
-     * Open a connection with a valid URL "mms://:test.appid.opencloseopen", close the
-     * connection, and open a new connection to the same URL. Check that
-     * no exceptions are thrown.
-     */
-    public void openCloseServerTest()
-    {
-        String url = "mms://:test.appid.opencloseopen";
-        MessageConnection conn = null;
-
-        // Try to open connection, if it fails, the test case fails.
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Try to close the connection, if it fails, the test case fails.
-        try
-        {
-            conn.close();
-        }
-        catch (Exception e)
-        {
-            assertTrue("Connection closing assertTrue: " + e,false);
-        }
-
-        // Try to re-open connection, if it fails, the test case fails.
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            if (conn != null)
-            {
-                // Close the client connection.
-                conn.close();
-            }
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 3.1 Open many client connections to the same URL<br>
-     * Open three client connections to the same URL "mms://358401234567".
-     * Check that no exceptions are thrown.
-     */
-    public void openClientConnsToSameUrl()
-    {
-        String url = msisdnUrl;
-        MessageConnection conn1 = null, conn2 = null, conn3 = null;
-
-        // Try to open several connections to the same url.
-        // If opening fails, the test case fails.
-        try
-        {
-            conn1 = getConnection(url);
-            conn2 = getConnection(url);
-            conn3 = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connections.
-            conn1.close();
-            conn2.close();
-            conn3.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 3.2 Open many client connections to different URLs<br>
-     * Open three client connections to different URLs ("mms://358401234567",
-     * "mms://358401234567:test.appid", and "mms://358501234567:test.appid").
-     * Check that no exceptions are thrown.
-     */
-    public void openClientConnsToDiffUrls()
-    {
-        MessageConnection conn1 = null, conn2 = null, conn3 = null;
-
-        // Try to open several connections to different urls.
-        // If opening fails, the test case fails.
-        try
-        {
-            conn1 = getConnection(msisdnUrl);
-            conn2 = getConnection(msisdnUrl + ":test.appid");
-            // Bogdan: the new limit for appID is 32
-            // conn3 = getConnection(msisdnUrl + ":test.appid.this.appid.is.very.very.very.long.app.id.or.at.least.longer.than.most.other.app.ids");
-            conn3 = getConnection(msisdnUrl + ":test.appid.this.appid.is.longer");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connections.
-            conn1.close();
-            conn2.close();
-            conn3.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 3.3 Open many server connections<br>
-     * Open three server connections to different URLs ("mms://:test.appid",
-     * "mms://:test.appid2", "mms://:test.appid3").
-     * Check that no exceptions are thrown.
-     */
-    public void openServerConnsToDiffUrls()
-    {
-        MessageConnection conn1 = null, conn2 = null, conn3 = null;
-
-        // Try to open several server connections to different urls.
-        // If opening fails, the test case fails.
-        try
-        {
-            conn1 = getConnection("mms://:test.appid");
-            conn2 = getConnection("mms://:test.appid2");
-            conn3 = getConnection("mms://:test.appid3");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connections.
-            conn1.close();
-            conn2.close();
-            conn3.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 3.4 Open one client and server connection<br>
-     * Open client connections to URLs "mms://358401234567:test.appid",
-     * and server connection to URL "mms://:test.appid".
-     * Check that no exceptions are thrown.
-     */
-    public void openClientAndServerConn()
-    {
-        MessageConnection conn1 = null, conn2 = null;
-
-        // Try to open client and server connection.
-        // If opening fails, the test case fails.
-        try
-        {
-            conn1 = getConnection(msisdnUrl + ":test.appid");
-            conn2 = getConnection("mms://:test.appid");
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connections.
-            conn1.close();
-            conn2.close();
-        }
-        catch (Exception e)
-        {
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 4 Read/Write tests<br>
-     *<br>
-     * 4.1 Connector.open(Server,Read) => OK<br>
-     * Open read-only server connection to URL "mms://:test.appid".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 4.2 Connector.open(Server,Write) => OK<br>
-     * Open read-write server connection to URL "mms://:test.appid".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 4.3 Connector.open(Server,Read/Write) => OK<br>
-     * Open write-only server connection to URL "mms://:test.appid".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 4.4 Connector.open(Client,Read) => IllegalArgumentException<br>
-     * Open read-only client connection to URL "mms://358401234567:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     *<br>
-     * 4.5 Connector.open(Client,Write) => OK<br>
-     * Open write-only client connection to URL "mms://358401234567:test.appid".
-     * Check that no exceptions are thrown.
-     *<br>
-     * 4.6 Connector.open(Client,Read/Write) => IllegalArgumentException<br>
-     * Open read-write client connection to URL "mms://358401234567:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     */
-    public void openReadWriteConns()
-    {
-        MessageConnection conn = null;
-        String clientUrl = msisdnUrl + ":test.appid";
-        String serverUrl = "mms://:test.appid";
-
-        try
-        {
-            // Try to open read-only, read-write, and write-only server
-            // connections, and write-only client connection.
-            // If opening fails, the test case fails.
-            openReadWriteConn(serverUrl, Connector.READ, false);
-            openReadWriteConn(serverUrl, Connector.READ_WRITE, false);
-            openReadWriteConn(serverUrl, Connector.WRITE, false);
-            openReadWriteConn(clientUrl, Connector.WRITE, false);
-            // Try to open read-only and read-write client
-            // connections. If opening does not throw
-            // IllegalArgumentException, the test case fails.
-            openReadWriteConn(clientUrl, Connector.READ, true);
-            openReadWriteConn(clientUrl, Connector.READ_WRITE, true);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 5 Stream tests<br>
-     *<br>
-     * 5.1 openDataInputStream raises IllegalArgumentException<br>
-     * Open DataInputStream to URL "mms://:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     *<br>
-     * 5.2 openDataOutputStream raises IllegalArgumentException<br>
-     * Open DataOutputStream to URL "mms://358401234567:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     *<br>
-     * 5.3 openInputStream raises IllegalArgumentException<br>
-     * Open InputStream to URL "mms://:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     *<br>
-     * 5.4 openOutputStream raises IllegalArgumentException<br>
-     * Open OutputStream to URL "mms://358401234567:test.appid".
-     * Check that IllegalArgumentException is thrown.
-     */
-    public void openConnStreams()
-    {
-        MessageConnection conn = null;
-        String clientUrl = msisdnUrl + ":test.appid";
-        String serverUrl = "mms://:test.appid";
-
-        try
-        {
-            conn = (MessageConnection)Connector.openDataInputStream(serverUrl);
-            assertTrue("Opening DataInputStream should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue("Wrong exception when opening DataInputStream: " + e,false);
-        }
-
-        try
-        {
-            conn = (MessageConnection)Connector.openDataOutputStream(clientUrl);
-            assertTrue("Opening DataOutputStream should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue("Wrong exception when opening DataOutputStream: " + e,false);
-        }
-
-        try
-        {
-            conn = (MessageConnection)Connector.openInputStream(serverUrl);
-            assertTrue("Opening InputStream should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue("Wrong exception when opening InputStream: " + e,false);
-        }
-
-        try
-        {
-            conn = (MessageConnection)Connector.openOutputStream(clientUrl);
-            assertTrue("Opening OutputStream should not succeed",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK
-        }
-        catch (Exception e)
-        {
-            assertTrue("Wrong exception when opening OutputStream: " + e,false);
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 6 Getting MMSC tests<br>
-     *<br>
-     * 6.1 Check that system property wireless.messaging.mms.mmsc
-     * has been defined.<br>
-     */
-    public void getMmscProperty()
-    {
-        String mmscPropertyName = "wireless.messaging.mms.mmsc";
-        String mmscPropertyValue = System.getProperty(mmscPropertyName);
-        if (mmscPropertyValue == null)
-        {
-            assertTrue("System property " + mmscPropertyName
-                       + " has not been defined (null)",false);
-        }
-        if (mmscPropertyValue.length() == 0)
-        {
-            assertTrue("System property " + mmscPropertyName
-                       + " has not been defined (length == 0)",false);
-        }
-        assertTrue("System property " + mmscPropertyName + "="
-                   + mmscPropertyValue,true);
-    }
-
-    // BEGIN - Private helper methods for this test suite.
-
-    /**
-     * Opens a connection to given URL. If connection opening succeeds
-     * or throws other than IllegalArgumentException, throws
-     * WmaException.
-     */
-    private void openConnCheckIllegalArgument(String url)
-    throws WmaException
-    {
-        MessageConnection conn = null;
-        try
-        {
-            // Try to open connection.
-            conn = (MessageConnection)Connector.open(url);
-            throw new WmaException("Connection opening should not succeed with url \"" +
-                                   url + "\"");
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // OK, expected this exception.
-        }
-        catch (WmaException wmae)
-        {
-            // OK, throw again this exception.
-            throw wmae;
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Connection opening to url \"" + url +
-                                   "\" assertTrue with wrong exception: " + e);
-        }
-        finally
-        {
-            if (conn != null)
-            {
-                try
-                {
-                    conn.close();
-                }
-                catch (IOException ioe)
-                {
-                }
-            }
-        }
-    }
-
-    /**
-     * Opens a connection to given URL. If connection opening succeeds
-     * or throws other than ConnectionNotFoundException, throws
-     * WmaException.
-     */
-    private void openConnCheckConnectionNotFound(String url)
-    throws WmaException
-    {
-        MessageConnection conn = null;
-        try
-        {
-            // Try to open connection.
-            conn = (MessageConnection)Connector.open(url);
-            throw new WmaException("Connection opening should not succeed with url \"" +
-                                   url + "\"");
-        }
-        catch (ConnectionNotFoundException cnfe)
-        {
-            // OK, expected this exception.
-        }
-        catch (WmaException wmae)
-        {
-            // OK, throw again this exception.
-            throw wmae;
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Connection opening to url \"" + url +
-                                   "\" assertTrue with wrong exception: " + e);
-        }
-        finally
-        {
-            if (conn != null)
-            {
-                try
-                {
-                    conn.close();
-                }
-                catch (IOException ioe)
-                {
-                }
-            }
-        }
-    }
-
-    /**
-     * Tries to open a connection to given url in given mode.
-     * If result is not expected, throws WmaException.
-     */
-    private void openReadWriteConn(
-        String url, int mode, boolean expectIllegalArgumentException)
-    throws WmaException
-    {
-        MessageConnection conn = null;
-        try
-        {
-            conn = (MessageConnection)Connector.open(url, mode);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            if (!expectIllegalArgumentException)
-            {
-                throw new WmaException(connectorModeToString(mode) +
-                                       " connection opening to url \"" +
-                                       url + "\" assertTrue: " + iae);
-            }
-        }
-        catch (Exception e)
-        {
-            throw new WmaException(connectorModeToString(mode) +
-                                   " connection opening to url \"" +
-                                   url + "\" assertTrue: " + e);
-        }
-        finally
-        {
-            try
-            {
-                if (conn != null)
-                {
-                    conn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-    }
-
-    /**
-     * Returns a string presentation of given Connector mode
-     * (READ, WRITE, READ_WRITE).
-     */
-    private String connectorModeToString(int mode)
-    {
-        String result = null;
-        switch (mode)
-        {
-        case Connector.READ:
-            result = "Read-only";
-            break;
-        case Connector.READ_WRITE:
-            result = "Read-Write";
-            break;
-        case Connector.WRITE:
-            result = "Write-only";
-            break;
-        }
-        return result;
-    }
-
-    // END - Private helper methods for this test suite.
-}
--- a/javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestReceive.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,678 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION
- *
- * Code complexity rate (of the tested module) if measured:
- *
- * The purpose of the module test:<br>
- *
- * Test message receiving with MessageConnection.
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 Exception tests<br>
- * 1.1 Call blocking receive and close the connection => InterruptedIOException<br>
- *
- * 2 Listener tests<br>
- * 2.1 Listener is deregistered when another is set => messages are delivered
- * only to last registered listener<br>
- * 2.2 Listener is deregistered when null listener is set => messages not
- * delivered to listener<br>
- * 2.3 Listener is notified of incoming messages<br>
- *
- * 3 Receive tests (for some receive tests see TestSend.java)
- * 3.1 Send and receive through the same server connection.
- *
- * Used stubs and description:
- *
- * Setting up the environment:
- *
- * How to run the test:
- *
- * Is it tested with WINSCW and/or HW:
- *
- * Outputs and expected results:
- *
- * Branch coverage percentage (explanation if it is under 70%):
- *
- * In case some of the tests cannot be run, an explanation should be given:
- *
- * Included test files:
- *
- * Build number (in which the tested module is integrated):
- *
- * Note whether the test case belongs to the MRT set:
- *
- **/
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import java.io.InterruptedIOException;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-
-public class TestReceive extends WmaTestBase
-{
-
-    public TestReceive()
-    {
-    }
-
-    public TestReceive(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-
-        aSuite.addTest(new TestReceive("receiveConnectionClosed", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).receiveConnectionClosed();
-            }
-        }));
-
-
-        aSuite.addTest(new TestReceive("listenerReRegistration", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).listenerReRegistration();
-            }
-        }));
-
-
-        aSuite.addTest(new TestReceive("nullListenerRegistration", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).nullListenerRegistration();
-            }
-        }));
-
-
-        aSuite.addTest(new TestReceive("listenerNotifications", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).listenerNotifications();
-            }
-        }));
-
-
-        aSuite.addTest(new TestReceive("sendReceiveSameServerConn", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestReceive) tc).sendReceiveSameServerConn();
-            }
-        }));
-
-
-        return aSuite;
-    }
-
-    /**
-     * 1.1 Call blocking receive and close the connection =>
-     * InterruptedIOException<br>
-     */
-    public void receiveConnectionClosed()
-    {
-        // Test preparations.
-        String url = "mms://:test.appid";
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Start the closer and call receive
-        Closer closer = new Closer(3000, conn);
-        closer.start();
-
-        // Call receive.
-        try
-        {
-            Message msg = conn.receive();
-            assertTrue("Closing connection during receive should fail "
-                       + "with InterruptedIOException",false);
-        }
-        catch (InterruptedIOException iioe)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Closing connection during receive failed with "
-                       + "wrong exception: " + e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the connection.
-            conn.close();
-        }
-        catch (Exception e) {}
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2.1 Listener is deregistered when another is set => messages are delivered
-     * only to last registered listener<br>
-     */
-    public void listenerReRegistration()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.listenerreregistration";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl;
-        //String fromUrl = "mms://"+addr;
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(serverUrl);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create and register listeners.
-        CounterListener listener1 = new CounterListener();
-        CounterListener listener2 = new CounterListener();
-        try
-        {
-            conn.setMessageListener(listener1);
-            conn.setMessageListener(listener2);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting listeners failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Send a message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = getDummyMultipartMessage(conn, clientUrl, "Test message");
-            conn.send(msg);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Sending message failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Wait a while for the notification
-        try
-        {
-            wait(getNotificationWaitTime());
-        }
-        catch (Exception e)
-        {
-            assertTrue("Notification wait failed with exception: " + e.toString(),false);
-        }
-
-        // Check that correct listener receives correct number of notifications.
-        if (listener1.getNotificationsCount() != 0)
-        {
-            assertTrue(
-                "Wrong listener received notification, expected 0, got "
-                + listener1.getNotificationsCount(),false);
-        }
-        if (listener2.getNotificationsCount() != 1)
-        {
-            assertTrue(
-                "Wrong number of notifications received, expected 1, got "
-                + listener2.getNotificationsCount(),false);
-        }
-
-        // Check that correct message is received.
-        try
-        {
-            MultipartMessage msg2 = (MultipartMessage)conn.receive();
-            if (!messagesEqual(msg, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg) + "\nreceived:\n" + msgToString(msg2),false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Receiving message failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the connection.
-            conn.close();
-        }
-        catch (Exception e) {}
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2.2 Listener is deregistered when null listener is set => messages not
-     * delivered to listener<br>
-     */
-    public void nullListenerRegistration()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.nulllistenerregistration";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl;
-        //String fromUrl = "mms://"+addr;
-        MessageConnection conn = null;
-        try
-        {
-            conn = getConnection(serverUrl);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create and register listener and null listener.
-        CounterListener listener = new CounterListener();
-        try
-        {
-            conn.setMessageListener(listener);
-            conn.setMessageListener(null);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting listener failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Send a message.
-        MultipartMessage msg = null;
-        try
-        {
-            msg = getDummyMultipartMessage(conn, clientUrl, "Test message");
-            conn.send(msg);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Sending message failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Wait a while for the notification
-        try
-        {
-            wait(getNotificationWaitTime());
-        }
-        catch (Exception e)
-        {
-            assertTrue("Notification wait failed with exception: " + e.toString(),false);
-        }
-
-        // Check that listener does not receive notifications.
-        if (listener.getNotificationsCount() != 0)
-        {
-            assertTrue(
-                "Listener received notification, expected 0, got "
-                + listener.getNotificationsCount(),false);
-        }
-
-        // Check that correct message is received.
-        try
-        {
-            MultipartMessage msg2 = (MultipartMessage)conn.receive();
-            if (!messagesEqual(msg, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg) + "\nreceived:\n" + msgToString(msg2),false);
-            }
-        }
-        catch (Exception e)
-        {
-            assertTrue("Receiving message failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the connection.
-            conn.close();
-        }
-        catch (Exception e) {}
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2.3 Listener is notified of incoming messages<br>
-     */
-    public void listenerNotifications()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.listenernotifications";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl;
-        //String fromUrl = "mms://"+addr;
-        MessageConnection conn = null, conn2 = null;
-        try
-        {
-            conn = getConnection(serverUrl);
-            conn2 = getConnection(clientUrl);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Create and register listener.
-        CounterListener listener = new CounterListener();
-        try
-        {
-            conn.setMessageListener(listener);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Setting listener failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Send a message.
-        int msgCount = 6;
-        MultipartMessage msg = null;
-        try
-        {
-            msg = getDummyMultipartMessage(conn, clientUrl, "Test message");
-            conn.send(msg);
-            conn.send(msg);
-            conn2.send(msg);
-            conn.send(msg);
-            conn2.send(msg);
-            conn2.send(msg);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Sending messages failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Wait a while for the notifications
-        try
-        {
-            wait(getNotificationWaitTime());
-        }
-        catch (Exception e)
-        {
-            assertTrue("Notification wait failed with exception: " + e.toString(),false);
-        }
-
-        // Check that listener receives correct number of notifications.
-        if (listener.getNotificationsCount() != msgCount)
-        {
-            assertTrue(
-                "Listener received notification, expected " + msgCount
-                + ", got " + listener.getNotificationsCount(),false);
-        }
-
-        // Check that correct messages are received.
-        int clientMsgsCount = 0;
-        for (int i = 0; i < msgCount; i++)
-        {
-            try
-            {
-                MultipartMessage msg2 = (MultipartMessage)conn.receive();
-                if (msg2.getAddress().indexOf(":", 5) == -1)
-                {
-                    // it's been sent from a client type of connection
-                    fromUrl = "mms://"+addr;
-                    clientMsgsCount++;
-                }
-                else
-                {
-                    fromUrl = clientUrl;
-                }
-                if (clientMsgsCount > 3 ||
-                        !messagesEqual(msg, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received message " + i
-                               + " differ, sent:\n" + msgToString(msg)
-                               + "\nreceived:\n" + msgToString(msg2),false);
-                }
-            }
-            catch (Exception e)
-            {
-                assertTrue("Receiving message " + i
-                           + " failed with exception: " + e.toString(),false);
-            }
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the connection.
-            conn.close();
-        }
-        catch (Exception e) {}
-        try
-        {
-            // Close the connection.
-            conn2.close();
-        }
-        catch (Exception e) {}
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 3 Receive tests (for some receive tests see TestSend.java)
-     * 3.1 Send and receive through the same server connection.
-     */
-    public void sendReceiveSameServerConn()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.appid.sendreceive.sameconn";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        //String fromUrl = "mms://"+addr; // for RI
-        String subject = "Sample message";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection serverConn = null;
-        try
-        {
-            try
-            {
-                serverConn = getConnection(serverUrl);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)serverConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Priority", "LoW");
-                serverConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            // Receive the message in a separate thread.
-            try
-            {
-                msg2 = receiveMsg(serverConn);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-            }
-
-            // Send a message with attachments.
-            try
-            {
-                msg1 = (MultipartMessage)serverConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Priority", "NormaL");
-                msg1.addMessagePart(getDummyMessagePart(10000, "1"));
-                msg1.addMessagePart(getDummyMessagePart(1000, "2"));
-                msg1.addMessagePart(getDummyMessagePart(100, "3"));
-                msg1.addMessagePart(getDummyMessagePart(10, "43"));
-                msg1.setStartContentId("3");
-                serverConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message with attachments failed with exception: "
-                           + e.toString(),false);
-            }
-
-            // Receive the message in a separate thread.
-            try
-            {
-                msg2 = receiveMsg(serverConn);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    // BEGIN - Private helper methods for this test suite.
-
-    // END - Private helper methods for this test suite.
-
-    /**
-     * Waits for a specified period of time and then closes a connection.
-     */
-    class Closer extends Thread
-    {
-        MessageConnection connection = null;
-        long sleepTime = 3000;
-        boolean done = false;
-        public Closer(long aSleepTime, MessageConnection aConnection)
-        {
-            sleepTime = aSleepTime;
-            connection = aConnection;
-        }
-        public void run()
-        {
-            try
-            {
-                Thread.sleep(sleepTime);
-            }
-            catch (Exception ex) {}
-            try
-            {
-                connection.close();
-            }
-            catch (Exception ex) {}
-            done = true;
-        }
-        public boolean isDone()
-        {
-            return done;
-        }
-    }
-
-    /**
-     * Simple implementation of the MessageListener interface.
-     * Counts number of received notifications.
-     */
-    class CounterListener implements MessageListener
-    {
-        private int notificationsCount = 0;
-        public void notifyIncomingMessage(MessageConnection Connection)
-        {
-            notificationsCount++;
-        }
-        public int getNotificationsCount()
-        {
-            return notificationsCount;
-        }
-    }
-}
--- a/javaextensions/wma/mms/tsrc/generictests/javasrc/com/nokia/mj/test/wma/TestSend.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1596 +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:
-*
-*/
-/**
- * TEST CASE SPECIFICATION
- *
- * Code complexity rate (of the tested module) if measured:
- *
- * The purpose of the module test:<br>
- *
- * Test message sending with MessageConnection.<br>
- *
- * Test case descriptions and inputs:<br>
- *
- * 1 Exception tests<br>
- * 1.1 Send null message => NullPointerException<br>
- * 1.2 Send too large message => IllegalArgumentException<br>
- * 1.3 Send wrong type message => IllegalArgumentException<br>
- * 1.4 Send message created with different MessageConnection => IllegalArgumentException<br>
- *
- * 2 sendMultipartAsClient tests<br>
- * 2.1 Send a multipart message without attachments using client connection,
- * receive using server connection, check headers<br>
- * 2.2 Send a multipart message with attachments using client connection,
- * receive using server connection, check headers and attachments<br>
- * 2.3 Send several multipart messages with attachments using two client connections,
- * receive using server connection<br>
- * 2.4 Send a multipart message with attachments to several recipients
- * using client connection, receive using server connection, check
- * headers and attachments<br>
- *
- * 3 sendMultipartAsServer tests<br>
- * 3.1 Send a multipart message without attachments using server connection,
- * receive using server connection, check headers<br>
- * 3.2 Send a multipart message with attachments using server connection,
- * receive using server connection, check headers and attachments<br>
- * 3.3 Send several multipart messages with attachments using two server connections,
- * receive using server connection<br>
- * 3.4 Send a multipart message with attachments to several recipients
- * using server connection, receive using server connection, check
- * headers and attachments<br>
- *
- * 4 sendBinaryAsClient tests<br>
- * N/A: not multipart message test.
- * 4.1 Send a binary message using client connection, receive using server connection<br>
- *
- * 5 sendBinaryAsServer tests<br>
- * N/A: not multipart message test.
- * 5.1 Send a binary message using server connection, receive using server connection<br>
- *
- * 6 sendTextAsClient tests<br>
- * N/A: not multipart message test.
- * 6.1 Send a text message using client connection, receive using server connection<br>
- *
- * 7 sendTextAsServer tests<br>
- * N/A: not multipart message test.
- * 7.1 Send a text message using server connection, receive using server connection<br>
- *
- * Used stubs and description:
- *
- * Setting up the environment:
- *
- * How to run the test:
- *
- * Is it tested with WINSCW and/or HW:
- *
- * Outputs and expected results:
- *
- * Branch coverage percentage (explanation if it is under 70%):
- *
- * In case some of the tests cannot be run, an explanation should be given:
- *
- * Included test files:
- *
- * Build number (in which the tested module is integrated):
- *
- * Note whether the test case belongs to the MRT set:
- *
- **/
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.ConnectionNotFoundException;
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-import javax.wireless.messaging.TextMessage;
-
-public class TestSend extends WmaTestBase
-{
-
-    public TestSend()
-    {
-    }
-
-    public TestSend(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-
-        aSuite.addTest(new TestSend("sendSimpleMultipart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendSimpleMultipart(false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveSimpleMultipart", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendSimpleMultipart(true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendToShortAppID", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendToShortAppID();
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendExceptions", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendExceptions();
-            }
-        }));
-
-        // Send test cases
-
-        aSuite.addTest(new TestSend("sendMultipartThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipart(false,false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendMultipartsThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultiparts(false,false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendMultipartToSeveralRecipientsThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipartToSeveralRecipients(false,false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendMultipartThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipart(true,false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendMultipartsThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultiparts(true,false);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendMultipartToSeveralRecipientsThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipartToSeveralRecipients(true,false);
-            }
-        }));
-
-        // Send and receive test cases
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipart(false,true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartsThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultiparts(false,true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartToSeveralRecipientsThroughClient", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipartToSeveralRecipients(false,true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipart(true,true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartsThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultiparts(true,true);
-            }
-        }));
-
-
-        aSuite.addTest(new TestSend("sendReceiveMultipartToSeveralRecipientsThroughServer", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).sendMultipartToSeveralRecipients(true,true);
-            }
-        }));
-
-        aSuite.addTest(new TestSend("testReply", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).testReply();
-            }
-        }));
-
-        aSuite.addTest(new TestSend("testForward", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).testForward();
-            }
-        }));
-
-        aSuite.addTest(new TestSend("testTimestamp", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestSend) tc).testTimestamp();
-            }
-        }));
-
-        return aSuite;
-    }
-
-    // Bogdan: counters that make connections different.
-    static int simpleMultipart_Counter = 1;
-    static int sendMultipart_Counter = 1;
-    static int sendMultiparts_Counter = 1;
-    static int sendMultipartToSeveralRec_Counter = 1;
-
-    /**
-     * 1 Exception tests<br>
-     * 1.1 Send null message => NullPointerException<br>
-     * 1.2 Send too large message => IllegalArgumentException<br>
-     * 1.3 Send wrong type message => IllegalArgumentException<br>
-     * 1.4 Send message created with different MessageConnection => IllegalArgumentException<br>
-     */
-    public void sendExceptions()
-    {
-        // Test preparations.
-        String url = getMsisdnAddress(0, true) + ":test.appid";
-        MessageConnection conn = null, conn2 = null;
-        try
-        {
-            conn = getConnection(url);
-            conn2 = getConnection(url);
-        }
-        catch (WmaException wmae)
-        {
-            assertTrue(wmae.toString(),false);
-        }
-
-        // Send null message.
-        try
-        {
-            conn.send(null);
-            assertTrue("Sending null message should fail with NullPointerException",false);
-        }
-        catch (NullPointerException ne)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Sending null message failed with wrong exception: "
-                       + e.toString(),false);
-        }
-
-        // Send too large message.
-        /*
-                // OPEN: How to test sending too large message? It is not possible
-                // to create one because in message creation SizeExceededException
-                // will be thrown.
-                try {
-                    MultipartMessage msg = getTooLargeMessage(conn, "Too large message");
-                    conn.send(msg);
-                    assertTrue("Sending too large message should fail with IllegalArgumentException");
-                    // send method does not throw SizeExceededException
-                } catch (IllegalArgumentException iae) {
-                    // passed
-                } catch (Exception e) {
-                    assertTrue("Sending too large message failed with wrong exception: "
-                        + e.toString());
-                }
-        */
-
-        // Create text message.
-        try
-        {
-            TextMessage textMsg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
-            assertTrue("Creating text message should fail with IllegalArgumentException",false);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // passed
-        }
-        catch (Exception e)
-        {
-            assertTrue("Creating text message failed with wrong exception: "
-                       + e.toString(),false);
-        }
-
-        // Send message created with different connection.
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)conn2.newMessage(
-                                       MessageConnection.MULTIPART_MESSAGE);
-            conn.send(msg);
-        }
-        catch (Exception e)
-        {
-            assertTrue("Sending message created with another connection "
-                       + "should succeed but failed with exception: "
-                       + e.toString(),false);
-        }
-
-        // Cleanup.
-        try
-        {
-            // Close the client connection.
-            conn.close();
-        }
-        catch (Exception e) {}
-        try
-        {
-            // Close the client connection.
-            conn2.close();
-        }
-        catch (Exception e) {}
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2 sendMultipartAsClient tests<br>
-     * 2.1 Send a multipart message without attachments using client connection,
-     * receive using server connection, check headers<br>
-     * 2.2 Send a multipart message with attachments using client connection,
-     * receive using server connection, check headers and attachments<br>
-     * <p>
-     * 3 sendMultipartAsServer tests<br>
-     * 3.1 Send a multipart message without attachments using server connection,
-     * receive using server connection, check headers<br>
-     * 3.2 Send a multipart message with attachments using server connection,
-     * receive using server connection, check headers and attachments<br>
-     */
-    public void sendMultipart(boolean useServerConnection, boolean receive)
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        System.out.println("msisdn address" + addr);
-        // Bogdan: add counter that makes the appId unique
-        String appId = "test.appid.multipart" + sendMultipart_Counter;
-        sendMultipart_Counter++;
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        //String fromUrl = "mms://"+addr; // for RI
-        String subject = "Sample message";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection clientConn = null, serverConn = null;
-        try
-        {
-            try
-            {
-                if (useServerConnection)
-                {
-                    clientConn = getConnection(serverUrl+".client");
-                    fromUrl = fromUrl + ".client";
-                }
-                else
-                {
-                    clientConn = getConnection(clientUrl);
-                    fromUrl = "mms://"+addr;
-                }
-                if (receive)
-                {
-                    serverConn = getConnection(serverUrl);
-                }
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1");
-                msg1.setHeader("X-Mms-Priority", "High");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                try
-                {
-                    msg2 = receiveMsg(serverConn);
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received messages differ, sent:\n"
-                               + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2)
-                               + "\nexpected sent getAddress: " + toUrl
-                               + "\nexpected received getAddress: " + fromUrl,false);
-                }
-            }
-
-            // Send a message with attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1000000");
-                msg1.setHeader("X-Mms-Priority", "Low");
-                msg1.addMessagePart(getDummyMessagePart(1024, "1", null, null)); // use null encoding
-                msg1.addMessagePart(getDummyMessagePart(100, "2"));
-                msg1.addMessagePart(getDummyMessagePart(5000, "3"));
-                msg1.setStartContentId("1");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message with attachments failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                try
-                {
-                    msg2 = receiveMsg(serverConn);
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received messages differ, sent:\n"
-                               + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2)
-                               + "\nexpected sent getAddress: " + toUrl
-                               + "\nexpected received getAddress: " + fromUrl,false);
-                }
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (clientConn != null)
-                {
-                    clientConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2 sendMultipartAsClient tests<br>
-     * 2.3 Send several multipart messages with attachments using two
-     * client connections, receive using server connection<br>
-     * <p>
-     * 3 sendMultipartAsServer tests<br>
-     * 3.3 Send several multipart messages with attachments using two server connections,
-     * receive using server connection<br>
-     */
-    public void sendMultiparts(boolean useServerConnection, boolean receive)
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        // Bogdan: add counter that makes the appId unique
-        String appId = "test.appid.multiparts" + sendMultiparts_Counter;
-        sendMultiparts_Counter++;
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl;
-        //String fromUrl = "mms://"+addr;
-        String subject = "Sample message with attachments";
-        String urlExt1 = "", urlExt2 = "";
-        MultipartMessage msg1 = null, msg2 = null, msg3 = null;
-        MultipartMessage rec1 = null, rec2 = null, rec3 = null;
-        MessageConnection clientConn = null, clientConn2 = null, serverConn = null;
-        try
-        {
-            try
-            {
-                if (useServerConnection)
-                {
-                    clientUrl = serverUrl;
-                    // Bogdan: from address should not include the application id
-                    //fromUrl = toUrl;
-                    urlExt1 = ".client1";
-                    urlExt2 = ".client2";
-                    // Two server connections to different server urls.
-                    clientConn = getConnection(clientUrl+urlExt1);
-                    clientConn2 = getConnection(clientUrl+urlExt2);
-                }
-                else
-                {
-                    // Two client connections to the same url.
-                    fromUrl = "mms://"+addr;
-                    clientConn = getConnection(clientUrl);
-                    clientConn2 = getConnection(clientUrl);
-                }
-                if (receive)
-                {
-                    serverConn = getConnection(serverUrl);
-                }
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Create messages.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                // Bogdan: take urlExt1 and urlExt2 into use everywhere
-                msg1.setAddress(toUrl + urlExt1);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1");
-                msg1.setHeader("X-Mms-Priority", "High");
-                msg1.addMessagePart(getDummyMessagePart(1, "a"));
-                msg1.addMessagePart(getDummyMessagePart(1024, "b"));
-                msg1.addMessagePart(getDummyMessagePart(5000, "c"));
-                msg1.setStartContentId("a");
-
-                msg2 = (MultipartMessage)clientConn2.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                // Bogdan: take urlExt1 and urlExt2 into use everywhere
-                msg2.setAddress(toUrl + urlExt2);
-                msg2.setSubject(subject+"2");
-                msg2.setHeader("X-Mms-Delivery-Time", "500");
-                msg2.setHeader("X-Mms-Priority", "Low");
-                msg2.addMessagePart(getDummyMessagePart(10, "AAA"));
-                msg2.addMessagePart(getDummyMessagePart(100, "BBB"));
-                msg2.addMessagePart(getDummyMessagePart(1000, "CCC"));
-                msg2.setStartContentId("AAA");
-
-                msg3 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                // Bogdan: take urlExt1 and urlExt2 into use everywhere
-                msg3.setAddress(toUrl + urlExt1);
-                msg3.setSubject(subject+"3");
-                msg3.setHeader("X-Mms-Priority", "Normal");
-                msg3.addMessagePart(getDummyMessagePart(2000, "foo"));
-                msg3.addMessagePart(getDummyMessagePart(2000, "bar"));
-            }
-            catch (Exception e)
-            {
-                assertTrue("Creating messages failed with exception: "
-                           + e.toString(),false);
-            }
-
-            // Send messages.
-            try
-            {
-                clientConn.send(msg1);
-                clientConn2.send(msg2);
-                clientConn.send(msg3);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending messages failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                // OPEN: Receiving the first message fails with RI:
-                // java.io.IOException: Bad fragmentation
-                try
-                {
-                    if (useServerConnection)
-                    {
-                        rec1 = receiveMsg(clientConn);
-                        rec2 = receiveMsg(clientConn2);
-                        rec3 = receiveMsg(clientConn);
-                    }
-                    else
-                    {
-                        rec1 = receiveMsg(serverConn);
-                        rec2 = receiveMsg(serverConn);
-                        rec3 = receiveMsg(serverConn);
-                    }
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                // Bogdan: from address should not include the application id
-                java.util.Vector sentMessages = new java.util.Vector();
-                sentMessages.addElement(msg1);
-                sentMessages.addElement(msg2);
-                sentMessages.addElement(msg3);
-                java.util.Vector recvMessages = new java.util.Vector();
-                recvMessages.addElement(rec1);
-                recvMessages.addElement(rec2);
-                recvMessages.addElement(rec3);
-                for (int i=0; i<sentMessages.size(); i++)
-                {
-                    MultipartMessage sentMessage = (MultipartMessage)sentMessages.elementAt(i);
-                    boolean found = false;
-                    for (int j=0; j<recvMessages.size(); j++)
-                    {
-                        MultipartMessage recvMessage = (MultipartMessage)recvMessages.elementAt(j);
-                        if (messagesEqual(sentMessage, recvMessage, toUrl+urlExt1, fromUrl+urlExt1) ||
-                                messagesEqual(sentMessage, recvMessage, toUrl+urlExt2, fromUrl+urlExt2))
-                        {
-                            recvMessages.removeElementAt(j);
-                            found = true;
-                            break;
-                        }
-                    }
-                    if (!found)
-                    {
-                        assertTrue("Message sent but not received " + msgToString(sentMessage),false);
-                    }
-                }
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (clientConn != null)
-                {
-                    clientConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close another client connection.
-                if (clientConn2 != null)
-                {
-                    clientConn2.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * 2 sendMultipartAsClient tests<br>
-     * 2.4 Send a multipart message with attachments to several recipients
-     * using client connection, receive using server connection, check
-     * headers and attachments<br>
-     * 3.4 Send a multipart message with attachments to several recipients
-     * using server connection, receive using server connection, check
-     * headers and attachments<br>
-     */
-    public void sendMultipartToSeveralRecipients(
-        boolean useServerConnection, boolean receive)
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        // Bogdan: the new limit for appID is 32
-        // String appId = ":test.appid.multipart.several.recipients";
-        String appId = ":test.appid.several.rec" + sendMultipartToSeveralRec_Counter;
-        sendMultipartToSeveralRec_Counter++;
-        String clientUrl = "mms://"+addr+appId;
-        String serverUrl = "mms://"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        //String fromUrl = "mms://"+addr; // for RI
-        String subject = "Sample message sent to multiple recipients";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection clientConn = null, serverConn = null;
-        try
-        {
-            try
-            {
-                if (useServerConnection)
-                {
-                    clientConn = getConnection(serverUrl+".client");
-                    fromUrl = fromUrl + ".client";
-                }
-                else
-                {
-                    clientConn = getConnection(clientUrl);
-                    fromUrl = "mms://"+addr;
-                }
-                if (receive)
-                {
-                    serverConn = getConnection(serverUrl);
-                }
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.addAddress("to", getMsisdnAddress(1, true)+appId);
-                msg1.addAddress("to", getMsisdnAddress(2, true)+appId);
-                msg1.addAddress("to", getMsisdnAddress(3, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(4, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(5, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(6, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(7, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(8, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(9, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(10, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(11, true)+appId);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Priority", "Normal");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                try
-                {
-                    msg2 = receiveMsg(serverConn);
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received messages differ, sent:\n"
-                               + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-                }
-            }
-
-            // Send a message with attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.addAddress("to", getMsisdnAddress(1, true)+appId);
-                msg1.addAddress("to", getMsisdnAddress(2, true)+appId);
-                msg1.addAddress("to", getMsisdnAddress(3, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(4, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(5, true)+appId);
-                msg1.addAddress("cc", getMsisdnAddress(6, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(7, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(8, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(9, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(10, true)+appId);
-                msg1.addAddress("bcc", getMsisdnAddress(11, true)+appId);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Priority", "Normal");
-                msg1.addMessagePart(getDummyMessagePart(100*1024, "100K"));
-                msg1.addMessagePart(getDummyMessagePart(20, "20"));
-                msg1.addMessagePart(getDummyMessagePart(5000, "5000"));
-                msg1.addMessagePart(getDummyMessagePart(1, "1"));
-                msg1.setStartContentId("20");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message with attachments failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                try
-                {
-                    msg2 = receiveMsg(serverConn);
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received messages with attachment differ, sent:\n"
-                               + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-                }
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (clientConn != null)
-                {
-                    clientConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * Sends a simple multipart message.
-     */
-    public void sendSimpleMultipart(boolean receive)
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        // Bogdan : add counter that makes the appId unique
-        String appId = "test.appid.simplemultipart" + simpleMultipart_Counter;
-        simpleMultipart_Counter++;
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        //String fromUrl = "mms://"+addr; // for RI
-        String subject = "Simple sample message";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection clientConn = null, serverConn = null;
-        try
-        {
-            try
-            {
-                clientConn = getConnection(clientUrl);
-                fromUrl = "mms://"+addr;
-                if (receive)
-                {
-                    serverConn = getConnection(serverUrl);
-                    /*
-                                        wmaDebug("got server connection");
-                                        serverConn.setMessageListener(new MessageListener() {
-                                            public void notifyIncomingMessage(MessageConnection conn) {
-                                                // Receive the message in a separate thread.
-                                                try {
-                                                    wmaDebug("listener called");
-                                                    MultipartMessage msg = receiveMsg(conn);
-                                                    wmaDebug("received to listener: " + msgToString(msg));
-                                                } catch (WmaException wmae) {
-                                                    wmaDebug("exception in listener: " + wmae.toString());
-                                                }
-                                            }
-                                        });
-                                        wmaDebug("set listener");
-                    */
-                }
-                /*
-                            } catch (IOException ioe) {
-                                assertTrue(ioe.toString());
-                */
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message with attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1000000");
-                msg1.setHeader("X-Mms-Priority", "Low");
-                msg1.addMessagePart(getDummyMessagePart(1024, "1","/res/path.gif\\file\\path/Dummy - !\"%&/()=?++|><*ContentLocation" , null)); // use null encoding
-                msg1.addMessagePart(getDummyMessagePart(100, "2", null, "utf-8"));
-                msg1.addMessagePart(getDummyMessagePart(100*1024, "3"));
-                msg1.setStartContentId("1");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message with attachments failed with exception: "
-                           + e.toString(),false);
-            }
-
-            if (receive)
-            {
-                // Receive the message in a separate thread.
-                try
-                {
-                    msg2 = receiveMsg(serverConn);
-                }
-                catch (WmaException wmae)
-                {
-                    assertTrue(wmae.toString(),false);
-                }
-                // Compare sent and received messages.
-                if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-                {
-                    assertTrue("Sent and received messages differ, sent:\n"
-                               + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-                }
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (clientConn != null)
-                {
-                    clientConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * Sends a simple multipart message to a "length 1" app ID.
-     */
-    public void sendToShortAppID()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "" + simpleMultipart_Counter;
-        simpleMultipart_Counter++;
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        String subject = "Simple sample message";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection clientConn = null, serverConn = null;
-        try
-        {
-            try
-            {
-                clientConn = getConnection(clientUrl);
-                serverConn = getConnection(serverUrl);
-                fromUrl = "mms://"+addr;
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message with attachments.
-            try
-            {
-                msg1 = (MultipartMessage)clientConn.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1000000");
-                msg1.setHeader("X-Mms-Priority", "Low");
-                msg1.addMessagePart(getDummyMessagePart(1024, "1", "DummyContentLocation", null)); // use null encoding
-                msg1.addMessagePart(getDummyMessagePart(100, "2", null, "utf-8"));
-                msg1.addMessagePart(getDummyMessagePart(100*1024, "3"));
-                msg1.setStartContentId("1");
-                clientConn.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message with attachments failed with exception: "
-                           + e.toString(),false);
-            }
-
-            // Receive the message in a separate thread.
-            try
-            {
-                msg2 = receiveMsg(serverConn);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2),false);
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (clientConn != null)
-                {
-                    clientConn.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (serverConn != null)
-                {
-                    serverConn.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * Tests the reply mechanism:
-     * 1) It uses a server connection to send and receive
-     * 2) It uses a client connection to send
-     **/
-    public void testReply()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.appid.reply";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        String subject = "Sample message";
-        MultipartMessage msg1 = null, msg2 = null, msg3 = null, msg4 = null;
-        MessageConnection sender = null, receiver = null;
-        try
-        {
-            try
-            {
-                sender = getConnection(serverUrl+".serverSender");
-                fromUrl = fromUrl + ".serverSender";
-                receiver = getConnection(serverUrl);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)sender.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1");
-                msg1.setHeader("X-Mms-Priority", "High");
-                sender.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            try
-            {
-                msg2 = receiveMsg(receiver);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl,false);
-            }
-
-            // now the receiver makes a reply and the initial sender should get the message
-            try
-            {
-                receiver.send(msg2);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-            fromUrl = clientUrl;
-            try
-            {
-                msg3 = receiveMsg(sender);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg3, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg3)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl,false);
-            }
-            // the initial sends a reply
-            try
-            {
-                sender.send(msg3);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(), false);
-            }
-            toUrl = clientUrl + ".serverSender";
-            fromUrl = clientUrl + ".serverSender";
-            try
-            {
-                msg4 = receiveMsg(receiver);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg3, msg4, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg3)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl, false);
-            }
-
-            // the sender is now a client type of connection
-            try
-            {
-                sender = getConnection(clientUrl);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            toUrl = clientUrl;
-            fromUrl = "mms://"+addr;
-            try
-            {
-                msg1 = (MultipartMessage)sender.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1");
-                msg1.setHeader("X-Mms-Priority", "High");
-                sender.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            try
-            {
-                msg2 = receiveMsg(receiver);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl,false);
-            }
-
-            // now the receiver tries to make a reply
-            try
-            {
-                receiver.send(msg2);
-                assertTrue("Reply to a non-reply type of message MUST not be allowed", false);
-            }
-            catch (IllegalArgumentException iae)
-            {
-                // this is ok
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (sender != null)
-                {
-                    sender.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (receiver != null)
-                {
-                    receiver.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    /**
-     * Tests the reply mechanism:
-     * 1) It uses a server connection to send and receive
-     * 2) It uses a client connection to send
-     **/
-    private void testForward()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.appid.forward";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        String subject = "Sample message";
-        MultipartMessage msg1 = null, msg2 = null, msg3 = null, msg4 = null;
-        MessageConnection sender = null, receiver = null, receiver2 = null;
-        try
-        {
-            try
-            {
-                sender = getConnection(serverUrl+".serverSender");
-                fromUrl = fromUrl + ".serverSender";
-                receiver = getConnection(serverUrl);
-                receiver2 = getConnection(serverUrl+".serverRec");
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)sender.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                msg1.setHeader("X-Mms-Delivery-Time", "1");
-                msg1.setHeader("X-Mms-Priority", "High");
-                sender.send(msg1);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(), false);
-            }
-
-            try
-            {
-                msg2 = receiveMsg(receiver);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg1, msg2, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg2)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl, false);
-            }
-
-            // now the receiver makes a forward
-            try
-            {
-                msg2.addAddress("to", clientUrl + ".serverRec");
-                assertTrue("Adding an address with a different app ID should have failed", false);
-            }
-            catch (IllegalArgumentException e)
-            {
-                // that's ok
-            }
-
-            try
-            {
-                msg2.removeAddresses();
-                msg2.setAddress(clientUrl + ".serverRec");
-                receiver.send(msg2);
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(), false);
-            }
-
-            fromUrl = clientUrl;
-            try
-            {
-                msg3 = receiveMsg(receiver2);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-            // Compare sent and received messages.
-            if (!messagesEqual(msg2, msg3, toUrl, fromUrl))
-            {
-                assertTrue("Sent and received messages differ, sent:\n"
-                           + msgToString(msg1) + "\nreceived:\n" + msgToString(msg3)
-                           + "\nexpected sent getAddress: " + toUrl
-                           + "\nexpected received getAddress: " + fromUrl, false);
-            }
-
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (sender != null)
-                {
-                    sender.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (receiver != null)
-                {
-                    receiver.close();
-                }
-            }
-            catch (Exception e) {}
-            try
-            {
-                // Close the server connection.
-                if (receiver2 != null)
-                {
-                    receiver2.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("", true);
-    }
-
-
-    /**
-     * Tests the value returned by getTimestamp() method:
-     * 1) For a sent MMS it should be null
-     * 2) For a received MMS it should be a valid value
-     **/
-    public void testTimestamp()
-    {
-        // Test preparations.
-        String addr = getMsisdnAddress(0, false);
-        String appId = "test.appid.timestamp";
-        String clientUrl = "mms://"+addr+":"+appId;
-        String serverUrl = "mms://:"+appId;
-        String toUrl = clientUrl;
-        String fromUrl = clientUrl; // for S60
-        String subject = "Sample message";
-        MultipartMessage msg1 = null, msg2 = null;
-        MessageConnection senderAndReceiver = null;
-        try
-        {
-            try
-            {
-                senderAndReceiver = getConnection(serverUrl);
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-
-            // Send a message without attachments.
-            try
-            {
-                msg1 = (MultipartMessage)senderAndReceiver.newMessage(
-                           MessageConnection.MULTIPART_MESSAGE);
-                msg1.setAddress(toUrl);
-                msg1.setSubject(subject);
-                if (msg1.getTimestamp() != null)
-                {
-                    assertTrue("For an unsent MMS the timestamp should be null",false);
-                }
-                senderAndReceiver.send(msg1);
-                if (msg1.getTimestamp() != null)
-                {
-                    assertTrue("For a sent MMS the timestamp should be null",false);
-                }
-            }
-            catch (Exception e)
-            {
-                assertTrue("Sending message failed with exception: "
-                           + e.toString(),false);
-            }
-
-            try
-            {
-                msg2 = receiveMsg(senderAndReceiver);
-                if (msg2.getTimestamp() == null)
-                {
-                    assertTrue("For a received MMS the timestamp can not be null",false);
-                }
-
-            }
-            catch (WmaException wmae)
-            {
-                assertTrue(wmae.toString(),false);
-            }
-        }
-        finally
-        {
-            // Cleanup.
-            try
-            {
-                // Close the client connection.
-                if (senderAndReceiver != null)
-                {
-                    senderAndReceiver.close();
-                }
-            }
-            catch (Exception e) {}
-        }
-
-        assertTrue("",true);
-    }
-
-    // BEGIN - Private helper methods for this test suite.
-
-    // END - Private helper methods for this test suite.
-}
--- a/javaextensions/wma/mms/tsrc/generictests/runTests.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-call ../../data/runTests.bat
--- a/javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaException.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-/**
- * WMA Exception. Can be used to deliver AgentResult from helper
- * methods to test cases.
- */
-package com.nokia.mj.test.wma;
-
-public class WmaException extends Exception
-{
-
-    /**
-     * Default constructor.
-     */
-    public WmaException()
-    {
-        super();
-    }
-
-    /**
-     * Constructor.
-     */
-    public WmaException(String s)
-    {
-        super(s);
-    }
-
-}
--- a/javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaTestBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,371 +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:
-*
-*/
-/**
- * Base class for WMA 2.0 (JSR-205) module test cases.
- */
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-
-import java.io.OutputStream;
-import javax.microedition.io.file.FileConnection;
-
-
-public class WmaTestBase extends TestCase
-{
-
-    /** Maximum content size for a MultipartMessage. */
-    public static final int MAX_CONTENT_SIZE = WmaTestUtils.MAX_CONTENT_SIZE;
-
-    private static final String[] MSISDN_ADDRESS =
-    {
-        "+5550000",
-        "+5550001",
-        "+5550002",
-        "+5550003",
-        "+5550004",
-        "+5550005",
-        "+5550006",
-        "+5550007",
-        "+5550008",
-        "+5550009",
-        "+5550010",
-        "+5550011"
-    };
-
-    private static final String[] EMAIL_ADDRESS=
-    {
-        "user@domain.com",
-        "user1@domain.com",
-        "user2@domain.com",
-        "user3@domain.com",
-        "user4@domain.com"
-    };
-
-    private static final int RECEIVE_TIMEOUT = 400;
-
-    private static final int WAIT_TIME = 60;
-    /** Test case name. */
-    protected String testCaseName = null;
-
-    /** Test case id. */
-    protected String testCaseId = null;
-
-    public WmaTestBase()
-    {
-    }
-
-    public WmaTestBase(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    public Test suite()
-    {
-        return null;
-        // This method needs to be overriden in each subclass
-        // which has the actual test cases.
-    }
-
-    /**
-     * Opens a connection to given URL.
-     */
-    protected MessageConnection getConnection(String url)
-    throws WmaException
-    {
-        return WmaTestUtils.getConnection(url);
-    }
-
-    /**
-     * Opens a connection to given URL and closes it.
-     */
-    protected MessageConnection getClosedConnection(String url)
-    throws WmaException
-    {
-        // Open connection.
-        MessageConnection conn = getConnection(url);
-        try
-        {
-            // Close connection.
-            conn.close();
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Connection closing failed (url \"" + url + "\"): " + e);
-        }
-        return conn;
-    }
-
-    /**
-     * Returns a string that is too large for MultipartMessage contents.
-     */
-    protected String getTooLargeContent()
-    {
-        return WmaTestUtils.getTooLargeContent();
-    }
-
-    /**
-     * Returns a multipart message that is too large to be sent.
-     */
-    protected MultipartMessage getTooLargeMessage(
-        MessageConnection conn, String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return WmaTestUtils.getTooLargeMessage(conn,subject);
-    }
-
-    /**
-     * Creates a dummy MultipartMessage.
-     */
-    protected MultipartMessage getDummyMultipartMessage(
-        MessageConnection conn, String address, String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return WmaTestUtils.getDummyMultipartMessage(conn, address, subject);
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    protected MessagePart getDummyMessagePart(int size, String contentId)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return WmaTestUtils.getDummyMessagePart(size, contentId, null, "iso-8859-1");
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    protected MessagePart getDummyMessagePart(
-        int size, String contentId, String contentLocation, String enc)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return WmaTestUtils.getDummyMessagePart(size, contentId, contentLocation, enc);
-    }
-
-    /**
-     * Checks if given messages have the same content.
-     */
-    protected boolean messagesEqual(
-        MultipartMessage sentMsg, MultipartMessage receivedMsg,
-        String from, String to)
-    {
-        return WmaTestUtils.messagesEqual(sentMsg, receivedMsg, from, to);
-    }
-
-    /**
-     * Returns information from the given message as a string.
-     */
-    protected String msgToString(MultipartMessage msg)
-    {
-        return msgToString(msg, true);
-    }
-
-    /**
-     * Returns information from the given message as a string.
-     */
-    protected String msgToString(MultipartMessage msg, boolean allHeaders)
-    {
-        return WmaTestUtils.msgToString(msg, allHeaders);
-    }
-
-    /**
-     * Returns requested addresses from the given message as a string.
-     */
-    protected String addressesToString(MultipartMessage msg, String addrType)
-    {
-        return WmaTestUtils.addressesToString(msg, addrType);
-    }
-
-    /**
-     * Returns information from the given MessagePart as a string.
-     */
-    protected String msgPartToString(MessagePart msgPart)
-    {
-        return WmaTestUtils.msgPartToString(msgPart);
-    }
-
-    /**
-     * Returns an InputStream for reading given string.
-     */
-    protected InputStream getInputStream(String str)
-    {
-        if (str == null)
-        {
-            return null;
-        }
-        return new ByteArrayInputStream(str.getBytes());
-    }
-
-    /**
-     * Returns addresses as a single string.
-     */
-    protected String getAddressString(String type, String addrs[])
-    {
-        return WmaTestUtils.getAddressString(type, addrs);
-    }
-
-    /**
-     * Returns a string of given size.
-     */
-    public String getContentString(int size)
-    {
-        return WmaTestUtils.getContentString(size);
-    }
-
-    /**
-     * Puts the thread into sleep for specified time (in seconds).
-     */
-    public void wait(int delay)
-    {
-        WmaTestUtils.wait(delay);
-    }
-
-    /**
-     * Returns application property with given name.
-     */
-    private String getAppMsisdnProp(int n) throws WmaException
-    {
-        String result = null;
-        try
-        {
-            //result = SpedeRunner.getInstance().getAppProperty(name);
-            result = MSISDN_ADDRESS[n];
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Could not get app property " + n
-                                   + ": " + e.toString());
-        }
-        return result;
-    }
-
-    /**
-     * Returns application property with given name as an int.
-     */
-    private String getAppEmailProp(int n) throws WmaException
-    {
-        return EMAIL_ADDRESS[n];
-    }
-
-
-    /**
-     * Returns nth email address to be used in module tests.
-     */
-    public String getEmailAddress(int n, boolean prefix)
-    {
-        String addr = null;
-        String propName = "Wma20-Email-Address-" + n;
-        try
-        {
-            addr = getAppEmailProp(n);
-        }
-        catch (Exception e)
-        {
-            wmaDebug("Exception while getting app property " + propName
-                     + ": " + e.toString());
-        }
-
-        if (addr == null)
-        {
-            addr = "user" + n + "@domain.com";
-            wmaDebug("Could not get email address " + n
-                     + ", using default " + addr);
-        }
-
-        if (prefix)
-        {
-            addr = "mms://" + addr;
-        }
-        return addr;
-    }
-
-    /**
-     * Returns nth msisdn address to be used in module tests.
-     */
-    public String getMsisdnAddress(int n, boolean prefix)
-    {
-        String addr = null;
-        String propName = "Wma20-Msisdn-Address-" + n;
-        try
-        {
-            addr = getAppMsisdnProp(n);
-        }
-        catch (Exception e)
-        {
-            wmaDebug("Exception while getting app property " + propName
-                     + ": " + e.toString());
-        }
-
-        if (addr == null)
-        {
-            addr = "+" + (5550000 + n);
-            wmaDebug("Could not get msisdn address " + n
-                     + ", using default " + addr);
-        }
-
-        if (prefix)
-        {
-            addr = "mms://" + addr;
-        }
-        return addr;
-    }
-
-    /**
-     * Returns receive timeout to be used in module tests.
-     */
-    public int getReceiveTimeout() throws WmaException
-    {
-        return RECEIVE_TIMEOUT;
-    }
-
-    /**
-     * Returns notification wait time to be used in module tests.
-     */
-    public int getNotificationWaitTime() throws WmaException
-    {
-        return WAIT_TIME;
-    }
-
-    // Helper for logging.
-    protected void wmaDebug(String msg)
-    {
-        WmaTestUtils.wmaDebug(msg, testCaseName);
-    }
-
-    /**
-     * Receives a single message from given connection in a separate thread.
-     */
-    public MultipartMessage receiveMsg(MessageConnection conn)
-    throws WmaException
-    {
-        return WmaTestUtils.receiveMsg(conn, getReceiveTimeout() * 1000);
-    }
-}
--- a/javaextensions/wma/mms/tsrc/moduletestframework/javasrc/com/nokia/mj/test/wma/WmaTestUtils.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +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:
-*
-*/
-/**
- * Base class for WMA 2.0 (JSR-205) module test cases.
- */
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-
-import java.io.OutputStream;
-import javax.microedition.io.file.FileConnection;
-
-import com.nokia.mj.impl.utils.Base64;
-public class WmaTestUtils
-{
-    /** Maximum content size for a MultipartMessage. */
-    public static final int MAX_CONTENT_SIZE = 1001 * 1024;
-    public static Object lock = new Object();
-
-    /**
-     * Opens a connection to given URL.
-     */
-    public static MessageConnection getConnection(String url)
-    throws WmaException
-    {
-        MessageConnection conn = null;
-        try
-        {
-            // Open connection.
-            conn = (MessageConnection)Connector.open(url, Connector.WRITE);
-            if (conn == null)
-            {
-                throw new WmaException("Connection opening to url \"" + url + "\" failed");
-            }
-        }
-        catch (WmaException wmae)
-        {
-            throw wmae;
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Connection opening to url \"" + url + "\" failed: " + e);
-        }
-        return conn;
-    }
-
-    /**
-     * Returns a string that is too large for MultipartMessage contents.
-     */
-    public static String getTooLargeContent()
-    {
-        return getContentString(MAX_CONTENT_SIZE + 1);
-    }
-
-    /**
-     * Returns a multipart message that is too large to be sent.
-     */
-    public static MultipartMessage getTooLargeMessage(
-        MessageConnection conn, String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        MultipartMessage msg = (MultipartMessage)conn.newMessage(
-                                   MessageConnection.MULTIPART_MESSAGE);
-        if (subject != null)
-        {
-            msg.setSubject(subject);
-        }
-        int oneContentSize = 1024;
-        for (int i = 0; (i*oneContentSize) < (MAX_CONTENT_SIZE + 1); i++)
-        {
-            msg.addMessagePart(getDummyMessagePart(
-                                   oneContentSize, Integer.toString(i)));
-        }
-        return msg;
-    }
-
-    /**
-     * Creates a dummy MultipartMessage.
-     */
-    public static MultipartMessage getDummyMultipartMessage(
-        MessageConnection conn, String address, String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        MultipartMessage msg = (MultipartMessage)conn.newMessage(
-                                   MessageConnection.MULTIPART_MESSAGE);
-        if (address != null)
-        {
-            msg.setAddress(address);
-        }
-        if (subject != null)
-        {
-            msg.setSubject(subject);
-        }
-        msg.setHeader("X-Mms-Priority", "normal");
-        msg.addMessagePart(getDummyMessagePart(1024, "1"));
-        return msg;
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    public static MessagePart getDummyMessagePart(
-        int size, String contentId, String contentLocation, String enc)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        MessagePart mp = null;
-        if (enc == null)
-        {
-            mp = new MessagePart(
-                getContentString(size).getBytes(),
-                "image/jpeg", contentId, contentLocation, enc);
-        }
-        else
-        {
-            mp = new MessagePart(
-                getContentString(size).getBytes(enc),
-                "text/plain", contentId, contentLocation, enc);
-        }
-        return mp;
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    public static MessagePart getDummyMessagePart(int size, String contentId)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return getDummyMessagePart(size, contentId, null, "iso-8859-1");
-    }
-
-    /**
-     * Checks if given messages have the same content.
-     */
-    public static boolean messagesEqual(
-        MultipartMessage sentMsg, MultipartMessage receivedMsg,
-        String from, String to)
-    {
-        if (sentMsg == null || receivedMsg == null)
-        {
-            return false;
-        }
-
-        String msgStr1 = msgToString(sentMsg, false).toLowerCase();
-        String msgStr2 = msgToString(receivedMsg, false).toLowerCase();
-        if (!msgStr1.equals(msgStr2))
-        {
-            wmaDebug("messages not equal:\n" + msgStr1 + "\n" + msgStr2);
-            return false;
-        }
-
-        // Check that sent message has correct address.
-        if (!sentMsg.getAddress().equals(from))
-        {
-            wmaDebug("sent messages has incorrect address: "
-                     + sentMsg.getAddress() + ", expected: " + from);
-            return false;
-        }
-
-        // Check that received message has correct address.
-        if ((to == null && receivedMsg.getAddress() != null) ||
-                (receivedMsg.getAddress() != null
-                 && !receivedMsg.getAddress().equals(to)))
-        {
-            wmaDebug("received message has incorrect address: "
-                     + receivedMsg.getAddress() + ", expected: " + to);
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns information from the given message as a string.
-     */
-    public static String msgToString(MultipartMessage msg, boolean allHeaders)
-    {
-        if (msg == null)
-        {
-            return null;
-        }
-
-        StringBuffer result = new StringBuffer();
-        if (allHeaders)
-        {
-            result.append("getAddress: ").append(msg.getAddress()).append("\n");
-            result.append(addressesToString(msg, "from"));
-            result.append(addressesToString(msg, "to"));
-        }
-        result.append(addressesToString(msg, "cc"));
-        result.append(addressesToString(msg, "bcc"));
-        if (msg.getSubject() != null)
-        {
-            result.append("subject: ").append(msg.getSubject()).append("\n");
-        }
-        if (msg.getStartContentId() != null)
-        {
-            result.append("startContentId: ")
-            .append(msg.getStartContentId()).append("\n");
-        }
-        if (allHeaders)
-        {
-            if (msg.getHeader("X-Mms-Delivery-Time") != null)
-            {
-                result.append("X-Mms-Delivery-Time: ")
-                .append(msg.getHeader("X-Mms-Delivery-Time")).append("\n");
-            }
-        }
-        if (msg.getHeader("X-Mms-Priority") != null)
-        {
-            result.append("X-Mms-Priority: ")
-            .append(msg.getHeader("X-Mms-Priority")).append("\n");
-        }
-        MessagePart msgParts[] = msg.getMessageParts();
-        if (msgParts != null && msgParts.length > 0)
-        {
-            result.append("MessageParts: ").append(msgParts.length).append("\n");
-            for (int i = 0; i < msgParts.length; i++)
-            {
-                result.append("MessagePart["+i+"]:\n")
-                .append(msgPartToString(msgParts[i]));
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Returns requested addresses from the given message as a string.
-     */
-    public static String addressesToString(MultipartMessage msg, String addrType)
-    {
-        StringBuffer result = new StringBuffer();
-        String addrs[] = msg.getAddresses(addrType);
-        if (addrs != null)
-        {
-            for (int i = 0; i < addrs.length; i++)
-            {
-                result.append(addrType).append(": ")
-                .append(addrs[i]).append("\n");
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Returns information from the given MessagePart as a string.
-     */
-    public static String msgPartToString(MessagePart msgPart)
-    {
-        if (msgPart == null)
-        {
-            return null;
-        }
-
-        StringBuffer result = new StringBuffer();
-        result.append("contentId: ").append(msgPart.getContentID()).append("\n");
-        result.append("contentLocation: ").append(msgPart.getContentLocation()).append("\n");
-        result.append("encoding: ").append(msgPart.getEncoding()).append("\n");
-        result.append("mimeType: ").append(msgPart.getMIMEType()).append("\n");
-        result.append("length: ").append(msgPart.getLength()).append("\n");
-        if (msgPart.getContent() != null)
-        {
-            result.append("base64 encoded content: ").append(
-                Base64.encode(msgPart.getContent())).append("\n");
-        }
-        return result.toString();
-    }
-
-    /**
-     * Returns addresses as a single string.
-     */
-    public static String getAddressString(String type, String addrs[])
-    {
-        String result = type + ":";
-        if (addrs != null)
-        {
-            for (int i = 0; i < addrs.length; i++)
-            {
-                if (i > 0)
-                {
-                    result += ",";
-                }
-                result += " " + addrs[i];
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Returns a string of given size.
-     */
-    public static String getContentString(int size)
-    {
-        StringBuffer contents = new StringBuffer(size);
-        for (int i = 0; i < size; i++)
-        {
-            contents.append(i%10);
-        }
-        return contents.toString();
-    }
-
-    /**
-     * Returns application property with given name as an int.
-     */
-    public static int getAppPropInt(String value) throws WmaException
-    {
-        int result = 0;
-        try
-        {
-            result = Integer.parseInt(value);
-        }
-        catch (Exception e)
-        {
-            throw new WmaException("Could not parse int from " + value +
-                                   ": " + e.toString());
-        }
-        return result;
-    }
-
-    public static void wmaDebug(String msg)
-    {
-        wmaDebug(msg, null);
-    }
-    public static void wmaDebug(String msg, String testCaseName)
-    {
-        OutputStream out = null;
-        if (out == null)
-        {
-            try
-            {
-                String path = System.getProperty("fileconn.dir.private");
-                FileConnection filecon =
-                    (FileConnection)Connector.open(path + "wma20mt.txt");
-                // Create the file if it doesn't exist.
-                if (!filecon.exists())
-                {
-                    filecon.create();
-                }
-                out = filecon.openOutputStream();
-            }
-            catch (Exception e)
-            {
-            }
-        }
-        if (out != null)
-        {
-            try
-            {
-                String outMsg = (new java.util.Date()) + (testCaseName != null ? (" [" + testCaseName + "] "):"") + msg + "\n";
-                out.write(outMsg.getBytes());
-                out.flush();
-            }
-            catch (Exception e)
-            {
-            }
-        }
-    }
-
-
-    /**
-     * Puts the thread into sleep for specified time (in seconds).
-     */
-    public static void wait(int delay)
-    {
-        try
-        {
-            Thread.sleep(delay * 1000);
-        }
-        catch (Exception ex)
-        {
-            wmaDebug("Exception while waiting: " + ex.toString());
-        }
-    }
-
-    /**
-     * Receives a single message from given connection in a separate thread.
-     */
-    public static MultipartMessage receiveMsg(MessageConnection conn, int timeout)
-    throws WmaException
-    {
-        MessageReceiver receiver = new MessageReceiver(lock, conn);
-        receiver.start();
-        synchronized (lock)
-        {
-            try
-            {
-                // Bogdan: if notifications are done using "notify"
-                // method, then the "Object.wait" method should be
-                // used insted.
-                // Thread.sleep() will not be notified by "notify",
-                // it can only be interrupted, but not
-                // notified.
-                lock.wait((long)(timeout));
-            }
-            catch (InterruptedException e)
-            {
-            }
-        }
-        if (receiver.getError() != null)
-        {
-            throw new WmaException(receiver.getError()
-                                   + (receiver.getTrace() != null?
-                                      ", " + receiver.getTrace(): ""));
-        }
-        MultipartMessage msg = receiver.getMsg();
-        if (msg == null)
-        {
-            throw new WmaException("Message was not received"
-                                   + (receiver.getTrace() != null?
-                                      ", " + receiver.getTrace(): ""));
-        }
-        return msg;
-    }
-
-    /**
-     * Thread for receiving a message from given connection.
-     */
-    static class MessageReceiver extends Thread
-    {
-        private Object owner = null;
-        private MessageConnection connection = null;
-        private MultipartMessage msg = null;
-        private String error = null;
-        private String trace = null;
-
-        public MessageReceiver(Object anOwner, MessageConnection aConnection)
-        {
-            owner = anOwner;
-            connection = aConnection;
-        }
-
-        public void run()
-        {
-            if (connection == null)
-            {
-                error = "Receiving message failed: connection is null";
-            }
-            else
-            {
-                try
-                {
-                    trace = "Started to call receive...";
-                    long start = System.currentTimeMillis();
-                    msg = (MultipartMessage)connection.receive();
-                    trace += " receive returned after " + ((System.currentTimeMillis()-start)/1000) + " seconds";
-                }
-                catch (Exception e)
-                {
-                    error = "Receiving message failed with exception: "
-                            + e.toString();
-                }
-            }
-            if (owner != null)
-            {
-                synchronized (owner)
-                {
-                    owner.notify();
-                }
-            }
-        }
-
-        public MultipartMessage getMsg()
-        {
-            return msg;
-        }
-
-        public String getError()
-        {
-            return error;
-        }
-
-        public String getTrace()
-        {
-            return trace;
-        }
-    }
-}
--- a/javaextensions/wma/mms/tsrc/multithreadingtests/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-Created-By: 1.3.1_14 (Sun Microsystems Inc.)
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-MIDlet-1: JsrTestRunner,,JsrTestRunner.JsrTestRunner
-MIDlet-Name: JsrTestRunner
-MIDlet-Jar-Size: 7277
-MIDlet-Jar-URL: JsrTestRunner.jar
-TestClassName1: com.nokia.mj.test.wma.multithreadingtests.TestShareConnection
-ModuleName: WMA20_Multithreading
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
--- a/javaextensions/wma/mms/tsrc/multithreadingtests/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="generictests" default="deploy.ut" basedir=".">
-  
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property name="src.dir" location="./javasrc;../moduletestframework/javasrc"/>
-  <property name="build.dir" location="."/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="jar_dir" value="${classes.dir}"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="mmsmultithreadtests.jar.filename" value="OmjMMSMultithreadTests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-  <target name="init.my.properties" depends="init.properties">
-    <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${mmsmultithreadtests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    <ant antfile="${java.src.root}/tools/junit/JsrTestRunner/build/build.xml">
-  
-    </ant>
-  </target>
-
-
-  <target name="deploy.ut" depends="compile.ut,init.my.properties">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${mmsmultithreadtests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean"/>
-
- </project> 
--- a/javaextensions/wma/mms/tsrc/multithreadingtests/javasrc/com/nokia/mj/test/wma/TestShareConnection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,404 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-import javax.microedition.lcdui.*;
-import javax.microedition.midlet.MIDlet;
-//import com.nokia.impl.uitestutils.*;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MultipartMessage;
-
-
-/**
- * <b>TEST CASE SPECIFICATION</b>
- *
- * <br><br><b>These set of module tests focus on the multithreading
- * testing of WMA2.0 implementation.
- * The following scenarios are covered:
- * 1) A couple of threads sending over a connection and during the
- *    sending another thread will close the connection
- * 2) Many threads sending messages over a couple of connections
- * 3) Many threads sending messages over a set of connections and
- *    another set of threads receiving messages over the same
- *    set of connections
- * 4) Many threads receiving messages over a set of connections and
- *    another set of threads sending messages from a different set of
- *    connections
- *</b>
- * <p>
- *
- * <br><br><b>Used stubs and description:</b>
- * <p>
- *
- * <br><br><b>Setting up the environment:</b>
- * Each of the module tests MUST begin with setting up the some of the constants
- * (CONNECTIONS, CON_REP_FACTOR, RECEIVERS, CLOSERS, MESSAGES, MSG_REP_FACTOR)
- * in order to achieve the desired scenario to be tested. Also the modulte tests
- * MUST beging with calling the init() method in order to initialize the notifier
- *
- * <br><br><b>Included test files:</b>
- * <p>
- *
- * <br><br><b>Note whether the test case belongs to the MRT set:</b> No
- * <p>
- *
- * @created    2006-03-23
- *
- */
-public class TestShareConnection extends WmaMultiThreadingTestBase
-{
-    public TestShareConnection()
-    {
-    }
-
-    public TestShareConnection(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /***************************************
-     * Creates the test suite. You need to add a new aSuite.addTest antry for any new test methods, otherwise they won't be run.
-     */
-    public Test suite()
-    {
-        TestSuite aSuite = new TestSuite();
-
-        aSuite.addTest(new TestShareConnection("testSendAndClose", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestShareConnection) tc).testSendAndClose();
-            }
-        }));
-
-        aSuite.addTest(new TestShareConnection("testMultipleSend", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestShareConnection) tc).testMultipleSend();
-            }
-        }));
-
-        aSuite.addTest(new TestShareConnection("testMultipleSendAndReceive", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestShareConnection) tc).testMultipleSendAndReceive();
-            }
-        }));
-
-        aSuite.addTest(new TestShareConnection("testMultipleSendAndReceiveSeparateSenders", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestShareConnection) tc).testMultipleSendAndReceiveSeparateSenders();
-            }
-        }));
-
-        aSuite.addTest(new TestShareConnection("testMultipleSendAndReceiveAndClose", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((TestShareConnection) tc).testMultipleSendAndReceiveAndClose();
-            }
-        }));
-
-        return aSuite;
-
-    }
-
-    /**
-     ** A couple of threads sharing a connection: some of them sending messages
-     ** and one thread closing the connection at some point
-     **/
-    public void testSendAndClose()
-    {
-        CONNECTIONS = 1;
-        MESSAGES = 5;
-        CLOSERS = 1;
-        init();
-
-        String address = "mms://+123456";
-        String appID = ":sendAndClose";
-        String subject = "Moi!";
-
-        try
-        {
-            try
-            {
-                conns = getConnections(address + appID);
-                msgs = getDummyMultipartMessages(conns, address, subject);
-            }
-            catch (Exception e)
-            {
-                assertTrue(e.toString(),false);
-            }
-
-            // start a couple of senders
-            multipleSend(conns, msgs);
-
-            // give some time to senders
-            try
-            {
-                Thread.sleep(500);
-            }
-            catch (Exception e) {};
-
-            // start a closer
-            closeConnections(conns);
-
-            // wait for results from all the threads
-            String err = waitForResults();
-            if (err != null)
-            {
-                assertTrue(err, false);
-            }
-
-        }
-        finally
-        {
-            cleanup();
-        }
-        assertTrue("",true);
-    }
-
-    /**
-    ** Many threads sharing a set of connections for sending messages
-    **/
-    public void testMultipleSend()
-    {
-        CONNECTIONS = 3;
-        MESSAGES = 10;
-        MSG_REP_FACTOR = 2;
-        init();
-
-        String address = "mms://+123456";
-        String appID = ":MSend";
-        String subject = "Moi!";
-
-        try
-        {
-            try
-            {
-                // get connections
-                conns = getConnections(address + appID);
-                msgs = getDummyMultipartMessages(conns, address, subject);
-            }
-            catch (Exception e)
-            {
-                assertTrue(e.toString(),false);
-            }
-
-            // start a couple of senders
-            multipleSend(conns, msgs);
-
-            // wait for results from all the threads
-            String err = waitForResults();
-            if (err != null)
-            {
-                assertTrue(err, false);
-            }
-        }
-        finally
-        {
-            cleanup();
-        }
-        assertTrue("",true);
-    }
-
-    /**
-    ** Many threads sending messages over a set of connections and
-    ** another set of threads receiving messages over the same
-    ** set of connections
-    **/
-    public void testMultipleSendAndReceive()
-    {
-        CONNECTIONS = 3;
-        MESSAGES = 15;
-        RECEIVERS = 3;
-        MSG_REP_FACTOR = 1;
-
-        String address = "mms://";
-        String appID = ":MSendAndRec";
-        String subject = "Moi!";
-        init();
-
-        try
-        {
-            try
-            {
-                // get receive connections
-                conns = getConnections(address + appID);
-                msgs = getDummyMultipartMessages(conns, address + "+12345678" + appID, subject);
-            }
-            catch (Exception e)
-            {
-                assertTrue(e.toString(),false);
-            }
-
-            // start the receivers
-            multipleReceive(conns);
-
-            // start a couple of senders
-            multipleSend(conns, msgs);
-
-            // wait for results from all the threads
-            String err = waitForResults();
-            if (err != null)
-            {
-                assertTrue(err, false);
-            }
-
-            // validate the received messages
-            if (!validMessages())
-            {
-                assertTrue("mixed up messages", false);
-            }
-        }
-        finally
-        {
-            cleanup();
-        }
-        assertTrue("",true);
-    }
-
-    /** Many threads receiving messages over a set of connections and
-     ** another set of threads sending messages from a different set of
-     ** connections
-     **/
-    public void testMultipleSendAndReceiveSeparateSenders()
-    {
-        MESSAGES = 15;
-        RECEIVERS = 3;
-        MSG_REP_FACTOR = 1;
-
-        // different senders
-        String address = "mms://";
-        String appID = ":MSendAndRecSS";
-        String subject = "Moi!";
-        init();
-
-        MessageConnection[] sendConnections = null;
-        try
-        {
-            try
-            {
-                // get send connections
-                CONNECTIONS = 5;
-                sendConnections = getConnections(address + "12345678");
-
-                // get receive connections
-                CONNECTIONS = 3;
-                conns = getConnections(address + appID);
-                msgs = getDummyMultipartMessages(sendConnections, address + "+12345678" + appID, subject);
-            }
-            catch (Exception e)
-            {
-                assertTrue(e.toString(),false);
-            }
-
-            // start the receivers
-            multipleReceive(conns);
-
-            // start a couple of senders
-            multipleSend(sendConnections, msgs);
-
-            // wait for results from all the threads
-            String err = waitForResults();
-            if (err != null)
-            {
-                assertTrue(err, false);
-            }
-
-            // validate the received messages
-            if (!validMessages())
-            {
-                assertTrue("mixed up messages", false);
-            }
-        }
-        finally
-        {
-            cleanup();
-        }
-        assertTrue("",true);
-    }
-
-    /**
-    ** Many threads sending messages over a set of connections and
-    ** another set of threads receiving messages over the same
-    ** set of connections
-    **/
-    public void testMultipleSendAndReceiveAndClose()
-    {
-        CONNECTIONS = 3;
-        MESSAGES = 15;
-        RECEIVERS = 3;
-        MSG_REP_FACTOR = 1;
-        CLOSERS = 3;
-
-        String address = "mms://";
-        String appID = ":MSendAndRecC";
-        String subject = "Moi!";
-        init();
-
-        try
-        {
-            try
-            {
-                // get receive connections
-                conns = getConnections(address + appID);
-                msgs = getDummyMultipartMessages(conns, address + "+12345678" + appID, subject);
-            }
-            catch (Exception e)
-            {
-                assertTrue(e.toString(),false);
-            }
-
-            // start the receivers
-            multipleReceive(conns);
-
-            // start a couple of senders
-            multipleSend(conns, msgs);
-
-            // give some time to senders
-            try
-            {
-                Thread.sleep(60*1000);
-            }
-            catch (Exception e) {};
-
-            // start a closer
-            closeConnections(conns);
-
-            // wait for results from all the threads
-            String err = waitForResults();
-            if (err != null)
-            {
-                assertTrue(err, false);
-            }
-        }
-        finally
-        {
-            cleanup();
-        }
-        assertTrue("",true);
-    }
-
-}
-
-
--- a/javaextensions/wma/mms/tsrc/multithreadingtests/javasrc/com/nokia/mj/test/wma/WmaMultiThreadingTestBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import j2meunit.framework.*;
-import javax.microedition.midlet.MIDlet;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Vector;
-
-import javax.microedition.io.Connector;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-
-import java.io.OutputStream;
-import java.io.IOException;
-import javax.microedition.io.file.FileConnection;
-
-/**
- * Base class for WMA 2.0 (JSR-205) multithreading module test cases.
- * It provides methods for launching multiple threads/workers
- * performing different tasks (send MMS, receive MMS, close connection)
- *
- * Different multithreading scenarios can be achieved by setting different
- * values for the constants:
- *        CONNECTIONS = number of connections to be used
- *        CON_REP_FACTOR = connections repetitions factor
- *        RECEIVERS = number of receivers
- *        CLOSERS = number of closer threads (workers which do nothing
- *                            but closing a certain connection)
- *        MESSAGES = number of messages
- *        MSG_REP_FACTOR = messages repetitions factor
- */
-public class WmaMultiThreadingTestBase extends WmaTestBase
-{
-    // task definitions. Workers are created with one of the following
-    // tasks
-    protected static final int TASK_UNDEFINED = 0;
-    protected static final int TASK_CLOSE_CONNECTION = 1;
-    protected static final int TASK_SEND_MESSAGE = 2;
-    protected static final int TASK_RECEIVE_MESSAGE = 3;
-
-    // a notifier used to wait for all the worker threads and report
-    // the status to the caller. The multithreading tests must start
-    // with calling the init() method, which initializes the notifier
-    protected Notifier notifier = null;
-
-    // constants which could be changed by the different test cases in
-    // in order to achieve different multithreading scenarios
-    protected    int CONNECTIONS = 0;
-    protected    int CON_REP_FACTOR = Integer.MAX_VALUE;
-    protected    int RECEIVERS = 0;
-    protected int CLOSERS = 0;
-    protected    int MESSAGES = 0;
-    protected    int MSG_REP_FACTOR = Integer.MAX_VALUE;
-
-    // the connections used by the workers for different tasks
-    protected MessageConnection[] conns = null;
-
-    // the messages to be sent
-    protected MultipartMessage[] msgs = null;
-
-    // the received messages. The receiving workers will update this
-    // vector with all the received messages. After all the worker threads
-    // have finished their tasks, this vector can be used to validate that
-    // all the sent messages and the received ones are identical
-    protected Vector receivedMessages = null;
-
-    // the messages which were actually sent
-    protected Vector sentMessages = null;
-
-    // the error code which is maintained by the workers.
-    protected String err;
-
-    /**
-    ** Constructor
-    **/
-    public WmaMultiThreadingTestBase()
-    {
-    }
-
-    /**
-    ** Constructor
-    **/
-    public WmaMultiThreadingTestBase(String sTestName, TestMethod rTestMethod)
-    {
-        super(sTestName, rTestMethod);
-    }
-
-    /**
-    * Opens a set of connections to given URLs whose base is provided as parameter.
-    * CON_REP_FACTOR dictates if all the connections are to be different or not.
-    * @param URL The base URL for the connections to be created. The connections will
-    * use this URL plus an integer which makes them unique
-    */
-    protected MessageConnection[] getConnections(String URL)
-    throws WmaException
-    {
-        conns = new MessageConnection[CONNECTIONS];
-        for (int i=0; i<CONNECTIONS; i++)
-        {
-            conns[i] = getConnection(URL + (i-(i/CON_REP_FACTOR)*CON_REP_FACTOR));
-        }
-        return conns;
-    }
-
-    /**
-    * Creates a set of dummy messages.
-    * @param conns The set of connections over which the messages are constructed
-    * @param address The base destination address of the message
-    * @param subject The base subject of the message
-    */
-    protected MultipartMessage[] getDummyMultipartMessages(
-        MessageConnection[] conns,
-        String address,
-        String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        msgs = new MultipartMessage[MESSAGES];
-        int addrRepFactor = 1;
-        if (RECEIVERS != 0)
-        {
-            addrRepFactor = RECEIVERS;
-        }
-        for (int i= 0; i<MESSAGES; i++)
-        {
-            msgs[i] = getDummyMultipartMessage(
-                          conns[(i-(i/conns.length)*conns.length)],
-                          address  + (i-(i/addrRepFactor)*addrRepFactor),
-                          subject+(i-(i/MSG_REP_FACTOR)*MSG_REP_FACTOR));
-            msgs[i].addAddress("cc", address  + (i-(i/addrRepFactor)*addrRepFactor));
-            msgs[i].addAddress("bcc", address  + (i-(i/addrRepFactor)*addrRepFactor));
-            String prio;
-            String cEncoding;
-            switch ((i-(i/3)*3))
-            {
-            case 0:
-                prio = "high";
-                cEncoding = "utf-8";
-                break;
-            case 1:
-                prio = "low";
-                cEncoding = "iso-8859-2";
-                break;
-            default:
-                prio = "normal";
-                cEncoding = "iso-8859-1";
-                break;
-            }
-            msgs[i].setHeader("X-Mms-Priority", prio);
-            MessagePart part = getDummyMessagePart(
-                                   100 + (i-(i/MSG_REP_FACTOR)*MSG_REP_FACTOR),
-                                   "contentID" + (i-(i/MSG_REP_FACTOR)*MSG_REP_FACTOR),
-                                   "cLocation" + (i-(i/MSG_REP_FACTOR)*MSG_REP_FACTOR),
-                                   cEncoding);
-            msgs[i].addMessagePart(part);
-        }
-
-        return msgs;
-    }
-
-    /**
-    ** Closes all the connections. This method should be called at the end of
-    ** each multithreading module test
-    **/
-    protected void cleanup()
-    {
-        for (int i=0; i<CONNECTIONS; i++)
-        {
-            try
-            {
-                // Close the client connection.
-                if (conns[i] != null)
-                {
-                    conns[i].close();
-                }
-            }
-            catch (Exception e) {}
-        }
-    }
-
-    /**
-    ** The init method which must be called in the beginning of each multithreading
-    ** module test. This method initializes the notifier.
-    **/
-    protected void init()
-    {
-        err = null;
-        receivedMessages = new Vector();
-        sentMessages = new Vector();
-        if ((MESSAGES + CLOSERS + RECEIVERS) == 0)
-        {
-            return;
-        }
-        notifier = new Notifier(this, MESSAGES + CLOSERS + RECEIVERS);
-        notifier.start();
-    }
-
-    /**
-    ** This method starts as many senders as many messages are available
-    **/
-    protected void multipleSend(MessageConnection[] conns, MultipartMessage[] msgs)
-    {
-        Worker[] workers = new Worker[MESSAGES];
-        for (int i=0; i<workers.length; i++)
-        {
-            workers[i] = new Worker(
-                conns[(i-(i/conns.length)*conns.length)],
-                msgs[(i-(i/msgs.length)*msgs.length)],
-                TASK_SEND_MESSAGE);
-        }
-        for (int i=0; i<workers.length; i++)
-        {
-            workers[i].start();
-        }
-    }
-
-    /**
-    ** Variant method used for starting a set of sender workers
-    **/
-    protected void multipleSend(MessageConnection conn, MultipartMessage msg)
-    {
-        MessageConnection[] conns = new MessageConnection[1];
-        conns[0] = conn;
-        MultipartMessage[] msgs = new MultipartMessage[1];
-        msgs[0] = msg;
-        multipleSend(conns, msgs);
-    }
-
-    /**
-    ** Variant method used for starting a set of sender workers
-    **/
-    protected void multipleSend(MessageConnection conn, MultipartMessage[] msgs)
-    {
-        MessageConnection[] conns = new MessageConnection[1];
-        conns[0] = conn;
-        multipleSend(conns, msgs);
-    }
-    /**
-    ** This method starts a set of receivers
-    **/
-    protected void multipleReceive(MessageConnection[] conns)
-    {
-        Worker[] workers = new Worker[RECEIVERS];
-        for (int i=0; i<workers.length; i++)
-        {
-            workers[i] = new Worker(
-                conns[(i-(i/conns.length)*conns.length)],
-                TASK_RECEIVE_MESSAGE,
-                (RECEIVERS == 0 ? 1 : (MESSAGES/RECEIVERS)));
-        }
-        for (int i=0; i<workers.length; i++)
-        {
-            workers[i].start();
-        }
-    }
-
-    /**
-    ** Method used by closer threads
-    **/
-    protected void closeConnections(MessageConnection[] conns)
-    {
-        int workersCount = CLOSERS*conns.length;
-        Worker[] workers = new Worker[workersCount];
-        for (int i=0; i<conns.length; i++)
-        {
-            for (int j=0; j<CLOSERS; j++)
-            {
-                workers[j+i*CLOSERS] = new Worker(conns[i], TASK_CLOSE_CONNECTION);
-            }
-        }
-        for (int i=0; i<workersCount; i++)
-        {
-            workers[i].start();
-        }
-    }
-
-    /**
-    ** The caller usesd this mehod to wait for all the workers
-    **/
-    protected String waitForResults()
-    {
-        // wait for all the threads to finish and collect the
-        // errors (if any)
-        synchronized (this)
-        {
-            try
-            {
-                wait();
-            }
-            catch (InterruptedException e) {};
-        }
-        return err;
-    }
-
-    /**
-    ** This method checkes that the messages which were sent and the received ones are
-    ** identical
-    **/
-    protected boolean validMessages()
-    {
-        if (sentMessages.size() != receivedMessages.size())
-        {
-            return false;
-        }
-        for (int i=0; i<receivedMessages.size(); i++)
-        {
-            boolean found = false;
-            int j;
-            String msgStr1 = msgToString((MultipartMessage) receivedMessages.elementAt(i), false).toLowerCase();
-            for (j=0; j<sentMessages.size(); j++)
-            {
-                String msgStr2 = msgToString((MultipartMessage)sentMessages.elementAt(j), false).toLowerCase();
-                if (msgStr1.equals(msgStr2))
-                {
-                    found = true;
-                    break;
-                }
-            }
-            if (found)
-            {
-                sentMessages.removeElementAt(j);
-            }
-            else
-            {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-    ** The worker thread. It currently supports sending and receiving
-    ** of MMSs and closing a connection
-    **/
-    class Worker extends Thread
-    {
-        private MessageConnection conn = null;
-        private MultipartMessage msg = null;
-        private String error = null;
-        private String trace = null;
-        private int task = TASK_UNDEFINED;
-        private int taskRepetitions = 1;
-
-        public Worker()
-        {
-            conn = null;
-            msg = null;
-            task = TASK_UNDEFINED;
-            taskRepetitions = 0;
-        }
-
-        public Worker(MessageConnection aConnection, int aTask, int aTaskRepetitions)
-        {
-            conn = aConnection;
-            msg = null;
-            task = aTask;
-            taskRepetitions = aTaskRepetitions;
-        }
-
-        public Worker(MessageConnection aConnection, int aTask)
-        {
-            conn = aConnection;
-            msg = null;
-            task = aTask;
-            taskRepetitions = 1;
-        }
-
-        public Worker(MessageConnection aConnection, MultipartMessage aMsg, int aTask)
-        {
-            conn = aConnection;
-            msg = aMsg;
-            task = aTask;
-            taskRepetitions = 1;
-        }
-
-        public void run()
-        {
-            for (int i=0; i<taskRepetitions; i++)
-            {
-                if (error != null)
-                {
-                    break;
-                }
-                if (task == TASK_UNDEFINED)
-                {
-                    error = "Sending message failed: connection is null";
-                    return;
-                }
-                if (conn == null)
-                {
-                    error = "Sending message failed: connection is null";
-                }
-                else
-                {
-                    switch (task)
-                    {
-                    case TASK_SEND_MESSAGE:
-                        send();
-                        break;
-                    case TASK_RECEIVE_MESSAGE:
-                        receive();
-                        break;
-                    case TASK_CLOSE_CONNECTION:
-                        close();
-                        break;
-                    }
-                }
-            }
-            if (notifier != null)
-            {
-                notifier.nNotify();
-            }
-        }
-
-        private void send()
-        {
-            try
-            {
-                sentMessages.addElement(msg);
-                conn.send(msg);
-            }
-            catch (IOException ioe)
-            {
-                // some messages might time out, that's ok sometimes
-                ioe.printStackTrace();
-            }
-            catch (Exception e)
-            {
-                error = "[Worker]: Sending message failed with exception: "
-                        + e.toString();
-                e.printStackTrace();
-            }
-        }
-
-        private void receive()
-        {
-            try
-            {
-                msg = (MultipartMessage)conn.receive();
-                if (msg != null)
-                {
-                    receivedMessages.addElement(msg);
-                }
-            }
-            catch (IOException ioe)
-            {
-                // some messages might time out, that's ok sometimes
-                ioe.printStackTrace();
-            }
-            catch (Exception e)
-            {
-                e.printStackTrace();
-                error = "[Worker]: Receiving message failed with exception: "
-                        + e.toString();
-            }
-        }
-
-        private void close()
-        {
-            try
-            {
-                conn.close();
-            }
-            catch (Exception e)
-            {
-                error = "[Worker]: Closing failed with exception: "
-                        + e.toString();
-            }
-        }
-
-        public String getError()
-        {
-            return error;
-        }
-    }
-
-    /**
-    ** Notifier thread used to report to the caller when all the workers
-    ** have finished their tasks
-    **/
-    class Notifier extends Thread
-    {
-        public int notificationsDone = 0;
-        private Object owner = null;
-        private int notificationsToMake = 0;
-
-        public Notifier(Object anOwner, int aNotificationsToMake)
-        {
-            owner = anOwner;
-            notificationsToMake = aNotificationsToMake;
-        }
-
-        public void run()
-        {
-            synchronized (this)
-            {
-                int i = notificationsToMake;
-                while (i>0)
-                {
-                    nWait();
-                    i = i - notificationsDone;
-                }
-            }
-            if (owner != null)
-            {
-                synchronized (owner)
-                {
-                    owner.notify();
-                }
-            }
-        }
-
-        private synchronized void nWait()
-        {
-            notificationsDone = 0;
-            try
-            {
-                wait();
-            }
-            catch (InterruptedException ie) {}
-        }
-
-        public synchronized void nNotify()
-        {
-            notificationsDone++;
-            notify();
-        }
-    }
-}
--- a/javaextensions/wma/mms/tsrc/multithreadingtests/runTests.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-call ../../data/runTests.bat
--- a/javaextensions/wma/mms/tsrc/pushtests/JsrTestRunner.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-MIDlet-Jar-Size: 7338
-MIDlet-1: WmaPushSender,,com.nokia.mj.test.wma.pushtests.WmaPushSender
-MIDlet-2: WmaPushReceiver,,com.nokia.mj.test.wma.pushtests.WmaPushReceiver
-MIDlet-3: WmaPushStaticReceiver,,com.nokia.mj.test.wma.pushtests.WmaPushStaticReceiver
-MIDlet-Push-1: mms://:test.push.static, com.nokia.mj.test.wma.pushtests.WmaPushStaticReceiver, *
-MIDlet-Jar-URL: JsrTestRunner.jar
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-MIDlet-Name: WmaPushMidlets
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-Wma20-Sender-Msisdn: +6596100096
-Wma20-Receiver-Msisdn: +6596100096
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
--- a/javaextensions/wma/mms/tsrc/pushtests/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="MmsPushTests" default="deploy.ut" basedir=".">
-
-  <import file="../../../../../build/utilities.xml"/>
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <property name="src.dir" location="./javasrc"/>
-  <property name="build.dir" location="."/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="mmstests.jar.filename" value="MmsPushTest.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-  <target name="init.my.properties" depends="init.properties">
-    <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${mmstests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.properties">
-   
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-    <ant antfile="${java.src.root}\tools\junit\JsrTestRunner\build\build.xml">
-   </ant>
-  </target>
-
-  <target name="deploy.ut" depends="compile.ut,init.my.properties">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${mmstests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean,run"/>
-
-  <target name="run" depends="deploy.ut">
-      <echo>Running OpenTests</echo>
-      <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.sms.OpenTests"/>
-      </exec>
-      <echo>Running CloseTests</echo>
-      <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.sms.CloseTests"/>
-      </exec>
-  </target>
-</project>
--- a/javaextensions/wma/mms/tsrc/pushtests/compileAndInstall.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-@echo off
-ren \epoc32\RELEASE\winscw\udeb\Z\system\data\midp2\security\policy\midp2_rp.xpf midp2_rp.xpf_
-copy ..\..\..\data\midp2_rp.xpf \epoc32\RELEASE\winscw\udeb\Z\system\data\midp2\security\policy\
-
-call ant compile
-call ant jar
-call ant deploy
-
-rem IF THE INSTALLATION OF MIDLETS FROM COMMAND LINE WORKS THEN:
-rem    . UNCOMMENT LINE NO. 12
-rem    . COMMENT OUT LINES NO.14, 15, 16
-rem call ant install
-
-rem THIS IS A WORKAROUND FOR THE MIDLET NOT BEING INSTALLED FROM COMMAND LINE
-echo Install and run the MIDlet and
-pause
-
-del /Q \epoc32\RELEASE\winscw\udeb\Z\system\data\midp2\security\policy\midp2_rp.xpf
-ren \epoc32\RELEASE\winscw\udeb\Z\system\data\midp2\security\policy\midp2_rp.xpf_ midp2_rp.xpf
\ No newline at end of file
--- a/javaextensions/wma/mms/tsrc/pushtests/data/WmaPush.jad	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-MIDlet-Jar-Size: 20243
-MIDlet-1: WmaPushSender,,com.nokia.mj.test.wma.pushtests.WmaPushSender
-MIDlet-2: WmaPushReceiver,,com.nokia.mj.test.wma.pushtests.WmaPushReceiver
-MIDlet-3: WmaPushStaticReceiver,,com.nokia.mj.test.wma.pushtests.WmaPushStaticReceiver
-MIDlet-Push-1: mms://:test.push.static, com.nokia.mj.test.wma.pushtests.WmaPushStaticReceiver, *
-MIDlet-Jar-URL: WmaPush.jar
-MicroEdition-Configuration: CLDC-1.1
-MIDlet-Version: 1.0.0
-MIDlet-Name: WmaPushMidlets
-MIDlet-Vendor: Nokia
-MicroEdition-Profile: MIDP-2.0
-Wma20-Sender-Msisdn: +6596100096
-Wma20-Receiver-Msisdn: +6596100096
-AvailableResolutions: resolution_QVGAPortrait, resolution_QVGALandscape
--- a/javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushReceiver.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.PushRegistry;
-import javax.microedition.lcdui.Command;
-import javax.microedition.lcdui.CommandListener;
-import javax.microedition.lcdui.Display;
-import javax.microedition.lcdui.Displayable;
-import javax.microedition.lcdui.Form;
-import javax.microedition.midlet.MIDlet;
-import javax.microedition.midlet.MIDletStateChangeException;
-
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-
-/**
- * WMA 2.0 module test midlet for receiving push messages.
- */
-public class WmaPushReceiver extends MIDlet
-{
-
-    /** MessageConnection for receiving messages. */
-    private MessageConnection connection = null;
-
-    /** Main form for the midlet. */
-    private Form form = null;
-
-    /** Commands for this midlet. */
-    private String commands[] = new String[]
-    {
-        "Open connection",
-        "Close connection",
-        "Register midlet",
-        "Unregister midlet",
-        "Receive message",
-        "Clear screen",
-        "Exit"
-    };
-
-    public WmaPushReceiver()
-    {
-        super();
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#startApp()
-     */
-    protected void startApp() throws MIDletStateChangeException
-    {
-        form = new Form("WMA 2.0 push receiver MT midlet");
-        for (int i = 0; i < commands.length; i++)
-        {
-            form.addCommand(new Command(commands[i], Command.ITEM, 1));
-        }
-        form.setCommandListener(new CommandListener()
-        {
-            public void commandAction(Command c, Displayable d)
-            {
-                if (c.getLabel().equals(commands[0]))
-                {
-                    openConnection();
-                }
-                else if (c.getLabel().equals(commands[1]))
-                {
-                    closeConnection();
-                }
-                else if (c.getLabel().equals(commands[2]))
-                {
-                    registerMidlet();
-                }
-                else if (c.getLabel().equals(commands[3]))
-                {
-                    unregisterMidlet();
-                }
-                else if (c.getLabel().equals(commands[4]))
-                {
-                    receiveMms();
-                }
-                else if (c.getLabel().equals(commands[5]))
-                {
-                    form.deleteAll();
-                }
-                else if (c.getLabel().equals(commands[6]))
-                {
-                    try
-                    {
-                        destroyApp(false);
-                        notifyDestroyed();
-                    }
-                    catch (MIDletStateChangeException msce)
-                    {
-                        displayMessage("Exception during exit: " + msce.toString());
-                    }
-                }
-            }
-        });
-        Display.getDisplay(this).setCurrent(form);
-
-        WmaPushUtils.initUrls(this, form);
-
-        // Check if we were started by incoming messages.
-        String connections[] = PushRegistry.listConnections(true);
-        if (connections.length > 0)
-        {
-            // Open connection and set listener.
-            openConnection();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#pauseApp()
-     */
-    protected void pauseApp()
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
-     */
-    protected void destroyApp(boolean unconditional)
-    throws MIDletStateChangeException
-    {
-        if (connection != null)
-        {
-            closeConnection();
-        }
-    }
-
-    /**
-     * Registers midlet to push registry, opens connection, and
-     * registers message listener.
-     */
-    private void registerMidlet()
-    {
-        try
-        {
-            // Register midlet to push registry.
-            PushRegistry.registerConnection(WmaPushUtils.serverConnectionUrl,
-                                            "com.nokia.mj.test.wma.pushtests.WmaPushReceiver", WmaPushUtils.senderMsisdn);
-            displayMessage("Midlet registered");
-        }
-        catch (Exception e)
-        {
-            displayMessage("Midlet registration failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Unregisters midlet from push registry and closes connection.
-     */
-    private void unregisterMidlet()
-    {
-        try
-        {
-            // Unregister midlet from push registry.
-            boolean result =
-                PushRegistry.unregisterConnection(WmaPushUtils.serverConnectionUrl);
-            if (result)
-            {
-                displayMessage("Midlet unregistered");
-            }
-            else
-            {
-                displayMessage("Midlet was not unregistered");
-            }
-        }
-        catch (Exception e)
-        {
-            displayMessage("Midlet unregistration failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Opens connection.
-     */
-    private void openConnection()
-    {
-        if (connection == null)
-        {
-            try
-            {
-                connection = (MessageConnection)Connector.open(
-                                 WmaPushUtils.serverConnectionUrl);
-                displayMessage("Connection opened");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection opening failed: " + e.toString());
-            }
-
-            if (connection != null)
-            {
-                try
-                {
-                    // Set message listener.
-                    connection.setMessageListener(new MsgListener());
-                    displayMessage("Listener set");
-                }
-                catch (Exception e)
-                {
-                    displayMessage("Setting message listener failed: " + e.toString());
-                }
-            }
-        }
-        else
-        {
-            displayMessage("Connection already open");
-        }
-    }
-
-    /**
-     * Closes connection.
-     */
-    private void closeConnection()
-    {
-        if (connection != null)
-        {
-            try
-            {
-                // Close connection.
-                connection.close();
-                connection = null;
-                displayMessage("Connection closed");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection closing failed: " + e.toString());
-            }
-        }
-        else
-        {
-            displayMessage("Connection already closed");
-        }
-    }
-
-    /**
-     * Receives a message.
-     */
-    private void receiveMms()
-    {
-        if (connection == null)
-        {
-            openConnection();
-        }
-
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)connection.receive();
-            checkMsg(msg);
-        }
-        catch (Exception e)
-        {
-            displayMessage("Message receiving failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Returns null if given message has expected content, the expected
-     * message otherwise.
-     */
-    private MultipartMessage validMsg(MultipartMessage receivedMsg)
-    {
-        MultipartMessage sentMsg =
-            WmaPushUtils.getTestMessage(
-                connection, WmaPushUtils.clientConnectionUrl);
-        if (WmaPushUtils.messagesEqual(sentMsg, receivedMsg,
-                                       WmaPushUtils.clientConnectionUrl, "mms://" + WmaPushUtils.receiverMsisdn))
-        {
-            return null;
-        }
-        return sentMsg;
-    }
-
-    /**
-     * Checks that the received message has the expected contents.
-     */
-    private void checkMsg(MultipartMessage msg)
-    {
-        MultipartMessage sentMsg = validMsg(msg);
-        if (sentMsg == null)
-        {
-            displayMessage("Received valid message");
-        }
-        else
-        {
-            displayMessage("Received invalid message:\n"
-                           + WmaPushUtils.msgToString(msg)
-                           + "\nexpected:\n"
-                           + WmaPushUtils.msgToString(sentMsg));
-        }
-    }
-
-    /**
-     * Simple implementation of the MessageListener interface.
-     */
-    class MsgListener implements MessageListener
-    {
-        public void notifyIncomingMessage(MessageConnection connection)
-        {
-            try
-            {
-                MultipartMessage msg = (MultipartMessage)connection.receive();
-                checkMsg(msg);
-            }
-            catch (Exception e)
-            {
-                displayMessage("Message receiving failed: " + e.toString());
-            }
-        }
-    }
-
-    private void displayMessage(String msg)
-    {
-        form.append(msg + "\n");
-        WmaPushUtils.wmaDebug(msg);
-    }
-}
--- a/javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushSender.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.PushRegistry;
-import javax.microedition.lcdui.Command;
-import javax.microedition.lcdui.CommandListener;
-import javax.microedition.lcdui.Display;
-import javax.microedition.lcdui.Displayable;
-import javax.microedition.lcdui.Form;
-import javax.microedition.midlet.MIDlet;
-import javax.microedition.midlet.MIDletStateChangeException;
-
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-
-/**
- * WMA 2.0 module test midlet for sending messages.
- */
-public class WmaPushSender extends MIDlet
-{
-
-    /** MessageConnection for sending messages. */
-    private MessageConnection connection = null;
-
-    /** MessageConnection for sending messages to static midlet. */
-    private MessageConnection connectionStatic = null;
-
-    /** Main form for the midlet. */
-    private Form form = null;
-
-    /** Commands for this midlet. */
-    private String commands[] = new String[]
-    {
-        "Send message",
-        "Send message to static midlet",
-        "Clear screen",
-        "Exit"
-    };
-
-    public WmaPushSender()
-    {
-        super();
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#startApp()
-     */
-    protected void startApp() throws MIDletStateChangeException
-    {
-        form = new Form("WMA 2.0 push sender MT midlet");
-        for (int i = 0; i < commands.length; i++)
-        {
-            form.addCommand(new Command(commands[i], Command.ITEM, 1));
-        }
-        form.setCommandListener(new CommandListener()
-        {
-            public void commandAction(Command c, Displayable d)
-            {
-                if (c.getLabel().equals(commands[0]))
-                {
-                    sendMms();
-                }
-                else if (c.getLabel().equals(commands[1]))
-                {
-                    sendMmsToStatic();
-                }
-                else if (c.getLabel().equals(commands[2]))
-                {
-                    form.deleteAll();
-                }
-                else if (c.getLabel().equals(commands[3]))
-                {
-                    try
-                    {
-                        destroyApp(false);
-                        notifyDestroyed();
-                    }
-                    catch (MIDletStateChangeException msce)
-                    {
-                        displayMessage("Exception during exit: "
-                                       + msce.toString());
-                    }
-                }
-            }
-        });
-        Display.getDisplay(this).setCurrent(form);
-
-        WmaPushUtils.initUrls(this, form);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#pauseApp()
-     */
-    protected void pauseApp()
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
-     */
-    protected void destroyApp(boolean unconditional)
-    throws MIDletStateChangeException
-    {
-        closeConnection();
-    }
-
-    /**
-     * Closes connection.
-     */
-    private void closeConnection()
-    {
-        if (connection != null)
-        {
-            try
-            {
-                // Close connection.
-                connection.close();
-                connection = null;
-            }
-            catch (Exception e)
-            {
-                displayMessage("Closing connection failed: "
-                               + e.toString());
-            }
-        }
-        if (connectionStatic != null)
-        {
-            try
-            {
-                // Close connection.
-                connectionStatic.close();
-                connectionStatic = null;
-            }
-            catch (Exception e)
-            {
-                displayMessage("Closing connection to static midlet failed: "
-                               + e.toString());
-            }
-        }
-    }
-
-    /**
-     * Sends a message.
-     */
-    private void sendMms()
-    {
-        if (connection == null)
-        {
-            try
-            {
-                connection = (MessageConnection)Connector.open(
-                                 WmaPushUtils.clientConnectionUrl);
-                displayMessage("Connection opened");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection opening failed: "
-                               + e.toString());
-            }
-        }
-
-        try
-        {
-            MultipartMessage msg =
-                WmaPushUtils.getTestMessage(
-                    connection, WmaPushUtils.clientConnectionUrl);
-            connection.send(msg);
-            displayMessage("Message sent");
-        }
-        catch (Exception e)
-        {
-            displayMessage("Message sending failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Sends a message to static midlet.
-     */
-    private void sendMmsToStatic()
-    {
-        if (connectionStatic == null)
-        {
-            try
-            {
-                connectionStatic = (MessageConnection)Connector.open(
-                                       WmaPushUtils.clientConnectionUrlStatic);
-                displayMessage("Connection to static midlet opened");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection opening to static midlet failed: "
-                               + e.toString());
-            }
-        }
-
-        try
-        {
-            MultipartMessage msg =
-                WmaPushUtils.getTestMessage(
-                    connectionStatic, WmaPushUtils.clientConnectionUrlStatic);
-            connectionStatic.send(msg);
-            displayMessage("Message sent to static midlet");
-        }
-        catch (Exception e)
-        {
-            displayMessage("Message sending to static midlet failed: "
-                           + e.toString());
-        }
-    }
-
-    private void displayMessage(String msg)
-    {
-        form.append(msg + "\n");
-        WmaPushUtils.wmaDebug(msg);
-    }
-}
--- a/javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushStaticReceiver.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.PushRegistry;
-import javax.microedition.lcdui.Command;
-import javax.microedition.lcdui.CommandListener;
-import javax.microedition.lcdui.Display;
-import javax.microedition.lcdui.Displayable;
-import javax.microedition.lcdui.Form;
-import javax.microedition.midlet.MIDlet;
-import javax.microedition.midlet.MIDletStateChangeException;
-
-import javax.wireless.messaging.Message;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessageListener;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-
-/**
- * WMA 2.0 module test midlet for receiving push messages.
- */
-public class WmaPushStaticReceiver extends MIDlet
-{
-
-    /** MessageConnection for receiving messages. */
-    private MessageConnection connection = null;
-
-    /** Main form for the midlet. */
-    private Form form = null;
-
-    /** Commands for this midlet. */
-    private String commands[] = new String[]
-    {
-        "Open connection",
-        "Close connection",
-        "Register midlet",
-        "Unregister midlet",
-        "Receive message",
-        "Clear screen",
-        "Exit"
-    };
-
-    public WmaPushStaticReceiver()
-    {
-        super();
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#startApp()
-     */
-    protected void startApp() throws MIDletStateChangeException
-    {
-        form = new Form("WMA 2.0 push static receiver MT midlet");
-        for (int i = 0; i < commands.length; i++)
-        {
-            form.addCommand(new Command(commands[i], Command.ITEM, 1));
-        }
-        form.setCommandListener(new CommandListener()
-        {
-            public void commandAction(Command c, Displayable d)
-            {
-                if (c.getLabel().equals(commands[0]))
-                {
-                    openConnection();
-                }
-                else if (c.getLabel().equals(commands[1]))
-                {
-                    closeConnection();
-                }
-                else if (c.getLabel().equals(commands[2]))
-                {
-                    registerMidlet();
-                }
-                else if (c.getLabel().equals(commands[3]))
-                {
-                    unregisterMidlet();
-                }
-                else if (c.getLabel().equals(commands[4]))
-                {
-                    receiveMms();
-                }
-                else if (c.getLabel().equals(commands[5]))
-                {
-                    form.deleteAll();
-                }
-                else if (c.getLabel().equals(commands[6]))
-                {
-                    try
-                    {
-                        destroyApp(false);
-                        notifyDestroyed();
-                    }
-                    catch (MIDletStateChangeException msce)
-                    {
-                        displayMessage("Exception during exit: " + msce.toString());
-                    }
-                }
-            }
-        });
-        Display.getDisplay(this).setCurrent(form);
-
-        WmaPushUtils.initUrls(this, form);
-
-        // Check if we were started by incoming messages.
-        String connections[] = PushRegistry.listConnections(true);
-        if (connections.length > 0)
-        {
-            // Open connection and set listener.
-            openConnection();
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#pauseApp()
-     */
-    protected void pauseApp()
-    {
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
-     */
-    protected void destroyApp(boolean unconditional)
-    throws MIDletStateChangeException
-    {
-        if (connection != null)
-        {
-            closeConnection();
-        }
-    }
-
-    /**
-     * Registers midlet to push registry, opens connection, and
-     * registers message listener.
-     */
-    private void registerMidlet()
-    {
-        try
-        {
-            // Register midlet to push registry.
-            PushRegistry.registerConnection(WmaPushUtils.serverConnectionUrlStatic,
-                                            "wma.mt.pushtests.WmaPushStaticReceiver", WmaPushUtils.senderMsisdn);
-            displayMessage("Midlet registered");
-        }
-        catch (Exception e)
-        {
-            displayMessage("Midlet registration failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Unregisters midlet from push registry and closes connection.
-     */
-    private void unregisterMidlet()
-    {
-        try
-        {
-            // Unregister midlet from push registry.
-            boolean result =
-                PushRegistry.unregisterConnection(WmaPushUtils.serverConnectionUrlStatic);
-            if (result)
-            {
-                displayMessage("Midlet unregistered");
-            }
-            else
-            {
-                displayMessage("Midlet was not unregistered");
-            }
-        }
-        catch (Exception e)
-        {
-            displayMessage("Midlet unregistration failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Opens connection.
-     */
-    private void openConnection()
-    {
-        if (connection == null)
-        {
-            try
-            {
-                connection = (MessageConnection)Connector.open(
-                                 WmaPushUtils.serverConnectionUrlStatic);
-                displayMessage("Connection opened");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection opening failed: " + e.toString());
-            }
-
-            if (connection != null)
-            {
-                try
-                {
-                    // Set message listener.
-                    connection.setMessageListener(new MsgListener());
-                    displayMessage("Listener set");
-                }
-                catch (Exception e)
-                {
-                    displayMessage("Setting message listener failed: " + e.toString());
-                }
-            }
-        }
-        else
-        {
-            displayMessage("Connection already open");
-        }
-    }
-
-    /**
-     * Closes connection.
-     */
-    private void closeConnection()
-    {
-        if (connection != null)
-        {
-            try
-            {
-                // Close connection.
-                connection.close();
-                connection = null;
-                displayMessage("Connection closed");
-            }
-            catch (Exception e)
-            {
-                displayMessage("Connection closing failed: " + e.toString());
-            }
-        }
-        else
-        {
-            displayMessage("Connection already closed");
-        }
-    }
-
-    /**
-     * Receives a message.
-     */
-    private void receiveMms()
-    {
-        if (connection == null)
-        {
-            openConnection();
-        }
-
-        try
-        {
-            MultipartMessage msg = (MultipartMessage)connection.receive();
-            checkMsg(msg);
-        }
-        catch (Exception e)
-        {
-            displayMessage("Message receiving failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Returns null if given message has expected content, the expected
-     * message otherwise.
-     */
-    private MultipartMessage validMsg(MultipartMessage receivedMsg)
-    {
-        MultipartMessage sentMsg =
-            WmaPushUtils.getTestMessage(
-                connection, WmaPushUtils.clientConnectionUrlStatic);
-        if (WmaPushUtils.messagesEqual(sentMsg, receivedMsg,
-                                       WmaPushUtils.clientConnectionUrlStatic, "mms://" + WmaPushUtils.receiverMsisdn))
-        {
-            return null;
-        }
-        return sentMsg;
-    }
-
-    /**
-     * Checks that the received message has the expected contents.
-     */
-    private void checkMsg(MultipartMessage msg)
-    {
-        MultipartMessage sentMsg = validMsg(msg);
-        if (sentMsg == null)
-        {
-            displayMessage("Received valid message");
-        }
-        else
-        {
-            displayMessage("Received invalid message:\n"
-                           + WmaPushUtils.msgToString(msg)
-                           + "\nexpected:\n"
-                           + WmaPushUtils.msgToString(sentMsg));
-        }
-    }
-
-    /**
-     * Simple implementation of the MessageListener interface.
-     */
-    class MsgListener implements MessageListener
-    {
-        public void notifyIncomingMessage(MessageConnection connection)
-        {
-            try
-            {
-                MultipartMessage msg = (MultipartMessage)connection.receive();
-                checkMsg(msg);
-            }
-            catch (Exception e)
-            {
-                displayMessage("Message receiving failed: " + e.toString());
-            }
-        }
-    }
-
-    private void displayMessage(String msg)
-    {
-        form.append(msg + "\n");
-        WmaPushUtils.wmaDebug(msg);
-    }
-}
--- a/javaextensions/wma/mms/tsrc/pushtests/javasrc/com/nokia/mj/test/wma/WmaPushUtils.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,358 +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:
-*
-*/
-package com.nokia.mj.test.wma;
-
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import javax.microedition.io.Connector;
-import javax.microedition.io.file.FileConnection;
-
-import javax.microedition.lcdui.Form;
-import javax.microedition.midlet.MIDlet;
-import javax.wireless.messaging.MessageConnection;
-import javax.wireless.messaging.MessagePart;
-import javax.wireless.messaging.MultipartMessage;
-import javax.wireless.messaging.SizeExceededException;
-
-import com.nokia.mj.impl.utils.Base64;
-/**
- * WMA 2.0 module test utilities for push testing.
- */
-public class WmaPushUtils
-{
-    /** MSISDN for the receiver terminal. */
-    static public String receiverMsisdn = "+5550000";
-
-    /** MSISDN for the sender terminal. */
-    static public String senderMsisdn = "+5551000";
-
-    /** Push application id. */
-    static public String appId = "test.push";
-
-    /** Push application id for static midlet. */
-    static public String appIdStatic = "test.push.static";
-
-    /** Server connection url. */
-    static public String serverConnectionUrl = "mms://:" + appId;
-
-    /** Server connection url for static midlet. */
-    static public String serverConnectionUrlStatic = "mms://:" + appIdStatic;
-
-    /** Client connection url. */
-    static public String clientConnectionUrl =
-        "mms://" + receiverMsisdn + ":" + appId;
-
-    /** Client connection url for static midlet. */
-    static public String clientConnectionUrlStatic =
-        "mms://" + receiverMsisdn + ":" + appIdStatic;
-
-    /** Sender address upon message reception. */
-    //static public String senderAddress = "mms://" + receiverMsisdn;
-
-    /** Message used in push tests. */
-    //static private MultipartMessage testMessage = null;
-
-    /**
-     * Initializes URLs basing on parameters in JAD file.
-     */
-    synchronized static void initUrls(MIDlet midlet, Form form)
-    {
-        try
-        {
-            senderMsisdn = getAppProp(midlet, "Wma20-Sender-Msisdn");
-            receiverMsisdn = getAppProp(midlet, "Wma20-Receiver-Msisdn");
-            serverConnectionUrl = "mms://:" + appId;
-            serverConnectionUrlStatic = "mms://:" + appIdStatic;
-            clientConnectionUrl = "mms://" + receiverMsisdn + ":" + appId;
-            clientConnectionUrlStatic = "mms://" + receiverMsisdn + ":" + appIdStatic;
-            //senderAddress = "mms://" + receiverMsisdn;
-            wmaDebug("Sender MSISDN: " + senderMsisdn);
-            wmaDebug("Receiver MSISDN: " + receiverMsisdn);
-        }
-        catch (Exception e)
-        {
-            form.append("Init failed: " + e.toString() + "\n");
-            wmaDebug("Init failed: " + e.toString());
-        }
-    }
-
-    /**
-     * Returns application property with given name.
-     */
-    static String getAppProp(MIDlet midlet, String name) throws Exception
-    {
-        String result = null;
-        try
-        {
-            result = midlet.getAppProperty(name);
-        }
-        catch (Exception e)
-        {
-            throw new Exception(
-                "Could not get app property " + name + ": " + e.toString());
-        }
-        return result;
-    }
-
-    /**
-     * Creates a MultipartMessage used for push testing.
-     */
-    static public MultipartMessage getTestMessage(
-        MessageConnection connection, String address)
-    {
-        //if (testMessage == null) {
-        MultipartMessage testMessage = null;
-        try
-        {
-            testMessage = WmaPushUtils.getDummyMultipartMessage(
-                              connection, 200, address, "Test MMS");
-        }
-        catch (Exception e)
-        {
-        }
-        //}
-        return testMessage;
-    }
-
-    /**
-     * Checks if given messages have the same content.
-     */
-    static public boolean messagesEqual(
-        MultipartMessage sentMsg, MultipartMessage receivedMsg,
-        String from, String to)
-    {
-        String msgStr1 = msgToString(sentMsg, false);
-        String msgStr2 = msgToString(receivedMsg, false);
-        if (!msgStr1.equalsIgnoreCase(msgStr2))
-        {
-            wmaDebug("Received invalid message:\n" + msgStr2
-                     + "\nexpected:\n" + msgStr1);
-            return false;
-        }
-        if (!sentMsg.getAddress().equalsIgnoreCase(from))
-        {
-            wmaDebug("Address mismatch in sent message, got: " + sentMsg.getAddress()
-                     + ", expected: " + from);
-            return false;
-        }
-        if (!receivedMsg.getAddress().equalsIgnoreCase(to))
-        {
-            wmaDebug("Address mismatch in received message, got: " + receivedMsg.getAddress()
-                     + ", expected: " + to);
-            return false;
-        }
-        wmaDebug("Received valid message");
-        return true;
-    }
-
-    /**
-     * Returns information from the given message as a string.
-     */
-    static public String msgToString(MultipartMessage msg)
-    {
-        return msgToString(msg, true);
-    }
-
-    /**
-     * Creates a dummy MultipartMessage.
-     */
-    static private MultipartMessage getDummyMultipartMessage(
-        MessageConnection conn, int size, String address, String subject)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        MultipartMessage msg = (MultipartMessage)conn.newMessage(
-                                   MessageConnection.MULTIPART_MESSAGE);
-        if (address != null)
-        {
-            msg.setAddress(address);
-        }
-        if (subject != null)
-        {
-            msg.setSubject(subject);
-        }
-        msg.setHeader("X-Mms-Priority", "normal");
-        msg.addMessagePart(getDummyMessagePart(size, "1"));
-        msg.addMessagePart(getDummyMessagePart(size*2, "2"));
-        msg.addMessagePart(getDummyMessagePart(size, "3"));
-        return msg;
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    static private MessagePart getDummyMessagePart(int size, String contentId)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return getDummyMessagePart(size, contentId, null);
-    }
-
-    /**
-     * Returns MessagePart of given size. MIME type is text/plain,
-     * encoding is iso-8859-1.
-     */
-    static private MessagePart getDummyMessagePart(
-        int size, String contentId, String contentLocation)
-    throws SizeExceededException, UnsupportedEncodingException
-    {
-        return new MessagePart(
-                   getContentString(size).toString().getBytes("iso-8859-1"),
-                   "text/plain", contentId, contentLocation, "iso-8859-1");
-    }
-
-    /**
-     * Returns information from the given message as a string.
-     */
-    static private String msgToString(MultipartMessage msg, boolean allHeaders)
-    {
-        if (msg == null)
-        {
-            return null;
-        }
-
-        StringBuffer result = new StringBuffer();
-        if (allHeaders)
-        {
-            result.append("getAddress: " + msg.getAddress()).append("\n");
-            result.append(addressesToString(msg, "from"));
-            result.append(addressesToString(msg, "to"));
-            result.append(addressesToString(msg, "cc"));
-            result.append(addressesToString(msg, "bcc"));
-        }
-        if (msg.getSubject() != null)
-        {
-            result.append("subject: ").append(msg.getSubject()).append("\n");
-        }
-        if (msg.getStartContentId() != null)
-        {
-            result.append("startContentId: ")
-            .append(msg.getStartContentId()).append("\n");
-        }
-        if (allHeaders)
-        {
-            if (msg.getHeader("X-Mms-Delivery-Time") != null)
-            {
-                result.append("X-Mms-Delivery-Time: ")
-                .append(msg.getHeader("X-Mms-Delivery-Time")).append("\n");
-            }
-        }
-        if (msg.getHeader("X-Mms-Priority") != null)
-        {
-            result.append("X-Mms-Priority: ")
-            .append(msg.getHeader("X-Mms-Priority")).append("\n");
-        }
-        MessagePart msgParts[] = msg.getMessageParts();
-        if (msgParts != null && msgParts.length > 0)
-        {
-            result.append("MessageParts: ").append(msgParts.length).append("\n");
-            for (int i = 0; i < msgParts.length; i++)
-            {
-                result.append("MessagePart["+i+"]:\n")
-                .append(msgPartToString(msgParts[i]));
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Returns requested addresses from the given message as a string.
-     */
-    static private String addressesToString(MultipartMessage msg, String addrType)
-    {
-        StringBuffer result = new StringBuffer();
-        String addrs[] = msg.getAddresses(addrType);
-        if (addrs != null)
-        {
-            for (int i = 0; i < addrs.length; i++)
-            {
-                result.append(addrType).append(": ")
-                .append(addrs[i]).append("\n");
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Returns information from the given MessagePart as a string.
-     */
-    static private String msgPartToString(MessagePart msgPart)
-    {
-        if (msgPart == null)
-        {
-            return null;
-        }
-
-        StringBuffer result = new StringBuffer();
-        result.append("contentId: ").append(msgPart.getContentID()).append("\n");
-        result.append("contentLocation: ").append(msgPart.getContentLocation()).append("\n");
-        result.append("encoding: ").append(msgPart.getEncoding()).append("\n");
-        result.append("mimeType: ").append(msgPart.getMIMEType()).append("\n");
-        result.append("length: ").append(msgPart.getLength()).append("\n");
-        result.append("base64 encoded content: ").append(
-            Base64.encode(msgPart.getContent())).append("\n");
-        return result.toString();
-    }
-
-    /**
-     * Returns a string of given size.
-     */
-    static private String getContentString(int size)
-    {
-        StringBuffer contents = new StringBuffer(size);
-        for (int i = 0; i < size; i++)
-        {
-            contents.append(i%10);
-        }
-        return contents.toString();
-    }
-
-    // Helper for logging.
-    static private OutputStream out = null;
-    synchronized static void wmaDebug(String msg)
-    {
-        if (out == null)
-        {
-            try
-            {
-                String path = System.getProperty("fileconn.dir.private");
-                FileConnection filecon =
-                    (FileConnection)Connector.open(path + "wma20mtpush.txt");
-                // Create the file if it doesn't exist.
-                if (!filecon.exists())
-                {
-                    filecon.create();
-                }
-                out = filecon.openOutputStream();
-            }
-            catch (Exception e)
-            {
-            }
-        }
-        if (out != null)
-        {
-            try
-            {
-                String outMsg = (new java.util.Date()) + ": " + msg + "\n";
-                out.write(outMsg.getBytes());
-                out.flush();
-            }
-            catch (Exception e)
-            {
-            }
-        }
-    }
-}
--- a/javaextensions/wma/sms_cbs/build/javawma_0x2002DCDC.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/wma/sms_cbs/build/javawma_0x2002DCDC.mmp	Tue May 25 12:34:19 2010 +0300
@@ -92,6 +92,17 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -112,10 +123,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/wma/sms_cbs/pushplugin/cbs/build/javacbsscplugin_0x2002DCA4.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/cbs/build/javacbsscplugin_0x2002DCA4.mmp	Tue May 25 12:34:19 2010 +0300
@@ -96,6 +96,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -116,10 +128,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaextensions/wma/sms_cbs/pushplugin/sms/build/javasmsscplugin_0x2002DCD3.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/sms/build/javasmsscplugin_0x2002DCD3.mmp	Tue May 25 12:34:19 2010 +0300
@@ -92,6 +92,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -112,10 +125,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/bld.inf	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/bld.inf	Tue May 25 12:34:19 2010 +0300
@@ -25,7 +25,7 @@
 #include "javainstaller/bld.inf"    
 #include "javaregistry/bld.inf"    
 #include "javabackup/bld.inf"    
+#include "javasettings/bld.inf"    
 #include "javasidchecker/build/bld.inf"    
 #include "javarecognizer/build/bld.inf"    
-#include "javaappschemeplugin/build/bld.inf"    
-#include "javasettings/appmngrplugin/build/bld.inf"  
+#include "javaappschemeplugin/build/bld.inf"  
--- a/javamanager/debugapi/build/debugapi_0x2002DCAB.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/debugapi/build/debugapi_0x2002DCAB.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javaappschemeplugin/build/javaappschemeplugin.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javaappschemeplugin/build/javaappschemeplugin.mmp	Tue May 25 12:34:19 2010 +0300
@@ -16,6 +16,8 @@
 */
 
 #include <platform_paths.hrh>
+#include <../../../inc/project_defines.hrh>
+#include <../../../inc/build_defines.hrh>
 
 TARGET      javaappschemeplugin.dll
 TARGETTYPE  plugin
--- a/javamanager/javaappschemeplugin/src/javaapphandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javaappschemeplugin/src/javaapphandler.cpp	Tue May 25 12:34:19 2010 +0300
@@ -119,11 +119,7 @@
 //
 void CJavaAppHandler::HandleUrlStandaloneL()
 {
-#ifdef _DEBUG
-    // log that our plugin implementation has been called
-    TBuf<255> logBuf = mParsedUrl->Left(250);
-    LOG1WSTR("javaapphandler: command line starts with : %s", (TUint16 *)(logBuf.PtrZ()));
-#endif
+
 
     // Start javalauncher.exe and pass the Url to it
     _LIT(KJavaLauncherExe, "javalauncher.exe");
--- a/javamanager/javabackup/midp2backup/build/midp2backupplugin.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javabackup/midp2backup/build/midp2backupplugin.mmp	Tue May 25 12:34:19 2010 +0300
@@ -63,7 +63,7 @@
 LIBRARY                 apgrfx.lib
 LIBRARY                 apparc.lib
 LIBRARY                 estlib.lib
-LIBRARY                 javaenv.lib
+LIBRARY                 javaenvinfo.lib
 
 #if defined(WINSCW)
   deffile ./bwins/backup.def
--- a/javamanager/javabackup/midp2backup/src.s60/midp2backupplugin.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javabackup/midp2backup/src.s60/midp2backupplugin.cpp	Tue May 25 12:34:19 2010 +0300
@@ -480,12 +480,6 @@
 
         ILOG1(EBackup, "File copy, status: %d", err);
 
-        TDesC path_old_Des(path_old);
-        TDesC path_new_Des(path_new);
-
-        /*LOG1WSTR( EBackup, EInfo, "path_old: %S", &path_old );
-        LOG1WSTR( EBackup, EInfo, "path_new: %S", &path_new );
-        */
         User::LeaveIfError(err);
 
         CleanupStack::PopAndDestroy();
--- a/javamanager/javacaptain/build/javacaptain_0x200211DC.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/build/javacaptain_0x200211DC.mmp	Tue May 25 12:34:19 2010 +0300
@@ -108,6 +108,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		all -tcb -allfiles -drm 
@@ -129,10 +141,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javacaptain/extensionplugins/boot/src/booteventprovider.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/boot/src/booteventprovider.cpp	Tue May 25 12:34:19 2010 +0300
@@ -33,9 +33,15 @@
 namespace captain
 {
 
-// In S60 working directory is initalized to C:\private\<UID> by OpenC
-const char IAD_BOOT_FLAG[]   = "iadboot.dat";
-const char FIRST_BOOT_FLAG[] = "firstbootdone.dat";
+// In S60 working directory should be initalized to C:\private\<UID> by OpenC
+// But for some reason this does not seem to work if captain binary is in rom.
+#ifdef __SYMBIAN32__
+const char* const IAD_BOOT_FLAG   = "c:\\private\\200211DC\\iadboot.dat";
+const char* const FIRST_BOOT_FLAG = "c:\\private\\200211DC\\firstbootdone.dat";
+#else
+const char* const IAD_BOOT_FLAG   = "iadboot.dat";
+const char* const FIRST_BOOT_FLAG = "firstbootdone.dat";
+#endif /* __SYMBIAN32__ */
 
 BootEventProvider::BootEventProvider() : mCore(0)
 {
--- a/javamanager/javacaptain/extensionplugins/config/build/javacaptain_ext_config_0x2002DC9E.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/config/build/javacaptain_ext_config_0x2002DC9E.mmp	Tue May 25 12:34:19 2010 +0300
@@ -79,6 +79,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -99,10 +112,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javacaptain/extensionplugins/javacertstore/build/javacaptain_ext_javacertstore_0x2002DC9F.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/build/javacaptain_ext_javacertstore_0x2002DC9F.mmp	Tue May 25 12:34:19 2010 +0300
@@ -89,6 +89,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -109,10 +121,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javacaptain/extensionplugins/javacertstore/inc/javacertstore.h	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/inc/javacertstore.h	Tue May 25 12:34:19 2010 +0300
@@ -41,11 +41,14 @@
 const char KFileSeparator = '\\';
 const char KJavaCertsDir[] = "security\\trustroots\\device\\certificates";
 const char KJavaCertsStateDir[] = "security\\trustroots\\device\\state";
+const char KJavaRootsListDir[] = "security\\trustroots";
 #else //__SYMBIAN32__
 const char KFileSeparator = '/';
 const char KJavaCertsDir[] = "security/trustroots/device/certificates";
 const char KJavaCertsStateDir[] = "security/trustroots/device/state";
+const char KJavaRootsListDir[] = "security/trustroots";
 #endif //__SYMBIAN32__
+const char KJavaRootsListName[] = "midprootslist";
 const char KMetadataSuffix[] = ".metadata";
 const char KStateSuffix[] = ".state";
 const char KCertSuffix1[] = ".der";
@@ -106,16 +109,18 @@
     void queryCerts(java::comms::CommsMessage& aMessage);
     void loadCertsMetadata();
     void loadCertsMetadata(std::string aCertsLocation);
+    void loadCertsMetadata(std::string aCertsLocation, bool primaryPath);
     void unloadCertsMetadata();
-    bool readMetadataFromFiles(const std::string& certFileName, CERT_METADATA *);
+    bool readMetadataFromFiles(const std::string& aCertsLocation, const std::string& certFileName, CERT_METADATA *);
     void writeMetadataIntoFile(CERT_METADATA * metadata);
     int encodeState(bool, bool, int);
     void manageCert(const std::string&, int);
     std::string readCert(const std::string& certFileName, long *);
+    void readCert(const std::string& aCertsLocation, const std::string& aCertFileName);
     long replyWithContent(java::comms::CommsMessage& aReplyMessage, const CERT_METADATA&, int format = DER_FORMAT);
     void assignProtectionDomain(std::vector<std::string>, CERT_METADATA *);
     void addCertMetadataToCache(CERT_METADATA* metadata, bool overwrite);
-    bool mkDirAll(const char* dirPath);
+    bool mkDirAll(const char* dirPath, const std::string& aBaseDir);
 
 private:
     CoreInterface* iCore;
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src.linux/javasmartcardcertificatesreader.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "javasmartcardcertificatesreader.h"
-
-using namespace std;
-
-namespace java
-{
-namespace security
-{
-
-void JavaSmartCardCertificatesReader::retrieveTrustedCertificates(vector<TrustedCertificate>& aTrustedCerts)
-{
-}
-
-} //end namespace security
-} //end namespace java
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src.linux/metadatafilehandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <cstdio>
-
-#include "metadatafilehandler.h"
-
-namespace java
-{
-namespace security
-{
-
-bool JavaCertStoreMetadataFileHandler::writeState(std::string aFilePath, int aState)
-{
-    FILE * stateFile = fopen(aFilePath.c_str(), "w+");
-    if (stateFile != NULL)
-    {
-        fprintf(stateFile, "%d\n", aState);
-        fclose(stateFile);
-        return true;
-    }
-    return false;
-}
-
-int JavaCertStoreMetadataFileHandler::readState(std::string aFilePath)
-{
-    int state = STATE_UNDEFINED;
-    FILE * stateFile = fopen(aFilePath.c_str(), "r");
-    if (stateFile != NULL)
-    {
-        int tmp = getc(stateFile);
-        switch (tmp - 48)
-        {
-        case STATE_ENABLED:
-        case STATE_DISABLED:
-        case STATE_DELETED:
-            state = tmp - 48;
-            break;
-        }
-    }
-    return state;
-}
-
-} //end namespace security
-} //end namespace java
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/metadatafilehandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/metadatafilehandler.cpp	Tue May 25 12:34:19 2010 +0300
@@ -26,66 +26,70 @@
 
 bool JavaCertStoreMetadataFileHandler::writeState(std::string aFilePath, int aState)
 {
-    int len = aFilePath.size();
-    HBufC* filePath = HBufC::NewL(len);
-    CleanupStack::PushL(filePath);
-    TPtr ptr = filePath->Des();
-    TPtr8 ptr8((unsigned char *)aFilePath.c_str(),len);
-    ptr8.SetLength(len);
-    ptr.Copy(ptr8);
-    RFs rFs;
-    RFile stateFile;
     bool res = false;
-    int err = rFs.Connect();
-    if (err == KErrNone)
-    {
-        err = stateFile.Open(rFs, ptr, EFileWrite);
-        if (err == KErrNotFound)
-        {
-            err = stateFile.Create(rFs, ptr, EFileWrite);
-        }
+    TRAP_IGNORE(
+        int len = aFilePath.size();
+        HBufC* filePath = HBufC::NewL(len);
+        CleanupStack::PushL(filePath);
+        TPtr ptr = filePath->Des();
+        TPtr8 ptr8((unsigned char *)aFilePath.c_str(),len);
+        ptr8.SetLength(len);
+        ptr.Copy(ptr8);
+        RFs rFs;
+        RFile stateFile;
+        int err = rFs.Connect();
         if (err == KErrNone)
         {
-            CleanupClosePushL(stateFile);
-            TPckgBuf<TUint32> state(aState);
-            stateFile.Write(0, state);
-            CleanupStack::PopAndDestroy();  // state file
-            res = true;
+            err = stateFile.Open(rFs, ptr, EFileWrite);
+            if (err == KErrNotFound)
+            {
+                err = stateFile.Create(rFs, ptr, EFileWrite);
+            }
+            if (err == KErrNone)
+            {
+                CleanupClosePushL(stateFile);
+                TPckgBuf<TUint32> state(aState);
+                stateFile.Write(0, state);
+                CleanupStack::PopAndDestroy();  // state file
+                res = true;
+            }
         }
-    }
-    CleanupStack::PopAndDestroy(); // file path
+        CleanupStack::PopAndDestroy(); // file path
+    );
     return res;
 }
 
 int JavaCertStoreMetadataFileHandler::readState(std::string aFilePath)
 {
     int state = STATE_UNDEFINED;
-    int len = aFilePath.size();
-    HBufC* filePath = HBufC::NewL(len);
-    CleanupStack::PushL(filePath);
-    TPtr ptr = filePath->Des();
-    TPtr8 ptr8((unsigned char *)aFilePath.c_str(),len);
-    ptr8.SetLength(len);
-    ptr.Copy(ptr8);
-    RFs rFs;
-    RFile stateFile;
-    int err = rFs.Connect();
-    if (err == KErrNone)
-    {
-        err = stateFile.Open(rFs, ptr, EFileRead);
+    TRAP_IGNORE(
+        int len = aFilePath.size();
+        HBufC* filePath = HBufC::NewL(len);
+        CleanupStack::PushL(filePath);
+        TPtr ptr = filePath->Des();
+        TPtr8 ptr8((unsigned char *)aFilePath.c_str(),len);
+        ptr8.SetLength(len);
+        ptr.Copy(ptr8);
+        RFs rFs;
+        RFile stateFile;
+        int err = rFs.Connect();
         if (err == KErrNone)
         {
-            CleanupClosePushL(stateFile);
-            TPckgBuf<TUint32> tmp;
-            err = stateFile.Read(0, tmp);
-            CleanupStack::PopAndDestroy(); // state file
+            err = stateFile.Open(rFs, ptr, EFileRead);
             if (err == KErrNone)
             {
-                state = tmp();
+                CleanupClosePushL(stateFile);
+                TPckgBuf<TUint32> tmp;
+                err = stateFile.Read(0, tmp);
+                CleanupStack::PopAndDestroy(); // state file
+                if (err == KErrNone)
+                {
+                    state = tmp();
+                }
             }
         }
-    }
-    CleanupStack::PopAndDestroy(); // file path
+        CleanupStack::PopAndDestroy(); // file path
+    );
     return state;
 }
 
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src/javacertstore.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/src/javacertstore.cpp	Tue May 25 12:34:19 2010 +0300
@@ -280,8 +280,8 @@
     iCertsMetadataPath.append(KJavaCertsStateDir);
     iCertsMetadataPath.append(1, KFileSeparator);
     no_certs = 0;
-    loadCertsMetadata(iPrimaryCertsPath);
-    loadCertsMetadata(iSecondaryCertsPath);
+    loadCertsMetadata(iPrimaryCertsPath, true);
+    loadCertsMetadata(iSecondaryCertsPath, false);
 
     // loads the metadata of the smart card certificates
     vector<TrustedCertificate> trustedCerts;
@@ -334,7 +334,7 @@
     }
 }
 
-bool JavaCertStore::readMetadataFromFiles(const std::string& cert_file_name, CERT_METADATA * metadata)
+bool JavaCertStore::readMetadataFromFiles(const std::string& aCertsLocation, const std::string& cert_file_name, CERT_METADATA * metadata)
 {
     // there are two types of metadata:
     // 1) read-only metadata (this metadata resides into file with the same name than
@@ -347,7 +347,7 @@
     {
         std::string file_name_without_extension = string(cert_file_name, 0, ext);
         // read-only metadata
-        std::string read_only_metadata_file_name = iPrimaryCertsPath
+        std::string read_only_metadata_file_name = aCertsLocation
                 + file_name_without_extension
                 + KMetadataSuffix;
         std::string read_write_metadata_file_name = iCertsMetadataPath
@@ -355,13 +355,6 @@
                 + KStateSuffix;
         // read the read-only metadata file */
         FILE * read_only_metadata_file = fopen(read_only_metadata_file_name.c_str(),"r");
-        if (read_only_metadata_file == NULL)
-        {
-            read_only_metadata_file_name = iSecondaryCertsPath
-                                           + file_name_without_extension
-                                           + KMetadataSuffix;
-            read_only_metadata_file = fopen(read_only_metadata_file_name.c_str(),"r");
-        }
         if (read_only_metadata_file != NULL)
         {
             // save the name of the metadata_file for later use
@@ -492,7 +485,9 @@
                     // create the file and initialize it with
                     metadata->state = STATE_ENABLED;
                     // create the directory (if it doesn't exist)
-                    if (mkDirAll(KJavaCertsStateDir))
+                    std::string certsStateBaseDir = "C";
+                    java::util::JavaOsLayer::getJavaCaptainRoot(certsStateBaseDir, true);
+                    if (mkDirAll(KJavaCertsStateDir, certsStateBaseDir))
                     {
                         // force the writing
                         metadata->changes = true;
@@ -700,28 +695,88 @@
                     && strcmp(dirent->d_name,"..")
                     && cert_file)
             {
-                CERT_METADATA * metadata = new CERT_METADATA();
-                if (readMetadataFromFiles(dirent->d_name, metadata))
-                {
-                    int len = aCertsLocation.size() + strlen(dirent->d_name) + 1;
-                    metadata->full_path = aCertsLocation + string(dirent->d_name);
-                    metadata->data = readCert(metadata->full_path,
-                                              &(metadata->len));
-                    // if the cert already exists, overwrite it: since the primary location is Z and
-                    // the secondary is C, this is a way to update certificates
-                    addCertMetadataToCache(metadata, true /* overwrite*/);
-                }
-                else
-                {
-                    delete metadata;
-                    metadata = NULL;
-                }
+                readCert(aCertsLocation, dirent->d_name);
             }
         }
         closedir(dirp);
     }
 }
 
+void JavaCertStore::loadCertsMetadata(std::string aCertsLocation, bool primaryPath)
+{
+    if (primaryPath || no_certs == 0)
+    {
+        loadCertsMetadata(aCertsLocation);
+    }
+    else
+    {
+        // secondary path: read only the roots listed into the rootslist
+        std::string rootsListDir = "";
+        std::string rootsListName = "";
+        rootsListDir = "C";
+        java::util::JavaOsLayer::getResRoot(rootsListDir, true);
+        rootsListDir.append(KJavaRootsListDir);
+        rootsListDir.append(1, KFileSeparator);
+        rootsListName.append(KJavaRootsListName);
+        FILE * rootslist = fopen((rootsListDir + rootsListName).c_str(),"r");
+        if (rootslist != NULL)
+        {
+            // root_file_name
+            int root_file_name_index = 0;
+            char root_file_name[50];
+            int retval;
+            while ((int)(retval = getc(rootslist))!= EOF)
+            {
+                if (retval == 10 || retval == 13 /* CR or LF */)
+                {
+                    if (root_file_name_index > 0)
+                    {
+                        string rootFileName = string(root_file_name, root_file_name_index);
+                        // reset the root file name for the next iteration
+                        root_file_name_index  = 0;
+                        root_file_name[root_file_name_index] = '\0';
+                        readCert(rootsListDir, rootFileName);                
+                    }
+                }
+                else
+                {
+                    root_file_name[root_file_name_index] = (char)retval;
+                    root_file_name_index++;
+                    root_file_name[root_file_name_index] = '\0';
+                }
+            }
+            if (root_file_name_index > 0)
+            {
+                string rootFileName = string(root_file_name, root_file_name_index);
+                // read the root
+                readCert(rootsListDir, rootFileName);                
+            }
+            fclose(rootslist);
+        }
+    }
+}
+
+void JavaCertStore::readCert(const std::string& aCertsLocation, const std::string& aCertFileName)
+{
+    CERT_METADATA * metadata = new CERT_METADATA();
+    if (readMetadataFromFiles(aCertsLocation, aCertFileName, metadata))
+    {
+        int len = aCertsLocation.size() + aCertFileName.size() + 1;
+        metadata->full_path = aCertsLocation + aCertFileName;
+        metadata->data = readCert(metadata->full_path,
+                                &(metadata->len));
+        // if the cert already exists, overwrite it: since the primary location is Z and
+        // the secondary is C, this is a way to update certificates
+        addCertMetadataToCache(metadata, true /* overwrite*/);
+    }
+    else
+    {
+        delete metadata;
+        metadata = NULL;
+    }
+}
+
+
 void JavaCertStore::addCertMetadataToCache(CERT_METADATA* metadata, bool overwrite)
 {
     vector<CERT_METADATA *>::iterator startIterator;
@@ -755,7 +810,7 @@
     }
 }
 
-bool JavaCertStore::mkDirAll(const char* aDirPath)
+bool JavaCertStore::mkDirAll(const char* aDirPath, const std::string& aBaseDir)
 {
     // split the path into single directories
     // (separated by file separator) and create
@@ -767,7 +822,7 @@
     while (endPos > startPos)
     {
         currentDirPath += dirPath.substr(startPos, endPos - startPos) + KFileSeparator;
-        int mkdir_result = mkdir(currentDirPath.c_str(), 0666);
+        int mkdir_result = mkdir((aBaseDir + currentDirPath).c_str(), 0666);
         if (mkdir_result != 0 && errno != EEXIST)
         {
             return false;
@@ -777,7 +832,7 @@
     }
     // the last round
     currentDirPath += dirPath.substr(startPos, dirPath.size() - startPos);
-    int mkdir_result = mkdir(currentDirPath.c_str(), 0666);
+    int mkdir_result = mkdir((aBaseDir + currentDirPath).c_str(), 0666);
     if (mkdir_result != 0 && errno != EEXIST)
     {
         return false;
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/build/javacaptain_ext_preinstallerstarter_0x2002DCA0.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/build/javacaptain_ext_preinstallerstarter_0x2002DCA0.mmp	Tue May 25 12:34:19 2010 +0300
@@ -80,6 +80,17 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		gdi.lib
 
 CAPABILITY		all -tcb 
 
@@ -100,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javacaptain/extensionplugins/storageserver/build/javacaptain_ext_storageserverplugin_0x2002DCA3.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/storageserver/build/javacaptain_ext_storageserverplugin_0x2002DCA3.mmp	Tue May 25 12:34:19 2010 +0300
@@ -78,6 +78,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -98,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javacaptain/extensionplugins/storageserver/src.linux/storageserverplugin.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  StorageServerPlugin
-*
-*/
-
-#include "logger.h"
-#include "coreinterface.h"
-#include "pmcinterface.h"
-#include "storageserverplugin.h"
-#include "javastorage.h"
-#include "javastorageexception.h"
-
-extern "C" java::captain::ExtensionPluginInterface* getExtensionPlugin()
-{
-    return new java::captain::StorageServerPlugin();
-}
-
-using namespace java::comms;
-using namespace java::storage;
-using namespace java::util;
-using namespace std;
-
-namespace java
-{
-namespace captain
-{
-
-StorageServerPlugin::StorageServerPlugin() : mCore(0), mJavaStoragePid(0)
-{
-    JELOG2(EJavaStorage);
-}
-
-StorageServerPlugin::~StorageServerPlugin()
-{
-    JELOG2(EJavaStorage);
-    if (mCore != 0)
-    {
-        mCore = 0;
-    }
-}
-
-void StorageServerPlugin::startPlugin(CoreInterface* core)
-{
-    JELOG2(EJavaStorage);
-    mCore = core;
-
-    cmdLine_t cmdLine;
-    cmdLine.push_back("storageserver");
-    mJavaStoragePid = mCore->getPmc()->launch(cmdLine, 0);
-
-    if (mJavaStoragePid > 0)
-    {
-        sleep(1);
-
-        JavaStorage* js = NULL;
-
-        try
-        {
-            // Check that javastorage has started up completely by trying to create a client instance
-            //printf("StorageServerPlugin, before creating JavaStorage instance.\n");
-
-            for (int i = 0; i < 4; i++)
-            {
-                try
-                {
-                    js = JavaStorage::createInstance();
-                    break;
-                }
-                catch (JavaStorageException)
-                {
-                    // JavaStorage client creation failed so continue to try
-                    //printf("StorageServerPlugin, JavaStorageException in creating JavaStorage client.\n");
-                    sleep(1);
-                }
-            }
-
-            if (js)
-            {
-                //printf("StorageServerPlugin, created JavaStorage instance.\n");
-                js->open("JavaStorage");
-                js->close();
-                //printf("StorageServerPlugin, after open/close to JavaStorage.\n");
-                delete js;
-            }
-        }
-        catch (JavaStorageException)
-        {
-            //printf("StorageServerPlugin, JavaStorageException.\n");
-            delete js;
-        }
-    }
-
-}
-
-void StorageServerPlugin::stopPlugin()
-{
-    if (mJavaStoragePid > 0)
-    {
-        mCore->getPmc()->terminate(mJavaStoragePid);
-    }
-}
-
-void StorageServerPlugin::pmcTerminated(const int& pid, const int& /*exitCode*/)
-{
-    if (pid == mJavaStoragePid)
-    {
-        mJavaStoragePid = 0;
-        // restart?
-    }
-}
-
-} // namespace captain
-} // namespace java
-
--- a/javamanager/javacaptain/extensionplugins/storageserver/src.linux/storageserverplugin.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  StorageServerHandler
-*
-*/
-
-#ifndef STORAGESERVERPLUGIN_H
-#define STORAGESERVERPLUGIN_H
-
-#include "javaosheaders.h"
-
-#include "extensionplugininterface.h"
-#include "processmanagementeventsinterface.h"
-
-using namespace java::captain;
-
-namespace java
-{
-namespace captain
-{
-
-class CoreInterface;
-
-OS_NONSHARABLE_CLASS(StorageServerPlugin) :  public ExtensionPluginInterface,
-        public ProcessManagementEventsInterface
-{
-public:
-    StorageServerPlugin();
-    virtual ~StorageServerPlugin();
-
-    // PluginInterface
-    virtual void startPlugin(CoreInterface* aCore);
-    virtual void stopPlugin();
-
-    // ExtensionPluginInterface
-    virtual ProcessManagementEventsInterface* getProcessManagementListener()
-    {
-        return this;
-    }
-
-    // ProcessManagementEventsInterface
-    virtual void pmcTerminated(const int& pid, const int& exitCode);
-
-private:
-    CoreInterface* mCore;
-    int mJavaStoragePid;
-};
-
-} // namespace captain
-} // namespace java
-
-#endif // STORAGESERVERPLUGIN_H
-
--- a/javamanager/javacaptain/inc.linux/pmc.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Pmc
-*
-*/
-
-#ifndef PMC_H
-#define PMC_H
-
-#include "pmcinterface.h"
-
-namespace java
-{
-
-namespace captain
-{
-class CoreInterface;
-class ProcessManagementEventsInterface;
-
-class Pmc : public PmcInterface
-{
-public:
-    Pmc();
-    virtual ~Pmc();
-
-    bool start(CoreInterface* aCore,
-               ProcessManagementEventsInterface* aProcessManagementEventsDispatcher);
-    bool stop();
-
-    // PmcInterface
-    virtual int launch(const cmdLine_t& cmdLine, const int& options);
-    virtual int terminate(const int& pid);
-    virtual int kill(const int& pid);
-};
-
-} // namespace captain
-} // namespace java
-
-#endif // PMC_H
-
--- a/javamanager/javacaptain/inc.linux/signalhandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  SignalHandler
-*
-*/
-
-#ifndef SIGNALHANDLER_H
-#define SIGNALHANDLER_H
-
-#include <pthread.h>
-
-namespace java
-{
-namespace captain
-{
-
-class SignalHandler
-{
-public:
-    SignalHandler();
-    virtual ~SignalHandler();
-
-    void start();
-    void stop();
-
-private:
-    static void* signalHandlerThread(void* aParams);
-
-    pthread_t mThreadId;
-};
-
-} // namespace captain
-} // namespace java
-
-#endif // SIGNALHANDLER_H
-
--- a/javamanager/javacaptain/inc.linux/signalhandlermessages.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  signalhandlermessages
-*
-*/
-
-#ifndef SIGNALHANDLERMESSAGES_H
-#define SIGNALHANDLERMESSAGES_H
-
-#include "logger.h"
-#include "comms.h"
-#include "commsmessage.h"
-
-using namespace java::comms;
-
-namespace java
-{
-namespace captain
-{
-// Message IDs of all installer extension services
-const int SIG_MSG_ID_SIGCHLD    = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 30;    // 130
-const int SIG_MSG_ID_SIGALRM    = SIG_MSG_ID_SIGCHLD + 1;                       // 131
-const int SIG_MSG_ID_SIGINT     = SIG_MSG_ID_SIGALRM + 1;                       // 132
-
-inline void setSignalChildMessage(CommsMessage& aMessage, const int& aPid, const int& aStatus)
-{
-    aMessage.setModuleId(PLUGIN_ID_SIGNAL_C);
-    aMessage.setMessageId(SIG_MSG_ID_SIGCHLD);
-    aMessage << aPid << aStatus;
-}
-inline void getSignalChildMessage(CommsMessage& aMessage, int& aPid, int& aStatus)
-{
-    if (aMessage.getMessageId() == SIG_MSG_ID_SIGCHLD)
-    {
-        aMessage >> aPid >> aStatus;
-    }
-    else
-    {
-        ELOG2(EJavaCaptain, "wrong MessageId!: %d should be %d",
-              aMessage.getMessageId(), SIG_MSG_ID_SIGCHLD);
-    }
-}
-
-inline void setSignalAlarmMessage(CommsMessage& aMessage)
-{
-    aMessage.setModuleId(PLUGIN_ID_SIGNAL_C);
-    aMessage.setMessageId(SIG_MSG_ID_SIGALRM);
-}
-inline void getSignalAlarmMessage(CommsMessage& aMessage)
-{
-    if (aMessage.getMessageId() != SIG_MSG_ID_SIGALRM)
-    {
-        ELOG2(EJavaCaptain, "wrong MessageId!: %d should be %d",
-              aMessage.getMessageId(), SIG_MSG_ID_SIGCHLD);
-    }
-}
-
-inline void setSignalInterruptMessage(CommsMessage& aMessage)
-{
-    aMessage.setModuleId(PLUGIN_ID_SIGNAL_C);
-    aMessage.setMessageId(SIG_MSG_ID_SIGINT);
-}
-inline void getSignalInterruptMessage(CommsMessage& aMessage)
-{
-    if (aMessage.getMessageId() != SIG_MSG_ID_SIGINT)
-    {
-        ELOG2(EJavaCaptain, "wrong MessageId!: %d should be %d",
-              aMessage.getMessageId(), SIG_MSG_ID_SIGINT);
-    }
-}
-
-} // namespace captain
-} // namespace java
-
-#endif // SIGNALHANDLERMESSAGES_H
-
--- a/javamanager/javacaptain/inc.linux/tickerprovider.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  TimerServer
-*
-*/
-
-#ifndef TICKERPROVIDER_H
-#define TICKERPROVIDER_H
-
-#include <sys/types.h>
-
-#include "tickerproviderinterface.h"
-
-namespace java
-{
-namespace captain
-{
-
-class TickerProvider : public TickerProviderInterface
-{
-public:
-    TickerProvider(TickerProviderEventsInterface* aEvents);
-    virtual ~TickerProvider();
-
-    virtual void nextTickAt(const long long& aJavaTime);
-    virtual long long getNextTickAt();
-    virtual void cancel();
-
-    // Helpers
-//    virtual long long getCurrentJavaTime();
-
-private:
-    timer_t     mTimerId;
-    long long   mNextTickAt;
-};
-
-} // namespace captain
-} // namespace java
-
-#endif // TICKERPROVIDER_H
-
--- a/javamanager/javacaptain/inc/coremessages.h	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/inc/coremessages.h	Tue May 25 12:34:19 2010 +0300
@@ -29,8 +29,9 @@
 // Message IDs of all core services
 const int CORE_MSG_ID_STOP_JAVACAPTAIN  = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 30; // 130
 const int CORE_MSG_ID_DO_THREAD_DUMP    = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 31; // 131
-const int CORE_MSG_ID_START_PREWARM     = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 32; // 133
+const int CORE_MSG_ID_START_PREWARM     = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 32; // 132
 const int CORE_MSG_ID_STOP_PREWARM      = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 33; // 133
+const int CORE_MSG_ID_GET_PREWARM       = JAVACAPTAIN_MESSAGE_ID_RANGE_START_C + 34; // 134
 
 } // namespace captain
 } // namespace java
--- a/javamanager/javacaptain/src.linux/pmc.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Pmc
-*
-*/
-
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "logger.h"
-
-#include "pmc.h"
-#include "processmanagementeventsinterface.h"
-#include "coreinterface.h"
-
-namespace java
-{
-namespace captain
-{
-
-Pmc::Pmc()
-{
-    JELOG4(EJavaCaptain, EInfo);
-}
-
-Pmc::~Pmc()
-{
-    JELOG4(EJavaCaptain, EInfo);
-}
-
-bool Pmc::start(CoreInterface* /*aCore*/,
-                ProcessManagementEventsInterface* /*aProcessManagementEventsDispatcher*/)
-{
-    JELOG4(EJavaCaptain, EInfo);
-
-    return true;
-}
-
-bool Pmc::stop()
-{
-    JELOG4(EJavaCaptain, EInfo);
-
-    return true;
-}
-
-int Pmc::launch(const cmdLine_t& cmdLine, const int& /*options*/)
-{
-    JELOG4(EJavaCaptain, EInfo);
-
-    int status = 0, pid = 0;
-
-    if (!(pid = fork()))
-    {
-        sigset_t unblock;
-        sigemptyset(&unblock);
-        sigaddset(&unblock, SIGINT);
-        int rc = pthread_sigmask(SIG_UNBLOCK, &unblock, NULL);
-        if (rc)
-        {
-            ELOG1(EJavaCaptain, "pthread_sigmask(UNBLOCK) for a child failed with %d", rc);
-        }
-
-        char** av = new char*[cmdLine.size() + 1];
-        unsigned int index;
-        for (index = 0; index < cmdLine.size() ; index++)
-        {
-            av[index] = const_cast<char*>(cmdLine[index].c_str());
-            LOG1(EJavaCaptain, EInfo, "Launch command line is: %s", av[index]);
-        }
-        av[index] = NULL;
-
-        status = execvp(av[0], av);
-
-        if (status == -1)
-        {
-            LOG1(EJavaCaptain, EError, "execvp() returned %d", status);
-            LOG2(EJavaCaptain, EError, "can't start %s, error message: %s", av[0], strerror(errno));
-        }
-        else
-        {
-            LOG1(EJavaCaptain, EInfo, "execvp() returned %d", status);
-        }
-        delete [] av;
-        exit(status);
-    }
-
-    return pid;
-}
-
-int Pmc::terminate(const int& pid)
-{
-    JELOG4(EJavaCaptain, EInfo);
-    LOG1(EJavaCaptain, EInfo, "kill(pid=%d, SIGINT)", pid);
-    ::kill(pid, SIGINT);
-    return 0;
-}
-
-int Pmc::kill(const int& pid)
-{
-    JELOG4(EJavaCaptain, EInfo);
-    LOG1(EJavaCaptain, EInfo, "kill(pid=%d, SIGKILL)", pid);
-    ::kill(pid, SIGKILL);
-    return 0;
-}
-
-} // namespace captain
-} // namespace java
-
--- a/javamanager/javacaptain/src.linux/signalhandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  SignalHandler
-*
-*/
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <pthread.h>
-#include <signal.h>
-
-#include "logger.h"
-#include "comms.h"
-#include "commsclientendpoint.h"
-
-#include "signalhandler.h"
-#include "signalhandlermessages.h"
-
-namespace java
-{
-namespace captain
-{
-
-
-SignalHandler::SignalHandler():mThreadId(0)
-{
-}
-
-SignalHandler::~SignalHandler()
-{
-}
-
-void SignalHandler::start()
-{
-    if (pthread_create(&mThreadId, 0, SignalHandler::signalHandlerThread, NULL))
-    {
-        ELOG(EJavaCaptain, "pthread_create failed for signal handler thread");
-    }
-}
-
-void SignalHandler::stop()
-{
-    kill(getpid(), SIGINT);
-    pthread_join(mThreadId, NULL);
-}
-
-void* SignalHandler::signalHandlerThread(void* /*aParams*/)
-{
-
-    CommsClientEndpoint comms;
-    if (comms.connect(IPC_ADDRESS_JAVA_CAPTAIN_C))
-    {
-        ELOG(EJavaCaptain, "Connect to main message loop failed!");
-        return NULL;
-    }
-
-    sigset_t    ss;
-    sigemptyset(&ss);
-    sigaddset(&ss, SIGCHLD);
-    sigaddset(&ss, SIGALRM);
-    sigaddset(&ss, SIGINT);
-
-    int signal = 0;
-    bool keepWaiting = true;
-    while (keepWaiting && !sigwait(&ss, &signal))
-    {
-        CommsMessage msg;
-        switch (signal)
-        {
-        case SIGCHLD:
-            LOG(EJavaCaptain, EInfo, "SIGCHLD received");
-            {
-                int status = 0;
-                pid_t pidi = 0;
-                while ((pidi=waitpid(-1, &status, WNOHANG))  > 0)
-                {
-                    LOG2(EJavaCaptain, EInfo, "SIGCHLD received - waitpid returns pid=%d status=%d", (int)pidi, status);
-
-                    LOG1(EJavaCaptain, EInfo, "WIFEXITED(status) returns %d", WIFEXITED(status));
-                    if (WIFEXITED(status))
-                    {
-                        LOG1(EJavaCaptain, EInfo, "WEXITSTATUS(status) returns %d", WEXITSTATUS(status));
-                    }
-
-                    LOG1(EJavaCaptain, EInfo, "WIFSIGNALED(status) returns %d", WIFSIGNALED(status));
-                    if (WIFSIGNALED(status))
-                    {
-                        LOG1(EJavaCaptain, EInfo, "WTERMSIG(status) returns %d", WTERMSIG(status));
-                    }
-
-                    LOG1(EJavaCaptain, EInfo, "WIFSTOPPED(status) returns %d", WIFSTOPPED(status));
-                    if (WIFSTOPPED(status))
-                    {
-                        LOG1(EJavaCaptain, EInfo, "WSTOPSIG(status) returns %d", WSTOPSIG(status));
-                    }
-
-                    LOG2(EJavaCaptain, EInfo, "initiating pmcTerminated event (pid=%d, status=%d)", (int)pidi, status);
-                    setSignalChildMessage(msg, pidi, status);
-                    comms.send(msg);
-                    LOG2(EJavaCaptain, EInfo, "initiated pmcTerminated event (pid=%d, status=%d)", (int)pidi, status);
-                }
-            }
-            break;
-
-        case SIGALRM:
-            LOG(EJavaCaptain, EInfo, "SIGALRM received");
-            setSignalAlarmMessage(msg);
-            comms.send(msg);
-            break;
-
-        case SIGINT:
-            LOG(EJavaCaptain, EInfo, "SIGINT received");
-            setSignalInterruptMessage(msg);
-            comms.send(msg);
-            keepWaiting = false;
-            break;
-
-        default:
-            ELOG1(EJavaCaptain, "Unknown signal %d sigwaited!", signal);
-        }
-    }
-    return NULL;
-}
-
-} // namespace captain
-} // namespace java
-
--- a/javamanager/javacaptain/src.linux/tickerprovider.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  TimerServer
-*
-*/
-
-
-#include <time.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <signal.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include "logger.h"
-
-#include "tickerprovider.h"
-
-namespace java
-{
-namespace captain
-{
-
-TickerProvider::TickerProvider(TickerProviderEventsInterface* aEvents)
-        :TickerProviderInterface(aEvents), mTimerId(0), mNextTickAt(0LL)
-{
-    JELOG2(EJavaCaptain);
-    int rc = timer_create(CLOCK_REALTIME, NULL, &mTimerId);
-    if (rc != 0)
-    {
-        ELOG2(EJavaCaptain, "tickerProvider timer_create failed(%d) errono=%d", rc, errno);
-        mTimerId = 0;
-    }
-}
-
-TickerProvider::~TickerProvider()
-{
-    JELOG2(EJavaCaptain);
-    if (mTimerId)
-    {
-        timer_delete(mTimerId);
-    }
-}
-
-void TickerProvider::nextTickAt(const long long& aJavaTime)
-{
-    JELOG2(EJavaCaptain);
-
-    long long periodmS = (aJavaTime - getCurrentJavaTime());
-    LOG1(EJavaCaptain, EInfo, "request %d ms from now", periodmS);
-
-    // Already or about to expire (within next 100ms)
-    if (periodmS < 100)
-    {
-        cancel();
-        kill(getpid(), SIGALRM);
-        mNextTickAt = 0LL;
-    }
-    else
-    {
-        long long periodS = periodmS/1000LL;
-        //19 Jan 2038 is maximum timer value(equal with INT_MAX) which can be set to the
-        //to the timer_settime. It is ok to set INT_MAX as value of timer in this situation.
-        //Ultimate solution would be set first INT_MAX to the timer and after expiration of that timer
-        //set rest of the timer value of the orig. timer.
-        int periodnS = 0;
-        if ((long long) INT_MAX < periodS)
-        {
-            periodS = INT_MAX;
-        }
-        else
-        {
-            periodnS = periodmS - (periodS * 1000);
-            periodnS *= 1000L; // ms -> us
-            periodnS *= 1000L; // us -> ns
-        }
-
-        LOG1(EJavaCaptain, EInfo, "nextTickAt (%ld seconds)", periodS);
-        LOG1(EJavaCaptain, EInfo, "nextTickAt (%d nanoseconds)", periodnS);
-
-        struct itimerspec value;
-        memset(&value, 0, sizeof(value));
-        int rc = timer_gettime(mTimerId, &value);
-
-        if (!rc)
-        {
-            // Start timer if it wasn't already started or was started but set too late
-            if ((!value.it_value.tv_sec && !value.it_value.tv_nsec) ||
-                    (value.it_value.tv_sec > periodS) ||
-                    (value.it_value.tv_sec == periodS && value.it_value.tv_nsec > periodnS))
-            {
-                memset(&value, 0, sizeof(value));
-                value.it_value.tv_sec = periodS;
-                value.it_value.tv_nsec = periodnS;
-                rc = timer_settime(mTimerId, 0, &value, NULL);
-                if (rc != 0)
-                {
-                    ELOG2(EJavaCaptain, "tickerProvider timer_settime failed(%d) errono=%d", rc, errno);
-                }
-                mNextTickAt = aJavaTime;
-            }
-        }
-        else
-        {
-            ELOG2(EJavaCaptain, "tickerProvider timer_gettime failed(%d) errno=%d", rc, errno);
-        }
-    }
-}
-
-long long TickerProvider::getNextTickAt()
-{
-    JELOG2(EJavaCaptain);
-
-    struct itimerspec value;
-    memset(&value, 0, sizeof(value));
-    int rc = timer_gettime(mTimerId, &value);
-
-    if (!rc)
-    {
-        // Timer was not started
-        if (!value.it_value.tv_sec && !value.it_value.tv_nsec)
-        {
-            mNextTickAt = 0LL;
-        }
-    }
-    else
-    {
-        ELOG2(EJavaCaptain, "tickerProvider timer_gettime failed(%d) errno=%d", rc, errno);
-    }
-
-    return mNextTickAt;
-}
-
-void TickerProvider::cancel()
-{
-    JELOG2(EJavaCaptain);
-
-    struct itimerspec value;
-    memset(&value, 0, sizeof(value));
-    int rc = timer_gettime(mTimerId, &value);
-
-    if (!rc)
-    {
-        // Stop timer only if it was started
-        if (value.it_value.tv_sec || value.it_value.tv_nsec)
-        {
-            memset(&value, 0, sizeof(value));
-            rc = timer_settime(mTimerId, 0, &value, NULL);
-            if (rc != 0)
-            {
-                ELOG2(EJavaCaptain, "tickerProvider timer_settime failed(%d) errono=%d", rc, errno);
-            }
-        }
-    }
-    else
-    {
-        ELOG2(EJavaCaptain, "tickerProvider timer_gettime failed(%d) errno=%d", rc, errno);
-    }
-}
-
-} // namespace captain
-} // namespace java
-
--- a/javamanager/javacaptain/src/core.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/src/core.cpp	Tue May 25 12:34:19 2010 +0300
@@ -450,7 +450,7 @@
         case CORE_MSG_ID_DO_THREAD_DUMP:
             if (aMessage.hasPermission(LAUNCH_APPLICATION))
             {
-                LOG(EJavaCaptain, EInfo, "DO_THREAD_DUMP message reveived");
+                WLOG(EJavaCaptain, "DO_THREAD_DUMP message reveived");
                 mRtc.routeMessageToAll(aMessage);
             }
             break;
@@ -471,6 +471,18 @@
             }
             break;
 
+        case CORE_MSG_ID_GET_PREWARM:
+            if (aMessage.hasPermission(STOP_APPLICATION))
+            {
+                int isSupported = (int) mRtc.isPrewarmSupported();
+                WLOG1(EJavaCaptain, "GET prewarm message received (%d)", isSupported);
+                CommsMessage reply;
+                reply.replyTo(aMessage);
+                reply << isSupported;
+                send(reply);
+            }
+            break;
+
         default:
             break;
         }
--- a/javamanager/javacaptain/src/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/src/main.cpp	Tue May 25 12:34:19 2010 +0300
@@ -60,6 +60,15 @@
 }
 #endif
 
+// In S60 working directory should be initalized to C:\private\<UID> by OpenC
+// But for some reason this does not seem to work if captain binary is in rom.
+#ifdef __SYMBIAN32__
+const char* const IAD_BOOT_FLAG   = "c:\\private\\200211DC\\iadboot.dat";
+#else
+const char* const IAD_BOOT_FLAG   = "iadboot.dat";
+#endif /* __SYMBIAN32__ */
+
+
 int main(int ac, char** av)
 {
     JELOG2(EJavaCaptain);
@@ -72,7 +81,7 @@
     if (ac == 2 && strcmp(av[1], "iad") == 0)
     {
         LOG(EJavaCaptain, EInfo, "creating iad boot event flag");
-        int fd = open("iadboot.dat", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+        int fd = open(IAD_BOOT_FLAG, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
         if (fd < 0)
         {
             ELOG1(EJavaCaptain, "create boot event flag failed: %s", strerror(errno));
--- a/javamanager/javacaptain/src/rtc.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/src/rtc.cpp	Tue May 25 12:34:19 2010 +0300
@@ -748,6 +748,11 @@
                          RTC_LAUNCH_RUNTIME_MIDP_C));
 }
 
+bool Rtc::isPrewarmSupported()
+{
+    return mSupportPreWarming;
+}
+
 void Rtc::deleteRuntime(const Uid& aUid)
 {
     JELOG4(EJavaCaptain, EInfoHeavyLoad);
--- a/javamanager/javacaptain/src/rtc.h	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javacaptain/src/rtc.h	Tue May 25 12:34:19 2010 +0300
@@ -98,6 +98,7 @@
 
     void launchPrewarm();
     void stopPrewarm();
+    bool isPrewarmSupported();
 
 private:
     // Internal versions supporting CommsMessage based extra indiation options
--- a/javamanager/javainstaller/installer/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/build/exports.inf	Tue May 25 12:34:19 2010 +0300
@@ -29,7 +29,13 @@
 
 // Generic configuration interface for javainstaller cenrep settings
 // javainstaller_102824CE implementation specifics for cenrep data
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS 
+../conf/javainstaller2.confml         APP_LAYER_CONFML(javainstaller.confml)
+../conf/CI_javainstaller.confml       APP_LAYER_CONFML(CI_javainstaller.confml)
+#else
 ../conf/javainstaller.confml          APP_LAYER_CONFML(javainstaller.confml)
+#endif /* RD_JAVA_S60_RELEASE_10_1_ONWARDS */
+
 ../conf/javainstaller_102824CE.crml   APP_LAYER_CRML(javainstaller_102824CE.crml)
 
 #endif
--- a/javamanager/javainstaller/installer/build/javainstaller.pro	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/build/javainstaller.pro	Tue May 25 12:34:19 2010 +0300
@@ -11,7 +11,7 @@
 #
 # Contributors:
 #
-# Description: 
+# Description:
 #
 
 include(../../../../inc/build_defines.pri)
@@ -63,6 +63,10 @@
         LIBS += -lQtServiceFramework
     }
 
+    contains(PROJECT_DEFINES,RD_JAVA_USIF_NOTIFY_PROGRESS) {
+        LIBS += -lsifnotification
+    }
+
     MMP_RULES += \
     "$${LITERAL_HASH}include <bldvariant.hrh>" \
     "$${LITERAL_HASH}ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK" \
--- a/javamanager/javainstaller/installer/build/javainstaller_0x2002DCB4.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/build/javainstaller_0x2002DCB4.mmp	Tue May 25 12:34:19 2010 +0300
@@ -108,6 +108,13 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		avkon.lib
+LIBRARY		gdi.lib
 
 CAPABILITY		all -tcb 
 
@@ -128,10 +135,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <bldvariant.hrh>
 
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
Binary file javamanager/javainstaller/installer/conf/CI_javainstaller.confml has changed
Binary file javamanager/javainstaller/installer/conf/javainstaller2.confml has changed
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.applicationregistrator;
-
-import com.nokia.mj.impl.installer.Installer;
-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.Log;
-import com.nokia.mj.impl.utils.Uid;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-
-/**
- * Registers (and unregisters) Java application to Linux platform.
- * OPEN: to which application registration databases does this
- * class register the Java application?
- *
- * startSession() must be called before the other methods of this
- * class can be used.
- */
-public final class ApplicationRegistrator
-{
-    // The OMJ default (Linux) icon
-    private static final String DEFAULT_ICON_NAME = "java_app.png";
-    private static final String DEFAULT_ICON_SUFFIX = ".png";
-
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Starts application registration session.
-     * The registrations and unregistrations are done only
-     * when commitSession is called.
-     * If you want to discard the registrations and unregistrations
-     * call rollbackSession.
-     * Does nothing if session has already been successfully started
-     * from this ApplicationRegistrator instance.
-     *
-     * @throws InstallerException if the session cannot created
-     * @see commitSession
-     * @see rollbackSession
-     */
-    public void startSession()
-    {
-
-    }
-
-    /**
-     * Registers one Java application to Linux.
-     *
-     * @param aAppRegInfo Information needed to register the application
-     * @throws InstallerException if registration cannot done or
-     *  startSession has not been called successfully
-     * @see startSession
-     * @see AppRegInfo
-     */
-    public void registerApplication(AppRegInfo aAppRegInfo)
-    {
-    }
-
-    /**
-     * Unregisters one Java application from Linux.
-     *
-     * @param aAppRegInfo Information needed to unregister the application
-     * @throws InstallerException if unregistration cannot done or
-     *  startSession has not been called successfully
-     * @see startSession
-     * @see AppRegInfo
-     */
-    public void unregisterApplication(AppRegInfo aAppRegInfo)
-    {
-    }
-
-    /**
-     * Commits the registrations and unregistrations.
-     * Ends the current session if commit is successfull.
-     * If commit fails the session is kept open so that
-     * rollbackSession can be called.
-     *
-     * @param aSynchronous if true, makes synchronous commit
-     *
-     * @throws InstallerException if session cannot be committed
-     */
-    public void commitSession(boolean aSynchronous)
-    {
-    }
-
-    /**
-     * Rolls back the registrations and unregistrations.
-     * Ends the current session.
-     *
-     * @throws InstallerException if session cannot be rolled back.
-     *  If exception is thrown the session is closed but you can
-     *  still call rollbackSession.
-     */
-    public void rollbackSession()
-    {
-    }
-
-    /**
-     * Closes the current session.
-     * If registerApplication or unregisterApplication has been called,
-     * commitSession or rollbackSession must be called instead of this method.
-     */
-    public void closeSession()
-    {
-    }
-
-
-    /**
-     * Checks whether the Uid is in use from Linux.
-     *
-     * @param aUid The Uid of the application.
-     * @return true if the Uid is already in use
-     * @throws InstallerException if checking cannot be done
-     */
-    public boolean uidInUse(Uid aUid)
-    {
-        // Cannot yet check whether Uid is in use in Linux
-        return false;
-    }
-
-    /**
-     * Returns the logical group name for an installed application.
-     *
-     * @param aUid The Uid of the application.
-     * @return the group name of the application. Can be empty string.
-     * @throws InstallerException if the group name cannot be returned
-     */
-    public String getGroupName(Uid aUid)
-    {
-        if (aUid.getStringValue() == null)
-        {
-            return "";
-        }
-
-        // Missing actual implementation
-        return "";
-    }
-
-    /**
-     * 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, e.g. '.png'
-     * @return true if the conversion succeeds
-     */
-    public boolean convertIcon(
-        String aInputIconFilename,
-        String aOutputIconFilename,
-        String aJarFilename,
-        StringBuffer aIconSuffix)
-    {
-        // In Linux it should be enough to extract the (PNG) icon
-        // from the .jar file and store it to 'aOutputIconFilename'
-
-        if ((aInputIconFilename == null) ||
-                (aInputIconFilename.length() == 0) ||
-                (aOutputIconFilename == null) ||
-                (aOutputIconFilename.length() == 0))
-        {
-            return false;
-        }
-
-        if ((aJarFilename == null) || (aJarFilename.length() == 0))
-        {
-            // Icon is already in a standalone file, just copy it to
-            // correct place
-            InputStream fis = null;
-            OutputStream fos = null;
-            try
-            {
-                if (!FileUtils.exists(aInputIconFilename))
-                {
-                    return false;
-                }
-
-                fis  = FileUtils.getInputStream(aInputIconFilename);
-                fos = FileUtils.getOutputStream(aOutputIconFilename);
-                // Typically icon size is small, 4Kb should be enough
-                byte[] buf = new byte[4096];
-                int i = 0;
-                while ((i = fis.read(buf)) != -1)
-                {
-                    fos.write(buf, 0, i);
-                }
-            }
-            catch (IOException ioe)
-            {
-                return false;
-            }
-            finally
-            {
-                if (fis != null)
-                {
-                    try
-                    {
-                        fis.close();
-                    }
-                    catch (IOException ioe2) {}
-                }
-                if (fos != null)
-                {
-                    try
-                    {
-                        fos.close();
-                    }
-                    catch (IOException ioe3) {}
-                }
-            }
-
-            // Return the original suffix of the icon
-            // if Linux requires it to recognise the correct
-            // type of the icon
-
-            return true;
-        }
-        else
-        {
-            // Must extract the icon from .jar file
-            return false;
-        }
-    }
-
-    /**
-     * Return path to the default icon
-     *
-     * @return full path name to the default  icon
-     */
-    public String getDefaultIconPath()
-    {
-        return FileRoots.getResourceDir() + DEFAULT_ICON_NAME;
-    }
-
-    /**
-     * Return file suffix of the default icon
-     *
-     * @return file suffix of the default icon ('.png' in Linux)
-     */
-    public String getDefaultIconSuffix()
-    {
-        return DEFAULT_ICON_SUFFIX;
-    }
-
-    /**
-     * Returns true if the current device is touch screen
-     * device without physical LSK and RSK
-     *
-     * @return true if Installer should store the value of
-     *  Nokia-MIDlet-On-Screen-Keypad to Storage
-     */
-    public boolean isOnDeviceKeypadNeeded()
-    {
-        return false;
-    }
-
-    /**
-     * Sends a process to process notification to the parent process
-     * of Java Installer telling that Installer is about to start
-     * displaying UI dialogs.
-     * The parent process reacts to the notification by hiding its
-     * installation related dialogs.
-     */
-    public void notifyLauncherThatUiIsReady()
-    {
-        return;
-    }
-
-
-    /*** ---------------------------- PROTECTED --------------------------- */
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/SifNotifier.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.applicationregistrator;
-
-import com.nokia.mj.impl.installer.utils.InstallerException;
-import com.nokia.mj.impl.installer.utils.Log;
-
-/**
- * Sends installation and uninstallation progress notifications
- * to platform's software installation framework.
- */
-public final class SifNotifier
-{
-    /** Install operation. */
-    public static final int OP_INSTALL = 1;
-    /** Uninstall operation. */
-    public static final int OP_UNINSTALL = 2;
-    /** Update operation. */
-    public static final int OP_UPDATE = 3;
-
-    /** Indicates installaion or uninstallation without
-        specific suboperation. */
-    public static final int SUB_OP_NO = 1;
-    /** OCSP phase during installation. */
-    public static final int SUB_OP_OCSP = 2;
-    /** Download phase during installation. */
-    public static final int SUB_OP_DOWNLOAD = 3;
-
-    /** Operation being notified. */
-    private int iOperation = 0;
-    /** Global component id for the application. */
-    private String iGlobalComponentId = null;
-    /** Component name (i.e. suite name). */
-    private String iComponentName = null;
-    /** Application names. */
-    private String[] iApplicationNames = null;
-    /** Applications icons. */
-    private String[] iApplicationIcons = null;
-    /** Component initial size. */
-    private int iComponentSize = 0;
-    /** Icon dir. */
-    private String iIconDir = null;
-    /** Component icon. */
-    private String iComponentIcon = null;
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Constructor.
-     */
-    public SifNotifier()
-    {
-    }
-
-    /**
-     * Returns true if SIF progress notifications are enabled, false otherwise.
-     */
-    public static boolean enabled()
-    {
-        return false;
-    }
-
-    /*
-     * Notifies SIF that installation or uninstallation has started.
-     *
-     * @throws InstallerException in case an error occurs
-     */
-    public void notifyStart(
-        int aOperation, String aGlobalComponentId, String aComponentName,
-        String[] aApplicationNames, String[] aApplicationIcons,
-        int aComponentSize, String aIconDir, String aComponentIcon)
-    {
-        iOperation = aOperation;
-        iGlobalComponentId = aGlobalComponentId;
-        iComponentName = aComponentName;
-        iApplicationNames = aApplicationNames;
-        iApplicationIcons = aApplicationIcons;
-        iComponentSize = aComponentSize;
-        iIconDir = aIconDir;
-        iComponentIcon = aComponentIcon;
-    }
-
-    /**
-     * Notifies SIF that installation or uinstallation has ended.
-     *
-     * @throws InstallerException in case an error occurs
-     */
-    public void notifyEnd(
-        int aErrCategory, int aErrCode, String aErrMsg, String aErrMsgDetails)
-    {
-    }
-
-    /**
-     * Notifies SIF about installation or uninstallation progress.
-     *
-     * @throws InstallerException in case an error occurs
-     */
-    public void notifyProgress(int aSubOperation, int aCurrent, int aTotal)
-    {
-    }
-
-    /**
-     * Destroys SifNotifier. This method releawse native resources and
-     * must be called after SifNotifier is no longer used.
-     *
-     * @throws InstallerException in case an error occurs
-     */
-    public void destroy()
-    {
-    }
-
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* 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"
-* 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.applicationregistrator;
-
-import com.nokia.mj.impl.installer.storagehandler.ApplicationInfo;
-import com.nokia.mj.impl.installer.storagehandler.SuiteInfo;
-import com.nokia.mj.impl.installer.utils.ComponentId;
-import com.nokia.mj.impl.installer.utils.InstallerException;
-import com.nokia.mj.impl.installer.utils.Log;
-import com.nokia.mj.impl.utils.Uid;
-
-/**
- * Registers (and unregisters) Java application to platform's
- * software installation framework.
- */
-public final class SifRegistrator
-{
-    /** Added application. Used with notifyAppChange() method. */
-    public static final int APP_ADDED = 0;
-    /** Removed application. Used with notifyAppChange() method. */
-    public static final int APP_REMOVED = 1;
-    /** Updated application. Used with notifyAppChange() method. */
-    public static final int APP_UPDATED = 2;
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Returns greater than zero if application registration to
-     * software installation framework is enabled.
-     */
-    public static int getSifMode()
-    {
-        return 0;
-    }
-
-    /**
-     * Launches the application view. If launching application view
-     * fails this method does not throw exception but produces an
-     * error log entry.
-     */
-    public static void launchAppView()
-    {
-    }
-
-    /**
-     * Notifies system about added/updated/removed applications.
-     * This method should be called only after the changes have been
-     * committed.
-     *
-     * @param aAppUids application uids
-     * @param aAppChange change type: APP_ADDED, APP_UPDATED, or APP_REMOVED
-     * @throws InstallerException if notification fails
-     */
-    public static void notifyAppChange(Uid[] aAppUids, int aAppChange)
-    {
-    }
-
-    /**
-     * Get component uid basing on component id.
-     *
-     * @param aCid component id
-     * @return uid for the component, or null if component is not found
-     * @throws InstallerException if an error occurs
-     */
-    public static Uid getUid(int aCid)
-    {
-        return null;
-    }
-
-    /**
-     * Registers or unregisters Java software type to software
-     * installation framework.
-     *
-     * @param aRegister true for registration, false for unregistration
-     */
-    public static void registerJavaSoftwareType(boolean aRegister)
-    {
-    }
-
-    /**
-     * Starts application registration session.
-     * The registrations and unregistrations are done only
-     * when commitSession is called.
-     * If you want to discard the registrations and unregistrations
-     * call rollbackSession.
-     * Does nothing if session has already been successfully started
-     * from this SifRegistrator instance.
-     *
-     * @param aTransaction true if also transaction for this session should
-     * be opened, false otherwise
-     * @throws InstallerException if the session cannot created
-     * @see commitSession
-     * @see rollbackSession
-     */
-    public void startSession(boolean aTransaction)
-    {
-    }
-
-    /**
-     * Registers Java application suite.
-     *
-     * @param aRegInfo Information needed to register the application
-     * @param aIsUpdate true in case of an update, false in case of a new
-     * installation
-     * @throws InstallerException if registration cannot done or
-     *  startSession has not been called successfully
-     * @see startSession
-     * @see SuiteInfo
-     */
-    public void registerSuite(SuiteInfo aSuiteInfo, boolean aIsUpdate)
-    {
-    }
-
-    /**
-     * Unregisters Java application suite.
-     *
-     * @param aRegInfo Information needed to unregister the application,
-     * @throws InstallerException if unregistration cannot done or
-     *  startSession has not been called successfully
-     * @see startSession
-     * @see SuiteInfo
-     */
-    public void unregisterSuite(SuiteInfo aSuiteInfo)
-    {
-    }
-
-    /**
-     * Commits the registrations and unregistrations.
-     * Ends the current session if commit is successfull.
-     * If commit fails the session is kept open so that
-     * rollbackSession can be called.
-     *
-     * @throws InstallerException if session cannot be committed
-     */
-    public void commitSession()
-    {
-    }
-
-    /**
-     * Rolls back the registrations and unregistrations.
-     * Ends the current session.
-     *
-     * @throws InstallerException if session cannot be rolled back.
-     */
-    public void rollbackSession()
-    {
-    }
-
-    /**
-     * Closes the current session if it still open.
-     * If registerComponent or unregisterComponent has been called,
-     * commitSession or rollbackSession must be called instead of this method.
-     */
-    public void closeSession()
-    {
-    }
-
-    /**
-     * Returns the component id of the application.
-     *
-     * @param aGlobalId the global id for the application.
-     * @return the component id for the application, or null if the
-     * application with given global id cannot be found.
-     * @throws InstallerException if an error occurs
-     */
-    public ComponentId getComponentId(String aGlobalId)
-    {
-        return null;
-    }
-
-    /**
-     * Returns the component id of the application.
-     *
-     * @param aAppUid the uid for the application.
-     * @return the component id for the application, or null if the
-     * application with given uid cannot be found.
-     * @throws InstallerException if an error occurs
-     */
-    public ComponentId getComponentId(Uid aAppUid)
-    {
-        return null;
-    }
-
-    /**
-     * Writes information of the given application to JavaInstaller log.
-     *
-     * @param aGlobalId the global id for the application.
-     */
-    public void logComponent(String aGlobalId)
-    {
-    }
-
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/customisationproperties/CustomisationProperties.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.customisationproperties;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-/**
- * Fetches product program/operator specific customizable settings.
- * In Linux platform some of these are fetched from ???
- */
-public final class CustomisationProperties extends CustomisationPropertiesBase
-{
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    public CustomisationProperties()
-    {
-        // Load the real value of the properties from system
-        super();
-
-        Vector value = new Vector(5);
-        // contains Integers, used to add Integer values to iProperties
-        Vector integerValue = new Vector(5);
-
-        value.addElement("/");
-        iProperties.put(DefaultInstallationDrive, value);
-        integerValue.addElement(new Integer(-1));  // Linux version understands this
-        iProperties.put(IntegerPropertyPrefix + DefaultInstallationDrive, integerValue);
-
-        value = new Vector(5);
-        value.addElement("/");
-        iProperties.put(PossibleInstallationDrives, value);
-        integerValue = new Vector(5);
-        integerValue.addElement(new Integer(-1));  // Linux version understands this
-        iProperties.put(IntegerPropertyPrefix + PossibleInstallationDrives, integerValue);
-
-        value = new Vector(5);
-        value.addElement("Applications");
-        iProperties.put(DefaultInstallationFolder, value);
-
-        value = new Vector(5);
-        value.addElement("Applications");
-        value.addElement("Games");
-        iProperties.put(PossibleInstallationFolders, value);
-
-        value = new Vector(5);
-        value.addElement("Nokia-MIDlet-Category");
-        iProperties.put(ShellFolderAttributeNames, value);
-
-        value = new Vector(5);
-        value.addElement("/");
-        iProperties.put(PreinstalledDefaultDrive, value);
-        integerValue = new Vector(5);
-        integerValue.addElement(new Integer(-1));  // Linux version understands this
-        iProperties.put(IntegerPropertyPrefix + PreinstalledDefaultDrive, integerValue);
-    }
-
-    /*** ----------------------------- PRIVATE ---------------------------- */
-
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/jadjarmatcher/JadJarMatcher.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.jadjarmatcher;
-
-import com.nokia.mj.impl.installer.utils.InstallerException;
-import com.nokia.mj.impl.installer.utils.Log;
-
-
-/**
- * JadJarMatcher offers services for finding Jar when Jad filename is known,
- * and finding Jad when Jar filename is known.  JadJarMatcher only searches
- * files from local folders.
- */
-public final class JadJarMatcher extends JadJarMatcherBase
-{
-    /*** ----------------------------- PUBLIC ------------------------------ */
-    /*** ---------------------------- PROTECTED --------------------------- */
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifier.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.jsrpluginnotifier;
-
-import com.nokia.mj.impl.installer.integrityservice.IntegrityService;
-import com.nokia.mj.impl.installer.utils.FileUtils;
-import com.nokia.mj.impl.installer.utils.InstallerException;
-import com.nokia.mj.impl.installer.utils.Log;
-
-
-/**
- * Calls Installer Jsr Plugins when Java application is
- * installed / uninstalled or installation / uninstallation
- * is rolled back. Linux specific implementation.
- *
- * @see JsrPluginNotifierBase
- */
-public final class JsrPluginNotifier extends JsrPluginNotifierBase
-{
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Constructor initializes member variables and loads
-     * Jsr plugins if any has been defined in the text config file.
-     *
-     * @param aIntegrityService needed for possible file operations
-     */
-    public JsrPluginNotifier(IntegrityService aIntegrityService)
-    {
-        super();
-        loadAllJsrPlugins();
-    }
-
-    /*** ----------------------------- PRIVATE ---------------------------- */
-
-    /**
-     * Read the class names of the Jsr plugins from text file in Linux
-     * specific location. Base class implementation will read and
-     * initialize the Jsr plugins.
-     *
-     * @throws InstallerException if internal class InstallerExtension
-     *   cannot be loaded
-     */
-    protected void loadAllJsrPlugins()
-    {
-        String configFile = FileUtils.getInstallerRoot() + iConfigFileName;
-        if (FileUtils.exists(configFile))
-        {
-            // Call the base class implementation that will
-            // read the class names from text file,
-            // load the plugin classes, instantiate them and
-            // store them to a member variable
-            loadAllJsrPlugins(configFile);
-        }
-
-        // No jsr plugin config file, do nothing.
-        Log.log("Jsr plugin config file " + configFile + " does not exist.");
-        return;
-    }
-
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/FileRoots.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* 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"
-* 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.utils;
-
-public class FileRoots
-{
-    /**
-     * Returns string describing current platform.
-     */
-    public static String getPlatform()
-    {
-        return "linux";
-    }
-
-    /**
-     * Returns the folder that contains the Java applications
-     * to be preinstalled in Linux.
-     * Currently preinstallation is supported only in
-     * S60.
-     */
-    public static String getPreinstallDir()
-    {
-        return "";
-    }
-
-    /**
-     * Returns preinstallation drive for given filename.
-     * Filename must contain full path including drive letter.
-     */
-    public static int getPreinstallDrive(String aFilename)
-    {
-        // Drive letters are not used in Linux.
-        return -1;
-    }
-
-    /**
-     * Returns directory where the icons registered to
-     * platform should be copied in linux.
-     */
-    public static String getRegisteredIconDir(int aDrive)
-    {
-        return getResourceDir();
-    }
-
-    /**
-     * Returns the directory that contains the resources
-     * needed by Java Installer, e.g. 'trusted' icon
-     */
-    public static String getResourceDir()
-    {
-        return System.getProperty("JAVA_BIN_ROOT") + "/resources/";
-    }
-
-    /**
-     * Returns root folder for MIDP runtime in linux.
-     */
-    public static String getMidpRoot()
-    {
-        return System.getProperty("JAVA_BIN_ROOT");
-    }
-
-    /**
-     * Returns root folder for applications in linux.
-     */
-    static String getAppsRoot()
-    {
-        return getMidpRoot() + "apps/";
-    }
-
-    /**
-     * Returns installer root folder in linux.
-     */
-    static String getInstallerRoot()
-    {
-        return getMidpRoot() + "installer/";
-    }
-
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/FileWriter.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.utils;
-
-import com.nokia.mj.impl.installer.utils.FileUtils;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This class provides means to create a forward locked file, that is a
- * file which can only be used in the device in which the file is created.
- */
-public final class FileWriter
-{
-    /** MIME type for the file contents. */
-    private String iMimeType = null;
-    /** Suggested filename. */
-    private String iSuggestedFilename = null;
-    /** Filename chosen by DRM framework. */
-    private String iOutputFilename = null;
-    /** True if the file is written as forward locked, false otherwise. */
-    private boolean iLocked = false;
-    /** OutputStream for the file. */
-    private OutputStream iOut = null;
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    /**
-     * Constructor.
-     *
-     * @param aMimeType MIME type for the file contents.
-     * @param aSuggestedFilename suggested filename
-     * @param aLocked true if the file should be written as encrypted
-     * (forward locked), false if the file should be written as unencrypted
-     * (not forward locked).
-     */
-    public FileWriter(
-        String aMimeType, String aSuggestedFilename, boolean aLocked)
-    {
-        iMimeType = aMimeType;
-        iSuggestedFilename = aSuggestedFilename;
-        iLocked = aLocked;
-    }
-
-    /**
-     * Creates a new file. After calling create file can be written to.
-     */
-    public void create() throws IOException
-    {
-        iOut = FileUtils.getOutputStream(iSuggestedFilename);
-    }
-
-    /**
-     * Writes given bytes to the file.
-     *
-     * @param aBytes array of bytes to write
-     * @param aOffset the start offset in aBytes array
-     * @param aLength number of bytes to write
-     */
-    public void write(byte[] aBytes, int aOffset, int aLength) throws IOException
-    {
-        if (null == iOut)
-        {
-            throw new IOException(
-                "FileWriter write called before create.");
-        }
-        iOut.write(aBytes, aOffset, aLength);
-    }
-
-    /**
-     * Closes the file.
-     */
-    public void close() throws IOException
-    {
-        if (null == iOut)
-        {
-            throw new IOException(
-                "FileWriter close called before create.");
-        }
-        iOut.close();
-        iOut = null;
-        iOutputFilename = iSuggestedFilename;
-    }
-
-    /**
-     * Returns filename that the DRM framework allocated.
-     * This method can be called only after file has been close.
-     */
-    public String getOutputFilename()
-    {
-        return iOutputFilename;
-    }
-
-    /*** ---------------------------- PROTECTED --------------------------- */
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/PlatformUid.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.utils;
-
-import com.nokia.mj.impl.installer.utils.Log;
-import com.nokia.mj.impl.utils.InstallerDetailedErrorMessage;
-import com.nokia.mj.impl.utils.InstallerErrorMessage;
-import com.nokia.mj.impl.utils.OtaStatusCode;
-import com.nokia.mj.impl.utils.Uid;
-import com.nokia.mj.impl.utils.exception.InvalidAttributeException;
-
-import java.util.Random;
-
-/**
- * Unique identifier for Linux platform.
- */
-public class PlatformUid extends Uid
-{
-    private static final String UID_PREFIX = "java";
-
-    private static Random iRandom = null;
-
-    private int iIntValue = -1;
-
-    /**
-     * Default constructor.
-     */
-    protected PlatformUid()
-    {
-        super();
-    }
-
-    /**
-     * Constructor.
-     */
-    protected PlatformUid(String aValue)
-    {
-        super(aValue);
-    }
-
-    /**
-     * Creates a new Uid object from given string.
-     * If given string is not a valid Uid, returns null.
-     */
-    public static Uid createUid(String aValue)
-    {
-        if (aValue == null || aValue.length() == 0)
-        {
-            return null;
-        }
-        String value = aValue;
-        if (value.startsWith(UID_PREFIX))
-        {
-            value = value.substring(UID_PREFIX.length());
-        }
-        Uid uid = null;
-        try
-        {
-            uid = createUid(Integer.parseInt(value));
-        }
-        catch (NumberFormatException nfe)
-        {
-            uid = new PlatformUid(aValue);
-        }
-        return uid;
-    }
-
-    /**
-     * Creates a new Uid object from given int.
-     */
-    public static Uid createUid(int aIntValue)
-    {
-        PlatformUid uid = new PlatformUid(
-            UID_PREFIX + Integer.toString(aIntValue));
-        uid.iIntValue = aIntValue;
-        return uid;
-    }
-
-    /**
-     * Checks that given Uid is valid.
-     */
-    public static void checkValidity(
-        String aAttrName, Uid aUid, boolean aTrusted,
-        boolean aExistsInJad, boolean aExistsInJar)
-    {
-        // For trusted application Uid must be specified in Jar.
-        if (aTrusted && !aExistsInJar)
-        {
-            Log.logError("For trusted application Uid must be specified in Jar: " +
-                         aAttrName + ": " + aUid.toString());
-            throw new InvalidAttributeException
-            (InstallerErrorMessage.INST_CORRUPT_PKG, null,
-             InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
-             new String[] { aAttrName }, OtaStatusCode.INVALID_JAR);
-        }
-    }
-
-    /**
-     * Generates a Uid from allowed Uid range.
-     * If given "previous Uid" is not null, returns the next Uid
-     * following the "previous Uid".
-     */
-    public static Uid generateUid(Uid aPreviousUid, String aSeed)
-    {
-        // Set uid limits.
-        final int javaUidLowerLimit = 0;
-        final int javaUidUpperLimit = 1000000;
-
-        int i = -1;
-        if (aPreviousUid != null && aPreviousUid instanceof PlatformUid)
-        {
-            i = ((PlatformUid)aPreviousUid).iIntValue + 1;
-            if (i >= javaUidUpperLimit)
-            {
-                i = javaUidLowerLimit;
-            }
-        }
-        else
-        {
-            if (aSeed != null)
-            {
-                iRandom = new Random(aSeed.hashCode());
-            }
-            if (iRandom == null)
-            {
-                iRandom = new Random();
-            }
-            int r = iRandom.nextInt();
-            // Ensure that generated random number is positive.
-            if (r < 0)
-            {
-                r = -r;
-            }
-            i = javaUidLowerLimit + (r % (javaUidUpperLimit - javaUidLowerLimit));
-        }
-        return createUid(i);
-    }
-
-    /**
-     * Returns int value for a uid.
-     */
-    public static int getIntValue(Uid aUid)
-    {
-        if (aUid == null)
-        {
-            throw new NullPointerException(
-                "PlatformUid.getIntValue: uid is null");
-        }
-        int result = -1;
-        if (aUid instanceof PlatformUid)
-        {
-            result = ((PlatformUid)aUid).iIntValue;
-        }
-        return result;
-    }
-}
--- a/javamanager/javainstaller/installer/javasrc.linux/com/nokia/mj/impl/installer/utils/SysUtil.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.installer.utils;
-
-import com.nokia.mj.impl.installer.utils.InstallerException;
-import com.nokia.mj.impl.installer.utils.Log;
-import com.nokia.mj.impl.installer.utils.PlatformUid;
-import com.nokia.mj.impl.utils.Uid;
-
-import java.util.Vector;
-
-/**
- * SysUtil provides system utility services.
- */
-public final class SysUtil
-{
-    /*** ----------------------------- PUBLIC ------------------------------ */
-
-    // Property categories.
-    public static final Uid PROP_CATEGORY_SYSTEM =
-        PlatformUid.createUid("0x101f75b6");
-
-    // Property keys.
-    public static final long PROP_KEY_JAVA_LATEST_INSTALLATION = 0x10282567;
-    public static final long PROP_KEY_JAVA_LATEST_INSTALLATION_PROGRESS = 0x20019546;
-    public static final long PROP_KEY_JAVA_LATEST_INSTALLATION_STATE = 0x20019547;
-
-    // Repository ids.
-    public static final Uid REPO_ID_JAVA_INST_VARIATION =
-        PlatformUid.createUid("0x102824CE");
-
-    // Repository keys.
-    public static final long REPO_KEY_JAVA_INST_SHELL_FOLDER_ATTR = 0x00000001;
-    public static final long REPO_KEY_JAVA_INST_SHELL_FOLDER_VALUE = 0x00000002;
-    //public static final long REPO_KEY_JAVA_PREINST_DEF_DRIVE = 0x00000003;
-    public static final long REPO_KEY_JAVA_INST_DEF_INST_DRIVE = 0x00000004;
-
-    // Process states.
-    public static final int PROC_STATE_ALIVE = 1;
-
-    /**
-     * Define property. Property must be defined before it
-     * can be used. It is enough to define property once.
-     * If property has already been defined, this method does
-     * not have any effect.
-     *
-     * @param aCategory uid that defines the property category
-     * @param aKey key that identifies the specific property within the category
-     * @throws InstallerException if error occurs
-     */
-    public static void defineProperty(Uid aCategory, long aKey)
-    {
-        // nop
-    }
-
-    /**
-     * Delete property. After deletion property cannot be used
-     * before it is defined again. If property has not been defined,
-     * this method does not have any effect.
-     *
-     * @param aCategory uid that defines the property category
-     * @param aKey key that identifies the specific property within the category
-     * @throws InstallerException if error occurs
-     */
-    public static void deleteProperty(Uid aCategory, long aKey)
-    {
-        // nop
-    }
-
-    /**
-     * Get property value.
-     *
-     * @param aCategory uid that defines the property category
-     * @param aKey key that identifies the specific property within the category
-     * @return property value
-     * @throws InstallerException if error occurs
-     */
-    public static int getPropertyValue(Uid aCategory, long aKey)
-    {
-        return 0;
-    }
-
-    /**
-     * Set property value.
-     *
-     * @param aCategory uid that defines the property category
-     * @param aKey key that identifies the specific property within the category
-     * @param aValue property value
-     * @throws InstallerException if error occurs
-     */
-    public static void setPropertyValue(Uid aCategory, long aKey, int aValue)
-    {
-        // nop
-    }
-
-    /**
-     * Set property value from given Uid.
-     *
-     * @param aCategory uid that defines the property category
-     * @param aKey key that identifies the specific property within the category
-     * @param aValue property value
-     * @throws InstallerException if error occurs
-     */
-    public static void setPropertyValue(Uid aCategory, long aKey, Uid aValue)
-    {
-        // nop
-    }
-
-    /**
-     * Get repository value.
-     *
-     * @param aRepository uid that defines the repository
-     * @param aKey key that identifies the setting in the repository
-     * @return repository value
-     * @throws InstallerException if error occurs
-     */
-    public static int getRepositoryValue(Uid aRepository, long aKey)
-    {
-        return 0;
-    }
-
-    /**
-     * Get repository string value.
-     *
-     * @param aRepository uid that defines the repository
-     * @param aKey key that identifies the setting in the repository
-     * @return repository value
-     * @throws InstallerException if error occurs
-     */
-    public static String getRepositoryStringValue(Uid aRepository, long aKey)
-    {
-        return "";
-    }
-
-    /**
-     * Set repository value.
-     *
-     * @param aCategory uid that defines the repository
-     * @param aKey key that identifies the setting in the repository
-     * @param aValue repository value
-     * @throws InstallerException if error occurs
-     */
-    public static void setRepositoryValue(Uid aCategory, long aKey, int aValue)
-    {
-        // nop
-    }
-
-    /**
-     * Set repository string value.
-     *
-     * @param aCategory uid that defines the repository
-     * @param aKey key that identifies the setting in the repository
-     * @param aValue repository value
-     * @throws InstallerException if error occurs
-     */
-    public static void setRepositoryStringValue(Uid aCategory, long aKey, String aValue)
-    {
-        // nop
-    }
-
-    /**
-     * Get drive's unique identifying number.
-     *
-     * @param aDrive drive for which unique id is requested (0 = A, 1 = B, etc.)
-     * @return drive unique id
-     * @throws InstallerException if error occurs
-     */
-    public static int getDriveUniqId(int aDrive)
-    {
-        return -1;
-    }
-
-    /**
-     * Checks if drive is present.
-     *
-     * @param aDrive drive for which presence is requested (0 = A, 1 = B, etc.)
-     * @return true if drive is present, false otherwise
-     * @throws InstallerException if error occurs
-     */
-    public static boolean isDrivePresent(int aDrive)
-    {
-        return true;
-    }
-
-    /**
-     * Checks if drive is read only drive.
-     *
-     * @param aDrive drive for which R/O state is requested (0 = A, 1 = B, etc.)
-     * @return true if drive is read only, false otherwise
-     * @throws InstallerException if error occurs
-     */
-    public static boolean isDriveReadOnly(int aDrive)
-    {
-        return false;
-    }
-
-    /**
-     * Returns the drives that are visible to the user and where
-     * the user can install java applications to.
-     *
-     * @param aVisibleDrives After return contains the user visible
-     *  drives as DriveInfo objects
-     * @throws InstallerException if error occurs
-     * @see DriveInfo
-     */
-    public static void getUserVisibleDrives(Vector aVisibleDrives)
-    {
-        // Make sure the vector does not contain any old values
-        aVisibleDrives.removeAllElements();
-    }
-
-    /**
-     * Checks if disk space is below critical level.
-     *
-     * @param aBytesToWrite Number of bytes the caller is about to write to
-     * disk. If value 0 is given, this method checks if the current
-     * disk space is already below critical level.
-     * @param aDrive drive for which disk space is requested (0 = A, 1 = B, etc.)
-     * @return true if disk space is below critical level, false otherwise
-     * @throws InstallerException if error occurs
-     */
-    public static boolean isDiskSpaceBelowCriticalLevel(
-        int aBytesToWrite, int aDrive)
-    {
-        return false;
-    }
-
-    /**
-     * Returns state of the process with given uid.
-     *
-     * @param aUid process uid
-     * @return PROC_STATE_ALIVE if process is alive, 0 otherwise.
-     * @throws InstallerException if error occurs
-     */
-    public static int getProcessState(Uid aUid)
-    {
-        return 0;
-    }
-
-    /**
-     * Get screen width in pixels.
-     *
-     * @return screen width in pixels
-     * @throws InstallerException if error occurs
-     */
-    public static int getScreenWidth()
-    {
-        // Return proper screen width in Linux.
-        return 360;
-    }
-
-    /**
-     * Get screen heigth in pixels.
-     *
-     * @return screen height in pixels
-     * @throws InstallerException if error occurs
-     */
-    public static int getScreenHeight()
-    {
-        // Return proper screen height in Linux.
-        return 640;
-    }
-    /*** ---------------------------- PROTECTED --------------------------- */
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/InstallerResultMessage.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/InstallerResultMessage.java	Tue May 25 12:34:19 2010 +0300
@@ -426,7 +426,7 @@
             addValue(NAME_ERROR_CATEGORY, 10); // EUninstallationBlocked
             break;
         default:
-            addValue(NAME_ERROR_CATEGORY, 11); // EUnknown
+            addValue(NAME_ERROR_CATEGORY, 8); // EUnexpectedError
         }
     }
 }
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/exetable/ExeBall.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/exetable/ExeBall.java	Tue May 25 12:34:19 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -115,6 +115,16 @@
     }
 
     /**
+     * Called when InstallerUi is hidden or unhidden.
+     *
+     * @param aHidden true if UI was hidden, false if UI was unhidden.
+     */
+    public void uiIsHidden(boolean aHidden)
+    {
+        // This method is overriden in InstallBall class.
+    }
+
+    /**
      * Called when user cancels the execution from the InstallerUi.
      * This method must return quickly.
      */
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/UninstallBall.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/UninstallBall.java	Tue May 25 12:34:19 2010 +0300
@@ -167,6 +167,11 @@
             // No UI in silent mode.
             return null;
         }
+        if (SifRegistrator.getSifMode() > 0)
+        {
+            // No UI in uinstallation when SifMode > 0.
+            return null;
+        }
         if (iInstallerUi == null)
         {
             iInstallerUi = InstallerUiFactory.getInstallerUi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Permission object for managing access to auto start feature
+*
+*/
+
+
+
+package com.nokia.mj.impl.installer.utils;
+
+import java.security.Permission;
+import java.security.PermissionCollection;
+import com.nokia.mj.impl.security.common.PermissionBase;
+
+/**
+ * Permission class representing the token access to auto start functionality.
+ *
+ */
+public class AutoStartPermission extends PermissionBase
+{
+    /**
+     * Constructor
+     *
+     */
+    public AutoStartPermission()
+    {
+        super(null);
+    }
+
+    /**
+     * Returns the question (as localized text) associated with the security
+     * prompt
+     *
+     * @return the localized text associated with the security prompt
+     */
+    public String getSecurityPromptQuestion(int aInteractionMode)
+    {
+        // no prompt details supported yet
+        return null;
+    }
+
+    /**
+     * Only implies permission objects of same instance
+     */
+    public boolean implies(Permission p)
+    {
+        if (p instanceof AutoStartPermission)
+        {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * String representation of the permission
+     */
+    public String toString()
+    {
+        return "javax.microedition.midlet.AutoStartPermission";
+    }
+    
+    /**
+     * Don't allow cloning
+     */
+    public boolean equals(Object obj)
+    {
+        return (obj.hashCode() == hashCode());
+    }
+
+    /**
+     * Not supported
+     */
+    public int hashCode()
+    {
+        return 0;
+    }
+
+    /**
+     * Actions are not supported
+     */
+    public String getActions()
+    {
+        return null;
+    }
+
+    /**
+     * Permission collections not supported
+     */
+    public PermissionCollection newPermissionCollection()
+    {
+        return null;
+    }
+}
\ No newline at end of file
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/Log.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/Log.java	Tue May 25 12:34:19 2010 +0300
@@ -72,9 +72,6 @@
      */
     public static void logWarning(String aMsg)
     {
-        //if (Logger.Activated[COMPONENT_ID]) {
-        //    Logger.LOG(COMPONENT_ID, Logger.EWarning, aMsg);
-        //}
         Logger.WLOG(COMPONENT_ID, aMsg);
     }
 
@@ -85,9 +82,6 @@
      */
     public static void logWarning(String aMsg, Throwable aThrowable)
     {
-        //if (!Logger.Activated[COMPONENT_ID]) {
-        //    return;
-        //}
         Logger.WLOG(COMPONENT_ID, aMsg);
         if (aThrowable != null)
         {
@@ -107,9 +101,6 @@
      */
     public static void logError(String aMsg)
     {
-        //if (Logger.Activated[COMPONENT_ID]) {
-        //    Logger.LOG(COMPONENT_ID, Logger.EError, aMsg);
-        //}
         Logger.ELOG(COMPONENT_ID, aMsg);
     }
 
@@ -120,9 +111,6 @@
      */
     public static void logError(String aMsg, Throwable aThrowable)
     {
-        //if (!Logger.Activated[COMPONENT_ID]) {
-        //    return;
-        //}
         Logger.ELOG(COMPONENT_ID, aMsg);
         if (aThrowable != null)
         {
@@ -143,16 +131,13 @@
     public static void logOut(String aMsg)
     {
         System.out.println(aMsg);
-        if (Logger.Activated[COMPONENT_ID])
+        try
         {
-            try
-            {
-                log(aMsg);
-            }
-            catch (Throwable t)
-            {
-                t.printStackTrace();
-            }
+            log(aMsg);
+        }
+        catch (Throwable t)
+        {
+            t.printStackTrace();
         }
     }
 
@@ -162,20 +147,17 @@
      */
     public static void logMemory(String aMsg)
     {
-        if (Logger.Activated[COMPONENT_ID])
+        StringBuffer msg = new StringBuffer();
+        if (aMsg != null)
         {
-            StringBuffer msg = new StringBuffer();
-            if (aMsg != null)
-            {
-                msg.append(aMsg).append(": ");
-            }
-            long total = Runtime.getRuntime().totalMemory();
-            long free = Runtime.getRuntime().freeMemory();
-            msg.append("total=").append(total);
-            msg.append(", free=").append(free);
-            msg.append(", used=").append(total-free);
-            Logger.LOG(COMPONENT_ID, Logger.EInfo, msg.toString());
+            msg.append(aMsg).append(": ");
         }
+        long total = Runtime.getRuntime().totalMemory();
+        long free = Runtime.getRuntime().freeMemory();
+        msg.append("total=").append(total);
+        msg.append(", free=").append(free);
+        msg.append(", used=").append(total-free);
+        Logger.LOG(COMPONENT_ID, Logger.EInfo, msg.toString());
     }
 
     /**
--- a/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifnotifier.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifnotifier.cpp	Tue May 25 12:34:19 2010 +0300
@@ -23,7 +23,7 @@
 
 #if defined(SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK) && defined(RD_JAVA_USIF_NOTIFY_PROGRESS)
 
-#include <usif/sifnotification.h>
+#include <usif/sif/sifnotification.h>
 #include <usif/usifcommon.h>
 
 // Helper macro for logging a TDesC.
@@ -117,7 +117,7 @@
             aComponentSize, /*aIconPath=*/ (NULL != aIconDir? *iconDir: KNullDesC()),
             /*aComponentIcon=*/ KNullDesC(), Usif::KSoftwareTypeJava);
 
-    User::LeaveIfError(aNotifier->PublishStart(*startData));
+    aNotifier->PublishStartL(*startData);
 
     CleanupStack::PopAndDestroy(startData);
 
@@ -178,7 +178,7 @@
                                         *globalComponentId, (TErrorCategory)aErrCategory, aErrCode,
                                         *errMsg, *errMsgDetails);
 
-    User::LeaveIfError(aNotifier->PublishCompletion(*endData));
+    aNotifier->PublishCompletionL(*endData);
 
     CleanupStack::PopAndDestroy(endData);
 
@@ -225,7 +225,7 @@
                 *globalComponentId, (TSifOperationPhase)aOperation,
                 (TSifOperationSubPhase)aSubOperation, aCurrent, aTotal);
 
-    User::LeaveIfError(aNotifier->PublishProgress(*progressData));
+    aNotifier->PublishProgressL(*progressData);
 
     CleanupStack::PopAndDestroy(progressData);
     CleanupStack::PopAndDestroy(globalComponentId);
--- a/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifregistrator.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifregistrator.cpp	Tue May 25 12:34:19 2010 +0300
@@ -32,6 +32,7 @@
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
 #include <qservicemanager.h>
+#include <qurl.h>
 #include <usif/scr/scr.h>
 #include <usif/scr/screntries.h>
 #ifdef RD_JAVA_USIF_APP_REG
@@ -252,9 +253,6 @@
 (JNIEnv *, jclass)
 {
     TInt err = KErrNone;
-    /*
-    //Application Library UID.
-    const TUid KAppLibUid = { 0x20022F35 };
 
     QServiceManager serviceManager;
     QObject* activityManager =
@@ -266,9 +264,10 @@
               "launchAppView: loading ActivityManager failed, error %d", err);
         return KErrCouldNotConnect;
     }
+    // URL for launching AppLib.
+    QUrl url(QString("appto://20022F35?activityname=AppLibRecentView"));
     QMetaObject::invokeMethod(activityManager, "launchActivity",
-                              Q_ARG(int, KAppLibUid.iUid), // AppLib uid
-                              Q_ARG(QString, "showInstalledApps"));
+                              Q_ARG(QString, url.toString()));
     err = serviceManager.error();
     delete activityManager;
     if (QServiceManager::NoError != err)
@@ -280,8 +279,8 @@
     }
 
     // Start AppLib and bring it to foreground.
+    const TUid KAppLibUid = { 0x20022F35 };
     TRAP(err, StartAppL(KAppLibUid));
-    */
     return err;
 }
 
@@ -539,7 +538,7 @@
  jint aMediaId, jstring aMidletInfoUrl, jstring aMidletDescription,
  jstring aDownloadUrl, jobject aComponentId)
 {
-    __UHEAP_MARK;
+    //__UHEAP_MARK;
     RSoftwareComponentRegistry *pScr =
         reinterpret_cast<RSoftwareComponentRegistry*>(aSessionHandle<<2);
     TComponentId componentId = -1;
@@ -548,7 +547,7 @@
                                  aComponentFiles, aComponentSize, aIsRemovable,
                                  aIsDrmProtected, aIsOriginVerified, aIsUpdate, aMediaId,
                                  aMidletInfoUrl, aMidletDescription, aDownloadUrl));
-    __UHEAP_MARKEND;
+    //__UHEAP_MARKEND;
     if (KErrNone == err)
     {
         jclass clazz = aEnv->GetObjectClass(aComponentId);
@@ -566,7 +565,7 @@
 JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_SifRegistrator__1unregisterComponent
 (JNIEnv *, jclass, jint aSessionHandle, jint aComponentId)
 {
-    __UHEAP_MARK;
+    //__UHEAP_MARK;
     RSoftwareComponentRegistry *pScr =
         reinterpret_cast<RSoftwareComponentRegistry*>(aSessionHandle<<2);
     TInt err = KErrNone;
@@ -577,7 +576,7 @@
     {
         TRAP(err, pScr->DeleteComponentL(aComponentId));
     }
-    __UHEAP_MARKEND;
+    //__UHEAP_MARKEND;
     return err;
 }
 
@@ -640,7 +639,7 @@
             /*aCaption=*/ *caption,
             /*aIconFileName=*/ (NULL != aIconFilename? *iconFilename: KNullDesC()),
             /*aNumOfAppIcons=*/ numberOfAppIcons);
-    CLocalizableAppInfo *locAppInfo = 
+    CLocalizableAppInfo *locAppInfo =
         CLocalizableAppInfo::NewLC(
             /*aShortCaption=*/ KNullDesC, /*aApplicationLanguage=*/ KNonLocalized,
             /*aGroupName=*/ KNullDesC, /*aCaptionAndIconInfo=*/ captionAndIconInfo,
@@ -660,7 +659,7 @@
         for (TInt i = 0; i < langCount; i++)
         {
             TLanguage tmpLanguage = (TLanguage)languages[i];
-            HBufC *tmpCaption = 
+            HBufC *tmpCaption =
                 CreateHBufCFromJavaStringLC(
                     aEnv, (jstring)aEnv->GetObjectArrayElement(aAppNames, i));
             captionsArray.AppendL(tmpCaption);
--- a/javamanager/javainstaller/installerui/build/javainstallerui_0x2002DCB6.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/build/javainstallerui_0x2002DCB6.mmp	Tue May 25 12:34:19 2010 +0300
@@ -69,6 +69,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -89,10 +102,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java	Tue May 25 12:34:19 2010 +0300
@@ -69,6 +69,7 @@
 
     protected int iMode = 0;
     protected InstallerUiListener iListener = null;
+    protected boolean iHidden = false;
 
     /** InstallInfo initialized when confirm() is called. */
     protected InstallInfo iInstallInfo = null;
@@ -376,6 +377,11 @@
      */
     public void hide(boolean aHide)
     {
+        iHidden = aHide;
+        if (iListener != null)
+        {
+            iListener.uiIsHidden(aHide);
+        }
     }
 
     /**
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiListener.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiListener.java	Tue May 25 12:34:19 2010 +0300
@@ -34,4 +34,11 @@
      * indicator.
      */
     public void uiIsReady();
+
+    /**
+     * Called when InstallerUi is hidden or unhidden.
+     *
+     * @param aHidden true if UI was hidden, false if UI was unhidden.
+     */
+    public void uiIsHidden(boolean aHidden);
 }
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java	Tue May 25 12:34:19 2010 +0300
@@ -37,6 +37,7 @@
 import java.io.IOException;
 import java.util.Hashtable;
 
+import org.eclipse.ercp.swt.midp.UIThreadSupport;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
@@ -52,7 +53,6 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.swt.widgets.MessageBox;
 
 /**
  * JavaInstaller eSWT UI.
@@ -127,13 +127,13 @@
         iImageTable = new Hashtable();
         // Create a new thread to be the UI main thread.
         iUiThreadExists = true;
-        new Thread(new Runnable()
+        UIThreadSupport.startInUIThread(new Runnable()
         {
             public void run()
             {
                 uiMain();
             }
-        }, "InstallerUiMainThread").start();
+        });
         // To wait InstallerUi to be ready before installer main thread
         // continues, uncomment the following line.
         //waitForUi();
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/CertificateDetailsView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/CertificateDetailsView.java	Tue May 25 12:34:19 2010 +0300
@@ -93,8 +93,14 @@
         createLabel("", horizontalSpan, labelStyle);
 
         // Add warning label.
+        String appName = "";
+        if (iInstallerUi.getInstallInfo() != null)
+        {
+            appName = iInstallerUi.getInstallInfo().getName();
+        }
         Label warningLabel = createLabel(
-                                 InstallerUiTexts.get(InstallerUiTexts.NOT_CERTIFIED_WARNING),
+                                 InstallerUiTexts.get(InstallerUiTexts.NOT_CERTIFIED_INFO,
+                                                      new String[] { appName }),
                                  horizontalSpan, labelStyle);
 
     }
@@ -110,7 +116,7 @@
         // Add title label.
         Label detailsLabel = createLabel
                              (InstallerUiTexts.get
-                              (InstallerUiTexts.CERTIFICATE_INFO_FOR_APP),
+                              (InstallerUiTexts.CERTIFICATE_TITLE),
                               horizontalSpan, labelStyle);
         detailsLabel.setFont(iInstallerUi.getBoldFont());
 
@@ -134,6 +140,12 @@
                                new String[] { certificate.getFormattedSubject() }),
                               horizontalSpan, labelStyle);
 
+        Label organizationLabel = createLabel
+                             (InstallerUiTexts.get
+                              (InstallerUiTexts.ORGANIZATION,
+                               new String[] { certificate.getOrganization() }),
+                              horizontalSpan, labelStyle);
+
         Label validFromLabel = createLabel
                                (InstallerUiTexts.get
                                 (InstallerUiTexts.VALID_FROM,
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ConfirmationViewBase.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ConfirmationViewBase.java	Tue May 25 12:34:19 2010 +0300
@@ -90,8 +90,7 @@
             return false;
         }
         // Open the dialog from the UI thread.
-        getComposite().getDisplay().syncExec
-        (new Runnable()
+        getComposite().getDisplay().syncExec(new Runnable()
         {
             public void run()
             {
@@ -102,6 +101,7 @@
                     setDefaultCommand();
                 }
                 setVisible(true);
+                iInstallerUi.unhide();
             }
         });
         // The UI thread must not be blocked. Let's wait for the answer
@@ -123,8 +123,7 @@
             return false;
         }
         // Hide the dialog.
-        getComposite().getDisplay().syncExec
-        (new Runnable()
+        getComposite().getDisplay().syncExec(new Runnable()
         {
             public void run()
             {
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorDetailsView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorDetailsView.java	Tue May 25 12:34:19 2010 +0300
@@ -69,14 +69,9 @@
     protected void createView()
     {
         // Add title.
-        //String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
-        String title = "Installation failed";
+        String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
         if (iInstallerUi.getInstallInfo() != null)
         {
-            if (iInstallerUi.getInstallInfo().getOldVersion() != null)
-            {
-                title = "Update failed";
-            }
             Label titleLabel = createLabel(title, getColumns() - 1, SWT.WRAP);
             titleLabel.setFont(iInstallerUi.getBoldFont());
             // Add security icon.
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorView.java	Tue May 25 12:34:19 2010 +0300
@@ -42,7 +42,7 @@
     {
         super(aInstallerUi, aParent, 8);
         setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED));
-        setCommands("Show",
+        setCommands(InstallerUiTexts.get(InstallerUiTexts.SHOW),
                     InstallerUiTexts.get(InstallerUiTexts.CLOSE));
     }
 
@@ -70,14 +70,9 @@
     protected void createView()
     {
         // Add header.
-        //String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
-        String title = "Installation failed";
+        String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
         if (iInstallerUi.getInstallInfo() != null)
         {
-            if (iInstallerUi.getInstallInfo().getOldVersion() != null)
-            {
-                title = "Update failed";
-            }
             addHeader(title, iInstallerUi.getInstallInfo(), null);
         }
         else
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallConfirmationView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallConfirmationView.java	Tue May 25 12:34:19 2010 +0300
@@ -59,7 +59,7 @@
         InstallerUiEswt aInstallerUi, Composite aParent)
     {
         super(aInstallerUi, aParent, 8);
-        setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL));
+        setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALLING));
         setCommands(InstallerUiTexts.get(InstallerUiTexts.OK),
                     InstallerUiTexts.get(InstallerUiTexts.CANCEL));
     }
@@ -107,12 +107,12 @@
     protected void createView()
     {
         // Add header.
-        String title = "Install?";
+        String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_QUERY);
         if (iInstallInfo != null)
         {
             if (iInstallInfo.getOldVersion() != null)
             {
-                title = "Update?";
+                title = InstallerUiTexts.get(InstallerUiTexts.UPDATE_QUERY);
             }
         }
         addHeader(title, iInstallInfo, null);
@@ -126,9 +126,6 @@
         if (driveIds != null && driveIds.length > 0)
         {
             // Add installation drive selector.
-            //Label drivesLabel = createLabel(
-            //                        InstallerUiTexts.get(InstallerUiTexts.INSTALL_TO_DRIVE),
-            //                        horizontalSpan, labelStyle);
             iDriveSelector = new Combo(getComposite(), SWT.READ_ONLY);
             gridData = new GridData(GridData.FILL_HORIZONTAL);
             gridData.horizontalSpan = horizontalSpan;
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiEswt.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiEswt.java	Tue May 25 12:34:19 2010 +0300
@@ -39,6 +39,7 @@
 import java.io.IOException;
 import java.util.Hashtable;
 
+import org.eclipse.ercp.swt.midp.UIThreadSupport;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
@@ -55,7 +56,6 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-//import org.eclipse.swt.widgets.MessageBox;
 
 /**
  * JavaInstaller eSWT UI.
@@ -72,7 +72,6 @@
     private ProgressView iDlProgressView = null;
     private ProgressView iOcspProgressView = null;
     private InstallConfirmationView iInstallConfirmationView = null;
-    private UninstallConfirmationView iUninstallConfirmationView = null;
     private PermissionConfirmationView iPermissionConfirmationView = null;
     private UsernamePasswordView iUsernamePasswordView = null;
     private LaunchAppQueryView iLaunchAppQueryView = null;
@@ -137,13 +136,13 @@
         iImageTable = new Hashtable();
         // Create a new thread to be the UI main thread.
         iUiThreadExists = true;
-        new Thread(new Runnable()
+        UIThreadSupport.startInUIThread(new Runnable()
         {
             public void run()
             {
                 uiMain();
             }
-        }, "InstallerUiMainThread").start();
+        });
         // To wait InstallerUi to be ready before installer main thread
         // continues, uncomment the following line.
         //waitForUi();
@@ -257,10 +256,6 @@
         {
             iInstallConfirmationView.confirmCancel();
         }
-        if (iUninstallConfirmationView != null)
-        {
-            iUninstallConfirmationView.confirmCancel();
-        }
         if (iPermissionConfirmationView != null)
         {
             iPermissionConfirmationView.confirmCancel();
@@ -332,8 +327,7 @@
             {
                 final Display display = iParent.getDisplay();
                 final InstallerUiEswt self = this;
-                display.syncExec
-                (new Runnable()
+                display.syncExec(new Runnable()
                 {
                     public void run()
                     {
@@ -374,8 +368,7 @@
         {
             // The install confirmation has been rejected,
             // nothing to display anymore.
-            iParent.getDisplay().syncExec
-            (new Runnable()
+            iParent.getDisplay().syncExec(new Runnable()
             {
                 public void run()
                 {
@@ -415,8 +408,7 @@
         {
             final Display display = iParent.getDisplay();
             final InstallerUiEswt self = this;
-            display.syncExec
-            (new Runnable()
+            display.syncExec(new Runnable()
             {
                 public void run()
                 {
@@ -446,66 +438,7 @@
      */
     public boolean confirm(UninstallInfo aUninstallInfo)
     {
-        super.confirm(aUninstallInfo);
-
-        waitForUi();
-        boolean result = true;
-        if (!isUiReady())
-        {
-            result = false;
-            if (iMinimalUiEnabled)
-            {
-                result = MinimalUi.confirmStatic(aUninstallInfo);
-                log("MinimalUi uninstallation confirmation returns " + result);
-                return result;
-            }
-            else
-            {
-                // If UI is not ready by the time confirmation is requested,
-                // throw an exception.
-                throw new RuntimeException("JavaInstallerUi not ready");
-            }
-        }
-        if (result)
-        {
-            StartUpTrace.doTrace("InstallerUiEswt confirm");
-            if (iUninstallConfirmationView == null)
-            {
-                final Display display = iParent.getDisplay();
-                final InstallerUiEswt self = this;
-                display.syncExec
-                (new Runnable()
-                {
-                    public void run()
-                    {
-                        iUninstallConfirmationView =
-                            new UninstallConfirmationView(self, iDialog);
-                    }
-                });
-            }
-            result = iUninstallConfirmationView.confirm(aUninstallInfo);
-            iUninstallConfirmationView.dispose();
-            iUninstallConfirmationView = null;
-        }
-        if (result)
-        {
-            iDisplayProgress = true;
-        }
-        else
-        {
-            // The uninstall confirmation has been rejected,
-            // nothing to display anymore.
-            iParent.getDisplay().syncExec
-            (new Runnable()
-            {
-                public void run()
-                {
-                    iParent.dispose();
-                }
-            });
-        }
-        log("Uninstallation confirmation returns " + result);
-        return result;
+        return super.confirm(aUninstallInfo);
     }
 
     /**
@@ -581,8 +514,7 @@
             return;
         }
         Display display = iParent.getDisplay();
-        display.syncExec
-        (new Runnable()
+        display.syncExec(new Runnable()
         {
             public void run()
             {
@@ -733,8 +665,7 @@
             if (iOcspProgressView == null)
             {
                 final InstallerUiEswt self = this;
-                iParent.getDisplay().syncExec
-                (new Runnable()
+                iParent.getDisplay().syncExec(new Runnable()
                 {
                     public void run()
                     {
@@ -826,7 +757,6 @@
 
         waitForUi();
         if (!isUiReady()) {
-            showRuntimeUiError(aInstallerException);
             return;
         }
 
@@ -873,6 +803,7 @@
      *
      * @param aInstallerException exception indicating the error reason
      */
+    /*
     private void showRuntimeUiError(InstallerExceptionBase aInstallerException)
     {
         boolean identified = false;
@@ -890,15 +821,7 @@
                 identified = true;
             }
         }
-        String tmpTitle = "";
-        if (iMode == MODE_INSTALL)
-        {
-            tmpTitle = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
-        }
-        else if (iMode == MODE_UNINSTALL)
-        {
-            tmpTitle = InstallerUiTexts.get(InstallerUiTexts.UNINSTALL_FAILED);
-        }
+        String tmpTitle = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
 
         // Ensure that no confirmations are being displayed.
         cancelConfirmations();
@@ -912,6 +835,7 @@
         runtimeUi.error(tmpTitle, aInstallerException);
         runtimeUi.destroy();
     }
+    */
 
     /**
      * Seeks confirmation from the user.
@@ -1039,10 +963,8 @@
                 }
             });
         }
-
         boolean result = iLaunchAppQueryView.launchAppQuery(aLaunchAppInfo);
-        iParent.getDisplay().syncExec
-        (new Runnable()
+        iParent.getDisplay().syncExec(new Runnable()
         {
             public void run()
             {
@@ -1059,7 +981,29 @@
      */
     public void hide(boolean aHide)
     {
-        iParent.setMinimized(aHide);
+        final boolean hide = aHide;
+        if (iParent != null)
+        {
+            iParent.getDisplay().syncExec(new Runnable()
+            {
+                public void run()
+                {
+                    iParent.setMinimized(hide);
+                }
+            });
+        }
+        super.hide(aHide);
+    }
+
+    /**
+     * Unhides the UI if it has been hidden.
+     */
+    protected void unhide()
+    {
+        if (iHidden)
+        {
+            hide(false);
+        }
     }
 
     /**
@@ -1074,15 +1018,13 @@
         }
         else if (iMode == MODE_UNINSTALL)
         {
-            result = InstallerUiTexts.get(InstallerUiTexts.UNINSTALLING);
+            result = InstallerUiTexts.get("Uninstalling");
         }
         else if (iMode == MODE_APP_CONVERSION)
         {
             result = InstallerUiTexts.get(
-                         InstallerUiTexts.APP_CONVERSION_PROGRESS,
-                         new Object[] { new Integer(iAppConversionCurrent),
-                                        new Integer(iAppConversionTotal)
-                                      });
+                "Converting data for application " +
+                iAppConversionCurrent + "/" + iAppConversionTotal);
         }
         return result;
     }
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiTexts.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/InstallerUiTexts.java	Tue May 25 12:34:19 2010 +0300
@@ -29,81 +29,139 @@
 {
     /*** ----------------------------- PUBLIC ------------------------------ */
 
-    // Define constants for logical names of localised strings.
-    public static final String OK = "ok";
-    public static final String CANCEL = "cancel";
-    public static final String BACK = "back";
-    public static final String DETAILS = "failed_details";
-    public static final String INSTALL = "progress";
-    public static final String UNINSTALL = "uninstalling_progress";
-    public static final String START = "start";
-    public static final String SHOW = "show";
-    public static final String CLOSE = "close";
-    public static final String INSTALL_QUERY = "query";
-    public static final String UPDATE_QUERY = "update_query";
-    public static final String UNINSTALL_QUERY = "uninstall_query";
-    public static final String DETAILS_QUERY = "view_app_details";
-    public static final String APP_CONVERSION_PROGRESS = "app_conversion_progress";
+    // Define constants for localised text ids.
+    public static final String OK = "Ok";
+    public static final String CANCEL = "Cancel";
+    public static final String BACK = "Ok";
+    public static final String HIDE = "Hide";
+    public static final String SHOW = "Show";
+    public static final String CLOSE = "Close";
+    public static final String INSTALL_QUERY = "Install?";
+    public static final String UPDATE_QUERY = "Update?";
+    public static final String OCSP_CHECK_PROGRESS = "Checking certificate validity";
+    public static final String INSTALLING = "Installing";
+    public static final String INSTALL_FAILED = "Installation failed";
+    public static final String INSTALLATION_COMPLETE = "Installed";
+    public static final String DOWNLOADING = "Downloading";
+    public static final String CONNECT_TO = "Connect to";
+    public static final String DOWNLOAD_APPLICATION = "To download %U you need to authenticate yourself";
+    public static final String USERNAME = "Username:";
+    public static final String PASSWORD = "Password:";
+    public static final String SUITE_NAME = "%U (%U)";
+    public static final String SUITE_VENDOR = "%U";
+    public static final String SUITE_VERSION = "%U";
+    public static final String APP_NAME = "%U";
+    public static final String SIZE_KB = "%U kB";
+    public static final String SIZE_MB = "%U MB";
+    public static final String RETAIN_USER_DATA = "Retain application data";
+    // Certificate info texts.
+    public static final String NOT_CERTIFIED_TITLE = "Application is not certified.";
+    public static final String NOT_CERTIFIED_INFO = "Application %U is from an unknown source.";
+    public static final String CERTIFICATE_TITLE = "Application is certified.";
+    public static final String DOMAIN = "Domain: %U";
+    public static final String DOMAIN_MANU = "Manufacturer";
+    public static final String DOMAIN_OPER = "Operator";
+    public static final String DOMAIN_ITP = "Trusted 3rd party";
+    public static final String DOMAIN_UTP = "Untrusted 3rd party";
+    public static final String ISSUER = "Issuer: %U";
+    public static final String SUBJECT = "Subject: %U";
+    public static final String ORGANIZATION = "Organization: %U";
+    public static final String VALID_FROM = "Valid from: %U";
+    public static final String VALID_UNTIL = "Valid until: %U";
+    public static final String SERIAL_NUMBER = "Serial number: %U";
+    public static final String FINGERPRINT = "Fingerprint: %U";
+    // Texts for installation drive selection.
+    public static final String DRIVE_TYPE_UNKNOWN = "%U: Unknown";
+    public static final String DRIVE_TYPE_UNKNOWN_KB = "%U: Unknown (%N kB)";
+    public static final String DRIVE_TYPE_UNKNOWN_MB = "%U: Unknown (%N MB)";
+    public static final String DRIVE_TYPE_UNKNOWN_GB = "%U: Unknown (%N GB)";
+    public static final String DRIVE_TYPE_PHONE_MEMORY = "%U: Phone memory";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_KB = "%U: Phone memory (%N kB)";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_MB = "%U: Phone memory (%N MB)";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_GB = "%U: Phone memory (%N GB)";
+    public static final String DRIVE_TYPE_MEMORY_CARD = "%U: Memory card";
+    public static final String DRIVE_TYPE_MEMORY_CARD_KB = "%U: Memory card (%N kB)";
+    public static final String DRIVE_TYPE_MEMORY_CARD_MB = "%U: Memory card (%N MB)";
+    public static final String DRIVE_TYPE_MEMORY_CARD_GB = "%U: Memory card (%N GB)";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE = "%U: Internal Mass Storage";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_KB = "%U: Internal Mass Storage (%N kB)";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_MB = "%U: Internal Mass Storage (%N MB)";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_GB = "%U: Internal Mass Storage (%N GB)";
+    // Texts for permission confirmation view.
+    public static final String PERM_QUERY = "Application %U asks permissions to access protected device functionality.";
+    public static final String PERM_VIEW_DETAILS = "Details";
+    public static final String PERM_ALLOW_ALWAYS = "Allow always";
+    public static final String PERM_ASK_ME_LATER = "Ask me later";
+    public static final String PERM_CANCEL = "Cancel installing";
+    public static final String PERM_VIEW_DETAILS_TITLE = "Application asks permissions for:";
+
+    /*
+    // Define constants for localised text ids.
+    public static final String OK = "button_ok";
+    public static final String CANCEL = "button_cancel";
+    public static final String BACK = "button_back_ok";
+    public static final String HIDE = "button_hide";
+    public static final String SHOW = "button_show";
+    public static final String CLOSE = "button_close";
+    public static final String INSTALL_QUERY = "title_install";
+    public static final String UPDATE_QUERY = "title_update_query";
     public static final String OCSP_CHECK_PROGRESS = "ocsp_check_progress";
-    public static final String INSTALLING = "progress";
-    public static final String UNINSTALLING = "uninstalling_progress";
-    public static final String INSTALL_FAILED = "failed";
-    public static final String UNINSTALL_FAILED = "uninst_failed";
-    public static final String INSTALLATION_COMPLETE = "complete";
-    public static final String INSTALLED_TO = "installed_to";
-    public static final String DOWNLOADING = "download_progress";
-    public static final String CONNECT_TO = "auth_query";
-    public static final String DOWNLOAD_APPLICATION = "auth_yourself";
-    public static final String USERNAME = "auth_username";
-    public static final String PASSWORD = "auth_password";
-    public static final String APP_DETAILS = "view_app_details";
-    public static final String NAME = "app_details_name";
-    public static final String VENDOR = "app_details_vendor";
-    public static final String VERSION = "app_details_version";
-    public static final String SIZE = "app_details_size_kb";
-    public static final String APPLICATIONS = "app_details_apps_list";
-    public static final String APP_NAME = "application_name";
-    public static final String NOT_CERTIFIED_INFO = "view_not_certified_details";
-    public static final String NOT_CERTIFIED_TITLE = "not_certified_title";
-    public static final String NOT_CERTIFIED_WARNING = "not_certified_warning";
-    public static final String CERTIFICATE_INFO = "view_cert_details";
-    public static final String CERTIFICATE_INFO_FOR_APP = "cert_details_title";
-    public static final String DOMAIN = "cert_details_domain";
-    public static final String DOMAIN_MANU = "cert_details_domain_manufacturer";
-    public static final String DOMAIN_OPER = "cert_details_domain_operator";
-    public static final String DOMAIN_ITP = "cert_details_domain_trusted_third_party";
-    public static final String DOMAIN_UTP = "cert_details_domain_untrusted_third_party";
-    public static final String ISSUER = "cert_details_issuer";
-    public static final String SUBJECT = "cert_details_subject";
-    public static final String VALID_FROM = "cert_details_valid_from";
-    public static final String VALID_UNTIL = "cert_details_valid_until";
-    public static final String SERIAL_NUMBER = "cert_details_serial_number";
-    public static final String FINGERPRINT = "cert_details_fingerprint";
-    public static final String INSTALL_TO_DRIVE = "app_details_install_to_drive";
-    public static final String INSTALL_TO_GROUP = "app_details_install_to_group";
-    public static final String RETAIN_USER_DATA = "update_retain_user_data";
-    public static final String DRIVE_TYPE_UNKNOWN = "drive_type_unknown";
-    public static final String DRIVE_TYPE_UNKNOWN_KB = "drive_type_unknown_kb";
-    public static final String DRIVE_TYPE_UNKNOWN_MB = "drive_type_unknown_mb";
-    public static final String DRIVE_TYPE_UNKNOWN_GB = "drive_type_unknown_gb";
-    public static final String DRIVE_TYPE_PHONE_MEMORY = "drive_type_phone_memory";
-    public static final String DRIVE_TYPE_PHONE_MEMORY_KB = "drive_type_phone_memory_kb";
-    public static final String DRIVE_TYPE_PHONE_MEMORY_MB = "drive_type_phone_memory_mb";
-    public static final String DRIVE_TYPE_PHONE_MEMORY_GB = "drive_type_phone_memory_gb";
-    public static final String DRIVE_TYPE_MEMORY_CARD = "drive_type_memory_card";
-    public static final String DRIVE_TYPE_MEMORY_CARD_KB = "drive_type_memory_card_kb";
-    public static final String DRIVE_TYPE_MEMORY_CARD_MB = "drive_type_memory_card_mb";
-    public static final String DRIVE_TYPE_MEMORY_CARD_GB = "drive_type_memory_card_gb";
-    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE = "drive_type_internal_mass_memory";
-    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_KB = "drive_type_internal_mass_memory_kb";
-    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_MB = "drive_type_internal_mass_memory_mb";
-    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_GB = "drive_type_internal_mass_memory_gb";
+    public static final String INSTALLING = "title_installing";
+    public static final String INSTALL_FAILED = "title_inst_failed";
+    public static final String INSTALLATION_COMPLETE = "title_installation_complete";
+    public static final String DOWNLOADING = "title_downloading";
+    public static final String CONNECT_TO = "title_auth_query";
+    public static final String DOWNLOAD_APPLICATION = "info_auth_yourself";
+    public static final String USERNAME = "dialog_username";
+    public static final String PASSWORD = "dialog_password";
+    public static final String SUITE_NAME = "info_app_suite_name";
+    public static final String SUITE_VENDOR = "info_vendor";
+    public static final String SUITE_VERSION = "info_version";
+    public static final String APP_NAME = "info_app_name";
+    public static final String SIZE_KB = "info_size_kb";
+    public static final String SIZE_MB = "info_size_mb";
+    public static final String RETAIN_USER_DATA = "info_update_retain_user_data";
+    // Certificate info texts.
+    public static final String NOT_CERTIFIED_TITLE = "title_app_not_cert";
+    public static final String NOT_CERTIFIED_INFO = "info_inst_pkg_not_cert";
+    public static final String CERTIFICATE_TITLE = "title_app_cert";
+    public static final String DOMAIN = "setlabel_cert_domain";
+    public static final String DOMAIN_MANU = "setlabel_cert_domain_val_manufacturer";
+    public static final String DOMAIN_OPER = "setlabel_cert_domain_val_operator";
+    public static final String DOMAIN_ITP = "setlabel_cert_domain_val_trusted_third_party";
+    public static final String DOMAIN_UTP = "setlabel_cert_domain_val_untrusted_third_party";
+    public static final String ISSUER = "setlabel_issuer";
+    public static final String SUBJECT = "setlabel_subject";
+    public static final String ORGANIZATION = "setlabel_organization";
+    public static final String VALID_FROM = "setlabel_valid_from";
+    public static final String VALID_UNTIL = "setlabel_valid_until";
+    public static final String SERIAL_NUMBER = "setlabel_serial_number";
+    public static final String FINGERPRINT = "setlabel_fingerprint";
+    // Texts for installation drive selection.
+    public static final String DRIVE_TYPE_UNKNOWN = "list_unknown";
+    public static final String DRIVE_TYPE_UNKNOWN_KB = "list_unknown_kb";
+    public static final String DRIVE_TYPE_UNKNOWN_MB = "list_unknown_mb";
+    public static final String DRIVE_TYPE_UNKNOWN_GB = "list_unknown_gb";
+    public static final String DRIVE_TYPE_PHONE_MEMORY = "list_phone_mem";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_KB = "list_phone_mem_kb";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_MB = "list_phone_mem_mb";
+    public static final String DRIVE_TYPE_PHONE_MEMORY_GB = "list_phone_mem_gb";
+    public static final String DRIVE_TYPE_MEMORY_CARD = "list_mem_card";
+    public static final String DRIVE_TYPE_MEMORY_CARD_KB = "list_mem_card_kb";
+    public static final String DRIVE_TYPE_MEMORY_CARD_MB = "list_mem_card_mb";
+    public static final String DRIVE_TYPE_MEMORY_CARD_GB = "list_mem_card_gb";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE = "list_mass_mem";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_KB = "list_mass_mem_kb";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_MB = "list_mass_mem_mb";
+    public static final String DRIVE_TYPE_INTERNAL_MASS_STORAGE_GB = "list_mass_mem_gb";
     // Texts for permission confirmation view.
-    public static final String PERM_QUERY = "perm_query";
-    public static final String PERM_VIEW_DETAILS = "perm_view_details";
-    public static final String PERM_VIEW_DETAILS_TITLE = "perm_view_details_title";
-    public static final String PERM_ALLOW_ALWAYS = "perm_allow_always";
-    public static final String PERM_ASK_ME_LATER = "perm_ask_me_later";
+    public static final String PERM_QUERY = "info_perm_query";
+    public static final String PERM_VIEW_DETAILS = "button_view_perm_details";
+    public static final String PERM_ALLOW_ALWAYS = "button_perm_allow_always";
+    public static final String PERM_ASK_ME_LATER = "button_perm_ask_me_later";
+    public static final String PERM_CANCEL = "button_perm_cancel_installing";
+    public static final String PERM_VIEW_DETAILS_TITLE = "title_perm_view_details";
+    */
 
     /**
      * Method for retrieving a text string with given id and no parameters.
@@ -125,11 +183,12 @@
      */
     public static String get(String aTextId, Object[] aTextParameters)
     {
-        if (iRes == null)
-        {
-            iRes = ResourceLoader.getInstance("javainstallation", "qtn_java_inst_");
-        }
-        return iRes.format(aTextId, aTextParameters);
+        return new com.nokia.mj.impl.utils.Formatter(aTextId).format(aTextParameters);
+        //if (iRes == null)
+        //{
+        //    iRes = ResourceLoader.getInstance("javaapplicationinstaller", "txt_java_inst_");
+        //}
+        //return iRes.format(aTextId, aTextParameters);
     }
 
     /*** ---------------------------- PROTECTED --------------------------- */
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java	Tue May 25 12:34:19 2010 +0300
@@ -63,7 +63,7 @@
         InstallerUiEswt aInstallerUi, Composite aParent)
     {
         super(aInstallerUi, aParent, 8, true);
-        setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL));
+        setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALLING));
         setCommands(null, null);
     }
 
@@ -94,12 +94,14 @@
     {
         // Add header.
         String title = "Install?";
+        String appName = "";
         if (iInstallInfo != null)
         {
             if (iInstallInfo.getOldVersion() != null)
             {
                 title = "Update?";
             }
+            appName = iInstallInfo.getName();
         }
         addHeader(title, iInstallInfo, null);
 
@@ -109,8 +111,9 @@
 
         // Add permission query label.
         Label domainLabel = createLabel(
-                                InstallerUiTexts.get(InstallerUiTexts.PERM_QUERY),
-                                horizontalSpan, labelStyle);
+            InstallerUiTexts.get(InstallerUiTexts.PERM_QUERY,
+                                 new String[] { appName }),
+            horizontalSpan, labelStyle);
 
         // Add link for permission details.
         if (iPermissionInfo != null &&
@@ -205,7 +208,7 @@
 
         // Add cancel button.
         iCancelButton = new Button(getComposite(), SWT.NONE);
-        iCancelButton.setText(InstallerUiTexts.get(InstallerUiTexts.CANCEL));
+        iCancelButton.setText(InstallerUiTexts.get(InstallerUiTexts.PERM_CANCEL));
         iCancelButton.addListener(SWT.Selection, new Listener()
         {
             public void handleEvent(Event aEvent)
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionDetailsView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionDetailsView.java	Tue May 25 12:34:19 2010 +0300
@@ -73,7 +73,7 @@
             for (int i = 0; i < permNames.length; i++)
             {
                 Label permLabel = createLabel(
-                                      permNames[i], horizontalSpan, labelStyle);
+                    permNames[i], horizontalSpan, labelStyle);
             }
         }
 
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java	Tue May 25 12:34:19 2010 +0300
@@ -173,7 +173,7 @@
                 GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
                 gridData.horizontalSpan = 1;
                 iHideCommand.setLayoutData(gridData);
-                iHideCommand.setText("Hide"); //InstallerUiTexts.get(InstallerUiTexts.HIDE));
+                iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE));
                 iHideCommand.addSelectionListener
                 (new SelectionListener()
                 {
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/UninstallConfirmationView.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* 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"
-* 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.ui.eswt2;
-
-import com.nokia.mj.impl.installer.ui.ApplicationInfo;
-import com.nokia.mj.impl.installer.ui.UninstallInfo;
-
-import java.io.InputStream;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * UninstallConfirmationView asks uninstallation confirmation
- * from the user.
- */
-public class UninstallConfirmationView extends ConfirmationViewBase
-{
-    private UninstallInfo iUninstallInfo = null;
-
-    /** Constructor */
-    protected UninstallConfirmationView()
-    {
-        super();
-    }
-
-    /** Constructor */
-    protected UninstallConfirmationView(
-        InstallerUiEswt aInstallerUi, Composite aParent)
-    {
-        super(aInstallerUi, aParent, 8);
-        setTitle(InstallerUiTexts.get(InstallerUiTexts.UNINSTALL));
-        setCommands(InstallerUiTexts.get(InstallerUiTexts.OK),
-                    InstallerUiTexts.get(InstallerUiTexts.CANCEL));
-    }
-
-    /**
-     * Synchoronous method for asking user confirmation.
-     */
-    public boolean confirm(UninstallInfo aUninstallInfo)
-    {
-        iUninstallInfo = aUninstallInfo;
-        boolean result = confirm();
-        if (result)
-        {
-            log("uninstallConfirmationView confirmed");
-        }
-        else
-        {
-            log("uninstallConfirmationView cancelled");
-        }
-        return result;
-    }
-
-    /**
-     * This method is called once before view is opened.
-     * Inheriting class must implement this method.
-     */
-    protected void createView()
-    {
-        GridData gridData = null;
-        int horizontalSpan = getColumns() - 1;
-        int labelStyle = SWT.WRAP;
-
-        InputStream iconInputStream = iUninstallInfo.getIconInputStream();
-        if (iconInputStream != null)
-        {
-            Image image = InstallerUiEswt.loadImage
-                          (getComposite().getDisplay(), iconInputStream,
-                           iUninstallInfo.getIconPath());
-            if (image != null)
-            {
-                Label iconLabel = createLabel(image, 2, SWT.NONE);
-                horizontalSpan = getColumns() - 3;
-            }
-            else
-            {
-                horizontalSpan = getColumns() - 1;
-            }
-        }
-
-        // Add title.
-        Label titleLabel = createLabel
-                           (InstallerUiTexts.get
-                            (InstallerUiTexts.UNINSTALL_QUERY,
-                             new String[] { iUninstallInfo.getName() }),
-                            horizontalSpan, labelStyle);
-        titleLabel.setFont(iInstallerUi.getBoldFont());
-
-        // Add security icon.
-        boolean identified = (iUninstallInfo.getCertificates() != null);
-        Label securityIconLabel = createSecurityLabel(identified);
-
-        horizontalSpan = getColumns();
-
-        Label nameLabel = createLabel
-                          (InstallerUiTexts.get
-                           (InstallerUiTexts.NAME,
-                            new String[] { iUninstallInfo.getName() }),
-                           horizontalSpan, labelStyle);
-
-        if (identified)
-        {
-            // Vendor information must be displayed only for
-            // identified applications.
-            Label vendorLabel = createLabel
-                                (InstallerUiTexts.get
-                                 (InstallerUiTexts.VENDOR,
-                                  new String[] { iUninstallInfo.getVendor() }),
-                                 horizontalSpan, labelStyle);
-        }
-
-        Label versionLabel = createLabel
-                             (InstallerUiTexts.get
-                              (InstallerUiTexts.VERSION,
-                               new String[] { iUninstallInfo.getVersion() }),
-                              horizontalSpan, labelStyle);
-
-        ApplicationInfo[] apps = iUninstallInfo.getApplications();
-        if (apps != null && apps.length > 0)
-        {
-            if (apps.length > 1 ||
-                    !iUninstallInfo.getName().equals(apps[0].getName()))
-            {
-                Label appsLabel = createLabel
-                                  (InstallerUiTexts.get
-                                   (InstallerUiTexts.APPLICATIONS),
-                                   horizontalSpan, labelStyle);
-
-                for (int i = 0; i < apps.length; i++)
-                {
-                    Label appLabel = createLabel
-                                     (InstallerUiTexts.get
-                                      (InstallerUiTexts.APP_NAME,
-                                       new String[] { apps[i].getName() }),
-                                      horizontalSpan, labelStyle);
-                }
-            }
-        }
-
-        String deleteConfirm = iUninstallInfo.getDeleteConfirm();
-        if (deleteConfirm != null)
-        {
-            Label deleteConfirmLabel = createLabel
-                                       (deleteConfirm, horizontalSpan, labelStyle);
-        }
-    }
-
-    /**
-     * This method is called after user has answered
-     * to confirmation.
-     * Inheriting class must implement this method.
-     */
-    protected void getDataFromView()
-    {
-        // No data to get from uninstallation confirmation.
-    }
-
-    /**
-     * Returns SWT style for this view.
-     */
-    protected int getStyle()
-    {
-        return SWT.V_SCROLL;
-    }
-}
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ViewBase.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ViewBase.java	Tue May 25 12:34:19 2010 +0300
@@ -450,12 +450,12 @@
         boolean aSecurityButton)
     {
         // Add title.
-        String title = "Install?";
+        String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_QUERY);
         if (aInstallInfo != null)
         {
             if (aInstallInfo.getOldVersion() != null)
             {
-                title = "Update?";
+                title = InstallerUiTexts.get(InstallerUiTexts.UPDATE_QUERY);
             }
             iCertificates = aInstallInfo.getCertificates();
         }
@@ -527,9 +527,25 @@
             return;
         }
 
-        // Add suite name.
+        // Add suite name and version.
         createAppInfoLabel(
-            aInstallInfo.getName() + " " + aInstallInfo.getVersion());
+            InstallerUiTexts.get(
+                InstallerUiTexts.SUITE_NAME,
+                new String[] { aInstallInfo.getName(),
+                               aInstallInfo.getVersion() }));
+        if (aFull)
+        {
+            // Add vendor.
+            if (aInstallInfo.getCertificates() != null)
+            {
+                // Vendor information must be displayed only for
+                // identified applications.
+                createAppInfoLabel(
+                    InstallerUiTexts.get(
+                        InstallerUiTexts.SUITE_VENDOR,
+                        new String[] { aInstallInfo.getVendor() }));
+            }
+        }
         // Add size.
         long size = 0;
         if (aInstallInfo.getJarSize() > 0)
@@ -544,21 +560,11 @@
         {
             createAppInfoLabel(
                 InstallerUiTexts.get(
-                    InstallerUiTexts.SIZE,
+                    InstallerUiTexts.SIZE_KB,
                     new String[] { Long.toString(1 + size/1024) }));
         }
         if (aFull)
         {
-            // Add vendor.
-            if (aInstallInfo.getCertificates() != null)
-            {
-                // Vendor information must be displayed only for
-                // identified applications.
-                createAppInfoLabel(
-                    InstallerUiTexts.get(
-                        InstallerUiTexts.VENDOR,
-                        new String[] { aInstallInfo.getVendor() }));
-            }
             // Add application names.
             ApplicationInfo[] apps = aInstallInfo.getApplications();
             if (apps != null && apps.length > 0)
@@ -568,7 +574,10 @@
                 {
                     for (int i = 0; i < apps.length; i++)
                     {
-                        createAppInfoLabel(apps[i].getName());
+                        createAppInfoLabel(
+                            InstallerUiTexts.get(
+                                InstallerUiTexts.APP_NAME,
+                                new String[] { apps[i].getName() }));
                     }
                 }
             }
--- a/javamanager/javalauncher/build/javalauncher_0x2001E262.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/build/javalauncher_0x2001E262.mmp	Tue May 25 12:34:19 2010 +0300
@@ -79,6 +79,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		TrustedUI WriteDeviceData PowerMgmt NetworkControl 
@@ -100,10 +112,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javalauncher/src.s60/javalauncher.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/src.s60/javalauncher.cpp	Tue May 25 12:34:19 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  The executable that enables launching OMJ Java
-*                applications in S60
+*               applications in S60
 *
 */
 
@@ -42,7 +42,14 @@
 using namespace java::util;
 
 
+_LIT(KHexValueStart, "0x");
+_LIT(KPercentage, "%");
 _LIT(KSemiColon, ";");
+_LIT(KMidletNameArg, "midlet-name=");
+_LIT(KMidletVendorArg, "midlet-vendor=");
+_LIT(KMidletNArg, "midlet-n=");
+_LIT(KMidletUidArg, "midlet-uid=");
+
 
 const TInt KExtraLenForLoggingAndPrompting = 22;
 const TInt KArgumentValueMaxLen = 1568;  // Support worst case % encoded args of 512 chars
@@ -58,7 +65,8 @@
  *
  * @param aJs           JavaStorage connection, must be open
  * @param aPackageId    the id of the package
- * @param aMidletName   the name of the desired application in the package, can be empty
+ * @param aMidletId     the numerical id of the desired application in the
+ *                      package, can be empty
  * @param aUid          the Uid the found application is returned in this param
  * @return  KErrNone if Uid was found, otherwise one of the Symbian error codes
  * @throws  JavaStorageException if accessing Java Storage fails
@@ -66,21 +74,61 @@
 static TInt getOneApplicationFromPackage(
     JavaStorage& aJs,
     const std::wstring& aPackageId,
-    const std::wstring& aMidletName,
+    const std::wstring& aMidletId,
     TInt32 &aUid)
 {
+    std::wstring midletId = L"MIDlet-";
+    if (aMidletId.length() == 0)
+    {
+        midletId.append(L"1");
+    }
+    else
+    {
+        midletId.append(aMidletId);
+    }
+
     JavaStorageEntry attribute;
     JavaStorageApplicationEntry_t findPattern;
     JavaStorageApplicationList_t  foundEntries;
 
-    // Get ID from APPLICATION_TABLE based on PACKAGE_ID and NAME
+
+    // Get MIDlet-n from APPLICATION_PACKAGE_ATTRIBUTES_TABLE based on 
+    // PACKAGE_ID and NAME.
+    attribute.setEntry(ID, aPackageId);
+    findPattern.insert(attribute);
+    attribute.setEntry(NAME, midletId);
+    findPattern.insert(attribute);
+    attribute.setEntry(VALUE, L"");
+    findPattern.insert(attribute);
+    aJs.search(APPLICATION_PACKAGE_ATTRIBUTES_TABLE, findPattern, foundEntries);
+
+    if (foundEntries.size() < 1)
+    {
+        return KErrNotFound;
+    }
+
+    // Found the MIDlet-n argument. Now getting the MIDlet name and 
+    // main class. Name is the first argument and main class is the last
+    // in the comma separated list.
+    std::wstring value = foundEntries.front().begin()->entryValue();
+    int pos = value.find_first_of(L",");
+    std::wstring midletName = value.substr(0, pos);
+    pos = value.find_last_of(L",");
+    std::wstring className = value.substr(pos+1);
+
+    // Trim white spaces.
+    JavaCommonUtils::trimWstring(midletName, L' ');
+    JavaCommonUtils::trimWstring(className, L' ');
+    findPattern.clear();
+    foundEntries.clear();
+
+    // Get ID from APPLICATION_TABLE based on PACKAGE_ID and MAIN_CLASS
     attribute.setEntry(PACKAGE_ID, aPackageId);
     findPattern.insert(attribute);
-    if (aMidletName.length() > 0)
-    {
-        attribute.setEntry(NAME, aMidletName);
-        findPattern.insert(attribute);
-    }
+    attribute.setEntry(NAME, midletName);
+    findPattern.insert(attribute);
+    attribute.setEntry(MAIN_CLASS, className);
+    findPattern.insert(attribute);
     attribute.setEntry(ID, L"");
     findPattern.insert(attribute);
 
@@ -110,7 +158,6 @@
  */
 static void decodeCommandLineL(TPtr &aCmdLineBuf)
 {
-    _LIT(KPercentage, "%");
     TInt ind = aCmdLineBuf.Find(KPercentage);
     if (KErrNotFound == ind)
     {
@@ -180,7 +227,7 @@
 /**
  * Parse the names of the MIDlet suite and MIDlet vendor from aMidletCmdLine
  * parameter and use them to find the MIDlet suite from Java Storage.
- * Then return Uid of the named MIDlet or if 'midlet-n' argument is not given
+ * Then return Uid of the named MIDlet or if 'midlet-app-name' argument is not given
  * in command line, the Uid of the first MIDlet in the suite.
  * Return the uid of the MIDlet in aUid.
  *
@@ -192,10 +239,6 @@
  */
 static TInt getUidByNames(const TPtrC &aMidletCmdLine, TInt32 &aUid)
 {
-    _LIT(KMidletNameArg, "midlet-name=");
-    _LIT(KMidletVendorArg, "midlet-vendor=");
-    _LIT(KMidletNArg, "midlet-n=");
-
     TInt err = aMidletCmdLine.FindF(KMidletNameArg);
     if (KErrNotFound == err)
     {
@@ -209,7 +252,7 @@
 
     std::wstring suiteName = getArgValue(aMidletCmdLine, KMidletNameArg);
     std::wstring vendorName = getArgValue(aMidletCmdLine, KMidletVendorArg);
-    std::wstring midletName = getArgValue(aMidletCmdLine, KMidletNArg);
+    std::wstring midletId = getArgValue(aMidletCmdLine, KMidletNArg);
 
     if (suiteName.empty() || vendorName.empty())
     {
@@ -247,7 +290,7 @@
                      value.c_str());
 
             // Now find the Uid of the first or specified application in the package
-            err = getOneApplicationFromPackage(*js, value, midletName, aUid);
+            err = getOneApplicationFromPackage(*js, value, midletId, aUid);
         }
         else
         {
@@ -353,14 +396,12 @@
  * Java Storage / AppArc and return the Uid of the midlet.
  *
  * @param aMidletCmdLine  command line to be parsed, the format is
- *  [midlet-name=XXX;midlet-vendor=XXX;|midlet-uid=YYY;]midlet-args=XXX
+ *  [midlet-name=XXX;midlet-vendor=XXX;|midlet-uid=YYY;]<midlet_args>
  * @param aUid will contain the Uid parsed from command line
  * @return KErrNone if the command line specified Uid
  */
 static TInt getUidFromCommandLine(const TPtrC &aMidletCmdLine, TInt32 &aUid)
 {
-    _LIT(KMidletUidArg, "midlet-uid=");
-    _LIT(KHexValueStart, "0x");
     TInt err(KErrNone);
     TInt argPos = aMidletCmdLine.FindF(KMidletUidArg);
     if (KErrNotFound != argPos)
@@ -441,7 +482,7 @@
     // Symbian Settings UI
     TInt maxExtraSpaceForDocumentArg = 0;
 #ifdef RD_JAVA_SUPPORT_JAVA_APPS_AS_MIME_TYPE_HANDLERS
-    _LIT(KDocumentOnlyCmdLine, "midlet-args=document=");
+    _LIT(KDocumentOnlyCmdLine, "document=");
     TFullName documentName;
     documentName = commandLine->DocumentName();
     if (documentName.Length() > 0)
@@ -541,13 +582,33 @@
 
     // Uid has already been determined, the whole command line is not needed
     // anymore, only the arguments for the Java application
-    _LIT(KMidletArgs, "midlet-args=");
-    TInt  argsPos = cmdLineBuf.FindF(KMidletArgs);
+
+    // Find the last argument that is used to identify the MIDlet
     TBool cmdLineIsNotEmpty = EFalse;
-    if (argsPos >= 0)
+    TInt  lastArgPos = cmdLineBuf.FindF(KMidletUidArg);
+    TInt  currArgPos = cmdLineBuf.FindF(KMidletNArg);
+    if (currArgPos > lastArgPos)
+    {
+        lastArgPos = currArgPos;
+    }
+    currArgPos = cmdLineBuf.FindF(KMidletVendorArg);
+    if (currArgPos > lastArgPos)
     {
-        // Pass everything that follows "midlet-args="
-        cmdLineBuf.Delete(0, argsPos + KMidletArgs.iTypeLength);
+        lastArgPos = currArgPos;
+    }
+    currArgPos = cmdLineBuf.FindF(KMidletNameArg);
+    if (currArgPos > lastArgPos)
+    {
+        lastArgPos = currArgPos;
+    }
+
+    // Find the place where the last identity argument ends
+    cmdLineBuf.Delete(0, lastArgPos);
+    lastArgPos = cmdLineBuf.Find(KSemiColon);
+    if (lastArgPos >= 0)
+    {
+        // Pass everything that follows "<last_identity_arg_name>=....;"
+        cmdLineBuf.Delete(0, lastArgPos + 1);
         cmdLineIsNotEmpty = ETrue;
     }
     else
@@ -737,17 +798,17 @@
  * command line.
  *
  * The command line format is
- * [midlet-name=XXX;midlet-vendor=XXX;[midlet-n=XXX;]|midlet-uid=YYY;]midlet-args=XXX
+ * [midlet-name=XXX;midlet-vendor=XXX;[midlet-app-name=XXX;]|midlet-uid=YYY;]<midlet_args>
  * for example
- * midlet-name=Chess;midlet-vendor=Nokia;midlet-args=startMode=playChessDemo;sound=off;
- * 'midlet-args' specifies the arguments passed to Java application.
- * 'midlet-uid' or 'midlet-name'+'midlet-vendor' specify the Java application to be started
+ * midlet-name=Chess;midlet-vendor=Nokia;startMode=playChessDemo;sound=off;
+ * 'midlet-uid' or 'midlet-name'+'midlet-vendor'+ optional 'midlet-app-name' specify
+ * the Java application to be started
  *
  * Sample code for starting MIDlet from native code
  * @code
     RProcess rProcess;
     TInt err = rProcess.Create(_L("javalauncher.exe"),
-        _L("midlet-uid=0x10137c4d;midlet-args=startMode=startFromCmdLine;sound=ON;landscapeMode=true;"));
+        _L("midlet-uid=0x10137c4d;startMode=startFromCmdLine;sound=ON;landscapeMode=true;"));
     if (KErrNone == err)
     {
         TRequestStatus status;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/Launcher.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* 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: test midlet for making platform requests
+*/
+
+import javax.microedition.io.ConnectionNotFoundException;
+import javax.microedition.lcdui.*;
+import javax.microedition.midlet.MIDlet;
+
+public class Launcher extends MIDlet
+        implements CommandListener
+{
+    private List        mMainView;
+    private Command     mExitCommand;
+    private static String mUri = "localapp://jam/launch?midlet-name=LocalAppSuite;midlet-vendor=Nokia;";
+    private static String mMidlet = "midlet-n=";
+    private static String mParams = "sounds=ON;difficulty=medium;wizard_mode;microedition.locale=my.locale;com.test.notVisible=com.test.notVisible=should not be seen";
+    private static String mParams2 = "sounds=OFF;difficulty=low;wizard_mode=yes;microedition.locale=my.locale2;com.test.extra=extra;com.test.notVisible=com.test.notVisible=should not be seen";
+    private boolean mUse2 = false;
+    public Launcher()
+    {
+        String[] elements = {"Start default", "Start 1", "Start 2", "Start 3", "Start 4", "Start 5"};
+        mMainView = new List("Select MIDlet", List.IMPLICIT, elements, null);
+        mExitCommand = new Command("Exit", 1, 1);
+        mMainView.addCommand(mExitCommand);
+        mMainView.setCommandListener(this);
+        Display.getDisplay(this).setCurrent(mMainView);
+    }
+
+    public void startApp()
+    {
+    }
+
+    public void pauseApp()
+    {
+    }
+
+    public void destroyApp(boolean flag)
+    {
+    }
+
+    public void commandAction(Command command, Displayable displayable)
+    {
+        if (command == mExitCommand)
+        {
+            destroyApp(true);
+            notifyDestroyed();
+        }
+        else
+        {
+            String params = mUse2 ? mParams2 : mParams;
+            switch (mMainView.getSelectedIndex())
+            {
+                case 0:
+                    sendPlatReq(mUri + params);
+                    break;
+                case 1:
+                    sendPlatReq(mUri + mMidlet + "1;" + params);
+                    break;
+                case 2:
+                    sendPlatReq(mUri + mMidlet + "2;" + params);
+                    break;
+                case 3:
+                    sendPlatReq(mUri + mMidlet + "3;" + params);
+                    break;
+                case 4:
+                    sendPlatReq(mUri + mMidlet + "4;" + params);
+                    break;
+                case 5:
+                    sendPlatReq(mUri + mMidlet + "5;" + params);
+                    break;
+            }
+            mUse2 = !mUse2;
+        }
+    }
+    private void sendPlatReq(String uri)
+    {
+        System.err.println("Plat req: " + uri);
+        try
+        {
+            if (platformRequest(uri))
+//            if (false)
+            {
+                destroyApp(true);
+                notifyDestroyed();
+            }
+            else
+            {
+                System.err.println("  ok");
+            }
+        }
+        catch (Exception e)
+        {
+            System.err.println("Plat req failed");
+            e.printStackTrace();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/LocalAppSuite.jad	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,15 @@
+MIDlet-1: Run1, , test1.Runner1
+MIDlet-2: Run2, , test2.Runner2
+MIDlet-3: Run3, , test3.Runner3
+MIDlet-4: Run1, , test4.Runner4
+MIDlet-5: Run5, , test4.Runner4
+MIDlet-6: Launcher, , Launcher
+MIDlet-Jar-Size: 5110
+MIDlet-Jar-URL: LocalAppSuite.jar
+MIDlet-Name: LocalAppSuite
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.1
+MicroEdition-Profile: MIDP-2.0
+Nokia-MIDlet-Background-Event: pause
+Nokia-MIDlet-Launch-Params: sounds,difficulty, wizard_mode, microedition.locale, com.test.extra
Binary file javamanager/javalauncher/tsrc/midlets/midlet_n_test/LocalAppSuite.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/base/RunnerBase.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,116 @@
+/*
+* 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: test midlet that shows the command line passed to it
+*/
+
+package base;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.StringItem;
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+public abstract class RunnerBase extends MIDlet implements CommandListener
+{
+
+    private Form          mMainView;
+    private Command       mExitCommand;
+    private StringItem    mInstance;
+    private StringItem    mCmdLine;
+    private StringItem    mDifficulty;
+    private StringItem    mWizard;
+    private StringItem    mSounds;
+    private StringItem    mExtra;
+    private StringItem    mNotVisible;
+    private StringItem    mLocale;
+
+    protected RunnerBase(String name)
+    {
+        mMainView = new Form(name);
+        mExitCommand = new Command("Exit", 1, 1);
+        mMainView.addCommand(mExitCommand);
+        mMainView.setCommandListener(this);
+
+        mMainView.append(this.toString());
+        mInstance = new StringItem("Instance","0");
+        mMainView.append(mInstance);
+        mCmdLine = new StringItem("CmdL","");
+        mMainView.append(mCmdLine);
+        mDifficulty = new StringItem("Diff","");
+        mMainView.append(mDifficulty);
+        mSounds = new StringItem("Sounds","");
+        mMainView.append(mSounds);
+        mWizard = new StringItem("Wiz","");
+        mMainView.append(mWizard);
+        mLocale = new StringItem("Locale","");
+        mMainView.append(mLocale);
+
+        mExtra = new StringItem("Extra","");
+        mMainView.append(mExtra);
+        mNotVisible = new StringItem("NotVisible","");
+        mMainView.append(mNotVisible);
+
+
+        Display.getDisplay(this).setCurrent(mMainView);
+    }
+
+    protected void startApp() throws MIDletStateChangeException
+    {
+        String prevInstance = mInstance.getText();
+        setPropVal(mInstance, "com.nokia.mid.cmdline.instance");
+
+        if (mInstance.getText().equals(prevInstance))
+        {
+            // No relaunch -> no new command line parameters
+            return;
+        }
+        setPropVal(mCmdLine, "com.nokia.mid.cmdline");
+        setPropVal(mDifficulty, "difficulty");
+        setPropVal(mSounds, "sounds");
+        setPropVal(mWizard, "wizard_mode");
+        setPropVal(mLocale, "microedition.locale");
+        setPropVal(mExtra, "com.test.extra");
+        setPropVal(mNotVisible, "com.test.notVisible");
+    }
+    private void setPropVal(StringItem si, String property)
+    {
+        String propVal = System.getProperty(property);
+        if (propVal == null)
+        {
+            propVal = "{null}";
+        }
+        si.setText(propVal);
+    }
+
+    public void commandAction(Command command, Displayable displayable)
+    {
+        if (command == mExitCommand)
+        {
+            destroyApp(true);
+            notifyDestroyed();
+        }
+    }
+    protected void pauseApp()
+    {
+    }
+
+    protected void destroyApp(boolean p1)
+    {
+    }
+
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/test1/Runner1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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: test midlet that shows the command line passed to it
+*/
+
+package test1;
+
+import base.RunnerBase;
+
+
+public class Runner1 extends RunnerBase
+{
+
+
+    public Runner1()
+    {
+        super("Runner1");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/test2/Runner2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: test midlet that shows the command line passed to it
+*/
+
+
+package test2;
+
+import base.RunnerBase;
+
+public class Runner2 extends RunnerBase
+{
+
+
+    public Runner2()
+    {
+        super("Runner2");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/test3/Runner3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* 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: test midlet that shows the command line passed to it
+*/
+
+package test3;
+
+
+import base.RunnerBase;
+
+public class Runner3 extends RunnerBase
+{
+
+
+    public Runner3()
+    {
+        super("Runner3");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/midlets/midlet_n_test/test4/Runner4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* 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: test midlet that shows the command line passed to it
+*/
+
+package test4;
+
+import base.RunnerBase;
+
+public class Runner4 extends RunnerBase
+{
+
+
+    public Runner4()
+    {
+        super("Runner4");
+    }
+}
--- a/javamanager/javalauncher/tsrc/midlets/plat_req/plat_req.jad	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/tsrc/midlets/plat_req/plat_req.jad	Tue May 25 12:34:19 2010 +0300
@@ -8,13 +8,13 @@
 MicroEdition-Profile: MIDP-2.0
 platreq_0002a: http://10.63.48.225:8001/jtcml/platReq/content/midlet/ver1/SimpleMidlet.jad
 platreq_0002b: http://10.63.48.225:8001/jtcml/platReq/content/midlet/ver2/SimpleMidlet.jad
-platreq_0003: localapp://jam/launch?midlet-uid=0x10137c4d;midlet-args=mode=localapp;sounds=ON;difficulty=medium;wizard_mode
-platreq_0004: javaapp:midlet-uid=0x10137c4d;midlet-args=mode=javaapp;sounds=OFF;difficulty=easy;wizard_mode
+platreq_0003: localapp://jam/launch?midlet-uid=0x10137c4d;mode=localapp;sounds=ON;difficulty=medium;wizard_mode
+platreq_0004: javaapp:midlet-uid=0x10137c4d;mode=javaapp;sounds=OFF;difficulty=easy;wizard_mode
 platreq_0005: localapp://native/launch?application-uid=0x101f4cce;application-args=mode=localapp;sounds=ON;difficulty=medium;wizard_mode
 platreq_0006: nativeapp:application-exe=ImageViewer.exe;content=E:\tif(01).tif
 platreq_0007: vid:+393910910606
-platreq_0008: javaapp://jam/launch?midlet-uid=0x10137c4d;midlet-args=mode=javaapp;sounds=OFF;difficulty=easy;wizard_mode
-platreq_0009: localapp://jam/launch?midlet-name=SPtesti;midlet-args=mode=localapp;sounds=ON;difficulty=medium;wizard_mode
+platreq_0008: javaapp://jam/launch?midlet-uid=0x10137c4d;mode=javaapp;sounds=OFF;difficulty=easy;wizard_mode
+platreq_0009: localapp://jam/launch?midlet-name=SPtesti;midlet-vendor=Unknown;mode=localapp;sounds=ON;difficulty=medium;wizard_mode
 platreq_0010: javaapp:midlet-name=%E6%98%9F%E5%A4%A2%E7%BE%8E%E5%B0%91%E5%A5%B3%E7%A0%8C%E5%9C%96
 platreq_0012: nativeapp:application-exe=MediaPlayer.exe;content=Mama.MP3
 platreq_0013: sms:+393910910606
--- a/javamanager/javalauncher/tsrc/midlets/sptest/sptesti.jad	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/tsrc/midlets/sptest/sptesti.jad	Tue May 25 12:34:19 2010 +0300
@@ -1,5 +1,5 @@
 MIDlet-1: SPtesti, SPtesti.png, testimidletti
-MIDlet-Jar-Size: 1615
+MIDlet-Jar-Size: 1449
 MIDlet-Jar-URL: sptesti.jar
 MIDlet-Name: SPtesti
 MIDlet-Vendor: Unknown
Binary file javamanager/javalauncher/tsrc/midlets/sptest/sptesti.jar has changed
--- a/javamanager/javalauncher/tsrc/midlets/sptest/testimidletti.java	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/tsrc/midlets/sptest/testimidletti.java	Tue May 25 12:34:19 2010 +0300
@@ -47,16 +47,16 @@
 
         System.out.println("com.nokia.mid.cmdline.instance="               +System.getProperty("com.nokia.mid.cmdline.instance"));
         System.out.println("com.nokia.mid.cmdline="                        +System.getProperty("com.nokia.mid.cmdline"));
-        System.out.println("com.nokia.mid.cmdline.param.mode="             +System.getProperty("com.nokia.mid.cmdline.param.mode"));
-        System.out.println("com.nokia.mid.cmdline.param.difficultY="       +System.getProperty("com.nokia.mid.cmdline.param.difficultY"));
-        System.out.println("com.nokia.mid.cmdline.param.sounds="           +System.getProperty("com.nokia.mid.cmdline.param.sounds"));
-        System.out.println("com.nokia.mid.cmdline.param.wizard_mode="      +System.getProperty("com.nokia.mid.cmdline.param.wizard_mode"));
-        System.out.println("com.nokia.mid.cmdline.param.non_existing="     +System.getProperty("com.nokia.mid.cmdline.param.non_existing"));
+        System.out.println("mode="             +System.getProperty("mode"));
+        System.out.println("difficultY="       +System.getProperty("difficultY"));
+        System.out.println("sounds="           +System.getProperty("sounds"));
+        System.out.println("wizard_mode="      +System.getProperty("wizard_mode"));
+        System.out.println("non_existing="     +System.getProperty("param.non_existing"));
 
 
         _form.append("com.nokia.mid.cmdline.instance="               +System.getProperty("com.nokia.mid.cmdline.instance"));
         _form.append("com.nokia.mid.cmdline="                        +System.getProperty("com.nokia.mid.cmdline"));
-        _form.append("com.nokia.mid.cmdline.param.mode="             +System.getProperty("com.nokia.mid.cmdline.param.mode"));
+        _form.append("mode="             +System.getProperty("mode"));
 
 
         Display.getDisplay(this).setCurrent(_form);
@@ -71,5 +71,4 @@
     {
     }
 
-
 };
--- a/javamanager/javalauncher/tsrc/testmidletstart/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javalauncher/tsrc/testmidletstart/src.s60/main.cpp	Tue May 25 12:34:19 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 - 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -109,10 +109,10 @@
     // Create one process using this command line
     RProcess rProcess;
     // start
-//    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-uid=0x1014e720;midlet-args=startMode=startFromCmdLine;sound=ON;landscapeMode=true;"));  // OK
+//    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-uid=0x1014e720;startMode=startFromCmdLine;sound=ON;landscapeMode=true;"));  // OK
 //    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-name=%E6%98%9F%E5%A4%A2%E7%BE%8E%E5%B0%91%E5%A5%B3%E7%A0%8C%E5%9C%96"));
 //    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-name=%C3%80%C3%80NEST%C3%80.EXE"));
-//    err = rProcess.Create(KJavaLauncherExe, _L("midlet-name=SPtesti;midlet-args=mode=nativestart;sounds=ON;difficulty=medium;wizard_mode"));
+//    err = rProcess.Create(KJavaLauncherExe, _L("midlet-name=SPtesti;mode=nativestart;sounds=ON;difficulty=medium;wizard_mode"));
 
     err = rProcess.Create(KJavaLauncherExe, *pCmdLine);
     if (KErrNone == err)
@@ -214,7 +214,7 @@
     LOG(EJavaConverters, EInfo, "testmidletstart: startByJavaLauncherL: Create process");
 
     // start
-    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-uid=0x10137c4d;midlet-args=startMode=strangeStart"));
+    TInt err = rProcess.Create(KJavaLauncherExe, _L("midlet-uid=0x10137c4d;startMode=strangeStart"));
     if (KErrNone == err)
     {
         LOG(EJavaConverters, EInfo, "testmidletstart: startByJavaLauncherL: Set process commandline");
--- a/javamanager/javamanager.pro	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javamanager.pro	Tue May 25 12:34:19 2010 +0300
@@ -21,8 +21,8 @@
 SUBDIRS += javainstaller 
 SUBDIRS += javaregistry 
 SUBDIRS += javabackup 
+SUBDIRS += javasettings 
 BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javasidchecker/build/bld.inf\""  
 BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javarecognizer/build/bld.inf\""  
 BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javaappschemeplugin/build/bld.inf\""  
-BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javasettings/appmngrplugin/build/bld.inf\""  
 BLD_INF_RULES.prj_extensions += "prj_extensions" 
--- a/javamanager/javaregistry/build/javaregistryclient_0x10282476.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javaregistry/build/javaregistryclient_0x10282476.mmp	Tue May 25 12:34:19 2010 +0300
@@ -90,6 +90,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -110,10 +122,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javaregistry/javasizehelper/client/build/javasizehelperclient_0x2002DCD1.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javaregistry/javasizehelper/client/build/javasizehelperclient_0x2002DCD1.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -97,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javaregistry/javasizehelper/server/build/javasizehelperserver_0x2002DCD2.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/javaregistry/javasizehelper/server/build/javasizehelperserver_0x2002DCD2.mmp	Tue May 25 12:34:19 2010 +0300
@@ -81,6 +81,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -101,10 +113,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/javasettings/appsettingsview_qt/build/javaapplicationsettingsview.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-TEMPLATE = lib
-TARGET = javaapplicationsettingsview
-CONFIG += qt hb stl plugin
-LIBS += -ljavastorage
-TRANSLATIONS = javaruntimeapplicationsettings.ts          
-
-INCLUDEPATH += ../inc ../../../../inc
-SOURCES += ..\src\javaapplicationsettingsview.cpp ..\src\javaapplicationsettingsview_p.cpp ..\src\javaapplicationsettings.cpp
-HEADERS += ..\src\javaapplicationsettingsview.h ..\src\javaapplicationsettingsview_p.h ..\src\javaapplicationsettings.h
-
-symbian : plugin {
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.CAPABILITY = ALL -TCB
-    PLUGIN_STUB_PATH = /resource/qt/plugins/appsettings
-    pluginstub.sources = $${TARGET}.dll
-    pluginstub.path = $$PLUGIN_STUB_PATH
-    DEPLOYMENT += pluginstub
-    qtplugins.path = $$PLUGIN_STUB_PATH
-    qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
-    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin  z:$$qtplugins.path/$$basename(qtplugin)"    
-
-    include(../../../../build/symbian_uids.pri)
-    
-}
-
-# Workaround for RVCT 4.0 QT/Symbian incmpatibility
-MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
--- a/javamanager/javasettings/appsettingsview_qt/inc/applicationsettingsview.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef APPLICATIONSETTINGSVIEW_H
-#define APPLICATIONSETTINGSVIEW_H
-
-#include <hbview.h>
-#include <QtPlugin>
-
-class ApplicationSettingsView: public HbView
-{
-public:
-
-    /*
-     * Base constructor
-     */
-    explicit ApplicationSettingsView() : HbView() {}
-
-    /*
-     * Destructor
-     */
-    virtual ~ApplicationSettingsView() {}
-
-public slots:
-    /*
-     * Initializas the view with application specific info
-     *
-     * @param aAppUid Identifier for the application
-     *
-     */
-    void initialize(const QString& aAppUid);
-
-};
-
-Q_DECLARE_INTERFACE(ApplicationSettingsView,
-                    "com.nokia.ApplicationLibrary.ApplicationSettingsView/1.0");
-
-#endif // APPLICATIONSETTINGSVIEW_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "javaapplicationsettings.h"
-
-JavaApplicationSettings::JavaApplicationSettings()
-{
-    iId = 0;
-    iName = "";
-    iCurrentValue = 0;
-    iColumnName = L"";
-    iTableName = "";
-    iFilterColumnName = L"";
-    iFilterColumnValue = L"";
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues):
-        iValues(aValues)
-{
-    iName = aName;
-    iId = 0;
-    iCurrentValue = 0;
-    iColumnName = L"";
-    iTableName = "";
-    iFilterColumnName = L"";
-    iFilterColumnValue = L"";
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues):
-        iValues(aValues)
-{
-    iName = aName;
-    iId = 0;
-    iCurrentValue = 0;
-    iColumnName = aColumnName;
-    iTableName = aTableName;
-    iStorageValues = aStorageValues;
-    iFilterColumnName = L"";
-    iFilterColumnValue = L"";
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues, const std::wstring& aFilterColumnName, const std::wstring& aFilterColumnValue):
-        iValues(aValues)
-{
-    iName = aName;
-    iId = 0;
-    iCurrentValue = 0;
-    iColumnName = aColumnName;
-    iTableName = aTableName;
-    iStorageValues = aStorageValues;
-    iFilterColumnName = aFilterColumnName;
-    iFilterColumnValue = aFilterColumnValue;
-}
-
-void JavaApplicationSettings::setCurrentValue(int aCurrentValue)
-{
-    iCurrentValue = aCurrentValue;
-}
-
-int JavaApplicationSettings::getCurrentValue()
-{
-    return iCurrentValue;
-}
-
-const QString& JavaApplicationSettings::getValue(int aValueIndex)
-{
-    static const QString null;
-    if (aValueIndex >= 0 && aValueIndex < iValues.size())
-        return iValues[aValueIndex];
-    return null;
-}
-
-int JavaApplicationSettings::getValue(const QString& aValue)
-{
-    int value = -1;
-    for (int i = 0; i < iValues.size(); i++)
-    {
-        if (iValues[i] == aValue)
-        {
-            return i;
-        }
-    }
-    return value;
-}
-
-void JavaApplicationSettings::setId(HbDataFormModelItem * aId)
-{
-    iId = aId;
-}
-
-const HbDataFormModelItem * JavaApplicationSettings::getId()
-{
-    return iId;
-}
-
-const QString& JavaApplicationSettings::getName() const
-{
-    return iName;
-}
-
-const QStringList& JavaApplicationSettings::getValues() const
-{
-    return iValues;
-}
-
-const QList<JavaApplicationSettings*>& JavaApplicationSettings::getHighRiskList() const
-{
-    return iHighRiskList;
-}
-
-void JavaApplicationSettings::setHighRiskList(const QList<JavaApplicationSettings*>& aHighRiskList)
-{
-    iHighRiskList = aHighRiskList;
-}
-
-const QList<JavaApplicationSettings*>& JavaApplicationSettings::getMutuallyExclusiveList() const
-{
-    return iMutuallyExclusiveList;
-}
-
-void JavaApplicationSettings::setMutuallyExclusiveList(const QList<JavaApplicationSettings*>& aMutuallyExclusiveList)
-{
-    iMutuallyExclusiveList = aMutuallyExclusiveList;
-}
-
-const std::wstring& JavaApplicationSettings::getColumnName()
-{
-    return iColumnName;
-}
-
-const std::string& JavaApplicationSettings::getTableName()
-{
-    return iTableName;
-}
-
-const std::vector<std::wstring>& JavaApplicationSettings::getStorageValues()
-{
-    return iStorageValues;
-}
-
-const std::wstring& JavaApplicationSettings::getFilterColumnName()
-{
-    return iFilterColumnName;
-}
-
-const std::wstring& JavaApplicationSettings::getFilterColumnValue()
-{
-    return iFilterColumnValue;
-}
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGS_H
-#define JAVAAPPLICATIONSETTINGS_H
-
-#include <string>
-#include <vector>
-#include <QString>
-#include <QStringList>
-#include <hbdataformmodelitem.h>
-
-class JavaApplicationSettings
-{
-public:
-    JavaApplicationSettings(const QString&,
-                            const QStringList&);
-    JavaApplicationSettings(const QString&,
-                            const QStringList&,
-                            const std::wstring&,
-                            const std::string&,
-                            const std::vector<std::wstring>&);
-    JavaApplicationSettings(const QString&,
-                            const QStringList&,
-                            const std::wstring&,
-                            const std::string&,
-                            const std::vector<std::wstring>&,
-                            const std::wstring&,
-                            const std::wstring&);
-    JavaApplicationSettings();
-
-    const QString& getName() const;
-    const QStringList& getValues() const;
-    void setCurrentValue(int);
-    int getCurrentValue();
-    const QString& getValue(int);
-    int getValue(const QString&);
-    void setId(HbDataFormModelItem *);
-    const HbDataFormModelItem * getId();
-    const QList<JavaApplicationSettings*>& getHighRiskList() const;
-    void setHighRiskList(const QList<JavaApplicationSettings*>&);
-    const QList<JavaApplicationSettings*>& getMutuallyExclusiveList() const;
-    void setMutuallyExclusiveList(const QList<JavaApplicationSettings*>&);
-    const std::wstring& getColumnName();
-    const std::string& getTableName();
-    const std::wstring& getFilterColumnName();
-    const std::wstring& getFilterColumnValue();
-    const std::vector<std::wstring>& getStorageValues();
-private:
-    QString iName;
-    QStringList iValues;
-    HbDataFormModelItem * iId;
-    QList<JavaApplicationSettings*> iHighRiskList;
-    QList<JavaApplicationSettings*> iMutuallyExclusiveList;
-    int iCurrentValue;
-    std::wstring iColumnName;
-    std::string iTableName;
-    std::vector<std::wstring> iStorageValues;
-    std::wstring iFilterColumnName;
-    std::wstring iFilterColumnValue;
-};
-
-#endif // JAVAAPPLICATIONSETTINGS_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "javaapplicationsettingsview.h"
-#include "javaapplicationsettingsview_p.h"
-
-JavaApplicationSettingsView::JavaApplicationSettingsView() :
-        ApplicationSettingsView()
-{
-}
-
-void JavaApplicationSettingsView::initialize(const QString& aApplication)
-{
-    d_ptr = new JavaApplicationSettingsViewPrivate(aApplication);
-    d_ptr->init(this);
-}
-
-JavaApplicationSettingsView::~JavaApplicationSettingsView()
-{
-    delete d_ptr;
-}
-
-Q_EXPORT_PLUGIN2(javaapplicationsettingsview, JavaApplicationSettingsView);
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGSVIEW_H
-#define JAVAAPPLICATIONSETTINGSVIEW_H
-
-#include "applicationsettingsview.h"
-
-class JavaApplicationSettingsViewPrivate;
-
-class JavaApplicationSettingsView: public ApplicationSettingsView
-{
-    Q_OBJECT
-    Q_INTERFACES(ApplicationSettingsView)
-
-public:
-    explicit JavaApplicationSettingsView();
-    virtual ~JavaApplicationSettingsView();
-
-public slots:
-    void initialize(const QString&);
-
-signals:
-    void aboutToClose();
-
-private:
-    Q_DISABLE_COPY(JavaApplicationSettingsView)
-    Q_DECLARE_PRIVATE_D(d_ptr, JavaApplicationSettingsView)
-    Q_PRIVATE_SLOT(d_func(), void _q_settingsChanged(const QString &newValue))
-    Q_PRIVATE_SLOT(d_func(), void _q_dataItemDisplayed(const QModelIndex))
-
-private:
-    JavaApplicationSettingsViewPrivate * d_ptr;
-};
-
-
-#endif // JAVAAPPLICATIONSETTINGSVIEW_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,640 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <hbmessagebox.h>
-#include <hbdataformviewitem.h>
-#include <hbcombobox.h>
-#include <hbdataform.h>
-#include <hbdataformmodel.h>
-#include <hbdataformmodelitem.h>
-#include <hblabel.h>
-#include <QApplication>
-#include <QTranslator>
-
-#include "javaapplicationsettings.h"
-#include "javaapplicationsettingsview.h"
-#include "javaapplicationsettingsview_p.h"
-
-#include "securitystoragedatadefs.h"
-#include "javastoragenames.h"
-
-using namespace java::storage;
-using namespace std;
-
-const wchar_t ON_SCREEN_KEYPAD_VALUE_NO[] = L"0";
-const wchar_t ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS[] = L"1";
-const wchar_t ON_SCREEN_KEYPAD_VALUE_NAVIGATION[] = L"2";
-
-JavaApplicationSettingsViewPrivate::JavaApplicationSettingsViewPrivate(const QString& aJavaAppUid):
-        mainForm(0), model(0), generalSettingsGroup(0), securitySettingsGroup(0), iJavaAppUid(aJavaAppUid.toStdWString())
-{
-    // load the correct translation of the localized strings
-    QTranslator translator;
-    // Current solution reads it from Z only (this does not work with IAD)
-    // -> check if translator can handle path without drive letter (e.g. the resource
-    // is loaded from the same drive where the DLL is loaded)
-    if (translator.load("z:/resource/qt/translations/javaruntimeapplicationsettings_" + QLocale::system().name()))
-    {
-        qApp->installTranslator(&translator);
-    }
-    // init strings
-    BLANKET = hbTrId("txt_java_sett_setlabel_permission_val_blanket");
-    SESSION = hbTrId("txt_java_sett_setlabel_permission_val_session");
-    ONESHOT = hbTrId("txt_java_sett_setlabel_permission_val_oneshot");
-    DENIED = hbTrId("txt_java_sett_setlabel_permission_val_no");
-    SECURITY_LEVEL = hbTrId("txt_java_sett_setlabel_security_level");
-    USER_DEFINED = hbTrId("txt_java_sett_setlabel_security_level_val_user_defined");
-    SENSITIVE_SETTINGS = hbTrId("txt_java_sett_info_query_perm_sec");
-    SENSITIVE_SETTINGS_NET_USAGE = hbTrId("txt_java_sett_info_query_perm_net");
-    MUTUALLY_EXCLUSIVE_SETTINGS = hbTrId("txt_java_sett_info_query_perm_warn");
-    OK = hbTrId("txt_java_sett_button_settings_ok");
-    CANCEL = hbTrId("txt_java_sett_button_settings_cancel");
-    SECURITY_WARNING_TITLE = hbTrId("txt_java_sett_title_note_security_warn");
-    NET_ACCESS = hbTrId("txt_java_sett_setlabel_net_access");
-    LOW_LEVEL_NET_ACCESS = hbTrId("txt_java_sett_setlabel_low_level_net_access");
-
-    // storage
-    iStorage.reset(JavaStorage::createInstance());
-    try
-    {
-        iStorage->open();
-    }
-    catch (JavaStorageException& aJse) {}
-
-    // read all settings
-    readAllSettings();
-
-    // init form
-    mainForm = new HbDataForm();
-    mainForm->setHeading(hbTrId("txt_java_sett_title_settings"));
-    model = new HbDataFormModel();
-
-    // init settings
-    generalSettingsGroup = model->appendDataFormGroup(
-                               hbTrId("txt_java_sett_subtitle_general"), model->invisibleRootItem());
-    initSettings(generalSettings, generalSettingsGroup);
-    securitySettingsGroup = model->appendDataFormGroup(
-                                hbTrId("txt_java_sett_subtitle_security"), model->invisibleRootItem());
-    initSettings(securitySettings, securitySettingsGroup);
-
-    // if security warnings is user defined -> add the extra settings, expand
-    if (securitySettings[0].getCurrentValue() == 1)
-    {
-        securityWarningsChanged(USER_DEFINED);
-    }
-
-    // link form and model
-    mainForm->setModel(model);
-    mainForm->setExpanded(model->indexFromItem(generalSettingsGroup), true);
-    mainForm->setExpanded(model->indexFromItem(securitySettingsGroup), (securitySettings[0].getCurrentValue() == 1));
-}
-
-void JavaApplicationSettingsViewPrivate::init(JavaApplicationSettingsView* aPublicView)
-{
-    iPublicView = aPublicView;
-
-    // do the connect for the main form
-    iPublicView->connect(mainForm, SIGNAL(activated(const QModelIndex)),
-                         iPublicView, SLOT(_q_dataItemDisplayed(const QModelIndex)));
-
-    // set the form as view's widget
-    iPublicView->setWidget(mainForm);
-
-    // set title
-    iPublicView->setTitle(QString::fromStdWString(readFromStorage(PACKAGE_NAME, L"", L"", APPLICATION_PACKAGE_TABLE)));
-}
-
-JavaApplicationSettingsViewPrivate::~JavaApplicationSettingsViewPrivate()
-{
-    delete mainForm;
-    delete model;
-}
-
-void JavaApplicationSettingsViewPrivate::readAllSettings()
-{
-    // general settings
-    QStringList settingsValues;
-    vector<wstring> storageValues;
-    if (!findFromStorage(VALUE, NAME, L"Nokia-MIDlet-On-Screen-Keypad", APPLICATION_PACKAGE_ATTRIBUTES_TABLE))
-    {
-        // if the on screen keypad is predefined, it should not be changable by user
-        // -> right now it is not added to settings list. It should be changed so that
-        // the setting should not be editable by user
-        settingsValues<<hbTrId("txt_java_sett_setlabel_osk_val_no")<<hbTrId("txt_java_sett_setlabel_osk_val_game")<<hbTrId("txt_java_sett_setlabel_osk_val_navigation");
-        storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NO);
-        storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS);
-        storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NAVIGATION);
-        generalSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_osk"), settingsValues, ON_SCREEN_KEYPAD, MIDP_PACKAGE_TABLE, storageValues));
-    }
-    settingsValues = QStringList();
-    settingsValues<<hbTrId("txt_java_sett_setlabel_network_conn_val_default")<<hbTrId("txt_java_sett_setlabel_network_conn_val_ask_user");
-    generalSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_network_conn"), settingsValues));
-
-    // security settings
-    settingsValues = QStringList();
-    storageValues.clear();
-    settingsValues<<hbTrId("txt_java_sett_setlabel_security_level_val_default")<<hbTrId("txt_java_sett_setlabel_security_level_val_user_defined");
-    storageValues.push_back(SECURITY_WARNINGS_DEFAULT_MODE);
-    storageValues.push_back(SECURITY_WARNINGS_USER_DEFINED_MODE);
-    securitySettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_security_level"), settingsValues, SECURITY_WARNINGS, MIDP_PACKAGE_TABLE, storageValues));
-
-    // extra settings
-    int i=0;
-    settingsValues = QStringList();
-    storageValues.clear();
-    settingsValues<<hbTrId("txt_java_sett_setlabel_permission_val_oneshot")<<hbTrId("txt_java_sett_setlabel_permission_val_session")<<hbTrId("txt_java_sett_setlabel_permission_val_blanket")<<hbTrId("txt_java_sett_setlabel_permission_val_no");
-    storageValues.push_back(ONESHOT_INTERACTION_MODE);
-    storageValues.push_back(SESSION_INTERACTION_MODE);
-    storageValues.push_back(BLANKET_INTERACTION_MODE);
-    storageValues.push_back(DENIED_INTERACTION_MODE);
-    extraSettings.append(JavaApplicationSettings(NET_ACCESS, settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, NET_ACCESS_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(LOW_LEVEL_NET_ACCESS, settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, LOW_LEVEL_NET_ACCESS_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_messaging"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, MESSAGING_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_restricted_messaging"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, RESTRICTED_MESSAGING_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_call_control"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, CALL_CONTROL_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_local_conn"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, LOCAL_CONNECTIVITY_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_mm_record"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, MULTIMEDIA_RECORDING_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_write_data"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, WRITE_USER_DATA_ACCESS_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_read_data"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, READ_USER_DATA_ACCESS_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_location"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, LOCATION_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_landmarks"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, LANDMARK_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_auth"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, AUTHENTICATION_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_smartcard"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, SMART_CARD_COMMUNICATION_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_app_auto_invoc"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, APPLICATION_AUTO_INVOCATION_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_broadcast"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, BROADCAST_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-    extraSettings.append(JavaApplicationSettings(hbTrId("txt_java_sett_setlabel_nfc_write_access"), settingsValues, CURRENT_SETTING, MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP, NFC_WRITE_ACCESS_SETTINGS));
-    readFromStorage(extraSettings[i]);
-    i++;
-
-    // configure the high risk lists
-    QList<JavaApplicationSettings*> highRiskList;
-    // net access with multimedia and read user data
-    highRiskList << &(extraSettings[6]) << &(extraSettings[8]);
-    extraSettings[0].setHighRiskList(highRiskList);
-    // low level net access with multimedia and read user data
-    extraSettings[1].setHighRiskList(highRiskList);
-    // messaging with multimedia and read user data
-    extraSettings[2].setHighRiskList(highRiskList);
-    // restricted messaging with multimedia and read user data
-    extraSettings[3].setHighRiskList(highRiskList);
-    // call control with multimedia and read user data
-    extraSettings[4].setHighRiskList(highRiskList);
-    // local connectivity with multimedia and read user data
-    extraSettings[5].setHighRiskList(highRiskList);
-    // multimedia with net access, low level net access, messaging,
-    // restricted messaging, call control and local connectivity
-    highRiskList.clear();
-    highRiskList << &(extraSettings[0]) << &(extraSettings[1])
-    << &(extraSettings[2]) << &(extraSettings[3])
-    << &(extraSettings[4]) << &(extraSettings[5]);
-    extraSettings[6].setHighRiskList(highRiskList);
-    // read user data with net access, low level net access, messaging,
-    // restricted messaging, call control and local connectivity
-    extraSettings[8].setHighRiskList(highRiskList);
-
-    // configure the mutually exclusive list
-    QList<JavaApplicationSettings*> mutuallyExclusiveList;
-    //net access with application auto invocation
-    mutuallyExclusiveList << &(extraSettings[13]);
-    extraSettings[0].setMutuallyExclusiveList(mutuallyExclusiveList);
-    //low level net access with application auto invocation
-    extraSettings[1].setMutuallyExclusiveList(mutuallyExclusiveList);
-    //application auto invocation with net access and low level net access
-    mutuallyExclusiveList.clear();
-    mutuallyExclusiveList << &(extraSettings[0]) << &(extraSettings[1]);
-    extraSettings[13].setMutuallyExclusiveList(mutuallyExclusiveList);
-}
-
-void JavaApplicationSettingsViewPrivate::initSettings(QVector<JavaApplicationSettings>& settings, HbDataFormModelItem * parent)
-{
-    for (int i=0; i<settings.size(); i++)
-    {
-        HbDataFormModelItem * appSettings = model->appendDataFormItem(
-                                                HbDataFormModelItem::ComboBoxItem,
-                                                settings[i].getName(), parent);
-        settings[i].setId(appSettings);
-        appSettings->setContentWidgetData(QString("items"), settings[i].getValues());
-        appSettings->setContentWidgetData(QString("currentIndex"),readFromStorage(settings[i]));
-    }
-}
-
-void JavaApplicationSettingsViewPrivate::writeSettings(JavaApplicationSettings& settings, const QString &aNewValue)
-{
-    QStringList values = settings.getValues();
-    int currentValue = settings.getCurrentValue();
-    int newValue = settings.getValue(aNewValue);
-    if (newValue != -1 && currentValue != newValue)
-    {
-        // handle blanket settings
-        if (aNewValue == BLANKET)
-        {
-            // check blanket settings
-            if (!blanketAllowed(settings))
-            {
-                // change back to the old value
-                HbComboBox * settingsCombo = itemToComboBox(settings.getId());
-                settingsCombo->setCurrentIndex(currentValue);
-                return;
-            }
-        }
-        settings.setCurrentValue(newValue);
-        writeToStorage(settings);
-    }
-}
-
-bool JavaApplicationSettingsViewPrivate::blanketAllowed(const JavaApplicationSettings &settings)
-{
-    // handle the high risk items
-    QList<JavaApplicationSettings*> highRiskList = settings.getHighRiskList();
-    if (highRiskList.size() > 0)
-    {
-        // go through the list and see if any of the setings are in blanket
-        for (int i=0; i<highRiskList.size(); i++)
-        {
-            if (highRiskList[i]->getValue(highRiskList[i]->getCurrentValue())
-                    == BLANKET)
-            {
-                QString secWarning = SENSITIVE_SETTINGS;
-                if (settings.getName() == NET_ACCESS
-                        || highRiskList[i]->getName() == NET_ACCESS
-                        || settings.getName() == LOW_LEVEL_NET_ACCESS
-                        || highRiskList[i]->getName() == LOW_LEVEL_NET_ACCESS)
-                {
-                    secWarning = SENSITIVE_SETTINGS_NET_USAGE;
-                }
-                /*if (!(HbMessageBox::launchQuestionMessageBox(
-                        secWarning,OK,CANCEL ,new HbLabel(SECURITY_WARNING_TITLE))))
-                {
-                    return false;
-                }*/
-                break;
-            }
-        }
-    }
-    // handle the mutually exclusive rules
-    QList<JavaApplicationSettings*> mutuallyExclusiveList = settings
-            .getMutuallyExclusiveList();
-    if (mutuallyExclusiveList.size() > 0)
-    {
-        // go through the list and see if any of the setings are in blanket
-        for (int i=0; i<mutuallyExclusiveList.size(); i++)
-        {
-            if (mutuallyExclusiveList[i]->getValue(
-                        mutuallyExclusiveList[i]->getCurrentValue()) == BLANKET)
-            {
-                bool isBlanketAllowed = true /*(HbMessageBox::launchQuestionMessageBox(
-                        MUTUALLY_EXCLUSIVE_SETTINGS,OK,CANCEL, new HbLabel(SECURITY_WARNING_TITLE)))*/;
-                if (isBlanketAllowed)
-                {
-                    // change  the current value to the maximum allowed
-                    bool isBlanket = true;
-                    do
-                    {
-                        if (isBlanket)
-                        {
-                            QStringList allowedValues = mutuallyExclusiveList[i]->getValues();
-                            int selectedValue = mutuallyExclusiveList[i]->getCurrentValue();
-                            // select the maximum allowed value
-                            for (int j=0; j<allowedValues.size(); j++)
-                            {
-                                if (allowedValues[j] == SESSION)
-                                {
-                                    selectedValue = j;
-                                    break;
-                                }
-                                if (allowedValues[j] == ONESHOT)
-                                {
-                                    selectedValue = j;
-                                }
-                                else if (allowedValues[j] == DENIED
-                                         && allowedValues[selectedValue] == BLANKET)
-                                {
-                                    selectedValue = j;
-                                }
-                            }
-                            // set the maximum allowed value
-                            mutuallyExclusiveList[i]->setCurrentValue(selectedValue);
-                            HbComboBox * settingsCombo = itemToComboBox(
-                                                             mutuallyExclusiveList[i]->getId());
-                            settingsCombo->setCurrentIndex(selectedValue);
-                            writeToStorage(*mutuallyExclusiveList[i]);
-                        }
-                        i++;
-                        // end of list?
-                        if (i >= mutuallyExclusiveList.size())
-                        {
-                            break;
-                        }
-                        // move on into the list
-                        isBlanket = (mutuallyExclusiveList[i]->getValue(
-                                         mutuallyExclusiveList[i]->getCurrentValue()) == BLANKET);
-                    }
-                    while (true);
-                }
-                return isBlanketAllowed;
-            }
-        }
-    }
-    return true;
-}
-
-void JavaApplicationSettingsViewPrivate::_q_settingsChanged(const QString &newValue)
-{
-    HbComboBox * sender = static_cast<HbComboBox*>(iPublicView->sender());
-    if (sender)
-    {
-        JavaApplicationSettings* settings = findSettings(sender);
-        if (settings != NULL)
-        {
-            // security warnings
-            if (settings->getName() == SECURITY_LEVEL)
-            {
-                securityWarningsChanged(newValue);
-//                return;
-            }
-            // any other settings are treated same
-            writeSettings(*settings, newValue);
-        }
-    }
-}
-
-void JavaApplicationSettingsViewPrivate::securityWarningsChanged(const QString &newValue)
-{
-    if (newValue == USER_DEFINED)
-    {
-        // append the extra settings and values
-        for (int i=0; i<extraSettings.size(); i++)
-        {
-            if (extraSettings[i].getCurrentValue() >= 0)
-            {
-                HbDataFormModelItem * appSettings = model->appendDataFormItem(
-                                                        HbDataFormModelItem::ComboBoxItem,
-                                                        extraSettings[i].getName(), securitySettingsGroup);
-                extraSettings[i].setId(appSettings);
-                appSettings->setContentWidgetData(QString("currentIndex"),extraSettings[i].getCurrentValue());
-            }
-        }
-    }
-    else
-    {
-        // remove the extra settings
-        for (int i=0; i<extraSettings.size(); i++)
-        {
-            if (extraSettings[i].getId())
-            {
-                HbComboBox * extraSettingsId = itemToComboBox(extraSettings[i].getId());
-                if (extraSettingsId)
-                {
-                    JavaApplicationSettingsView::disconnect(extraSettingsId, 0, 0, 0);
-                    model->removeItem(model->indexFromItem(extraSettings[i].getId()));
-                    extraSettings[i].setId(0);
-                }
-            }
-        }
-    }
-}
-
-void JavaApplicationSettingsViewPrivate::_q_dataItemDisplayed(const QModelIndex dataItemIndex)
-{
-    HbDataFormModelItem *item = static_cast<HbDataFormModel*>(
-                                    mainForm->model())->itemFromIndex(dataItemIndex);
-    int itemType = item->data(HbDataFormModelItem::ItemTypeRole).toInt();
-    if (HbDataFormModelItem::DataItemType(itemType)
-            == HbDataFormModelItem::ComboBoxItem)
-    {
-        HbComboBox * comboBox = static_cast<HbComboBox*>(
-                                    mainForm->dataFormViewItem(dataItemIndex)->dataItemContentWidget());
-        // add the extra settings values
-        for (int i=0; i<extraSettings.size(); i++)
-        {
-            if (extraSettings[i].getId() == item)
-            {
-                if (comboBox->count() == 0)
-                {
-                    comboBox->addItems(extraSettings[i].getValues());
-                }
-                comboBox->setCurrentIndex(extraSettings[i].getCurrentValue());
-                break;
-            }
-        }
-        iPublicView->connect(comboBox,
-                             SIGNAL(currentIndexChanged(const QString &)),
-                             iPublicView, SLOT(_q_settingsChanged(const QString &)));
-    }
-}
-
-JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbComboBox* id)
-{
-    JavaApplicationSettings* settings = findSettings(id, generalSettings);
-    if (settings == NULL)
-    {
-        settings = findSettings(id, securitySettings);
-        if (settings == NULL)
-        {
-            settings = findSettings(id, extraSettings);
-        }
-    }
-    return settings;
-}
-
-JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbComboBox* id, QVector<JavaApplicationSettings>& allSettings)
-{
-    for (int i=0; i<allSettings.size(); i++)
-    {
-        if (itemToComboBox(allSettings[i].getId()) == id)
-        {
-            return &allSettings[i];
-        }
-    }
-    return NULL;
-}
-
-HbComboBox * JavaApplicationSettingsViewPrivate::itemToComboBox(const HbDataFormModelItem * item)
-{
-    HbDataFormViewItem * viewItem = mainForm->dataFormViewItem(
-                                        model->indexFromItem(item));
-    if (viewItem)
-    {
-        return static_cast<HbComboBox*>(viewItem->dataItemContentWidget());
-    }
-    return NULL;
-}
-
-int JavaApplicationSettingsViewPrivate::readFromStorage(JavaApplicationSettings& settings)
-{
-    int currentValue = -1;
-    if (settings.getColumnName().size() > 0 && settings.getTableName().size() > 0)
-    {
-        wstring value = L"";
-
-        JavaStorageApplicationEntry_t query;
-        JavaStorageApplicationList_t queryResult;
-        JavaStorageEntry attr;
-        attr.setEntry(ID, iJavaAppUid);
-        query.insert(attr);
-        if (settings.getFilterColumnName().size() > 0)
-        {
-            attr.setEntry(settings.getFilterColumnName(), settings.getFilterColumnValue());
-            query.insert(attr);
-        }
-        attr.setEntry(settings.getColumnName(), L"");
-        query.insert(attr);
-
-        try
-        {
-            iStorage->search(settings.getTableName(), query, queryResult);
-        }
-        catch (JavaStorageException& aJse)
-        {
-            // Don't leave. Set defaults.
-        }
-
-        findEntry(queryResult, settings.getColumnName(), value);
-
-        if (value.size() > 0)
-        {
-            vector<wstring> storageValues = settings.getStorageValues();
-            for (int i=0; i<storageValues.size(); i++)
-            {
-                if (storageValues[i] == value)
-                {
-                    currentValue = i;
-                    break;
-                }
-            }
-        }
-    }
-
-    settings.setCurrentValue(currentValue);
-    return currentValue;
-}
-
-void JavaApplicationSettingsViewPrivate::writeToStorage(JavaApplicationSettings& settings)
-{
-    JavaStorageApplicationEntry_t oldEntry;
-    JavaStorageEntry attr;
-    attr.setEntry(ID, iJavaAppUid);
-    oldEntry.insert(attr);
-    JavaStorageApplicationEntry_t entry;
-    if (settings.getFilterColumnName().size() > 0)
-    {
-        attr.setEntry(settings.getFilterColumnName(), settings.getFilterColumnValue());
-        oldEntry.insert(attr);
-    }
-    attr.setEntry(settings.getColumnName(), settings.getStorageValues()[settings.getCurrentValue()]);
-    entry.insert(attr);
-
-    try
-    {
-        iStorage->update(settings.getTableName(), entry, oldEntry);
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void JavaApplicationSettingsViewPrivate::findEntry(const JavaStorageApplicationList_t& queryResult,
-        const std::wstring& eName,
-        std::wstring& eValue)
-{
-    if (queryResult.size() > 0)
-    {
-        JavaStorageApplicationEntry_t entry = queryResult.front();
-        JavaStorageEntry findPattern;
-        findPattern.setEntry(eName, L"");
-        JavaStorageApplicationEntry_t::const_iterator findIterator =
-            entry.find(findPattern);
-        if (findIterator != entry.end())
-        {
-            eValue = findIterator->entryValue();
-        }
-    }
-}
-
-bool JavaApplicationSettingsViewPrivate::findFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
-{
-    wstring value = readFromStorage(aColumnName, aColumnFilterName, aColumnFilterValue, aTableName);
-
-    return (value.size() > 0);
-}
-
-wstring JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
-{
-    wstring value = L"";
-
-    JavaStorageApplicationEntry_t query;
-    JavaStorageApplicationList_t queryResult;
-    JavaStorageEntry attr;
-    attr.setEntry(ID, iJavaAppUid);
-    query.insert(attr);
-    if (aColumnFilterName.size() > 0)
-    {
-        attr.setEntry(aColumnFilterName, aColumnFilterValue);
-        query.insert(attr);
-    }
-    attr.setEntry(aColumnName, L"");
-    query.insert(attr);
-
-    try
-    {
-        iStorage->search(aTableName, query, queryResult);
-    }
-    catch (JavaStorageException& aJse)
-    {
-        // Don't leave. Set defaults.
-    }
-
-    findEntry(queryResult, aColumnName, value);
-
-    return value;
-}
-
-
-#ifdef WIN32
-#include "./moc/moc_javaapplicationsettingsview.cpp"
-#else
-#include "moc_javaapplicationsettingsview.cpp"
-#endif
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGSVIEW_P_H
-#define JAVAAPPLICATIONSETTINGSVIEW_P_H
-
-#include <QVector>
-#include <memory>
-#include "javastorage.h"
-
-class HbComboBox;
-class HbDataForm;
-class HbDataFormModel;
-class HbDataFormModelItem;
-class JavaApplicationSettingsView;
-class JavaApplicationSettings;
-
-class JavaApplicationSettingsViewPrivate
-{
-
-public:
-    JavaApplicationSettingsViewPrivate(const QString& aApplication);
-    virtual ~JavaApplicationSettingsViewPrivate();
-    void init(JavaApplicationSettingsView*);
-
-    // slots
-    void _q_settingsChanged(const QString &newValue);
-    void _q_dataItemDisplayed(const QModelIndex);
-
-private:
-    void readAllSettings();
-    void initSettings(QVector<JavaApplicationSettings>& settings, HbDataFormModelItem * parent);
-    void writeSettings(JavaApplicationSettings& settings, const QString &newValue);
-    void securityWarningsChanged(const QString &);
-    bool blanketAllowed(const JavaApplicationSettings &settings);
-    HbComboBox * itemToComboBox(const HbDataFormModelItem *);
-    JavaApplicationSettings* findSettings(HbComboBox* id);
-    JavaApplicationSettings* findSettings(HbComboBox* id, QVector<JavaApplicationSettings>& settings);
-    int readFromStorage(JavaApplicationSettings& settings);
-    void writeToStorage(JavaApplicationSettings& settings);
-    bool findFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&);
-    std::wstring readFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&);
-    void findEntry(const java::storage::JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue);
-private:
-    HbDataForm * mainForm;
-    HbDataFormModel *model;
-    HbDataFormModelItem * generalSettingsGroup;
-    HbDataFormModelItem * securitySettingsGroup;
-    QVector<JavaApplicationSettings> generalSettings;
-    QVector<JavaApplicationSettings> securitySettings;
-    QVector<JavaApplicationSettings> extraSettings;
-    JavaApplicationSettingsView* iPublicView;
-    std::auto_ptr<java::storage::JavaStorage> iStorage;
-    std::wstring iJavaAppUid;
-    QString BLANKET,SESSION,ONESHOT,DENIED,SECURITY_LEVEL,USER_DEFINED,SENSITIVE_SETTINGS,SENSITIVE_SETTINGS_NET_USAGE,MUTUALLY_EXCLUSIVE_SETTINGS,OK,CANCEL,SECURITY_WARNING_TITLE,NET_ACCESS,LOW_LEVEL_NET_ACCESS;
-};
-
-
-#endif // JAVAAPPLICATIONSETTINGSVIEW_P_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings/bld.inf	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* 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: Generated bld.inf -file
+*
+*/
+
+PRJ_PLATFORMS
+default
+
+#include "appmngrplugin/build/bld.inf"  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings/javasettings.pro	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,18 @@
+#
+# 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: Generated file - do not edit manually
+#
+TEMPLATE = subdirs
+BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"appmngrplugin/build/bld.inf\""  
+BLD_INF_RULES.prj_extensions += "prj_extensions" 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+include $(JAVA_SRC_ROOT)/build/Makefile.defs
+
+
+ifdef RD_JAVA_APPLICATION_SETTINGS_QT
+COMPONENTS += appsettingsview_qt/build
+SYMBIAN_ONLY += appsettingsview_qt/build
+else
+ifndef RD_JAVA_S60_RELEASE_5_0_IAD
+NONQTSUBSYSTEMS += appmngrplugin/build
+SYMBIAN_ONLY += appmngrplugin/build
+endif
+endif
+
+# Declare that release preparation removes subdirectories not in build, except
+# listed special cases
+REMOVE_NOTBUILT_EXCLUDING = dummy
+
+include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/javamanager/preinstaller/build/javapreinstaller_0x2002DCC6.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/preinstaller/build/javapreinstaller_0x2002DCC6.mmp	Tue May 25 12:34:19 2010 +0300
@@ -80,6 +80,17 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -100,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javamanager/subsystem.mk	Tue May 11 16:07:20 2010 +0300
+++ b/javamanager/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -16,24 +16,22 @@
 
 include $(JAVA_SRC_ROOT)/build/Makefile.defs
 
-
 SUBSYSTEMS = \
 	javacaptain \
 	javainstaller \
 	javaregistry \
-	javabackup
+	javabackup \
+	javasettings
 
-    
 COMPONENTS = \
-    preinstaller/build \
-    debugapi/build \
-    javalauncher/build
+	preinstaller/build \
+	debugapi/build \
+	javalauncher/build
 
-    
 NONQTSUBSYSTEMS = \
 	javasidchecker/build \
 	javarecognizer/build \
-    javaappschemeplugin/build
+	javaappschemeplugin/build
 
 SYMBIAN_ONLY = \
 	javaregistry \
@@ -42,24 +40,8 @@
 	javasidchecker/build \
 	javarecognizer/build \
 	preinstaller/build \
-    debugapi/build \
-    javaappschemeplugin/build
-
-ifdef RD_JAVA_APPLICATION_SETTINGS_QT
-COMPONENTS += \
-    javasettings/appsettingsview_qt/build
-SYMBIAN_ONLY += \
-    javasettings/appsettingsview_qt/build
-else
-ifndef RD_JAVA_S60_RELEASE_5_0_IAD
-NONQTSUBSYSTEMS += \
-	javasettings/appmngrplugin/build
-SYMBIAN_ONLY += \
-	javasettings/appmngrplugin/build
-endif
-endif
-
-LINUX_ONLY = 
+	debugapi/build \
+	javaappschemeplugin/build
 
 javasidchecker/build : javaregistry
 
--- a/javaruntimes/installer/starterdll/build/javainstallerstarter_0x2002DCB5.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/installer/starterdll/build/javainstallerstarter_0x2002DCB5.mmp	Tue May 25 12:34:19 2010 +0300
@@ -75,6 +75,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -95,10 +108,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 START RESOURCE ../data/javainstaller_reg.rss
 
 TARGETPATH /private/10003a3f/apps
--- a/javaruntimes/installer/starterdll/src/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/installer/starterdll/src/main.cpp	Tue May 25 12:34:19 2010 +0300
@@ -361,8 +361,7 @@
     }
 
 #ifdef RD_JAVA_INSTALLERUI_ENABLED
-#if 0 // Disable 10.1 JavaInstallerUi
-//#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
     jvm->appendSystemProperty(
         L"-Dcom.nokia.mj.impl.installer.ui="
         L"com.nokia.mj.impl.installer.ui.eswt2.InstallerUiEswt");
--- a/javaruntimes/installer/starterexe/build/javainstaller_0x2001843A.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/installer/starterexe/build/javainstaller_0x2001843A.mmp	Tue May 25 12:34:19 2010 +0300
@@ -76,6 +76,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		LocalServices NetworkServices ProtServ WriteDeviceData ReadDeviceData ReadUserData WriteUserData UserEnvironment SwEvent Location MultiMediaDD NetworkControl TrustedUI 
@@ -97,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/jvmargmodifier/default/build/javajvmargsmodifier_0x2002DCB8.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/jvmargmodifier/default/build/javajvmargsmodifier_0x2002DCB8.mmp	Tue May 25 12:34:19 2010 +0300
@@ -74,6 +74,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -94,10 +107,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile_0x2002DCB9.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile_0x2002DCB9.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -97,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/midp/runtime/build/javamidpruntime_0x2002DCBF.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/midp/runtime/build/javamidpruntime_0x2002DCBF.mmp	Tue May 25 12:34:19 2010 +0300
@@ -89,6 +89,17 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
 
 CAPABILITY		all -tcb 
 
@@ -109,10 +120,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java	Tue May 25 12:34:19 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.IOException;
+import java.util.Hashtable;
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -48,6 +49,7 @@
 import com.nokia.mj.impl.utils.Uid;
 import com.nokia.mj.impl.utils.StartUpTrace;
 
+
 /**
  * A core of the MIDP life cycle. This class controls the life time of the
  * MIDlet.
@@ -175,6 +177,12 @@
     private        boolean               mAutoinvocationFromUrl = false;
 
     /**
+     * PropertyKeys that are not listed in the values of Jad / Manifest
+     * attribute Nokia-MIDlet-Launch-Params
+     */
+    private        Hashtable             mAcceptedUserProperties;
+
+    /**
      * Flag for identifying whether the MIDlet is a standalone MIDlet.
      */
     private        boolean               mStandAlone = false;
@@ -370,8 +378,10 @@
         if (Log.mOn)
             Log.logI("MIDlet launch count is : " + Integer.toString(mRelaunchCount + 1));
 
-        // Update possible MIDlet arguments
-        setMidletArguments(applicationArgs);
+        if (applicationArgs != null)
+        {
+            JvmInternal.setSystemProperty("com.nokia.mid.cmdline", applicationArgs);
+        }
 
         if (mState == PRE_INIT_DONE)
         {
@@ -384,6 +394,8 @@
         }
         else
         {
+            // Update possible MIDlet arguments
+            setMidletArguments();
             // Bring the MIDlet to foreground
             CoreUi.foregroundRequest();
         }
@@ -794,8 +806,8 @@
             // Decode arguments
             String midletArgs = decodeArgs(encodedMidletArgs);
 
-            // Parse them
-            setMidletArguments(midletArgs);
+            // Resetting the system property after decoding.
+            JvmInternal.setSystemProperty("com.nokia.mid.cmdline", midletArgs);
         }
 
         // If the runtime is set to pre warmed state, then the
@@ -849,34 +861,48 @@
      * Native side function java::util::runtime::MidpRuntimeStarter::encodeArgs()
      * was used to encode the string
      *
-     * @param args original wstring
-     * @return encoded wstring
+     * @param encodedArgs encoded arguments
+     * @return decoded argument string
      */
     private String decodeArgs(String encodedArgs)
     {
         StringBuffer res = new StringBuffer();
-        int idx = encodedArgs.indexOf('%');
-        int cur = 0;
+        int  idx = 0;
+        int  len = encodedArgs.length();
+        char t;
 
-        while (idx != -1)
+        // Decoding is done in blocks of 4 or 2 characters.
+        // Possible extra chars are ignored
+
+        while (idx < len)
         {
-            // Add all characters up to but not including the '%' char
-            // to final result string
-            if ((idx - cur) > 0)
+            t = encodedArgs.charAt(idx);
+            if (t < 'a')
             {
-                res.append(encodedArgs.substring(cur, idx));
+                if (idx + 4 >= len)
+                    break;
+                // decode one 16-bit char
+                char a = (char)(t - 'A');
+                char b = (char)(encodedArgs.charAt(idx+1) - 'A');
+                char c = (char)(encodedArgs.charAt(idx+2) - 'A');
+                char d = (char)(encodedArgs.charAt(idx+3) - 'A');
+                char r = (char)(((a<<12)+(b<<8)+(c<<4)+d));
+                res.append(r);
+                idx = idx + 4;
             }
-
-            // Decode all special sequences 'X%' in same way.
-            // "X%" -> "X", so skip "%"
-            // Note that "%%" is decoded to "%"
-            cur = idx + 1;
-            idx = encodedArgs.indexOf('%', cur + 1);
+            else
+            {
+                if (idx + 2 >= len)
+                    break;
+                // decode one 8-bit char
+                char a = (char)(t - 'a');
+                char b = (char)(encodedArgs.charAt(idx+1) - 'a');
+                char r = (char)((a<<4)+b);
+                res.append(r);
+                idx = idx + 2;
+            }
         }
 
-        // Add characters after last special character if any
-        res.append(encodedArgs.substring(cur, encodedArgs.length()));
-
         return res.toString();
     }
 
@@ -931,6 +957,10 @@
         // from storage.
         setMidletInfo();
 
+        // If system property com.nokia.mid.cmdline has value, it contains
+        // the arguments for the current MIDlet.
+        setMidletArguments();
+    
         if (mPrewarmStart)
         {
             // Get the recorded heap size from previous run.
@@ -1116,18 +1146,12 @@
     /**
      * Parse the MIDlet arguments given as parameter and set them
      * to system properties so that MIDlet can access them.
-     *
-     * @param applicationArgs the MIDlet arguments, can be empty
      */
-    private void setMidletArguments(String applicationArgs)
+    private void setMidletArguments()
     {
-        if (applicationArgs == null)
-        {
-            applicationArgs = "";
-        }
-        JvmInternal.setSystemProperty("com.nokia.mid.cmdline", applicationArgs);
+        String applicationArgs = System.getProperty("com.nokia.mid.cmdline");
 
-        if (applicationArgs.length() > 0)
+        if (applicationArgs != null && applicationArgs.length() > 0)
         {
             if (Log.mOn)
                 Log.logI("MIDlet arguments are : " + applicationArgs);
@@ -1142,6 +1166,13 @@
             String propertyKey;
             String propertyValue;
             mAutoinvocationFromUrl = false;
+            if (mAcceptedUserProperties == null)
+            {
+                // Doing intialization only once.
+                String launchParams = 
+                  ApplicationInfoImpl.getMidletInfo().getAttribute("Nokia-MIDlet-Launch-Params");
+                mAcceptedUserProperties = split(launchParams, ",");
+            }
 
             do
             {
@@ -1155,7 +1186,6 @@
                     continue;
                 }
 
-                argBuf.append("com.nokia.mid.cmdline.param.");
                 if (idx != -1)
                 {
                     argBuf.append(applicationArgs.substring(cur, idx));
@@ -1183,14 +1213,17 @@
                     propertyValue = arg.substring(indEq + 1);
                 }
 
-                if (propertyKey.equals("com.nokia.mid.cmdline.param.PromptAppStartup"))
+                if (propertyKey.equals("PromptAppStartup"))
                 {
                     mAutoinvocationFromUrl = true;
                     if (Log.mOn)
                         Log.logI("MIDlet had argument PromptAppStartup");
                 }
 
-                JvmInternal.setSystemProperty(propertyKey, propertyValue);
+                if (mAcceptedUserProperties.get(propertyKey) != null)
+                {
+                    JvmInternal.setUserProperty(propertyKey, propertyValue);
+                }
 
                 cur = idx + 1;
             }
@@ -1199,6 +1232,45 @@
     }
 
     /**
+     * Split a string into Hashtable. This util method splits the given
+     * string separated by given separator into Hashtable so that tokens
+     * are keys and values are just empty Strings. Before adding the tokens
+     * into hashtable those are trimmed.
+     *
+     * @str String to split.
+     * @separator A separator that separates the tokens.
+     */
+    static Hashtable split(String str, String separator)
+    {
+        Hashtable ht = new Hashtable();
+        if (separator != null)
+        {
+            int separatorLen = separator.length();
+            if (str != null && separatorLen > 0)
+            {
+                int index = str.indexOf(separator);
+                while (index != -1)
+                {
+                    String token = str.substring(0,index).trim();
+                    ht.put(token, "");
+                    str = str.substring(index + separatorLen);
+                    index = str.indexOf(separator);
+                }
+            }
+        }
+        if (str != null)
+        {
+            str = str.trim();
+            if (str.length() > 0)
+            {
+                // add token after last separator
+                ht.put(str, "");
+            }
+        }
+        return ht;
+    }
+
+    /**
      * Class for extending the TimerTask. This is for the shut down timer.
      */
     private class ShutDownTimerTask extends TimerTask
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java	Tue May 25 12:34:19 2010 +0300
@@ -183,17 +183,23 @@
                     // Determine what is the <n> of this MIDlet,
                     // (which attribute "Nokia-MIDlet-Localized-<n>" contains the localized
                     // name of this MIDlet)
-                    if ((value.getValue().indexOf(midletInfo.getName()) > -1) &&
-                            name.getValue().startsWith("MIDlet-"))
+                    String valueStr = value.getValue();
+                    String nameStr = name.getValue();
+                    if ((valueStr.indexOf(midletInfo.getName()) > -1) &&
+                            nameStr.startsWith("MIDlet-") &&
+                            !nameStr.equals("MIDlet-Name")
+                            )
                     {
                         try
                         {
                             // Try to parse the rest of attribute name (after "MIDlet-")
-                            // into an int. If this throws exception, the attribute was
-                            // propably 'MIDlet-Name'
-                            midletN = Integer.parseInt(name.getValue().substring(7));
+                            // into an int.
+                            midletN = Integer.parseInt(nameStr.substring(7));
                         }
-                        catch (NumberFormatException ne) {};
+                        catch (NumberFormatException ne) 
+                        {
+                            Log.logW("Error in getting localized name: " + nameStr, ne);
+                        }
                     }
                 }
 
--- a/javaruntimes/midp/runtime/src.linux/platformimpl.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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:  Platform dependent implementations.
- *
-*/
-
-#include "logger.h"
-
-void consumeRigthsImpl(const std::wstring& uri,
-                       const std::wstring& drmContentId,
-                       std::string& status,
-                       bool startPhase,
-                       int& handle)
-{
-    JELOG2(EJavaRuntime);
-}
-
--- a/javaruntimes/midp/runtime/src.linux/platformrequesthandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +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:
-*
-*/
-
-#include "logger.h"
-#include "platformrequesthandler.h"
-#include "exceptionbase.h"
-
-using namespace java::runtime;
-using namespace java::util;
-
-PlatformRequestInterface* getPlatformRequestHandlerObj()
-{
-    JELOG2(EJavaRuntime);
-    return new PlatformRequestHandler();
-}
-
-/**
- *
- */
-PlatformRequestHandler::PlatformRequestHandler()
-{
-}
-
-/**
- *
- */
-PlatformRequestHandler::~PlatformRequestHandler()
-{
-}
-
-/**
- * Missing implementation.
- */
-void PlatformRequestHandler::handleUri(const std::wstring& aUri)
-{
-    throw ExceptionBase(PlatformRequestInterface::CONNECTION_NOT_SUPPORTED,
-                        "Not implemented",__FILE__,__FUNCTION__,__LINE__);
-}
-
--- a/javaruntimes/midp/runtime/src.linux/platformrequesthandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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:
-*
-*/
-
-#ifndef PLATFORMREQUESTHANDLER_H
-#define PLATFORMREQUESTHANDLER_H
-
-#include "platformrequestinterface.h"
-
-namespace java // codescanner::namespace
-{
-namespace runtime // codescanner::namespace
-{
-
-class PlatformRequestHandler : public PlatformRequestInterface
-{
-public:
-
-    PlatformRequestHandler();
-    virtual ~PlatformRequestHandler();
-
-    // Methods of PlatformRequestInterface.
-    virtual void handleUri(const std::wstring& aUri);
-
-private:
-
-    // Not implemented.
-    PlatformRequestHandler(const PlatformRequestHandler &x);
-    PlatformRequestHandler &operator=(const PlatformRequestHandler &x);
-
-};
-
-} // end namespace runtime
-} // end namespace java
-
-#endif // PLATFORMREQUESTHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/midp/runtime/tsrc/rttests/build/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,83 @@
+<!--
+#
+# Copyright (c) 2008-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: 
+#
+-->
+
+<project name="JavaMidpRuntimeTests" basedir="." default="deploy.ut">
+
+  <import file="../../../../../../build/utilities.xml"/>
+
+  <property environment="env"/>
+  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
+  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
+
+  <property name="src.dir" location="../javasrc"/>
+  <property name="build.dir" location="../build"/>
+  <property name="classes.dir" location="${build.dir}/javabuild"/>
+  <property name="javacommonutilstests.jar.filename" value="javacommonutilstests.jar"/>
+  <property name="utils.jar.filename" value="javacommonutils.jar"/>
+  <property name="logger.jar.filename" value="logger.jar"/>
+  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
+  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
+  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
+
+  <property name="javac.source" value="1.3"/>
+  <property name="javac.target" value="1.3"/>
+
+  <target name="clean" depends="init.properties">
+    <property name="dist.dir" location="${vm.extension.directory}"/>
+    <delete dir="${classes.dir}"/>
+    <delete file="${dist.dir}/${javacommonutilstests.jar.filename}"/>
+    <delete file="${dist.dir}/${junit.jar.filename}"/>
+    <delete file="${dist.dir}/${junit.omj.jar.filename}"/>
+  </target>
+
+  <target name="compile.ut" depends="init.properties">
+    <mkdir dir="${classes.dir}"/>
+    <javac source="${javac.source}" target="${javac.target}"
+           destdir="${classes.dir}">
+           <classpath>
+               <pathelement location="${impl.cldc.jar}"/>
+               <pathelement location="${public.api.jar}"/>
+               <pathelement location="${platform.api.jar}"/>
+               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
+               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
+           </classpath>
+      <src path="${src.dir}"/>
+    </javac>
+  </target>
+
+  <target name="deploy.ut" depends="compile.ut">
+      <property name="dist.dir" location="${vm.extension.directory}"/>
+      <mkdir dir="${dist.dir}"/>
+      <jar destfile="${dist.dir}/${javacommonutilstests.jar.filename}" basedir="${classes.dir}"/>
+      <copy file="${junit.jar.dir}/${junit.jar.filename}"
+            tofile="${dist.dir}/${junit.jar.filename}"/>
+      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
+            tofile="${dist.dir}/${junit.omj.jar.filename}"/>
+  </target>
+
+  <target name="run" depends="deploy.ut">
+      <echo>Running BufferedReaderTests</echo>
+      <exec executable="${java.bin.root}/bin/javaunittester">
+          <arg line="-conf=cldc -mainclass=com.nokia.mj.impl.rt.midp.UtilTests"/>
+      </exec>
+
+  </target>
+
+  <target name="main" depends="clean,run"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/midp/runtime/tsrc/rttests/build/rt.bat	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,18 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@rem
+rem Script for running JavaMidpRuntime unit tests from S60 eshell
+javaunittester -conf=cldc -mainclass=com.nokia.mj.impl.rt.midp.UtilTests
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/midp/runtime/tsrc/rttests/javasrc/com/nokia/mj/impl/rt/midp/UtilTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* 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.rt.midp;
+
+import java.util.Hashtable;
+
+import com.nokia.mj.impl.installer.utils.InstallerMain;
+
+import j2meunit.framework.Test;
+import j2meunit.framework.TestCase;
+import j2meunit.framework.TestMethod;
+import j2meunit.framework.TestSuite;
+
+/**
+ * SystemProperty unit tests.
+ */
+public class UtilTests extends TestCase implements InstallerMain
+{
+
+    // Begin j2meunit test framework setup
+    public void installerMain(String[] args)
+    {
+        TestSuite suite = new TestSuite(this.getClass().getName());
+
+        suite.addTest(new UtilTests("testSplit", new TestMethod()
+        {
+            public void run(TestCase tc)
+            {
+                ((UtilTests)tc).testSplit();
+            }
+        }));
+
+        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
+
+    }
+
+    public UtilTests()
+    {
+    }
+
+    public UtilTests(String aTestName, TestMethod aTestMethod)
+    {
+        super(aTestName, aTestMethod);
+    }
+
+    // End j2meunit test framework setup
+
+    protected void setUp()
+    {
+    }
+
+    protected void tearDown()
+    {
+    }
+
+    // Test cases
+
+    private void testSplit()
+    {
+        try
+        {
+            Hashtable ht = MidletLifeCycle.split(null, null);
+            assertTrue("Fail1 "+ ht, ht != null && ht.isEmpty());
+
+            ht = MidletLifeCycle.split(null, "");
+            assertTrue("Fail2 "+ ht, ht != null && ht.isEmpty());
+
+            ht = MidletLifeCycle.split("test", null);
+            assertTrue("Fail3 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("test")). equals(""));
+
+            ht = MidletLifeCycle.split("test", "");
+            assertTrue("Fail4 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("test")). equals(""));
+
+            ht = MidletLifeCycle.split("   ", ",");
+            assertTrue("Fail5 "+ ht, ht != null && ht.isEmpty());
+
+            ht = MidletLifeCycle.split("Test", ",");
+            assertTrue("Fail6 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("Test")). equals(""));
+
+            ht = MidletLifeCycle.split(" Test ", ",");
+            assertTrue("Fail7 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("Test")). equals(""));
+
+            ht = MidletLifeCycle.split("Test,", ",");
+            assertTrue("Fail8 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("Test")). equals(""));
+
+            ht = MidletLifeCycle.split("   Test,   ", ",");
+            assertTrue("Fail9 "+ ht, ht != null && ht.size() == 1 && ((String)ht.get("Test")). equals(""));
+
+            ht = MidletLifeCycle.split("   Test1;  test2 ;  test3;  ", ";");
+            assertTrue("Fail10 "+ ht, ht != null && ht.size() == 3 && ((String)ht.get("Test1")). equals("") &&
+                                                                      ((String)ht.get("test2")). equals("") && 
+                                                                      ((String)ht.get("test3")). equals(""));
+
+            ht = MidletLifeCycle.split("   Test1,  test2 ;  test3  ", ";");
+            assertTrue("Fail11 "+ ht, ht != null && ht.size() == 2 && ((String)ht.get("Test1,  test2")). equals("") &&
+                                                                      ((String)ht.get("test3")). equals(""));
+
+
+        }
+        catch (Throwable t)
+        {
+            t.printStackTrace();
+            assertTrue(t.toString(), false);
+        }
+    }
+}
--- a/javaruntimes/midp/runtimestarter/build/javamidpstarter_0x2002DCC0.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/midp/runtimestarter/build/javamidpstarter_0x2002DCC0.mmp	Tue May 25 12:34:19 2010 +0300
@@ -78,6 +78,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -98,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -590,37 +590,31 @@
 
 std::wstring MidpRuntimeStarter::encodeArgs(const std::wstring& str)
 {
-    // Modify the places where the following characters are used to prevent
+    // Encode each 16 bit (or 8 bit) character to 4 (or 2) safe characters to prevent
     // possible security problems when this string is passed as an command line
     // system property parameter to JVM
-    const std::wstring specials(L"= -%");
-
-    std::string::size_type idx = str.find_first_of(specials);
-    std::string::size_type cur = 0;
+    std::wstring res;
+    int len = str.length();
 
-    std::wstring res;
-    std::string convBuf;
-
-    while (idx != std::string::npos)
+    for (int pos = 0; pos < len; ++pos)
     {
-        // Add all characters up to and including the current special char to
-        // final result string
-        if (idx >= cur)
+        wchar_t c = str[pos];
+        if (c & 0xFF00)
         {
-            res.append(str.substr(cur, (idx - cur) + 1));
+            // 16 bit char, must send all bits
+            res += ( L'A' + (c >> 12) );
+            res += ( L'A' + ((c & 0x0F00) >> 8) );
+            res += ( L'A' + ((c & 0x00F0) >> 4) );
+            res += ( L'A' + ((c & 0x000F)) );
         }
-
-        // Encode all special characters 'X' in same way.
-        // "X" -> "X%"
-        res.append(L"%");
-
-        cur = idx + 1;
-        idx = str.find_first_of(specials, cur);
+        else
+        {
+            // 8 bit char, send only lowest 8 bits
+            res += ( L'a' + ((c & 0x00F0) >> 4) );
+            res += ( L'a' + ((c & 0x000F)) );
+        }
     }
 
-    // Add characters after last special character if any
-    res.append(str.substr(cur, str.length() - cur));
-
     return res;
 }
 
--- a/javaruntimes/standalone/tsrc/data/javastandalone_reg.rss	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/standalone/tsrc/data/javastandalone_reg.rss	Tue May 25 12:34:19 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  javainstaller_reg.rss
+* Description: javastandalone_reg
 *
 */
 
--- a/javaruntimes/standalone/tsrc/sis/javastandalone.pkg	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/standalone/tsrc/sis/javastandalone.pkg	Tue May 25 12:34:19 2010 +0300
@@ -31,5 +31,7 @@
 ;to be installed on Series 60 v5.0 platforms
 [0x1028315F], 0, 0, 0, {"Series60ProductID"}
 
-"\epoc32\release\armv5\urel\javastandalone.exe"-"c:\sys\bin\javastandalone.exe"
+"\epoc32\release\armv5\urel\javatest.exe"-"c:\sys\bin\javatest.exe"
 "\epoc32\data\z\private\10003a3f\apps\javastandalone_reg.rsc"-"c:\private\10003a3f\import\apps\javastandalone_reg.rsc"
+
+;"jvmargs.txt"-"c:\java\jvmargs.txt"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/standalone/tsrc/sis/jvmargs.txt	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,4 @@
+-profile=standalonemidlet
+-conf=cldc
+-jar
+c:\java\midlet.jar
--- a/javaruntimes/standalone/tsrc/src/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/standalone/tsrc/src/main.cpp	Tue May 25 12:34:19 2010 +0300
@@ -11,21 +11,36 @@
 *
 * Contributors:
 *
-* Description:  This main entry point of Java processes.
+* Description:
 *
 */
 
 #include <string>
 #include <javastarter.h>
-
+#include "logger.h"
 
-int main(int argc, const char *argv[])
+int main()
 {
-#ifdef __WINS__
-    const char* const fileName = "c:\\java\\JvmArgs.txt";
-#else
-    const char* const fileName = "f:\\java\\JvmArgs.txt";
-#endif
-    int res = java::start(fileName);
+    const char* const fileName = "c:\\java\\jvmargs.txt";
+
+    int res = 0;
+    struct stat buf;
+
+    if (stat(fileName, &buf) == 0)
+    {
+        PLOG(EJavaRuntime, "javatest: using arguments from file");
+        res = java::start(fileName);
+    }
+    else
+    {
+        PLOG(EJavaRuntime, "javatest: using default arguments");
+        const char* argv[] = { "-profile=standalonemidlet",
+                               "-conf=cldc",
+                               "-jar",
+                               "c:\\java\\midlet.jar" };
+        int argc = sizeof(argv) / sizeof(argv[0]);
+        res = java::start(argc, argv);
+    }
+
     return res;
 }
--- a/javaruntimes/starter/build/java_0x102033E6.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/starter/build/java_0x102033E6.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		LocalServices NetworkServices ProtServ WriteDeviceData ReadDeviceData ReadUserData WriteUserData UserEnvironment SwEvent Location MultiMediaDD NetworkControl TrustedUI 
@@ -98,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/starter/build/javamidp_installer.pkg	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/starter/build/javamidp_installer.pkg	Tue May 25 12:34:19 2010 +0300
@@ -1,4 +1,4 @@
-; javamidp_installer.pkg generated by qmake at 2010-04-28T12:41:16
+; javamidp_installer.pkg generated by qmake at 2010-05-10T13:53:31
 ; This file is generated by qmake and should not be modified by the user
 ;
 
--- a/javaruntimes/starter/build/javamidp_template.pkg	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/starter/build/javamidp_template.pkg	Tue May 25 12:34:19 2010 +0300
@@ -1,4 +1,4 @@
-; javamidp_template.pkg generated by qmake at 2010-04-28T12:41:16
+; javamidp_template.pkg generated by qmake at 2010-05-10T13:53:31
 ; This file is generated by qmake and should not be modified by the user
 ;
 
--- a/javaruntimes/starterutils/build/javaruntimestarterutils_0x2002DCCC.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javaruntimes/starterutils/build/javaruntimestarterutils_0x2002DCCC.mmp	Tue May 25 12:34:19 2010 +0300
@@ -85,6 +85,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -105,10 +118,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javaruntimes/starterutils/src.linux/bootclasspath.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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:  This class provides container for message.
-*
-*/
-
-#include "logger.h"
-#include "bootclasspath.h"
-
-void java::runtime::getExtendedBootClassPath(std::wstring& bootClassPath)
-{
-    JELOG2(EJavaRuntime);
-    // IMLP missing...
-}
--- a/javaruntimes/starterutils/src.linux/jvmstarterjni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,447 +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:  This class is meant for starting the Linux JVM.
-*
-*/
-
-#include <string>
-#include <algorithm>
-
-#include "jvmstarterjni.h"
-
-#include "jvmargsmodifier.h"
-
-#include "runtimeexception.h"
-#include "logger.h"
-#include "javaoslayer.h"
-#include "dynamiclibloader.h"
-#include "javacommonutils.h"
-
-using namespace java::runtime;
-using namespace java::util;
-
-extern const wchar_t CLASS_PATH_SEPARATOR = L':';
-extern const char PATH_SEPARATOR_FROM  = '\\';
-extern const char PATH_SEPARATOR_TO    = '/';
-
-JvmStarter*
-JvmStarter::getJvmStarterInstance(const Configuration configuration,
-                                  const std::wstring& indetifier)
-{
-    JELOG2(EJavaRuntime);
-    return  new JvmStarterJni(configuration, indetifier);
-}
-
-JvmStarter*
-JvmStarter::getJvmStarterInstance()
-{
-    JELOG2(EJavaRuntime);
-    return new JvmStarterJni();
-}
-
-JvmStarterJni::JvmStarterJni()
-{
-    JELOG2(EJavaRuntime);
-}
-
-JvmStarterJni::JvmStarterJni(const Configuration configuration,
-                             const std::wstring& indetifier)
-{
-    JELOG2(EJavaRuntime);
-    mConfiguration = configuration;
-    mIdentifier = indetifier;
-
-    // In Linux the binary root varies depending on the user.
-    std::string rootStr;
-    JavaOsLayer::getResRoot(rootStr, false);
-    rootStr += "jsr/classes/common/";
-    mExtensionPath.assign(rootStr.begin(), rootStr.end());
-}
-
-
-JvmStarterJni::~JvmStarterJni()
-{
-    JELOG2(EJavaRuntime);
-}
-
-void JvmStarterJni::overrideOldHeapSize(int /*heapSize*/)
-{
-    // Not supported by the JVM
-    JELOG2(EJavaRuntime);
-}
-
-void JvmStarterJni::overrideNewHeapSize(int /*heapSize*/)
-{
-    // Not supported by the JVM
-    JELOG2(EJavaRuntime);
-}
-
-void JvmStarterJni::overrideNativeStackSize(int /*stackSize*/)
-{
-    // Not supported by the JVM
-    JELOG2(EJavaRuntime);
-}
-
-void JvmStarterJni::overrideJavaStackSize(int stackSize)
-{
-    JELOG2(EJavaRuntime);
-    std::wstring stackSizeStr = L"-Xss";
-    stackSizeStr += JavaCommonUtils::intToWstring(stackSize);
-    stackSizeStr += L"K";
-    mJvmArgs.push_back(stackSizeStr);
-}
-
-int JvmStarterJni::startJvm()
-{
-    JELOG2(EJavaRuntime);
-
-    // Set mJvmArgs container to contain all the JVM args and set mAppAndArgs
-    // to contain the main class and the arguments.
-    completeArgumentContainers();
-
-    // Give arguments to modifyJvmArguments for modification. Args
-    // are modified if the default empty implementation has been overridden
-    // by eclipsing the modifyJvmArguments dll.
-    modifyJvmArguments(mIdentifier, mJvmArgs, mAppAndArgs);
-
-    // Allocate space for the raw JVM args.
-    int rawJvmArgumentCount = mJvmArgs.size();
-    ScopedCharPointerArray rawJvmArgs(rawJvmArgumentCount);
-
-    // Adding the JVM args. Main class and applcation arguments are handled
-    // later.
-    int ind = 0;
-    for (JvmArgs_t::iterator jvmArgsIter = mJvmArgs.begin();
-            jvmArgsIter!= mJvmArgs.end();
-            ++jvmArgsIter)
-    {
-        // Do character conversion while adding the arguments.
-        rawJvmArgs.get()[ind++] = JavaCommonUtils::wstringToUtf8(*jvmArgsIter);
-    }
-    return startJvmInSeparateThread(rawJvmArgumentCount, rawJvmArgs.get());
-}
-
-int JvmStarterJni::startJvm(int argc, char** argv)
-{
-    JELOG2(EJavaRuntime);
-    // Allocate space for the raw JVM args. This will contain only
-    // JVM arguments. Main class and application arguments are handled
-    // differently.
-    ScopedCharPointerArray rawJvmArgs(argc);
-
-    // Assuming that in the beginning of the list there are JVM arguments and
-    // they start with '-'.
-    bool handlingArguments = true;
-
-    int argCount = 0;
-    for (int i = 0; i < argc; i++)
-    {
-        if (argv[i][0] != '-') // codescanner::accessArrayElementWithoutCheck2
-        {
-            // First non JVM argument was found.
-            handlingArguments = false;
-        }
-        if (handlingArguments)
-        {
-            if ((strcmp(argv[i], "-cp") == 0 || // codescanner::accessArrayElementWithoutCheck2
-                    strcmp(argv[i], "-classpath") == 0) && // codescanner::accessArrayElementWithoutCheck2
-                    (i + 1) < argc)
-            {
-                // There is class path available.
-                std::string cp("-Djava.class.path=");
-                cp += argv[i+1];
-                i++;
-                rawJvmArgs.get()[argCount] = strdup(cp.c_str());
-            }
-            else
-            {
-                // Normal JVM argument.
-                rawJvmArgs.get()[argCount] = strdup(argv[i]); // codescanner::accessArrayElementWithoutCheck2
-            }
-            argCount++;
-        }
-        else
-        {
-            // The first non JVM argument can be considered as main class.
-            // The rest of the arguments are arguments for the Java app.
-            mAppAndArgs.push_back(JavaCommonUtils::utf8ToWstring(argv[i])); // codescanner::accessArrayElementWithoutCheck2
-        }
-    }
-    return startJvmInSeparateThread(argCount, rawJvmArgs.get());
-}
-
-
-void* JvmStarterJni::javaThreadMain(void* arg)
-{
-    JELOG2(EJavaRuntime);
-    int result = -1;
-    JvmStarterJni* jniStarter = (reinterpret_cast<JvmStarterJni*>(arg));
-    try
-    {
-        result = jniStarter->startJvmImpl();
-    }
-    catch (RuntimeException& e)
-    {
-        ELOG1(EJavaRuntime, "JvmStarterJni::javaThreadMain() RuntimeException "
-              "catched in VM thread. %s", e.toString().c_str());
-    }
-    catch (java::util::ExceptionBase& e)
-    {
-        ELOG1(EJavaRuntime, "JvmStarterJni::javaThreadMain() ExceptionBase "
-              "catched in VM thread. %s", e.toString().c_str());
-    }
-    catch (std::exception& e)
-    {
-        ELOG1(EJavaRuntime, "JvmStarterJni::javaThreadMain() std::Exception "
-              "catched in VM thread. %s", e.what());
-    }
-    return reinterpret_cast<void*>(result);
-}
-
-int JvmStarterJni::startJvmInSeparateThread(int argc, char** argv)
-{
-    JELOG2(EJavaRuntime);
-
-    // Store the argc and argv into member variables in order be avaliable
-    // for the JVM starter thread.
-    mArgCount = argc;
-    mArgs = argv;
-    // return startJvmImpl(); This could be used to start the JVM into same
-    // thread.
-    pthread_t threadId;
-    void*     result;
-
-    // Create the JVM thread.
-    pthread_create(&threadId, 0, javaThreadMain, this);
-
-    // Wait until the thread has died.
-    pthread_join(threadId, &result);
-    return reinterpret_cast<int>(result);
-}
-
-
-int JvmStarterJni::startJvmImpl()
-{
-    JELOG2(EJavaRuntime);
-
-    JavaVM* jvm;            // Denotes a Java VM.
-    JNIEnv* env;            // Pointer to native method interface.
-    JavaVMInitArgs vmArgs;  // VM initialization arguments.
-    JavaVMOption vmOption;
-    vmOption.extraInfo = 0;
-
-    LOG(EJavaRuntime, EInfo, "VM args:");
-    JvmOptionArgs_t jvmOptions;
-    for (int i = 0; i < mArgCount; i++)
-    {
-        vmOption.optionString = mArgs[i];
-        jvmOptions.push_back(vmOption);
-        LOG1(EJavaRuntime, EInfo, " %s",mArgs[i]); // codescanner::accessArrayElementWithoutCheck2
-    }
-    vmArgs.version = JNI_VERSION_1_4;
-
-    // Initializing JavaVMInitArgs.
-    // Contiguity for std::vector<T> is mandated by the standard as long
-    // as T is not bool. [See 23.2.4./1].
-    vmArgs.options = &((jvmOptions)[0]); // codescanner::accessArrayElementWithoutCheck2
-    vmArgs.nOptions = jvmOptions.size();
-    vmArgs.ignoreUnrecognized = JNI_FALSE;
-
-    JavaOsLayer::startUpTrace("Starting VM()", -1, -1);
-
-    // Creating the JVM.
-    int res = JNI_CreateJavaVM(&jvm, reinterpret_cast<void**>(&env), &vmArgs);
-    LOG1(EJavaRuntime, EInfo, "JNI_CreateJavaVM() returned. st = %d", res);
-    if (res == 0)
-    {
-        // Converting the '.' to '/' in the main class
-        // (com.nokia.Foo -> com/nokia/Foo)
-        std::wstring& appMain = mAppAndArgs.front();
-        std::replace(appMain.begin(), appMain.end(), '.', '/');
-
-        // Convert the main class to UTF-8.
-        ScopedCharPointer main(JavaCommonUtils::wstringToUtf8(appMain));
-
-        // Find the main class.
-        jclass mainClass = env->FindClass(main.get());
-        LOG2(EJavaRuntime, EInfo, " mainClass (%s): %p", main.get(), mainClass);
-        if (mainClass != 0)
-        {
-            // Find method static void main(String[] args) from the main class.
-            jmethodID mainMethod = env->GetStaticMethodID(mainClass, "main",
-                                   "([Ljava/lang/String;)V");
-            LOG1(EJavaRuntime, EInfo, " mainMethod: %p", mainMethod);
-            if (mainMethod != 0)
-            {
-                // Call the method static void main().
-                env->CallStaticVoidMethod(mainClass, mainMethod,
-                                          getApplicationArguments(env));
-                LOG(EJavaRuntime, EInfo, " CallStaticVoidMethod returned");
-            }
-            else
-            {
-                std::string errorStr("Not able to find main() method.");
-                throw RuntimeException(errorStr,
-                                       __FILE__, __FUNCTION__, __LINE__);
-            }
-        }
-        else
-        {
-            std::string errorStr("Main class was not found.");
-            throw RuntimeException(errorStr, __FILE__, __FUNCTION__, __LINE__);
-        }
-        jvm->DestroyJavaVM();
-    }
-    else
-    {
-        std::string errorStr("JNI_CreateJavaVM failed. Reason = .");
-        errorStr += JavaCommonUtils::intToString(res);
-        throw RuntimeException(errorStr, __FILE__, __FUNCTION__, __LINE__);
-    }
-    return res;
-}
-
-
-void JvmStarterJni::completeArgumentContainers()
-{
-    JELOG2(EJavaRuntime);
-
-    // Set the used porting layer.
-    mJvmArgs.push_back(L"-Dcom.nokia.jvm.port=sun.JvmPortJ2se");
-
-    // Disable JIT, if requested.
-    if (mJitDisabled)
-    {
-        mJvmArgs.push_back(L"-Xint");
-    }
-
-    // Add the classpath.
-    if (mClassPath.length() > 0)
-    {
-        mClassPath.insert(0, L"-Djava.class.path=");
-        mJvmArgs.push_front(mClassPath);
-        LOG1(EJavaRuntime, EInfo, " mClassPath = %S", mClassPath.c_str());
-    }
-
-    // Add the extension classpath.
-    if (mExtensionPath.length() > 0)
-    {
-        mExtensionPath.insert(0, L"-Djava.ext.dirs=");
-        mJvmArgs.push_front(mExtensionPath);
-        LOG1(EJavaRuntime, EInfo, " mExtensionPath = %S",
-             mExtensionPath.c_str());
-    }
-
-    // Add the prepending boot classpath if set.
-    if (mBootClassPathPrepend.length() > 0)
-    {
-        std::wstring bcpp(L"-Xbootclasspath/p:");
-        bcpp += mBootClassPathPrepend;
-        mJvmArgs.push_front(bcpp);
-        LOG1(EJavaRuntime, EInfo, " bcpp = %S", bcpp.c_str());
-    }
-
-    // Add the appending boot classpath if set.
-    if (mBootClassPathAppend.length() > 0)
-    {
-        std::wstring bcpa(L"-Xbootclasspath/a:");
-        bcpa += mBootClassPathAppend;
-        mJvmArgs.push_front(bcpa);
-        LOG1(EJavaRuntime, EInfo, " bcpa = %S", bcpa.c_str());
-    }
-
-    std::wstring javaBinRoot;
-    std::string binRoot;
-    JavaOsLayer::getBinRoot(binRoot, false);
-    javaBinRoot.assign(binRoot.begin(), binRoot.end());
-
-    // Setting the java.library.path.
-    std::wstring jlp(L"-Djava.library.path=");
-    jlp += javaBinRoot;
-    jlp +=  L"lib";
-    mJvmArgs.push_front(jlp);
-    LOG1(EJavaRuntime, EInfo, " jlp = %S", jlp.c_str());
-
-    // Setting the java.home.
-    std::wstring jh = L"-Djava.home=";
-    const char* javaHome = getenv("JAVA_VM_HOME");
-    if (javaHome == 0)
-    {
-        throw RuntimeException("JAVA_VM_HOME not defined",
-                               __FILE__, __FUNCTION__, __LINE__);
-    }
-    std::string jhs(javaHome);
-    jh.append(jhs.begin(), jhs.end());
-    mJvmArgs.push_front(jh);
-    LOG1(EJavaRuntime, EInfo, " jh = %S", jh.c_str());
-
-    // Define emma.properties to point to emma.properties file
-    // which is used when Java code coverage is measured.
-    std::wstring emma(L"-Demma.properties=");
-    emma += javaBinRoot;
-    emma +=  L"emma.properties";
-    mJvmArgs.push_front(emma);
-    LOG1(EJavaRuntime, EInfo, " emma = %S", emma.c_str());
-
-    // Add the main class.
-    mAppAndArgs.push_front(mMainClass);
-    LOG1(EJavaRuntime, EInfo, " mMainClass = %S", mMainClass.c_str());
-}
-
-jobjectArray JvmStarterJni::getApplicationArguments(JNIEnv* env)
-{
-    JELOG2(EJavaRuntime);
-    // When using JNI_CreateJavaVM to start the JVM the arguments for the
-    // Java application must be handled so that a jobjectArray is created
-    // to contain Java Strings created using jni APIs.
-
-    if (env == 0)
-    {
-        throw RuntimeException("JNIEnv was null",
-                               __FILE__, __FUNCTION__, __LINE__);
-    }
-
-    // Create the jobjectArray. mAppAndArgs container contains the main
-    // class which must be taken into account.
-    jobjectArray array =
-        (jobjectArray)env->NewObjectArray(mAppAndArgs.size() - 1,
-                                          env->FindClass("java/lang/String"),
-                                          env->NewStringUTF(""));
-    LOG(EJavaRuntime, EInfo, "  Application arguments:");
-    if (array != 0)
-    {
-        JvmArgs_t::iterator appAndArgsIter = mAppAndArgs.begin();
-        // Skip the main class.
-        ++appAndArgsIter;
-
-        int i = 0;
-
-        // Fill the object array with application arguments.
-        for (; appAndArgsIter!= mAppAndArgs.end(); ++appAndArgsIter)
-        {
-            ScopedCharPointer appArg(JavaCommonUtils::wstringToUtf8(*appAndArgsIter));
-            LOG1(EJavaRuntime, EInfo, "   %s", appArg.get());
-            env->SetObjectArrayElement(array, i++,
-                                       env->NewStringUTF(appArg.get()));
-        }
-    }
-    else
-    {
-        throw RuntimeException("jobjectArray was null",
-                               __FILE__, __FUNCTION__, __LINE__);
-    }
-    return array;
-}
-
-
--- a/javaruntimes/starterutils/src.linux/jvmstarterjni.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +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:  This class is meant for starting the J9 JVM.
-*
-*/
-
-
-#ifndef JVMSTARTERJNI_H
-#define JVMSTARTERJNI_H
-
-#include <vector>
-#include <jni.h>
-
-#include "jvmstarterimpl.h"
-
-typedef std::vector<JavaVMOption> JvmOptionArgs_t;
-
-namespace java // codescanner::namespace
-{
-namespace runtime // codescanner::namespace
-{
-
-/**
- * Provides a utilities for starting the Sun JVM in Linux.
- */
-class JvmStarterJni : public JvmStarterImpl
-{
-public:
-    /**
-     * Default constructor of the JvmStarterJni.
-     */
-    JvmStarterJni();
-
-    /**
-     * Constructor of the JvmStarterJni with arguments. For the argument
-     * description @see jvmstarte.h#getJvmStarterInstance method with
-     * same arguments
-     */
-    JvmStarterJni(const Configuration configuration,
-                  const std::wstring& indetifier);
-
-    /**
-     * Destructor of the JvmStarterJni.
-     */
-    virtual ~JvmStarterJni();
-
-    /**
-     * @see jvmstarter.h
-     */
-    virtual int startJvm();
-    /**
-     * @see jvmstarter.h
-     */
-    virtual int startJvm(int argc, char** argv);
-
-    /**
-     * @see jvmstarter.h
-     */
-    virtual void overrideOldHeapSize(int heapSize);
-
-    /**
-     * @see jvmstarter.h
-     */
-    virtual void overrideNewHeapSize(int heapSize);
-
-    /**
-     * @see jvmstarter.h
-     */
-    virtual void overrideNativeStackSize(int stackSize);
-
-    /**
-     * @see jvmstarter.h
-     */
-    virtual void overrideJavaStackSize(int stackSize);
-
-private:
-    /**
-     * Sets the default arguments optimized for the MIDP runtime
-     */
-    void setDefaultArguments();
-
-    /**
-     * Adds the classpaths, main class, JIT configurations and thread
-     * configurations to be part of the internal lists mJvmArgs and
-     * mAppAndArgs.
-     */
-    void completeArgumentContainers();
-
-    /**
-     * Creates a jobjectArray containing application arguments as
-     * Java Strings.
-     * @param env A pointer to valid JNIEnv.
-     * @return jobjectArray containing application arguments as
-     *         Java Strings.
-     */
-    jobjectArray getApplicationArguments(JNIEnv* env);
-
-    /**
-     * Starts finally the JVM. This method assumes that all the JVM
-     * arguments are passed as arguments, but the the list must not
-     * contain the main class nor the arguments for the Java application.
-     * The method assumes that these can be found from member variable
-     * mAppAndArgs. This method assumes that arguments for the JVM will
-     * be set to memeber variables mArgCount and mArgs. The method should
-     * not be run in the primordial thread.
-     * @return status, 0 in success case.
-     */
-    int startJvmImpl();
-
-    /**
-     * Creates a new thread for starting the JVM.
-     * @argc Number of JVM arguments.
-     * @argv JVM arguments in UTF-8 format.
-     * @return status, 0 in success case.
-     */
-    int startJvmInSeparateThread(int argc, char** argv);
-
-
-
-    /**
-     * Sun's JVM requires that the JVM is started in non-primordial thread
-     * (http://blogs.sun.com/ksrini/entry/hotspot_primordial_thread_jni_stack).
-     * This is an entry point of the new thread where the JVM is started.
-     * @param arg A pointer instance of this class.
-     * @return status of the call.
-     */
-    static void* javaThreadMain(void* arg);
-
-private:
-
-    /** Number of JVM arguments. */
-    int          mArgCount;
-
-    /** JVM arguments in UTF-8 format. Not owned. */
-    char**       mArgs;
-};
-} // end namespace runtime
-} // end namespace java
-
-#endif // JVMSTARTERJNI_H
-
--- a/javaruntimes/starterutils/src.linux/osthreadsupervisor.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:  This class is for thread death monitoring.
-*
-*/
-
-#include "osthreadsupervisor.h"
-
-#include "runtimeexception.h"
-
-#include "logger.h"
-#include "javacommonutils.h"
-
-using namespace java::runtime;
-using namespace java::util;
-
-
-OsThreadSupervisor::OsThreadSupervisor(bool /*tryThreadDumping*/)
-{
-    JELOG2(EJavaRuntime);
-}
-
-OsThreadSupervisor::~OsThreadSupervisor()
-{
-    JELOG2(EJavaRuntime);
-}
--- a/javaruntimes/starterutils/src.linux/osthreadsupervisor.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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:  Utility class for mointoring thread death.
-*
-*/
-
-
-#ifndef OSTHREADSUPERVISOR_H
-#define OSTHREADSUPERVISOR_H
-
-
-namespace java // codescanner::namespace
-{
-
-namespace runtime // codescanner::namespace
-{
-
-/**
- * This class is responsible for detecting abnormal thread death beloning to
- * own process. If the abnormal death happens this will terminate the whole
- * process. This is for Linux and the actual monitoring implementation is
- * missing.
- */
-class OsThreadSupervisor
-{
-public:
-
-    /**
-     * Constructor of the OsThreadSupervisor.
-     * @param tryThreadDumping Whether to try to do thread dump in panic case.
-     *                         Might cause another panic.
-     * @throws std::exception on error cases.
-     */
-    OsThreadSupervisor(bool tryThreadDumping);
-
-    /**
-     * Destructor of the RuntimeStarterUtils. Will stop the thread monitoring.
-     * The class is not meant to be inherited, so destructor can be non
-     * virtual.
-     */
-    ~OsThreadSupervisor();
-
-private: // Methods.
-
-    /**
-     * No default constructor.
-     */
-    OsThreadSupervisor();
-
-    /*
-     * No copy constructor allowed.
-     */
-    OsThreadSupervisor(const OsThreadSupervisor&);
-
-    /*
-     * No Assignment operator allowed.
-     */
-    OsThreadSupervisor& operator= (const OsThreadSupervisor&);
-};
-
-} // end namespace runtime
-} // end namespace java
-
-
-#endif // OSTHREADSUPERVISOR_H
--- a/javatools/certificatesconfigurator/build/javacertificatesconfigurator.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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=javacertificatesconfigurator
-CONFIG += omj no_icon  stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.UID2          = 0x20004c45
-    TARGET.UID3          = 0x20022D64
-    TARGET.CAPABILITY    = AllFiles
-    
-    
-    LIBS += -lefsrv -lxmlframework -lbafl -llibcrypto
-    }
-
-include(../../../build/omj.pri)
--- a/javatools/certificatesconfigurator/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +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:
-*
-*/
-#include "trustrootpolicy.h"
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/bio.h>
-#include "javasymbianoslayer.h"
-
-_LIT(KLegacyCertsPath,           "z:\\private\\10203636\\security\\trustroots\\device\\certificates\\");
-_LIT(KOmjCertsPath,              "c:\\private\\200211dc\\security\\trustroots\\device\\certificates\\");
-_LIT8(KOmjCertsPath8,              "c:\\private\\200211dc\\security\\trustroots\\device\\certificates\\");
-_LIT(KOmjCertsTmpPath,              "c:\\private\\200211dc\\security\\trustroots\\device\\certificates\\tmp\\");
-_LIT8(KOmjCertsTmpPath8,              "c:\\private\\200211dc\\security\\trustroots\\device\\certificates\\tmp\\");
-_LIT(KLegacyTrustRootPolicyPath, "z:\\private\\10203636\\security\\midp2_trp.xml");
-_LIT(KLegacyCertsStatesPath,    "c:\\private\\10203636\\security\\trustroots\\device\\state\\");
-_LIT(KOmjCertsStatesPath,       "c:\\private\\200211dc\\security\\trustroots\\device\\state\\");
-
-static bool CertsCopyNeeded()
-{
-    _LIT(KSystemAmsSid, "10203636");
-    return (KOmjCertsPath().Find(KSystemAmsSid) == -1);
-}
-
-static void MoveFileL(const TDesC& oldPath, const TDesC& newPath, RFs& fsSession)
-{
-    CFileMan* fileMan = CFileMan::NewL(fsSession);
-    CleanupStack::PushL(fileMan);
-    fileMan->Move(oldPath, newPath);
-    CleanupStack::PopAndDestroy();
-}
-
-static void RemoveDirL(const TDesC& dirName, RFs& fsSession)
-{
-    CFileMan* fileMan = CFileMan::NewL(fsSession);
-    CleanupStack::PushL(fileMan);
-    fileMan->RmDir(dirName);
-    CleanupStack::PopAndDestroy();
-}
-
-static string GetDomainName(string domainId)
-{
-    string domainName = "";
-    if (domainId == "*MFD*"
-            || domainId == "*MFDU*")
-    {
-        domainName = "Manufacturer";
-    }
-    else if (domainId == "*OPD*"
-             || domainId == "*OPDU*"
-             || domainId == "*ODOPDU*"
-             || domainId == "*ODOPD*")
-    {
-        domainName = "Operator";
-    }
-    else if (domainId == "*TTPD*")
-    {
-        domainName = "IdentifiedThirdParty";
-    }
-    return domainName;
-}
-
-static string GetDomainCategory(string domainId)
-{
-    string domainCategory = "";
-    if (domainId == "*MFD*"
-            || domainId == "*MFDU*")
-    {
-        domainCategory = "MFD";
-    }
-    else if (domainId == "*OPD*"
-             || domainId == "*ODOPD*"
-             || domainId == "*OPDU*"
-             || domainId == "*ODOPDU*")
-    {
-        domainCategory = "OPD";
-    }
-    else if (domainId == "*TTPD*")
-    {
-        domainCategory = "ITPD";
-    }
-    return domainCategory;
-}
-
-static string GetHash(string trustRootPath)
-{
-    /* The length of the MD5 digest (32 digit hexadecimal number) */
-    const int MD5_DIGEST_LEN = 8;
-    char trustRootHash[MD5_DIGEST_LEN + 1];
-    trustRootHash[0] = '\0';
-
-    FILE* trustRootDataFile = fopen(trustRootPath.c_str(), "r");
-    if (trustRootDataFile != NULL)
-    {
-        if (fseek(trustRootDataFile, 0L, SEEK_END) == 0)
-        {
-            long  trustRootDataLen = ftell(trustRootDataFile);
-            if (trustRootDataLen > 0)
-            {
-                if (fseek(trustRootDataFile, 0L, SEEK_SET) == 0)
-                {
-                    char* trustRootData = new char[trustRootDataLen];
-                    if (trustRootData != NULL)
-                    {
-                        fread(trustRootData, sizeof(char), trustRootDataLen, trustRootDataFile);
-                        if (!ferror(trustRootDataFile))
-                        {
-                            BIO*  bio = BIO_new_mem_buf((void *) trustRootData, trustRootDataLen);
-                            if ((bio))
-                            {
-                                BIO_set_close(bio, BIO_CLOSE);
-                                X509* trustRootCert = d2i_X509_bio(bio,NULL);
-                                if (trustRootCert != NULL)
-                                {
-                                    sprintf(trustRootHash,"%08lX",X509_issuer_name_hash(trustRootCert));
-                                    trustRootHash[MD5_DIGEST_LEN] = '\0';
-                                    delete trustRootCert;
-                                    trustRootCert = NULL;
-                                }
-                            }
-                            BIO_free(bio);
-                        }
-                        delete[] trustRootData;
-                    }
-                }
-            }
-        }
-        fclose(trustRootDataFile);
-    }
-    return string(trustRootHash);
-}
-
-static void CopyFilesL(const TDesC& aSource, const TDesC& aDest, RFs& fsSession)
-{
-    // Create file management object
-    CFileMan* fileMan = CFileMan::NewL(fsSession);
-    CleanupStack::PushL(fileMan);
-
-    // Do copy (here synchronously)
-    fileMan->Copy(aSource, aDest, CFileMan::EOverWrite|CFileMan::ERecurse);
-    // clear the read-only attribute
-    _LIT(KWildCards,"*");
-    HBufC* newDir = HBufC::NewLC(aDest.Length() + 1);
-    TPtr ptr = newDir->Des();
-    ptr.Copy(aDest);
-    ptr.Append(KWildCards);
-    fileMan->Attribs(ptr,KEntryAttNormal, KEntryAttReadOnly, TTime(0),CFileMan::ERecurse);
-    CleanupStack::PopAndDestroy(newDir);
-
-    // Clean up
-    CleanupStack::PopAndDestroy();
-}
-
-static void HandleTrustRootsL(const std::vector<TrustRoot>& aConfiguredTrustRoots, RFs& fsSession)
-{
-    string path((const char *)KOmjCertsPath8().Ptr(), KOmjCertsPath8().Length());
-    string tmpPath;
-    if (!CertsCopyNeeded())
-    {
-        tmpPath = path;
-    }
-    else
-    {
-        tmpPath = string((const char *)KOmjCertsTmpPath8().Ptr(), KOmjCertsTmpPath8().Length());
-    }
-    for (int i=0; i<aConfiguredTrustRoots.size(); i++)
-    {
-        TrustRoot trustRoot = aConfiguredTrustRoots[i];
-
-        // check if the corresponding certificate exists
-        string tmpBaseName = tmpPath + trustRoot.iName;
-        string trustRootName = tmpBaseName + ".cer";
-        string rootName = trustRoot.iName + ".cer";
-        FILE* trustRootFile = fopen(trustRootName.c_str(), "r");
-        if (trustRootFile == NULL)
-        {
-            trustRootName.clear();
-            trustRootName = tmpBaseName + ".der";
-            trustRootFile = fopen(trustRootName.c_str(), "r");
-        }
-        if (trustRootFile != NULL)
-        {
-            fclose(trustRootFile);
-            string domainName = GetDomainName(trustRoot.iDomain);
-            if (domainName == "")
-            {
-                continue;
-            }
-            string domainCategory = GetDomainCategory(trustRoot.iDomain);
-            if (domainCategory == "")
-            {
-                continue;
-            }
-            string hash = GetHash(trustRootName);
-            if (hash == "")
-            {
-                continue;
-            }
-            // generate the metadata
-            string baseName = path + trustRoot.iName;
-            FILE * metadataFile = fopen((baseName + ".metadata").c_str(), "w+");
-            if (metadataFile != NULL)
-            {
-                // copy the cert from tmp
-                if (CertsCopyNeeded())
-                {
-                    HBufC* tmp = stringToDes(trustRootName.c_str());
-                    CleanupStack::PushL(tmp);
-                    TPtr ptr = tmp->Des();
-                    MoveFileL(ptr, KOmjCertsPath, fsSession);
-                    CleanupStack::PopAndDestroy(tmp);
-                }
-
-                // generate the metadatafile
-                fprintf(metadataFile, "name=%s\n", domainName.c_str());
-                fprintf(metadataFile, "category=%s\n", domainCategory.c_str());
-                fprintf(metadataFile, "removable=%d\n", (trustRoot.iCanDelete == true));
-                fprintf(metadataFile, "disablable=%d\n", (trustRoot.iCanDisable == true));
-                fprintf(metadataFile, "hash=%s\n", hash.c_str());
-                fclose(metadataFile);
-            }
-        }
-    }
-}
-
-
-static void ConvertTrustRootPolicyL(RFs& fsSession)
-{
-    // read the trust root info
-    CTrustRootPolicy* trustRootPolicy = CTrustRootPolicy::NewL();
-    CleanupStack::PushL(trustRootPolicy);
-    std::vector<TrustRoot> trustRoots;
-    trustRootPolicy->ReadFromFileL(KLegacyTrustRootPolicyPath, trustRoots);
-    CleanupStack::PopAndDestroy(trustRootPolicy);
-
-    // generate trust roots metadata
-    HandleTrustRootsL(trustRoots, fsSession);
-}
-
-static void CleanupL(RFs& fsSession)
-{
-    if (!CertsCopyNeeded())
-    {
-        return;
-    }
-    // delete the tmp directory (together with the leftovers = certificates without metadata)
-    RemoveDirL(KOmjCertsTmpPath, fsSession);
-}
-
-static void CopyCertsL(RFs& fsSession)
-{
-    if (!CertsCopyNeeded())
-    {
-        return;
-    }
-
-    // copy all the files from KLegacyCertsPath to KOmjCertsPath
-    CopyFilesL(KLegacyCertsPath, KOmjCertsTmpPath, fsSession);
-    // copy all the files from KLegacyCertsStatesPath to KOmjCertsStatesPath
-    CopyFilesL(KLegacyCertsStatesPath, KOmjCertsStatesPath, fsSession);
-}
-
-static void DoL()
-{
-    // open file server session
-    RFs fsSession;
-    User::LeaveIfError(fsSession.Connect());
-
-    // copy the certs and state infos from legacy to omj
-    CopyCertsL(fsSession);
-
-    // convert the trust root policy from KLegacyTrustRootPolicyPath to KOmjCertsPath
-    ConvertTrustRootPolicyL(fsSession);
-
-    // cleanup
-    CleanupL(fsSession);
-
-    // close file server session
-    fsSession.Close();
-}
-
-TInt E32Main()
-{
-    //__UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-    TRAPD(error, DoL());
-    delete cleanupStack;
-    //__UHEAP_MARKEND;
-    return error;
-}
--- a/javatools/certificatesconfigurator/src.s60/trustrootpolicy.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +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:
-*
-*/
-#include "trustrootpolicy.h"
-
-_LIT8(KXmlMimeType, "text/xml");
-
-// tag names
-_LIT8(KTrustRoot, "trustroot");
-_LIT8(KName, "name");
-_LIT8(KDomain, "domain");
-_LIT8(KMcc, "mcc");
-_LIT8(KMnc, "mnc");
-_LIT8(KDisable, "disable");
-_LIT8(KDelete, "delete");
-
-CTrustRootPolicy* CTrustRootPolicy::NewL()
-{
-    CTrustRootPolicy* self = new(ELeave) CTrustRootPolicy();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CTrustRootPolicy::~CTrustRootPolicy()
-{
-    iRfs.Close();
-    if (iParser)
-    {
-        delete iParser;
-        iParser = NULL;
-    }
-}
-
-CTrustRootPolicy::CTrustRootPolicy()
-{
-}
-
-void CTrustRootPolicy::ConstructL()
-{
-    User::LeaveIfError(iRfs.Connect());
-    iParser = CParser::NewL(KXmlMimeType, *this);
-}
-
-void CTrustRootPolicy::ReadFromFileL(const TDesC& aPolicyFileName, vector<TrustRoot>& aTrustRoots)
-{
-
-    RFile file;
-    TInt size;
-    User::LeaveIfError(file.Open(iRfs, aPolicyFileName, EFileRead));
-    User::LeaveIfError(file.Size(size));
-
-    HBufC8* buffer = HBufC8::NewLC(size);
-    TPtr8 bufferPtr(buffer->Des());
-    User::LeaveIfError(file.Read(bufferPtr));
-
-    iTrustRoots = &aTrustRoots;
-    iParser->ParseBeginL();
-    iParser->ParseL(*buffer);
-    iParser->ParseEndL();
-
-    CleanupStack::PopAndDestroy(); // buffer
-}
-
-void CTrustRootPolicy::OnStartDocumentL(const RDocumentParameters& /*aDocParam*/, TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnEndDocumentL(TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnStartElementL(const RTagInfo& aElement, const RAttributeArray& /*aAttributes*/, TInt /*aErrorCode*/)
-{
-    iCurrentContent.clear();
-    const TDesC8& tagName = aElement.LocalName().DesC();
-    if (tagName.Compare(KTrustRoot) == 0)
-    {
-        iTrustRoot = TrustRoot();
-    }
-}
-
-void CTrustRootPolicy::OnEndElementL(const RTagInfo& aElement, TInt /*aErrorCode*/)
-{
-    const TDesC8& tagName = aElement.LocalName().DesC();
-    if (tagName.Compare(KTrustRoot) == 0)
-    {
-        iTrustRoots->push_back(iTrustRoot);
-    }
-    else if (tagName.Compare(KName) == 0)
-    {
-        iTrustRoot.iName = iCurrentContent;
-    }
-    else if (tagName.Compare(KDomain) == 0)
-    {
-        iTrustRoot.iDomain = iCurrentContent;
-    }
-    else if (tagName.Compare(KMcc) == 0)
-    {
-        iTrustRoot.iMcc = iCurrentContent;
-    }
-    else if (tagName.Compare(KMnc) == 0)
-    {
-        iTrustRoot.iMnc = iCurrentContent;
-    }
-    else if (tagName.Compare(KDisable) == 0)
-    {
-        iTrustRoot.iCanDisable = true;
-    }
-    else if (tagName.Compare(KDelete) == 0)
-    {
-        iTrustRoot.iCanDelete = true;
-    }
-}
-
-void CTrustRootPolicy::OnContentL(const TDesC8& aBytes, TInt /*aErrorCode*/)
-{
-    // append aBytes to iCurrentContent
-    iCurrentContent.append((const char*)aBytes.Ptr(), aBytes.Length());
-}
-
-void CTrustRootPolicy::OnStartPrefixMappingL(const RString& /*aPrefix*/, const RString& /*aUri*/, TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnEndPrefixMappingL(const RString& /*aPrefix*/, TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnIgnorableWhiteSpaceL(const TDesC8& /*aBytes*/,TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnSkippedEntityL(const RString& /*aName*/,TInt /*aErrorCode*/)
-{
-}
-void CTrustRootPolicy::OnProcessingInstructionL(const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt /*aErrorCode*/)
-{
-}
-
-void CTrustRootPolicy::OnError(TInt /*aErrorCode*/)
-{
-}
-
-TAny* CTrustRootPolicy::GetExtendedInterface(const TInt32 /*aUid*/)
-{
-    return 0;
-}
-
-TrustRoot::TrustRoot()
-{
-    iName = "";
-    iDomain = "";
-    iMcc = "";
-    iMnc = "";
-    iCanDelete = false;
-    iCanDisable = false;
-}
--- a/javatools/certificatesconfigurator/src.s60/trustrootpolicy.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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:
-*
-*/
-#include <e32base.h>
-#include <xml/contenthandler.h> // for MContentHandler
-#include <xml/parser.h> // for CParser
-#include <f32file.h>
-#include <string>
-#include <vector>
-
-using namespace Xml;
-using namespace std;
-
-class TrustRoot
-{
-public:
-    TrustRoot();
-
-public:
-
-    std::string iName;
-    std::string iDomain;
-    std::string iMcc;
-    std::string iMnc;
-    bool iCanDelete;
-    bool iCanDisable;
-};
-
-class CTrustRootPolicy: public CBase, MContentHandler
-{
-
-public:
-
-    static CTrustRootPolicy* NewL();
-
-    virtual ~CTrustRootPolicy();
-
-public:
-
-    void ReadFromFileL(const TDesC& aFileName, vector<TrustRoot>& aTrustRoots);
-
-private:
-
-    CTrustRootPolicy();
-
-    void ConstructL();
-
-private: // from MContentHandler
-
-    void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode);
-
-    void OnEndDocumentL(TInt aErrorCode);
-
-    void OnStartElementL(const RTagInfo &aElement, const RAttributeArray &aAttributes,
-                         TInt aErrorCode);
-
-    void OnEndElementL(const RTagInfo &aElement, TInt aErrorCode);
-
-    void OnContentL(const TDesC8 &aBytes, TInt aErrorCode);
-
-    void OnStartPrefixMappingL(const RString &aPrefix, const RString &aUri,
-                               TInt aErrorCode);
-
-    void OnEndPrefixMappingL(const RString &aPrefix, TInt aErrorCode);
-
-    void OnIgnorableWhiteSpaceL(const TDesC8 &aBytes, TInt aErrorCode);
-
-    void OnSkippedEntityL(const RString &aName, TInt aErrorCode);
-
-    void OnProcessingInstructionL(const TDesC8 &aTarget, const TDesC8 &aData,
-                                  TInt aErrorCode);
-
-    void OnError(TInt aErrorCode);
-
-    TAny *GetExtendedInterface(const TInt32 aUid);
-
-private:
-
-    CParser*             iParser;
-    RFs                  iRfs;
-    vector<TrustRoot>*  iTrustRoots;
-    string               iCurrentContent;
-    TrustRoot           iTrustRoot;
-};
--- a/javatools/certificatesconfigurator/tsrc/Makefile	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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: 
-#
-
-include $(JAVA_SRC_ROOT)/build/Makefile.defs
-
-NONQTSUBSYSTEMS = \
-	build
-
-ALL_TARGETS = $(NONQTSUBSYSTEMS)
-
-include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
-
--- a/javatools/certificatesconfigurator/tsrc/build/antcleanupcertificatesconfiguratortests.mk	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-build_java : 
-	rem do_nothing
-
-FREEZE : 
-	rem do_nothing
-
-LIB : 
-	rem do_nothing
-
-MAKMAKE : 
-	rem do_nothing
-
-RESOURCE : 
-	rem do_nothing
-
-BLD : build_java
-
-SAVESPACE : 
-	rem do_nothing
-
-FINAL :
-	rem do_nothing
-
-CLEAN : 
-	ant clean
-
-RELEASABLES : 
-	rem do_nothing
--- a/javatools/certificatesconfigurator/tsrc/build/antpreparecertificatesconfiguratortests.mk	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "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: 
-#
-
-prepare : 
-	call ant
-
-FREEZE : 
-	rem do_nothing
-
-LIB : 
-	rem do_nothing
-
-MAKMAKE : prepare
-
-RESOURCE : 
-	rem do_nothing
-
-BLD : 
-	rem do_nothing
-
-SAVESPACE : 
-	rem do_nothing
-
-FINAL :
-	rem do_nothing
-
-CLEAN : 
-	rem do_nothing
-
-RELEASABLES : 
-	rem do_nothing
--- a/javatools/certificatesconfigurator/tsrc/build/bld.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-gnumakefile antpreparecertificatesconfiguratortests.mk
-certificatesconfiguratorunittests.mmp
-gnumakefile antcleanupcertificatesconfiguratortests.mk
--- a/javatools/certificatesconfigurator/tsrc/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="javaunitcertstoreplugintests" default="backup" basedir=".">
-
-  <import file="../../../../build/utilities.xml"/>
-
-  <property name="test.base.dir" location="${env.JAVA_SRC_ROOT}/javatools/certificatesconfigurator/tsrc/tmp"/>
-  <property name="test.legacy.base.dir" location="${test.base.dir}/legacy"/>
-  <property name="test.omj.base.dir" location="${test.base.dir}/omj"/>
-  <property name="test.legacy.certs.dir" location="${test.legacy.base.dir}/certs"/>
-  <property name="test.legacy.certs.states.dir" location="${test.legacy.base.dir}/states"/>
-  <property name="test.omj.certs.primary.dir" location="${test.omj.base.dir}/primarycerts"/>
-  <property name="test.omj.certs.secondary.dir" location="${test.omj.base.dir}/secondarycerts"/>
-  <property name="test.omj.certs.states.dir" location="${test.omj.base.dir}/states"/>
-  <property name="test.trustrootpolicy.dir" location="${test.base.dir}/trustrootpolicy"/>
-  <property name="legacy.certs.dir" location="/epoc32/release/winscw/udeb/Z/private/10203636/security/trustroots/device/certificates"/>
-  <property name="legacy.certs.states.dir" location="/epoc32/winscw/C/private/10203636/security/trustroots/device/state"/>
-  <property name="omj.certs.primary.dir" location="/epoc32/release/winscw/udeb/Z/private/200211dc/security/trustroots/device/certificates"/>
-  <property name="omj.certs.secondary.dir" location="/epoc32/winscw/C/private/200211dc/security/trustroots/device/certificates"/>
-  <property name="omj.certs.states.dir" location="/epoc32/winscw/C/private/200211dc/security/trustroots/device/state"/>
-  <property name="legacy.trustrootpolicy.file" location="/epoc32/release/winscw/udeb/Z/private/10203636/security/midp2_trp.xml"/>
-
-  <target name="init" depends="init.properties">
-      <available file="${test.base.dir}" type="dir" property="test.base.dir.exists"/>
-  </target>
-
-  <target name="backup" depends="init" unless="test.base.dir.exists">
-      <mkdir dir="${test.legacy.certs.dir}"/>
-      <mkdir dir="${test.legacy.certs.states.dir}"/>
-      <mkdir dir="${test.omj.certs.primary.dir}"/>
-      <mkdir dir="${test.omj.certs.secondary.dir}"/>
-      <mkdir dir="${test.omj.certs.states.dir}"/>
-      <mkdir dir="${test.trustrootpolicy.dir}"/>
-      <copy todir="${test.legacy.certs.dir}" failonerror="false">
-          <fileset dir="${legacy.certs.dir}"/>
-      </copy>
-      <copy todir="${test.legacy.certs.states.dir}" failonerror="false">
-          <fileset dir="${legacy.certs.states.dir}"/>
-      </copy>
-      <copy todir="${test.omj.certs.primary.dir}" failonerror="false">
-          <fileset dir="${omj.certs.primary.dir}"/>
-      </copy>
-      <copy todir="${test.omj.certs.secondary.dir}" failonerror="false">
-          <fileset dir="${omj.certs.secondary.dir}"/>
-      </copy>
-      <copy todir="${test.omj.certs.states.dir}" failonerror="false">
-          <fileset dir="${omj.certs.states.dir}"/>
-      </copy>
-      <move file="${legacy.trustrootpolicy.file}" todir="${test.trustrootpolicy.dir}"/>      
-      <delete>
-          <fileset dir="${legacy.certs.dir}"/>
-      </delete>
-      <delete>
-          <fileset dir="${legacy.certs.states.dir}"/>
-      </delete>
-      <delete>
-          <fileset dir="${omj.certs.primary.dir}"/>
-      </delete>
-      <delete>
-          <fileset dir="${omj.certs.secondary.dir}"/>
-      </delete>
-      <delete>
-          <fileset dir="${omj.certs.states.dir}"/>
-      </delete>
-      <copy file="../data/midp2_trp.xml" tofile="${legacy.trustrootpolicy.file}"/>      
-      <unzip src="../data/roots.zip" dest="${legacy.certs.dir}"/>
-      <unzip src="../data/states.zip" dest="${legacy.certs.states.dir}"/>
-  </target>
-
-  <target name="clean" depends="init.properties">
-      <delete dir="${legacy.certs.dir}"/>
-      <delete dir="${legacy.certs.states.dir}"/>
-      <delete dir="${omj.certs.primary.dir}"/>
-      <delete dir="${omj.certs.secondary.dir}"/>
-      <delete dir="${omj.certs.states.dir}"/>
-      <copy todir="${legacy.certs.dir}" failonerror="false">
-          <fileset dir="${test.legacy.certs.dir}"/>
-      </copy>
-      <copy todir="${legacy.certs.states.dir}" failonerror="false">
-          <fileset dir="${test.legacy.certs.states.dir}"/>
-      </copy>
-      <copy todir="${omj.certs.primary.dir}" failonerror="false">
-          <fileset dir="${test.omj.certs.primary.dir}"/>
-      </copy>
-      <copy todir="${omj.certs.secondary.dir}" failonerror="false">
-          <fileset dir="${test.omj.certs.secondary.dir}"/>
-      </copy>
-      <copy todir="${omj.certs.states.dir}" failonerror="false">
-          <fileset dir="${test.omj.certs.states.dir}"/>
-      </copy>
-      <copy file="${test.trustrootpolicy.dir}/midp2_trp.xml" tofile="${legacy.trustrootpolicy.file}" overwrite="true" failonerror="false"/>      
-      <delete dir="${test.base.dir}"/>
-  </target>
-
-</project>
-
--- a/javatools/certificatesconfigurator/tsrc/build/certificatesconfiguratorunittests.mmp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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: 
-*
-*/
-#include <platform_paths.hrh>
-#include <../../../../inc/java_stdcpp_support_for_exe.hrh>
-
-TARGET		  CertificatesConfiguratorTests.exe
-TARGETTYPE	  exe
-UID			 0x00000000 0x03A6305A
-CAPABILITY AllFiles
-
-PAGED
-
-APP_LAYER_SYSTEMINCLUDE
-
-USERINCLUDE ../src
-USERINCLUDE ../../../../inc // == (JAVA_SRC_ROOT)/inc
-USERINCLUDE ../../../../tools/cpputest/include/cpputest // == (JAVA_SRC_ROOT)/tools/cpputest/include/cpputest
-USERINCLUDE ../../../../tools/cpputest/include/platforms/symbian // == (JAVA_SRC_ROOT)/tools/cpputest/include/platforms/symbian
-
-STATICLIBRARY cpputest.lib
-LIBRARY javacomms.lib
-
-SOURCEPATH ../src
-SOURCE certificatesconfiguratorunittests.cpp
-SOURCE testcertificatesconfigurator.cpp
-
--- a/javatools/certificatesconfigurator/tsrc/build/runTests.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
-javacertificatesconfigurator
-CertificatesConfiguratorTests
\ No newline at end of file
--- a/javatools/certificatesconfigurator/tsrc/data/midp2_trp.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-<fragment>
-
-	<trustroot>
-		<validity>
-			<sim>
-				<mcc>310</mcc>
-				<mnc>15</mnc>
-			</sim>
-		</validity>
-		<certificate>
-			<device>
-				<name>innexistent_cert</name>
-				<access>
-					<delete/>
-					<disable/>
-				</access>
-			</device>
-		</certificate>
-		<binding>
-			<volatile/>
-			<domain>*MFD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>invalid_cert</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*MFD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>invalid_domain</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>invalid_domain</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>manufacturer_cert1</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*MFD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>manufacturer_cert2</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*MFDU*</domain>
-		</binding>
-	</trustroot>
-	
-	<trustroot>
-		<certificate>
-			<device>
-				<name>operator_cert1</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*OPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>operator_cert2</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*ODOPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>operator_cert3</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*OPDU*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>operator_cert4</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*ODOPDU*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>trustedthirdparty_cert</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*TTPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>not_delete_not_disable_cert</name>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*TTPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>not_disable_cert</name>
-				<access>
-					<delete/>
-				</access>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*TTPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>not_delete_cert</name>
-				<access>
-					<disable/>
-				</access>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*TTPD*</domain>
-		</binding>
-	</trustroot>
-
-	<trustroot>
-		<certificate>
-			<device>
-				<name>delete_and_disable_cert</name>
-				<access>
-					<delete/>
-					<disable/>
-				</access>
-			</device>
-		</certificate>
-		<binding>
-			<domain>*TTPD*</domain>
-		</binding>
-	</trustroot>
-
-</fragment>
Binary file javatools/certificatesconfigurator/tsrc/data/roots.zip has changed
Binary file javatools/certificatesconfigurator/tsrc/data/states.zip has changed
--- a/javatools/certificatesconfigurator/tsrc/src/certificatesconfiguratorunittests.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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:
-*
-*/
-
-#include "Platform.h"
-#include "CommandLineTestRunner.h"
-
-int main(int ac, char** av)
-{
-    return CommandLineTestRunner::RunAllTests(ac, av);
-}
-
-#include "certificatesconfiguratorunittests.h"
-
--- a/javatools/certificatesconfigurator/tsrc/src/certificatesconfiguratorunittests.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +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:
-*
-*/
-
-#include "Utest.h"
-
-//Include this in the test main to execute these tests
-IMPORT_TEST_GROUP(TestCertificatesConfigurator);
--- a/javatools/certificatesconfigurator/tsrc/src/testcertificatesconfigurator.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,366 +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:
-*
-*/
-
-#include <stdio.h>
-#include <string>
-#include <e32std.h>
-
-#include "TestHarness.h"
-#include "comms.h"
-#include "commsmessage.h"
-#include "commsclientendpoint.h"
-#include "commsendpoint.h"
-#include "securitycommsmessagedefs.h"
-
-using namespace java::comms;
-using namespace std;
-
-TEST_GROUP(TestCertificatesConfigurator)
-{
-    CommsClientEndpoint cli_conn;
-
-    TEST_SETUP()
-    {
-        cli_conn.connect(IPC_ADDRESS_JAVA_CAPTAIN_C);
-    }
-
-    TEST_TEARDOWN()
-    {
-        cli_conn.disconnect();
-    }
-};
-
-TEST(TestCertificatesConfigurator, TestCertificatesConfiguratorL)
-{
-    CommsMessage s_msg;
-    CommsMessage r_msg;
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "DB6368D9";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    std::string prot_domain_name;
-    std::string prot_domain_category;
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "Manufacturer" && prot_domain_category == "MFD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "DB6368D9";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    long long cert_content_len;
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    std::string cert_content;
-    std::string hash;
-    int state;
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0 /* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "3BACF549";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "Manufacturer" && prot_domain_category == "MFD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "3BACF549";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "C200DD68";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "IdentifiedThirdParty" && prot_domain_category == "ITPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "C200DD68";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "1A9F76AE";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "Operator" && prot_domain_category == "OPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "1A9F76AE";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "160ED1E9";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_DISABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "OperatorExtra" && prot_domain_category == "OPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "160ED1E9";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_DISABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 1/* not disablable and not deletable but disabled */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "50957A0B";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_DELETED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "Operator" && prot_domain_category == "OPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "50957A0B";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_DELETED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "19812ECB";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "Operator" && prot_domain_category == "OPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "19812ECB";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "6F70725D";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "IdentifiedThirdParty" && prot_domain_category == "ITPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "6F70725D";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 2 /* only disablable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "C9058545";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "IdentifiedThirdParty" && prot_domain_category == "ITPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "C9058545";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 0/* not disablable and not deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "0EE64645";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "IdentifiedThirdParty" && prot_domain_category == "ITPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "0EE64645";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 4 /* only deletable */);
-    s_msg.reset();
-    r_msg.reset();
-
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "1775ABBE";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_PROTECTION_DOMAIN;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> prot_domain_name;
-    r_msg >> prot_domain_category;
-    CHECK(prot_domain_name == "IdentifiedThirdParty" && prot_domain_category == "ITPD");
-    s_msg.reset();
-    r_msg.reset();
-    s_msg.setModuleId(PLUGIN_ID_JAVA_CERT_STORE_EXTENSION_C);
-    s_msg.setMessageId(JAVA_CERT_STORE_MSG_ID_REQUEST);
-    s_msg << JAVA_CERT_STORE_OPERATION_QUERY_CERTS;
-    s_msg << JAVA_CERT_STORE_FILTER_ID_HASH << "1775ABBE";
-    s_msg << JAVA_CERT_STORE_FILTER_ID_STATE << JAVA_CERT_STORE_STATE_ENABLED;
-    s_msg << JAVA_CERT_STORE_QUERY_ID_FULL_DETAILS;
-    CHECK(cli_conn.sendReceive(s_msg,r_msg,10) == 0);
-    r_msg >> cert_content_len;
-    CHECK(cert_content_len != 0);
-    r_msg >> cert_content;
-    r_msg >> hash;
-    r_msg >> state;
-    CHECK(state == 6 /* deletable and disablable */);
-    s_msg.reset();
-    r_msg.reset();
-}
-
--- a/javatools/javaappbackconverter/build/javaappbackconverter.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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=javaappbackconverter
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.EPOCHEAPSIZE  = 0x4000 0x500000
-    TARGET.UID3          = 0x20022D90
-    TARGET.CAPABILITY    = WriteDeviceData PowerMgmt
-
-    INCLUDEPATH += ../../javaapppreconverter/src.s60
-    
-    SOURCES += ../src.s60/*.cpp  ../../javaapppreconverter/src.s60/midletlist.cpp
-    
-    LIBS += -lefsrv \
-            -lapgrfx \
-            -lestor \
-            -lflogger \
-            -laknnotify \
-            -lcentralrepository 
-}
-
-
-include(../../../build/omj.pri)
--- a/javatools/javaappbackconverter/src.s60/backconverter.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,570 +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: Java platform 2.0 javaappbackconverter process.
-*              Reregisters the old S60 MIDlets back to AppArc
-*
-*/
-
-
-#include <e32base.h>
-#include <apgicnfl.h>
-#include <s32mem.h>
-#include <e32property.h>
-
-#include "javacommonutils.h"
-#include "javauids.h"
-#include "backconverter.h"
-#include "noarmlogs.h"
-
-
-const TInt KDelayWhenWaitingAppArc = 500000;
-
-// This is in the private data cage of javaappbackconverter
-_LIT(KMidletImportDirectory, "C:\\private\\20022D90\\data\\");
-
-// Symbian file path separator
-_LIT(KPathSeperator, "\\");
-
-// Postfix for the fake application name generated only to make AppArc happy
-_LIT(KAppPostfix, ".fakeapp");
-
-// The application type Uid for MIDlets in S60
-const TUid KUidMidletApplicationType = { 0x10210E26 };
-
-/**
- * To create new instance of this class.
- *
- * @param aFs - A reference to the file server.
- * @return Reference to the object of this class.
- * @exception If construction fails.
- *
- */
-CBackConverter* CBackConverter::NewLC(RFs& aFs)
-{
-    CBackConverter* self = new(ELeave) CBackConverter(aFs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-/**
- * To do 1st phase construction for this object.
- *
- * Adds this active object to the scheduler.
- *
- * @param param aFs - A reference to the file server.
- * @return Reference to the object of this class.
- */
-CBackConverter::CBackConverter(RFs& aFs) :
-        CActive(EPriorityStandard), iFs(aFs)
-{
-    CActiveScheduler::Add(this);
-}
-
-/**
- * To do 2nd phase construction for this object.
- *
- * @exception If the method is not able to allocate necessary buffers.
- */
-void CBackConverter::ConstructL()
-{
-    JELOG2(EJavaConverters);
-
-    iMidlets = new(ELeave) CMidletList();
-    iState = EInitialize;
-}
-
-/**
- * Deletes this object.
- * All allocated resources are released.
- */
-CBackConverter::~CBackConverter()
-{
-    JELOG2(EJavaConverters);
-    Cancel();
-    if (iMidlets)
-    {
-        iMidlets->ResetAndDestroy();
-        delete iMidlets;
-        iMidlets = NULL;
-    }
-}
-
-/**
- * To start back conversion
- */
-void CBackConverter::Start()
-{
-    JELOG2(EJavaConverters);
-    iState = EInitialize;
-    CompleteRequest();
-}
-
-/**
- * To stop whole back conversion.
- * Stops the active scheduler.
- */
-void CBackConverter::Exit()
-{
-    Deque();
-    CActiveScheduler::Stop();
-}
-
-/**
- * To complete the request for this object.
- *
- * @Postconditions The following conditions are true immediately after
- * returning from this method.
- * - iStatus == KErrNone
- * - IsActive() == ETrue
- */
-void CBackConverter::CompleteRequest()
-{
-    JELOG2(EJavaConverters);
-
-    TRequestStatus *status = &iStatus;
-    User::RequestComplete(status, KErrNone);
-    if (!IsActive())
-    {
-        SetActive();
-    }
-}
-
-/**
- * To run this active object.
- *
- * The state logic is:
- *
- * EInitialize:
- *   - if midlet export data file does not exist, exit
- *
- * EReadConversionData:
- *   - read data from data file to iMidlets
- *
- * EReregisterMidlets:
- *   - register each midlet in iMidlets to AppArc
- *
- * EExit:
- *   - free resources and exit
- *
- */
-void CBackConverter::RunL()
-{
-    JELOG2(EJavaConverters);
-
-    switch (iState)
-    {
-
-    case EInitialize:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CBackConverter::RunL EInitialize");
-
-        TFileName dataFile(KMidletImportDirectory);
-        dataFile.Append(KMidletExportDataFileName);
-        TUint attributes;
-        TInt  err = iFs.Att(dataFile, attributes);
-        if (KErrNone != err)
-        {
-            WLOG1(EJavaConverters,
-                  "CBackConverter::RunL EInitialize "
-                  "Data file does not exist (%d). Cannot do back conversion.", err);
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "Data file name is %s", (wchar_t *)(dataFile.PtrZ()));
-            iState = EExit;
-        }
-        else
-        {
-            iState = EReadConversionData;
-        }
-        CompleteRequest();
-    }
-    break;
-
-    case EReadConversionData:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CBackConverter::RunL EReadConversionData");
-
-        // Read all midlet info from data file to iMidlets
-        TFileName importDirectory(KMidletImportDirectory);
-        iMidlets->ImportListL(iFs, importDirectory);
-
-        iState = EUnregisterOldMidletData;
-        CompleteRequest();
-    }
-    break;
-
-    case EUnregisterOldMidletData:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CBackConverter::RunL EUnregisterOldMidletData");
-
-        // If executing backconverter after user cancel,
-        // AppArc may contain Java 2.0 specific data
-        // for converted midlets. Remove it or reregistration
-        // will not update the data.
-        UnregisterOldMidletData();
-
-        iState = EReregisterMidlets;
-        CompleteRequest();
-    }
-    break;
-
-    case EReregisterMidlets:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CBackConverter::RunL EReregisterMidlets");
-
-        // Reregister old midlet info back to AppArc
-        RegisterMidletsL();
-
-        // If this line is executed, registering old midlets
-        // back to AppArc succeeded. So the data file can be
-        // removed.
-        RemoveDataFile();
-
-        iState = EExit;
-        CompleteRequest();
-    }
-    break;
-
-    case EExit:
-    {
-        LOG(EJavaConverters, EInfo, "CBackConverter::RunL EExit");
-
-        FullCleanup();
-
-        // The whole javaappbackconverter process is stopped.
-        Exit();
-    }
-    break;
-
-    }
-}
-
-/**
- * To handle leave from RunL.
- * This method exits this active object using normal state machine
- * After calling this method this active object will exit.
- *
- * @param aError - A reason of error.
- * @return KErrNone.
- */
-TInt CBackConverter::RunError(TInt aError)
-{
-    ELOG2(EJavaConverters,
-          "CBackConverter::RunError(%d) from state %d", aError, iState);
-
-    Cancel();
-
-    iState = EExit;
-    CompleteRequest();
-
-    return KErrNone;
-}
-
-/**
- * To do cancelling for this object.
- *
- */
-void CBackConverter::DoCancel()
-{
-    ELOG1(EJavaConverters,
-          "CBackConverter::DoCancel from state %d", iState);
-
-}
-
-/**
- * To cleanup member variables.
- */
-void CBackConverter::FullCleanup()
-{
-    JELOG2(EJavaPreinstaller);
-
-    if (iMidlets)
-    {
-        iMidlets->ResetAndDestroy();
-        delete iMidlets;
-        iMidlets = NULL;
-    }
-}
-
-/**
- * Register all midlets in iMidlets to AppArc.
- */
-void CBackConverter::RegisterMidletsL()
-{
-    RApaLsSession apaSession;
-
-    // open AppArc session
-    TInt err = apaSession.Connect();
-    if (KErrNone != err)
-    {
-        // Cannot connect to AppArc server
-        ELOG(EJavaConverters,
-             "CBackConverter::RegisterMidletsL: Cannot connect to AppArc server");
-        User::Leave(err);
-    }
-    CleanupClosePushL(apaSession);
-
-    // Delete any pending (un)registrations (possible if
-    // e.g. device rebooted before commit).
-    // This call does nothing if there is no pending registrations.
-    // Ignore errors.
-    (void)apaSession.RollbackNonNativeApplicationsUpdates();
-
-    // Prepare for Java application registrations / unregistrations
-    TRAP(err, apaSession.PrepareNonNativeApplicationsUpdatesL());
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CBackConverter::RegisterMidletsL: "
-              "PrepareNonNativeApplicationsUpdatesL leaved with err %d",
-              err);
-        User::Leave(err);
-    }
-
-    // register midlets one by one
-    CMidletInfo *midlet = iMidlets->GetFirst();
-    TBuf8<512>   midletDesc;
-
-    while (NULL != midlet)
-    {
-        midlet->ToString8(midletDesc);
-        WLOG(EJavaConverters,
-             "CBackConverter::RegisterMidletsL Going to reregister this midlet:");
-        midletDesc.ZeroTerminate();
-        WLOG(EJavaPreinstaller, (const char *)(midletDesc.Ptr()));
-        midletDesc.Zero();
-
-        RegisterOneMidletL(&apaSession, midlet);
-        midlet = iMidlets->GetNext();
-    }
-
-    // commit registrations
-    TRAP(err, apaSession.CommitNonNativeApplicationsUpdatesL());
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CBackConverter::RegisterMidletsL: "
-              "CommitNonNativeApplicationsUpdatesL leaved with err %d",
-              err);
-        User::Leave(err);
-    }
-
-    CleanupStack::PopAndDestroy(); // apaSession
-}
-
-/**
- * Register one midlet to AppArc
- *
- * @param aSession AppArc session
- * @param aMidlet  the midlet to be registered
- * @exception If registering application fails
- */
-void CBackConverter::RegisterOneMidletL(RApaLsSession *aSession, CMidletInfo *aMidlet)
-{
-    JELOG2(EJavaPreinstaller);
-
-    RFile appArcIcon;
-    TInt  numberOfIcons = 1;
-
-    // open the icon in the shared mode required by AppArc
-    TInt err = appArcIcon.Open(
-                   iFs,
-                   aMidlet->GetIconFileName(),
-                   (EFileShareReadersOrWriters | EFileWrite));
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CBackConverter::RegisterOneMidletL: Cannot open icon, err code is %d ",
-              err);
-        User::Leave(err);
-    }
-
-    // Now icon is open
-    CleanupClosePushL(appArcIcon);
-
-    // Generate the executable name name using the same
-    // algorithm as used earlier in S60 platform
-    // in case some external S60 application
-    // needs to parse the Uid from the executable name.
-    TFileName appName;
-    appName.Copy(KPathSeperator);
-    appName.AppendNum(aMidlet->GetMidletUid().iUid);
-    appName.Append(KAppPostfix);
-
-    // Create writer needed for actual registration
-    CApaRegistrationResourceFileWriter *writer = NULL;
-    writer =
-        CApaRegistrationResourceFileWriter::NewL(
-            aMidlet->GetMidletUid(),
-            appName,
-            TApaAppCapability::ENonNative);
-    CleanupStack::PushL(writer);
-
-    writer->SetGroupNameL(aMidlet->GetGroupName());
-
-    // Write MIDlet suite id and MIDlet id to opaque data  (needed by S60 MIDlet launcher)
-    TBuf8<8>         opaqueData;     // opaque data will contain two signed 32-bit int
-    RDesWriteStream  writeStream(opaqueData);
-    writeStream.WriteInt32L(aMidlet->GetSuiteId());
-    writeStream.WriteInt32L(aMidlet->GetMidletId());
-    writeStream.CommitL();
-    writer->SetOpaqueDataL(opaqueData);
-
-    CApaLocalisableResourceFileWriter*  lWriter = NULL;
-    lWriter =
-        CApaLocalisableResourceFileWriter::NewL(
-            KNullDesC,  // short caption
-            aMidlet->GetMidletName(),  // caption
-            numberOfIcons,
-            KNullDesC);
-    CleanupStack::PushL(lWriter);
-
-    TDriveUnit targetDrive(aMidlet->GetDrive());
-
-    // Register application to AppArc
-    aSession->RegisterNonNativeApplicationL(
-        KUidMidletApplicationType,
-        targetDrive,
-        *writer,
-        lWriter,
-        &appArcIcon);
-
-    CleanupStack::PopAndDestroy(lWriter);
-    CleanupStack::PopAndDestroy(writer);
-    // close icon file handle
-    CleanupStack::PopAndDestroy();  // appArcIcon
-}
-
-/**
- * Unregisters the applications to be back converted from AppArc
- * so that they can be registered again with the same Uid but with
- * new opaque data (needed for old S60 Java).
- * This function needs to called only if making back conversion after
- * the user has canceled the installation of Java 2.0.
- * If back conversion is done while uninstalling Java 2.0, all Java applications
- * have been uninstalled and there are no Uids to be unregistered.
- *
- * Leaves with error code if AppArc cannot be connected or if
- * unregistrations cannot be committed.
- */
-void CBackConverter::UnregisterOldMidletData()
-{
-    // connect to AppArc
-    RApaLsSession apaSession;
-
-    TInt err = apaSession.Connect();
-    if (KErrNone != err)
-    {
-        // Fatal error, try to connect again. The midlets cannot be back converted
-        // using the same uids as earlier if the unregistration cannot be done.
-        TInt retryCount = 0;
-        do
-        {
-            ELOG1(EJavaConverters,
-                  "CBackConverter::UnregisterCurrentJavaAppsL Cannot connect to "
-                  "AppArc server, err %d", err);
-
-            // wait
-            User::After(KDelayWhenWaitingAppArc);
-
-            err = apaSession.Connect();
-            if (KErrNone == err)
-            {
-                break;
-            }
-
-            retryCount++;
-        }
-        while (retryCount < 10);
-
-        if (KErrNone != err)
-        {
-            return;
-        }
-    }
-
-    // Delete any pending (un)registrations (possible if
-    // e.g. device rebooted before commit).
-    // This call does nothing if there is no pending registrations.
-    // Ignore errors.
-    (void)apaSession.RollbackNonNativeApplicationsUpdates();
-
-    // Prepare for Java application unregistrations
-    TRAP(err, apaSession.PrepareNonNativeApplicationsUpdatesL());
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CBackConverter::UnregisterCurrentJavaAppsL: "
-              "PrepareNonNativeApplicationsUpdatesL leaved with err %d",
-              err);
-        apaSession.Close();
-        return;
-    }
-
-    // Unregister all apps
-    CMidletInfo *midlet = iMidlets->GetFirst();
-
-    while (NULL != midlet)
-    {
-        TRAP(err, apaSession.DeregisterNonNativeApplicationL(midlet->GetMidletUid()));
-        if (KErrNone != err)
-        {
-            WLOG2(EJavaConverters,
-                  "CBackConverter::UnregisterCurrentJavaAppsL: "
-                  "DeregisterNonNativeApplicationL leaved with err %d for uid %d",
-                  err, midlet->GetMidletUid().iUid);
-            // Ignore error, this particular application cannot be back converted.
-        }
-
-        midlet = iMidlets->GetNext();
-    }
-
-    // Commit unregistrations
-    TRAP(err, apaSession.CommitNonNativeApplicationsUpdatesL())
-    {
-        if (KErrNone != err)
-        {
-            ELOG1(EJavaConverters,
-                  "CBackConverter::UnregisterCurrentJavaAppsL: "
-                  "CommitNonNativeApplicationsUpdatesL leaved with err %d",
-                  err);
-            apaSession.Close();
-            return;
-        }
-    }
-
-    apaSession.Close();
-    return;
-}
-
-/**
- * Remove data file that contains info about midlets to be back converted.
- */
-void CBackConverter::RemoveDataFile()
-{
-    TFileName dataFile(KMidletImportDirectory);
-    dataFile.Append(KMidletExportDataFileName);
-
-    TInt err = iFs.Delete(dataFile);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CBackConverter::RemoveDataFile: Cannot delete data file, err %d ",
-              err);
-    }
-}
--- a/javatools/javaappbackconverter/src.s60/backconverter.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +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:  Java platform 2.0 javaappbackconverter process
-*
-*/
-
-
-#ifndef BACKCONVERTER_H
-#define BACKCONVERTER_H
-
-#include <f32file.h>
-#include <e32base.h>
-#include <apgcli.h>
-
-#include "midletlist.h"
-
-/**
- * The main active object of javaappbackconverter that is executed once
- * if OMJ is uninstalled to reregister the old S60 MIDlets back to AppArc.
- *
- * This active object is activated from the process main() after the
- * active scheduler has been created.
- */
-class CBackConverter : public CActive
-{
-    enum TBackConversionState
-    {
-        EInitialize,
-        EReadConversionData,
-        EUnregisterOldMidletData,
-        EReregisterMidlets,
-        EExit
-    };
-
-public:
-    static CBackConverter* NewLC(RFs& aFs);
-
-    void CompleteRequest();
-    ~CBackConverter();
-    void Start();
-
-protected:
-    // From CActive
-    void RunL();
-    void DoCancel();
-    TInt RunError(TInt aError);
-
-private:
-    void Exit();
-    CBackConverter(RFs& aFs);
-    void ConstructL();
-    void FullCleanup();
-
-    void RegisterMidletsL();
-    void RegisterOneMidletL(RApaLsSession *aSession, CMidletInfo *aMidlet);
-    void UnregisterOldMidletData();
-    void RemoveDataFile();
-
-private:
-    RFs& iFs;
-    CMidletList *iMidlets;
-    TBackConversionState iState;
-
-};
-
-#endif // BACKCONVERTER_H
--- a/javatools/javaappbackconverter/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,406 +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: Java platform 2.0 javaappbackconverter process
-*
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <e32property.h>
-#include <f32file.h>
-#include <centralrepository.h>
-#include <swinstallerinternalpskeys.h>
-#include <AknGlobalMsgQuery.h>
-
-#include "javacommonutils.h"
-#include "javauids.h"
-#include "backconverter.h"
-#include "noarmlogs.h"
-
-_LIT_SECURE_ID(KAppInstUiSecureID, 0x101F875A);
-_LIT_SECURE_ID(KAppSisLauncherSecureID, 0x1020473F);
-
-
-/**
- * Create file server connection.
- * If no data storage file exists, exit.
- * Create active scheduler and start it to execute actual back converter.
- */
-static void ExecuteBackConverterL(RFs &aFs)
-{
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: ExecuteBackConverterL called");
-
-    CActiveScheduler* as = new(ELeave) CActiveScheduler();
-
-    // Install active scheduler
-    CActiveScheduler::Install(as);
-    CleanupStack::PushL(as);
-
-    // The file server session must be shared so that that AppArc can
-    // use the icon file handle opened in back converter
-    TInt err = aFs.ShareProtected();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: ExecuteBackConverterL: "
-              "Cannot share file server session, err code is %d ", err);
-        User::Leave(err);
-    }
-
-    // Setup and start the back conversion
-    CBackConverter* back = CBackConverter::NewLC(aFs);
-
-    LOG(EJavaConverters,
-        EInfo, "javaappbackconverter: ExecuteBackConverterL: Call CBackConverter::Start()");
-
-    back->Start();
-
-    // Start active scheduler
-    LOG(EJavaConverters, EInfo, "ExecuteBackConverterL: Starting CActiveScheduler");
-    CActiveScheduler::Start();
-
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: ExecuteBackConverterL: Cleaning up");
-
-    CleanupStack::PopAndDestroy(back);
-    CleanupStack::PopAndDestroy(as);
-}
-
-/**
- * Menu application has a central repository key that can be used in
- * devices belonging to Nokia 5800 XpressMusic device family to request
- * that the Menu application would rescan all applications it contains.
- */
-static void UseCRKeyToUpdateAppShellDataL()
-{
-    const TUid KCRUidMenu = { 0x101F8847 };
-    const TUint32 KMenuUpdateData = 0x00000001;
-
-    // Update Central Rep
-    CRepository *pCenRep = CRepository::NewL(KCRUidMenu);
-
-    TInt value = 1;
-    TInt err = pCenRep->Set(KMenuUpdateData, value);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: UseCRKeyToUpdateAppShellDataL: "
-              "setting cenrep value failed, error %d ",
-              err);
-    }
-
-    delete pCenRep;
-}
-
-/**
- * After OMJ has been uninstalled the menu application of the device
- * does not display the icons of the old, restored java applications.
- * The icons are shown after the device is booted.
- * Tell menu application to scan again all applications so that the icons
- * will be shown.
- */
-static void AddOldJavaAppIconsToMenuApp()
-{
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: AddOldJavaAppIconsToMenuApp called.");
-
-    TRAPD(err, UseCRKeyToUpdateAppShellDataL());
-    if (KErrNotFound == err)
-    {
-        // Only Nokia XPressMusic 5800 device family supports this feature,
-        // N97 and later devices no longer support it but they have new Menu
-        // application that shows all Java application icons anyway.
-        LOG(EJavaConverters, EInfo,
-            "javaappbackconverter: AddOldJavaAppIconsToMenuApp: This device does not "
-            "support refreshing Menu using CR keys.");
-    }
-    else if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: AddOldJavaAppIconsToMenuApp: Error: %d", err);
-    }
-}
-
-/**
- * Kill the running OMJ javaregistry.exe. After killing next call to
- * Registry API restarts the old S60 server process.
- */
-static void KillRegistry()
-{
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: KillRegistry called.");
-
-    TFullName processName;
-    _LIT(KJavaRegistryProcess, "javaregistry*");
-    TFindProcess finder(KJavaRegistryProcess);
-
-    if (finder.Next(processName) != KErrNotFound)
-    {
-        RProcess processToKill;
-        TInt err = processToKill.Open(finder);
-
-        if (KErrNone != err)
-        {
-            WLOG1(EJavaConverters, "javaappbackconverter: Process open: %d", err);
-        }
-        else
-        {
-            processToKill.Kill(KErrNone);
-            processToKill.Close();
-        }
-    }
-    else
-    {
-        WLOG(EJavaConverters, "javaappbackconverter: Registry process not found");
-    }
-}
-
-/**
- * Unregister OMJ MIDlet starter, reregister old S60 MIDlet starter
- */
-static void ReregisterOldMidletStarter()
-{
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: ReregisterOldMidletStarter called");
-
-    _LIT(KStubMIDP2RecogExe, "StubMIDP2RecogExe.exe");
-
-    RApaLsSession appLstSession;
-
-    TInt error = appLstSession.Connect();
-    if (error != KErrNone)
-    {
-        ELOG1(EJavaConverters, "javaappbackconverter: ReregisterOldMidletStarter: "
-              "RApaLsSession.Connect failed with error %d", error);
-        return;
-    }
-    TRAP(error, appLstSession.RegisterNonNativeApplicationTypeL(
-             TUid::Uid(KMidletApplicationTypeUid), KStubMIDP2RecogExe()));
-    if (error == KErrNone)
-    {
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: ReregisterOldMidletStarter: "
-            "Registered MIDlet application type for S60 Java.");
-    }
-    else if (error != KErrAlreadyExists)
-    {
-        ELOG1(EJavaConverters, "javaappbackconverter: ReregisterOldMidletStarter: "
-              "RegisterNonNativeApplicationTypeL failed with error %d", error);
-    }
-    else
-    {
-        // OMJ Java has registered MIDlet application type so that it is handled by
-        // OMJ binary 'javalauncher.exe', must change that registration
-        WLOG(EJavaConverters, "javaappbackconverter: ReregisterOldMidletStarter: "
-             "MIDlet application type was registered (by OMJ Java).");
-        // Ignore possible error in deregistration
-        TRAP(error, appLstSession.DeregisterNonNativeApplicationTypeL(
-                 TUid::Uid(KMidletApplicationTypeUid)));
-        TRAP(error, appLstSession.RegisterNonNativeApplicationTypeL(
-                 TUid::Uid(KMidletApplicationTypeUid), KStubMIDP2RecogExe()));
-        if (KErrNone != error)
-        {
-            ELOG1(EJavaConverters, "javaappbackconverter: ReregisterOldMidletStarter: "
-                  "RegisterNonNativeApplicationTypeL failed with error %d", error);
-        }
-        else
-        {
-            LOG(EJavaConverters, EInfo, "javaappbackconverter: ReregisterOldMidletStarter: "
-                "Registered MIDlet application type again (for S60 Java).");
-        }
-    }
-
-    appLstSession.Close();
-}
-
-
-/**
- * Show dialog telling that the device must be rebooted
- */
-static void showMustRebootDialog()
-{
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: showMustRebootDialog() Called");
-
-    // Wait for 2 seconds before showing dialog
-    User::After(2000000);
-
-    TRAPD(err,
-          TRequestStatus status;
-          CAknGlobalMsgQuery* globalMsg = CAknGlobalMsgQuery::NewLC();
-
-          // In OMJ 2.x beta .sis uninstallation it is enough to
-          // show the text always in english (non-localized)
-          _LIT(KJavaPleaseReboot, "To complete the uninstallation process, \
- the phone must be restarted. Until then some applications may not function properly.");
-
-          // tell that device will be rebooted
-          globalMsg->ShowMsgQueryL(
-              status,
-              KJavaPleaseReboot,
-              R_AVKON_SOFTKEYS_OK_EMPTY__OK,
-              KNullDesC(),
-              KNullDesC(),
-              0,
-              -1,
-              CAknQueryDialog::EWarningTone);
-
-          User::WaitForRequest(status);
-
-          CleanupStack::PopAndDestroy(globalMsg);
-         );
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: showMustRebootDialog() TRAP_IGNORE exited with err %d", err);
-    }
-}
-
-
-/**
- * Create cleanup stack and run the javaappbackconverter code inside TRAP
- * harness to log unexpected leaves.
- */
-TInt E32Main()
-{
-    CTrapCleanup* pCleanupStack = CTrapCleanup::New();
-    if (NULL == pCleanupStack)
-    {
-        ELOG(EJavaConverters, "javaappbackconverter: Could not create cleanup stack!");
-        return KErrNoMemory;
-    }
-
-    LOG(EJavaConverters, EInfo, "javaappbackconverter: Starting backconverter");
-
-    // Create file server session
-    RFs fs;
-    TInt err = fs.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: Cannot open RFs connection. Error %d", err);
-        return err;
-    }
-
-    // Determine whether backconversion should be done or not.
-    // It should be done
-    // - if this process has been started when java_2_0.sis is uninstalled
-    // OR
-    // - if this process has been started when s60_omj_restore_midlets.sis is installed
-
-    // The path name of the loaded executable on which this process is based is
-    // 'javaappbackconverter.exe' if this process has been started from java_2_0.sis and
-    // 'javaapprestorer.exe' if this process has been started from s60_omj_restore_midlets.sis
-    _LIT(KJavaRestorerFileName, "javaapprestorer.exe");
-    TBool fStartedFromOmjSis(ETrue);
-    RProcess thisProcess;
-    TFileName filename = thisProcess.FileName();
-    if (filename.Find(KJavaRestorerFileName) > 0)
-    {
-        LOG(EJavaConverters, EInfo,
-            "javaappbackconverter: Started from s60_omj_restore_midlets.sis");
-        fStartedFromOmjSis = EFalse;
-    }
-    LOG1WSTR(EJavaConverters, EInfo,
-             "javaappbackconverter: Process file name is %s", (wchar_t *)(filename.PtrZ()));
-
-    // Check whether uninstalling or (installing/upgrading)
-    TBool fUninstallingSisPackage(EFalse);
-    TInt value(0);
-    // Ignore errors, if the value cannot be read, assume 'installing .sis'
-    RProperty::Get(KPSUidSWInstallerUiNotification, KSWInstallerUninstallation, value);
-    if (0 == value)
-    {
-        // Native installer is installing (or upgrading) a .sis package
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: native installer is installing .sis");
-    }
-    else
-    {
-        // Native installer is uninstalling a .sis package
-        fUninstallingSisPackage = ETrue;
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: native installer is uninstalling .sis");
-    }
-
-    if (fUninstallingSisPackage && fStartedFromOmjSis)
-    {
-        // backconversion must be done
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: Going to do backconversion.");
-    }
-    else if ((!fUninstallingSisPackage) && (!fStartedFromOmjSis))
-    {
-        // backconversion must be done
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: Going to restore midlets.");
-    }
-    else
-    {
-        LOG(EJavaConverters, EInfo,
-            "javaappbackconverter: Back conversion / restoration is not needed.");
-        fs.Close();
-        return KErrNone;
-    }
-
-    // The only time that this application should be executed
-    // is when native installer starts it
-    if ((User::CreatorSecureId() != KAppInstUiSecureID) &&
-            (User::CreatorSecureId() != KAppSisLauncherSecureID))
-    {
-        ELOG(EJavaConverters,
-             "javaappbackconverter: Mismatch in secure ID, only AppInstUi "
-             "or SisLauncher can launch this exe.");
-        ELOG1(EJavaConverters,
-              "javaappbackconverter: Starter has SID %x ", User::CreatorSecureId().iId);
-        fs.Close();
-        return KErrPermissionDenied;
-    }
-    else
-    {
-        LOG(EJavaConverters, EInfo, "javaappbackconverter: Starter SID was OK.");
-    }
-
-    ReregisterOldMidletStarter();
-
-    TInt ret = KErrNone;
-    TRAP(ret, ExecuteBackConverterL(fs));
-    if (ret != KErrNone)
-    {
-        ELOG1(EJavaConverters, "javaappbackconverter: ExecuteBackConverterL: Main error %d", ret);
-    }
-
-    // Kill OMJ Java Registry process. Next call to Java Registry API starts
-    // old S60 Java Registry server
-    KillRegistry();
-
-    // Start also old SystemAMS.exe to restore old S60 Java environment to functional state
-    RProcess rSystemAms;
-    _LIT(KSystemAmsProcess, "SystemAMS.exe");
-    _LIT(KEmptyCommandLine, "");
-    err = rSystemAms.Create(KSystemAmsProcess, KEmptyCommandLine);
-    if (KErrNone == err)
-    {
-        rSystemAms.Resume();
-    }
-    else
-    {
-        WLOG1(EJavaConverters,
-              "javaappbackconverter: Starting SystemAMS.exe failed, err %d", err);
-    }
-    rSystemAms.Close();
-
-    AddOldJavaAppIconsToMenuApp();
-
-    fs.Close();
-
-    if (fUninstallingSisPackage)
-    {
-        showMustRebootDialog();
-    }
-
-    delete pCleanupStack;
-    return ret;
-}
--- a/javatools/javaappconverter/build/javaappconverter.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-#    This process need AllFiles capability to be able to
-#    find all java applications to be converted. (They are
-#    in the data cage of the java runtime process.)
-
-
-TEMPLATE=app
-TARGET=javaappconverter
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.UID2          = 0
-    TARGET.UID3          = 0x2002121C
-    TARGET.CAPABILITY    = WriteDeviceData AllFiles TrustedUI
-
-    SOURCES += ../src.s60/*.cpp   
-    
-    LIBS += -lefsrv \
-            -lPlatformEnv \
-            -ljavacomms \
-            -lcharconv \
-            -lapgrfx
-}
-
-
-include(../../../build/omj.pri)
--- a/javatools/javaappconverter/src.s60/convertserver.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2008 - 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:  Comms server, part of Java platform 2.0 javappconverter process
-*
-*/
-
-
-#include <iostream>
-#include <unistd.h>
-
-#include "comms.h"
-#include "logger.h"
-#include "javasymbianoslayer.h"
-#include "convertserver.h"
-
-using namespace java::comms;
-using namespace std;
-
-ConvertServer::ConvertServer()
-{
-}
-
-ConvertServer::~ConvertServer()
-{
-    iInstallFiles.clear();
-}
-
-void ConvertServer::setInstallFiles(RPointerArray<HBufC> &aInstallFiles)
-{
-    JELOG2(EJavaConverters);
-
-    // file index will contain the number of valid install file urls
-    iFileIndex = 0;
-    // clear the old install file paths if any
-    iInstallFiles.clear();
-
-    int nPointers = aInstallFiles.Count();
-    iInstallFiles.reserve(nPointers);
-
-    // index is decremented because iFileIndex will also be decremented when
-    // installing -> total effect is that install files will be given to
-    // Java Installer in the original order
-    for (int i = nPointers - 1; i > -1; i--)
-    {
-        HBufC* pBuf = aInstallFiles[i];
-
-        if (NULL == pBuf)
-        {
-            // skip this NULL pointer
-            continue;
-        }
-
-        TPtr16 ptrName(pBuf->Des());
-        // Convert each HBufC to std:wstring before adding to iInstallFiles
-        iInstallFiles.push_back(std::wstring(desToWstring(ptrName)));
-        iFileIndex++;
-    }
-
-    LOG1(EJavaConverters, EInfo, "ConvertServer: number of install files = %d", iFileIndex);
-    iFilesTotal = iFileIndex;
-}
-
-int ConvertServer::start()
-{
-    LOG(EJavaConverters, EInfo,
-        "ConvertServer:start called");
-
-    iRunning = 1;
-    iComms.registerDefaultListener(this);
-    return iComms.start(IPC_ADDRESS_JAVA_APPCONVERTER_C);
-}
-
-int ConvertServer::stop()
-{
-    if (iRunning > 0)
-    {
-        iRunning = 0;
-        iComms.unregisterDefaultListener(this);
-        return iComms.stop();
-    }
-    else
-    {
-        return 0;
-    }
-}
-
-/**
- * Communicates with Java Installer. The following messages are used.
- *
- * Message Name        Id      Contents
- *
- * Get Next Operation  500     None
- *
- * Operation           501     int operation   (install = 0, uninstall = 1, exit = 2)
- *                             String url      (present if operation = install)
- *                             String uid      (present if operation = uninstall)
- *                             int current     (1..total, present if operation = install
- *                                              and caller is appconverter)
- *                             int total       (total number of apps to convert, present
- *                                              if operation = install and caller is appconverter)
- *
- * Operation Result    502     int operation   (install = 0, uninstall = 1, exit = 2)
- *                             int result      (ok = 0, error codes are negative)
- *                             int uidCount    (present if operation = install, value = uids.length)
- *                             String[] uids   (present if operation = install)
- */
-void ConvertServer::processMessage(CommsMessage& aMessage)
-{
-    LOG1(EJavaConverters, EInfo, "ConvertServer::processMessage, sender    = %d", aMessage.getSender());
-    LOG1(EJavaConverters, EInfo, "ConvertServer::processMessage, messageId = %d", aMessage.getMessageId());
-    LOG1(EJavaConverters, EInfo, "ConvertServer::processMessage, moduleId  = %d", aMessage.getModuleId());
-    LOG1(EJavaConverters, EInfo, "ConvertServer::processMessage, messageRef= %d", aMessage.getMessageRef());
-
-    switch (aMessage.getMessageId())
-    {
-    case GET_NEXT_OPERATION_MESSAGE_ID:
-    {
-        // Java Installer asks for the next install operation.
-        // Reply with 'Operation' message.
-
-        CommsMessage reply;
-        reply.replyTo(aMessage);
-
-        reply.setMessageId(OPERATION_MESSAGE_ID);
-
-        iFileIndex--;
-        if (iFileIndex <= -1)
-        {
-            // all install files have been handled, ask Java Installer to exit
-            reply << EXIT_OPERATION;
-
-            // Java Installer sends reply to 'exit' message and then
-            // it exits which wakes up javaappconverter main thread
-        }
-        else
-        {
-            // ask Java Installer to install next
-            int current = (iFilesTotal - iFileIndex);
-            reply << INSTALL_OPERATION << iInstallFiles[iFileIndex] << current << iFilesTotal;
-        }
-
-        int err = iComms.send(reply);
-        if (err != 0)
-        {
-            ELOG1(EJavaConverters,
-                  "ConvertServer: Sending reply to Java Installer failed, err %d", err);
-            // Propably Java Installer has crashed and the execution of
-            // CSilentMIDletConvert is already proceeding. This server will
-            // be stopped when the execution reaches EExit state.
-        }
-    }
-    break;
-
-    case OPERATION_RESULT_MESSAGE_ID:
-    {
-        // Log the result of the operation. Javaappconverter does not need
-        // the Uids of the installed Java Applications so they are not
-        // parsed.
-        int operation;
-        int result;
-
-        aMessage >> operation >> result;
-
-        LOG2(EJavaConverters, EInfo,
-             "ConvertServer: operation = %d, result = %d", operation, result);
-
-        if (result < 0)
-        {
-            // Conversion failed.
-            ELOG2(EJavaConverters, "ConvertServer: Converting (installing) "
-                  "application number %d failed with code %d",
-                  (iFilesTotal - iFileIndex), result);
-        }
-    }
-    break;
-
-    default:
-    {
-        // Unknown message. Ignore it.
-        WLOG1(EJavaConverters,
-              "ConvertServer: Unknown message received. Msg Id = %d",
-              aMessage.getMessageId());
-    }
-    break;
-    }
-}
--- a/javatools/javaappconverter/src.s60/convertserver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2008 - 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:  Comms server, part of Java platform 2.0 javappconverter process
-*               When started  in 'poll' mode Java Installer connects to
-*               this server to get install commands.
-*
-*/
-
-
-#ifndef CONVERTSERVER_H
-#define CONVERTSERVER_H
-
-#include <string>
-#include <vector>
-
-#include "commslistener.h"
-#include "commsserverendpoint.h"
-#include "commsmessage.h"
-
-using namespace java::comms;
-
-/**
- * The messages known by Convert Server
- */
-
-const int GET_NEXT_OPERATION_MESSAGE_ID = 500;
-const int OPERATION_MESSAGE_ID = 501;
-const int OPERATION_RESULT_MESSAGE_ID = 502;
-
-/**
- * The known operations inside messages
- */
-
-const int INSTALL_OPERATION = 0;
-const int UNINSTALL_OPERATION = 1;
-const int EXIT_OPERATION = 2;
-
-class ConvertServer : public CommsListener
-{
-public:
-    ConvertServer();
-    virtual ~ConvertServer();
-
-    void setInstallFiles(RPointerArray<HBufC> &aInstallFiles);
-
-    // CommsListener methods
-    virtual void processMessage(CommsMessage& aMessage);
-
-    int start();
-    int stop();
-
-    CommsEndpoint* getComms()
-    {
-        return &iComms;
-    }
-
-private:
-    int iRunning; // 1 if running, 0 if not running
-    int iFileIndex; // decremented when install files (.jad or .jar or .dcf) are handled
-    int iFilesTotal;
-    std::vector<std::wstring> iInstallFiles;
-    CommsServerEndpoint iComms;
-};
-
-#endif // CONVERTSERVER_H
--- a/javatools/javaappconverter/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaappconverter process
-*
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-
-#include "javauids.h"
-#include "silentmidletconvert.h"
-#include "logger.h"
-
-_LIT_SECURE_ID(KJavaPostUpdaterSecureID, KJavaPostUpdaterUid);
-
-
-/**
- * If uids file exists, the old S60 midlets have not yet been
- * converted for OMJ java environment.
- */
-static TBool isConversionNeeded(RFs& aFs)
-{
-    TFileName importDataFile(KUidsImportDataFilePathName);
-    importDataFile.Append(KUidsImportDataFileName);
-
-    TUint attributes;
-    TInt  err = aFs.Att(importDataFile, attributes);
-    if (KErrNone != err)
-    {
-        return EFalse;
-    }
-    else
-    {
-        return ETrue;
-    }
-}
-
-
-/**
- * Allow starting process only from Java Captain,
- * allow running only one instance of the process,
- * create file server connection,
- * create active scheduler and start it
- *
- * @return ETrue if conversion was done
- */
-static TBool convertJavaAppsL()
-{
-    JELOG2(EJavaConverters);
-
-    TBool conversionExecuted = EFalse;
-
-    _LIT(KPreinstallerMatch, "javaappconverter*");
-    TFindProcess find(KPreinstallerMatch);
-    TFullName ignoreName;
-    find.Next(ignoreName);
-
-    // Can only have one javaappconverter. If a second is found exit
-    if (find.Next(ignoreName) == KErrNone)
-    {
-        ELOG(EJavaPreinstaller, "javaappconverter.exe already running.");
-        return ETrue;
-    }
-
-    // The only time that this application should be executed
-    // is when javapostupdater calls it.
-    if (User::CreatorSecureId() != KJavaPostUpdaterSecureID)
-    {
-        ELOG(EJavaConverters,
-             "ConvertJavaAppsL: Mismatch in secure ID, only javapostupdater can launch this exe.");
-        User::Leave(KErrPermissionDenied);
-    }
-
-    RFs fs;
-    User::LeaveIfError(fs.Connect());
-    CleanupClosePushL(fs);
-
-    if (isConversionNeeded(fs))
-    {
-        CActiveScheduler* as = new(ELeave) CActiveScheduler();
-
-        // Install active scheduler
-        CActiveScheduler::Install(as);
-        CleanupStack::PushL(as);
-
-        // Setup and start the MIDlet conversion
-        CSilentMIDletConvert* si = CSilentMIDletConvert::NewLC(fs);
-
-        LOG(EJavaConverters, EInfo, "ConvertJavaAppsL: Call CSilentMIDletConvert::Start()");
-
-        si->Start();
-
-        // Start active scheduler, starts conversion
-        LOG(EJavaConverters, EInfo, "ConvertJavaAppsL: Starting CActiveScheduler");
-        CActiveScheduler::Start();
-
-        LOG(EJavaConverters, EInfo, "ConvertJavaAppsL: Cleaning up");
-
-        CleanupStack::PopAndDestroy(si);
-        CleanupStack::PopAndDestroy(as);
-
-        conversionExecuted = ETrue;
-    }
-    else
-    {
-        LOG(EJavaConverters, EInfo,
-            "ConvertJavaAppsL: Conversion has already been done.");
-    }
-
-    CleanupStack::PopAndDestroy(&fs); // close connection to file server
-
-    return conversionExecuted;
-}
-
-
-/**
- * Create cleanup stack and run the javaappconverter code inside TRAP harness
- * to log unexpected leaves.
- */
-TInt E32Main()
-{
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-    TBool conversionExecuted(EFalse);
-    TRAPD(err, conversionExecuted = convertJavaAppsL());
-    if (err != KErrNone)
-    {
-        ELOG1(EJavaConverters, "ConvertJavaAppsL:Main error %d", err);
-    }
-    if (!conversionExecuted)
-    {
-        // Use this error code to tell the process that started us,
-        // that we did nothing because conversion was already done.
-        err = KErrAlreadyExists;
-    }
-
-    delete cleanupStack;
-    return err;
-}
-// eof
--- a/javatools/javaappconverter/src.s60/silentmidletconvert.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,953 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaappconverter process
-*
-*/
-
-
-#include <e32base.h>
-#include <apgcli.h>
-#include <pathinfo.h>
-#include <driveinfo.h>
-
-#include "silentmidletconvert.h"
-#include "javauids.h"
-#include "javacommonutils.h"
-#include "logger.h"
-#include "javaprocessconstants.h"
-#include "javasymbianoslayer.h"
-
-
-using namespace java::util;
-
-_LIT(KJarFileNameSuffix, ".jar");
-_LIT(KJadFileNameSuffix, ".jad");
-_LIT(KFLJarFileNameSuffix, ".dm");
-_LIT(KSDJarFileNameSuffix, ".dcf");
-_LIT(KSMCBackSplash, "\\");
-
-// The directory where the java applications to be converted are searched from
-_LIT(KMidletSuiteInstallBasePath, ":\\Private\\102033E6\\MIDlets\\");
-
-
-/**
- * To create new instance of this class.
- *
- * @param aFs - A reference to the file server.
- * @return Reference to the object of this class.
- * @exception If construction fails.
- *
- */
-CSilentMIDletConvert* CSilentMIDletConvert::NewLC(RFs& aFs)
-{
-    CSilentMIDletConvert* self = new(ELeave) CSilentMIDletConvert(aFs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-/**
- * To do 1st phase construction for this object.
- *
- * Adds this active object to the scheduler.
- *
- * @param aFs - A reference to the file server.
- */
-CSilentMIDletConvert::CSilentMIDletConvert(RFs& aFs) :
-        CActive(EPriorityStandard), iFs(aFs), iNumberOfAppsToInstall(0),
-        iDefaultTargetInstallationDrive(-1)
-{
-    CActiveScheduler::Add(this);
-}
-
-/**
- * To do 2nd phase construction for this object.
- *
- * @exception If the method is not able to allocate necessary buffers.
- */
-void CSilentMIDletConvert::ConstructL()
-{
-    JELOG2(EJavaConverters);
-
-    iConvertServer = new(ELeave) ConvertServer();
-}
-
-/**
- * Deletes this object.
- * All allocated resources are released.
- */
-CSilentMIDletConvert::~CSilentMIDletConvert()
-{
-    JELOG2(EJavaConverters);
-    Cancel();
-    iInstallFiles.ResetAndDestroy();
-    iInstallFiles.Close();
-
-    iDirs.ResetAndDestroy();
-    iDirs.Close();
-
-    delete iConvertServer;
-    iConvertServer = NULL;
-}
-
-/**
- * To start silent installation.
- */
-void CSilentMIDletConvert::Start()
-{
-    JELOG2(EJavaConverters);
-    iState = EFindOutDeviceDrives;
-    CompleteRequest();
-}
-
-/**
- * To stop whole preinstaller.
- * Stops the active scheduler.
- */
-void CSilentMIDletConvert::Exit()
-{
-    Deque();
-    CActiveScheduler::Stop();
-}
-
-/**
- * To complete the request for this object.
- *
- * @Postconditions The following conditions are true immediately after
- * returning from this method.
- * - iStatus == KErrNone
- * - IsActive() == ETrue
- */
-void CSilentMIDletConvert::CompleteRequest()
-{
-    JELOG2(EJavaConverters);
-
-    TRequestStatus *status = &iStatus;
-    User::RequestComplete(status, KErrNone);
-    if (!IsActive())
-    {
-        SetActive();
-    }
-}
-
-/**
- * To run this active object.
- *
- * The state logic is:
- *
- * EFindOutDeviceDrives: find out all non-remote drives in the device
- *    - mark externally mountable drives (removable drives)
- *    - mark read only drives (ROM)
- *
- * EFindOutDrivesToBeScannedNow: make list of drives to be scanned
- *    - start with all mounted drives
- *
- * EAppsInInstalledDirectories: go through all directories in iDirs one by one
- *  and find all java applications in the subdirectories of the directory
- *    - if only .jar/.dcf/.dm file is found it is added to iInstallFiles
- *    - if .jad file is found, it is added to iInstallFiles
- *
- * ECheckWhichAppsShouldBeConverted: for each java application check from
- *  AppArc whether it should be converted
- *    - if the application has been installed, convert it
- *
- * EExecuteConvertServer: give list of install files to preinstall server,
- *  start Java Installer in poll mode, start convert server in another thread,
- *  convert server will give the names of the .jad or .jar/.dcf/.dm files to Java Installer
- *  when it polls them,  convert server will log whether each installation
- *  succeeded. After all install files have been polled, convert server will ask
- *  Java Installer to exit. After that this active object moves to next state.
- *
- * EMarkConversionDone: remove 'uids' data file created by javaapppreconverter
- *
- * EExit: free resources and exit
- *
- */
-void CSilentMIDletConvert::RunL()
-{
-    JELOG2(EJavaConverters);
-
-    switch (iState)
-    {
-    case EFindOutDeviceDrives:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CSilentMIDletConvert::RunL EFindOutDeviceDrives");
-        GetAllDeviceDrivesL();
-        iState = EFindOutDrivesToBeScannedNow;
-        CompleteRequest();
-    }
-    break;
-
-    case EFindOutDrivesToBeScannedNow:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CSilentMIDletConvert::RunL EFindOutDrivesToBeScannedNow");
-
-        TChar driveChar = 'C';
-
-        // forget old search directories
-        iDirs.ResetAndDestroy();
-
-        for (TInt drive = 0; drive < KMaxDrives; drive++)
-        {
-            // All present drives will be scanned for
-            // java applications to be converted
-            if (iDriveStatuses[drive] & DriveInfo::EDrivePresent)
-            {
-                (void)iFs.DriveToChar(drive, driveChar);
-
-                // The base Java application install directory in this
-                // drive must be scanned.
-                // Reserve memory also for drive letter and terminating zero
-                // for logging.
-                HBufC *baseInstallDir = HBufC::NewLC(KMidletSuiteInstallBasePath().Length() + 2);
-
-                TPtr dirPtr(baseInstallDir->Des());
-                dirPtr.Append(driveChar);
-                dirPtr.Append(KMidletSuiteInstallBasePath());
-
-                // Add new search directory
-                iDirs.AppendL(baseInstallDir);
-                CleanupStack::Pop(baseInstallDir);
-            }
-        }
-
-        iState = EAppsInInstalledDirectories;
-        CompleteRequest();
-    }
-    break;
-
-    case EAppsInInstalledDirectories:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CSilentMIDletConvert::RunL EAppsInInstalledDirectories");
-
-        GetInstallFilesL(iDirs);
-
-        iState = ECheckWhichAppsShouldBeConverted;
-        CompleteRequest();
-    }
-    break;
-
-    case ECheckWhichAppsShouldBeConverted:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CSilentMIDletConvert::RunL ECheckWhichAppsShouldBeConverted");
-
-        // Check all Jad / Jar files in iInstallFiles and remove those
-        // that need not be converted (those that cannot be found from
-        // AppArc). Updates also iNumberOfAppsToInstall
-        CheckNeedToInstall();
-
-        iState = EExecuteConvertServer;
-        CompleteRequest();
-    }
-    break;
-
-    case EExecuteConvertServer:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CSilentMIDletConvert::RunL EExecuteConvertServer");
-
-        if (iNumberOfAppsToInstall > 0)
-        {
-            // Install all MIDlet Suites still in iInstallFiles.
-
-            // Pass iInstallFiles to ConvertServer
-            iConvertServer->setInstallFiles(iInstallFiles);
-
-            // Start the server
-            int err = iConvertServer->start();
-            if (0 != err)
-            {
-                // server cannot be started
-                ELOG1(EJavaConverters,
-                      "Cannot start convert server, err %d", err);
-            }
-
-            // Starts Java Installer, waits until Java Installer exits
-            RunJavaInstallerL();
-
-            iState = EMarkConversionDone;
-        }
-        else
-        {
-            iState = EMarkConversionDone;
-            CompleteRequest();
-        }
-    }
-    break;
-
-    case EMarkConversionDone:
-    {
-        // If this line is executed, converting old midlets succeeded.
-        // Remove the 'uids' data file so that conversion will not be
-        // done again if OMJ sis package is installed again to the same device.
-        RemoveDataFile();
-
-        iState = EExit;
-        CompleteRequest();
-    }
-    break;
-
-    case EExit:
-    {
-        LOG(EJavaConverters, EInfo, "CSilentMIDletConvert::RunL EExit");
-
-        // Stops the server if it is running
-        iConvertServer->stop();
-
-        FullCleanup();
-
-        // The whole javaappconverter process is stopped.
-        Exit();
-    }
-    break;
-
-    }
-}
-
-/**
- * To handle leave from RunL.
- * This method exits this active object using normal state machine
- * After calling this method this active object will exit.
- *
- * @param aError - A reason of error.
- * @return KErrNone.
- */
-TInt CSilentMIDletConvert::RunError(TInt aError)
-{
-    ELOG2(EJavaConverters,
-          "CSilentMIDletConvert::RunError(%d) from state %d", aError, iState);
-
-    Cancel();
-
-    iState = EExit;
-    CompleteRequest();
-
-    return KErrNone;
-}
-
-/**
- * To do cancelling for this object.
- *
- */
-void CSilentMIDletConvert::DoCancel()
-{
-    ELOG1(EJavaConverters,
-          "CSilentMIDletConvert::DoCancel from state %d", iState);
-
-    // Check whether convert server must be stopped
-    if (iState == EExecuteConvertServer)
-    {
-        // Stops the server if it is running
-        iConvertServer->stop();
-    }
-}
-
-/**
- * Add .jad files in the directories specified in aDirs to iInstallFiles.
- * If a directory does not contain a .jad file but it contains a .jar/.dcf/.dm file,
- * add that file to iInstallFiles
- *
- * @param aDirs - An array of directories to be scanned.
- * @exception Unable to alloc memory for the internal buffers.
- * @exception Unable to get directory's contents.
- */
-void CSilentMIDletConvert::GetInstallFilesL(RPointerArray<HBufC>& aDirs)
-{
-    JELOG2(EJavaConverters);
-
-    // Number of MIDlet installation base directories to scan,
-    // one directory per local drive
-    const TInt nBaseDirs = aDirs.Count();
-
-    for (TInt i = 0; i < nBaseDirs; i++)
-    {
-        TFileName suitePath;
-
-        // Form base directory path, MIDlets have been installed
-        // to subdirectories of this directory
-        const TPtrC& dir = ((HBufC *)(aDirs[i]))->Des();
-        TFileName baseSuitePath = dir;
-
-        CDir *entryList;
-        CDir *dirList;
-        TInt err = iFs.GetDir(baseSuitePath, KEntryAttMatchMask, ESortNone, entryList, dirList);
-        if (KErrNone != err)
-        {
-            WLOG1WSTR(EJavaConverters,
-                      "CSilentMIDletConvert::GetInstallFilesL Cannot list directory %s",
-                      (wchar_t *)(baseSuitePath.PtrZ()));
-
-            // If no S60 Java application has been installed to the drive,
-            // the directory does not exist but it is OK
-            if (KErrPathNotFound != err)
-            {
-                User::Leave(err);
-            }
-            continue;
-        }
-
-        // Only midlet installation directory entries are meaningfull,
-        // discard other possible entries
-        delete entryList;
-
-        TInt   nCount = dirList->Count();
-        TEntry dirEntry;
-
-        for (TInt nInd = 0; nInd < nCount; nInd++)
-        {
-            dirEntry = (*dirList)[nInd];
-            // Just to make sure this really is subdirectory
-            if (dirEntry.IsDir())
-            {
-                // Is this midlet suite subdir?
-                // Midlet suite subdirs look like this "[102b567B]"
-                // Must parse the value of the Uid as unsigned int to avoid
-                // overflow
-                TUint32 nUid;
-                TLex   lexer(dirEntry.iName);
-                lexer.Inc();
-                err = lexer.Val(nUid, EHex);
-                if (KErrNone != err)
-                {
-                    // Not midlet suite subdir, skip it
-                    continue;
-                }
-
-                // Does the subdirectory contain any Jar files?
-                suitePath = baseSuitePath;
-                suitePath.Append(dirEntry.iName);
-                suitePath.Append(KSMCBackSplash);
-
-                CDir *suiteDirEntryList;
-                err = iFs.GetDir(suitePath, KEntryAttMatchMask, ESortNone, suiteDirEntryList);
-                if (KErrNone != err)
-                {
-                    ELOG1WSTR(EJavaConverters,
-                              "CSilentMIDletConvert::GetInstallFilesL Cannot list content of suite dir %s",
-                              (wchar_t *)(suitePath.PtrZ()));
-                    User::Leave(err);
-                    return;
-                }
-                // If there is .jad or Jar file in suiteDirEntryList, adds
-                // it to iInstallFiles.
-                // Recognizes also DRM protected Jar files (.dm, .dcf)
-                AddJadJarToInstallFilesL(suitePath, suiteDirEntryList);
-                delete suiteDirEntryList;
-            }
-        } // for - loop all directory entries in a base installation directories
-        delete dirList;
-
-    } // for - loop all base installation directories
-
-    if (iInstallFiles.Count() == 0)
-    {
-        WLOG(EJavaConverters,
-             "CSilentMIDletConvert::GetInstallFilesL No MIDlets to convert");
-    }
-}
-
-/**
- * Check all Jad / Jar files in iInstallFiles and remove those
- * that need not be converted. Updates also iNumberOfAppsToInstall.
- */
-void CSilentMIDletConvert::CheckNeedToInstall()
-{
-    // It is too late to check from AppArc whether the application is a
-    // valid java application or no. The Java registry dll:s have been eclipsed and
-    // old apps are now invalid.
-    // javaapppreconverter has stored the Uids of the valid midlets to 'uids' file
-    // in to the data subdirectory of this process.
-    // ReadMidletUids() can be used to read the uids of the valid midlets to array.
-    // If uid is in the array, it is valid.
-    TFileName uidsDataFilePathName(KUidsImportDataFilePathName);
-    RArray<TUid> validUids = ReadMidletUids(uidsDataFilePathName);
-
-    // loop through iInstallFiles one be one
-    TInt   nNumberOfAppsToInstall = 0;
-    TInt   err;
-    TInt   nFiles = iInstallFiles.Count();
-    TParse fp;
-    for (TInt nInd = 0; nInd < nFiles; nInd++)
-    {
-        // get the directory path of the current iInstallFiles[nInd]
-        err = fp.Set(*(iInstallFiles[nInd]), NULL, NULL);
-        if (KErrNone != err)
-        {
-            WLOG1(EJavaConverters,
-                  "CSilentMIDletConvert::CheckNeedToInstall Cannot parse install file name %s",
-                  iInstallFiles[nInd]);
-            continue;
-        }
-
-        TPtrC installDir = fp.DriveAndPath();
-
-        // read Java applications uid(s) from 'uids' file in the directory
-        RArray<TUid> appUids = ReadMidletUids(installDir);
-
-        // For each app uid, check whether it is uid of an valid java  application.
-        // If yes, make conversion installation for the .jad/Jar file
-        // in this directory.
-        TInt nIndUids;
-        TInt nCountUids = appUids.Count();
-        for (nIndUids = 0; nIndUids < nCountUids; nIndUids++)
-        {
-            err = validUids.Find(appUids[nIndUids]);
-            if (KErrNotFound == err)
-            {
-                LOG1(EJavaConverters, EInfo,
-                     "CSilentMIDletConvert::CheckNeedToInstall Midlet with Uid %x "
-                     "was not registered to AppArc",
-                     appUids[nIndUids].iUid);
-
-                // Do not convert any app in this Midlet suite
-                delete iInstallFiles[nInd];
-                iInstallFiles[nInd] = NULL;
-                break;
-            }
-            else
-            {
-                // The application is valid, so it should be converted
-                nNumberOfAppsToInstall++;
-            }
-        }
-        appUids.Close();
-    }
-    validUids.Close();
-
-    // how many applications to convert
-    iNumberOfAppsToInstall = nNumberOfAppsToInstall;
-}
-
-/**
- * Read the midlet uids from file 'uids' in the directory
- * given in parameter aDir and return them in RArray
- *
- * @param aDir -  directory that contains 'uids' file
- * @return the midlet uids in RArray. Caller must destroy the RArray
- */
-RArray<TUid> CSilentMIDletConvert::ReadMidletUids(const TPtrC& aDir)
-{
-    RArray<TUid> midletUids;
-    RFile fileUids;
-    TFileName nameUids = aDir;
-    nameUids.Append(_L("uids"));
-
-    TInt err = fileUids.Open(iFs, nameUids, EFileRead);
-    if (KErrNone != err)
-    {
-        // cannot open "uids" file
-        nameUids.Append(0);
-        WLOG1WSTR(EJavaConverters,
-                  "CSilentMIDletConvert::ReadMidletUids cannot open uids file in dir %s",
-                  (wchar_t *)(&(nameUids[0])));
-        WLOG1(EJavaConverters, "Error is %d", err);
-        return midletUids;
-    }
-
-    TInt fileSize(0);
-    err = fileUids.Size(fileSize);
-    if (fileSize < 8)
-    {
-        // valid "uids" file contains at least the uid of the suite and
-        // uid of at least one midlet
-        fileUids.Close();
-        // invalid "uids" file
-        nameUids.Append(0);
-        WLOG1WSTR(EJavaConverters,
-                  "CSilentMIDletConvert::ReadMidletUids invalid uids file in dir %s",
-                  (wchar_t *)(&(nameUids[0])));
-        return midletUids;
-    }
-
-    // reserve buffer for one uid
-    TBuf8<4> readBuf;
-    TDes8 readBufDes(readBuf);
-
-    // The first uid is suite uid but we are not interested in it. Skip it.
-    err = fileUids.Read(readBufDes);
-    if (KErrNone != err)
-    {
-        fileUids.Close();
-        // cannot read "uids" file
-        nameUids.Append(0);
-        WLOG1WSTR(EJavaConverters,
-                  "CSilentMIDletConvert::ReadMidletUids cannot read uids file in dir %s",
-                  (wchar_t *)(&(nameUids[0])));
-        WLOG1(EJavaConverters, "Error is %d", err);
-        return midletUids;
-    }
-
-    // Now read rest of the file one uid at a time
-    TInt  nReadBytes = readBufDes.Length();
-    TUint midletUidValue;
-    TUint temp;
-
-    while (nReadBytes == 4)
-    {
-        err = fileUids.Read(readBufDes);
-        if (KErrNone != err)
-        {
-            fileUids.Close();
-            // cannot read "uids" file
-            nameUids.Append(0);
-            WLOG1WSTR(EJavaConverters,
-                      "CSilentMIDletConvert::ReadMidletUids(2) cannot from uids file in dir %s",
-                      (wchar_t *)(&(nameUids[0])));
-            WLOG1(EJavaConverters, "Error is %d", err);
-            return midletUids;
-        }
-
-        nReadBytes = readBufDes.Length();
-        if (nReadBytes == 4)
-        {
-            // One whole midlet id was read to buffer.
-            // 4 bytes per midlet, least significant byte first
-            TUid  midletUid;
-
-            midletUidValue = readBufDes[0];
-            temp = readBufDes[1];
-            midletUidValue += temp<<8;
-            temp = readBufDes[2];
-            midletUidValue += temp<<16;
-            temp = readBufDes[3];
-            midletUidValue += temp<<24;
-
-            midletUid.iUid = midletUidValue;
-            midletUids.Append(midletUid);
-        }
-    }
-
-    fileUids.Close();
-
-    return midletUids;
-}
-
-/**
- * Scan the content of one directory entry and add the name of
- * .jad / .jar /.dcf/.dm file to iInstallFiles if
- * the directory contains a valid, installed Java application.
- * Recognizes also DRM protected jar files (.dm, .dcf)
- *
- * @param aSuitePathName -  directory to be scanned.
- * @param aSuiteDirEntryList - contents of the directory
- * @exception Unable to alloc memory for the internal buffers.
- */
-void CSilentMIDletConvert::AddJadJarToInstallFilesL(
-    const TFileName &aSuitePathName,
-    const CDir *aSuiteDirEntryList)
-{
-    JELOG2(EJavaConverters);
-
-    if (NULL == aSuiteDirEntryList)
-    {
-        return;
-    }
-
-    TInt nCount = aSuiteDirEntryList->Count();
-    if (0 == nCount)
-    {
-        return;
-    }
-
-    TInt        suffixPos;
-    TEntry      dirEntry;
-    TBool       jarFileInSuiteDir = EFalse;
-    TBool       jadFileInSuiteDir = EFalse;
-    TFileName   jadFullPathName;
-    TFileName   jarFullPathName;
-
-    for (TInt nInd = 0; nInd < nCount; nInd++)
-    {
-        dirEntry = (*aSuiteDirEntryList)[nInd];
-        // Directory cannot be Jar file.
-        // Empty file cannot valid Jar file
-        if (dirEntry.IsDir() || (dirEntry.iSize == 0))
-        {
-            continue;
-        }
-        // get the suffix of the name
-        suffixPos = dirEntry.iName.LocateReverse('.');
-        if (suffixPos == KErrNotFound)
-        {
-            // File name does not contain '.' char
-            continue;
-        }
-        TPtrC suffix(dirEntry.iName.Mid(suffixPos));
-
-        // if the name ends with ".jar" the name is current candidate
-        // for the name to be added to iInstallFiles list
-        if (suffix.CompareF(KJarFileNameSuffix) == 0)
-        {
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KJadFileNameSuffix) == 0)
-        {
-            // If .jad file is found, then it will be added
-            // to iInstallFiles list
-            jadFullPathName = aSuitePathName;
-            jadFullPathName.Append(dirEntry.iName);
-            jadFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KFLJarFileNameSuffix) == 0)
-        {
-            // forward locked and combined delivery DRM protected
-            // .jar files have suffix ".dm"
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KSDJarFileNameSuffix) == 0)
-        {
-            // separate delivery DRM protected .jar files have suffix ".dcf"
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-    }
-
-    // If directory contains a Jar file, then add something to iInstallFiles
-    if (jarFileInSuiteDir)
-    {
-        // If directory contains also .jad file, add .jad file name to iInstallFiles
-        if (jadFileInSuiteDir)
-        {
-            // Reserve one char for null terminator
-            HBufC* path = HBufC::NewLC(jadFullPathName.Length() + 1);
-            TPtr pathPtr(path->Des());
-            pathPtr.Append(jadFullPathName);
-
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "CSilentMIDletConvert::AddJadJarToInstallFilesL Adding jad file %s",
-                     (wchar_t *)(pathPtr.PtrZ()));
-            iInstallFiles.Append(path);
-            CleanupStack::Pop(path);
-        }
-        else
-        {
-            // Reserve one char for null terminator
-            HBufC* path = HBufC::NewLC(jarFullPathName.Length() + 1);
-            TPtr pathPtr(path->Des());
-            pathPtr.Append(jarFullPathName);
-
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "CSilentMIDletConvert::AddJadJarToInstallFilesL Adding jar file %s",
-                     (wchar_t *)(pathPtr.PtrZ()));
-            iInstallFiles.Append(path);
-            CleanupStack::Pop(path);
-        }
-    }
-}
-
-/**
- * Start Java Installer in poll mode and then wait until it exits.
- */
-void CSilentMIDletConvert::RunJavaInstallerL()
-{
-    LOG(EJavaConverters, EInfo, "CSilentMIDletConvert::RunJavaInstaller");
-
-    RProcess rJavaInstaller;
-    TFileName fileName;
-    TInt err;
-    // Max one path name, user name and password and some options ->
-    // 1536 is enough
-    TBuf<1536> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    std::auto_ptr<HBufC> installerStarterDll(
-        stringToDes(java::runtime::JAVA_INSTALLER_STARTER_DLL));
-    commandLine = installerStarterDll->Des();
-    commandLine.Append(_L(" poll -address=convert"));
-
-    // Run installer silently
-    commandLine.Append(_L(" -silent"));
-
-    // Convert old S60 applications so that applications uids,
-    // private data and RMS data are all preserved
-    commandLine.Append(_L(" -convert=yes"));
-
-    // Upgrading MIDlets is allowed
-    commandLine.Append(_L(" -upgrade=yes"));
-
-    // No OCSP checks for converted MIDlets
-    commandLine.Append(_L(" -ocsp=no"));
-
-    // Allow upgrade even if version number has not increased
-    commandLine.Append(_L(" -overwrite=yes"));
-
-    // Downloading .jar is not allowed.
-    commandLine.Append(_L(" -download=no"));
-
-    // If upgrade install, automatically upgrade also the data
-    commandLine.Append(_L(" -upgrade_data=yes"));
-
-    // If the device has an internal drive with much free disk space,
-    // install all converted applications to that drive
-    if (iDefaultTargetInstallationDrive > -1)
-    {
-        TChar targetDrive;
-        err = RFs::DriveToChar(iDefaultTargetInstallationDrive, targetDrive);
-        if (KErrNone == err)
-        {
-            commandLine.Append(_L(" -drive="));
-            commandLine.Append(targetDrive);
-        }
-    }
-
-    // start JavaInstaller
-    std::auto_ptr<HBufC> installerProcess(
-        stringToDes(java::runtime::JAVA_PROCESS));
-    err = rJavaInstaller.Create(installerProcess->Des(), commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "CSilentMIDletConvert::RunJavaInstaller calling Rendezvous");
-        // This call will wait until Java Installer exits (or panics)
-        rJavaInstaller.Logon(iStatus);
-
-        LOG(EJavaConverters, EInfo, "CSilentMIDletConvert::RunJavaInstaller calling Resume");
-        rJavaInstaller.Resume();
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "CSilentMIDletConvert::RunJavaInstaller Cannot start Installer, error %d", err);
-        // CActive will trap the following leave, execution will go to RunError
-        User::Leave(err);
-    }
-
-    LOG(EJavaConverters, EInfo, "CSilentMIDletConvert::RunJavaInstaller calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-
-    // now wait until Java Installer exits
-    SetActive();
-}
-
-/**
- * To cleanup member variables.
- */
-void CSilentMIDletConvert::FullCleanup()
-{
-    JELOG2(EJavaConverters);
-
-    iDirs.ResetAndDestroy();
-    iInstallFiles.ResetAndDestroy();
-}
-
-
-/**
- * Checks all local drives in the device and stores the DriveInfo API drive
- * status information for each drive to iDriveStatuses
- * @exception Cannot get drive list.
- */
-void CSilentMIDletConvert::GetAllDeviceDrivesL()
-{
-    JELOG2(EJavaConverters);
-
-    TDriveList driveList;
-    // get all drives
-    TInt err = iFs.DriveList(driveList);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CSilentMIDletConvert::GetAllDeviceDrives cannot get drive list, err %d", err);
-        User::Leave(err);
-    }
-
-    // store status of the non-remote, non-substed drives
-    TInt64 requiredFreeDiskSpace = KMinimumFreeDiskSpace;
-    TUint  status = 0;
-    for (TInt drive = 0; drive < KMaxDrives; drive++)
-    {
-        iDriveStatuses[drive] = 0;
-
-        if (driveList[drive] == 0)
-        {
-            // no such drive in this device
-            continue;
-        }
-
-        err = DriveInfo::GetDriveStatus(iFs, drive, status);
-        if (KErrNone != err)
-        {
-            ELOG2(EJavaConverters,
-                  "CSilentMIDletConvert::GetAllDeviceDrivesL cannot get drive %d status, err %d",
-                  drive, err);
-            User::Leave(err);
-        }
-        // D drive is temporary RAM drive, skip it
-        // Drives J to Y are substed or remote drives, skip them
-        if ((drive == EDriveD) || ((drive >= EDriveJ) && (drive <= EDriveY)))
-        {
-            continue;
-        }
-
-        iDriveStatuses[drive] = status;
-
-        // If the device has an internal (non-removable) drive with much
-        // free disk space, use that drive as the target installation drive
-        // when making the conversion installations.
-        // Skip drives A: to D:, C: drive is not valid target drive because
-        // we do not want to fill C: drive unnecessarily
-        if (drive < EDriveE)
-        {
-            continue;
-        }
-        // drive must be internal and visible to the user but
-        // it must NOT be corrupted or in exclusive use or read only
-        if ((status & DriveInfo::EDriveInternal) &&
-                (!(status & DriveInfo::EDriveCorrupt)) &&
-                (!(status & DriveInfo::EDriveInUse)) &&
-                (!(status & DriveInfo::EDriveReadOnly)) &&
-                (status & DriveInfo::EDriveUserVisible))
-        {
-            // Is there 'enough' free disk space for conversion
-            TVolumeInfo volumeInfo;
-            err = iFs.Volume(volumeInfo, drive);
-            if (KErrNone == err)
-            {
-                if (volumeInfo.iFree > requiredFreeDiskSpace)
-                {
-                    iDefaultTargetInstallationDrive = drive;
-
-                    // If some other internal drive has even more free
-                    // disk space, it will be used as the target drive
-                    requiredFreeDiskSpace = volumeInfo.iFree;
-                }
-            }
-        }
-    }
-}
-
-/**
- * Remove the data file that contain information about the midlets to be converted.
- */
-void CSilentMIDletConvert::RemoveDataFile()
-{
-    TFileName dataFile(KUidsImportDataFilePathName);
-    dataFile.Append(KUidsImportDataFileName);
-
-    TInt err = iFs.Delete(dataFile);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CSilentMIDletConvert::RemoveDataFile: Cannot delete data file, err %d ",
-              err);
-    }
-}
--- a/javatools/javaappconverter/src.s60/silentmidletconvert.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaappconverter process
-*
-*/
-
-
-#ifndef SILENTMIDLETCONVERT_H
-#define SILENTMIDLETCONVERT_H
-
-#include <f32file.h>
-#include <e32base.h>
-#include <javasymbianoslayer.h>
-
-#include "convertserver.h"
-
-
-// This binary data file contains the uids of the old valid java applications
-// in this device
-_LIT(KUidsImportDataFilePathName, "C:\\private\\2002121C\\data\\");
-_LIT(KUidsImportDataFileName, "uids");
-
-// Default target installation disk for conversion should have at least
-// 10 MB of free disk space (10 * 1024 * 1204)
-const TInt64 KMinimumFreeDiskSpace = 10485760;
-
-
-/**
- * The main active object of Java App Converter that is executed once
- * to convert old S60 MIDlets to OMJ Java applications
- *
- * This active object is activated from the process main() after the
- * active scheduler has been created.
- */
-class CSilentMIDletConvert : public CActive
-{
-    enum TConversionState
-    {
-        EFindOutDeviceDrives,
-        EFindOutDrivesToBeScannedNow,
-        EAppsInInstalledDirectories,
-        ECheckWhichAppsShouldBeConverted,
-        EExecuteConvertServer,
-        EMarkConversionDone,
-        EExit
-    };
-
-public:
-    static CSilentMIDletConvert* NewLC(RFs& aFs);
-
-    void CompleteRequest();
-    ~CSilentMIDletConvert();
-    void Start();
-
-protected:
-    // From CActive
-    void RunL();
-    void DoCancel();
-    TInt RunError(TInt aError);
-
-private:
-    void Exit();
-    CSilentMIDletConvert(RFs& aFs);
-    void ConstructL();
-    void GetInstallFilesL(RPointerArray<HBufC>& aDirs);
-    void CheckNeedToInstall();
-    RArray<TUid> ReadMidletUids(const TPtrC& aDir);
-    void RunJavaInstallerL();
-    void RemoveDataFile();
-    void FullCleanup();
-    void AddJadJarToInstallFilesL(
-        const TFileName &aSuitePathName,
-        const CDir *aSuiteDirEntryList);
-    void GetAllDeviceDrivesL();
-    TBool HasBeenInstalled(const TDesC& aFilePath);
-
-
-private:
-    RFs& iFs;
-    RPointerArray<HBufC> iDirs;
-    RPointerArray<HBufC> iInstallFiles;
-    TInt iFileIndex;
-    TConversionState iState;
-    ConvertServer* iConvertServer;
-
-    // contains the drive status info for each non-remote, non-substed drive
-    // on device
-    TUint iDriveStatuses[KMaxDrives];
-    TInt iNumberOfAppsToInstall;
-
-    // If the device has an internal drive with much free disk space,
-    // the converted java applications will be installed to that drive.
-    // This member variable contains the number of that drive, e.g. EDriveE
-    // or -1 if the device does not have such drive
-    TInt iDefaultTargetInstallationDrive;
-};
-
-#endif // SILENTMIDLETCONVERT_H
--- a/javatools/javaapppreconverter/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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: Exports the libraries needed to access the old Java 1.3
-*              midp2 data base to development environment so that
-*              Java 2.0 can be compiled in an environment without Java 1.3 sources.
-*
-*/
-
-#ifndef __JAVAAPPPRECONVERTER_EXPORTS_INF__
-#define __JAVAAPPPRECONVERTER_EXPORTS_INF__
-
-PRJ_EXPORTS
-../legacy/inc/MDatabaseV2.h                         /epoc32/include/j2me/midp2/dbv2/MDatabaseV2.h
-../legacy/lib/winscw/udeb/midp2dbv2.lib             /epoc32/release/winscw/udeb/midp2dbv2.lib
-../legacy/lib/winscw/urel/midp2dbv2.dll             /epoc32/release/winscw/urel/midp2dbv2.dll
-../legacy/lib/armv5/lib/midp2dbv2.lib               /epoc32/release/armv5/lib/midp2dbv2.lib
-../legacy/lib/armv5/lib/midp2dbv2.dso               /epoc32/release/armv5/lib/midp2dbv2.dso
-../legacy/lib/armv5/lib/midp2dbv2_000a0000_.lib     /epoc32/release/armv5/lib/midp2dbv2{000a0000}.lib
-../legacy/lib/armv5/lib/midp2dbv2_000a0000_.dso     /epoc32/release/armv5/lib/midp2dbv2{000a0000}.dso
-
-#endif //__JAVAAPPPRECONVERTER_EXPORTS_INF__
--- a/javatools/javaapppreconverter/build/javaapppreconverter.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:
-#
-#    This process needs AllFiles capability to be able to read
-#    the icon files of all midlets and to store midlet data
-#    to the data cage of the javaappbackconverter process
-
-
-TEMPLATE=app
-TARGET=javaapppreconverter
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.EPOCHEAPSIZE  = 0x4000 0x500000
-    TARGET.UID3          = 0x20022D8F
-    TARGET.CAPABILITY    = ReadDeviceData WriteDeviceData PowerMgmt AllFiles
-
-    SOURCES += ../src.s60/*.cpp
-
-    INCLUDEPATH += ../legacy/inc
-
-    LIBS += -lefsrv \
-            -lapgrfx \
-            -lapparc \
-            -lmidp2dbv2 \
-            -ledbms \
-            -lestor \
-            -lflogger
-}
-
-
-include(../../../build/omj.pri)
--- a/javatools/javaapppreconverter/legacy/inc/MDatabaseV2.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MDATABASEV2_H
-#define MDATABASEV2_H
-
-namespace MIDP
-{
-namespace DB
-{
-class MCustomAttribTable;
-} // end of namespace DB
-} // end of namespace MIDP
-
-namespace MIDP
-{
-namespace DBv2
-{
-class MAlarmTable;
-class MCHLocalActionNameTable;
-class MCHPropertyTable;
-class MComponentPropertyTable;
-class MConnectionTable;
-class MContentHandlerTable;
-class MMIDletPropertyTable;
-class MMIDletSuitePropertyTable;
-class MMIDletSuiteSecurityAttributeTable;
-class MMIDletSuiteTable;
-class MMIDletTable;
-class MUserSecurityPreferencesTable;
-
-class MDatabase
-{
-public:
-
-    virtual ~MDatabase() = 0;
-
-    virtual MAlarmTable* AlarmTableL(void)  = 0;
-
-    virtual MCHPropertyTable* CHAccessTableL(void)  = 0;
-
-    virtual MCHPropertyTable* CHActionsTableL(void)  = 0;
-
-    virtual MCHLocalActionNameTable* CHLocalActionNameTableL(void)  = 0;
-
-    virtual MCHPropertyTable* CHSuffixesTableL(void)    = 0;
-
-    virtual MCHPropertyTable* CHTypesTableL(void)   = 0;
-
-    virtual MComponentPropertyTable* ComponentPropertyTableL(void) = 0;
-
-    virtual MConnectionTable* DynamicConnectionTableL(void)    = 0;
-
-    virtual MConnectionTable* StaticConnectionTableL(void)    = 0;
-
-    virtual MContentHandlerTable* ContentHandlerTableL(void)    = 0;
-
-    virtual MMIDletPropertyTable* MIDletPropertyTableL(void)    = 0;
-
-    virtual MMIDletSuitePropertyTable* MIDletSuitePropertyTableL(void)  = 0;
-
-    virtual MMIDletSuiteTable* MIDletSuiteTableL(void)  = 0;
-
-    virtual MMIDletTable* MIDletTableL(void)    = 0;
-
-    virtual MMIDletSuiteSecurityAttributeTable* SecurityAttributeTableL(void)  = 0;
-
-    virtual MUserSecurityPreferencesTable* UserSecurityPreferencesTableL(void) = 0;
-
-    virtual DB::MCustomAttribTable* CustomAttribTableL(void) = 0;
-
-};
-
-inline MDatabase::~MDatabase()
-{
-}
-
-IMPORT_C class MDatabase* GetDatabaseL(TUint32 aVersion);
-
-} // end of namespace DBv2
-} // end of namespace MIDP
-
-#endif // MDATABASEV2_H
--- a/javatools/javaapppreconverter/legacy/inc/MMIDletTableIterator.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MMIDLETTABLEITERATOR_H
-#define MMIDLETTABLEITERATOR_H
-
-#include <e32std.h>
-
-namespace MIDP
-{
-namespace DBv2
-{
-
-class MMIDletTableIterator
-{
-public:
-
-    virtual ~MMIDletTableIterator() = 0;
-
-    virtual TBool HasNext(void) = 0;
-
-    virtual void NextL(
-        TUint32& aMSId,
-        TUint32& aOrdinal,
-        TUint32& aUID,
-        TPtrC&   aName,
-        TPtrC&   aClassName,
-        TPtrC&   aID) = 0;
-};
-
-inline MMIDletTableIterator::~MMIDletTableIterator()
-{
-}
-
-} // end of namespace DBv2
-} // end of namespace MIDP
-
-#endif // MMIDLETTABLEITERATOR_H
-
--- a/javatools/javaapppreconverter/legacy/inc/MMIDletTableV2.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MMIDLETTABLEV2_H
-#define MMIDLETTABLEV2_H
-
-#include <e32std.h>
-
-class RDbDatabase;
-
-namespace MIDP
-{
-namespace DBv2
-{
-class MMIDletTableIterator;
-
-class MMIDletTable
-{
-public:
-
-    virtual void CreateL(RDbDatabase&)  = 0;
-
-    virtual void OpenL(RDbDatabase&)    = 0;
-
-    virtual void Close(void)    = 0;
-
-    virtual void AddL(
-        TUint32      aMSId,
-        TUint32      aOrdinal,
-        TUint32      aUID,
-        const TDesC& aName,
-        const TDesC& aClassName,
-        const TDesC& aID) = 0;
-
-    // Update single midlet given by msid and name
-    virtual void UpdateL(
-        TUint32      aMSId,
-        const TDesC& aName,
-        TUint32      aOrdinal,
-        TUint32      aUID,
-        const TDesC& aClassName,
-        const TDesC& aID) = 0;
-
-    virtual void RemoveL(TUint32 aMSId) = 0;
-
-    virtual MMIDletTableIterator* IteratorLC(void)  = 0;
-};
-
-
-} // end of namespace DBv2
-} // end of namespace MIDP
-
-#endif // MMIDLETTABLEV2_H
-
Binary file javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2.dso has changed
Binary file javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2.lib has changed
Binary file javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2_000a0000_.dso has changed
Binary file javatools/javaapppreconverter/legacy/lib/armv5/lib/midp2dbv2_000a0000_.lib has changed
Binary file javatools/javaapppreconverter/legacy/lib/winscw/udeb/midp2dbv2.lib has changed
Binary file javatools/javaapppreconverter/legacy/lib/winscw/urel/midp2dbv2.dll has changed
--- a/javatools/javaapppreconverter/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process
-*
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-
-#include "javauids.h"
-#include "preconverter.h"
-#include "noarmlogs.h"
-
-_LIT_SECURE_ID(KAppInstUiSecureID, KAppInstUiUid);
-_LIT_SECURE_ID(KAppSisLauncherSecureID, KAppSisLauncherUid);
-
-/**
- * Create file server connection.
- * If data storage already exists, exit
- * Create active scheduler and start it.
- */
-static void ExecutePreConverterL()
-{
-    JELOG2(EJavaConverters);
-
-    // Do not check the starter in emulator environment to make
-    // testing possible.
-#ifndef __WINSCW__
-    // The only time that this application should be executed
-    // is when native installer starts it
-    if ((User::CreatorSecureId() != KAppInstUiSecureID) &&
-            (User::CreatorSecureId() != KAppSisLauncherSecureID))
-    {
-        ELOG(EJavaConverters,
-             "javaapppreconverter: ExecutePreConverterL: Mismatch in secure "
-             "ID, only AppInstUi or SisLauncher can launch this exe.");
-        ELOG1(EJavaConverters,
-              "javaapppreconverter: ExecutePreConverterL: Starter has SID %x ",
-              User::CreatorSecureId().iId);
-        User::Leave(KErrPermissionDenied);
-    }
-#endif
-
-    CActiveScheduler* as = new(ELeave) CActiveScheduler();
-
-    // Install active scheduler
-    CActiveScheduler::Install(as);
-    CleanupStack::PushL(as);
-
-    RFs fs;
-    User::LeaveIfError(fs.Connect());
-    CleanupClosePushL(fs);
-
-    // Setup and start the preconversion
-    CPreConverter* pre = CPreConverter::NewLC(fs);
-
-    LOG(EJavaConverters,
-        EInfo, "javaapppreconverter: ExecutePreConverterL: Call CPreConverter::Start()");
-
-    pre->Start();
-
-    // Start active scheduler
-    LOG(EJavaConverters,
-        EInfo, "javaapppreconverter: ExecutePreConverterL: Starting CActiveScheduler");
-    CActiveScheduler::Start();
-
-    LOG(EJavaConverters, EInfo, "javaapppreconverter: ExecutePreConverterL: Cleaning up");
-
-    CleanupStack::PopAndDestroy(pre);
-    CleanupStack::PopAndDestroy(&fs); // close connection to file server
-    CleanupStack::PopAndDestroy(as);
-}
-
-/**
- * Create cleanup stack and run the javaapppreconverter code inside TRAP
- * harness to log unexpected leaves.
- */
-TInt E32Main()
-{
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-    TInt error = KErrNone;
-    TRAP(error,ExecutePreConverterL());
-    if (error != KErrNone)
-    {
-        ELOG1(EJavaConverters, "javaapppreconverter: ExecutePreConverterL:Main error %d", error);
-    }
-
-    delete cleanupStack;
-    return error;
-}
--- a/javatools/javaapppreconverter/src.s60/midletlist.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,513 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process
-*
-*/
-
-#include "midletlist.h"
-
-
-
-CMidletInfo::CMidletInfo() :
-        iMidletUid(TUid::Null()), iMidletId(KMaxTUint32), iSuiteId(KMaxTUint32),
-        iMidletName(NULL), iGroupName(NULL), iDrive(EDriveE)
-{
-}
-
-CMidletInfo::CMidletInfo(CMidletInfo* aMidletInfo)
-{
-    iMidletUid = aMidletInfo->GetMidletUid();
-    iMidletId = aMidletInfo->GetMidletId();
-    iSuiteId = aMidletInfo->GetSuiteId();
-    iMidletName = aMidletInfo->GetMidletName().Alloc();
-    iGroupName = aMidletInfo->GetGroupName().Alloc();
-    iDrive = aMidletInfo->GetDrive();
-    iIconFileName = aMidletInfo->GetIconFileName();
-}
-
-
-CMidletInfo::~CMidletInfo()
-{
-    delete iMidletName;
-    delete iGroupName;
-}
-
-
-TUid CMidletInfo::GetMidletUid() const
-{
-    return iMidletUid;
-}
-
-TUint32 CMidletInfo::GetMidletId() const
-{
-    return iMidletId;
-}
-
-TUint32 CMidletInfo::GetSuiteId() const
-{
-    return iSuiteId;
-}
-
-const TDesC& CMidletInfo::GetMidletName()
-{
-    if (NULL == iMidletName)
-    {
-        return KNullDesC;
-    }
-    else
-    {
-        return *iMidletName;
-    }
-}
-
-const TDesC& CMidletInfo::GetGroupName()
-{
-    if (NULL == iGroupName)
-    {
-        return KNullDesC;
-    }
-    else
-    {
-        return *iGroupName;
-    }
-}
-
-TDriveNumber CMidletInfo::GetDrive()
-{
-    return iDrive;
-}
-
-const TFileName& CMidletInfo::GetIconFileName()
-{
-    return iIconFileName;
-}
-
-
-
-
-void CMidletInfo::SetMidletUid(const TUid aUid)
-{
-    iMidletUid = aUid;
-}
-
-void CMidletInfo::SetMidletId(const TUint32 aId)
-{
-    iMidletId = aId;
-}
-
-void CMidletInfo::SetSuiteId(const TUint32 aId)
-{
-    iSuiteId = aId;
-}
-
-void CMidletInfo::SetMidletName(const TDesC& aName)
-{
-    iMidletName = aName.Alloc();
-}
-
-void CMidletInfo::SetGroupName(const TDesC& aName)
-{
-    iGroupName = aName.Alloc();
-}
-
-void CMidletInfo::SetDrive(const TDriveNumber aDrive)
-{
-    iDrive = aDrive;
-}
-
-void CMidletInfo::SetIconFileName(HBufC16 *aIconFileName)
-{
-    iIconFileName = *aIconFileName;
-}
-
-void CMidletInfo::SetIconFileName(const TFileName &aIconFileName)
-{
-    iIconFileName = aIconFileName;
-}
-
-void CMidletInfo::ExternalizeL(RWriteStream& aStream) const
-{
-    aStream.WriteUint32L(iMidletUid.iUid);
-    aStream.WriteUint32L(iMidletId);
-    aStream.WriteUint32L(iSuiteId);
-
-    TInt32 nLen = 0;
-    if (iMidletName)
-    {
-        nLen = iMidletName->Length();
-    }
-    aStream.WriteInt32L(nLen);
-    if (nLen > 0)
-    {
-        aStream.WriteL(*iMidletName);
-    }
-
-    nLen = 0;
-    if (iGroupName)
-    {
-        nLen = iGroupName->Length();
-    }
-    aStream.WriteInt32L(nLen);
-    if (nLen > 0)
-    {
-        aStream.WriteL(*iGroupName);
-    }
-
-    aStream.WriteUint32L(iDrive);
-
-    nLen = iIconFileName.Length();
-    aStream.WriteInt32L(nLen);
-    if (nLen > 0)
-    {
-        aStream.WriteL(iIconFileName);
-    }
-
-}
-
-void CMidletInfo::InternalizeL(RReadStream& aStream)
-{
-    iMidletUid.iUid = aStream.ReadUint32L();
-    iMidletId = aStream.ReadUint32L();
-    iSuiteId = aStream.ReadUint32L();
-
-    TInt32 nLen = 0;
-    nLen = aStream.ReadInt32L();
-    if (nLen > 0)
-    {
-        if (!iMidletName)
-        {
-            iMidletName = HBufC16::NewL(nLen + 8);
-        }
-
-        TPtr16 tmpDes = iMidletName->Des();
-        aStream.ReadL(tmpDes, nLen);
-    }
-    else
-    {
-        if (!iMidletName)
-        {
-            // empty midlet name
-            iMidletName = HBufC16::NewL(8);
-        }
-    }
-
-    nLen = aStream.ReadInt32L();
-    if (nLen > 0)
-    {
-        if (!iGroupName)
-        {
-            iGroupName = HBufC16::NewL(nLen + 8);
-        }
-        TPtr16 tmpDes = iGroupName->Des();
-        aStream.ReadL(tmpDes, nLen);
-    }
-    else
-    {
-        if (!iGroupName)
-        {
-            // empty group name
-            iGroupName = HBufC16::NewL(8);
-        }
-    }
-
-    iDrive = (TDriveNumber)aStream.ReadUint32L();
-
-    nLen = aStream.ReadInt32L();
-    if (nLen > 0)
-    {
-        aStream.ReadL(iIconFileName, nLen);
-    }
-}
-
-void CMidletInfo::ToString8(TDes8& aDescription)
-{
-    aDescription.Append(_L8("Uid: "));
-    aDescription.AppendNumFixedWidth(iMidletUid.iUid, EHex, 8);
-    aDescription.Append(_L8("\nMidlet id: "));
-    aDescription.AppendNumFixedWidth(iMidletId, EDecimal, 8);
-    aDescription.Append(_L8("\nSuite id: "));
-    aDescription.AppendNumFixedWidth(iSuiteId, EDecimal, 8);
-    aDescription.Append(_L8("\nName: "));
-    // Midlet name len is not limited. Make sure that buffer does not overflow.
-    aDescription.Append((*iMidletName).Left(256));
-    aDescription.Append(_L8("\nGroup: "));
-    // Group name is max 32 characters
-    aDescription.Append(*iGroupName);
-    aDescription.Append(_L8("\nDrive: "));
-    aDescription.AppendNumFixedWidth(iDrive, EDecimal, 2);
-}
-
-/* ---------------------------------------------------------------------------- */
-
-
-
-
-CMidletList::CMidletList() :
-        iMidletArray(RPointerArray<CMidletInfo>()), iGetNextIndex(0),
-        iMidletArrayDestroyed(EFalse)
-{
-
-}
-
-CMidletList::~CMidletList()
-{
-    // Free the memory used by the RPointerArray.
-    // Do not destroy objects itself.
-    if (!iMidletArrayDestroyed)
-    {
-        iMidletArray.Close();
-    }
-}
-
-void CMidletList::ResetAndDestroy()
-{
-    iMidletArray.ResetAndDestroy();
-    iMidletArrayDestroyed = ETrue;
-}
-
-TInt CMidletList::Append(const CMidletInfo* aMidletInfo)
-{
-    if (NULL != Find(aMidletInfo->GetMidletUid()))
-    {
-        // midlet is already in list, do nothing
-        return KErrNone;
-    }
-
-    return iMidletArray.Append(aMidletInfo);
-}
-
-void CMidletList::Remove(const CMidletInfo* aMidletInfo)
-{
-    TInt nInd = iMidletArray.Find(aMidletInfo);
-    if (nInd < 0)
-    {
-        // The object is not in list, do nothing
-        return;
-    }
-    else if (nInd < iGetNextIndex)
-    {
-        // Removing one of the objects already returned by
-        // getNext(), the indexes of the objects not yet returned by
-        // getNext() are decreased by one. Must decrease iGetNextIndex too.
-        iGetNextIndex--;
-    }
-
-    iMidletArray.Remove(nInd);
-}
-
-TInt CMidletList::Count() const
-{
-    return iMidletArray.Count();
-}
-
-CMidletInfo* CMidletList::GetFirst()
-{
-    iGetNextIndex = 1;
-
-    if (iMidletArray.Count() > 0)
-    {
-        return iMidletArray[0];
-    }
-    else
-    {
-        return NULL;
-    }
-}
-
-CMidletInfo* CMidletList::GetNext()
-{
-    if (iMidletArray.Count() > iGetNextIndex)
-    {
-        iGetNextIndex++;
-        return iMidletArray[iGetNextIndex-1];
-    }
-    else
-    {
-        return NULL;
-    }
-}
-
-CMidletInfo *CMidletList::Find(const TUid aMidletUid)
-{
-    TInt nCount = iMidletArray.Count();
-
-    for (TInt nInd = 0; nInd < nCount; nInd++)
-    {
-        if (iMidletArray[nInd]->GetMidletUid() == aMidletUid)
-        {
-            return iMidletArray[nInd];
-        }
-    }
-
-    return NULL;
-}
-
-/**
- * Return the first midlet that has name specified by aName and
- * for which the midlet id and suite id have not yet been set.
- * If midlet id and suite id have been set for all midlets with
- * name specified by aName, returns the first midlet with name
- * specified by aName
- */
-CMidletInfo *CMidletList::Find(const TPtrC &aName)
-{
-    CMidletInfo *firstFound = NULL;
-    TInt nCount = iMidletArray.Count();
-
-    for (TInt nInd = 0; nInd < nCount; nInd++)
-    {
-        if (iMidletArray[nInd]->GetMidletName() == aName)
-        {
-            // If midlet id and suite id have already been set,
-            // find next midlet with the same name if any.
-            // If no such midlet, return this one.
-            if (NULL == firstFound)
-            {
-                firstFound = iMidletArray[nInd];
-            }
-            if ((iMidletArray[nInd]->GetSuiteId() == KMaxTUint32) &&
-                    (iMidletArray[nInd]->GetMidletId() == KMaxTUint32))
-            {
-                return iMidletArray[nInd];
-            }
-        }
-    }
-
-    return firstFound;
-}
-
-void CMidletList::SetIds(
-    const TUint32 aUid,
-    const TUint32 aMidletSuiteId,
-    const TUint32 aMidletId)
-{
-    TUid uid;
-    uid.iUid = aUid;
-    CMidletInfo *midlet = Find(uid);
-
-    if (NULL != midlet)
-    {
-        midlet->SetSuiteId(aMidletSuiteId);
-        midlet->SetMidletId(aMidletId);
-    }
-}
-
-void CMidletList::SetIds(
-    const TPtrC &aName,
-    const TUint32 aMidletSuiteId,
-    const TUint32 aMidletId)
-{
-    CMidletInfo *midlet = Find(aName);
-
-    if (NULL != midlet)
-    {
-        midlet->SetSuiteId(aMidletSuiteId);
-        midlet->SetMidletId(aMidletId);
-    }
-}
-
-void CMidletList::ExportListL(RFs& aFs, const TFileName &aDirectory)
-{
-    if (iMidletArrayDestroyed || (iMidletArray.Count() == 0))
-    {
-        // Trying to export empty list is an error
-        User::Leave(KErrArgument);
-    }
-
-    // Create directory if it does not exist
-    TInt err= aFs.MkDirAll(aDirectory);
-    if ((KErrNone != err) && (KErrAlreadyExists != err))
-    {
-        User::Leave(err);
-    }
-
-    // Copy all icon files to directory
-    CFileMan    *fm = CFileMan::NewL(aFs);
-    CleanupStack::PushL(fm);
-    CMidletInfo *midlet = GetFirst();
-    TFileName    newIconFileName;
-    TParse       nameParser;
-    TUint32      nMidlets = 0;
-
-    while (NULL != midlet)
-    {
-        User::LeaveIfError(fm->Copy(midlet->GetIconFileName(), aDirectory));
-
-        // set new icon file name
-        newIconFileName = aDirectory;
-        User::LeaveIfError(nameParser.Set(midlet->GetIconFileName(), NULL, NULL));
-        newIconFileName.Append(nameParser.NameAndExt());
-        midlet->SetIconFileName(newIconFileName);
-
-        nMidlets++;
-        midlet = GetNext();
-    }
-
-    // Store all midlet info to a file in the directory
-    TFileName dataFilename = aDirectory;
-    dataFilename.Append(KMidletExportDataFileName);
-
-    // Construct write stream so that new data file is created.
-    // If the file already exists, leave
-    RFileWriteStream writeStream;
-    User::LeaveIfError(writeStream.Create(aFs, dataFilename, EFileWrite));
-    CleanupClosePushL(writeStream);
-
-    // Write the number of midlets
-    writeStream.WriteUint32L(nMidlets);
-
-    // write the midlet info one by one
-    midlet = GetFirst();
-    while (NULL != midlet)
-    {
-        midlet->ExternalizeL(writeStream);
-        midlet = GetNext();
-    }
-
-    CleanupStack::PopAndDestroy();  // writeStream
-    CleanupStack::PopAndDestroy(fm);
-}
-
-void CMidletList::ImportListL(RFs& aFs, const TFileName &aDirectory)
-{
-    CMidletInfo *midlet = NULL;
-
-    // Form the data file name
-    TFileName dataFilename = aDirectory;
-    dataFilename.Append(KMidletExportDataFileName);
-
-    // Open existing data file. If the file does not exist, leave
-    RFileReadStream readStream;
-    User::LeaveIfError(readStream.Open(aFs, dataFilename, EFileRead));
-    CleanupClosePushL(readStream);
-
-    // Read the number of midlets
-    TUint32 nMidlets = readStream.ReadUint32L();
-
-    for (TInt nInd = 0; nInd < nMidlets; nInd++)
-    {
-        // Read info of one midlet
-        midlet = new(ELeave) CMidletInfo;
-        CleanupStack::PushL(midlet);
-        midlet->InternalizeL(readStream);
-
-        // Add it to list
-        Append(midlet);
-        CleanupStack::Pop(midlet);
-    }
-
-    // close readStream
-    CleanupStack::PopAndDestroy();
-}
-
--- a/javatools/javaapppreconverter/src.s60/midletlist.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process
-*
-*/
-
-
-#ifndef MIDLETLIST_H
-#define MIDLETLIST_H
-
-#include <e32base.h>
-#include <f32file.h>
-#include <s32strm.h>
-#include <s32file.h>
-
-_LIT(KMidletExportDataFileName, "omjconvertedapps.dat");
-
-
-/*!
-  @class CMidletInfo
-
-  @discussion Contains necessary information about one MIDlet.
-    Information enables reregistering the MIDlet to AppArc
-  */
-class CMidletInfo : public CBase
-{
-public:
-    /*!
-      @function CMidletInfo
-
-      @discussion Construct object. Construction cannot leave so can be done in one phase.
-      */
-    CMidletInfo();
-
-    /*!
-      @function CMidletInfo
-
-      @discussion Construct object and initialize all values to values read from
-        aMidletInfo
-        Construction cannot leave so can be done in one phase.
-      @param aMidletInfo the contents of this midlet info will be copied to
-        the new midlet info
-      */
-    CMidletInfo(CMidletInfo* aMidletInfo);
-
-    /*!
-      @function CMidletInfo
-
-      @discussion Destroy the object and release all memory objects
-      */
-    ~CMidletInfo();
-
-
-    /*!
-      @function GetMidletUid
-
-      @discussion get midlet uid
-      @result midlet uid
-      */
-    TUid GetMidletUid() const;
-
-    /*!
-      @function GetMidletId
-
-      @discussion get midlet id
-      @result midlet id
-      */
-    TUint32 GetMidletId() const;
-
-    /*!
-      @function GetSuiteId
-
-      @discussion get suite id
-      @result suite id
-      */
-    TUint32 GetSuiteId() const;
-
-    /*!
-      @function GetMidletName
-
-      @discussion get midlet name
-      @result Midlet name
-      */
-    const TDesC& GetMidletName();
-
-    /*!
-      @function GetGroupName
-
-      @discussion get midlet group name
-      @result group name
-      */
-    const TDesC& GetGroupName();
-
-    /*!
-      @function GetDrive
-
-      @discussion get drive
-      @result drive
-      */
-    TDriveNumber GetDrive();
-
-    /*!
-      @function GetIconFileName
-
-      @discussion get full path name of the icon file
-      @result path name to icon file
-      */
-    const TFileName& GetIconFileName();
-
-
-
-
-    /*!
-      @function SetMidletUid
-
-      @discussion set midlet uid
-      @param midlet uid
-      */
-    void SetMidletUid(const TUid aUid);
-
-    /*!
-      @function SetMidletId
-
-      @discussion set midlet id
-      @param midlet id
-      */
-    void SetMidletId(const TUint32 aId);
-
-    /*!
-      @function SetSuiteId
-
-      @discussion set suite id
-      @param suite id
-      */
-    void SetSuiteId(const TUint32 aId);
-
-    /*!
-      @function SetMidletName
-
-      @discussion Set midlet name
-      @param aName Midlet name
-      */
-    void SetMidletName(const TDesC& aName);
-
-    /*!
-      @function SetGroupName
-
-      @discussion Set group name
-      @param aName Group name
-      */
-    void SetGroupName(const TDesC& aName);
-
-    /*!
-      @function SetDrive
-
-      @discussion Set drive where midlet suite is
-      @param aDrive
-      */
-    void SetDrive(const TDriveNumber aDrive);
-
-    /*!
-      @function SetIconFileName
-
-      @discussion setIconFileName
-      @param aIconFileName
-      */
-    void SetIconFileName(HBufC16 *aIconFileName);
-
-    /*!
-      @function SetIconFileName
-
-      @discussion setIconFileName
-      @param aIconFileName
-      */
-    void SetIconFileName(const TFileName &aIconFileName);
-
-    /*!
-      @function ExternalizeL
-
-      @discussion ExternalizeL
-      @param aStream
-      */
-    void ExternalizeL(RWriteStream& aStream) const;
-
-    /*!
-      @function InternalizeL
-
-      @discussion InternalizeL
-      @param aStream
-      */
-    void InternalizeL(RReadStream& aStream);
-
-    /*!
-      @function ToString8
-
-      @discussion Store the printable representation to aDescription
-      @param aDescription the length of the descriptor should be at least 512
-      */
-    void ToString8(TDes8& aDescription);
-
-
-
-private:
-    /*! @var iMidletUid Midlet Uid */
-    TUid iMidletUid;
-
-    /*! @var iMidletId Midlet System AMS Id */
-    TUint32 iMidletId;
-
-    /*! @var iSuiteId Midlet suite System AMS Id */
-    TUint32 iSuiteId;
-
-    /*!
-      @var iMidletName
-      */
-    HBufC16 *iMidletName;
-
-    /*!
-      @var iGroupName
-      */
-    HBufC16 *iGroupName;
-
-    /*!
-      @var iDrive the drive where the Midlet files are located, usually E:
-      */
-    TDriveNumber iDrive;
-
-    /*!
-      @var iIconFileName full icon file path name
-      */
-    TFileName iIconFileName;
-
-};
-
-
-
-
-
-/* ---------------------------------------------------------------------------- */
-
-
-
-
-
-
-/*!
-  @class CMidletList
-
-  @discussion List of MIDlets. Contains all MIDlets to be converted.
-  */
-class CMidletList : public CBase
-{
-public:
-
-    /*!
-      @function CMidletList
-
-      @discussion Construct object. Construction cannot leave so can be done in one phase.
-      */
-    CMidletList();
-
-
-    /*!
-      @function ~CMidletList
-
-      @discussion Destroy the object but do not destroy objects in list
-      */
-    ~CMidletList();
-
-
-    /*!
-      @function ResetAndDestroy
-
-      @discussion Empty the list and destroy objects in it.
-      */
-    void ResetAndDestroy();
-
-    /*!
-      @function Append
-
-      @discussion append midlet info object to list. Note that each midlet can be
-        in list only once. Adding already existing midlet does nothing (return KErrNone).
-        Midlets are identified by midlet Uids.
-      @param aMidletInfo   pointer to suite info to be added
-      @result KErrNone, if the insertion is successful, otherwise one of the system wide error codes
-      */
-    TInt Append(const CMidletInfo* aMidletInfo);
-
-    /*!
-      @function Remove
-
-      @discussion remove midletInfo object from list if the object is there
-      Note that the function does not delete the object whose pointer is removed.
-      @param aSuiteInfo   pointer to midlet info to be removed.
-      */
-    void Remove(const CMidletInfo* aMidletInfo);
-
-    /*!
-      @function count
-
-      @discussion count return the number of midlets in the list
-      @result the number of midlets in the list
-      */
-    TInt Count() const;
-
-    /*!
-      @function getFirst
-
-      @discussion get the first midlet info in list
-      @result pointer to the first object or NULL if list is empty
-      */
-    CMidletInfo* GetFirst();
-
-    /*!
-      @function GetNext
-
-      @discussion get the next midlet info in list  (works also when remove is called)
-      @result pointer to the next object in list or NULL if no more objects
-      */
-    CMidletInfo* GetNext();
-
-    /*!
-      @function Find
-
-      @discussion find midletInfo object in list based on midlet Uid
-      @param aMidletUid  the Uid of the midlet to be returned
-      @result Pointer to the midlet with the specififed Uid or NULL if none was found
-      */
-    CMidletInfo* Find(const TUid aMidletUid);
-
-    /*!
-      @function Find
-
-      @discussion find midletInfo object in list based on midlet name
-      @param aName  the name of the midlet to be returned
-      @result Pointer to the midlet with the specififed Uid or NULL if none was found
-      */
-    CMidletInfo* Find(const TPtrC &aName);
-
-    /*!
-      @function SetIds
-
-      @discussion If list contains midlet specified with aUid, sets the midlet suite id of
-        midlet to aMidletSuiteId and midlet id to aMidletId.
-        If the list does not contain midlet with specified Uid, does nothing.
-      @param aUid  the Uid (in TUint32 form) of the midlet
-      @param aMidletSuiteId   the System AMS id of midlet suite
-      @param aMidletId the System AMS id of the midlet
-        (== the ordinal of the midlet inside midlet suite)
-      */
-    void SetIds(const TUint32 aUid, const TUint32 aMidletSuiteId, const TUint32 aMidletId);
-
-    /*!
-      @function SetIds
-
-      @discussion If list contains midlet specified with aName, sets the midlet suite id of
-        midlet to aMidletSuiteId and midlet id to aMidletId.
-        If the list does not contain midlet with specified name, does nothing.
-      @param aName  the name of the midlet
-      @param aMidletSuiteId   the System AMS id of midlet suite
-      @param aMidletId the System AMS id of the midlet
-        (== the ordinal of the midlet inside midlet suite)
-      */
-    void SetIds(const TPtrC &aName, const TUint32 aMidletSuiteId, const TUint32 aMidletId);
-
-    /*!
-      @function ExportList
-
-      @discussion Stores all information in the list to the directory given in aDirectory.
-        First copies all icon files specified in the midlet entries to aDirectory and
-        changes each midlet entry so that midlet entry .iIconFileName points to the copy
-        of the icon file in aDirectory.
-        Then stores all midlet entries to aDirectory (serializes information to a file).
-        In case of fatal error leaves with standard Symbian error code.
-      @param aFs file server handle
-      @param aDirectory full path name to an empty directory
-      */
-    void ExportListL(RFs& aFs, const TFileName &aDirectory);
-
-
-    /*!
-      @function ImportList
-
-      @discussion Read all information in the list from the directory given in aDirectory.
-        The list should be empty when this function is called.
-        Reads all midlet entries from a data file in aDirectory.
-        The information to be read has been created earlier by calling ExportList().
-        In case of fatal error leaves with standard Symbian error code.
-      @param aFs file server handle
-      @param aDirectory full path name to a directory filled by calling ExportList().
-      */
-    void ImportListL(RFs& aFs, const TFileName &aDirectory);
-
-
-
-
-private:
-    /*! @var iMidletArray dynamical array of midlets */
-    RPointerArray<CMidletInfo> iMidletArray;
-
-    /*! @var iGetNextIndex index of the next object to be returned by getNext() */
-    TInt iGetNextIndex;
-
-    /*! @var iMidletArrayDestroyed ETrue after resetAndDestroy has been called */
-    TBool iMidletArrayDestroyed;
-
-};
-
-
-#endif // MIDLETLIST_H
-
--- a/javatools/javaapppreconverter/src.s60/noarmlogs.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process
-*
-*/
-
-
-#ifndef NOARMLOGS_H
-#define NOARMLOGS_H
-
-// Logging makes the process dependent on OMJ javautils.dll and javaenv.dll.
-// However they are no available in device when converter processes are executed
-// during OMJ installation before OMJ binaries have been copied to device
-// nor when converter processes are executed  during OMJ uninstallation after
-// OMJ binaries have been removed from device.
-// If included in ARMV5 compilation this header file redefines all OMJ
-// logging macros so that they use directly RFileLogger so that they can be used without
-// javautils.dll and javaenv.dll. Otherwise includes normal logging header file because
-// in emulator javautils.dll and javaenv.dll are available always.
-
-#ifndef __WINS__
-
-#undef JELOG
-#undef JELOG2
-#undef JELOG3
-#undef JELOG4
-
-#undef LOG
-#undef LOG1
-#undef LOG2
-#undef LOG3
-#undef LOG4
-
-#undef WLOG
-#undef WLOG1
-#undef WLOG2
-#undef WLOG3
-#undef WLOG4
-
-#undef ELOG
-#undef ELOG1
-#undef ELOG2
-#undef ELOG3
-#undef ELOG4
-
-#undef LOG1WSTR
-
-#include <flogger.h>
-_LIT(KJavaLogDir, "java\\full");
-_LIT(KJavaLogFile, "JavaConverters.log");
-
-#define JELOG(component, str)
-#define JELOG2(component)
-#define JELOG3(component, level, str)
-#define JELOG4(component, level)
-
-#define LOG(component, level, str)  { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); }
-#define LOG1(component, level, str, a)  { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); }
-#define LOG2(component, level, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); }
-#define LOG3(component, level, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); }
-#define LOG4(component, level, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); }
-
-#define WLOG(component, str)  { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); }
-#define WLOG1(component, str, a) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); }
-#define WLOG2(component, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); }
-#define WLOG3(component, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); }
-#define WLOG4(component, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); }
-
-#define ELOG(component, str) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); }
-#define ELOG1(component, str, a) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); }
-#define ELOG2(component, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); }
-#define ELOG3(component, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); }
-#define ELOG4(component, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); }
-
-#define LOG1WSTR(component, level, str, wstr) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); TBuf16<KLogBufferSize> w((const TUint16 *)wstr); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, w); }
-
-#else
-
-// normal logging
-#include "logger.h"
-
-#endif  // __WINS__
-
-#endif // NOARMLOGS_H
--- a/javatools/javaapppreconverter/src.s60/preconverter.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,931 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process.
-*              This process needs AllFiles capability to be able to read
-*              the icon files of all midlets and to store midlet data
-*              to the data cage of the javaappbackconverter process.
-*
-*/
-
-
-#include <e32base.h>
-#include <pathinfo.h>
-#include <driveinfo.h>
-#include <apgcli.h>
-#include <d32dbms.h>
-
-#include <mdatabasev2.h>
-#include <mmidlettablev2.h>
-#include <mmidlettableiterator.h>
-
-#include "javacommonutils.h"
-#include "javauids.h"
-#include "preconverter.h"
-#include "noarmlogs.h"
-
-const TInt    KDelayWhenWaitingAppArc = 500000;
-const TUint32 KDBVersion = 0x0200;
-
-// Name for the system AMS DB policy
-_LIT(KUidSSystemAMSDbPolicy, "secure[102045FE]");
-
-// Constant needed to access SystemAMS static database
-_LIT(KStaticDbFileName, "C:\\private\\100012A5\\DBS_102045FE_MIDP2SystemAMSStaticV2");
-
-// This is in the private data cage of javaappbackconverter.
-// javaappbackconverter will destroy the files created to this directory
-// after it has done the back conversion.
-_LIT(KMidletExportDirectory, "C:\\private\\20022D90\\data\\");
-
-// This is in the private data cage of usersettingsconfigurator.
-_LIT(KMidletExportDirectoryForUserSettings, "C:\\private\\20022E7A\\data\\");
-
-// This is in the private data cage of javappconverter
-// javaappconverter will destroy the 'uids' file created to this directory
-// after it has made the conversion.
-_LIT(KUidsExportDirectory, "C:\\private\\2002121C\\data\\");
-_LIT(KUidsExportDataFileName, "uids");
-
-// These literals are used for logging midlet information found from db.
-_LIT8(KMLName, "\nname: ");
-_LIT8(KMLClassName, "\nclassName: ");
-_LIT8(KMLIdString, "\nidString: ");
-
-
-/**
- * To create new instance of this class.
- *
- * @param aFs - A reference to the file server.
- * @return Reference to the object of this class.
- * @exception If construction fails.
- */
-CPreConverter* CPreConverter::NewLC(RFs& aFs)
-{
-    CPreConverter* self = new(ELeave) CPreConverter(aFs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-/**
- * To do 1st phase construction for this object.
- *
- * Adds this active object to the scheduler.
- */
-CPreConverter::CPreConverter(RFs& aFs) :
-        CActive(EPriorityStandard), iFs(aFs)
-{
-    CActiveScheduler::Add(this);
-}
-
-/**
- * To do 2nd phase construction for this object.
- *
- * @exception If the method is not able to allocate necessary buffers.
- */
-void CPreConverter::ConstructL()
-{
-    JELOG2(EJavaConverters);
-
-    iMidlets = new(ELeave) CMidletList();
-    iState = EConversionDataAlreadyGathered;
-}
-
-/**
- * Deletes this object.
- * All allocated resources are released.
- */
-CPreConverter::~CPreConverter()
-{
-    JELOG2(EJavaConverters);
-    Cancel();
-    if (iMidlets)
-    {
-        iMidlets->ResetAndDestroy();
-        delete iMidlets;
-        iMidlets = NULL;
-    }
-}
-
-/**
- * To start preconversion
- */
-void CPreConverter::Start()
-{
-    JELOG2(EJavaConverters);
-    iState = EConversionDataAlreadyGathered;
-    CompleteRequest();
-}
-
-/**
- * To stop whole preconversion.
- * Stops the active scheduler.
- */
-void CPreConverter::Exit()
-{
-    Deque();
-    CActiveScheduler::Stop();
-}
-
-/**
- * To complete the request for this object.
- *
- * @Postconditions The following conditions are true immediately after
- * returning from this method.
- * - iStatus == KErrNone
- * - IsActive() == ETrue
- */
-void CPreConverter::CompleteRequest()
-{
-    JELOG2(EJavaConverters);
-
-    TRequestStatus *status = &iStatus;
-    User::RequestComplete(status, KErrNone);
-    if (!IsActive())
-    {
-        SetActive();
-    }
-}
-
-/**
- * To run this active object.
- *
- * The state logic is:
- *
- * EConversionDataAlreadyGathered:
- *    if midlet export data file already exists,
- *       active object exits from this state
- *
- * EFindOutInstalledMidlets:
- *    iterate through all apps in AppArc,
- *      if java app,
- *        store all info available from AppArc to iMidlets
- *
- * EFillDataFromSystemAmsDb:
- *    add info from SystemAMS DB to iMidlets
- *
- * EStoreData:
- *    store data in iMidlets to a file
- *
- * EStopMidlets:
- *    stop all running midlets
- *
- * EUnregisterMidlets
- *    unregister all midlets in iMidlets from AppArc
- *
- * EExit:
- *    free resources and exit
- *
- */
-void CPreConverter::RunL()
-{
-    JELOG2(EJavaConverters);
-
-    switch (iState)
-    {
-
-    case EConversionDataAlreadyGathered:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CPreConverter::RunL EConversionDataAlreadyGathered");
-
-        TFileName exportDataFile(KMidletExportDirectory);
-        exportDataFile.Append(KMidletExportDataFileName);
-        TUint attributes;
-        TInt  err = iFs.Att(exportDataFile, attributes);
-        if (KErrNone == err)
-        {
-            LOG(EJavaConverters, EInfo,
-                "CPreConverter::RunL EConversionDataAlreadyGathered "
-                "data file already exists. Can exit.");
-            iState = EExit;
-        }
-        else
-        {
-            if ((KErrNotFound == err) || (KErrPathNotFound == err))
-            {
-                // We come here only when OMJ is not currently installed
-                // to the device. However, the device may still have
-                // old OMJ database files. Clean them now to make sure
-                // that e.g. old db schemas do not cause problems.
-                LOG(EJavaConverters, EInfo,
-                    "CPreConverter::RunL EConversionDataAlreadyGathered "
-                    "Trying to destroy OMJ database files");
-
-                _LIT(KJavaOtaStorageDbPath, "C:\\private\\10281E17\\[200211dc]JavaOtaStorage.db");
-                err = iFs.Delete(KJavaOtaStorageDbPath);
-                LOG1(EJavaConverters, EInfo,
-                     "CPreConverter::RunL EConversionDataAlreadyGathered "
-                     "Destroy C:\\private\\10281E17\\[200211dc]JavaOtaStorage.db, err %d", err);
-
-                _LIT(KJavaOtaStorageJournalPath, "C:\\private\\10281E17\\[200211dc]JavaOtaStorage.db-journal");
-                err = iFs.Delete(KJavaOtaStorageJournalPath);
-                LOG1(EJavaConverters, EInfo,
-                     "CPreConverter::RunL EConversionDataAlreadyGathered "
-                     "Destroy C:\\private\\10281E17\\[200211dc]JavaOtaStorage.db-journal, err %d", err);
-
-                _LIT(KJavaStorageDbPath, "C:\\private\\10281E17\\[200211dc]JavaStorage.db");
-                err = iFs.Delete(KJavaStorageDbPath);
-                LOG1(EJavaConverters, EInfo,
-                     "CPreConverter::RunL EConversionDataAlreadyGathered "
-                     "Destroy C:\\private\\10281E17\\[200211dc]JavaStorage.db, err %d", err);
-
-                _LIT(KJavaStorageJournalPath, "C:\\private\\10281E17\\[200211dc]JavaStorage.db-journal");
-                err = iFs.Delete(KJavaStorageJournalPath);
-                LOG1(EJavaConverters, EInfo,
-                     "CPreConverter::RunL EConversionDataAlreadyGathered "
-                     "Destroy C:\\private\\10281E17\\[200211dc]JavaStorage.db-journal, err %d", err);
-
-                LOG(EJavaConverters, EInfo,
-                    "CPreConverter::RunL EConversionDataAlreadyGathered "
-                    "Data file does not exist yet. OK");
-            }
-            else
-            {
-                LOG1(EJavaConverters, EInfo,
-                     "CPreConverter::RunL EConversionDataAlreadyGathered "
-                     "Checking data file attributes caused error %d", err);
-            }
-            iState = EFindOutInstalledMidlets;
-        }
-        CompleteRequest();
-    }
-    break;
-
-    case EFindOutInstalledMidlets:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CPreConverter::RunL EFindOutInstalledMidlets");
-
-        // Read all installed midlets from AppArc,
-        // store info to iMidlets
-        ReadMidletsFromAppArcL();
-
-        iState = EFillDataFromSystemAmsDb;
-        CompleteRequest();
-    }
-    break;
-
-    case EFillDataFromSystemAmsDb:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CPreConverter::RunL EFillDataFromSystemAmsDb");
-
-        // Some of the necessary information is in SystemAMS DB,
-        // read it now for each midlet in iMidlets
-        AddDataFromSystemAmsDbL();
-
-        // Especially in R&D environment it is possible to that
-        // AppArc contains some midlets that have not really
-        // been installed to old S60 java environment.
-        // SystemAMS DB does not contain any information of
-        // these midlets. They must be removed now.
-        RemoveInvalidMidlets();
-
-        iState = EStoreData;
-        CompleteRequest();
-    }
-    break;
-
-    case EStoreData:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CPreConverter::RunL EStoreData");
-
-        if (iMidlets->Count() == 0)
-        {
-            // No midlets to convert
-            WLOG(EJavaConverters, "CPreConverter::RunL EStoreData No midlets to convert.");
-        }
-        else
-        {
-            // Store the data directly to the data cage of
-            // javaappbackconverter.exe
-            TFileName exportDirectory(KMidletExportDirectory);
-            iMidlets->ExportListL(iFs, exportDirectory);
-
-            // Store the data also to the data cage of
-            // usersettingsconfigurator.exe
-            TFileName exportDirectoryForUserSettings(KMidletExportDirectoryForUserSettings);
-            iMidlets->ExportListL(iFs, exportDirectoryForUserSettings);
-
-            // Store the uids of the midlets to be converted
-            // to the data cage of javaappconverter.exe
-            StoreUidsL();
-        }
-
-        iState = EStopMidlets;
-        CompleteRequest();
-    }
-    break;
-
-    case EStopMidlets:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CPreConverter::RunL EStopMidlets");
-
-        CMidletInfo* pMidlet = iMidlets->GetFirst();
-
-        TFullName foundName;
-        TFullName searchName;
-
-        while (pMidlet != NULL)
-        {
-            searchName = pMidlet->GetMidletName();
-            _LIT(KMidletProcessIdString, "[102033e6]*");
-            searchName.Append(KMidletProcessIdString);
-
-            LOG1WSTR(EJavaConverters, EInfo, "Searching midlet process named %s",
-                     (wchar_t *)(searchName.PtrZ()));
-
-            TFindProcess find(searchName);
-            TInt err = find.Next(foundName);
-            if (KErrNone == err)
-            {
-                LOG1WSTR(EJavaConverters, EInfo, "The midlet process %s was found",
-                         (wchar_t *)(foundName.PtrZ()));
-                RProcess process;
-                err = process.Open(find);
-                if (KErrNone == err)
-                {
-                    LOG(EJavaConverters, EInfo, "Killing the midlet process");
-                    process.Kill(KErrNone);
-                    process.Close();
-                }
-            }
-
-            pMidlet = iMidlets->GetNext();
-        }
-
-        iState = EUnregisterMidlets;
-        CompleteRequest();
-    }
-    break;
-
-    case EUnregisterMidlets:
-    {
-        LOG(EJavaConverters, EInfo, "CPreConverter::RunL EUnregisterMidlets");
-
-        // Unregister all midlets in iMidlets from AppArc
-        UnregisterOldJavaAppsL();
-
-        iState = EExit;
-        CompleteRequest();
-    }
-    break;
-
-    case EExit:
-    {
-        LOG(EJavaConverters, EInfo, "CPreConverter::RunL EExit");
-
-        FullCleanup();
-
-        // The whole javaapppreconverter process is stopped.
-        Exit();
-    }
-    break;
-
-    }
-}
-
-/**
- * To handle leave from RunL.
- * This method exits this active object using normal state machine
- * After calling this method this active object will exit.
- *
- * @param aError - A reason of error.
- * @return KErrNone.
- */
-TInt CPreConverter::RunError(TInt aError)
-{
-    ELOG2(EJavaConverters,
-          "CPreConverter::RunError(%d) from state %d", aError, iState);
-
-    Cancel();
-
-    iState = EExit;
-    CompleteRequest();
-
-    return KErrNone;
-}
-
-/**
- * To do cancelling for this object.
- *
- */
-void CPreConverter::DoCancel()
-{
-    ELOG1(EJavaConverters,
-          "CPreConverter::DoCancel from state %d", iState);
-
-}
-
-/**
- * To cleanup member variables.
- *
- */
-void CPreConverter::FullCleanup()
-{
-    JELOG2(EJavaPreinstaller);
-
-    if (iMidlets)
-    {
-        iMidlets->ResetAndDestroy();
-        delete iMidlets;
-        iMidlets = NULL;
-    }
-}
-
-/**
- * Read all midlets from AppArc.
- * Store midlet Uid, Midlet name, installation drive,
- * group name and icon file path name to iMidlets.
- */
-void CPreConverter::ReadMidletsFromAppArcL()
-{
-    JELOG2(EJavaConverters);
-
-    TInt   retryCounter = 10;
-    TUid   appTypeUid;
-    HBufC *pIconFilePathName = NULL;
-    TApaAppInfo   info;
-    RApaLsSession apaSession;
-    TApaAppCapabilityBuf cbuf;
-    TApaAppCapability    capability;
-
-    TBuf8<512> midletDesc;
-
-
-    TInt err = apaSession.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CPreConverter::ReadMidletsFromAppArcL RApaLsSession Connect error %d", err);
-        User::Leave(err);
-    }
-    CleanupClosePushL(apaSession);
-
-    // Get the process of getting the list of all non native applications
-    // (mostly java applications)
-    err =
-        apaSession.GetFilteredApps(
-            TApaAppCapability::ENonNative, TApaAppCapability::ENonNative);
-
-    do
-    {
-        err = apaSession.GetNextApp(info);
-        if (RApaLsSession::EAppListInvalid == err)
-        {
-            // Application list has not yet been populated,
-            // try again after a short delay
-            retryCounter--;
-            if (retryCounter > 0)
-            {
-                User::After(KDelayWhenWaitingAppArc);
-                continue;
-            }
-            else
-            {
-                ELOG(EJavaConverters,
-                     "CPreConverter::ReadMidletsFromAppArcL RApaLsSession "
-                     "GetNext returned EAppListInvalid for 10 times, error");
-                User::Leave(err);
-            }
-        }
-        else if (KErrNone == err)
-        {
-            // Info contains valid app info. Now check whether it is java app
-            err = apaSession.GetAppType(appTypeUid, info.iUid);
-            if (KErrNone != err)
-            {
-                ELOG1(EJavaConverters,
-                      "CPreConverter::ReadMidletsFromAppArcL RApaLsSession "
-                      "GetAppType returned error %d", err);
-                User::Leave(err);
-            }
-            if (appTypeUid.iUid == KMidletApplicationTypeUid)
-            {
-                // This is java application. Store info to list.
-                CMidletInfo *midletInfo = new(ELeave) CMidletInfo();
-                midletInfo->SetMidletUid(info.iUid);
-                midletInfo->SetMidletName(info.iCaption);
-                midletInfo->SetDrive(ExtractDriveNumberFromPathL(info.iFullName));
-
-                // Get group name
-                err = apaSession.GetAppCapability(cbuf, info.iUid);
-                if (KErrNone != err)
-                {
-                    ELOG1(EJavaConverters,
-                          "CPreConverter::ReadMidletsFromAppArcL RApaLsSession "
-                          "GetAppCapability returned error %d", err);
-                    User::Leave(err);
-                }
-                capability = cbuf();
-                midletInfo->SetGroupName(capability.iGroupName);
-
-                // Get icon file path name
-                err = apaSession.GetAppIcon(info.iUid, pIconFilePathName);
-                if ((KErrNone != err) || (NULL == pIconFilePathName))
-                {
-                    ELOG1(EJavaConverters,
-                          "CPreConverter::ReadMidletsFromAppArcL RApaLsSession "
-                          "GetAppIcon returned error %d", err);
-                    User::Leave(err);
-                }
-                midletInfo->SetIconFileName(pIconFilePathName);
-                delete pIconFilePathName;
-                pIconFilePathName = NULL;
-
-                err = iMidlets->Append(midletInfo);
-                if (KErrNone != err)
-                {
-                    ELOG1(EJavaConverters,
-                          "CPreConverter::ReadMidletsFromAppArcL CMidletList "
-                          "Append returned error %d", err);
-                    User::Leave(err);
-                }
-                else
-                {
-                    midletInfo->ToString8(midletDesc);
-                    LOG(EJavaConverters, EInfo,
-                        "CPreConverter::ReadMidletsFromAppArcL Added this midlet:");
-                    midletDesc.ZeroTerminate();
-                    LOG(EJavaPreinstaller, EInfo, (const char *)(midletDesc.Ptr()));
-                    midletDesc.Zero();
-                }
-            }
-        }
-
-    }
-    while (KErrNone == err);
-
-    if (RApaLsSession::ENoMoreAppsInList != err)
-    {
-        ELOG1(EJavaConverters,
-              "CPreConverter::ReadMidletsFromAppArcL RApaLsSession GetNext returned error %d", err);
-        User::Leave(err);
-    }
-
-    CleanupStack::PopAndDestroy(); // apaSession
-}
-
-/**
- * Parse the drive letter from path and return it as TDriveNumber.
- *
- * @param aPathName full path name. Contains always the drive.
- * @return the drive number
- * @exception if the drive cannot parsed from path
- */
-TDriveNumber CPreConverter::ExtractDriveNumberFromPathL(TFileName &aPathName)
-{
-    TDriveNumber drive = EDriveE;
-    TUint driveLetter = aPathName[0];
-
-    if ((driveLetter >= 'a') && (driveLetter <= 'z'))
-    {
-        drive = (TDriveNumber)(driveLetter - 'a');
-    }
-    else if ((driveLetter >= 'A') && (driveLetter <= 'Z'))
-    {
-        drive = (TDriveNumber)(driveLetter - 'A');
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "CPreConverter::ExtractDriveNumberFromPathL path starts "
-              "with illegal char, value %d", drive);
-        User::Leave(KErrArgument);
-    }
-
-    return drive;
-}
-
-/**
- * Read the midlet id and suite id for each midlet in iMidlets from
- * SystemAMS DB and store them to iMidlets
- */
-void CPreConverter::AddDataFromSystemAmsDbL()
-{
-    MIDP::DBv2::MDatabase* database = NULL;
-    MIDP::DBv2::MMIDletTable* midletTable = NULL;
-    RDbNamedDatabase dbNamed;
-    RDbs dbs;
-
-    // Connect to db
-    TInt err = dbs.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot connect to RDbs, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-    // Open db
-    err = dbs.ShareAuto();
-    if (KErrNone != err)
-    {
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot share RDbs session, "
-              "error %d", err);
-        User::Leave(err);
-    }
-    err = dbNamed.Open(
-              iFs, KStaticDbFileName(), KUidSSystemAMSDbPolicy, RDbNamedDatabase::EReadOnly);
-    if (KErrNone != err)
-    {
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot open named db, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-    // Get db
-    TRAP(err, database = MIDP::DBv2::GetDatabaseL(KDBVersion));
-    if (KErrNone != err)
-    {
-        dbNamed.Close();
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot get database, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-    // Get midlet table
-    TRAP(err, midletTable = database->MIDletTableL());
-    if (KErrNone != err)
-    {
-        delete database;
-        dbNamed.Close();
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot get midlet table from db, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-    // Open midlet table
-    TRAP(err, midletTable->OpenL(dbNamed));
-    if (KErrNone != err)
-    {
-        delete database;
-        dbNamed.Close();
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot open midlet table in db, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-    // get iterator to access the data in midlet table
-    MIDP::DBv2::MMIDletTableIterator* tableIterator = NULL;
-    // No items must be left in cleanup stack when exiting TRAP macro
-    TRAP(err,
-         tableIterator = midletTable->IteratorLC();
-         if (KErrNone == err) CleanupStack::Pop();
-        );
-    if (KErrNone != err)
-    {
-        midletTable->Close();
-        delete database;
-        dbNamed.Close();
-        dbs.Close();
-        ELOG1(EJavaConverters,
-              "CPreConverter::AddDataFromSystemAmsDbL Cannot get iterator for midlet table in db, "
-              "error %d", err);
-        User::Leave(err);
-    }
-
-
-    TBuf8<512> midletDesc;
-    TInt32  count = 0;
-    TUint32 msId;
-    TUint32 id;
-    TUint32 uid;
-    TPtrC   name;
-    TPtrC   className;
-    TPtrC   idString;
-    while (tableIterator->HasNext())
-    {
-        TRAP(err, tableIterator->NextL(msId, id, uid, name, className, idString));
-        if (KErrNone != err)
-        {
-            delete tableIterator;
-            midletTable->Close();
-            delete database;
-            dbNamed.Close();
-            dbs.Close();
-            ELOG1(EJavaConverters,
-                  "CPreConverter::AddDataFromSystemAmsDbL Midlet table iterator NextL failed, "
-                  "error %d", err);
-            User::Leave(err);
-        }
-        LOG3(EJavaConverters, EInfo,
-             "CPreConverter::AddDataFromSystemAmsDbL Found midlet uid %x, suite id %d, midlet id %d",
-             uid, msId, id);
-
-        midletDesc.Append(KMLName);
-        midletDesc.Append(name);
-        midletDesc.Append(KMLClassName);
-        midletDesc.Append(className);
-        midletDesc.Append(KMLIdString);
-        midletDesc.Append(idString);
-        LOG(EJavaPreinstaller, EInfo, (const char *)midletDesc.PtrZ());
-        midletDesc.Zero();
-
-        iMidlets->SetIds(name, msId, id);
-        count++;
-    }
-
-    LOG1(EJavaConverters, EInfo,
-         "CPreConverter::AddDataFromSystemAmsDbL midlet table had %d midlets.", count);
-
-    // close and free everything
-    delete tableIterator;
-    midletTable->Close();
-    delete database;
-    dbNamed.Close();
-    dbs.Close();
-}
-
-/**
- * Check all midlets in iMidlets and remove those midlets that do not
- * have midlet id and suite id.
- */
-void CPreConverter::RemoveInvalidMidlets()
-{
-    // If midlet id or suite id is KMaxTUint32, it has not been set ->
-    // remove the midlet
-
-    CMidletInfo *midlet = iMidlets->GetFirst();
-    TBuf8<512> midletDesc;
-
-    while (NULL != midlet)
-    {
-        if ((midlet->GetMidletId() == KMaxTUint32) ||
-                (midlet->GetSuiteId() == KMaxTUint32))
-        {
-            midlet->ToString8(midletDesc);
-            WLOG(EJavaConverters,
-                 "CPreConverter::RemoveInvalidMidlets Not going to convert this midlet:");
-            midletDesc.ZeroTerminate();
-            WLOG(EJavaPreinstaller, (const char *)(midletDesc.Ptr()));
-            midletDesc.Zero();
-            iMidlets->Remove(midlet);
-        }
-
-        midlet = iMidlets->GetNext();
-    }
-}
-
-/**
- * Store the uids of the midlets to be converted
- * to file 'uids' in the data cage of javaappconverter.exe
- */
-void CPreConverter::StoreUidsL()
-{
-    TFileName exportUidsPath(KUidsExportDirectory);
-
-    // Create directory if it does not exist
-    TInt err= iFs.MkDirAll(exportUidsPath);
-    if ((KErrNone != err) && (KErrAlreadyExists != err))
-    {
-        User::Leave(err);
-    }
-
-    // Store all uids to file 'uids' in the directory
-    exportUidsPath.Append(KUidsExportDataFileName);
-
-    // Construct write stream so that possibly existing old data file is replaced.
-    RFileWriteStream writeStream;
-    User::LeaveIfError(writeStream.Replace(iFs, exportUidsPath, EFileWrite));
-    CleanupClosePushL(writeStream);
-
-    // Write the number of midlets
-    TUint32 nMidlets = iMidlets->Count();
-    writeStream.WriteUint32L(nMidlets);
-
-    // Write Uids of the midlets one by one
-    CMidletInfo *midlet = iMidlets->GetFirst();
-
-    while (NULL != midlet)
-    {
-        writeStream.WriteUint32L(midlet->GetMidletUid().iUid);
-        midlet = iMidlets->GetNext();
-    }
-
-    // Closes writeStream
-    CleanupStack::PopAndDestroy();
-}
-
-/**
- * Unregisters the applications to be converted from AppArc
- * so that Java Installer can make conversion installation
- * using the same Uids as the applications now have.
- *
- * Leaves with error code if AppArc cannot be connected or if
- * unregistrations cannot be committed.
- */
-void CPreConverter::UnregisterOldJavaAppsL()
-{
-    // connect to AppArc
-    RApaLsSession apaSession;
-
-    TInt err = apaSession.Connect();
-    if (KErrNone != err)
-    {
-        // Fatal error, try to connect again. The midlets cannot be converted
-        // using the same uids as earlier if the unregistration cannot be done.
-        TInt retryCount = 0;
-        do
-        {
-            ELOG1(EJavaConverters,
-                  "CPreConverter::UnregisterOldJavaAppsL Cannot connect to "
-                  "AppArc server, err %d", err);
-
-            // wait
-            User::After(KDelayWhenWaitingAppArc);
-
-            err = apaSession.Connect();
-            if (KErrNone == err)
-            {
-                break;
-            }
-
-            retryCount++;
-        }
-        while (retryCount < 10);
-
-        if (KErrNone != err)
-        {
-            User::Leave(err);
-        }
-    }
-    CleanupClosePushL(apaSession);
-
-    // Delete any pending (un)registrations (possible if
-    // e.g. device rebooted before commit).
-    // This call does nothing if there is no pending registrations.
-    // Ignore errors.
-    (void)apaSession.RollbackNonNativeApplicationsUpdates();
-
-    // Prepare for Java application unregistrations
-    TRAP(err, apaSession.PrepareNonNativeApplicationsUpdatesL());
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CPreConverter::UnregisterOldJavaAppsL: "
-              "PrepareNonNativeApplicationsUpdatesL leaved with err %d",
-              err);
-        User::Leave(err);
-    }
-
-    // Unregister all apps
-    CMidletInfo *midlet = iMidlets->GetFirst();
-
-    while (NULL != midlet)
-    {
-        TRAP(err, apaSession.DeregisterNonNativeApplicationL(midlet->GetMidletUid()));
-        if (KErrNone != err)
-        {
-            WLOG2(EJavaConverters,
-                  "CPreConverter::UnregisterOldJavaAppsL: "
-                  "DeregisterNonNativeApplicationL leaved with err %d for uid %d",
-                  err, midlet->GetMidletUid().iUid);
-            // Ignore error, this particular application cannot be converted.
-        }
-
-        midlet = iMidlets->GetNext();
-    }
-
-    // Commit unregistrations
-    TRAP(err, apaSession.CommitNonNativeApplicationsUpdatesL())
-    {
-        if (KErrNone != err)
-        {
-            ELOG1(EJavaConverters,
-                  "CPreConverter::UnregisterOldJavaAppsL: "
-                  "CommitNonNativeApplicationsUpdatesL leaved with err %d",
-                  err);
-            User::Leave(err);
-        }
-    }
-
-    // Closes apaSession
-    CleanupStack::PopAndDestroy();
-}
-
--- a/javatools/javaapppreconverter/src.s60/preconverter.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 javaapppreconverter process
-*
-*/
-
-
-#ifndef PRECONVERTER_H
-#define PRECONVERTER_H
-
-#include <f32file.h>
-#include <e32base.h>
-
-#include "midletlist.h"
-
-/**
- * The main active object of javaapppreconverter that is executed once
- * to collect all necessary data of old S60 MIDlets so that they can
- * be reregistered to AppArc if OMJ is uninstalled.
- *
- * This active object is activated from the process main() after the
- * active scheduler has been created.
- */
-class CPreConverter : public CActive
-{
-    enum TPreConversionState
-    {
-        EConversionDataAlreadyGathered,
-        EFindOutInstalledMidlets,
-        EFillDataFromSystemAmsDb,
-        EStoreData,
-        EStopMidlets,
-        EUnregisterMidlets,
-        EExit
-    };
-
-public:
-    static CPreConverter* NewLC(RFs& aFs);
-
-    void CompleteRequest();
-    ~CPreConverter();
-    void Start();
-
-protected:
-    // From CActive
-    void RunL();
-    void DoCancel();
-    TInt RunError(TInt aError);
-
-private:
-    void Exit();
-    CPreConverter(RFs& aFs);
-    void ConstructL();
-    void FullCleanup();
-
-    TDriveNumber ExtractDriveNumberFromPathL(TFileName &aPathName);
-    void ReadMidletsFromAppArcL();
-    void AddDataFromSystemAmsDbL();
-    void RemoveInvalidMidlets();
-    void StoreUidsL();
-    void UnregisterOldJavaAppsL();
-
-
-private:
-    RFs& iFs;
-    CMidletList *iMidlets;
-    TPreConversionState iState;
-
-};
-
-#endif // PRECONVERTER_H
--- a/javatools/javacleaner/build/javacleaner.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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=javacleaner
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.UID3          = 0x2002119A
-    TARGET.CAPABILITY    = WriteDeviceData TrustedUI
-
-    SOURCES += ../src.s60/*.cpp   
-    
-    LIBS += -lapgrfx
-}
-
-include(../../../build/omj.pri)
--- a/javatools/javacleaner/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2008 - 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: Java platform 2.0 cleaner process (javacleaner.exe)
-*              When OMJ is uninstalled, this program is executed to
-*              uninstall all OMJ midlets, unregister OMJ
-*              specific MIDlet starter and reregister old starter
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <apgcli.h> // for RApaLsSession
-#include <e32property.h>
-#include <swinstallerinternalpskeys.h>
-
-#include "javauids.h"
-#include "logger.h"
-
-
-/**
- * Start Java Installer process with commandline options
- * that ask it to uninstall all OMJ midlets. Wait until
- * the uninstallation has been done.
- */
-static void UninstallAllOmjMidlets()
-{
-    LOG(EJavaConverters, EInfo, "javacleaner: UninstallAllOmjMidlets: Going to start installer");
-
-    RProcess rJavaInstaller;
-    // Just command 'uninstallall', 256 is more than enough
-    TBuf<256> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    commandLine = _L("javainstallerstarter");
-    commandLine.Append(_L(" uninstallall -forceuninstall -captainmsgs=no"));
-
-    // Run installer silently
-    commandLine.Append(_L(" -silent -skipotastatus"));
-
-    // start JavaInstaller
-#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("j9midps60");
-#else // RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("javamidp");
-#endif // RD_JAVA_S60_RELEASE_5_0_IAD
-
-    TInt err = rJavaInstaller.Create(processName, commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "javacleaner: UninstallAllOmjMidlets calling Rendezvous");
-        // This call will wait until Java Installer exits (or panics)
-        TRequestStatus status;
-        rJavaInstaller.Logon(status);
-
-        LOG(EJavaConverters, EInfo, "javacleaner: UninstallAllOmjMidlets calling Resume");
-        rJavaInstaller.Resume();
-
-        // now wait until Java Installer exits
-        User::WaitForRequest(status);
-        if (status.Int() != KErrNone)
-        {
-            ELOG1(EJavaConverters,
-                  "javacleaner: UninstallAllOmjMidlets Installer exited with error %d",
-                  status.Int());
-        }
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "javacleaner: UninstallAllOmjMidlets Cannot start Installer, error %d", err);
-    }
-
-    LOG(EJavaConverters, EInfo, "javacleaner: UninstallAllOmjMidlets calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-}
-
-
-/**
- * Start Java Installer process with commandline option
- * that asks it to delete all PS keys that Java Installer uses and
- * remove all unnecessary directories that OMJ has created.
- * Wait until the uninstallation has been done.
- */
-static void CleanOmjDataAndPsKeys()
-{
-    LOG(EJavaConverters, EInfo, "javacleaner: CleanOmjDataAndPsKeys: Going to start installer");
-
-    RProcess rJavaInstaller;
-    // Just command 'removealldata', 256 is more than enough
-    TBuf<256> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    commandLine = _L("javainstallerstarter");
-    commandLine.Append(_L(" removealldata"));
-
-    // Run installer silently
-    commandLine.Append(_L(" -silent"));
-
-    // start JavaInstaller
-#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("j9midps60");
-#else // RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("javamidp");
-#endif // RD_JAVA_S60_RELEASE_5_0_IAD
-
-    TInt err = rJavaInstaller.Create(processName, commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "javacleaner: CleanOmjDataAndPsKeys calling Rendezvous");
-        // This call will wait until Java Installer exits (or panics)
-        TRequestStatus status;
-        rJavaInstaller.Logon(status);
-
-        LOG(EJavaConverters, EInfo, "javacleaner: CleanOmjDataAndPsKeys calling Resume");
-        rJavaInstaller.Resume();
-
-        // now wait until Java Installer exits
-        User::WaitForRequest(status);
-        if (status.Int() != KErrNone)
-        {
-            ELOG1(EJavaConverters,
-                  "javacleaner: CleanOmjDataAndPsKeys Installer exited with error %d",
-                  status.Int());
-        }
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "javacleaner: CleanOmjDataAndPsKeys Cannot start Installer, error %d", err);
-    }
-
-    LOG(EJavaConverters, EInfo, "javacleaner: CleanOmjDataAndPsKeys calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-}
-
-/**
- * Return true if really uninstalling OMJ
- */
-static TBool IsCleaningNeeded()
-{
-    TBool clean(EFalse);
-    TInt  value(0);
-    // Ignore errors, if the value cannot be read, cleaning is not done.
-    RProperty::Get(KPSUidSWInstallerUiNotification, KSWInstallerUninstallation, value);
-    if (0 == value)
-    {
-        // Native installer is updating OMJ. Do not clean
-        LOG(EJavaConverters, EInfo,
-            "javacleaner: IsCleaningNeeded(): Updating OMJ. No cleaning needed.");
-        clean = EFalse;
-    }
-    else
-    {
-        // Really uninstalling OMJ
-        clean = ETrue;
-    }
-
-    return clean;
-}
-
-/**
- * Create cleanup stack and run the cleaner code inside TRAP harness
- * to log unexpected leaves.
- */
-TInt E32Main()
-{
-    __UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-    if (IsCleaningNeeded())
-    {
-        UninstallAllOmjMidlets();
-        // Must wait for a moment so that the Java Installer instance
-        // started by previous call exits fully
-        User::After(500000);
-        CleanOmjDataAndPsKeys();
-    }
-
-    delete cleanupStack;
-    __UHEAP_MARKEND;
-    return KErrNone;
-}
-// eof
--- a/javatools/javamgr/build/javamgr.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TARGET=javamgr
-TEMPLATE=app
-
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-LIBS += -ljavacomms
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.CAPABILITY    = all -tcb -allfiles -drm
-}
-
-include(../../../build/omj.pri)
--- a/javatools/javamgr/src/javamgr.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JavaCap
-*
-*/
-
-
-#include "comms.h"
-#include "rtcmessages.h"
-#include "coremessages.h"
-#include "commsclientendpoint.h"
-#include "exceptionbase.h"
-
-#include "logger.h"
-
-using namespace java::util;
-using namespace java::comms;
-using namespace java::captain;
-
-
-int main(int argc, char *argv[])
-{
-    LOG(EUtils, EInfo, "TCK RUNNER main()");
-    int result = -1;
-    try
-    {
-        if (argc > 0 && argv != 0)
-        {
-            CommsMessage message;
-            message.setModuleId(PLUGIN_ID_JAVACAPTAIN_CORE_C);
-            message.setMessageId(CORE_MSG_ID_DO_THREAD_DUMP);
-            CommsClientEndpoint comms;
-            comms.connect(IPC_ADDRESS_JAVA_CAPTAIN_C);
-            comms.send(message);
-            comms.disconnect();
-
-            result = 0;
-        }
-    }
-
-    catch (ExceptionBase& e)
-    {
-        ELOG1(ETckRunner, "TCK RUNNER main() ExceptionBase caught: %s ",
-              e.toString().c_str());
-    }
-
-    catch (std::exception& e)
-    {
-        ELOG1(ETckRunner, "TCK RUNNER main() Exception %s caught", e.what());
-    }
-
-    LOG1(ETckRunner, EInfo, "TCK RUNNER EXIT = %d", result);
-    return result;
-}
-
-// End of File
--- a/javatools/javapostupdater/build/javapostupdater.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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=javapostupdater
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.EPOCHEAPSIZE  = 0x4000 0x1000000
-    TARGET.UID3          = 0x20022EF6
-    TARGET.CAPABILITY    = WriteDeviceData PowerMgmt TrustedUI
-    
-    LIBS += -lapgrfx -lswinstcli -lcentralrepository
-    }
-
-include(../../../build/omj.pri)
--- a/javatools/javapostupdater/src/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,427 +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:  OMJ S60 environment post updater process.
-*               This process is executed when OMJ is installed, after
-*               the native installer exits.
-*               Register new Java 2.0 midlet starter to AppArc.
-*               Execute javaappconverter.exe and javausersettingsconfigurator.exe.
-*               Destroy one PS key owned by the native installer.
-*               Create new PS keys used by new Java Installer.
-*               Refresh midlet icons shown in menu application.
-*
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <w32std.h>
-#include <centralrepository.h>
-#include <swinstapi.h>
-#include <apgcli.h> // for RApaLsSession
-
-#include <javadomainpskeys.h>
-
-#include "javaprocessconstants.h"
-#include "javauids.h"
-#include "logger.h"
-
-
-_LIT8(KAppJavaType, "application/java");
-
-
-/**
- * Ask javainstaller to create the new PS keys
- * that other processes can later use to get information of
- * the progress of the installation of Java applications.
- */
-static void CreateNewJavaInstallerPSKeys()
-{
-    LOG(EJavaConverters, EInfo, "javapostupdater: CreateNewJavaInstallerPSKeys() was called");
-
-    RProcess rJavaInstaller;
-    TFileName fileName;
-    // Pass just 'register' command
-    TBuf<128> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    TInt len = strlen(java::runtime::JAVA_INSTALLER_STARTER_DLL);
-    TPtr8 ptr8InstallerDll((TUint8 *)java::runtime::JAVA_INSTALLER_STARTER_DLL, len, len);
-    commandLine.Copy(ptr8InstallerDll);
-
-    commandLine.Append(_L(" register"));
-
-    LOG(EJavaConverters, EInfo,
-        "javapostupdater: CreateNewJavaInstallerPSKeys() starting Java "
-        "Installer for registering PS keys");
-
-    // start JavaInstaller
-    TBuf<64> installerProcess;  // Actual len of the process name is 9
-    len = strlen(java::runtime::JAVA_PROCESS);
-    TPtr8 ptr8Process((TUint8 *)java::runtime::JAVA_PROCESS, len, len);
-    installerProcess.Copy(ptr8Process);
-
-    TInt err = rJavaInstaller.Create(installerProcess, commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo,
-            "javapostupdater: CreateNewJavaInstallerPSKeys() calling Resume");
-        rJavaInstaller.Resume();
-    }
-
-    LOG(EJavaConverters, EInfo,
-        "javapostupdater: CreateNewJavaInstallerPSKeys() calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-}
-
-
-/**
- * Make a dummy call to Installer using SwiUI::RSWInstSilentLauncher
- * so that OMJ appinstuiplugin gets called from AppInstUi process
- * and can remove one conflicting P&S key created by old S60 Java Installer
- */
-static void DeleteOldJavaInstallerPSKeyL()
-{
-    SwiUI::RSWInstSilentLauncher   installer;
-    SwiUI::TUninstallOptions       options;
-    SwiUI::TUninstallOptionsPckg   pckg;
-
-    // use default options
-    pckg = options;
-
-    LOG(EJavaConverters, EInfo, "javapostupdater: DeleteOldJavaInstallerPSKey() called");
-
-    TInt err = installer.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javapostupdater: DeleteOldJavaInstallerPSKey: RSWInstSilentLauncher "
-              "connect error %d", err);
-        return;
-    }
-
-    CleanupClosePushL(installer);
-
-    // Calling AppInstUi silent install API immediately after OMJ has been
-    // installed may fail because the AppInstUI has not yet exited or new OMJ
-    // ECOM plugin is not yet in use.
-    // Make the calls in a loop and wait a couple of seconds between
-    const TUid illegalAppUid = {KRandomIllegalAppUid};
-    TInt nRetries = 7;
-    do
-    {
-        // This call returns KErrCancel even if the PS key was destroyed
-        err = installer.SilentUninstall(illegalAppUid, pckg, KAppJavaType);
-        if ((KErrNone != err) && (KErrCancel != err))
-        {
-            WLOG1(EJavaConverters,
-                  "javapostupdater: DeleteOldJavaInstallerPSKey: SilentUninstall error %d", err);
-        }
-
-        // Wait 3 sec so that AppInstUi has time to finish previous operation
-        // and exit so that new ECom OMJ specific plugin will be loaded
-        User::After(3000000);
-        nRetries--;
-    }
-    while ((KErrCancel != err) && (KErrNone != err) && (nRetries > 0));
-
-    if (nRetries == 0)
-    {
-        ELOG1(EJavaConverters,
-              "javapostupdater: DeleteOldJavaInstallerPSKey: Could not delete PS key, error %d",
-              err);
-    }
-    else
-    {
-        LOG(EJavaConverters,
-            EInfo, "javapostupdater: DeleteOldJavaInstallerPSKey() PS Key was deleted");
-    }
-
-
-    CleanupStack::PopAndDestroy(&installer);
-}
-
-
-/**
- * Start javaappconverter.exe process and wait until it exits. After that
- * start javausersettingsconfigurator.exe process and wait until it exits.
- */
-static void runConverters()
-{
-    JELOG2(EJavaPreinstaller);
-
-    // Start converter process
-    RProcess converter;
-    TInt err = converter.Create(_L("javaappconverter.exe"), KNullDesC);
-    if (KErrNone == err)
-    {
-        // Process has been created
-        LOG(EJavaConverters, EInfo,
-            "runConverter: created javaappconverter process");
-
-        // Get ready to wait until the process ends
-        TRequestStatus status;
-        converter.Logon(status);
-
-        // Make the main thread of the process runnable
-        converter.Resume();
-        LOG(EJavaConverters, EInfo,
-            "runConverter: started javaappconverter");
-
-        // Wait until the process ends.
-        User::WaitForRequest(status);
-        converter.Close();
-
-        if (status.Int() == KErrAlreadyExists)
-        {
-            // Old S60 midlets have already been converted.
-            // This is an OMJ upgrade installation.
-            LOG(EJavaConverters, EInfo,
-                "runConverter: no need to execute javausersettingsconfigurator process");
-            return;
-        }
-        else
-        {
-            LOG1(EJavaConverters, EInfo,
-                 "runConverter: javaappconverter ended with status %d", status.Int());
-        }
-    }
-    else
-    {
-        ELOG1(
-            EJavaConverters,
-            "runConverter: starting javaappconverter failed, err %d",
-            err);
-        return;
-    }
-
-    // Configure the user settings of the newly installed applications
-    // (based on how they were configured in the legacy java)
-    RProcess userSettingsTool;
-    err = userSettingsTool.Create(_L("javausersettingsconfigurator.exe"), KNullDesC);
-    if (err == KErrNone)
-    {
-        // Process has been created
-        LOG(EJavaConverters, EInfo,
-            "runConverter: created javausersettingsconfigurator process");
-
-        // Get ready to wait until the process ends
-        TRequestStatus status;
-        userSettingsTool.Logon(status);
-
-        // Make the main thread of the process runnable
-        userSettingsTool.Resume();
-        LOG(EJavaConverters, EInfo,
-            "runConverter: started javausersettingsconfigurator");
-
-        // Wait until the process ends.
-        User::WaitForRequest(status);
-
-        LOG1(EJavaConverters, EInfo,
-             "runConverter: javausersettingsconfigurator ended with status %d", status.Int());
-
-        userSettingsTool.Close();
-    }
-    else
-    {
-        ELOG1(
-            EJavaConverters,
-            "startConverter: starting javausersettingsconfigurator failed, err %d",
-            err);
-    }
-}
-
-/**
- * Register 'javalauncher.exe' as the midlet application type handler
- * in AppArc. If necessary unregister old handler first.
- */
-static void registerMidletApplicationTypeHandler()
-{
-    _LIT(KMidpAppArcPlugin, "javalauncher.exe");
-
-    RApaLsSession appLstSession;
-    TInt err = appLstSession.Connect();
-    if (KErrNone == err)
-    {
-        TRAP(err, appLstSession.RegisterNonNativeApplicationTypeL(
-                 TUid::Uid(KMidletApplicationTypeUid), KMidpAppArcPlugin()));
-        if (KErrNone == err)
-        {
-            // All is well
-            LOG(EJavaConverters, EInfo,
-                "registerMidletApplicationTypeHandler: Registered MIDlet application "
-                "type for Java 2.x");
-        }
-        else if (KErrAlreadyExists == err)
-        {
-            // Java 1.x has registered MIDlet application type handler StubMIDP2RecogExe.exe,
-            // must change that registration
-            LOG(EJavaConverters, EInfo,
-                "registerMidletApplicationTypeHandler: MIDlet application type was already "
-                "registered by Java 1.x");
-            TRAP_IGNORE(appLstSession.DeregisterNonNativeApplicationTypeL(
-                            TUid::Uid(KMidletApplicationTypeUid)));
-            TRAP(err, appLstSession.RegisterNonNativeApplicationTypeL(
-                     TUid::Uid(KMidletApplicationTypeUid), KMidpAppArcPlugin()));
-            if (KErrNone == err)
-            {
-                LOG(EJavaConverters, EInfo,
-                    "registerMidletApplicationTypeHandler: Registered MIDlet application "
-                    "type again (for Java 2.x).");
-            }
-            else
-            {
-                ELOG1(EJavaConverters,
-                      "registerMidletApplicationTypeHandler: Reregistering MIDlet application "
-                      "type failed with err %d",
-                      err);
-            }
-        }
-        else
-        {
-            ELOG1(EJavaConverters,
-                  "registerMidletApplicationTypeHandler: Registering MIDlet "
-                  "application type failed with err %d",
-                  err);
-        }
-
-        // Launch rescan of all applications so that all java applications
-        // will be shown in Menu
-        TRAP(err, appLstSession.PrepareNonNativeApplicationsUpdatesL());
-        if (KErrNone != err)
-        {
-            ELOG1(EJavaConverters,
-                  "registerMidletApplicationTypeHandler: PrepareNonNativeApplicationsUpdatesL error %d",
-                  err);
-        }
-        else
-        {
-            LOG(EJavaConverters, EInfo,
-                "registerMidletApplicationTypeHandler: PrepareNonNativeApplicationsUpdatesL OK");
-        }
-
-        TRAP(err, appLstSession.CommitNonNativeApplicationsUpdatesL());
-        if (KErrNone != err)
-        {
-            ELOG1(EJavaConverters,
-                  "registerMidletApplicationTypeHandler: CommitNonNativeApplicationsUpdatesL error %d",
-                  err);
-        }
-        else
-        {
-            LOG(EJavaConverters, EInfo,
-                "registerMidletApplicationTypeHandler: CommitNonNativeApplicationsUpdatesL OK");
-        }
-
-        appLstSession.Close();
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "registerMidletApplicationTypeHandler: Connecting to AppArc failed with error %d",
-              err);
-    }
-}
-
-/**
- * Menu application has a central repository key that can be used in
- * devices belonging to Nokia 5800 XpressMusic device family to request
- * that the Menu application would rescan all applications it contains.
- */
-static void UseCRKeyToUpdateAppShellDataL()
-{
-    const TUid KCRUidMenu = { 0x101F8847 };
-    const TUint32 KMenuUpdateData = 0x00000001;
-
-    // Update Central Rep
-    CRepository *pCenRep = CRepository::NewL(KCRUidMenu);
-
-    TInt value = 1;
-    TInt err = pCenRep->Set(KMenuUpdateData, value);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javapostupdater: UseCRKeyToUpdateAppShellDataL: "
-              "setting cenrep value failed, error %d ",
-              err);
-    }
-
-    delete pCenRep;
-}
-
-/**
- * If OMJ is upgraded the Application Shell (menu application) of the
- * Nokia 5800 XpressMusic device family does not
- * display the icons of the java applications that have been installed to
- * only OMJ environment. The icons are shown after the device is booted.
- * Tell menu application to scan again all applications so that the icons
- * will be shown.
- */
-static void AddAllJavaAppIconsToMenuApp()
-{
-    LOG(EJavaConverters, EInfo, "javapostupdater: AddAllJavaAppIconsToMenuApp called.");
-
-    TRAPD(err, UseCRKeyToUpdateAppShellDataL());
-    if (KErrNotFound == err)
-    {
-        // Only Nokia XPressMusic 5800 device family supports this feature,
-        // N97 and later devices no longer support it but they have new Menu
-        // application that shows all Java application icons anyway.
-        LOG(EJavaConverters, EInfo,
-            "javapostupdater: AddAllJavaAppIconsToMenuApp: This device does not "
-            "support refreshing Menu using CR keys.");
-    }
-    else if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javapostupdater: AddAllJavaAppIconsToMenuApp: Error: %d", err);
-    }
-}
-
-/**
- * Create cleanup stack and run the post updater code inside TRAP harness
- * to log unexpected leaves.
- */
-TInt E32Main()
-{
-    __UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-    LOG(EJavaConverters, EInfo, "javapostupdater process starts");
-
-    // Java 2.0 midlet starter handles midlet application type
-    registerMidletApplicationTypeHandler();
-
-    // Convert existing midlets to Java 2.0 midlets
-    runConverters();
-
-    // Delete one old PS key owned by native installer (appinstui)
-    TRAPD(error, DeleteOldJavaInstallerPSKeyL());
-    if (KErrNone != error)
-    {
-        ELOG1(EJavaConverters,
-              "javapostupdater: DeleteOldJavaInstallerPSKeyL() leaved with %d", error);
-    }
-
-    // Create new PS keys that Java 2.0 Java Installer will use
-    CreateNewJavaInstallerPSKeys();
-
-    // Make sure all Java application icons are shown in menu.
-    AddAllJavaAppIconsToMenuApp();
-
-    delete cleanupStack;
-    __UHEAP_MARKEND;
-    return error;
-}
--- a/javatools/javarestoreconverter/build/javarestoreconverter.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#    This process need AllFiles capability to be able to
-#    find all java applications to be converted. (They are
-#    in the data cage of the java runtime process.)
-
-
-TEMPLATE=app
-TARGET=javarestoreconverter
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.UID2          = 0
-    TARGET.UID3          = 0x2002B3EA
-    TARGET.CAPABILITY    = WriteDeviceData AllFiles TrustedUI
-
-    SOURCES += ../src.s60/*.cpp
-
-    LIBS += -lefsrv \
-            -lPlatformEnv \
-            -ljavacomms \
-            -lcharconv \
-            -lapparc \
-            -ljavastorage \
-            -lezip 
-}
-
-include(../../../build/omj.pri)
--- a/javatools/javarestoreconverter/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Java platform 2.0 javarestoreconverter process.
-*              Java restore executes this when restoring Java 1.x
-*              applications that must be converted to Java 2.x
-*              applications.
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-
-#include "javauids.h"
-#include "restoreconvertmidlet.h"
-#include "logger.h"
-
-// The secure Uid of javabackup.exe
-_LIT_SECURE_ID(KJavaBackupSecureID, 0x1028246F);
-
-
-/**
- * Allow starting process only from Java Restore,
- * allow running only one instance of the process,
- * create file server connection,
- * create active scheduler and start it
- *
- */
-static void RestoreConvertJavaAppsL()
-{
-    _LIT(KPreinstallerMatch, "javarestoreconverter*");
-    TFindProcess find(KPreinstallerMatch);
-    TFullName ignoreName;
-    find.Next(ignoreName);
-
-    // Can only have one javarestoreconverter. If a second is found exit
-    if (find.Next(ignoreName) == KErrNone)
-    {
-        ELOG(EJavaPreinstaller, "javarestoreconverter.exe already running.");
-        User::Leave(KErrAlreadyExists);
-    }
-
-    // The only time that this application should be executed
-    // is when java restore calls it.
-    // Allow starting javarestoreconverter.exe from test programs in
-    // debug builds.
-#ifndef _DEBUG
-
-    if (User::CreatorSecureId() != KJavaBackupSecureID)
-    {
-        ELOG(EJavaConverters,
-             "ConvertJavaAppsL: Mismatch in secure ID, only java backup can launch this exe.");
-        User::Leave(KErrPermissionDenied);
-    }
-#endif
-
-    RFs fs;
-    User::LeaveIfError(fs.Connect());
-    CleanupClosePushL(fs);
-
-    CActiveScheduler* as = new(ELeave) CActiveScheduler();
-
-    // Install active scheduler
-    CActiveScheduler::Install(as);
-    CleanupStack::PushL(as);
-
-    // Setup and start the MIDlet conversion
-    CRestoreConvertMIDlet* si = CRestoreConvertMIDlet::NewLC(fs);
-
-    LOG(EJavaConverters, EInfo, "RestoreConvertJavaAppsL: Call CRestoreConvertMIDlet::Start()");
-
-    si->Start();
-
-    // Start active scheduler, starts conversion
-    LOG(EJavaConverters, EInfo, "RestoreConvertJavaAppsL: Starting CActiveScheduler");
-    CActiveScheduler::Start();
-
-    LOG(EJavaConverters, EInfo, "RestoreConvertJavaAppsL: Cleaning up");
-
-    CleanupStack::PopAndDestroy(si);
-    CleanupStack::PopAndDestroy(as);
-    CleanupStack::PopAndDestroy(&fs); // close connection to file server
-
-    return;
-}
-
-
-/**
- * Create cleanup stack and run the javarestoreconverter code inside TRAP
- * harness to log unexpected leaves.
- */
-TInt E32Main()
-{
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-    TRAPD(err, RestoreConvertJavaAppsL());
-    if (err != KErrNone)
-    {
-        ELOG1(EJavaConverters, "RestoreConvertJavaAppsL:Main error %d", err);
-    }
-
-    delete cleanupStack;
-    return err;
-}
--- a/javatools/javarestoreconverter/src.s60/restoreconvertmidlet.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1310 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Java platform 2.0 javarestoreconverter process
-*
-*/
-
-
-#include <apacmdln.h>
-#include <apgcli.h>
-#include <driveinfo.h>
-#include <e32base.h>
-#include <pathinfo.h>
-#include <utf.h>
-#include <zipfile.h>
-
-#include "restoreconvertmidlet.h"
-
-#include "javacommonutils.h"
-#include "javaprocessconstants.h"
-#include "javastorage.h"
-#include "javastorageentry.h"
-#include "javastoragenames.h"
-#include "javasymbianoslayer.h"
-#include "javauids.h"
-#include "logger.h"
-
-
-using namespace java::storage;
-using namespace java::util;
-
-// MIDlet name and vendor max size is 255,
-// +1 added for terminating zero needed for logging
-const TInt KMaxBufferSize = 256;
-
-// character constants needed when parsing java attributes
-const TUint32 HT = 9;  // horizontal tab
-const TUint32 LF = 10; // line feed
-const TUint32 CR = 13; // carriage return
-const TUint32 SP = 32; // space
-const TUint32 COLON = 58; // ':'
-
-
-_LIT(KJarFileNameSuffix, ".jar");
-_LIT(KJadFileNameSuffix, ".jad");
-_LIT(KFLJarFileNameSuffix, ".dm");
-_LIT(KSDJarFileNameSuffix, ".dcf");
-_LIT(KSMCBackSplash, "\\");
-_LIT(KDriveText, "drive");
-_LIT(KMidletName, "MIDlet-Name");
-_LIT(KMidletVendor, "MIDlet-Vendor");
-_LIT(KManifestEntryName, "META-INF/MANIFEST.MF");
-
-// The directory where the java applications to be converted are searched from
-_LIT(KMidletSuiteInstallBasePath, ":\\Private\\102033E6\\MIDlets\\");
-
-
-/**
- * To create new instance of this class.
- *
- * @param aFs - A reference to the file server.
- * @return Reference to the object of this class.
- * @exception If construction fails.
- *
- */
-CRestoreConvertMIDlet* CRestoreConvertMIDlet::NewLC(RFs& aFs)
-{
-    CRestoreConvertMIDlet* self = new(ELeave) CRestoreConvertMIDlet(aFs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-/**
- * To do 1st phase construction for this object.
- *
- * Adds this active object to the scheduler.
- *
- * @param aFs - A reference to the file server.
- */
-CRestoreConvertMIDlet::CRestoreConvertMIDlet(RFs& aFs) :
-        CActive(EPriorityStandard), iFs(aFs), iNumberOfAppsToInstall(0)
-{
-    CActiveScheduler::Add(this);
-}
-
-/**
- * To do 2nd phase construction for this object.
- *
- * @exception If the method is not able to allocate necessary buffers.
- */
-void CRestoreConvertMIDlet::ConstructL()
-{
-    iConvertServer = new(ELeave) RestoreServer();
-    iMIDletName    = HBufC::NewL(KMaxBufferSize);
-    iMIDletVendor  = HBufC::NewL(KMaxBufferSize);
-}
-
-/**
- * Deletes this object.
- * All allocated resources are released.
- */
-CRestoreConvertMIDlet::~CRestoreConvertMIDlet()
-{
-    Cancel();
-    iInstallFiles.ResetAndDestroy();
-    iInstallFiles.Close();
-
-    iUninstallUids.clear();
-
-    iDirs.ResetAndDestroy();
-    iDirs.Close();
-
-    iIsJad.Reset();
-
-    delete iMIDletName;
-    iMIDletName = NULL;
-
-    delete iMIDletVendor;
-    iMIDletVendor = NULL;
-
-    delete iConvertServer;
-    iConvertServer = NULL;
-}
-
-/**
- * To start silent installation.
- */
-void CRestoreConvertMIDlet::Start()
-{
-    iState = EFindOutDeviceDrives;
-    CompleteRequest();
-}
-
-/**
- * To stop whole preinstaller.
- * Stops the active scheduler.
- */
-void CRestoreConvertMIDlet::Exit()
-{
-    Deque();
-    CActiveScheduler::Stop();
-}
-
-/**
- * To complete the request for this object.
- *
- * @Postconditions The following conditions are true immediately after
- * returning from this method.
- * - iStatus == KErrNone
- * - IsActive() == ETrue
- */
-void CRestoreConvertMIDlet::CompleteRequest()
-{
-    TRequestStatus *status = &iStatus;
-    User::RequestComplete(status, KErrNone);
-    if (!IsActive())
-    {
-        SetActive();
-    }
-}
-
-/**
- * To run this active object.
- *
- * The state logic is:
- *
- * EFindOutDeviceDrives:
- *    - find out all non-remote drives in the device
- *    - mark externally mountable drives (removable drives)
- *    - mark read only drives (ROM)
- *
- * EGetDriveToBeScanned:
- *    - the drive to be scanned has been given as command line argument,
- *      store it to iDrive
- *
- * EAppsInInstalledDirectories:
- *    - go through all directories in iDirs one by one
- *      and find all java applications in the subdirectories of the directory
- *    - if only .jar/.dcf/.dm file is found it is added to iInstallFiles
- *    - if .jad file is found, it is added to iInstallFiles
- *
- * EUninstallFromOMJ:
- *   - uninstall all OMJ java applications in drive iDrive using Java Installer
- *     command line options 'uninstallall -drive=<iDrive>'
- *   - then for each java application in iInstallFiles try to find it from
- *     Java Storage based on MIDlet suite name and vendor name. If the MIDlet
- *     is still installed to OMJ (to some other drive than iDrive), it must
- *     be uninstalled from OMJ to reset the state of MIDlet (RMS data etc)
- *     to original state. The actual uninstallation is not done in this
- *     state, the uids of the applications to be uninstalled are just added to
- *     iUninstallUids in string format
- *
- * EExecuteRestoreServer:
- *  - give list of uninstall uids and list of install files to restore server
- *  - start restore server in another thread (it will listen to Comms messages)
- *  - start Java Installer in poll mode
- *  - when Java Installer polls for operations to be executed, the restore server
- *    will first ask it to uninstall each Java application in the list of uninstall uids,
- *    then restore server will ask Java Installer to install each .jad or .jar/.dcf/.dm file
- *    in the list of install files.
- *    Restore server will log whether each uninstallation / installation succeeds.
- *  - after all uninstallations and installations have been done, restore server will ask
- *    Java Installer to exit.
- *  - after that this active object moves to next state.
- *
- * EExit: free resources and exit
- *
- */
-void CRestoreConvertMIDlet::RunL()
-{
-    switch (iState)
-    {
-    case EFindOutDeviceDrives:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CRestoreConvertMIDlet::RunL EFindOutDeviceDrives");
-        GetAllDeviceDrivesL();
-        iState = EGetDriveToBeScanned;
-        CompleteRequest();
-    }
-    break;
-
-    case EGetDriveToBeScanned:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CRestoreConvertMIDlet::RunL EGetDriveToBeScanned");
-
-        HBufC *pBufCmdLine = HBufC::NewLC(User::CommandLineLength() + 10);
-        TPtr args = pBufCmdLine->Des();
-        User::CommandLine(args);
-        LOG1WSTR(EJavaConverters, EInfo,
-                 "Command line arguments of javarestoreconverter.exe are : %s",
-                 (wchar_t *)(args.PtrZ()));
-
-        // Check which drive is to be restored now from command line.
-        TDriveNumber drive = EDriveC;
-        TInt idx = args.Find(KDriveText());
-        if (KErrNotFound == idx)
-        {
-            LOG1WSTR(EJavaConverters, EError,
-                     "no -drive<X> argument in javarestoreconveter.exe command line (%s)",
-                     (wchar_t *)(args.PtrZ()));
-            User::Leave(KErrNotFound);
-        }
-
-        TChar driveChar = args[idx + KDriveText().Length()];
-        char argLetter = args[idx + KDriveText().Length()];
-        if (argLetter >= 'A' && argLetter <= 'J')
-        {
-            drive = (TDriveNumber)(argLetter - 'A');
-        }
-        else if (argLetter >= 'a' && argLetter <= 'j')
-        {
-            drive = (TDriveNumber)(argLetter - 'a');
-        }
-        else
-        {
-            User::Leave(KErrArgument);
-        }
-        CleanupStack::PopAndDestroy(pBufCmdLine);
-        iDrive = drive;
-
-        LOG1(EJavaConverters, EInfo, "Drive is %d", drive);
-
-        // forget old search directories
-        iDirs.ResetAndDestroy();
-
-        // The specified drive will be scanned for
-        // java applications to be converted
-        if (iDriveStatuses[drive] & DriveInfo::EDrivePresent)
-        {
-            (void)iFs.DriveToChar(drive, driveChar);
-
-            // The base Java application install directory in this
-            // drive must be scanned.
-            // Reserve memory also for drive letter and terminating zero
-            // for logging.
-            HBufC *baseInstallDir = HBufC::NewLC(KMidletSuiteInstallBasePath().Length() + 2);
-
-            TPtr dirPtr(baseInstallDir->Des());
-            dirPtr.Append(driveChar);
-            dirPtr.Append(KMidletSuiteInstallBasePath());
-
-            // Add new search directory
-            iDirs.AppendL(baseInstallDir);
-            CleanupStack::Pop(baseInstallDir);
-        }
-        else
-        {
-            // Restoring MIDlets to drive X but drive X is not present
-            ELOG1(EJavaConverters,
-                  "javarestoreconverter.exe: Drive number %d is not present", drive);
-            User::Leave(KErrDisMounted);
-        }
-
-        iState = EAppsInInstalledDirectories;
-        CompleteRequest();
-    }
-    break;
-
-    case EAppsInInstalledDirectories:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CRestoreConvertMIDlet::RunL EAppsInInstalledDirectories");
-
-        GetInstallFilesL(iDirs);
-
-
-        iState = EUninstallFromOMJ;
-        CompleteRequest();
-    }
-    break;
-
-    case EUninstallFromOMJ:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CRestoreConvertMIDlet::RunL EUninstallFromOMJ");
-
-        // Uninstall all Java applications in current drive
-        UninstallAllFromDriveL(iDrive);
-
-        // Check all Jad / Jar files in iInstallFiles and
-        // add the Uids of those MIDlets still installed into OMJ
-        // to iUninstallUids
-        FindRemainingMIDletsToBeUninstalledL();
-
-        iState = EExecuteRestoreServer;
-        CompleteRequest();
-    }
-    break;
-
-    case EExecuteRestoreServer:
-    {
-        LOG(EJavaConverters, EInfo,
-            "CRestoreConvertMIDlet::RunL EExecuteRestoreServer");
-
-        if (iNumberOfAppsToInstall > 0)
-        {
-            // Uninstall all MIDlet suites in iUninstallUids and then
-            // install all MIDlet suites in iInstallFiles.
-
-            // Tell RestoreServer what should be uninstalled and what
-            // should be converted
-            iConvertServer->setOperations(iInstallFiles, iUninstallUids);
-
-            // Start the server
-            int err = iConvertServer->start();
-            if (0 != err)
-            {
-                // server cannot be started
-                ELOG1(EJavaConverters,
-                      "Cannot start convert server, err %d", err);
-            }
-
-            // Starts Java Installer, waits until Java Installer exits
-            RunJavaInstallerL();
-
-            iState = EExit;
-        }
-        else
-        {
-            iState = EExit;
-            CompleteRequest();
-        }
-    }
-    break;
-
-    case EExit:
-    {
-        LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::RunL EExit");
-
-        // Stops the server if it is running
-        iConvertServer->stop();
-
-        FullCleanup();
-
-        // The whole javaappconverter process is stopped.
-        Exit();
-    }
-    break;
-    }
-}
-
-/**
- * To handle leave from RunL.
- * This method exits this active object using normal state machine
- * After calling this method this active object will exit.
- *
- * @param aError - A reason of error.
- * @return KErrNone.
- */
-TInt CRestoreConvertMIDlet::RunError(TInt aError)
-{
-    ELOG2(EJavaConverters,
-          "CRestoreConvertMIDlet::RunError(%d) from state %d", aError, iState);
-
-    Cancel();
-
-    iState = EExit;
-    CompleteRequest();
-
-    return KErrNone;
-}
-
-/**
- * To do cancelling for this object.
- *
- */
-void CRestoreConvertMIDlet::DoCancel()
-{
-    ELOG1(EJavaConverters,
-          "CRestoreConvertMIDlet::DoCancel from state %d", iState);
-
-    // Check whether restore server must be stopped
-    if (iState == EExecuteRestoreServer)
-    {
-        // Stops the server if it is running
-        iConvertServer->stop();
-    }
-}
-
-/**
- * Add .jad files in the directories specified in aDirs to iInstallFiles.
- * If a directory does not contain a .jad file but it contains a .jar/.dcf/.dm file,
- * add that file to iInstallFiles
- *
- * @param aDirs - An array of directories to be scanned.
- * @exception Unable to alloc memory for the internal buffers.
- * @exception Unable to get directory's contents.
- */
-void CRestoreConvertMIDlet::GetInstallFilesL(RPointerArray<HBufC>& aDirs)
-{
-    // Number of MIDlet installation base directories to scan,
-    // one directory per local drive
-    const TInt nBaseDirs = aDirs.Count();
-
-    for (TInt i = 0; i < nBaseDirs; i++)
-    {
-        TFileName suitePath;
-
-        // Form base directory path, MIDlets have been installed
-        // to subdirectories of this directory
-        const TPtrC& dir = ((HBufC *)(aDirs[i]))->Des();
-        TFileName baseSuitePath = dir;
-
-        CDir *entryList;
-        CDir *dirList;
-        TInt err = iFs.GetDir(baseSuitePath, KEntryAttMatchMask, ESortNone, entryList, dirList);
-        if (KErrNone != err)
-        {
-            WLOG1WSTR(EJavaConverters,
-                      "CRestoreConvertMIDlet::GetInstallFilesL Cannot list directory %s",
-                      (wchar_t *)(baseSuitePath.PtrZ()));
-
-            // If no S60 Java application has been installed to the drive,
-            // the directory does not exist but it is OK
-            if (KErrPathNotFound != err)
-            {
-                User::Leave(err);
-            }
-            continue;
-        }
-
-        // Only midlet installation directory entries are meaningfull,
-        // discard other possible entries
-        delete entryList;
-
-        TInt   nCount = dirList->Count();
-        TEntry dirEntry;
-
-        for (TInt nInd = 0; nInd < nCount; nInd++)
-        {
-            dirEntry = (*dirList)[nInd];
-            // Just to make sure this really is subdirectory
-            if (dirEntry.IsDir())
-            {
-                // Is this midlet suite subdir?
-                // Midlet suite subdirs look like this "[102b567B]"
-                // Must parse the value of the Uid as unsigned int to avoid
-                // overflow
-                TUint32 nUid;
-                TLex   lexer(dirEntry.iName);
-                lexer.Inc();
-                err = lexer.Val(nUid, EHex);
-                if (KErrNone != err)
-                {
-                    // Not midlet suite subdir, skip it
-                    continue;
-                }
-
-                // Does the subdirectory contain any Jar files?
-                suitePath = baseSuitePath;
-                suitePath.Append(dirEntry.iName);
-                suitePath.Append(KSMCBackSplash);
-
-                CDir *suiteDirEntryList;
-                err = iFs.GetDir(suitePath, KEntryAttMatchMask, ESortNone, suiteDirEntryList);
-                if (KErrNone != err)
-                {
-                    LOG1WSTR(EJavaConverters, EError,
-                             "CRestoreConvertMIDlet::GetInstallFilesL Cannot list content of suite dir %s",
-                             (wchar_t *)(suitePath.PtrZ()));
-                    User::Leave(err);
-                    return;
-                }
-                // If there is .jad or Jar file in suiteDirEntryList, adds
-                // it to iInstallFiles.
-                // Recognizes also DRM protected Jar files (.dm, .dcf)
-                AddJadJarToInstallFilesL(suitePath, suiteDirEntryList);
-                delete suiteDirEntryList;
-            }
-        } // for - loop all directory entries in a base installation directories
-        delete dirList;
-
-    } // for - loop all base installation directories
-
-    if (iInstallFiles.Count() == 0)
-    {
-        WLOG(EJavaConverters,
-             "CRestoreConvertMIDlet::GetInstallFilesL No MIDlets to convert");
-    }
-
-    // how many applications to restore
-    iNumberOfAppsToInstall = iInstallFiles.Count();
-}
-
-/**
- *  For each java application in iInstallFiles try to find it from
- *  Java Storage based on MIDlet suite name and vendor name. If the MIDlet
- *  is still installed to OMJ (to some other drive than iDrive), it must
- *  be uninstalled from OMJ to reset the state of MIDlet (RMS data etc)
- *  to original state. Add the uids of the applications to be uninstalled
- *  to iUninstallUids in string format
- */
-void CRestoreConvertMIDlet::FindRemainingMIDletsToBeUninstalledL()
-{
-    TBool namesParsed;
-    for (TInt nInd = 0; nInd < iNumberOfAppsToInstall; nInd++)
-    {
-        // Get the MIDlet-Name and MIDlet-Vendor from iInstallFiles[nInd]
-        if (iIsJad[nInd] == 1)
-        {
-            namesParsed = ParseJadL(*iInstallFiles[nInd]);
-        }
-        else
-        {
-            // If file is .jar file, get the names from Manifest
-            namesParsed = ParseJarL(*iInstallFiles[nInd]);
-        }
-
-        // Search for the MIDlet suite from Java Storage table APPLICATION_PACKAGE_TABLE
-        // If it is found, add the suite Uid in string format to iUninstallUids
-        if (namesParsed)
-        {
-            TPtr suite = iMIDletName->Des();
-            TPtr vendor = iMIDletVendor->Des();
-            std::wstring suiteUid = IsSuiteInstalled(suite, vendor);
-            if (!suiteUid.empty())
-            {
-                iUninstallUids.push_back(suiteUid);
-            }
-        }
-    }
-}
-
-/**
- * Parse MIDlet-Name and MIDlet-Vendor parameters from JAD file.
- * Parameters are stored to iMIDletName and iMIDletVendor
- *
- * @param ETrue if parsing succeeds otherwise EFalse.
- */
-TBool CRestoreConvertMIDlet::ParseJadL(const TDesC& aJadFileName)
-{
-    HBufC *jadContent = NULL;
-    // Trap leave thrown if reading jad content fails
-    TRAPD(err, jadContent = GetJadContentL(aJadFileName));
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::ParseJadL Reading Jad content failed, error %d",
-              err);
-        return EFalse;
-    }
-    CleanupStack::PushL(jadContent);
-
-    HBufC *midletName = ParseAttribute(jadContent, KMidletName);
-    if (NULL == midletName)
-    {
-        ELOG(EJavaConverters,
-             "CRestoreConvertMIDlet::ParseJadL Parsing midlet name failed.");
-        CleanupStack::PopAndDestroy(jadContent);
-        return EFalse;
-    }
-    // store midlet name to member variable and log it
-    TPtr namePtr(iMIDletName->Des());
-    namePtr.Copy(*midletName);
-    LOG1WSTR(EJavaConverters, EInfo,
-             "CRestoreConvertMIDlet::ParseJadL MIDlet-Name %s",
-             (wchar_t *)(namePtr.PtrZ()));
-    delete midletName;
-
-    HBufC *midletVendor = ParseAttribute(jadContent, KMidletVendor);
-    if (NULL == midletVendor)
-    {
-        ELOG(EJavaConverters,
-             "CRestoreConvertMIDlet::ParseJadL Parsing midlet vendor failed.");
-        CleanupStack::PopAndDestroy(jadContent);
-        return EFalse;
-    }
-    // store midlet vendor to member variable and log it
-    TPtr vendorPtr(iMIDletVendor->Des());
-    vendorPtr.Copy(*midletVendor);
-    LOG1WSTR(EJavaConverters, EInfo,
-             "CRestoreConvertMIDlet::ParseJadL MIDlet-Vendor %s",
-             (wchar_t *)(vendorPtr.PtrZ()));
-    delete midletVendor;
-
-    CleanupStack::PopAndDestroy(jadContent);
-    return ETrue;
-}
-
-
-/**
- * Reads the whole content of the Jad file and returns it in
- * buffer in Symbian Unicode character set.
- * @param[in] aJadFile
- * @return pointer to HBufC that contains the Jad file,
- * ownership is transferred to caller
- * @exception If jad file content cannot be read
- */
-HBufC *CRestoreConvertMIDlet::GetJadContentL(const TDesC& aJadFileName)
-{
-    RFile jadFile;
-    TInt err = jadFile.Open(iFs, aJadFileName, EFileRead);
-    User::LeaveIfError(err);
-    CleanupClosePushL(jadFile);
-
-    // Reserve buffer for Jad in UTF-8 char set
-    TInt jadSize = 0;
-    err = jadFile.Size(jadSize);
-    User::LeaveIfError(err);
-    HBufC8 *bufUtf8Jad  = HBufC8::NewL(jadSize);
-    CleanupStack::PushL(bufUtf8Jad);
-
-    // Read the content in Utf8 char set
-    TPtr8 tmpPtr(bufUtf8Jad->Des());
-    err = jadFile.Read(tmpPtr, jadSize);
-    User::LeaveIfError(err);
-
-    // Convert to Unicode
-    HBufC *bufUnicodeJad =
-        CnvUtfConverter::ConvertToUnicodeFromUtf8L(*bufUtf8Jad);
-
-    CleanupStack::PopAndDestroy(bufUtf8Jad);
-    CleanupStack::PopAndDestroy(&jadFile);
-
-    // Return to caller
-    return bufUnicodeJad;
-}
-
-
-/**
- * Parse MIDlet-Name and MIDlet-Vendor parameters from Manifest inside
- * a .jar file.
- * Parameters are stored to iMIDletName and iMIDletVendor
- *
- * @param ETrue if parsing succeeds otherwise EFalse.
- */
-TBool CRestoreConvertMIDlet::ParseJarL(const TDesC& aJarFileName)
-{
-    HBufC *manifestContent = NULL;
-    // Trap leave thrown if reading Manifest content fails
-    TRAPD(err, manifestContent = GetManifestContentL(aJarFileName));
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::ParseJarL Reading Manifest failed, error %d",
-              err);
-        return EFalse;
-    }
-    CleanupStack::PushL(manifestContent);
-
-    HBufC *midletName = ParseAttribute(manifestContent, KMidletName);
-    if (NULL == midletName)
-    {
-        ELOG(EJavaConverters,
-             "CRestoreConvertMIDlet::ParseJarL Parsing midlet name failed.");
-        CleanupStack::PopAndDestroy(manifestContent);
-        return EFalse;
-    }
-    // store midlet name to member variable and log it
-    TPtr namePtr(iMIDletName->Des());
-    namePtr.Copy(*midletName);
-    LOG1WSTR(EJavaConverters, EInfo,
-             "CRestoreConvertMIDlet::ParseJarL MIDlet-Name %s",
-             (wchar_t *)(namePtr.PtrZ()));
-    delete midletName;
-
-    HBufC *midletVendor = ParseAttribute(manifestContent, KMidletVendor);
-    if (NULL == midletVendor)
-    {
-        ELOG(EJavaConverters,
-             "CRestoreConvertMIDlet::ParseJarL Parsing midlet vendor failed.");
-        CleanupStack::PopAndDestroy(manifestContent);
-        return EFalse;
-    }
-    // store midlet vendor to member variable and log it
-    TPtr vendorPtr(iMIDletVendor->Des());
-    vendorPtr.Copy(*midletVendor);
-    LOG1WSTR(EJavaConverters, EInfo,
-             "CRestoreConvertMIDlet::ParseJarL MIDlet-Vendor %s",
-             (wchar_t *)(vendorPtr.PtrZ()));
-    delete midletVendor;
-
-    CleanupStack::PopAndDestroy(manifestContent);
-    return ETrue;
-}
-
-
-/**
- * Reads the whole content of the Manifest inside Jar file
- * and returns it in buffer in Symbian Unicode character set.
- * @param[in] aJarFile
- * @return pointer to HBufC that contains the Manifest,
- * ownership is transferred to caller
- * @exception If Manifest content cannot be read
- */
-HBufC *CRestoreConvertMIDlet::GetManifestContentL(const TDesC& aJarFileName)
-{
-    CZipFile* zipFile = CZipFile::NewL(iFs, aJarFileName);
-    CleanupStack::PushL(zipFile);
-
-    // Seek manifest file
-    CZipFileMember* zippedFile =
-        zipFile->CaseSensitiveOrCaseInsensitiveMemberL(KManifestEntryName());
-    if (!zippedFile)
-    {
-        ELOG(EJavaConverters,
-             "CRestoreConvertMIDlet::GetManifestContentL Package is missing manifest");
-        User::Leave(KErrNotFound);
-    }
-    CleanupStack::PushL(zippedFile);
-
-    TUint uncompressedSize = zippedFile->UncompressedSize();
-    if ((TUint)uncompressedSize >= (KMaxTInt/2))
-    {
-        ELOG(EJavaConverters, "CRestoreConvertMIDlet::GetManifestContentL Invalid manifest");
-        User::Leave(KErrCorrupt);
-    }
-
-    // Buffer to read Manifest into
-    HBufC8* resultData = HBufC8::NewLC(uncompressedSize);
-
-    RZipFileMemberReaderStream* zippedStream = 0;
-    TInt err = zipFile->GetInputStreamL(zippedFile, zippedStream);
-    User::LeaveIfError(err);
-    CleanupStack::PushL(zippedStream);
-
-    TPtr8 ptr(resultData->Des());
-    User::LeaveIfError(zippedStream->Read(ptr, uncompressedSize));
-
-    CleanupStack::PopAndDestroy(zippedStream);
-
-    // Manifest buffer when converted to UCS-2
-    HBufC *manifestContent = HBufC16::NewL(uncompressedSize);
-    TPtr16 ucsPtr(manifestContent->Des());
-    err = CnvUtfConverter::ConvertToUnicodeFromUtf8(ucsPtr, ptr);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::GetManifestContentL UTF-8 to unicode"
-              " conversion failed: %d", err);
-        User::Leave(err);
-    }
-    CleanupStack::PopAndDestroy(resultData);
-    CleanupStack::PopAndDestroy(zippedFile);
-    CleanupStack::PopAndDestroy(zipFile);
-
-    // Return to caller
-    return manifestContent;
-}
-
-
-std::wstring CRestoreConvertMIDlet::IsSuiteInstalled(TPtr& aSuiteName, TPtr& aVendorName)
-{
-    std::wstring suiteName(desToWstring(aSuiteName));
-    std::wstring vendorName(desToWstring(aVendorName));
-    std::wstring suiteUid;
-
-    // Find application uid based on names from Java Storage
-    JavaStorage *js = JavaStorage::createInstance();
-
-    try
-    {
-        js->open(JAVA_DATABASE_NAME);
-
-        JavaStorageEntry attribute;
-        JavaStorageApplicationEntry_t findPattern;
-        JavaStorageApplicationList_t  foundEntries;
-
-        // Get ID from APPLICATION_PACKAGE_TABLE  based on PACKAGE_NAME and VENDOR
-        attribute.setEntry(PACKAGE_NAME, suiteName);
-        findPattern.insert(attribute);
-        attribute.setEntry(VENDOR, vendorName);
-        findPattern.insert(attribute);
-        attribute.setEntry(ID, L"");
-        findPattern.insert(attribute);
-
-        js->search(APPLICATION_PACKAGE_TABLE , findPattern, foundEntries);
-
-        // Anything found?
-        if (foundEntries.size() > 0)
-        {
-            // The application package has been found, get the ID of the package
-            suiteUid = foundEntries.front().begin()->entryValue();
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "CRestoreConvertMIDlet::IsSuiteInstalled: Found suite by name. Uid is %s",
-                     suiteUid.c_str());
-        }
-    }
-    catch (JavaStorageException& e)
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::IsSuiteInstalled: Java Storage exception %s", e.what());
-    }
-
-    try
-    {
-        js->close();
-    }
-    catch (JavaStorageException& e2)
-    {
-        WLOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::IsSuiteInstalled: Java Storage exception "
-              "when closing storage %s", e2.what());
-    }
-
-    delete js;
-
-    // suiteUid is empty if suite was not found
-    return suiteUid;
-}
-
-
-/**
- * Finds the java attribute specified by aAttributeName
- * from aBuf and returns the value of that attribute
- * in HBufC.
- * @param[in] aBuf contents of .jad / Manifest file
- * @param[in] aAttributeName the name of a java attribute
- * @return the value of the attribute. Caller gets the ownership of the
- * returned HBufC.
- * If the attribute is not found, returns NULL
- */
-HBufC *CRestoreConvertMIDlet::ParseAttribute(const HBufC *aBuf, const TDesC& aAttributeName)
-{
-    TInt    nInd(0);
-    TBool   fullNameFound(EFalse);
-    TUint32 ch;
-
-    // Start parsing from the beginning
-    TPtrC parsePtr = aBuf->Mid(nInd);
-
-    do
-    {
-        // Find attribute name
-        nInd = parsePtr.Find(aAttributeName);
-        if (nInd < 0)
-        {
-            // Returns NULL if the attribute cannot be found
-            return NULL;
-        }
-
-        // Check that the attribute name was preceded by line break or
-        // it was at the beginning
-        if (nInd == 0)
-        {
-            fullNameFound = ETrue;
-        }
-        else
-        {
-            ch = parsePtr[nInd-1];
-            if ((ch == CR) || (ch == LF))
-            {
-                fullNameFound = ETrue;
-            }
-            else
-            {
-                // Name was just a part of longer string (not 'word match')
-                fullNameFound = EFalse;
-                // Skip to the last character of the found match.
-                // We can skip because we are insterested only in 'word' matches
-                // so the next cannot start inside the area we are skipping now.
-                parsePtr.Set(parsePtr.Mid(nInd + aAttributeName.Length() - 1));
-                continue;
-            }
-        }
-
-        // Check whether buffer ends after attribute name
-        if (nInd + aAttributeName.Length() >= parsePtr.Length())
-        {
-            // Buffer ends immediately after the found
-            // attribute name instance. No attribute value
-            return NULL;
-        }
-
-        // Check that there is a white space character or colon after
-        // attribute name
-        ch = parsePtr[nInd + aAttributeName.Length()];
-        if ((ch == COLON) || (ch == SP) || (ch == HT))
-        {
-            fullNameFound = ETrue;
-        }
-        else
-        {
-            // Name was just a part of longer string (not 'word match')
-            fullNameFound = EFalse;
-            // Skip to the next character after the found match
-            parsePtr.Set(parsePtr.Mid(nInd + aAttributeName.Length()));
-            continue;
-        }
-    }
-    while (!fullNameFound);
-
-    // Skip to the end of the attribute name and find ':' after the name.
-    // The skipped characters must be white space chacraters, otherwise
-    // the attribute name is illegal and Java Installer will not accept
-    // the Jad file / Manifest.
-    parsePtr.Set(parsePtr.Mid(nInd + aAttributeName.Length() - 1));
-    nInd = parsePtr.Locate(COLON);
-    if (nInd < 0)
-    {
-        return NULL;
-    }
-    nInd++;
-
-    // Parse attribute value (CR or LF ends)
-    TInt nEndInd = parsePtr.Locate(CR);
-    TInt nTmpInd = parsePtr.Locate(LF);
-
-    if (KErrNotFound == nEndInd)
-    {
-        nEndInd = parsePtr.Length() - 1;
-    }
-    if (KErrNotFound == nTmpInd)
-    {
-        nTmpInd = parsePtr.Length() - 1;
-    }
-
-    if (nTmpInd < nEndInd)
-    {
-        nEndInd = nTmpInd;
-    }
-
-    if (nEndInd < nInd)
-    {
-        return NULL;
-    }
-
-    TPtrC attributeValue = parsePtr.Mid(nInd, (nEndInd - nInd));
-
-    // Remove possible white space from the beginning and end of the value
-    HBufC *bufValue = attributeValue.Alloc();
-    if (NULL == bufValue)
-    {
-        return NULL;
-    }
-    TPtr value = bufValue->Des();
-    value.Trim();
-
-    return bufValue;
-} // parseAttribute
-
-
-/**
- * Uninstall all Java 2.x MIDlets from drive given in aDrive
- *
- * @param aDrive uninstallation drive
- */
-void CRestoreConvertMIDlet::UninstallAllFromDriveL(TDriveNumber &aDrive)
-{
-    // Execute Java Installer with uninstallall -drive=X command line options
-
-    LOG1(EJavaConverters, EInfo,
-         "CRestoreConvertMIDlet::UninstallAllFromDriveL Going to uninstall "
-         "MIDlets from drive number %d", aDrive);
-
-    RProcess rJavaInstaller;
-    TBuf<256> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    commandLine = _L("javainstallerstarter");
-    commandLine.Append(_L(" uninstallall -forceuninstall -captainmsgs=no"));
-
-    // Run installer silently, do not send uninstall notification messages
-    commandLine.Append(_L(" -silent -skipotastatus -drive="));
-
-    // Add drive letter
-    commandLine.Append((TChar)('A' + aDrive));
-
-    // start JavaInstaller
-#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("j9midps60");
-#else // RD_JAVA_S60_RELEASE_5_0_IAD
-    TBuf<128> processName = _L("javamidp");
-#endif // RD_JAVA_S60_RELEASE_5_0_IAD
-
-    TInt err = rJavaInstaller.Create(processName, commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::UninstallAllFromDriveL calling Rendezvous");
-        // This call will wait until Java Installer exits (or panics)
-        TRequestStatus status;
-        rJavaInstaller.Logon(status);
-
-        LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::UninstallAllFromDriveL calling Resume");
-        rJavaInstaller.Resume();
-
-        // now wait until Java Installer exits
-        User::WaitForRequest(status);
-        if (status.Int() != KErrNone)
-        {
-            ELOG1(EJavaConverters,
-                  "CRestoreConvertMIDlet::UninstallAllFromDriveL Installer exited with error %d",
-                  status.Int());
-        }
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::UninstallAllFromDriveL Cannot start Installer, error %d", err);
-    }
-
-    LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::UninstallAllFromDriveL calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-}
-
-
-/**
- * Scan the content of one directory entry and add the name of
- * .jad / .jar /.dcf/.dm file to iInstallFiles if
- * the directory contains a valid, installed Java application.
- * Recognizes also DRM protected jar files (.dm, .dcf)
- *
- * @param aSuitePathName -  directory to be scanned.
- * @param aSuiteDirEntryList - contents of the directory
- * @exception Unable to alloc memory for the internal buffers.
- */
-void CRestoreConvertMIDlet::AddJadJarToInstallFilesL(
-    const TFileName &aSuitePathName,
-    const CDir *aSuiteDirEntryList)
-{
-    if (NULL == aSuiteDirEntryList)
-    {
-        return;
-    }
-
-    TInt nCount = aSuiteDirEntryList->Count();
-    if (0 == nCount)
-    {
-        return;
-    }
-
-    TInt        suffixPos;
-    TEntry      dirEntry;
-    TBool       jarFileInSuiteDir = EFalse;
-    TBool       jadFileInSuiteDir = EFalse;
-    TFileName   jadFullPathName;
-    TFileName   jarFullPathName;
-
-    for (TInt nInd = 0; nInd < nCount; nInd++)
-    {
-        dirEntry = (*aSuiteDirEntryList)[nInd];
-        // Directory cannot be Jar file.
-        // Empty file cannot valid Jar file
-        if (dirEntry.IsDir() || (dirEntry.iSize == 0))
-        {
-            continue;
-        }
-        // get the suffix of the name
-        suffixPos = dirEntry.iName.LocateReverse('.');
-        if (suffixPos == KErrNotFound)
-        {
-            // File name does not contain '.' char
-            continue;
-        }
-        TPtrC suffix(dirEntry.iName.Mid(suffixPos));
-
-        // if the name ends with ".jar" the name is current candidate
-        // for the name to be added to iInstallFiles list
-        if (suffix.CompareF(KJarFileNameSuffix) == 0)
-        {
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KJadFileNameSuffix) == 0)
-        {
-            // If .jad file is found, then it will be added
-            // to iInstallFiles list
-            jadFullPathName = aSuitePathName;
-            jadFullPathName.Append(dirEntry.iName);
-            jadFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KFLJarFileNameSuffix) == 0)
-        {
-            // forward locked and combined delivery DRM protected
-            // .jar files have suffix ".dm"
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-        else if (suffix.CompareF(KSDJarFileNameSuffix) == 0)
-        {
-            // separate delivery DRM protected .jar files have suffix ".dcf"
-            jarFullPathName = aSuitePathName;
-            jarFullPathName.Append(dirEntry.iName);
-            jarFileInSuiteDir = ETrue;
-        }
-    }
-
-    // If directory contains a Jar file, then add something to iInstallFiles
-    if (jarFileInSuiteDir)
-    {
-        // If directory contains also .jad file, add .jad file name to iInstallFiles
-        if (jadFileInSuiteDir)
-        {
-            // Reserve one char for null terminator
-            HBufC* path = HBufC::NewLC(jadFullPathName.Length() + 1);
-            TPtr pathPtr(path->Des());
-            pathPtr.Append(jadFullPathName);
-
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "CRestoreConvertMIDlet::AddJadJarToInstallFilesL Adding jad file %s",
-                     (wchar_t *)(pathPtr.PtrZ()));
-            iInstallFiles.Append(path);
-            CleanupStack::Pop(path);
-            iIsJad.AppendL(1);
-        }
-        else
-        {
-            // Reserve one char for null terminator
-            HBufC* path = HBufC::NewLC(jarFullPathName.Length() + 1);
-            TPtr pathPtr(path->Des());
-            pathPtr.Append(jarFullPathName);
-
-            LOG1WSTR(EJavaConverters, EInfo,
-                     "CRestoreConvertMIDlet::AddJadJarToInstallFilesL Adding jar file %s",
-                     (wchar_t *)(pathPtr.PtrZ()));
-            iInstallFiles.Append(path);
-            CleanupStack::Pop(path);
-            iIsJad.AppendL(0);
-        }
-    }
-}
-
-/**
- * Start Java Installer in poll mode and then wait until it exits.
- */
-void CRestoreConvertMIDlet::RunJavaInstallerL()
-{
-    LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::RunJavaInstaller");
-
-    RProcess rJavaInstaller;
-    TFileName fileName;
-    TInt err;
-    // Max one path name, user name and password and some options ->
-    // 1536 is enough
-    TBuf<1536> commandLine;
-
-    // Build command line used to pass all necessary info to Java Installer
-    std::auto_ptr<HBufC> installerStarterDll(
-        stringToDes(java::runtime::JAVA_INSTALLER_STARTER_DLL));
-    commandLine = installerStarterDll->Des();
-    commandLine.Append(_L(" poll -address=convert"));
-
-    // Run installer silently
-    commandLine.Append(_L(" -silent -skipotastatus -silentconversion"));
-
-    // Convert old S60 applications so that applications uids,
-    // private data and RMS data are all preserved
-    commandLine.Append(_L(" -convert=yes"));
-
-    // Upgrading MIDlets is allowed
-    commandLine.Append(_L(" -upgrade=yes"));
-
-    // No OCSP checks for converted MIDlets
-    commandLine.Append(_L(" -ocsp=no"));
-
-    // Allow upgrade even if version number has not increased
-    commandLine.Append(_L(" -overwrite=yes"));
-
-    // Downloading .jar is not allowed.
-    commandLine.Append(_L(" -download=no"));
-
-    // If upgrade install, automatically upgrade also the data
-    commandLine.Append(_L(" -upgrade_data=yes"));
-
-    // MIDlets must be restored to the original drive
-    if (iDrive > -1)
-    {
-        TChar targetDrive;
-        err = RFs::DriveToChar(iDrive, targetDrive);
-        if (KErrNone == err)
-        {
-            commandLine.Append(_L(" -drive="));
-            commandLine.Append(targetDrive);
-        }
-    }
-
-    // start JavaInstaller
-    std::auto_ptr<HBufC> installerProcess(
-        stringToDes(java::runtime::JAVA_PROCESS));
-    err = rJavaInstaller.Create(installerProcess->Des(), commandLine);
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::RunJavaInstaller calling Rendezvous");
-        // This call will wait until Java Installer exits (or panics)
-        rJavaInstaller.Logon(iStatus);
-
-        LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::RunJavaInstaller calling Resume");
-        rJavaInstaller.Resume();
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::RunJavaInstaller Cannot start Installer, error %d", err);
-        // CActive will trap the following leave, execution will go to RunError
-        User::Leave(err);
-    }
-
-    LOG(EJavaConverters, EInfo, "CRestoreConvertMIDlet::RunJavaInstaller calling RProcess::Close");
-    // free resources before returning
-    rJavaInstaller.Close();
-
-    // now wait until Java Installer exits
-    SetActive();
-}
-
-/**
- * To cleanup member variables.
- */
-void CRestoreConvertMIDlet::FullCleanup()
-{
-    iDirs.ResetAndDestroy();
-    iInstallFiles.ResetAndDestroy();
-    iUninstallUids.clear();
-    iIsJad.Reset();
-}
-
-
-/**
- * Checks all local drives in the device and stores the DriveInfo API drive
- * status information for each drive to iDriveStatuses
- * @exception Cannot get drive list.
- */
-void CRestoreConvertMIDlet::GetAllDeviceDrivesL()
-{
-    TDriveList driveList;
-    // get all drives
-    TInt err = iFs.DriveList(driveList);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "CRestoreConvertMIDlet::GetAllDeviceDrives cannot get drive list, err %d", err);
-        User::Leave(err);
-    }
-
-    // store status of the non-remote, non-substed drives
-    TUint  status = 0;
-    for (TInt drive = 0; drive < KMaxDrives; drive++)
-    {
-        iDriveStatuses[drive] = 0;
-
-        if (driveList[drive] == 0)
-        {
-            // no such drive in this device
-            continue;
-        }
-
-        err = DriveInfo::GetDriveStatus(iFs, drive, status);
-        if (KErrNone != err)
-        {
-            ELOG2(EJavaConverters,
-                  "CRestoreConvertMIDlet::GetAllDeviceDrivesL cannot get drive %d status, err %d",
-                  drive, err);
-            User::Leave(err);
-        }
-        // D drive is temporary RAM drive, skip it
-        // Drives J to Y are substed or remote drives, skip them
-        if ((drive == EDriveD) || ((drive >= EDriveJ) && (drive <= EDriveY)))
-        {
-            continue;
-        }
-
-        iDriveStatuses[drive] = status;
-    }
-}
--- a/javatools/javarestoreconverter/src.s60/restoreconvertmidlet.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Java platform 2.0 javarestoreconverter process
-*
-*/
-
-
-#ifndef RESTORECONVERTMIDLET_H
-#define RESTORECONVERTMIDLET_H
-
-#include <f32file.h>
-#include <e32base.h>
-#include <javasymbianoslayer.h>
-
-#include "restoreserver.h"
-
-/**
- * The main active object of Java Restore Converter that is executed once
- * to when old S60 MIDlets have been restored to device and they must be
- * conversion installed to OMJ Java applications
- *
- * This active object is activated from the process main() after the
- * active scheduler has been created.
- */
-class CRestoreConvertMIDlet : public CActive
-{
-    enum TRestorationState
-    {
-        EFindOutDeviceDrives,
-        EGetDriveToBeScanned,
-        EAppsInInstalledDirectories,
-        EUninstallFromOMJ,
-        EExecuteRestoreServer,
-        EExit
-    };
-
-public:
-    static CRestoreConvertMIDlet* NewLC(RFs& aFs);
-
-    void CompleteRequest();
-    ~CRestoreConvertMIDlet();
-    void Start();
-
-protected:
-    // From CActive
-    void RunL();
-    void DoCancel();
-    TInt RunError(TInt aError);
-
-private:
-    void Exit();
-    CRestoreConvertMIDlet(RFs& aFs);
-    void ConstructL();
-    void GetInstallFilesL(RPointerArray<HBufC>& aDirs);
-    void FindRemainingMIDletsToBeUninstalledL();
-    void UninstallAllFromDriveL(TDriveNumber &aDrive);
-    void RunJavaInstallerL();
-    void RemoveDataFile();
-    void FullCleanup();
-    void AddJadJarToInstallFilesL(
-        const TFileName &aSuitePathName,
-        const CDir *aSuiteDirEntryList);
-    void GetAllDeviceDrivesL();
-
-    // Parse MIDlet-Name and MIDlet-Vendor parameters from .jad file.
-    TBool ParseJadL(const TDesC& aJadFileName);
-    // Parse MIDlet-Name and MIDlet-Vendor parameters from Manifest.
-    TBool ParseJarL(const TDesC& aJarFileName);
-    // Return the uid of the suite if it has been installed,
-    // wstring is empty if suite was not found
-    std::wstring IsSuiteInstalled(TPtr& aSuiteName, TPtr& aVendorName);
-    // Reads the whole content of the Jad file and returns it in
-    // buffer in UCS-2 character set.
-    HBufC *GetJadContentL(const TDesC& aJadFileName);
-    // Reads the whole content of the Manifest inside the Jar file
-    // and returns it in buffer in UCS-2 character set.
-    HBufC *GetManifestContentL(const TDesC& aJarFileName);
-    // Finds the java attribute specified by aAttributeName
-    // from aBuf and returns the value of that attribute
-    // in HBufC.
-    HBufC *ParseAttribute(const HBufC *aBuf, const TDesC& aAttributeName);
-
-private:
-    RFs& iFs;
-    TDriveNumber iDrive;
-    RArray<TInt> iIsJad;
-    RPointerArray<HBufC> iDirs;
-    RPointerArray<HBufC> iInstallFiles;
-    std::vector<std::wstring> iUninstallUids;
-    // Buffer used for parsing midlet name from jad / Manifest
-    HBufC* iMIDletName;
-    // Buffer used for parsing midlet vendor from jad / Manifest
-    HBufC* iMIDletVendor;
-    TInt iFileIndex;
-    TRestorationState iState;
-    RestoreServer* iConvertServer;
-
-    // contains the drive status info for each non-remote, non-substed drive
-    // on device
-    TUint iDriveStatuses[KMaxDrives];
-    TInt iNumberOfAppsToInstall;
-};
-
-#endif // RESTORECONVERTMIDLET_H
--- a/javatools/javarestoreconverter/src.s60/restoreserver.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Comms server,
-*    part of Java platform 2.0 javarestoreconverter process
-*
-*/
-
-
-#include <iostream>
-#include <unistd.h>
-
-#include "comms.h"
-#include "javasymbianoslayer.h"
-#include "logger.h"
-#include "restoreserver.h"
-
-using namespace java::comms;
-using namespace std;
-
-RestoreServer::RestoreServer()
-{
-}
-
-RestoreServer::~RestoreServer()
-{
-    iInstallFiles.clear();
-    iUninstallUids.clear();
-}
-
-void RestoreServer::setOperations(
-    RPointerArray<HBufC> &aInstallFiles,
-    std::vector<std::wstring> &aUninstallUids)
-{
-    // file index will contain the number of valid install file urls
-    iFileIndex = 0;
-    // clear the old install file paths if any
-    iInstallFiles.clear();
-
-    int nPointers = aInstallFiles.Count();
-    iInstallFiles.reserve(nPointers);
-
-    for (int i = 0; i < nPointers; i++)
-    {
-        HBufC* pBuf = aInstallFiles[i];
-        if (NULL == pBuf)
-        {
-            // skip this NULL pointer
-            continue;
-        }
-
-        TPtr16 ptrName(pBuf->Des());
-        // Convert each HBufC to std:wstring before adding to iInstallFiles
-        iInstallFiles.push_back(std::wstring(desToWstring(ptrName)));
-        iFileIndex++;
-    }
-
-    LOG1(EJavaConverters, EInfo, "RestoreServer: number of install files = %d", iFileIndex);
-    iFilesTotal = iFileIndex;
-    iFileIndex = 0;
-
-    iUidIndex = 0;
-    iUninstallUids = aUninstallUids;
-    iUidsTotal = iUninstallUids.size();
-    LOG1(EJavaConverters, EInfo, "RestoreServer: uninstall %d suites", iUidsTotal);
-}
-
-int RestoreServer::start()
-{
-    LOG(EJavaConverters, EInfo, "RestoreServer:start called");
-
-    iRunning = 1;
-    iComms.registerDefaultListener(this);
-    // Using the same Comms endpoint as javaappconverter on purpose
-    return iComms.start(IPC_ADDRESS_JAVA_APPCONVERTER_C);
-}
-
-int RestoreServer::stop()
-{
-    if (iRunning > 0)
-    {
-        iRunning = 0;
-        iComms.unregisterDefaultListener(this);
-        return iComms.stop();
-    }
-    else
-    {
-        return 0;
-    }
-}
-
-/**
- * Communicates with Java Installer. The following messages are used.
- *
- * Message Name        Id      Contents
- *
- * Get Next Operation  500     None
- *
- * Operation           501     int operation   (install = 0, uninstall = 1, exit = 2)
- *                             String url      (present if operation = install)
- *                             String uid      (present if operation = uninstall)
- *                             int current     (1..total, present if operation = install
- *                                              and caller is appconverter)
- *                             int total       (total number of apps to convert, present
- *                                              if operation = install and caller is appconverter)
- *
- * Operation Result    502     int operation   (install = 0, uninstall = 1, exit = 2)
- *                             int result      (ok = 0, error codes are negative)
- *                             int uidCount    (present if operation = install, value = uids.length)
- *                             String[] uids   (present if operation = install)
- */
-void RestoreServer::processMessage(CommsMessage& aMessage)
-{
-    LOG1(EJavaConverters, EInfo, "RestoreServer::processMessage, sender    = %d", aMessage.getSender());
-    LOG1(EJavaConverters, EInfo, "RestoreServer::processMessage, messageId = %d", aMessage.getMessageId());
-
-    switch (aMessage.getMessageId())
-    {
-    case GET_NEXT_OPERATION_MESSAGE_ID:
-    {
-        // Java Installer asks for the next install operation.
-        // Reply with 'Operation' message.
-
-        CommsMessage reply;
-        reply.replyTo(aMessage);
-
-        reply.setMessageId(OPERATION_MESSAGE_ID);
-
-        if (iUidIndex < iUidsTotal)
-        {
-            // ask Java Installer to uninstall next
-            reply << UNINSTALL_OPERATION << iUninstallUids[iUidIndex];
-            iUidIndex++;
-        }
-        else if (iFileIndex >= iFilesTotal)
-        {
-            // all install files have been handled, ask Java Installer to exit
-            reply << EXIT_OPERATION;
-
-            // Java Installer sends reply to 'exit' message and then
-            // it exits which wakes up javaappconverter main thread
-        }
-        else
-        {
-            // ask Java Installer to install next
-            reply << INSTALL_OPERATION << iInstallFiles[iFileIndex] << iFileIndex << iFilesTotal;
-            iFileIndex++;
-        }
-
-        int err = iComms.send(reply);
-        if (err != 0)
-        {
-            ELOG1(EJavaConverters,
-                  "RestoreServer: Sending reply to Java Installer failed, err %d", err);
-            // Propably Java Installer has crashed and the execution of
-            // CRestoreConvertMIDlet is already proceeding. This server will
-            // be stopped when the execution reaches EExit state.
-        }
-    }
-    break;
-
-    case OPERATION_RESULT_MESSAGE_ID:
-    {
-        // Log the result of the operation. Javarestoreconverter does not need
-        // the Uids of the installed Java Applications so they are not parsed.
-        int operation;
-        int result;
-
-        aMessage >> operation >> result;
-
-        LOG2(EJavaConverters, EInfo,
-             "RestoreServer: operation = %d, result = %d", operation, result);
-
-        if (result < 0)
-        {
-            // Conversion failed.
-            ELOG2(EJavaConverters, "RestoreServer: Converting (installing) "
-                  "application number %d failed with code %d",
-                  iFileIndex, result);
-        }
-    }
-    break;
-
-    default:
-    {
-        // Unknown message. Ignore it.
-        WLOG1(EJavaConverters,
-              "RestoreServer: Unknown message received. Msg Id = %d",
-              aMessage.getMessageId());
-    }
-    break;
-    }
-}
--- a/javatools/javarestoreconverter/src.s60/restoreserver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Comms server, part of Java platform 2.0 javarestoreconverter process
-*               When started  in 'poll' mode Java Installer connects to
-*               this server to get install commands.
-*
-*/
-
-
-#ifndef RESTORESERVER_H
-#define RESTORESERVER_H
-
-#include <string>
-#include <vector>
-
-#include "commslistener.h"
-#include "commsserverendpoint.h"
-#include "commsmessage.h"
-
-using namespace java::comms;
-
-/**
- * The messages known by Restore Server
- */
-
-const int GET_NEXT_OPERATION_MESSAGE_ID = 500;
-const int OPERATION_MESSAGE_ID = 501;
-const int OPERATION_RESULT_MESSAGE_ID = 502;
-
-/**
- * The known operations inside messages
- */
-
-const int INSTALL_OPERATION = 0;
-const int UNINSTALL_OPERATION = 1;
-const int EXIT_OPERATION = 2;
-
-class RestoreServer : public CommsListener
-{
-public:
-    RestoreServer();
-    virtual ~RestoreServer();
-
-    void setOperations(
-        RPointerArray<HBufC> &aInstallFiles, std::vector<std::wstring> &aUninstallUids);
-
-    // CommsListener methods
-    virtual void processMessage(CommsMessage& aMessage);
-
-    int start();
-    int stop();
-
-    CommsEndpoint* getComms()
-    {
-        return &iComms;
-    }
-
-private:
-    int iRunning;   // 1 if running, 0 if not running
-    int iFileIndex;
-    int iFilesTotal;
-    std::vector<std::wstring> iInstallFiles;
-    int iUidIndex;
-    int iUidsTotal;
-    std::vector<std::wstring> iUninstallUids;
-    CommsServerEndpoint iComms;
-};
-
-#endif // RESTORESERVER_H
--- a/javatools/javarestoreconverter/tsrc/testrestorestart/build/testrestorestart.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE=app
-TARGET=testrestorestart
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.UID2          = 0
-    TARGET.UID3          = 0x23E1E262
-    TARGET.CAPABILITY    = WriteDeviceData
-
-    LIBS +=  -lestor -lapparc -lapgrfx -lefsrv
-}
-
-include(../../../../../build/omj.pri)
--- a/javatools/javarestoreconverter/tsrc/testrestorestart/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: start javarestoreconverter for testing
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <apgcli.h> // for RApaLsSession
-#include <e32property.h>
-#include <swinstallerinternalpskeys.h>
-#include <apacmdln.h> //CApaCommandLine
-#include <s32mem.h>   // RDesWriteStream
-#include <stdio.h>
-#include <s60commonutils.h>
-
-#include "javauids.h"
-#include "logger.h"
-
-_LIT(KJavaRestoreConverterExe, "javarestoreconverter.exe");
-
-/**
- *
- */
-static void simpleStartL()
-{
-    LOG(EJavaConverters, EInfo,
-        "testrestorestart: startByJavaLauncherSimple: Going to start javarestoreconverter.exe");
-
-
-    // Create one process using this command line
-    RProcess rProcess;
-    // start
-    TInt err = rProcess.Create(KJavaRestoreConverterExe, _L("-driveC"));
-    if (KErrNone == err)
-    {
-        LOG(EJavaConverters, EInfo, "testrestorestart: simpleStartL calling Rendezvous");
-        // This call will wait until process exits (or panics)
-        TRequestStatus status;
-        rProcess.Logon(status);
-
-        LOG(EJavaConverters, EInfo, "testrestorestart: simpleStartL calling Resume");
-        rProcess.Resume();
-
-        // now wait until javalauncher exits
-        User::WaitForRequest(status);
-        if (status.Int() != KErrNone)
-        {
-            ELOG1(EJavaConverters,
-                  "testrestorestart: simpleStartL javarestoreconverter exited with error %d",
-                  status.Int());
-        }
-    }
-    else
-    {
-        ELOG1(EJavaConverters,
-              "testrestorestart: simpleStartL Cannot start javaestoreconverter, error %d", err);
-    }
-
-    LOG(EJavaConverters, EInfo, "testrestorestart: simpleStartL calling RProcess::Close");
-
-    rProcess.Close();
-
-}
-
-/**
- * Create cleanup stack and run the cleaner code inside TRAP harness
- * to log unexpected leaves.
- */
-TInt E32Main()
-{
-    __UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-
-
-
-    TRAPD(err, simpleStartL());
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters, "testrestorestart: simpleStartL leaved with err %d", err);
-    }
-
-    delete cleanupStack;
-    __UHEAP_MARKEND;
-    return KErrNone;
-}
-// eof
--- a/javatools/javasecuritycustomization/build/javasecuritycustomization_0x20028786.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/javasecuritycustomization/build/javasecuritycustomization_0x20028786.mmp	Tue May 25 12:34:19 2010 +0300
@@ -76,6 +76,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		AllFiles 
@@ -97,10 +109,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javatools/javasecuritycustomization/javasecuritycustomizationtool.pl	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/javasecuritycustomization/javasecuritycustomizationtool.pl	Tue May 25 12:34:19 2010 +0300
@@ -64,6 +64,7 @@
 my $pkg_file_name;
 my $pkg_name;
 my $package_type;
+my $s60_version;
 my $signed_sis                                     = "false";
 my $ROM                                            = "rom";
 my $SIS                                            = "sis";
@@ -87,6 +88,7 @@
 my $REMOVABLE_PACKAGE_TYPE                         = ",(0x2001FD68), 1,0,0, TYPE=SP,RU\n%{\"Nokia\"}\n:\"Nokia\"\n[0x1028315F], 0, 0, 0, {\"Series60ProductID\"}\n";
 # IBY and PKG data
 my $CERTS_DATACAGE                                 = "\\private\\200211dc\\security\\trustroots\\device\\certificates\\";
+my $CERTS_DEST                                     = "\\resource\\java\\security\\trustroots\\";
 my $CERTS_STATE_DATACAGE                           = "\\private\\200211dc\\security\\trustroots\\device\\state\\";
 my $POLICIES_DATACAGE_SRC                          = "\\resource\\java\\security\\policies\\";
 my $POLICIES_DATACAGE_SRC_5_0                      = "\\private\\102033E6\\resource\\security\\policies\\";
@@ -418,7 +420,8 @@
     open (POLICY_FILE, "+>tmp/update_certs") or die "Cannot create tmp file (tmp/update_certs)\n";
     close POLICY_FILE;
   }
-
+  
+  open (MIDPROOTSLIST_FILE, "+>tmp/midprootslist") or die "Cannot create temp file (tmp/certs/midprootslist)\n";
   foreach my $root (@{$xmldata->{root}}) {
     
       # read the xml node
@@ -584,51 +587,69 @@
       }
       else
       {
+          print MIDPROOTSLIST_FILE $root_file_with_ext;       
+          print MIDPROOTSLIST_FILE "\n";       
           print PKG_FILE   "\"./tmp/certs/";
           print PKG_FILE   $root_file_with_ext;
-          print PKG_FILE   "\"-\"c:" . "$CERTS_DATACAGE";
+          if ($s60_version eq "5.0")
+          {
+              print PKG_FILE   "\"-\"c:" . "$CERTS_DATACAGE";
+          }
+          else
+          {
+              print PKG_FILE   "\"-\"c:" . "$CERTS_DEST";
+          }
           print PKG_FILE   $root_file_with_ext;
           print PKG_FILE   "\"\n\"./tmp/certs/";
           print PKG_FILE   $root_file_without_ext;
-          print PKG_FILE   "$METADATA_EXT\"-\"c:" ."$CERTS_DATACAGE";
+          if ($s60_version eq "5.0")
+          {
+              print PKG_FILE   "$METADATA_EXT\"-\"c:" ."$CERTS_DATACAGE";
+          }
+          else
+          {
+              print PKG_FILE   "$METADATA_EXT\"-\"c:" ."$CERTS_DEST";
+          }
           print PKG_FILE   $root_file_without_ext;
           print PKG_FILE   "$METADATA_EXT\"\n";
-          if ($root_state ne "")
+          open (STATE_FILE, "+>tmp/certs/$root_file_without_ext$STATE_EXT") or die "Cannot create temp file (tmp/certs/$root_file_without_ext$STATE_EXT)\n";
+          binmode STATE_FILE;
+          my $state;
+          if ($root_state eq "enabled" || $root_state eq "")
           {
-              open (STATE_FILE, "+>tmp/certs/$root_file_without_ext$STATE_EXT") or die "Cannot create temp file (tmp/certs/$root_file_without_ext$STATE_EXT)\n";
-              binmode STATE_FILE;
-              my $state;
-              if ($root_state eq "enabled")
+            $state = pack("h8", "3000");
+          }
+          else
+          {
+              if ($root_state eq "disabled")
               {
-                $state = pack("h8", "3000");
+                $state = pack("h8", "2000");
               }
               else
               {
-                  if ($root_state eq "disabled")
-                  {
-                    $state = pack("h8", "2000");
-                  }
-                  else
-                  {
-                     if ($root_state eq "removed")
-                     {
-                        $state = pack("h8", "1000");
-                     }
+                 if ($root_state eq "removed")
+                 {
+                    $state = pack("h8", "1000");
                   }
               }
-              print STATE_FILE $state;
-              close STATE_FILE;
-              print PKG_FILE   "\"./tmp/certs/";
-              print PKG_FILE   $root_file_without_ext;
-              print PKG_FILE   "$STATE_EXT\"-\"c:" ."$CERTS_STATE_DATACAGE";
-              print PKG_FILE   $root_file_without_ext;
-              print PKG_FILE   "$STATE_EXT\"\n";
           }
+          print STATE_FILE $state;
+          close STATE_FILE;
+          print PKG_FILE   "\"./tmp/certs/";
+          print PKG_FILE   $root_file_without_ext;
+          print PKG_FILE   "$STATE_EXT\"-\"c:" ."$CERTS_STATE_DATACAGE";
+          print PKG_FILE   $root_file_without_ext;
+          print PKG_FILE   "$STATE_EXT\"\n";
       }
   }
+  close MIDPROOTSLIST_FILE;
  	if ($deployment_destination eq $SIS)
  	{
     print PKG_FILE   "\"./tmp/update_certs\"-\"c:\\private\\102033E6\\security\\tmp\\update_certs\"\n";
+    if ($s60_version ne "5.0")
+    {
+        print PKG_FILE   "\"./tmp/midprootslist\"-\"c:\\resource\\java\\security\\trustroots\\midprootslist\"\n";
+    }
   }
   if ($deploy == 1)
   {
@@ -714,7 +735,6 @@
  	
   # read the xml node
   $policy_name = $xmldata->{policy}->{name};
-  $s60_version = $xmldata->{s60_version};
   $utp_policy_path = $xmldata->{policy}->{unidentifiedthirdparty};
   $ttp_policy_path = $xmldata->{policy}->{identifiedthirdparty};
   $operator_policy_path = $xmldata->{policy}->{operator};
@@ -1171,6 +1191,7 @@
     $signing_key = $xmldata->{signing}->{key};
  
     $package_type = $xmldata->{deploytype};
+    $s60_version = $xmldata->{s60_version};
     if (($package_type ne "") && ($package_type ne "removable") && ($package_type ne "non-removable"))
     {
         print "\nERROR: when specified, the type of the deployment package can have one of the two values: 'removable' or 'non-removable'. Please check the configuration file $config_file\n";
--- a/javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java	Tue May 25 12:34:19 2010 +0300
@@ -38,51 +38,14 @@
 
 /**
  * Utility class for parsing security policy files from external/txt format
- * into internal format. The external format of the policy consists of a number
- * of "grant" clauses; each clause identifies the condition under which it is
- * granted and contains one or more Permissions.
- * Permissions which must be granted by the user using a single set of prompts
- * form a "grant user" clause that includes the function group name and a list
- * of the initial and other available user permission interaction modes. The
- * first listed mode is the initial mode.
- * The general form of the format is :
- * <ul>
- * <li>The domain described by name optionally followed by the distinguished
- * names of the corresponding Protection Domain Root Certificates.
- * <li>One or more grant clauses
- * <li>Each grant clause MUST include a directive to scope the permissions to
- * be Allowed, User or Assigned.
- * <li><li>A User grant MUST include a name, the initial and other interaction
- * modes. The permissions are granted only if the application has requested the
- * permission and the user replies positively to a prompt.
- * <li><li><li>The name is used to identify the user grant clause.
- * <li><li><li>The initial and other available interaction modes MUST be
- * supplied and may be one of “oneshot”, “session”, or “blanket”.
- * <li><li><li>All Permissions in a single grant share the same initial and
- * available user interaction modes. When the user grants access to one
- * permission in a “grant user” group they also grant access to all other
- * permissions in the same group with the same interaction mode. For oneshot,
- * this has little effect because the user is prompted for each API access.
- * For session and blanket, the grant is allowed until the end of the session,
- * the application is deleted, or the users changes the security settings for
- * the MIDlet suite.
- * <li><li>An Allowed grant contains a name and permissions that are granted
- * only if the application has requested the permission.
- * <li><li>An Assigned grant group contains permissions that are assigned to
- * all applications in the protection domain.
- * <li>Each grant group includes one or more Permissions, each permission is
- * the name of a subclass of java.security.Permission optionally followed by
- * arguments for name and action.
- * </ul>
+ * into internal format.
+ *
+ * External Policy Format:
  *
- * BNF for External Domain Policy:
- *
- * grammar domain_policy;
- * domain_policy: domain+;
- * domain: 'domain' Identifier root_dn_subjects? ';' grant+;
- * root_dn_subjects: Identifier ( ',' Identifier )* ;
+ * policy: domain+;
+ * domain: 'domain' Identifier ';' grant+;
  * grant: 'grant' (grant_user | grant_allowed | grant_assigned);
- * grant_allowed: 'allowed' grant_name permissions;
+ * grant_allowed: 'allowed' permissions;
  * grant_assigned: 'assigned' permissions;
  * grant_user: 'user' grant_name initial_mode other_modes permissions;
  * grant_name: '"' Identifier '"';
@@ -94,12 +57,9 @@
  * initial_mode: interaction_mode;
  * other_modes: (',' interaction_mode)*;
  * interaction_mode: 'blanket' | 'session' | 'oneshot';
- * start : .+;
  * ALPHA: ('a'..'z'|'A'..'Z');
  * DIGIT: '0'..'9';
- * SYMBOL : ('*' | ':' | '/' );
  * Identifier: ALPHA (ALPHA | DIGIT)*;
- * WS: (' '|'\t'|'\n'|'\r')+ ;
  *
  * @see com.nokia.mj.impl.security.midp.authorization.SecurityPolicy
  */
--- a/javatools/javaupdater/build/javaupdater.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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=javaupdater
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.EPOCHEAPSIZE  = 0x4000 0x1000000
-    TARGET.UID3          = 0x20022D5A
-    TARGET.CAPABILITY    = WriteDeviceData PowerMgmt TrustedUI
-
-    LIBS += -ljavautils -lefsrv -lws32 -lapgrfx -lswinstcli -lhal -lcentralrepository
-    }
-
-include(../../../build/omj.pri)
--- a/javatools/javaupdater/src/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +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:  OMJ S60 environment updater process.
-*               When OMJ is installed, this program is executed to allow
-*               new Java environment taken into use.
-*/
-
-
-#include <e32std.h>
-#include <e32base.h>
-#include <f32file.h>
-#include <apgtask.h>
-#include <w32std.h>
-#include <swinstapi.h>
-#include <centralrepository.h>
-#include <hal.h>
-
-#include "javauids.h"
-#include "systemamstraderprivateclient.h"
-#include "logger.h"
-
-// This file is used to indicate when converting old S60 midlets
-// to OMJ midlets has been done.
-_LIT(KConversionOngoing, "D:\\OMJConverting.dat");
-
-
-/**
- * Kill old and running javaregistry.exe. After killing next call of
- * Registry API re-starts the new server process.
- */
-static void KillRegistry()
-{
-    JELOG2(EJavaConverters);
-    TFullName processName;
-    _LIT(KJavaRegistryProcess, "javaregistr*");
-    TFindProcess finder(KJavaRegistryProcess);
-
-    if (finder.Next(processName) != KErrNotFound)
-    {
-        RProcess processToKill;
-        TInt err = processToKill.Open(finder);
-
-        if (KErrNone != err)
-        {
-            WLOG1(EJavaConverters,
-                  "javaupdater: KillRegistry: Process open: %d", err);
-        }
-        else
-        {
-            LOG(EJavaConverters, EInfo, "javaupdater: KillRegistry: Killing javaregistry");
-            processToKill.Kill(KErrNone);
-            processToKill.Close();
-        }
-    }
-    else
-    {
-        WLOG(EJavaConverters, "javaupdater: KillRegistry: Registry process not found");
-    }
-}
-
-/**
- * Kill running System AMS processes.
- */
-static void KillSystemAms()
-{
-    JELOG2(EJavaConverters);
-
-    TBool connectionOK(EFalse);
-    TRequestStatus status(KRequestPending);
-    RSystemAMSTraderPrivateClient amsClient;
-
-    connectionOK = amsClient.ShutdownJavaEnv(status);
-    if (connectionOK)
-    {
-        // systemams process in this device supports nice shutdown.
-        // Wait until the S60 java environment has been shutdown
-        LOG(EJavaConverters,
-            EInfo, "javaupdater: KillSystemAms: Waiting for systemams nice shutdown");
-        User::WaitForRequest(status);
-        LOG(EJavaConverters,
-            EInfo, "javaupdater: KillSystemAms: Systemams has shutdown");
-        amsClient.Close();
-    }
-    else
-    {
-        // must kill SystemAMS trader and SystemAMS itself
-        TFullName processName;
-        _LIT(KJavaSystemAmsTraderProcess, "SystemAMS.EXE*");
-        TFindProcess finder(KJavaSystemAmsTraderProcess);
-
-        if (finder.Next(processName) == KErrNone)
-        {
-            RProcess processToKill;
-            TInt err = processToKill.Open(finder);
-
-            if (KErrNone != err)
-            {
-                WLOG1(EJavaConverters,
-                      "javaupdater: KillSystemAms: Cannot open SystemAMS trader process: %d", err);
-            }
-            else
-            {
-                LOG(EJavaConverters, EInfo,
-                    "javaupdater:KillSystemAms: Killing SystemAMS trader");
-                processToKill.Kill(KErrNone);
-                processToKill.Close();
-            }
-        }
-
-        // now kill SystemAMS itself
-        _LIT(KJavaSystemAmsProcess, "SystemAMSCore.EXE*");
-        finder.Find(KJavaSystemAmsProcess);
-
-        if (finder.Next(processName) == KErrNone)
-        {
-            RProcess processToKill;
-            TInt err = processToKill.Open(finder);
-
-            if (KErrNone != err)
-            {
-                WLOG1(EJavaConverters,
-                      "javaupdater: KillSystemAms: Cannot open SystemAMS process: %d", err);
-            }
-            else
-            {
-                LOG(EJavaConverters, EInfo, "javaupdater: KillSystemAms Killing SystemAMS ");
-                processToKill.Kill(KErrNone);
-                processToKill.Close();
-            }
-        }
-    }
-}
-
-/**
- * Try to kill old javapreinstaller
- */
-static void KillOldPreinstaller()
-{
-    JELOG2(EJavaConverters);
-
-    TFullName processName;
-    _LIT(KJavaOldPreinstallerProcess, "MIDP2SilentMIDletInstall.exe*");
-    TFindProcess finder(KJavaOldPreinstallerProcess);
-
-    if (finder.Next(processName) == KErrNone)
-    {
-        RProcess processToKill;
-        TInt err = processToKill.Open(finder);
-
-        if (KErrNone != err)
-        {
-            WLOG1(EJavaConverters,
-                  "javaupdater: KillOldPreinstallerL: Process open: %d", err);
-        }
-        else
-        {
-            LOG(EJavaConverters, EInfo, "javaupdater: Killing MIDP2SilentMIDletInstall");
-            processToKill.Kill(KErrNone);
-            processToKill.Close();
-        }
-    }
-}
-
-/**
- * Start OMJ trader (systemams.exe) in IAD mode.
- * It will start Java Captain in IAD mode and
- * it will start Java Preinstaller in IAD mode.
- */
-_LIT(KOmjTraderExe, "systemams.exe");
-_LIT(KOmjTraderArg, "iad");
-static void StartOmjTrader()
-{
-    JELOG2(EJavaConverters);
-    RProcess proc;
-    int rc = proc.Create(KOmjTraderExe, KOmjTraderArg);
-    if (rc == KErrNone)
-    {
-        proc.Resume();
-        LOG(EJavaConverters, EInfo, "javaupdater: StartOmjTrader systemams.exe was started ok");
-    }
-    else
-    {
-        ELOG1(EJavaConverters, "javaupdater: StartOmjTrader failed: %d", rc);
-    }
-    proc.Close();
-}
-
-/**
- * Copies (and configures) the certificates from legacy java
- */
-_LIT(KJavaCertfictatesConfiguratorExe, "javacertificatesconfigurator.exe");
-static void ConfigureCertificates()
-{
-    JELOG2(EJavaConverters);
-    RProcess proc;
-    int rc = proc.Create(KJavaCertfictatesConfiguratorExe, KNullDesC());
-    if (rc == KErrNone)
-    {
-        proc.Resume();
-        TRequestStatus status;
-        proc.Logon(status);
-        User::WaitForRequest(status);
-    }
-    else
-    {
-        ELOG1(EJavaConverters, "javaupdater: ConfigureCertificates failed: %d", rc);
-    }
-    proc.Close();
-}
-
-/**
- * Wait until preinstallation of OMJ midlets has been done.
- */
-static void WaitUntilPreinstallerReady()
-{
-    // Create a temporary file that javapreinstaller.exe will
-    // then destroy after reinstallation has been done
-    TUint value;
-    RFs   fs;
-    RFile flagFile;
-    TBool flagFileExists(ETrue);
-    TInt err = fs.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaupdater: WaitUntilPreinstallerReady: Cannot connect to RFs, err %d",
-              err);
-        return;
-    }
-    err = flagFile.Replace(fs, KConversionOngoing, EFileShareAny|EFileWrite);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters,
-              "javaupdater: WaitUntilPreinstallerReady: Cannot create conversion flag file, err %d",
-              err);
-        fs.Close();
-        return;
-    }
-    flagFile.Close();
-
-    // Now wait until the file is destroyed
-    do
-    {
-        TRequestStatus status;
-        fs.NotifyChange(ENotifyFile, status, KConversionOngoing);
-        User::WaitForRequest(status);
-        LOG1(EJavaConverters,
-             EInfo,
-             "javaupdater: WaitUntilPreinstallerReady: Wait ended with status %d",
-             status.Int());
-
-        // Check whether the flag file has been destroyed
-        err = fs.Att(KConversionOngoing, value);
-        if ((KErrNotFound == err) || (KErrPathNotFound == err))
-        {
-            flagFileExists = EFalse;
-        }
-        else if (KErrNone == err)
-        {
-            flagFileExists = ETrue;
-            LOG(EJavaConverters,
-                EInfo,
-                "javaupdater: WaitUntilPreinstallerReady: Flag file still exists, must wait more");
-        }
-        else
-        {
-            WLOG1(EJavaConverters,
-                  "javaupdater: WaitUntilPreinstallerReady: Unexpected error %d, stop waiting",
-                  err);
-            flagFileExists = EFalse;
-        }
-
-    }
-    while (flagFileExists);
-
-    fs.Close();
-}
-
-/**
- * Create cleanup stack and run the cleaner code inside TRAP harness
- * to log unexpected leaves.
- */
-TInt E32Main()
-{
-    __UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-    KillRegistry();
-    KillSystemAms();
-    KillOldPreinstaller();
-    ConfigureCertificates();
-    StartOmjTrader();
-    WaitUntilPreinstallerReady();
-    delete cleanupStack;
-    __UHEAP_MARKEND;
-    return KErrNone;
-}
--- a/javatools/javaupdater/src/systemamstraderprivateclient.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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:  systemamstraderprivateclient.cpp
-*               Part of OMJ S60 environment updater process.
-*               Used to close the old S60 java environment in a controlled way.
-*
-*/
-
-
-#include "systemamstraderprivateclient.h"
-
-
-// constants
-_LIT(KSystemAMSTraderPrivateServerName, "!SystemAMSTrader.Private");
-const TInt KShutDownJavaEnv = 3;
-
-
-//Definition
-TBool RSystemAMSTraderPrivateClient::ShutdownJavaEnv(TRequestStatus& aStatus)
-{
-    TVersion version;
-    TInt err;
-    err = CreateSession(KSystemAMSTraderPrivateServerName, version);
-    if (err == KErrNone)
-    {
-        SendReceive(KShutDownJavaEnv, TIpcArgs(), aStatus);
-    }
-    return err == KErrNone;
-}
-
--- a/javatools/javaupdater/src/systemamstraderprivateclient.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  systemamstraderprivateclient.h
-*               Part of OMJ S60 environment updater process.
-*               Used to close the old S60 java environment in a controlled way.
-*
-*/
-
-
-#ifndef SYSTEMAMSTRADERPRIVATECLIENT_H
-#define SYSTEMAMSTRADERPRIVATECLIENT_H
-
-#include <e32base.h>
-
-
-NONSHARABLE_CLASS(RSystemAMSTraderPrivateClient): public RSessionBase
-{
-public:
-
-    /**
-     * Tries to connect to SystemAMS trader private server and send
-     * java enviroment shutdown request
-     *
-     * @param aStatus - TRequestStatus of active object, which is notified
-     *                  when shutdown is done
-     * @return - ETrue if connection to server was succesfull
-     **/
-    TBool ShutdownJavaEnv(TRequestStatus& aStatus);
-};
-
-
-#endif // SYSTEMAMSTRADERPRIVATECLIENT_H
--- a/javatools/subsystem.mk	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -48,6 +48,10 @@
 
 endif
 
+# Declare that release preparation removes subdirectories not in build, except
+# listed special cases
+REMOVE_NOTBUILT_EXCLUDING = releng 
+
 include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
 
 
--- a/javatools/tckrunner/runner/build/tckrunner_0x2002DCE3.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/tckrunner/runner/build/tckrunner_0x2002DCE3.mmp	Tue May 25 12:34:19 2010 +0300
@@ -72,6 +72,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -92,10 +105,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javatools/tckrunner/starter/build/tckrunner_0x2002121E.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javatools/tckrunner/starter/build/tckrunner_0x2002121E.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 STATICLIBRARY	libcrt0.lib
 
 CAPABILITY		all -tcb -allfiles -drm 
@@ -98,10 +111,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 START RESOURCE ../data/tckrunner_reg.rss
 
 TARGETPATH /private/10003a3f/apps
--- a/javatools/usersettingsconfigurator/build/javausersettingsconfigurator.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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=javausersettingsconfigurator
-CONFIG += omj no_icon stl
-CONFIG -= qt
-
-symbian {
-    TARGET.EPOCSTACKSIZE = 0x5000
-    TARGET.UID2          = 0x20004c45
-    TARGET.UID3          = 0x20022E7A
-    TARGET.CAPABILITY    = WriteDeviceData TrustedUI
-
-    INCLUDEPATH += ../../javaapppreconverter/src.s60/midletlist.h \
-                   ../../../javacommons/gcfprotocols/connectionmanager/inc.s60
-
-    SOURCES += ../src.s60/*.cpp ../../javaapppreconverter/src.s60/midletlist.cpp
-
-    LIBS += -ledbms -ljavastorage -lestor -lmidp2securitypolicyV2 -lcentralrepository -lefsrv -ljavaconnectionmanager
-    }
-
-include(../../../build/omj.pri)
--- a/javatools/usersettingsconfigurator/src.s60/main.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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:
-*
-*/
-#include <e32base.h>
-#include <vector>
-#include "logger.h"
-#include "storagehandler.h"
-
-using namespace java::tools::usersettingsconfigurator;
-
-static void DoL()
-{
-    // initializations
-    std::auto_ptr<StorageHandler> storage(StorageHandler::NewL());
-    std::vector<MidletSuiteSecuritySettings*> midletSuitesSecuritySettings;
-    std::vector<MidletSuiteCustomAttributes*> midletSuitesCustomAttributes;
-
-    // read the settings from the legacy java DB
-    storage->readMidletSuitesPropertiesL(midletSuitesSecuritySettings, midletSuitesCustomAttributes);
-
-    // write the settings into the OMJ storage
-    storage->writeMidletSuitePropertiesL(midletSuitesSecuritySettings, midletSuitesCustomAttributes);
-
-    storage->convertAPNSettingsL();
-
-    // Cleanup
-    for (int i=0; i<midletSuitesSecuritySettings.size(); i++)
-    {
-        for (int j=0; j<midletSuitesSecuritySettings[i]->iSecuritySettings.size(); j++)
-        {
-            delete midletSuitesSecuritySettings[i]->iSecuritySettings[j];
-        }
-        delete midletSuitesSecuritySettings[i];
-    }
-    for (int i=0; i<midletSuitesCustomAttributes.size(); i++)
-    {
-        for (int j=0; j<midletSuitesCustomAttributes[i]->iCustomAttributes.size(); j++)
-        {
-            delete midletSuitesCustomAttributes[i]->iCustomAttributes[j];
-        }
-        delete midletSuitesCustomAttributes[i];
-    }
-}
-
-TInt E32Main()
-{
-    //__UHEAP_MARK;
-    CTrapCleanup* cleanupStack = CTrapCleanup::New();
-    TRAPD(error, DoL());
-    if (KErrNone != error)
-    {
-        ELOG1(EJavaConverters,
-              "Usersettingsconfigurator DoL leved with error: %d ", error);
-    }
-    delete cleanupStack;
-    //__UHEAP_MARKEND;
-    return error;
-}
--- a/javatools/usersettingsconfigurator/src.s60/storagehandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,652 +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:
-*
-*/
-#include <centralrepository.h>
-#include "storagehandler.h"
-#include "javastoragenames.h"
-#include "javastorage.h"
-#include "javastorageexception.h"
-#include "javasymbianoslayer.h"
-#include "javauid.h"
-#include <d32dbms.h>
-#include "logger.h"
-#include "j2me/midp2/security/MFunctionGroupBinding.h"
-#include "j2me/midp2/security/MExtendedProtectionDomain.h"
-#include "j2me/midp2/security/MFunctionGroup.h"
-#include "j2me/midp2/security/MPermission.h"
-#include "midletlist.h"
-#include "connectionmanager.h"
-
-_LIT(KUserDatabaseName,     "c:MIDP2SystemAMSUserV2");
-_LIT(KMSId,             "MSId");
-// security preferences table
-_LIT(KSecurityPreferencesIndexName,        "UserMSSecurityPreferencesIndex");
-_LIT(KSecurityPreferencesTableName,        "UserMSSecurityPreferences");
-_LIT(KSecureUid,        "secure[102045FE]");
-_LIT(KMSName,           "MSName");
-_LIT(KMSVendor,         "MSVendor");
-_LIT(KMSVersion,        "MSVersion");
-_LIT(KMSDomain,         "ProtectionDomain");
-_LIT(KMSSecurityPrefs,  "MSSecurityPrefs");
-// custom attributes table
-_LIT(KCustomAttributesTableName,    "MIDletProperties");
-_LIT(KCustomAttribsValue,            "Value");
-
-const TInt KSecurityPolicyFlags = 0x0200;
-_LIT(KSecurityPolicy, "midp2_rp");
-
-// This is in the private data cage of javausersettingsconfigurator
-_LIT(KMidletImportDirectory, "C:\\private\\20022E7A\\data\\");
-
-// Java access point CenRep Id
-const TInt KJavaAPNRepositoryUid = 0x10206EC5;
-
-// CenRep indicator to use the Java default APN
-const TInt KUseJavaDefaultAPN = -2;
-
-// CenRep key for Java default APN key-value pair
-const TUint32 KJavaDefaultAPNKey = KMaxTUint32;
-
-using namespace java::tools::usersettingsconfigurator;
-using namespace java::storage;
-using namespace java::util;
-using namespace MIDP;
-
-IMPORT_C MSecurityPolicyV2* GetSecurityPolicyL(TUint32 aFlags, const TDesC& aPolicyName);
-
-StorageHandler* StorageHandler::NewL()
-{
-    StorageHandler* self = new(ELeave) StorageHandler();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-StorageHandler::StorageHandler()
-{
-}
-
-void StorageHandler::ConstructL()
-{
-    User::LeaveIfError(iDbs.Connect());
-    User::LeaveIfError(iUserDb.Open(iDbs, KUserDatabaseName(), KSecureUid()));
-    User::LeaveIfError(iSecurityPreferencesTable.Open(iUserDb, KSecurityPreferencesTableName));
-    User::LeaveIfError(iSecurityPreferencesTable.SetIndex(KSecurityPreferencesIndexName));
-    User::LeaveIfError(iCustomAttributesTable.Open(iUserDb, KCustomAttributesTableName));
-    // security preferences column identifiers
-    CDbColSet* colSet = iSecurityPreferencesTable.ColSetL();
-    iSPNameColId            = colSet->ColNo(KMSName);
-    iSPVendorColId          = colSet->ColNo(KMSVendor);
-    iSPVersionColId         = colSet->ColNo(KMSVersion);
-    iSPDomainColId          = colSet->ColNo(KMSDomain);
-    iSPPreferencesColId     = colSet->ColNo(KMSSecurityPrefs);
-    iSPIdColId              = colSet->ColNo(KMSId);
-    // custom attributes column identifiers
-    colSet = iCustomAttributesTable.ColSetL();
-    iCAIdColId              = colSet->ColNo(KMSId);
-    iCAValueColId           = colSet->ColNo(KCustomAttribsValue);
-    delete colSet;
-    try
-    {
-        iStorage = JavaStorage::createInstance();
-        iStorage->open();
-    }
-    catch (JavaStorageException& aJse)
-    {
-        User::Leave(aJse.mStatus);
-    }
-    iSecurityPolicy = GetSecurityPolicyL(KSecurityPolicyFlags, KSecurityPolicy);
-}
-
-void StorageHandler::ReadSecuritySettingsL(std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings)
-{
-    TUint32 cnt = iSecurityPreferencesTable.CountL();
-    iSecurityPreferencesTable.BeginningL();
-    for (int i=0; i<cnt; i++)
-    {
-        iSecurityPreferencesTable.NextL();
-        iSecurityPreferencesTable.GetL();
-
-        // alloc the buffers
-        HBufC* name = HBufC::NewLC(iSecurityPreferencesTable.ColLength(iSPNameColId));
-        TPtr namePtr = name->Des();
-        HBufC* vendor = HBufC::NewLC(iSecurityPreferencesTable.ColLength(iSPVendorColId));
-        TPtr vendorPtr = vendor->Des();
-        HBufC* version = HBufC::NewLC(iSecurityPreferencesTable.ColLength(iSPVersionColId));
-        TPtr versionPtr = version->Des();
-        HBufC* domain = HBufC::NewLC(iSecurityPreferencesTable.ColLength(iSPDomainColId));
-        TPtr domainPtr = domain->Des();
-        HBufC8* securityPrefs = HBufC8::NewLC(iSecurityPreferencesTable.ColLength(iSPPreferencesColId));
-        TPtr8 securityPrefsPtr = securityPrefs->Des();
-        TUint32 suiteUid = iSecurityPreferencesTable.ColUint32(iSPIdColId);
-
-        // fill in the buffers
-        RDbColReadStream in;
-        in.OpenL(iSecurityPreferencesTable, iSPNameColId);
-        in.ReadL(namePtr,  iSecurityPreferencesTable.ColLength(iSPNameColId));
-        in.Close();
-        in.OpenL(iSecurityPreferencesTable, iSPVendorColId);
-        in.ReadL(vendorPtr,  iSecurityPreferencesTable.ColLength(iSPVendorColId));
-        in.Close();
-        in.OpenL(iSecurityPreferencesTable, iSPVersionColId);
-        in.ReadL(versionPtr,  iSecurityPreferencesTable.ColLength(iSPVersionColId));
-        in.Close();
-        in.OpenL(iSecurityPreferencesTable, iSPDomainColId);
-        in.ReadL(domainPtr,  iSecurityPreferencesTable.ColLength(iSPDomainColId));
-        in.Close();
-        in.OpenL(iSecurityPreferencesTable, iSPPreferencesColId);
-        in.ReadL(securityPrefsPtr,  iSecurityPreferencesTable.ColLength(iSPPreferencesColId));
-        in.Close();
-
-        // process the buffers
-        std::wstring suiteName((wchar_t*) name->Ptr(), name->Length());
-        std::wstring suiteVendor((wchar_t*) vendor->Ptr(), vendor->Length());
-        std::wstring suiteVersion((wchar_t*) version->Ptr(), version->Length());
-        std::string prefs((char *) securityPrefs->Ptr(), securityPrefs->Length());
-        std::wstring securitySettingsName = L"";
-        std::wstring currentInteractionMode = L"";
-        std::vector<SecuritySettings*> securitySettings;
-        DecodeSecuritySettingsL(domainPtr, std::string((char *) securityPrefs->Ptr(), securityPrefs->Length()), securitySettings);
-        if (securitySettings.size() > 0)
-        {
-            MidletSuiteSecuritySettings* suiteSecuritySettings =
-                new MidletSuiteSecuritySettings(suiteUid, suiteName, suiteVendor, suiteVersion);
-            suiteSecuritySettings->iSecuritySettings = securitySettings;
-            aMidletSuitesSecuritySettings.push_back(suiteSecuritySettings);
-        }
-
-        // free the buffers
-        CleanupStack::PopAndDestroy(securityPrefs);
-        CleanupStack::PopAndDestroy(domain);
-        CleanupStack::PopAndDestroy(version);
-        CleanupStack::PopAndDestroy(vendor);
-        CleanupStack::PopAndDestroy(name);
-    }
-}
-
-void StorageHandler::WriteSecuritySettingsL(const std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings)
-{
-    for (int i=0; i<aMidletSuitesSecuritySettings.size(); i++)
-    {
-        try
-        {
-            // get the UID of the suite
-            JavaStorageApplicationEntry_t query;
-            JavaStorageApplicationList_t queryResult;
-            JavaStorageEntry attr;
-            std::wstring midletSuiteUid = L"";
-            attr.setEntry(ID, L"");
-            query.insert(attr);
-            attr.setEntry(PACKAGE_NAME, aMidletSuitesSecuritySettings[i]->iName);
-            query.insert(attr);
-            attr.setEntry(VENDOR, aMidletSuitesSecuritySettings[i]->iVendor);
-            query.insert(attr);
-            attr.setEntry(VERSION, aMidletSuitesSecuritySettings[i]->iVersion);
-            query.insert(attr);
-            iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult);
-            findEntry(queryResult, ID, midletSuiteUid);
-            if (midletSuiteUid.size() > 0)
-            {
-                // write the currentInteractionMode
-                for (int j=0; j<aMidletSuitesSecuritySettings[i]->iSecuritySettings.size(); j++)
-                {
-                    // check that the function group exists and the current
-                    // interaction mode is found among the allowed interaction modes
-                    JavaStorageApplicationEntry_t fgQuery;
-                    JavaStorageApplicationList_t fgQueryResult;
-                    attr.setEntry(ID, midletSuiteUid);
-                    fgQuery.insert(attr);
-                    attr.setEntry(FUNCTION_GROUP, aMidletSuitesSecuritySettings[i]->iSecuritySettings[j]->iName);
-                    fgQuery.insert(attr);
-                    attr.setEntry(ALLOWED_SETTINGS, L"");
-                    fgQuery.insert(attr);
-                    std::wstring allowedInteractionModes = L"";
-                    iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, fgQuery, fgQueryResult);
-                    findEntry(fgQueryResult, ALLOWED_SETTINGS, allowedInteractionModes);
-                    if (IsInteractionModeAllowed(aMidletSuitesSecuritySettings[i]->iSecuritySettings[j]->iCurrentInteractionMode,
-                                                 allowedInteractionModes))
-                    {
-                        JavaStorageApplicationEntry_t newEntry;
-                        JavaStorageApplicationEntry_t oldEntry;
-                        attr.setEntry(ID, midletSuiteUid);
-                        newEntry.insert(attr);
-                        oldEntry.insert(attr);
-                        attr.setEntry(FUNCTION_GROUP, aMidletSuitesSecuritySettings[i]->iSecuritySettings[j]->iName);
-                        newEntry.insert(attr);
-                        oldEntry.insert(attr);
-                        attr.setEntry(CURRENT_SETTING, aMidletSuitesSecuritySettings[i]->iSecuritySettings[j]->iCurrentInteractionMode);
-                        newEntry.insert(attr);
-                        iStorage->update(MIDP_FUNC_GRP_SETTINGS_TABLE, newEntry, oldEntry);
-                    }
-                }
-            }
-        }
-        catch (JavaStorageException& aJse)
-        {
-            ELOG1(EJavaConverters, "Can not write security settings to storage: %s", aJse.toString().c_str());
-        }
-    }
-}
-
-void StorageHandler::ReadCustomAttributesL(std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes)
-{
-    TUint32 cnt = iCustomAttributesTable.CountL();
-    iCustomAttributesTable.BeginningL();
-    for (int i=0; i<cnt; i++)
-    {
-        iCustomAttributesTable.NextL();
-        iCustomAttributesTable.GetL();
-        TUint32 suiteUid = iCustomAttributesTable.ColUint32(iCAIdColId);
-        HBufC8* customAttribs = HBufC8::NewLC(iCustomAttributesTable.ColLength(iCAValueColId));
-        TPtr8 customAttribsPtr = customAttribs->Des();
-        RDbColReadStream in;
-        in.OpenL(iCustomAttributesTable, iCAValueColId);
-        in.ReadL(customAttribsPtr,  iCustomAttributesTable.ColLength(iCAValueColId));
-        in.Close();
-
-        // the custom attributes are stored in the following form:
-        //       attrib_count attrib1_name_length attrib1_name attrib1_value_length attrib1_value ...
-        // where attrib_count is 4 bytes
-        //       attribX_name_length is 4 bytes
-        //       attribX_name is multiple of 4
-        //       attribX_value_length is 4 bytes
-        //       attribX_value is multiple of 4 with first 4 bytes as a flag applicable to the value
-        //                     and the rest of the bytes the actual value
-        const TUint8* ptr     = customAttribs->Ptr() + 4;
-        TUint32 attrib_count =  *((TUint32*)customAttribs->Ptr());
-
-        for (TUint32 i = 0; i < attrib_count; i++)
-        {
-            TPtrC attrib_name;
-            TPtrC attrib_value;
-
-            // read the attrib_name_length and move the pointer further
-            TUint32 attrib_name_length     = *((TUint32*)ptr);
-            ptr += 4;
-            // read the attrib_name and move the pointer further
-            attrib_name.Set((const TUint16*)ptr, attrib_name_length);
-            // skip everything until we hit the multiple of 4 bytes
-            ptr += ((2 * attrib_name_length + (4 - ((2 * attrib_name_length) % 4))));
-
-            // read the attrib_value_length and move the pointer further
-            TUint32 attrib_value_length     = *((TUint32*)ptr);
-            // skip the 8 bytes (4 bytes for the length and another 4 bytes for the the flag associated with the value)
-            ptr += 8;
-            // read the attrib_value and move the pointer further
-            attrib_value.Set((const TUint16*)ptr, ((2*attrib_value_length) - 4)/2);
-            // skip everything until we hit the multiple of 4 bytes
-            ptr += ((2 * attrib_value_length + (4 - ((2 * attrib_value_length) % 4))));
-
-            // map the value to the value known by omj
-            CustomAttribute* customAttribute = NULL;
-            if (attrib_value.Compare(_L("gameactions")) == 0)
-            {
-                customAttribute = new CustomAttribute(
-                    std::wstring((wchar_t*)attrib_name.Ptr(),
-                                 attrib_name.Length()),
-                    L"1");
-            }
-            else if (attrib_value.Compare(_L("no")) == 0)
-            {
-                customAttribute = new CustomAttribute(
-                    std::wstring((wchar_t*)attrib_name.Ptr(),
-                                 attrib_name.Length()),
-                    L"0");
-            }
-            else if (attrib_value.Compare(_L("navigationkeys")) == 0)
-            {
-                customAttribute = new CustomAttribute(
-                    std::wstring((wchar_t*)attrib_name.Ptr(),
-                                 attrib_name.Length()),
-                    L"2");
-            }
-            else
-            {
-                // unknown value -> ignore
-                continue;
-            }
-
-            std::vector<CustomAttribute*> customAttributes;
-            customAttributes.push_back(customAttribute);
-            MidletSuiteCustomAttributes* suiteCustomAttributes =
-                new MidletSuiteCustomAttributes(suiteUid);
-            suiteCustomAttributes->iCustomAttributes = customAttributes;
-            aMidletSuitesCustomAttributes.push_back(suiteCustomAttributes);
-        }
-
-        CleanupStack::PopAndDestroy(customAttribs);
-    }
-}
-
-void StorageHandler::WriteCustomAttributesL(const std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes)
-{
-    for (int i=0; i<aMidletSuitesCustomAttributes.size(); i++)
-    {
-        for (int j=0; j<aMidletSuitesCustomAttributes[i]->iCustomAttributes.size(); j++)
-        {
-            try
-            {
-                if (aMidletSuitesCustomAttributes[i]->iCustomAttributes[j]->iName
-                        != L"Nokia-MIDlet-On-Screen-Keypad")
-                {
-                    continue;
-                }
-                // try to update the value
-                TUid tuid;
-                tuid.iUid = aMidletSuitesCustomAttributes[i]->iUid;
-                Uid uid;
-                TUidToUid(tuid, uid);
-                JavaStorageApplicationEntry_t oldEntry;
-                JavaStorageEntry attr;
-                attr.setEntry(ID, uid.toString());
-                oldEntry.insert(attr);
-                JavaStorageApplicationEntry_t entry;
-                attr.setEntry(ON_SCREEN_KEYPAD, aMidletSuitesCustomAttributes[i]->iCustomAttributes[j]->iValue);
-                entry.insert(attr);
-                iStorage->update(MIDP_PACKAGE_TABLE, entry, oldEntry);
-            }
-            catch (JavaStorageException& aJse)
-            {
-                ELOG1(EJavaConverters, "Can not write custom attributes to storage: %s", aJse.toString().c_str());
-            }
-        }
-    }
-}
-
-void StorageHandler::readMidletSuitesPropertiesL(std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings, std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes)
-{
-    // read security settings
-    ReadSecuritySettingsL(aMidletSuitesSecuritySettings);
-
-    // read custom attributes
-    ReadCustomAttributesL(aMidletSuitesCustomAttributes);
-}
-
-void StorageHandler::writeMidletSuitePropertiesL(const std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings, const std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes)
-{
-    // write security settings
-    WriteSecuritySettingsL(aMidletSuitesSecuritySettings);
-
-    // write custom attributes
-    WriteCustomAttributesL(aMidletSuitesCustomAttributes);
-}
-
-void StorageHandler::convertAPNSettingsL() const
-{
-    TFileName dataFile(KMidletImportDirectory);
-    dataFile.Append(KMidletExportDataFileName);
-    TUint attributes;
-    RFs fs;
-    TInt err = fs.Connect();
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters, "Cannot open RFs connection, err %d ", err);
-        return;
-    }
-
-    err = fs.Att(dataFile, attributes);
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaConverters, "Cannot handle imported file: %d ", err);
-        fs.Close();
-        return;
-    }
-
-    TFileName importDirectory(KMidletImportDirectory);
-
-    CMidletList* midlets = new(ELeave) CMidletList();
-    TRAP(err, midlets->ImportListL(fs, importDirectory));
-
-    if (err == KErrNone)
-    {
-        TUid repUid = TUid::Uid(KJavaAPNRepositoryUid);
-        std::auto_ptr<CRepository> rep(CRepository::NewL(repUid));
-
-        JavaStorageApplicationEntry_t matchEntry;
-        JavaStorageApplicationEntry_t updateEntry;
-        JavaStorageEntry attr;
-
-        for (TInt i = 0; i < midlets->Count(); i++)
-        {
-            const CMidletInfo* oneApp = midlets->GetNext();
-            TInt apnId = -1;
-            TInt err = rep->Get(oneApp->GetSuiteId(), apnId);
-
-            if (KErrNone != err)
-            {
-                continue;
-            }
-
-            if (KUseJavaDefaultAPN == apnId)
-            {
-                rep->Get(KJavaDefaultAPNKey, apnId);
-            }
-
-            matchEntry.clear();
-            updateEntry.clear();
-
-            try
-            {
-                java::util::Uid appUid;
-                JavaStorageApplicationEntry_t foundEntry;
-
-                iStorage->read(APPLICATION_TABLE,
-                               TUidToUid(oneApp->GetMidletUid(), appUid), foundEntry);
-
-                attr.setEntry(PACKAGE_ID, L"");
-                JavaStorageApplicationEntry_t::const_iterator finder
-                = foundEntry.find(attr);
-
-                java::util::Uid suiteUid((*finder).entryValue());
-                ConnectionManager::setApnIdL(suiteUid, apnId);
-            }
-            catch (JavaStorageException& jse)
-            {
-                ELOG2(EJavaConverters,
-                      "Cannot write APN Id: %d of App: %d",
-                      apnId,
-                      oneApp->GetMidletUid().iUid);
-            }
-        }
-    }
-
-    midlets->ResetAndDestroy();
-    fs.Delete(dataFile);
-    fs.Close();
-
-    LOG(EJavaConverters, EInfo, "APNs converted");
-}
-
-StorageHandler::~StorageHandler()
-{
-    iSecurityPreferencesTable.Close();
-    iCustomAttributesTable.Close();
-    iUserDb.Close();
-    iDbs.Close();
-    if (iStorage)
-    {
-        iStorage->close();
-        delete iStorage;
-        iStorage = NULL;
-    }
-    delete iSecurityPolicy;
-}
-
-void StorageHandler::DecodeSecuritySettingsL(const TDesC& aProtectionDomain, const std::string& aEncodedSecuritySettings, std::vector<SecuritySettings*>& aSecuritySettings)
-{
-    int BITS_PER_BYTE = 8;
-    int BITS_PER_GROUP = 2;
-    int GROUPS_PER_BYTE = (BITS_PER_BYTE/BITS_PER_GROUP);
-    RPointerArray<const MFunctionGroupBinding>  bindings;
-    if (aProtectionDomain.Length() > 0)
-    {
-        iSecurityPolicy->ProtectionDomainL(aProtectionDomain).FunctionGroupBindingsL(bindings);
-    }
-    else
-    {
-        iSecurityPolicy->UntrustedProtectionDomainL().FunctionGroupBindingsL(bindings);
-    }
-    TInt count = bindings.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        const MFunctionGroupBinding& binding = *(bindings[i]);
-        HBufC* name = binding.FunctionGroup().Name().AllocLC();
-        std::wstring securitySettingsName = L"";
-        std::wstring currentInteractionMode = L"";
-        // mape the current interaction mode
-        // try to read it from the encoded string -> if it fails, then go on with the default
-        TInt    byteIndex = (i * BITS_PER_GROUP) / BITS_PER_BYTE;
-        TInt    bitIndex  = (i - (byteIndex * GROUPS_PER_BYTE)) * BITS_PER_GROUP;
-        if (byteIndex < aEncodedSecuritySettings.size())
-        {
-            switch (((aEncodedSecuritySettings[byteIndex] >> bitIndex) & 3))
-            {
-            case 1:
-                // blanket
-                currentInteractionMode = L"3";
-                break;
-            case 2:
-                // oneshot
-                currentInteractionMode = L"1";
-                break;
-            case 3:
-                // session
-                currentInteractionMode = L"2";
-                break;
-            default:
-                // denied
-                currentInteractionMode = L"4";
-            }
-        }
-        if (currentInteractionMode.size() == 0)
-        {
-            // get the default one from the legacy policy
-            switch (binding.DefaultInteractionMode())
-            {
-            case MPermission::EDenied:
-                currentInteractionMode = L"4";
-                break;
-            case MPermission::EBlanket:
-                currentInteractionMode = L"3";
-                break;
-            case MPermission::EOneshot:
-                currentInteractionMode = L"1";
-                break;
-            case MPermission::ESession:
-                currentInteractionMode = L"2";
-                break;
-            }
-        }
-        if (currentInteractionMode.size() > 0)
-        {
-            aSecuritySettings.push_back(new SecuritySettings(
-                                            std::wstring((wchar_t*) name->Ptr(), name->Length()), currentInteractionMode));
-        }
-        CleanupStack::PopAndDestroy(name);
-    }
-    bindings.Close();
-}
-
-bool StorageHandler::IsInteractionModeAllowed(const std::wstring& aInteractionMode, const std::wstring& aAllowedInteractionModes)
-{
-    bool res = false;
-    if (aAllowedInteractionModes.size() > 0)
-    {
-        int interactionMode = JavaCommonUtils::wstringToInt(aInteractionMode);
-        // 1 = ONESHOT, 2 = SESSION, 3 = BLANKET, 4 = NO
-        int allowedInteractionModes = JavaCommonUtils::wstringToInt(aAllowedInteractionModes);
-        // allowedInteraction is a 4 bit number with the following representation:
-        //     oneshot session blanket no
-        // E.g. 1011 (=11 in decimal) means that oneshot, blanket and no are allowed
-        bool oneshotAllowed = ((allowedInteractionModes & 0x8) == 0x8);
-        bool sessionAllowed = ((allowedInteractionModes & 0x4) == 0x4);
-        bool blanketAllowed = ((allowedInteractionModes & 0x2) == 0x2);
-        bool noAllowed = ((allowedInteractionModes & 0x1) == 0x1);
-        res = (interactionMode == 1 && oneshotAllowed)
-              || (interactionMode == 2 && sessionAllowed)
-              || (interactionMode == 3 && blanketAllowed)
-              || (interactionMode == 4 && noAllowed);
-    }
-    return res;
-}
-
-void StorageHandler::findEntry(const JavaStorageApplicationList_t& queryResult,
-                               const std::wstring& eName,
-                               std::wstring& eValue)
-{
-    if (queryResult.size() > 0)
-    {
-        JavaStorageApplicationEntry_t entry = queryResult.front();
-        JavaStorageEntry findPattern;
-        findPattern.setEntry(eName, L"");
-        JavaStorageApplicationEntry_t::const_iterator findIterator =
-            entry.find(findPattern);
-        if (findIterator != entry.end())
-        {
-            eValue = findIterator->entryValue();
-        }
-    }
-}
-
-MidletSuiteSecuritySettings::MidletSuiteSecuritySettings(const TUint32& aUid,
-        const std::wstring& aName,
-        const std::wstring& aVendor,
-        const std::wstring& aVersion)
-        : iUid(aUid), iName(aName), iVendor(aVendor), iVersion(aVersion)
-{
-}
-
-SecuritySettings::SecuritySettings(const std::wstring& aName,
-                                   const std::wstring& aCurrentInteractionMode)
-        : iName(aName), iCurrentInteractionMode(aCurrentInteractionMode)
-{
-}
-
-SecuritySettings& SecuritySettings::operator=(const SecuritySettings& aSecuritySettings)
-{
-    iName = aSecuritySettings.iName;
-    iCurrentInteractionMode = aSecuritySettings.iCurrentInteractionMode;
-    return *this;
-}
-
-SecuritySettings::SecuritySettings()
-        : iName(L""), iCurrentInteractionMode(L"")
-{
-}
-
-CustomAttribute::CustomAttribute(const std::wstring& aName,
-                                 const std::wstring& aValue)
-        : iName(aName), iValue(aValue)
-{
-}
-
-CustomAttribute& CustomAttribute::operator=(const CustomAttribute& aCustomAttribute)
-{
-    iName = aCustomAttribute.iName;
-    iValue = aCustomAttribute.iValue;
-    return *this;
-}
-
-CustomAttribute::CustomAttribute()
-        : iName(L""), iValue(L"")
-{
-}
-
-MidletSuiteCustomAttributes::MidletSuiteCustomAttributes(const TUint32& aMidletSuiteUid)
-        : iUid(aMidletSuiteUid)
-{
-}
--- a/javatools/usersettingsconfigurator/src.s60/storagehandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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:
-*
-*/
-#ifndef STORAGEHANDLER_H
-#define STORAGEHANDLER_H
-
-#include <vector>
-#include <string>
-#include <e32base.h>
-#include <d32dbms.h>
-#include "javastorage.h"
-#include "javacommonutils.h"
-#include "j2me/midp2/security/MSecurityPolicyV2.h"
-
-using namespace java::util;
-using namespace java::storage;
-
-namespace java
-{
-namespace tools
-{
-namespace usersettingsconfigurator
-{
-
-class SecuritySettings
-{
-public:
-    SecuritySettings(const std::wstring& aSettingsName,
-                     const std::wstring& aCurrentInteractionMode);
-
-    SecuritySettings &operator=(const SecuritySettings&);
-    SecuritySettings();
-
-    std::wstring iName;
-    std::wstring iCurrentInteractionMode;
-};
-
-class CustomAttribute
-{
-public:
-    CustomAttribute(const std::wstring& aAttributeName,
-                    const std::wstring& aAttributeValue);
-
-    CustomAttribute &operator=(const CustomAttribute&);
-    CustomAttribute();
-
-    std::wstring iName;
-    std::wstring iValue;
-};
-
-class MidletSuiteCustomAttributes
-{
-public:
-    MidletSuiteCustomAttributes(const TUint32& aMidletSuiteUid);
-
-    TUint32 iUid;
-    std::vector<CustomAttribute*> iCustomAttributes;
-};
-
-
-class MidletSuiteSecuritySettings
-{
-public:
-    MidletSuiteSecuritySettings(const TUint32& aMidletSuiteUid,
-                                const std::wstring& aMidletSuiteName,
-                                const std::wstring& aMidletSuiteVendor,
-                                const std::wstring& aMidletSuiteVersion);
-    TUint32 iUid;
-    std::wstring iName;
-    std::wstring iVendor;
-    std::wstring iVersion;
-    std::vector<SecuritySettings*> iSecuritySettings;
-};
-
-class StorageHandler: public CBase
-{
-public:
-    static StorageHandler* NewL();
-    void readMidletSuitesPropertiesL(std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings, std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes);
-    void writeMidletSuitePropertiesL(const std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings, const std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes);
-    void convertAPNSettingsL() const;
-    virtual ~StorageHandler();
-private:
-    void ConstructL();
-    StorageHandler();
-    void DecodeSecuritySettingsL(const TDesC& aProtectionDomain, const std::string& aEncodedSecuritySettings, std::vector<SecuritySettings*>& aSecuritySettings);
-    void ReadSecuritySettingsL(std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings);
-    void ReadCustomAttributesL(std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes);
-    void WriteSecuritySettingsL(const std::vector<MidletSuiteSecuritySettings*>& aMidletSuitesSecuritySettings);
-    void WriteCustomAttributesL(const std::vector<MidletSuiteCustomAttributes*>& aMidletSuitesCustomAttributes);
-    bool IsInteractionModeAllowed(const std::wstring& aInteractionMode, const std::wstring& aAllowedInteractionModes);
-    void findEntry(const JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue);
-
-private:
-    RDbs iDbs;
-    RDbNamedDatabase iUserDb;
-    RDbTable  iSecurityPreferencesTable;
-    RDbTable  iCustomAttributesTable;
-    // security preferences columns
-    TInt iSPNameColId;
-    TInt iSPVendorColId;
-    TInt iSPVersionColId;
-    TInt iSPDomainColId;
-    TInt iSPPreferencesColId;
-    TInt iSPIdColId;
-    // custom attributes columns
-    TInt iCAIdColId;
-    TInt iCAValueColId;
-    JavaStorage* iStorage;
-    MIDP::MSecurityPolicyV2* iSecurityPolicy;
-};
-
-} //end namespace usersettingsconfigurator
-} //end namespace tools
-} // end namespace java
-#endif // STORAGEHANDLER_H
-
--- a/javatools/usersettingsconfigurator/tsrc/Makefile	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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: 
-#
-
-include $(JAVA_SRC_ROOT)/build/Makefile.defs
-
-NONQTSUBSYSTEMS = \
-	build
-
-ALL_TARGETS = $(NONQTSUBSYSTEMS)
-
-include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
-
--- a/javatools/usersettingsconfigurator/tsrc/build/bld.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +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: 
-*
-*/
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-usersettingsconfiguratorunittests.mmp
--- a/javatools/usersettingsconfigurator/tsrc/build/usersettingsconfiguratorunittests.mmp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <platform_paths.hrh>
-#include <../../../../inc/java_stdcpp_support_for_exe.hrh>
-
-TARGET		  UserSettingsConfiguratorTests.exe
-TARGETTYPE	  exe
-UID			 0x00000000 0x03A6305A
-CAPABILITY WriteDeviceData
-
-USERINCLUDE ../src
-USERINCLUDE ../src/utils
-USERINCLUDE ../../../../inc // == (JAVA_SRC_ROOT)/inc
-USERINCLUDE ../../../../tools/cpputest/include/cpputest // == (JAVA_SRC_ROOT)/tools/cpputest/include/cpputest
-USERINCLUDE ../../../../tools/cpputest/include/platforms/symbian // == (JAVA_SRC_ROOT)/tools/cpputest/include/platforms/symbian
-
-STATICLIBRARY cpputest.lib
-LIBRARY javastorage.lib
-LIBRARY edbms.lib
-LIBRARY midp2securitypolicyV2.lib
-
-SOURCEPATH ../src/utils
-SOURCE teststoragehandler.cpp
-SOURCEPATH ../src
-SOURCE usersettingsconfiguratorunittests.cpp
-SOURCE testusersettingsconfigurator.cpp
-
--- a/javatools/usersettingsconfigurator/tsrc/src/testusersettingsconfigurator.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,442 +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:
-*
-*/
-
-#include <stdio.h>
-#include <string>
-#include <vector>
-#include <e32std.h>
-
-#include "TestHarness.h"
-#include "teststoragehandler.h"
-#include "j2me/midp2/security/MFunctionGroupBinding.h"
-#include "j2me/midp2/security/MExtendedProtectionDomain.h"
-#include "j2me/midp2/security/MFunctionGroup.h"
-#include "j2me/midp2/security/MPermission.h"
-#include "j2me/midp2/security/MSecurityPolicyV2.h"
-
-using namespace MIDP;
-
-const TInt KSecurityPolicyFlags = 0x0200;
-_LIT(KSecurityPolicy, "midp2_rp");
-extern MSecurityPolicyV2* GetSecurityPolicyL(TUint32 aFlags, const TDesC& aPolicyName);
-const TInt BLANKET        = 1;
-const TInt SESSION        = 2;
-const TInt ONESHOT        = 3;
-const TInt NO             = 4;
-const TInt UNKNOWN        = 5;
-const TInt INVALID        = 6;
-const TInt EMPTY          = 7;
-const TInt GAMEACTIONS    = 8;
-const TInt NAVIGATIONKEYS = 9;
-
-TEST_GROUP(TestUserSettingsConfigurator)
-{
-    MSecurityPolicyV2* iSecurityPolicy;
-    TEST_SETUP()
-    {
-        iSecurityPolicy = GetSecurityPolicyL(KSecurityPolicyFlags, KSecurityPolicy);
-    }
-
-    TEST_TEARDOWN()
-    {
-        delete iSecurityPolicy;
-    }
-};
-
-HBufC8* GetCustomAttributes(const TDesC& aValue)
-{
-    _LIT(KOnScreenKeyboardAttribute, "Nokia-MIDlet-On-Screen-Keypad");
-    _LIT8(KSpace, " ");
-
-    TInt countLength = 1;
-    TInt spaceLength = KSpace().Length();
-    TInt keyLength       = KOnScreenKeyboardAttribute().Length();
-    TInt keyByteLength   = keyLength + keyLength;
-    TInt valueLength     = 2 + aValue.Length();
-    TInt valueByteLength = valueLength + valueLength;
-    HBufC8* customAttributesValue = HBufC8::NewL(
-                                        4 /* count */
-                                        + 4 /* key length */
-                                        + keyByteLength /* key */
-                                        + 3 /* max padding */
-                                        + 4 /* value length */
-                                        + 4 /* flag */
-                                        + valueByteLength /* value */
-                                        + 3 /* max padding */);
-    TPtr8 ptr = customAttributesValue->Des();
-    ptr.Append(TPtrC8((const TUint8*)&countLength, 4));
-    ptr.Append(TPtrC8((const TUint8*)&keyLength, 4));
-    ptr.Append(TPtrC8((const TUint8*)KOnScreenKeyboardAttribute().Ptr(), keyByteLength));
-    switch (keyByteLength % 4)
-    {
-    case 1:
-        ptr.Append(KSpace);
-    case 2:
-        ptr.Append(KSpace);
-    case 3:
-        ptr.Append(KSpace);
-        break;
-    }
-    // flag
-    ptr.Append(TPtrC8((const TUint8*)&valueLength, 4));
-    ptr.Append(KSpace);
-    ptr.Append(KSpace);
-    ptr.Append(KSpace);
-    ptr.Append(KSpace);
-    ptr.Append(TPtrC8((const TUint8*)aValue.Ptr(), (2 * aValue.Length())));
-    switch (valueByteLength % 4)
-    {
-    case 1:
-        ptr.Append(KSpace);
-    case 2:
-        ptr.Append(KSpace);
-    case 3:
-        ptr.Append(KSpace);
-        break;
-    }
-    return customAttributesValue;
-}
-
-HBufC8* GetSecurityPreferences(const MSecurityPolicyV2& aSecurityPolicy, std::wstring aSecuritySettingsName, int aInteractionMode)
-{
-    int BITS_PER_BYTE = 8;
-    int BITS_PER_GROUP = 2;
-    int GROUPS_PER_BYTE = (BITS_PER_BYTE/BITS_PER_GROUP);
-    RPointerArray<const MFunctionGroupBinding>  bindings;
-    aSecurityPolicy.UntrustedProtectionDomainL().FunctionGroupBindingsL(bindings);
-    TInt count = bindings.Count();
-    std::string preferences = "";
-    std::string interactionMode;
-    HBufC8* prefs = HBufC8::NewMaxL((count + 3)/4);
-    TPtr8 ptr = prefs->Des();
-    TInt length = ptr.Length();
-    for (TInt i = 0; i < length; i++)
-    {
-        ptr[i] = 0;
-    }
-    for (TInt i = 0; i < count; i++)
-    {
-        const MFunctionGroupBinding& binding = *(bindings[i]);
-        HBufC* name = binding.FunctionGroup().Name().AllocLC();
-        std::wstring securitySettingsName = std::wstring((wchar_t*) name->Ptr(), name->Length());
-        CleanupStack::PopAndDestroy(name);
-        TInt    byteIndex = ((i) * BITS_PER_GROUP) / BITS_PER_BYTE;
-        TInt    bitIndex  = ((i) - (byteIndex * GROUPS_PER_BYTE)) * BITS_PER_GROUP;
-        TUint8  byte      = ptr[byteIndex];
-        if (securitySettingsName == aSecuritySettingsName)
-        {
-            switch (aInteractionMode)
-            {
-            case ONESHOT:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (2 << bitIndex));
-                break;
-            case SESSION:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (3 << bitIndex));
-                break;
-            case BLANKET:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (1 << bitIndex));
-                break;
-            case NO:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (0 << bitIndex));
-                break;
-            case UNKNOWN:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (4 << bitIndex));
-                break;
-            }
-        }
-        else
-        {
-            // get the default one from the legacy policy
-            switch (binding.DefaultInteractionMode())
-            {
-            case MPermission::EDenied:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (0 << bitIndex));
-                break;
-            case MPermission::EBlanket:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (1 << bitIndex));
-                break;
-            case MPermission::EOneshot:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (2 << bitIndex));
-                break;
-            case MPermission::ESession:
-                ptr[byteIndex] = (TText8)((byte & ~(3 << bitIndex)) | (3 << bitIndex));
-                break;
-            }
-        }
-    }
-    bindings.Close();
-    return prefs;
-}
-
-
-std::wstring GetDefaultInteractionModeFromPolicy(const MSecurityPolicyV2& aSecurityPolicy, std::wstring aSecuritySettingsName)
-{
-    RPointerArray<const MFunctionGroupBinding>  bindings;
-    aSecurityPolicy.UntrustedProtectionDomainL().FunctionGroupBindingsL(bindings);
-    TInt count = bindings.Count();
-    std::wstring interactionMode = L"";
-    for (TInt i = 0; i < count; i++)
-    {
-        const MFunctionGroupBinding& binding = *(bindings[i]);
-        HBufC* name = binding.FunctionGroup().Name().AllocLC();
-        std::wstring securitySettingsName = std::wstring((wchar_t*) name->Ptr(), name->Length());
-        CleanupStack::PopAndDestroy(name);
-        if (securitySettingsName == aSecuritySettingsName)
-        {
-            // get the default one from the legacy policy
-            switch (binding.DefaultInteractionMode())
-            {
-            case MPermission::EDenied:
-                interactionMode = L"4";
-                break;
-            case MPermission::EBlanket:
-                interactionMode = L"3";
-                break;
-            case MPermission::EOneshot:
-                interactionMode = L"1";
-                break;
-            case MPermission::ESession:
-                interactionMode = L"2";
-                break;
-            }
-            break;
-        }
-    }
-    bindings.Close();
-    return interactionMode;
-}
-
-void ExecuteConfigurator()
-{
-    _LIT(KJavaUsersettingsConfiguratorExe, "javausersettingsconfigurator.exe");
-    RProcess proc;
-    int rc = proc.Create(KJavaUsersettingsConfiguratorExe, KNullDesC());
-    if (rc == KErrNone)
-    {
-        proc.Resume();
-        TRequestStatus status;
-        proc.Logon(status);
-        User::WaitForRequest(status);
-    }
-    proc.Close();
-}
-
-TEST(TestUserSettingsConfigurator, TestUserSecuritySettingsL)
-{
-    // init
-    TInt err;
-    TestStorageHandler* storage = TestStorageHandler::NewL();
-    CleanupStack::PushL(storage);
-    std::vector<SecuritySettings*> securitySettings;
-    bool success = false;
-    // unknown unsigned suite
-    storage->cleanup(TUint32(0), L"appUid");
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), _L8("prefs"));
-    storage->populateOmjStorageL(L"appUid", L"name1", L"vendor", L"version", L"settingsName", L"1");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 0);
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "Net Access" settings: No for current interaction mode, Oneshot&Session for allowed interaction modes
-    // Legacy settings: unknown value for "Net Access"
-    // -> new OMJ settings: the default interaction mode taken from the legacy policy for "Net Access"
-    storage->cleanup(TUint32(0), L"appUid");
-    HBufC8* prefs = GetSecurityPreferences(*iSecurityPolicy, L"Local Connectivity", UNKNOWN);
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), *prefs);
-    delete prefs;
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Net Access", L"4" , L"12");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == GetDefaultInteractionModeFromPolicy(*iSecurityPolicy, L"Net Access") && securitySettings[0]->iSettingsName == L"Net Access");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "Read User Data Access" settings: No for current interaction mode, Session for allowed interaction modes
-    // Legacy settings: unknown value for "Read User Data Access"
-    // -> new OMJ settings: unchanged settings (the default interaction mode taken from the legacy policy for Net Access is not found among the allowed interaction modes)
-    storage->cleanup(TUint32(0), L"appUid");
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), _L8("prefs"));
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Read User Data Access", L"4" , L"4");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == L"4" && securitySettings[0]->iSettingsName == L"Read User Data Access");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "Write User Data Access" settings: No for current interaction mode, Oneshot&Session for allowed interaction modes
-    // Legacy settings: oneshot for "Write User Data Access"
-    // -> new OMJ settings: oneshot for "Write User Data Access"
-    storage->cleanup(TUint32(0), L"appUid");
-    prefs = GetSecurityPreferences(*iSecurityPolicy, L"Write User Data Access", ONESHOT);
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), *prefs);
-    delete prefs;
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Write User Data Access", L"4" , L"12");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == L"1" && securitySettings[0]->iSettingsName == L"Write User Data Access");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "Local Connectivity" settings: Oneshot for current interaction mode, Oneshot&Session for allowed interaction modes
-    // Legacy settings: session for "Local Connectivity"
-    // -> new OMJ settings: session for "Local Connectivity"
-    storage->cleanup(TUint32(0), L"appUid");
-    prefs = GetSecurityPreferences(*iSecurityPolicy, L"Local Connectivity", SESSION);
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), *prefs);
-    delete prefs;
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Local Connectivity", L"1" , L"12");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == L"2" && securitySettings[0]->iSettingsName == L"Local Connectivity");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "Messaging" settings: Oneshot for current interaction mode, Oneshot&Session&Blanket for allowed interaction modes
-    // Legacy settings: Blanket for "Messaging"
-    // -> new OMJ settings: Blanket for "Messaging"
-    storage->cleanup(TUint32(0), L"appUid");
-    prefs = GetSecurityPreferences(*iSecurityPolicy, L"Messaging", BLANKET);
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), *prefs);
-    delete prefs;
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Messaging", L"1" , L"14");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == L"3" && securitySettings[0]->iSettingsName == L"Messaging");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // OMJ "ApplicationAutoInvocation" settings: Oneshot for current interaction mode, Oneshot&No for allowed interaction modes
-    // Legacy settings: No for "ApplicationAutoInvocation"
-    // -> new OMJ settings: No for "ApplicationAutoInvocation"
-    storage->cleanup(TUint32(0), L"appUid");
-    prefs = GetSecurityPreferences(*iSecurityPolicy, L"Application Auto Invocation", NO);
-    storage->populateLegacyStorageL(TUint32(0), _L("name"), _L("vendor"), _L("version"), *prefs);
-    delete prefs;
-    storage->populateOmjStorageL(L"appUid", L"name", L"vendor", L"version", L"Application Auto Invocation", L"1" , L"9");
-    ExecuteConfigurator();
-    securitySettings.clear();
-    storage->retrieveSecuritySettings(L"name", L"vendor", L"version", securitySettings);
-    storage->cleanup(TUint32(0), L"appUid");
-    success = (securitySettings.size() == 1 && securitySettings[0]->iCurrentInteractionMode == L"4" && securitySettings[0]->iSettingsName == L"Application Auto Invocation");
-    for (int i=0; i<securitySettings.size(); i++)
-    {
-        delete securitySettings[i];
-    }
-    CHECK(success);
-    // cleanup
-    CleanupStack::PopAndDestroy(storage);
-}
-
-TEST(TestUserSettingsConfigurator, TestUserCustomAttributesSettingsL)
-{
-    // init
-    TInt err;
-    TestStorageHandler* storage = TestStorageHandler::NewL();
-    CleanupStack::PushL(storage);
-    bool success = false;
-    // "gameactions" value
-    HBufC8* customAttributes = GetCustomAttributes(_L("gameactions"));
-    storage->populateLegacyStorageL(TUint32(12345), *customAttributes);
-    delete customAttributes;
-    storage->populateOmjStorageL(L"[00003039]", L"0");
-    ExecuteConfigurator();
-    std::wstring onScreenKeypad;
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"1");
-    CHECK(success);
-    // "navigationkeys" value
-    customAttributes = GetCustomAttributes(_L("navigationkeys"));
-    storage->populateLegacyStorageL(TUint32(12345), *customAttributes);
-    delete customAttributes;
-    storage->populateOmjStorageL(L"[00003039]", L"0");
-    ExecuteConfigurator();
-    onScreenKeypad = L"";
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"2");
-    CHECK(success);
-    // "no" value
-    customAttributes = GetCustomAttributes(_L("no"));
-    storage->populateLegacyStorageL(TUint32(12345), *customAttributes);
-    delete customAttributes;
-    storage->populateOmjStorageL(L"[00003039]", L"2");
-    ExecuteConfigurator();
-    onScreenKeypad = L"";
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"0");
-    CHECK(success);
-    // unknown value
-    customAttributes = GetCustomAttributes(_L("unknown"));
-    storage->populateLegacyStorageL(TUint32(12345), *customAttributes);
-    delete customAttributes;
-    storage->populateOmjStorageL(L"[00003039]", L"2");
-    ExecuteConfigurator();
-    onScreenKeypad = L"";
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"2");
-    CHECK(success);
-    // no value at all
-    storage->populateOmjStorageL(L"[00003039]", L"1");
-    ExecuteConfigurator();
-    onScreenKeypad = L"";
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"1");
-    CHECK(success);
-    // empty value
-    customAttributes = GetCustomAttributes(_L(""));
-    storage->populateLegacyStorageL(TUint32(12345), *customAttributes);
-    delete customAttributes;
-    storage->populateOmjStorageL(L"[00003039]", L"1");
-    ExecuteConfigurator();
-    onScreenKeypad = L"";
-    storage->retrieveOnScreenKeypad(L"[00003039]", onScreenKeypad);
-    storage->cleanup(TUint32(0), L"[00003039]");
-    success = (onScreenKeypad == L"1");
-    CHECK(success);
-    // cleanup
-    CleanupStack::PopAndDestroy(storage);
-}
--- a/javatools/usersettingsconfigurator/tsrc/src/usersettingsconfiguratorunittests.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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:
-*
-*/
-
-#include "Platform.h"
-#include "CommandLineTestRunner.h"
-
-int main(int ac, char** av)
-{
-    return CommandLineTestRunner::RunAllTests(ac, av);
-}
-
-#include "usersettingsconfiguratorunittests.h"
-
--- a/javatools/usersettingsconfigurator/tsrc/src/usersettingsconfiguratorunittests.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +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:
-*
-*/
-
-#include "Utest.h"
-
-//Include this in the test main to execute these tests
-IMPORT_TEST_GROUP(TestUserSettingsConfigurator);
--- a/javatools/usersettingsconfigurator/tsrc/src/utils/teststoragehandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +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:
-*
-*/
-
-#include "teststoragehandler.h"
-#include "javastoragenames.h"
-#include "javastorage.h"
-#include "javastorageexception.h"
-#include "javasymbianoslayer.h"
-#include "javacommonutils.h"
-
-_LIT(KFlags,            "Flags");
-_LIT(KMSId,             "MSId");
-_LIT(KMSName,           "MSName");
-_LIT(KMSVendor,         "MSVendor");
-_LIT(KMSVersion,        "MSVersion");
-_LIT(KProtectionDomain, "ProtectionDomain");
-_LIT(KMSSecurityPrefs,  "MSSecurityPrefs");
-_LIT(KCustomAttribsValue,            "Value");
-
-using namespace java::storage;
-
-TestStorageHandler* TestStorageHandler::NewL()
-{
-    TestStorageHandler* self = new(ELeave) TestStorageHandler();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-void TestStorageHandler::ConstructL()
-{
-    User::LeaveIfError(iDbs.Connect());
-    TInt err = iUserDb.Open(iDbs, _L("c:MIDP2SystemAMSUserV2"), _L("secure[102045FE]"));
-    if (err==KErrNotFound)
-    {
-        const TUid KUidSystemAMS={0x102045FE};
-        iUserDb.Close();
-        iUserDb.Create(iDbs, _L("c:MIDP2SystemAMSUserV2"), _L("secure[102045FE]"));
-        iUserDb.Open(iDbs, _L("c:MIDP2SystemAMSUserV2"), _L("secure[102045FE]"));
-    }
-    else
-    {
-        User::LeaveIfError(err);
-    }
-    err = iSecurityPrefsTable.Open(iUserDb, _L("UserMSSecurityPreferences"));
-    if (err==KErrNotFound)
-    {
-        CDbColSet* colSet = CDbColSet::NewLC();
-        colSet->AddL(TDbCol(KFlags,             EDbColUint32));
-        colSet->AddL(TDbCol(KMSId,              EDbColUint32));
-        colSet->AddL(TDbCol(KMSName,            EDbColLongText));
-        colSet->AddL(TDbCol(KMSVendor,          EDbColLongText));
-        colSet->AddL(TDbCol(KMSVersion,         EDbColText));
-        colSet->AddL(TDbCol(KProtectionDomain,  EDbColLongText));
-        colSet->AddL(TDbCol(KMSSecurityPrefs,   EDbColBinary));
-        User::LeaveIfError(iUserDb.CreateTable(_L("UserMSSecurityPreferences"), *colSet));
-        CleanupStack::PopAndDestroy(colSet);
-        CDbKey* key = CDbKey::NewLC();
-        key->AddL(TDbKeyCol(KMSId));
-        User::LeaveIfError(iUserDb.CreateIndex(_L("UserMSSecurityPreferencesIndex"), _L("UserMSSecurityPreferences"), *key));
-        CleanupStack::PopAndDestroy(key);
-        iSecurityPrefsTable.Open(iUserDb, _L("UserMSSecurityPreferences"));
-    }
-    else
-    {
-        User::LeaveIfError(err);
-    }
-    err = iCustomAttributesTable.Open(iUserDb, _L("MIDletProperties"));
-    if (err==KErrNotFound)
-    {
-        _LIT(KOrdinal,          "Ordinal");
-        _LIT(KComponentId,      "ComponentId");
-        _LIT(KId,               "Id");
-        _LIT(KValue,            "Value");
-        CDbColSet* colSet = CDbColSet::NewLC();
-        colSet->AddL(TDbCol(KMSId,          EDbColUint32));
-        colSet->AddL(TDbCol(KOrdinal,       EDbColUint32));
-        colSet->AddL(TDbCol(KFlags,         EDbColUint32));
-        colSet->AddL(TDbCol(KComponentId,   EDbColUint32));
-        colSet->AddL(TDbCol(KId,            EDbColUint32));
-        colSet->AddL(TDbCol(KValue,         EDbColLongText8));
-        User::LeaveIfError(iUserDb.CreateTable(_L("MIDletProperties"), *colSet));
-        CleanupStack::PopAndDestroy(colSet);
-        iCustomAttributesTable.Open(iUserDb, _L("MIDletProperties"));
-    }
-    else
-    {
-        User::LeaveIfError(err);
-    }
-    User::LeaveIfError(iSecurityPrefsTable.SetIndex(_L("UserMSSecurityPreferencesIndex")));
-    CDbColSet* colSet = iSecurityPrefsTable.ColSetL();
-    iMSIdColId              = colSet->ColNo(KMSId);
-    iMSNameColId            = colSet->ColNo(KMSName);
-    iMSVendorColId          = colSet->ColNo(KMSVendor);
-    iMSVersionColId         = colSet->ColNo(KMSVersion);
-    iPreferencesColId       = colSet->ColNo(KMSSecurityPrefs);
-    colSet = iCustomAttributesTable.ColSetL();
-    iCAIdColId              = colSet->ColNo(KMSId);
-    iCAValueColId           = colSet->ColNo(KCustomAttribsValue);
-    delete colSet;
-    try
-    {
-        iStorage = JavaStorage::createInstance();
-        iStorage->open(JAVA_DATABASE_NAME);
-    }
-    catch (JavaStorageException& aJse)
-    {
-        User::Leave(aJse.mStatus);
-    }
-}
-
-TestStorageHandler::TestStorageHandler()
-{
-}
-
-TestStorageHandler::~TestStorageHandler()
-{
-    iSecurityPrefsTable.Close();
-    iCustomAttributesTable.Close();
-    iUserDb.Close();
-    iDbs.Close();
-    if (iStorage)
-    {
-        iStorage->close();
-        delete iStorage;
-        iStorage = NULL;
-    }
-}
-
-void TestStorageHandler::cleanup(const TUint32 aId, const std::wstring& aMidletSuiteUid)
-{
-    TDbSeekKey key((TUint)aId);
-    if (iSecurityPrefsTable.SeekL(key))
-    {
-        iSecurityPrefsTable.DeleteL();
-    }
-    TUint32 cnt = iCustomAttributesTable.CountL();
-    iCustomAttributesTable.BeginningL();
-    for (int i=0; i<cnt; i++)
-    {
-        iCustomAttributesTable.NextL();
-        iCustomAttributesTable.DeleteL();
-    }
-    try
-    {
-        JavaStorageApplicationEntry_t entry;
-        JavaStorageEntry attr;
-        attr.setEntry(ID, aMidletSuiteUid);
-        entry.insert(attr);
-        iStorage->remove(APPLICATION_PACKAGE_TABLE, entry);
-        iStorage->remove(MIDP_FUNC_GRP_SETTINGS_TABLE, entry);
-        iStorage->remove(MIDP_PACKAGE_TABLE, entry);
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void TestStorageHandler::populateLegacyStorageL(TUint32 aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aVersion, const TDesC8& aSecurityPrefs)
-{
-    iSecurityPrefsTable.EndL();
-    iSecurityPrefsTable.InsertL();
-    iSecurityPrefsTable.SetColL(iMSIdColId,       aId);
-    iSecurityPrefsTable.SetColL(iMSNameColId,     aName);
-    iSecurityPrefsTable.SetColL(iMSVendorColId,   aVendor);
-    iSecurityPrefsTable.SetColL(iMSVersionColId,  aVersion);
-    iSecurityPrefsTable.SetColL(iPreferencesColId,aSecurityPrefs);
-    iSecurityPrefsTable.PutL();
-}
-
-void TestStorageHandler::populateLegacyStorageL(TUint32 aId, const TDesC8& aCustomAttributes)
-{
-    iCustomAttributesTable.EndL();
-    iCustomAttributesTable.InsertL();
-    iCustomAttributesTable.SetColL(iCAIdColId,       aId);
-    iCustomAttributesTable.SetColL(iCAValueColId,     aCustomAttributes);
-    iCustomAttributesTable.PutL();
-}
-
-void TestStorageHandler::populateOmjStorageL(const std::wstring& aMidletSuiteUid, const std::wstring& aMidletSuiteName, const std::wstring& aMidletSuiteVendor, const std::wstring& aMidletSuiteVersion, const std::wstring& aSecuritySettingsName, const std::wstring& aCurrentInteractionMode, const std::wstring& aAllowedInteractionModes)
-{
-    try
-    {
-        JavaStorageApplicationEntry_t entry;
-        JavaStorageEntry attr;
-        attr.setEntry(ID, aMidletSuiteUid);
-        entry.insert(attr);
-        attr.setEntry(PACKAGE_NAME, aMidletSuiteName);
-        entry.insert(attr);
-        attr.setEntry(VENDOR, aMidletSuiteVendor);
-        entry.insert(attr);
-        attr.setEntry(VERSION, aMidletSuiteVersion);
-        entry.insert(attr);
-        iStorage->write(APPLICATION_PACKAGE_TABLE, entry);
-        entry.clear();
-        attr.setEntry(ID, aMidletSuiteUid);
-        entry.insert(attr);
-        attr.setEntry(FUNCTION_GROUP, aSecuritySettingsName);
-        entry.insert(attr);
-        attr.setEntry(CURRENT_SETTING, aCurrentInteractionMode);
-        entry.insert(attr);
-        if (aAllowedInteractionModes.size() > 0)
-        {
-            attr.setEntry(ALLOWED_SETTINGS, aAllowedInteractionModes);
-            entry.insert(attr);
-        }
-        iStorage->write(MIDP_FUNC_GRP_SETTINGS_TABLE, entry);
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void TestStorageHandler::populateOmjStorageL(const std::wstring& aMidletSuiteUid, const std::wstring& aOnScreenKeypad)
-{
-    try
-    {
-        JavaStorageApplicationEntry_t entry;
-        JavaStorageEntry attr;
-        attr.setEntry(ID, aMidletSuiteUid);
-        entry.insert(attr);
-        attr.setEntry(ON_SCREEN_KEYPAD, aOnScreenKeypad);
-        entry.insert(attr);
-        iStorage->write(MIDP_PACKAGE_TABLE, entry);
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void TestStorageHandler::retrieveOnScreenKeypad(const std::wstring& aMidletSuiteUid, std::wstring& aOnScreenKeypad)
-{
-    try
-    {
-        JavaStorageApplicationEntry_t query;
-        JavaStorageApplicationList_t queryResult;
-        JavaStorageEntry attr;
-        attr.setEntry(ID, aMidletSuiteUid);
-        query.insert(attr);
-        attr.setEntry(ON_SCREEN_KEYPAD, L"");
-        query.insert(attr);
-        iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult);
-        findEntry(queryResult, ON_SCREEN_KEYPAD, aOnScreenKeypad);
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void TestStorageHandler::retrieveSecuritySettings(const std::wstring& aMidletSuiteName, const std::wstring& aMidletSuiteVendor, const std::wstring& aMidletSuiteVersion, std::vector<SecuritySettings*>& aSecuritySettings)
-{
-    try
-    {
-        JavaStorageApplicationEntry_t query;
-        JavaStorageApplicationList_t queryResult;
-        JavaStorageEntry attr;
-        std::wstring midletSuiteUid = L"";
-        attr.setEntry(ID, L"");
-        query.insert(attr);
-        attr.setEntry(PACKAGE_NAME, aMidletSuiteName);
-        query.insert(attr);
-        attr.setEntry(VENDOR, aMidletSuiteVendor);
-        query.insert(attr);
-        attr.setEntry(VERSION, aMidletSuiteVersion);
-        query.insert(attr);
-        iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult);
-        findEntry(queryResult, ID, midletSuiteUid);
-        if (midletSuiteUid.size() > 0)
-        {
-            query.clear();
-            queryResult.clear();
-            attr.setEntry(ID, midletSuiteUid);
-            query.insert(attr);
-            attr.setEntry(FUNCTION_GROUP, L"");
-            query.insert(attr);
-            iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, queryResult);
-            JavaStorageApplicationList_t::const_iterator iterator;
-            SecuritySettings* securitySettings;
-            for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++)
-            {
-                JavaStorageApplicationEntry_t entry = (*iterator);
-                std::wstring securitySettingsName = L"";
-                findColumn(entry, FUNCTION_GROUP, securitySettingsName);
-                if (securitySettingsName.size() > 0)
-                {
-                    query.clear();
-                    JavaStorageApplicationList_t currentInteractionModeQueryResult;
-                    attr.setEntry(ID, midletSuiteUid);
-                    query.insert(attr);
-                    attr.setEntry(FUNCTION_GROUP, securitySettingsName);
-                    query.insert(attr);
-                    attr.setEntry(CURRENT_SETTING, L"");
-                    query.insert(attr);
-                    iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, currentInteractionModeQueryResult);
-                    if (currentInteractionModeQueryResult.size() > 0)
-                    {
-                        std::wstring currentInteractionMode = L"";
-                        findEntry(currentInteractionModeQueryResult,CURRENT_SETTING , currentInteractionMode);
-                        securitySettings = new SecuritySettings(securitySettingsName, currentInteractionMode);
-                        aSecuritySettings.push_back(securitySettings);
-                    }
-                }
-            }
-        }
-    }
-    catch (JavaStorageException& aJse)
-    {
-    }
-}
-
-void TestStorageHandler::findEntry(const JavaStorageApplicationList_t& queryResult,
-                                   const std::wstring& eName,
-                                   std::wstring& eValue)
-{
-    if (queryResult.size() > 0)
-    {
-        JavaStorageApplicationEntry_t entry = queryResult.front();
-        JavaStorageEntry findPattern;
-        findPattern.setEntry(eName, L"");
-        JavaStorageApplicationEntry_t::const_iterator findIterator =
-            entry.find(findPattern);
-        if (findIterator != entry.end())
-        {
-            eValue = findIterator->entryValue();
-        }
-    }
-}
-
-void TestStorageHandler::findColumn(const JavaStorageApplicationEntry_t& aEntry,
-                                    const std::wstring& aColName, std::wstring& aColValue)
-{
-    JavaStorageEntry findPattern;
-    findPattern.setEntry(aColName, L"");
-    JavaStorageApplicationEntry_t::const_iterator findIterator =
-        aEntry.find(findPattern);
-    if (findIterator != aEntry.end())
-    {
-        aColValue = findIterator->entryValue();
-    }
-}
-
-SecuritySettings::SecuritySettings(const std::wstring& aSettingsName,
-                                   const std::wstring& aCurrentInteractionMode)
-        : iSettingsName(aSettingsName), iCurrentInteractionMode(aCurrentInteractionMode)
-{
-}
-
-SecuritySettings& SecuritySettings::operator=(const SecuritySettings& aSecuritySettings)
-{
-    iSettingsName = aSecuritySettings.iSettingsName;
-    iCurrentInteractionMode = aSecuritySettings.iCurrentInteractionMode;
-    return *this;
-}
-
-SecuritySettings::SecuritySettings()
-        : iSettingsName(L""), iCurrentInteractionMode(L"")
-{
-}
-
-
-
-
--- a/javatools/usersettingsconfigurator/tsrc/src/utils/teststoragehandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +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:
-*
-*/
-#ifndef TESTSTORAGEHANDLER_H
-#define TESTSTORAGEHANDLER_H
-
-#include <e32base.h>
-#include <d32dbms.h>
-#include <vector>
-#include <string>
-#include "javastorage.h"
-
-class SecuritySettings
-{
-public:
-    SecuritySettings(const std::wstring& aSettingsName,
-                     const std::wstring& aCurrentInteractionMode);
-    SecuritySettings &operator=(const SecuritySettings&);
-    SecuritySettings();
-
-    std::wstring iSettingsName;
-    std::wstring iCurrentInteractionMode;
-};
-
-class TestStorageHandler : public CBase
-{
-public:
-
-    static TestStorageHandler* NewL();
-    virtual ~TestStorageHandler();
-    void cleanup(const TUint32 aId, const std::wstring& aMidletSuiteUid);
-    void populateLegacyStorageL(TUint32 aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aVersion, const TDesC8& aSecurityPrefs);
-    void populateLegacyStorageL(TUint32 aId, const TDesC8& aCustomAttributes);
-    void populateOmjStorageL(const std::wstring& aMidletSuiteUid, const std::wstring& aMidletSuiteName, const std::wstring& aMidletSuiteVendor, const std::wstring& aMidletSuiteVersion, const std::wstring& aSecuritySettingsName, const std::wstring& aCurrentInteractionMode, const std::wstring& aAllowedInteractionModes = L"");
-    void populateOmjStorageL(const std::wstring& aMidletSuiteUid, const std::wstring& aOnScreenKeypad);
-    void retrieveSecuritySettings(const std::wstring& aMidletSuiteName, const std::wstring& aMidletSuiteVendor, const std::wstring& aMidletSuiteVersion, std::vector<SecuritySettings*>& aSecuritySettings);
-    void retrieveOnScreenKeypad(const std::wstring& aMidletSuiteUid, std::wstring& aOnScreenKeypad);
-
-private:
-    TestStorageHandler();
-    void ConstructL();
-    void findColumn(const java::storage::JavaStorageApplicationEntry_t& aEntry, const std::wstring& aColName, std::wstring& aColValue);
-    void findEntry(const java::storage::JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue);
-    RDbs iDbs;
-    RDbNamedDatabase iUserDb;
-    RDbTable  iSecurityPrefsTable;
-    RDbTable  iCustomAttributesTable;
-    TInt iMSIdColId;
-    TInt iMSNameColId;
-    TInt iMSVendorColId;
-    TInt iMSVersionColId;
-    TInt iPreferencesColId;
-    TInt iCAIdColId;
-    TInt iCAValueColId;
-    java::storage::JavaStorage* iStorage;
-};
-
-#endif // TESTSTORAGEHANDLER_H
-
--- a/javauis/amms_akn/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/amms_akn/build/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -54,6 +54,7 @@
 
   <target name="create.public.api.jar">
     <omj.public.apis includes="javax/microedition/amms/**/*.class"/>
+    <omj.public.apis includes="com/nokia/mid/media/**/*.class"/>
   </target>
 
   <target name="system.properties">
@@ -64,4 +65,5 @@
         supports.mediacapabilities=music audio3d
     </properties>
   </target>
+  
 </project>
--- a/javauis/amms_akn/build/javaamms_0x2002DC96.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/amms_akn/build/javaamms_0x2002DC96.mmp	Tue May 25 12:34:19 2010 +0300
@@ -217,6 +217,19 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -237,10 +250,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/amms_akn/javasrc/javax/microedition/amms/MediaProcessorListener.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/amms_akn/javasrc/javax/microedition/amms/MediaProcessorListener.java	Tue May 25 12:34:19 2010 +0300
@@ -1,3 +1,19 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
 package javax.microedition.amms;
 
 /**
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammsaudio3dcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for 3D audio controls
-*
-*/
-
-
-#ifndef CAMMSAUDIO3DCONTROLGROUP_H
-#define CAMMSAUDIO3DCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrolgroup.h"
-
-// CLASS DECLARATION
-
-/**
- *  Group for 3D audio controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSAudio3DControlGroup): public CAMMSControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSAudio3DControlGroup();
-
-protected: // New functions
-
-    /**
-     * Update the controls depending on commit mode
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    void UpdateL(TInt aCommit);
-
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    virtual void CommitL(TInt aCommit) = 0;
-
-public:  // From MAMMSControlGroup
-    /**
-     * Sets the mode of the CommitControl.
-     *
-     * @param aMode     commit mode
-     */
-    void SetModeL(TCommitMode aMode);
-
-    /**
-     * Commit all the controls in the group
-     * in immediate mode commits, in deferred mode marks what variables
-     * need to be commited later
-     */
-    void CommitGroupL();
-
-protected:
-    /**
-     * Constructor.
-     *
-     * @param aName     The name of the corresponding amms control
-     * @param aControlType Special AMMS type of the Control
-     */
-    CAMMSAudio3DControlGroup(
-        const TDesC& aName,
-        TAMMSControlTypes aControlType = EAMMSBaseControl);
-
-    /**
-     * Symbian 2nd phase constructor.
-     */
-    void ConstructL();
-
-protected: // Data
-
-    // Commit mode
-    TCommitMode iCommitMode;
-
-private:     // Data
-
-    // bit field of variables that have to be commited
-    // (used in CommitL())
-    TInt iCommit;
-};
-
-#endif // CAMMSAUDIO3DCONTROLGROUP_H
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammscommitcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for commit controls
-*
-*/
-
-
-#ifndef CAMMSCOMMITCONTROLGROUP_H
-#define CAMMSCOMMITCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsaudio3dcontrolgroup.h"
-#include "cammsmodulecontainer.h"
-#include "cammsmodule.h"
-
-// FORWARD DECLARATIONS
-class CAMMSModule;
-
-// CONSTANTS
-_LIT(KAMMSCommitControlClassName, ".amms.control.audio3d.CommitControl");
-_LIT(KAMMSCommitControl, "CommitControl");
-
-// CLASS DECLARATION
-/**
- *  Group for commit controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSCommitControlGroup): public CAMMSAudio3DControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSCommitControlGroup* NewLC(
-        CAMMSModule& aSpectator,
-        CAMMSModuleContainer& aSoundSource3Ds);
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSCommitControlGroup();
-
-public: // New functions
-
-    /**
-     * Transfers all the pending parameters to the audio processing system
-     * for all ControlGroups in this controllable
-     */
-    void CommitAllControlsL();
-
-    /**
-     * Sets the mode of the CommitControl
-     *
-     * @param aDeferred     deferred mode flag
-     */
-    void SetDeferredL(TBool aDeferred);
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    void CommitL(TInt aCommit);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSCommitControlGroup(
-        CAMMSModule& aSpectator,
-        CAMMSModuleContainer& aSoundSource3Ds);
-
-private:    // Data
-    // Reference to spectator, owned by GlobalManager
-    CAMMSModule& iSpectator;
-
-    // Reference to sound source 3Ds, owned by GlobalManager
-    CAMMSModuleContainer& iSoundSource3Ds;
-
-};
-
-#endif // CAMMSCOMMITCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammsdistanceattenuationcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for distance attenuation controls
-*
-*/
-
-
-#ifndef CAMMSDISTANCEATTENUATIONCONTROLGROUP_H
-#define CAMMSDISTANCEATTENUATIONCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsaudio3dcontrolgroup.h"
-
-// CONSTANTS
-_LIT(KAMMSDistanceAttenuationClassName,
-     ".amms.control.audio3d.DistanceAttenuationControl");
-
-// FORWARD DECLARATIONS
-class CAMMSBaseDistanceAttenuationControl;
-
-// CLASS DECLARATION
-/**
- *  Group for distance attenuation controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSDistanceAttenuationControlGroup): public CAMMSAudio3DControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSDistanceAttenuationControlGroup* NewLC();
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSDistanceAttenuationControlGroup();
-
-public: // New functions
-
-    /**
-     * Returns the maximum distance. At the maximum distance, the gain does
-     * not decrease any more. The exact behavior of the gain at distances
-     * beyond the maximum distance depends on the value of muteAfterMax
-     *
-     * @return the maximum distance
-     */
-    TInt32 MaxDistance() const;
-
-    /**
-     * Returns the distance where the source is loudest.
-     *
-     * @return the minimum distance
-     */
-    TInt32 MinDistance() const;
-
-    /**
-     * Returns how the distance gain behaves for distances beyond the
-     * maximum distance.
-     *
-     * @return true if beyond the maximum distance the source is silent,
-     * or false if beyond the maximum distance the source's gain is held
-     * constant at the level at the maximum distance
-     */
-    TBool MuteAfterMax() const;
-
-    /**
-     * Returns the rolloff factor for the distance gain.
-     *
-     * @return the rolloff factor as an exponent specified in thousandths
-     */
-    TUint32 RolloffFactor() const;
-
-    /**
-     * Sets all the 3D audio distance attenuation parameters simultaneously
-     *
-     * @param aMinDistance      the minimum distance, below which the
-     *                          distance gain is clipped to its maximum
-     *                          value of 1.0
-     * @param aMaxDistance      the maximum distance, beyond which the
-     *                          distance gain does not decrease any more
-     * @param aMuteAfterMax     a boolean determining how the distance
-     *                          gain behaves at distances greater than
-     *                          maxDistance
-     * @param aRolloffFactor    the rolloff factor
-     */
-    void SetParametersL(TInt32 aMinDistance, TInt32 aMaxDistance,
-                        TBool aMuteAfterMax, TUint32 aRolloffFactor);
-
-private: // New functions
-    /**
-     * Gets and casts a control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSBaseDistanceAttenuationControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    virtual void CommitL(TInt aCommit);
-
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSDistanceAttenuationControlGroup();
-
-private: // Data
-
-    class TVariables
-    {
-    public:
-
-        TInt32 iMinDistance;
-        TInt32 iMaxDistance;
-        TBool iMuteAfterMax;
-        TUint32 iRolloffFactor;
-    };
-
-    TVariables iCommited; // holder for variables after commit
-    TVariables iUncommited; // holder for variables before commit
-
-    enum TCommit { EDistance = 1 };
-};
-
-#endif // CAMMSDISTANCEATTENUATIONCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammsdopplercontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for Doppler controls
-*
-*/
-
-
-#ifndef CAMMSDOPPLERCONTROLGROUP_H
-#define CAMMSDOPPLERCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsaudio3dcontrolgroup.h"
-#include "ammsconstants.h"
-
-// FORWARD DECLARATIONS
-class CAMMSDopplerControl;
-
-// CONSTANTS
-_LIT(KAMMSDopplerControl, "DopplerControl");
-_LIT(KAMMSDopplerControlClassName, ".amms.control.audio3d.DopplerControl");
-
-// CLASS DECLARATION
-/**
- *  Group for Doppler controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSDopplerControlGroup): public CAMMSAudio3DControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSDopplerControlGroup* NewLC(
-        TAMMSControlTypes aControlType);
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSDopplerControlGroup();
-
-public: // New functions
-    /**
-     * Returns the current velocity, used in calculations for the Doppler
-     * effect
-     *
-     * @param aVelocity     the current velocity
-     */
-    void VelocityCartesianL(TInt aVelocity[ KAMMSVectorComponents ]);
-
-    /**
-     * Returns whether this Doppler effect is currently active.
-     *
-     * @return the enabled state of the control
-     */
-    TBool Enabled();
-
-    /**
-     * Specifies if this Doppler effect is active or ignored.
-     *
-     * @param aEnabled      new enabled state
-     */
-    void SetEnabledL(TBool aEnabled);
-
-    /**
-     * Sets the velocity, used in calculations for the Doppler effect.
-     *
-     * @param aX    the x component of the new velocity
-     * @param aY    the y component of the new velocity
-     * @param aZ    the z component of the new velocity
-     */
-    void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ);
-
-    /**
-     * Sets the velocity, used in calculations for the Doppler effect.
-     *
-     * @param aAzimuth   the azimuth angle of the new velocity in degrees
-     * @param aElevation the elevation angle of the new velocity in degrees
-     * @param aRadius    the magnitude of the new velocity
-     */
-    void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation, TInt aRadius);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSDopplerControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    virtual void CommitL(TInt aCommit);
-
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSDopplerControlGroup(TAMMSControlTypes aControlType);
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private: // Data
-
-    class TVariables
-    {
-    public:
-
-        TInt iVelocity[ KAMMSVectorComponents ];
-        TBool iEnabled;
-    };
-
-    TVariables iCommited; // holder for variables after commit
-    TVariables iUncommited; // holder for variables before commit
-
-    enum TCommit { EEnabled = 1, EVelocity = 2 };
-};
-
-#endif // CAMMSDOPPLERCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammslocationcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for location controls
-*
-*/
-
-
-#ifndef CAMMSLOCATIONCONTROLGROUP_H
-#define CAMMSLOCATIONCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsaudio3dcontrolgroup.h"
-#include "ammsconstants.h"
-
-// CONSTANTS
-_LIT(KAMMSLocationControl, "LocationControl");
-_LIT(KAMMSLocationControlClassName, ".amms.control.audio3d.LocationControl");
-
-// FORWARD DECLARATIONS
-class CAMMSLocationControl;
-
-// CLASS DECLARATION
-/**
- *  Group for location controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSLocationControlGroup): public CAMMSAudio3DControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSLocationControlGroup* NewLC(
-        TAMMSControlTypes aControlType);
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSLocationControlGroup();
-
-public: // New functions
-    /**
-     * Gets the coordinates of the current location
-     *
-     * @param aLocation     the current location
-     */
-    void CartesianL(TInt aLocation[ KAMMSVectorComponents ]);
-
-    /**
-     * Moves the object to the new location
-     *
-     * @param aX    the x component of the new location
-     * @param aY    the y component of the new location
-     * @param aZ    the z component of the new location
-     */
-    void SetCartesianL(TInt aX, TInt aY, TInt aZ);
-
-    /**
-     * Moves the object to the new location
-     *
-     * @param aAzimuth      the azimuth angle of the new location in degrees
-     * @param aElevation    the elevation angle of the new location in degrees
-     * @param aRadius       the magnitude of the new location
-     */
-    void SetSphericalL(TInt aAzimuth, TInt aElevation, TInt aRadius);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSLocationControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    virtual void CommitL(TInt aCommit);
-
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSLocationControlGroup(TAMMSControlTypes aControlType);
-
-private: // Data
-
-    class TVariables
-    {
-    public:
-
-        TInt iLocation[ KAMMSVectorComponents ];
-    };
-
-    TVariables iCommited; // holder for variables after commit
-    TVariables iUncommited; // holder for variables before commit
-
-    enum TCommit { ELocation = 1 };
-};
-
-#endif // CAMMSLOCATIONCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/inc/cammsorientationcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for orientation controls
-*
-*/
-
-
-#ifndef CAMMSORIENTATIONCONTROLGROUP_H
-#define CAMMSORIENTATIONCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsaudio3dcontrolgroup.h"
-#include "ammsconstants.h"
-
-// CONSTANTS
-_LIT(KAMMSOrientationControlClassName,
-     ".amms.control.audio3d.OrientationControl");
-
-// FORWARD DECLARATIONS
-class CAMMSOrientationControl;
-
-
-// CLASS DECLARATION
-/**
- *  Group for location controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSOrientationControlGroup): public CAMMSAudio3DControlGroup
-{
-private:
-
-    class TVariables
-    {
-    public:
-
-        TInt iOrientation[ KAMMSTwoVectorComponents ];
-        TBool iOrientationVector;
-    };
-
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSOrientationControlGroup* NewLC();
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSOrientationControlGroup();
-
-public: // New functions
-    /**
-    * Gets the orientation of the object using two vectors.
-    *
-    * Sets the location using cartesian right-handed coordinates that are
-    * relative to the origin. The measures are defined in units specified
-    * by GlobalManager.getUnitsPerMeter().
-    * Referenced memory of the arguments will contain the coordinate values.
-    *
-    * @param aOrientation     the current orientation
-    */
-    void OrientationVectorsL(TInt aOrientation[ KAMMSTwoVectorComponents ]);
-
-    /**
-    * Turns the object to the new orientation.
-    *
-    * The new orientation is given using rotation angles. A zero vector
-    * corresponds to the orientation pointing directly towards the negative
-    * Z-axis. Orientation is applied in the following order: heading,
-    * pitch, and roll. Therefore, notice that heading turns the X-axis and
-    * therefore affects the pitch, and similarly heading and pitch turn the
-    * Z-axis and therefore affect the roll.
-    *
-    * @param aHeading The rotation around the Y-axis in degrees.
-    * @param aPitch The rotation around the X-axis in degrees.
-    * @param aRoll The rotation around the Z-axis in degrees.
-    */
-    void SetOrientationL(TInt aHeading, TInt aPitch, TInt aRoll);
-
-    /**
-    * Turns the object to the new orientation.
-    *
-    * The orientation is specified using two vectors, one specifying the
-    * direction of the front vector of the object in world coordinates, and
-    * another specifying the "above" vector of the object. The right and up
-    * vectors of the object are calculated by first normalizing both source
-    * vectors, then calculating the right vector as the cross product of the
-    * "above" vector and the front vector, and the up vector as a cross
-    * product of the front and right vectors.
-    *
-    * Because both vectors are normalized, they may be of any length.
-    *
-    * @param aFrontVector X, Y and Z value of Front vector
-    * @param aAboveVector X, Y and Z value of Above vector
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - In case any of the parameters is a zero vector
-    * or they are parallel to each other or any of the parameters' lenghts
-    * is not three. In that case, the orientation of the object remains
-    * unchanged.
-    */
-    void SetOrientationVectorsL(
-        TInt aFrontVector[ KAMMSVectorComponents ],
-        TInt aAboveVector[ KAMMSVectorComponents ]);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSOrientationControl* TypeSafeControl(TInt aIndex) const;
-
-    /**
-     * Creates "up" vector by applying cross product operation to
-     * "front" and "above" vectors.
-     *
-     * @param aVariables Used orientation parameters.
-     * @param aUpVector Returned "up" vector.
-     */
-    static void GetUpVectorL(TVariables& aVariables,
-                             TInt aUpVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Converts orientation from vectors to angles.
-     *
-     * NOTE: THIS FUNCTION SHOULD BE REMOVED WHEN EFFECT API FIX IS AVAILABLE!
-     * (it is possible to set an orientation as vectors).
-     *
-     * @param aVariables Used orientation parameters.
-     * @param aSphericalOrientation Result vector.
-     */
-    static void ConvertOrientationToAnglesL(
-        TVariables& aVariables,
-        TInt aSphericalOrientation[ KAMMSVectorComponents ]);
-
-    /**
-     * Calculates how much the given vector should be rotated around the
-     * given rotation vector so that the value of the specified vector
-     * component is maximized.
-     *
-     * NOTE: THIS FUNCTION SHOULD BE REMOVED WHEN EFFECT API FIX IS AVAILABLE!
-     *
-     * @param aVector Vector thats components are investigated.
-     * @param aRotationAxelVector Vector for the rotation axel.
-     * @param aMaximizeComponent Index of the vector component to be
-     * maximized.
-     * @return An angle that the vector should be rotated.
-     */
-    static TReal CalculatePartialRotationL(
-        TReal aVector[ KAMMSVectorComponents ],
-        TReal aRotationAxelVector[ KAMMSVectorComponents ],
-        TInt aMaximizeComponent);
-
-    /**
-     * Checks whether two given vectors are similar according to the given
-     * maximum error percentage. The function compares each component in
-     * aA to the corresponding component in aB.
-     *
-     * NOTE: THIS FUNCTION SHOULD BE REMOVED WHEN EFFECT API FIX IS AVAILABLE!
-     *
-     * @param aA A vector
-     * @param aB A vector
-     * @param aMaxComponentErrorPercentage Maximum error percentage between
-     * a component in aA and the corresponding component in aB
-     * @return ETrue if difference between each component pair is lower
-     * than the given error, else ETrue is returned
-     */
-    static TBool AreVectorsSimilar(TReal aA[ KAMMSVectorComponents ],
-                                   TReal aB[ KAMMSVectorComponents ],
-                                   TInt aMaxComponentErrorPercentage);
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Transfers all the pending parameters to the audio processing system.
-     *
-     * @param aCommit   variable id that need to be commited
-     */
-    virtual void CommitL(TInt aCommit);
-
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSOrientationControlGroup();
-
-private: // Data
-
-    enum TOrientationIndex { EFrontX = 0,
-                             EFrontY = 1,
-                             EFrontZ = 2,
-                             EAboveX = 3,
-                             EAboveY = 4,
-                             EAboveZ = 5,
-                             EHeading = 0,
-                             EPitch = 1,
-                             ERoll = 2 };
-
-    TVariables iCommited; // holder for variables after commit
-    TVariables iUncommited; // holder for variables before commit
-
-    enum TCommit { EOrientation = 1 };
-};
-
-#endif // CAMMSORIENTATIONCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammsaudio3dcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for 3D audio controls
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsaudio3dcontrolgroup.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSAudio3DControlGroup::~CAMMSAudio3DControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudio3DControlGroup::UpdateL
-// Update the controls depending on commit mode
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudio3DControlGroup::UpdateL(TInt aCommit)
-{
-    // Add new variables that have to be committed to member variable.
-    iCommit |= aCommit;
-
-    if (iCommitMode == EImmediate)
-    {
-        // Commit new values, and remove them from the member variable.
-        CommitL(aCommit);
-        iCommit &= ~aCommit;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudio3DControlGroup::SetModeL
-// Sets the mode of the CommitControl.
-// Can be called only from CAMMSCommitControlGroup
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudio3DControlGroup::SetModeL(TCommitMode aMode)
-{
-    // When switching back from the deferred mode to the immediate mode
-    // (setDeferred(false)) all the pending parameters from the buffer are
-    // transmitted to the audio processing system automatically.
-    if (aMode == EImmediate)
-    {
-        CommitL(iCommit);
-        iCommit = 0;
-    }
-    iCommitMode = aMode;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudio3DControlGroup::CommitGroupL
-// Commits all the controls in the group
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudio3DControlGroup::CommitGroupL()
-{
-    // In case the mode is changed to EImmediate in the middle of commit process,
-    // SetModeL method is implemented so that it takes care of all pending
-    // parameter committing.
-    if (iCommitMode == EDeferred)
-    {
-        CommitL(iCommit);
-        iCommit = 0;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudio3DControlGroup::CAMMSAudio3DControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSAudio3DControlGroup::CAMMSAudio3DControlGroup(
-    const TDesC& aName,
-    TAMMSControlTypes aControlType) :
-        CAMMSControlGroup(aName, aControlType)
-{
-    // default values
-    iCommitMode = EImmediate;
-    iCommit = 0;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudio3DControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSAudio3DControlGroup::ConstructL()
-{
-    CAMMSControlGroup::ConstructL();
-}
-
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammscommitcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for commit controls
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <e32base.h>
-#include "cammscommitcontrolgroup.h"
-#include "cammsmodule.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSCommitControlGroup* CAMMSCommitControlGroup::NewLC(
-    CAMMSModule& aSpectator,
-    CAMMSModuleContainer& aSoundSource3Ds)
-{
-    CAMMSCommitControlGroup* self = new(ELeave) CAMMSCommitControlGroup(
-        aSpectator,
-        aSoundSource3Ds);
-
-    CleanupStack::PushL(self);
-    // calls base class ConstructL
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSCommitControlGroup::~CAMMSCommitControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::CommitAllControlsL
-// Transfers all the pending parameters to the audio processing system
-// for all ControlGroups in this controllable
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSCommitControlGroup::CommitAllControlsL()
-{
-    TInt groupAmount = 0;
-
-    // Go through every module in SoundSource3D
-    TInt moduleAmount = iSoundSource3Ds.Count();
-    for (TInt i = 0; i < moduleAmount; i++)
-    {
-        CAMMSModule* module = iSoundSource3Ds.At(i);
-
-        // Go through every ControlGroup in Module
-        groupAmount = module->Count();
-        for (TInt j = 0; j < groupAmount; j++)
-        {
-            MAMMSControlGroup* group = module->At(j);
-            group->CommitGroupL();
-        }
-    }
-
-    // And finally go through every ControlGroup in Spectator
-    groupAmount = iSpectator.Count();
-    for (TInt i = 0; i < groupAmount; i++)
-    {
-        MAMMSControlGroup* group = iSpectator.At(i);
-        group->CommitGroupL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::SetDeferredL
-// Sets the mode of the CommitControl
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSCommitControlGroup::SetDeferredL(TBool aDeferred)
-{
-    TInt groupAmount = 0;
-    TCommitMode mode = (aDeferred ? EDeferred : EImmediate);
-
-    // Go through every module in SoundSource3D
-    TInt moduleAmount = iSoundSource3Ds.Count();
-    for (TInt i = 0; i < moduleAmount; i++)
-    {
-        CAMMSModule* module = iSoundSource3Ds.At(i);
-
-        // Go through every ControlGroup in Module
-        groupAmount = module->Count();
-        for (TInt j = 0; j < groupAmount; j++)
-        {
-            MAMMSControlGroup* group = module->At(j);
-            group->SetModeL(mode);
-        }
-    }
-
-    // And finally go through every ControlGroup in Spectator
-    groupAmount = iSpectator.Count();
-    for (TInt i = 0; i < groupAmount; i++)
-    {
-        MAMMSControlGroup* group = iSpectator.At(i);
-        group->SetModeL(mode);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSCommitControlGroup::ClassName()
-{
-    return KAMMSCommitControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::CommitL
-// Transfers all the pending parameters to the audio processing system.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSCommitControlGroup::CommitL(TInt /*aCommit*/)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCommitControlGroup::CAMMSCommitControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSCommitControlGroup::CAMMSCommitControlGroup(
-    CAMMSModule& aSpectator,
-    CAMMSModuleContainer& aSoundSource3Ds):
-// CommitControlGroup has no associated amms controls therefore
-// the name passed as a parameter to the constructor is KNullDesC
-// CHANGED for now, passing actual name here even no associated Controls.
-        CAMMSAudio3DControlGroup(KAMMSCommitControl),
-        iSpectator(aSpectator),
-        iSoundSource3Ds(aSoundSource3Ds)
-{
-}
-
-
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammsdistanceattenuationcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for distance attenuation controls
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "cammsdistanceattenuationcontrolgroup.h"
-#include "cammsbasedistanceattenuationcontrol.h"
-
-// CONSTANTS
-static const TInt KAMMSMinDistance = 1000;
-static const TInt KAMMSRolloffFactor = 1000;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSDistanceAttenuationControlGroup*
-CAMMSDistanceAttenuationControlGroup::NewLC()
-{
-    CAMMSDistanceAttenuationControlGroup* self =
-        new(ELeave) CAMMSDistanceAttenuationControlGroup;
-
-    CleanupStack::PushL(self);
-    // calls base class ConstructL
-    self->ConstructL();
-
-    return self;
-}
-
-//Destructor
-CAMMSDistanceAttenuationControlGroup::~CAMMSDistanceAttenuationControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::MaxDistance
-// Returns the maximum distance.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt32 CAMMSDistanceAttenuationControlGroup::MaxDistance() const
-{
-    return iCommited.iMaxDistance;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::MinDistance
-// Returns the distance where the source is loudest.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt32 CAMMSDistanceAttenuationControlGroup::MinDistance() const
-{
-    return iCommited.iMinDistance;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::MuteAfterMax
-// Returns how the distance gain behaves for distances beyond
-// the maximum distance.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TBool CAMMSDistanceAttenuationControlGroup::MuteAfterMax() const
-{
-    return iCommited.iMuteAfterMax;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::RolloffFactor
-// Returns the rolloff factor for the distance gain.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TUint32 CAMMSDistanceAttenuationControlGroup::RolloffFactor() const
-{
-    return iCommited.iRolloffFactor;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::SetParametersL
-// Sets all the 3D audio distance attenuation parameters simultaneously
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDistanceAttenuationControlGroup::SetParametersL(
-    TInt32 aMinDistance,
-    TInt32 aMaxDistance,
-    TBool aMuteAfterMax,
-    TUint32 aRolloffFactor)
-{
-    // temporary values, moved to the commited variables in CommitL() method
-    iUncommited.iMinDistance = aMinDistance;
-    iUncommited.iMaxDistance = aMaxDistance;
-    iUncommited.iMuteAfterMax = aMuteAfterMax;
-    iUncommited.iRolloffFactor = aRolloffFactor;
-
-    UpdateL(EDistance);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::TypeSafeControl
-// Get and cast a control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSBaseDistanceAttenuationControl*
-CAMMSDistanceAttenuationControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSBaseDistanceAttenuationControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSDistanceAttenuationControlGroup::ClassName()
-{
-    return KAMMSDistanceAttenuationClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::CommitL
-// Transfers all the pending parameters to the audio processing system.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDistanceAttenuationControlGroup::CommitL(TInt aCommit)
-{
-    if (aCommit & EDistance)
-    {
-        TInt controls = ControlCount();
-        for (TInt i = 0; i < controls; i++)
-        {
-            TypeSafeControl(i)->SetParametersL(
-                iUncommited.iMinDistance,
-                iUncommited.iMaxDistance,
-                iUncommited.iMuteAfterMax,
-                iUncommited.iRolloffFactor);
-        }
-        iCommited = iUncommited;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDistanceAttenuationControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSAudio3DControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSBaseDistanceAttenuationControl* control =
-        static_cast<CAMMSBaseDistanceAttenuationControl*>(aControl);
-
-    // set the current parameters
-    control->SetParametersL(
-        iCommited.iMinDistance,
-        iCommited.iMaxDistance,
-        iCommited.iMuteAfterMax,
-        iCommited.iRolloffFactor);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControlGroup::CAMMSDistanceAttenuationControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSDistanceAttenuationControlGroup::CAMMSDistanceAttenuationControlGroup()
-        : CAMMSAudio3DControlGroup(KAMMSBaseDistanceAttenuationControl)
-{
-    iCommited.iMinDistance = KAMMSMinDistance;
-    iCommited.iMaxDistance = KMaxTInt;
-    iCommited.iMuteAfterMax = ETrue;
-    iCommited.iRolloffFactor = KAMMSRolloffFactor;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammsdopplercontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for Doppler controls
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "cammsdopplercontrolgroup.h"
-#include "cammsdopplercontrol.h"
-#include "ammsutil.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSDopplerControlGroup* CAMMSDopplerControlGroup::NewLC(
-    TAMMSControlTypes aControlType)
-{
-    CAMMSDopplerControlGroup* self = new(ELeave) CAMMSDopplerControlGroup(
-        aControlType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSDopplerControlGroup::~CAMMSDopplerControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::VelocityCartesianL
-// Returns the current velocity, used in calculations for the Doppler effect
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::VelocityCartesianL(
-    TInt aVelocity[ KAMMSVectorComponents ])
-{
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        aVelocity[ i ] = iCommited.iVelocity[ i ];
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::Enabled
-// Returns whether this Doppler effect is currently active.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TBool CAMMSDopplerControlGroup::Enabled()
-{
-    return iCommited.iEnabled;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::SetEnabledL
-// Specifies if this Doppler effect is active or ignored.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::SetEnabledL(TBool aEnabled)
-{
-    // If the DopplerControl was fetched from the Spectator,
-    // this method has no effect. So only disable the value for SoundSource3D.
-    if (aEnabled ||
-            (!aEnabled && iControlType == EAMMSSoundSource3DControl))
-    {
-        iUncommited.iEnabled = aEnabled;
-        UpdateL(EEnabled);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::SetVelocityCartesianL
-// Sets the velocity, used in calculations for the Doppler effect.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::SetVelocityCartesianL(
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-    iUncommited.iVelocity[ EComponentX ] = aX;
-    iUncommited.iVelocity[ EComponentY ] = aY;
-    iUncommited.iVelocity[ EComponentZ ] = aZ;
-
-    UpdateL(EVelocity);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::SetVelocitySphericalL
-// Sets the velocity, used in calculations for the Doppler effect.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::SetVelocitySphericalL(
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    TInt sphericalVector[] = { aAzimuth, aElevation, aRadius };
-
-    // Convert to cartesian.
-    AMMSUtil::FromSphericalToCartesianL(sphericalVector,
-                                        iUncommited.iVelocity);
-
-    UpdateL(EVelocity);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSDopplerControl*
-CAMMSDopplerControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSDopplerControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSDopplerControlGroup::ClassName()
-{
-    return KAMMSDopplerControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::CommitL
-// Transfers all the pending parameters to the audio processing system.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::CommitL(TInt aCommit)
-{
-    TInt controls = ControlCount();
-
-    // first commit enabled state
-    if (aCommit & EEnabled)
-    {
-        for (TInt i = 0; i < controls; i++)
-        {
-            CAMMSDopplerControl* control = TypeSafeControl(i);
-            control->SetEnabledL(iUncommited.iEnabled);
-        }
-        iCommited.iEnabled = iUncommited.iEnabled;
-    }
-
-    // then commit velocity
-    if (aCommit & EVelocity)
-    {
-        for (TInt i = 0; i < controls; i++)
-        {
-            CAMMSDopplerControl* control = TypeSafeControl(i);
-
-            control->SetVelocityCartesianL(
-                iUncommited.iVelocity[ EComponentX ],
-                iUncommited.iVelocity[ EComponentY ],
-                iUncommited.iVelocity[ EComponentZ ]);
-        }
-
-        // Change uncommited velocity to commited
-        for (TInt i = 0; i < KAMMSVectorComponents; i++)
-        {
-            iCommited.iVelocity[ i ] = iUncommited.iVelocity[ i ];
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSDopplerControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSAudio3DControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSDopplerControl* control =
-        static_cast<CAMMSDopplerControl*>(aControl);
-
-    // set the current parameters
-
-    control->SetVelocityCartesianL(
-        iCommited.iVelocity[ EComponentX ],
-        iCommited.iVelocity[ EComponentY ],
-        iCommited.iVelocity[ EComponentZ ]);
-
-    control->SetEnabledL(iCommited.iEnabled);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::CAMMSDopplerControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSDopplerControlGroup::CAMMSDopplerControlGroup(
-    TAMMSControlTypes aControlType):
-        CAMMSAudio3DControlGroup(KAMMSDopplerControl, aControlType)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-inline void CAMMSDopplerControlGroup::ConstructL()
-{
-    CAMMSAudio3DControlGroup::ConstructL();
-
-    // The default value for Spectator's DopplerControl is true
-    // (the default value for SoundSource3D's DopplerControl is false)
-    if (iControlType == EAMMSSpectatorControl)
-    {
-        SetEnabledL(ETrue);
-    }
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammslocationcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for location controls
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "cammslocationcontrolgroup.h"
-#include "cammslocationcontrol.h"
-#include "ammsutil.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSLocationControlGroup* CAMMSLocationControlGroup::NewLC(
-    TAMMSControlTypes aControlType)
-{
-    CAMMSLocationControlGroup* self = new(ELeave) CAMMSLocationControlGroup(
-        aControlType);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-
-}
-
-// Destructor
-CAMMSLocationControlGroup::~CAMMSLocationControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::Cartesian
-// Gets the coordinates of the current location
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSLocationControlGroup::CartesianL(
-    TInt aLocation[ KAMMSVectorComponents ])
-{
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        aLocation[ i ] = iCommited.iLocation[ i ];
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::SetCartesianL
-// Moves the object to the new location
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSLocationControlGroup::SetCartesianL(TInt aX, TInt aY, TInt aZ)
-{
-    iUncommited.iLocation[ EComponentX ] = aX;
-    iUncommited.iLocation[ EComponentY ] = aY;
-    iUncommited.iLocation[ EComponentZ ] = aZ;
-
-    UpdateL(ELocation);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::SetSphericalL
-// Moves the object to the new location
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSLocationControlGroup::SetSphericalL(
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    __ASSERT_DEBUG(aRadius >= 0, User::Invariant());
-
-    TInt sphericalVector[] = { aAzimuth, aElevation, aRadius };
-
-    // Convert to cartesian.
-    AMMSUtil::FromSphericalToCartesianL(sphericalVector,
-                                        iUncommited.iLocation);
-
-    UpdateL(ELocation);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSLocationControl*
-CAMMSLocationControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSLocationControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSLocationControlGroup::ClassName()
-{
-    return KAMMSLocationControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::CommitL
-// Transfers all the pending parameters to the audio processing system.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSLocationControlGroup::CommitL(TInt aCommit)
-{
-    if (aCommit & ELocation)
-    {
-        TInt controls = ControlCount();
-        for (TInt i = 0; i < controls; i++)
-        {
-            CAMMSLocationControl* control = TypeSafeControl(i);
-
-            control->SetLocationCartesianL(
-                iUncommited.iLocation[ EComponentX ],
-                iUncommited.iLocation[ EComponentY ],
-                iUncommited.iLocation[ EComponentZ ]);
-        }
-
-        iCommited = iUncommited;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSLocationControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSAudio3DControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSLocationControl* control =
-        static_cast<CAMMSLocationControl*>(aControl);
-
-    // set the current parameters
-    control->SetLocationCartesianL(
-        iCommited.iLocation[ EComponentX ],
-        iCommited.iLocation[ EComponentY ],
-        iCommited.iLocation[ EComponentZ ]);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControlGroup::CAMMSLocationControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSLocationControlGroup::CAMMSLocationControlGroup(
-    TAMMSControlTypes aControlType):
-        CAMMSAudio3DControlGroup(KAMMSLocationControl, aControlType)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audio3D/src/cammsorientationcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,600 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for orientation controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsorientationcontrolgroup.h"
-#include "cammsorientationcontrol.h"
-#include "ammsutil.h"
-
-
-// CONSTANTS
-namespace
-{
-// since orientation vectors consist of integers rather than real values,
-// normalized vectors have to be multiplied by a large constant to keep
-// adequate precision
-const TInt KAMMSAxisMultiplier = 1000;
-
-// Some calculations are done with real values and then rounded to integers.
-// Rounding may cause loss of precision. KAMMSMaxOrientationErrorPercentage
-// tells how much error (in percentages) is acceptable when rounding values.
-const TInt KAMMSMaxOrientationErrorPercentage = 5;
-}
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSOrientationControlGroup* CAMMSOrientationControlGroup::NewLC()
-{
-    CAMMSOrientationControlGroup* self =
-        new(ELeave) CAMMSOrientationControlGroup;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-
-}
-
-// Destructor
-CAMMSOrientationControlGroup::~CAMMSOrientationControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::OrientationVectorsL
-// Gets the orientation of the object using two vectors
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::OrientationVectorsL(
-    TInt aOrientation[ KAMMSTwoVectorComponents ])
-{
-    // If the orientation was set by using "front" and "above" vectors,
-    // return "front" and "up" vectors.
-    if (iCommited.iOrientationVector)
-    {
-        // Get "up" vector.
-        TInt upVector[ KAMMSVectorComponents ];
-        GetUpVectorL(iCommited, upVector);
-
-        // Return the "front" and "up" vectors.
-        for (TInt i = 0; i < KAMMSVectorComponents; i ++)
-        {
-            aOrientation[ i ] = iCommited.iOrientation[ i ];
-            aOrientation[ i + KAMMSVectorComponents ] = upVector[ i ];
-        }
-    }
-    // If the orientation was set by using angles, convert set angles
-    // to "front" and "up" vectors.
-    else
-    {
-        // Start rotation from these axis vectors.
-        TReal xAxisVector[ KAMMSVectorComponents ] = { 1, 0, 0 };
-        TReal yAxisVector[ KAMMSVectorComponents ] = { 0, 1, 0 };
-        TReal zAxisVector[ KAMMSVectorComponents ] = { 0, 0, 1 };
-
-        // Result axis vectors after rotation.
-        TReal xAxisVector2[ KAMMSVectorComponents ];
-        TReal yAxisVector2[ KAMMSVectorComponents ];
-        TReal zAxisVector2[ KAMMSVectorComponents ];
-
-        // rotate round y axis
-        AMMSUtil::RotateVectorL(zAxisVector, yAxisVector,
-                                iCommited.iOrientation[ EHeading ], zAxisVector2);
-        AMMSUtil::RotateVectorL(xAxisVector, yAxisVector,
-                                iCommited.iOrientation[ EHeading ], xAxisVector2);
-
-        // rotate round x axis
-        AMMSUtil::RotateVectorL(yAxisVector, xAxisVector2,
-                                iCommited.iOrientation[ EPitch ], yAxisVector2);
-        AMMSUtil::RotateVectorL(zAxisVector2, xAxisVector2,
-                                iCommited.iOrientation[ EPitch ], zAxisVector);
-
-        // rotate round z axis
-        AMMSUtil::RotateVectorL(yAxisVector2, zAxisVector,
-                                iCommited.iOrientation[ ERoll ], yAxisVector);
-
-        // round and save "front" vector to the given parameter
-        TReal roundedValue;
-        for (TInt i = 0; i < KAMMSVectorComponents; i++)
-        {
-            User::LeaveIfError(Math::Round(roundedValue, zAxisVector[ i ] *    // CSI: 2 Wrong index means implementation error #
-                                           KAMMSAxisMultiplier, 0));
-            // "front" vector is opposite to z-axis
-            aOrientation[ i ] = -(TInt)roundedValue;    // CSI: 2 Wrong index means implementation error #
-        }
-
-        // round and save "up" vector to the given parameter
-        for (TInt e = 0; e < KAMMSVectorComponents; e++)
-        {
-            User::LeaveIfError(Math::Round(roundedValue, yAxisVector[ e ] *    // CSI: 2 Wrong index means implementation error #
-                                           KAMMSAxisMultiplier, 0));
-            aOrientation[ e + KAMMSVectorComponents ] = (TInt)roundedValue;    // CSI: 2 Wrong index means implementation error #
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::SetOrientationL
-// Turns the object to the new orientation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::SetOrientationL(
-    TInt aHeading,
-    TInt aPitch,
-    TInt aRoll)
-{
-    iUncommited.iOrientation[ EHeading ]    = aHeading;
-    iUncommited.iOrientation[ EPitch ]      = aPitch;
-    iUncommited.iOrientation[ ERoll ]       = aRoll;
-    iUncommited.iOrientationVector = EFalse;
-
-    UpdateL(EOrientation);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::SetOrientationVectorsL
-// Turns the object to the new orientation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::SetOrientationVectorsL(
-    TInt aFrontVector[ KAMMSVectorComponents ],
-    TInt aAboveVector[ KAMMSVectorComponents ])
-{
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        iUncommited.iOrientation[ i ] = aFrontVector[ i ];
-        iUncommited.iOrientation[ i + KAMMSVectorComponents ] =
-            aAboveVector[ i ];
-    }
-    iUncommited.iOrientationVector = ETrue;
-
-    UpdateL(EOrientation);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSOrientationControl*
-CAMMSOrientationControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSOrientationControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::GetUpVectorL
-// Calculates and returns "up" vector by using "front" and "above" vectors.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::GetUpVectorL(
-    TVariables& aVariables,
-    TInt aUpVector[ KAMMSVectorComponents ])
-{
-    __ASSERT_DEBUG(aVariables.iOrientationVector, User::Invariant());
-
-    // Calculate first "right" vector and then "up" vector.
-    // The "right" vector is calculated as cross product of the "front"
-    // and "above" vectors.
-    // The "up" vector is calculated as cross product of the "right"
-    // and "front" vectors.
-
-    TReal frontVector[ KAMMSVectorComponents ] =
-    {
-        aVariables.iOrientation[ EFrontX ],
-        aVariables.iOrientation[ EFrontY ],
-        aVariables.iOrientation[ EFrontZ ]
-    };
-
-    TReal aboveVector[ KAMMSVectorComponents ] =
-    {
-        aVariables.iOrientation[ EAboveX ],
-        aVariables.iOrientation[ EAboveY ],
-        aVariables.iOrientation[ EAboveZ ]
-    };
-
-    TReal rightVector[ KAMMSVectorComponents ];
-
-    TReal vectorLength = Min(AMMSUtil::VectorLengthL(frontVector),
-                             (TReal)KMaxTInt);
-
-    // Perform cross product with unit vectors.
-    AMMSUtil::ConvertToUnitVectorL(frontVector);
-    AMMSUtil::ConvertToUnitVectorL(aboveVector);
-
-    TReal upVector[ KAMMSVectorComponents ];
-
-    AMMSUtil::CrossProduct(frontVector, aboveVector, rightVector);
-    AMMSUtil::CrossProduct(rightVector, frontVector, upVector);
-
-    AMMSUtil::ConvertToUnitVectorL(upVector);
-
-    // Multiply the unit vector so that the result "up" vector has the same
-    // length as the "front" vector.
-
-    AMMSUtil::MultiplyVector(upVector, vectorLength);
-
-    // Round the vector.
-    AMMSUtil::RoundVectorL(upVector, aUpVector);
-
-    // Check the rounding error. If it is too high, multiply the original
-    // vector before rounding.
-    if (!AMMSUtil::AreVectorsSimilar(upVector,
-                                     aUpVector,
-                                     KAMMSMaxOrientationErrorPercentage))
-    {
-        AMMSUtil::MultiplyVector(upVector, (TReal)KAMMSAxisMultiplier);
-
-        // Accept this multiplied vector only if it can be fit into TInt.
-        if ((AMMSUtil::MinVectorComponent(upVector) >= KMinTInt) &&
-                (AMMSUtil::MaxVectorComponent(upVector) <= KMaxTInt))
-        {
-            AMMSUtil::RoundVectorL(upVector, aUpVector);
-        }
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::ConvertOrientationToAnglesL
-// Converts orientation from vectors to angles.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::ConvertOrientationToAnglesL(
-    TVariables& aVariables,
-    TInt aSphericalOrientation[ KAMMSVectorComponents ])
-{
-    // Get vector for y-axis.
-    TInt temp[ KAMMSVectorComponents ];
-    GetUpVectorL(aVariables, temp);
-    TReal yAxisVector[] = { temp[ EComponentX ], temp[ EComponentY ],
-                            temp[ EComponentZ ]
-                          };
-
-    AMMSUtil::ConvertToUnitVectorL(yAxisVector);
-
-
-    // Get vector for z-axis.
-    TReal frontVector[] =
-    {
-        aVariables.iOrientation[ EFrontX ],
-        aVariables.iOrientation[ EFrontY ],
-        aVariables.iOrientation[ EFrontZ ]
-    };
-
-    // Z-axis is opposite to the front vector.
-    AMMSUtil::ConvertToUnitVectorL(frontVector);
-    TReal zAxisVector[ KAMMSVectorComponents ] =
-    {
-        -frontVector[ EFrontX ],
-        -frontVector[ EFrontY ],
-        -frontVector[ EFrontZ ]
-    };
-
-
-    // Calculate orientation vector for the x-axis.
-    // The vector is calculated as cross product of the y-
-    // and z-axis vectors.
-    TReal xAxisVector[ KAMMSVectorComponents ];
-
-    AMMSUtil::CrossProduct(yAxisVector, zAxisVector, xAxisVector);
-    AMMSUtil::ConvertToUnitVectorL(xAxisVector);
-
-
-    // First rotate the object coordinate axels so that the object y-axel is
-    // parallel to the global y-axis (this gives us roll and pitch angles).
-    // Then rotate the object coordinate axels so that x- and z-axels are
-    // parallel to the global x- and z-axels, respectively (this gives the
-    // heading).
-
-
-    // Calculate how much the axels should be rotated round the z-axis.
-    TReal rotateRollDeg = CalculatePartialRotationL(yAxisVector, zAxisVector, EComponentY);
-
-    AMMSUtil::RotateVectorL(xAxisVector, zAxisVector, rotateRollDeg, xAxisVector);
-    AMMSUtil::RotateVectorL(yAxisVector, zAxisVector, rotateRollDeg, yAxisVector);
-
-
-    // Calculate how much the axels should be rotated round the x-axis.
-    TReal rotatePitchDeg = CalculatePartialRotationL(yAxisVector, xAxisVector, EComponentY);
-
-    AMMSUtil::RotateVectorL(yAxisVector, xAxisVector, rotatePitchDeg, yAxisVector);
-    AMMSUtil::RotateVectorL(zAxisVector, xAxisVector, rotatePitchDeg, zAxisVector);
-
-    // Calculate how much the axels should be rotated round the y-axis.
-    TReal rotateHeadingDeg = CalculatePartialRotationL(xAxisVector, yAxisVector, EComponentX);
-
-    TReal resultAngles[] = { -rotateHeadingDeg,
-                             -rotatePitchDeg,
-                             -rotateRollDeg
-                           };
-
-    AMMSUtil::RoundVectorL(resultAngles, aSphericalOrientation);
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::CalculatePartialRotationL
-// Calculates how much the given vector should be rotated around the given
-// rotation vector so that the value of the specified vector component is
-// maximized.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TReal CAMMSOrientationControlGroup::CalculatePartialRotationL(
-    TReal aVector[ KAMMSVectorComponents ],
-    TReal aRotationAxelVector[ KAMMSVectorComponents ],
-    TInt aMaximizeComponent)
-{
-    __ASSERT_DEBUG((aMaximizeComponent >= EComponentX) &&
-                   (aMaximizeComponent <= EComponentZ),
-                   User::Invariant());
-
-    TReal x = aRotationAxelVector[ EComponentX ];
-    TReal y = aRotationAxelVector[ EComponentY ];
-    TReal z = aRotationAxelVector[ EComponentZ ];
-
-    // calculate the length of the axis vector
-    TReal lengthSquare = x * x + y * y + z * z;
-    TReal length;
-    User::LeaveIfError(Math::Sqrt(length, lengthSquare));
-
-    // check that the vector is long enough
-    __ASSERT_DEBUG(length > 0, User::Invariant());
-
-
-    // Find out the components that are tried to set 0.
-    TInt zeroComponents[ KAMMSVectorComponents - 1 ];
-    TInt counter = 0;
-
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        if (i != aMaximizeComponent)
-        {
-            zeroComponents[ counter ] = i;
-            counter++;
-        }
-    }
-
-    // normalize the axis vector
-    x = x / length;
-    y = y / length;
-    z = z / length;
-
-    // calculate some help variables
-    TReal xx = x * x;
-    TReal yy = y * y;
-    TReal zz = z * z;
-
-    TReal x2 = aVector[ EComponentX ];
-    TReal y2 = aVector[ EComponentY ];
-    TReal z2 = aVector[ EComponentZ ];
-
-    TReal xx2 = x * x2;
-    TReal yy2 = y * y2;
-    TReal zz2 = z * z2;
-
-    TReal xxx2 = xx * x2;
-    TReal yyy2 = yy * y2;
-    TReal zzz2 = zz * z2;
-
-    TReal constants[] =
-    {
-        xxx2 + x *(yy2 + zz2),
-        yyy2 + y *(xx2 + zz2),
-        zzz2 + z *(xx2 + yy2)
-    };
-
-    TReal cosMultipliers[] =
-    {
-        constants[ EComponentX ] - x2,
-        constants[ EComponentY ] - y2,
-        constants[ EComponentZ ] - z2
-    };
-
-    TReal sinMultipliers[] =
-    {
-        z * y2 - y * z2,
-        x * z2 - z * x2,
-        y * x2 - x * y2
-    };
-
-    // The angles where some component of the vector is zero.
-    TReal zeroAngles[ 4 ];  // CSI: 47 Two components may have zero points in 4 angles. #
-    TInt angleCounter = 0;
-
-    // Find rotation angles that makes (at least) one of the vector components
-    // to be 0 (however, dismiss the component to be maximized).
-    for (int i = 0; i < KAMMSVectorComponents - 1; i++)
-    {
-        TInt componentIndex = zeroComponents[ i ];
-
-        TReal cosMultiplier = cosMultipliers[ componentIndex ];
-        TReal sinMultiplier = sinMultipliers[ componentIndex ];
-
-        TReal angleDeg = 0;
-
-        // If both multipliers are zero, this vector is parallel or opposite
-        // to the target vector. Thus, no need to calculate the angle.
-        if ((cosMultiplier != 0) ||
-                (sinMultiplier != 0))
-        {
-            // Calculate the angle that makes this vector element to be 0.
-            TReal temp = cosMultiplier * cosMultiplier +
-                         sinMultiplier * sinMultiplier;
-
-            TReal divider = 0;
-            User::LeaveIfError(Math::Sqrt(divider, temp));
-
-            TReal arcTan = 0;
-            User::LeaveIfError(
-                Math::ATan(arcTan, sinMultiplier, cosMultiplier));
-
-            TReal arcCos = 0;
-            User::LeaveIfError(Math::ACos(
-                                   arcCos, constants[ i ] / divider));    // CSI: 2 Wrong index means implementation error #
-
-            TReal angleRad = arcCos + arcTan;
-
-            // Save the angle in degrees.
-            angleDeg = angleRad * 180 / KPi;  // CSI: 47 Value 180 means 180 degrees #
-        }
-
-        zeroAngles[ angleCounter ] = angleDeg;
-
-        zeroAngles[ angleCounter + 1 ] = angleDeg + 180; // CSI: 47 Save also the opposite direction (+ 180 degrees) #
-
-        angleCounter += 2;  // CSI: 47 Two angles have been found #
-    }
-
-
-    // Find the angle that gives the maximum value for the component
-    // to be maximized.
-    TReal maxValue = -0xFFFF;
-    TInt maxIndex = KErrNotFound;
-
-    for (TInt i = 0; i < angleCounter; i++)
-    {
-        // Rotate the original vector.
-        TReal rotatedVector[ KAMMSVectorComponents ];
-
-        AMMSUtil::RotateVectorL(aVector, aRotationAxelVector,
-                                zeroAngles[ i ], rotatedVector);   // CSI: 2 Wrong index means implementation error #
-
-        // Check the value of the component that should be maximized.
-        TReal value = rotatedVector[ aMaximizeComponent ];
-
-        if (value > maxValue)
-        {
-            maxValue = value;
-            maxIndex = i;
-        }
-    }
-
-    return zeroAngles[ maxIndex ];
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSOrientationControlGroup::ClassName()
-{
-    return KAMMSOrientationControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::CommitL
-// Transfers all the pending parameters to the audio processing system.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::CommitL(TInt aCommit)
-{
-    if (aCommit & EOrientation)
-    {
-        TInt controls = ControlCount();
-
-        if (controls > 0)
-        {
-            TInt angleVector[] =
-            {
-                iUncommited.iOrientation[ EHeading ],
-                iUncommited.iOrientation[ EPitch ],
-                iUncommited.iOrientation[ ERoll ]
-            };
-
-            // If the orientation was given in vectors, convert
-            // the vectors to angles because at the moment the Effect API
-            // can handle only angles.
-            if (iUncommited.iOrientationVector)
-            {
-                ConvertOrientationToAnglesL(iUncommited, angleVector);
-            }
-
-            for (TInt i = 0; i < controls; i++)
-            {
-                CAMMSOrientationControl* control = TypeSafeControl(i);
-
-                control->SetOrientationL(
-                    angleVector[ EHeading ],
-                    angleVector[ EPitch ],
-                    angleVector[ ERoll ]);
-            }
-        }
-
-        iCommited = iUncommited;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSAudio3DControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSOrientationControl* control =
-        static_cast<CAMMSOrientationControl*>(aControl);
-
-    // set the current parameters
-    if (iCommited.iOrientationVector)
-    {
-        TInt angleVector[ KAMMSVectorComponents ];
-
-        ConvertOrientationToAnglesL(iCommited, angleVector);
-
-        control->SetOrientationL(
-            angleVector[ EHeading ],
-            angleVector[ EPitch ],
-            angleVector[ ERoll ]);
-    }
-    else
-    {
-        control->SetOrientationL(
-            iCommited.iOrientation[ EHeading ],
-            iCommited.iOrientation[ EPitch ],
-            iCommited.iOrientation[ ERoll ]);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControlGroup::CAMMSOrientationControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSOrientationControlGroup::CAMMSOrientationControlGroup()
-        : CAMMSAudio3DControlGroup(KAMMSOrientationControl)
-{
-    // Default orientation is:
-    // heading = 0
-    // pitch = 0
-    // roll = 0
-    iCommited.iOrientationVector = EFalse;
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audioeffect/inc/cammsaudiovirtualizercontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb controls
-*
-*/
-
-
-#ifndef CAMMSAUDIOVIRTUALIZERCONTROLGROUP_H
-#define CAMMSAUDIOVIRTUALIZERCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrolgroup.h"
-
-// CONSTANTS
-_LIT(KAMMSAudioVirtualizerControlClassName,
-     ".amms.control.audioeffect.AudioVirtualizerControl");
-
-// FORWARD DECLARATIONS
-class CAMMSAudioVirtualizerControl;
-class CStereoWideningUtility;
-
-
-// CLASS DECLARATION
-/**
- *  Group for audio virtualizer controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSAudioVirtualizerControlGroup):
-        public CAMMSEffectControlGroup
-{
-public:  // Constructors and destructor
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSAudioVirtualizerControlGroup* NewLC();
-
-    /**
-     * destructor
-     */
-    ~CAMMSAudioVirtualizerControlGroup();
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:  // Functions from base classes
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-    /**
-     * Called when the current preset changes
-     */
-    void PresetChangedL();
-
-    /**
-     * Finish initialization (after the 1st player is added)
-     */
-    void InitializeL();
-
-    /**
-     * Creates utilities that can be used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utility already exists.
-     */
-    void PrepareEmptyGroupUtilitiesL();
-
-    /**
-     * Deletes utilities that are used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utilities have already been deleted.
-     */
-    void DeleteEmptyGroupUtilities();
-
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    void GetPresetNamesL(CDesCArray& aPresetNames);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSAudioVirtualizerControlGroup();
-
-    /**
-     * Symbian 2nd phase constructor.
-     */
-    void ConstructL();
-
-private: // data
-
-    // Needed to get preset names when the group has no controls.
-    CStereoWideningUtility* iEmptyStereoWideningUtility;  // Owned.
-
-};
-
-#endif // CAMMSAUDIOVIRTUALIZERCONTROLGROUP_H
--- a/javauis/amms_qt/ammscontrol/audioeffect/inc/cammseffectcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-#ifndef CAMMSEFFECTCONTROLGROUP_H
-#define CAMMSEFFECTCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <badesca.h>
-#include <mdaaudiosampleplayer.h>  // MMdaAudioPlayerCallback
-#include "cammscontrolgroup.h"
-
-// CONSTANTS
-// Used to get preset names and data when the group is empty.
-_LIT(KAMMSEmptyGroupSoundPath, "Z:\\System\\Sounds\\Digital\\CamcorderJavaStart.wav");
-const TInt KAMMSMaxPresetNameLength = 32;
-const TInt KAMMSPresetGranularity = 5;
-
-// FORWARD DECLARATIONS
-class CAMMSEffectControl;
-
-
-// CLASS DECLARATION
-
-/**
- *  Group for effect controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSEffectControlGroup)
-        : public CAMMSControlGroup, public MMdaAudioPlayerCallback
-{
-public:  // Enumerations
-
-    enum TEffectScope {
-        EScopeLiveOnly = 1,
-        EScopeRecordOnly = 2,
-        EScopeLiveAndRecord = 3 };
-
-public:  // Constructors and destructor
-    /**
-     * Destructor.
-     */
-    ~CAMMSEffectControlGroup();
-
-public: // New functions
-
-    /**
-     * Gets the current preset.
-     *
-     * @return the current preset
-     */
-    void GetPresetL(TDes& aPreset);
-
-    /**
-     * Gets the available preset names
-     *
-     * @return all the available current presets
-     */
-    const CDesCArray& PresetNamesL();
-
-    /**
-     * Returns the scope in which the effect is present.
-     *
-     * @return SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY or SCOPE_LIVE_AND_RECORD
-     */
-    TEffectScope Scope();
-
-    /**
-     * Returns true if the effect is enabled and false otherwise.
-     *
-     * @return true=enable, false=disable
-     */
-    TBool Enabled();
-
-    /**
-     * Returns the current enforced setting of the effect.
-     *
-     * @return true if the effect is an enforced effect, false if not
-     */
-    TBool Enforced();
-
-    /**
-     * Enables/disables the effect.
-     *
-     * @param aEnabled      true=enabled, false=disabled
-     */
-    void SetEnabledL(TBool aEnabled);
-
-    /**
-     * Enforces the effect to be in use.
-     *
-     * @param aEnforced     true if the effect is essential and cannot
-     *                      be dropped, false if the effect can be dropped
-     *                      if the system runs out of resources.
-     */
-    void SetEnforcedL(TBool aEnforced);
-
-    /**
-     * Sets the effect according to the given preset.
-     *
-     * @param aPreset       The new preset that will be taken into use
-     */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-     * Sets the scope of the effect.
-     *
-     * @param aScope        SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY or
-     *                      SCOPE_LIVE_AND_RECORD.
-     */
-    void SetScopeL(TEffectScope aScope);
-
-public:  // From MMdaAudioPlayerCallback
-
-    /**
-     * Called when file KAMMSEmptyGroupSoundPath has been opened.
-     */
-    void MapcInitComplete(TInt aError,
-                          const TTimeIntervalMicroSeconds& aDuration);
-
-    /**
-     * Called when KAMMSEmptyGroupSoundPath has been played,
-     * no implementation needed in this class.
-     */
-    void MapcPlayComplete(TInt aError);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSEffectControl* TypeSafeControl(TInt aIndex) const;
-
-protected:  // New functions
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-    /**
-     * Called when the current preset changes
-     */
-    virtual void PresetChangedL();
-
-    /*
-     * Finish initialization (after the 1st player is added)
-     */
-    virtual void InitializeL();
-
-    /**
-     * Creates utilities that can be used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utility already exists.
-     */
-    virtual void PrepareEmptyGroupUtilitiesL();
-
-    /**
-     * Deletes utilities that are used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utilities have already been deleted.
-     */
-    virtual void DeleteEmptyGroupUtilities();
-
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    virtual void GetPresetNamesL(CDesCArray& aPresetNames) = 0;
-
-protected:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSEffectControlGroup(const TDesC& aName);
-
-protected:
-    /**
-     * 2nd phase constructor.
-     */
-    void BaseConstructL();
-
-protected: // data
-
-    // Available preset names, owned
-    CDesCArrayFlat* iPresetNames;
-
-    // Index of the current preset or -1 if no preset is set
-    TInt iPresetIndex;
-
-    TBool iInitialized; // Flag to store whether effect is initialized
-
-    // Used to get preset names and data when the group is empty
-    // (there are no controls in the group, and thus, no actual
-    // control can be used for that purpose).
-    CMdaAudioPlayerUtility* iEmptyPlayerUtility;  // Owned.
-
-private: //data
-
-    TEffectScope iScope; // Scope of the effect
-    TBool iEnabled; // Flag to store whether effect is enabled
-    TBool iEnforced; // Flag to store whether effect is enforced
-
-    // Flag to store whether enforce was set before the group was initialized
-    TBool iInitialEnforceSet;
-    // Flag to store whether scope was set before the group was initialized
-    TBool iInitialScopeSet;
-
-    // Used to wait for opening KAMMSEmptyGroupSoundPath.
-    CActiveSchedulerWait* iActiveSchedulerWait; // Owned.
-
-    // Error code occured when creating a player for empty group.
-    TInt iEmptyPlayerUtilityError;
-
-};
-
-#endif // CAMMSEFFECTCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audioeffect/inc/cammsequalizercontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for equalizer controls
-*
-*/
-
-
-#ifndef CAMMSEQUALIZERCONTROLGROUP_H
-#define CAMMSEQUALIZERCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrolgroup.h"
-#include <AudioEqualizerData.h>
-
-// CONSTANTS
-_LIT(KAMMSEqualizerControlClassName,
-     ".amms.control.audioeffect.EqualizerControl");
-
-
-// FORWARD DECLARATIONS
-class CAMMSBaseEqualizerControl;
-class CAudioEqualizerUtility;
-
-
-// CLASS DECLARATION
-/**
- *  Group for equalizer controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSEqualizerControlGroup): public CAMMSEffectControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSEqualizerControlGroup* NewLC();
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSEqualizerControlGroup();
-
-public: // New functions
-    /**
-     * Gets the band that has the most effect on the given frequency
-     *
-     * @param aFrequency    The frequency in milliHertz which is
-     *                      to be equalized via the returned band
-     *
-     * @return The frequency band that has most effect on the given
-     * frequency or -1 if no band has effect on the given frequency
-     */
-    TInt Band(TInt aFrequency);
-
-    /**
-     * Gets the gain set for the given equalizer band.
-     *
-     * @param aBand         The frequency band whose gain is asked.
-     * @param aBandLevel    The returned level for the given band in millibels.
-     *
-     */
-    void GetBandLevelL(TInt aBand, TInt& aBandLevel);
-
-    /**
-     * Gets the bass level.
-     *
-     * @return The current level that is set to the bass band. If the
-     * bass level cannot been defined EqualizerControl.UNDEFINED will
-     * be returned
-     */
-    TInt Bass();
-
-    /**
-     * Gets the center frequency of the given band
-     *
-     * @param aBand         The frequency band whose center frequency
-     *                      is asked.
-     * @param aCenterFreq   The returned center frequency in milliHertz.
-     */
-    void GetCenterFreqL(TInt aBand, TInt& aCenterFreq);
-
-    /**
-     * Returns the maximum band level supported
-     *
-     * @return the maximum band level supported
-     */
-    TInt MaxBandLevel();
-
-    /**
-     * Returns the minimum band level supported.
-     *
-     * @return the minimum band level supported.
-     */
-    TInt MinBandLevel();
-
-    /**
-     * Gets the number of frequency bands that the equalizer supports.
-     *
-     * @return the number of frequency bands that the equalizer supports.
-     */
-    TInt NumberOfBands();
-
-    /**
-     * Gets the treble level.
-     *
-     * @return The current level that is set to the treble band. If the
-     * treble level cannot been defined EqualizerControl.UNDEFINED will
-     * be returned
-     */
-    TInt Treble();
-
-    /**
-     * Sets the given equalizer band to the given gain value.
-     *
-     * @param aLevel    The new gain in millibels that will be set to the
-     *                  given band
-     * @param aBand     The frequency band that will have the new gain
-     */
-    void SetBandLevelL(TInt aLevel, TInt aBand);
-
-    /**
-     * Sets the bass level using a linear point scale with values between
-     * 0 and 100: a value of 0 applies the maximum available attenuation
-     * to frequencies in the bass band; a value of 50 gives a flat
-     * equalization of the bass band; and a value of 100 applies the
-     * maximum available amplification to frequencies in the bass band.
-     *
-     * @param aLevel    The new level on a linear point scale that will
-     *                  be set to the bass band
-     * @param aSetLevel Returned level that was actually set
-     */
-    void SetBassL(TInt aLevel, TInt& aSetLevel);
-
-    /**
-     * Sets the treble level using a linear point scale with values between
-     * 0 and 100: a value of 0 applies the maximum available attenuation to
-     * frequencies in the treble band; a value of 50 gives a flat
-     * equalization of the treble band; and a value of 100 applies the
-     * maximum available amplification to frequencies in the treble band
-     *
-     * @param aLevel    The new level on a linear point scale that will
-     *                  be set to the treble band
-     *
-     * @param aSetLevel Returned level that was actually set
-     */
-    void SetTrebleL(TInt aLevel, TInt& aSetLevel);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSBaseEqualizerControl* TypeSafeControl(TInt aIndex) const;
-
-    /**
-     * Checks whether the band index is between 0 and number of bands -1.
-     * Function leaves with KErrArgument if the band is not between the
-     * limits.
-     */
-    void CheckBandIndexL(TInt aBand) const;
-
-    /**
-     * Gets bands corresponding to the given preset index.
-     * The data is obtained from controls (or from empty group utility, if the
-     * group has no controls).
-     * @param aPresetIndex Index of the preset whose bands are asked
-     * @param aBands Returned bands
-     */
-    void GetPresetBandsL(TUint aPresetIndex,
-                         RArray< TEfAudioEqualizerBand >& aBands);
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected: // Functions from base classes
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-    /**
-     * Called when the current preset changes
-     */
-    void PresetChangedL();
-
-    /**
-     * Finish initialization (after the 1st player is added)
-     */
-    void InitializeL();
-
-    /**
-     * Creates utilities that can be used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utility already exists.
-     */
-    void PrepareEmptyGroupUtilitiesL();
-
-    /**
-     * Deletes utilities that are used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utilities have already been deleted.
-     */
-    void DeleteEmptyGroupUtilities();
-
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    void GetPresetNamesL(CDesCArray& aPresetNames);
-
-protected:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSEqualizerControlGroup();
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private: // data
-
-    // Needed to get preset names when the group has no controls.
-    CAudioEqualizerUtility* iEmptyAudioEqualizerUtility;  // Owned.
-
-    RArray< TEfAudioEqualizerBand > iBands;
-    TInt iBass; // bass level
-    TInt iTreble; // treble level
-    TInt iMaxBandLevel;
-    TInt iMinBandLevel;
-};
-
-#endif // CAMMSEQUALIZERCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/audioeffect/inc/cammsreverbcontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb controls
-*
-*/
-
-
-#ifndef CAMMSREVERBCONTROLGROUP_H
-#define CAMMSREVERBCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrolgroup.h"
-#include <EnvironmentalReverbData.h>
-
-// CONSTANTS
-_LIT(KAMMSReverbControlClassName, ".amms.control.audioeffect.ReverbControl");
-
-// FORWARD DECLARATIONS
-class CAMMSBaseReverbControl;
-class CEnvironmentalReverbUtility;
-
-
-// CLASS DECLARATION
-/**
- *  Group for reverb controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSReverbControlGroup): public CAMMSEffectControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSReverbControlGroup* NewLC();
-
-    /**
-     * destructor
-     */
-    ~CAMMSReverbControlGroup();
-
-public: // New functions
-
-    /**
-     * Gets the gain level of the reverberation
-     *
-     * @return the gain level of the reverberation
-     */
-    TInt ReverbLevel();
-
-    /**
-     * Gets the reverberation time, as set either explicitly via
-     * setReverbTime or implicitly via setPreset (whichever was called last).
-     *
-     * @return the reverberation time
-     */
-    TInt ReverbTime();
-
-    /**
-     * Sets the gain level of the reverberation
-     *
-     * @param the gain level of the reverberation to be set
-     */
-    void SetReverbLevelL(TInt aLevel);
-
-    /**
-     * Sets the reverberation time of the reverb
-     *
-     * @param the reverberation time to be set
-     */
-    void SetReverbTimeL(TInt aTime);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSBaseReverbControl* TypeSafeControl(TInt aIndex) const;
-
-    /**
-     * Gets reverb data for the given preset index from the central
-     * repository.
-     * @param aPresetIndex Index of the preset whose reverb is asked.
-     * @param aReverbData Returned data.
-     */
-    void GetReverbDataFromCenRepL(TUint aPresetIndex,
-                                  TEfEnvReverbDataPckg& aReverbData);
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-    /**
-     * Called when the current preset changes
-     */
-    void PresetChangedL();
-
-    /**
-     * Finish initialization (after the 1st player is added)
-     */
-    void InitializeL();
-
-    /**
-     * Creates utilities that can be used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utility already exists.
-     */
-    void PrepareEmptyGroupUtilitiesL();
-
-    /**
-     * Deletes utilities that are used to obtain preset names
-     * and preset data (needed when the group has no controls).
-     * Does nothing if the utilities have already been deleted.
-     */
-    void DeleteEmptyGroupUtilities();
-
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    void GetPresetNamesL(CDesCArray& aPresetNames);
-
-protected:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSReverbControlGroup();
-
-    /**
-     * Symbian 2nd phase constructor.
-     */
-    void ConstructL();
-
-protected: // data
-
-    // Needed to get preset names when the group has no controls.
-    CEnvironmentalReverbUtility* iEmptyEnvironmentalReverbUtility; // Owned.
-
-    TInt iReverbLevel;
-    TInt iReverbTime;
-    TInt iReverbMinLevel;
-    TInt iReverbMaxLevel;
-
-};
-
-#endif // CAMMSREVERBCONTROLGROUP_H
--- a/javauis/amms_qt/ammscontrol/audioeffect/inc/cammsreverbsourcecontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb source controls
-*
-*/
-
-
-#ifndef CAMMSREVERBSOURCECONTROLGROUP_H
-#define CAMMSREVERBSOURCECONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrolgroup.h"
-
-// CONSTANTS
-_LIT(KAMMSReverbSourceControlClassName,
-     ".amms.control.audioeffect.ReverbSourceControl");
-
-// FORWARD DECLARATIONS
-class CAMMSBaseReverbSourceControl;
-
-
-// CLASS DECLARATION
-/**
- *  Group for reverb controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSReverbSourceControlGroup): public CAMMSControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSReverbSourceControlGroup* NewLC();
-
-    /**
-     * destructor
-     */
-    ~CAMMSReverbSourceControlGroup();
-
-public: // New functions
-
-    /**
-     * Gets the gain level of the reverberation
-     *
-     * @return the gain level of the reverberation
-     */
-    TInt RoomLevel();
-
-    /**
-     * Sets the gain level of the reverberation
-     *
-     * @param the gain level of the reverberation to be set
-     */
-    void SetRoomLevelL(TInt aLevel);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSBaseReverbSourceControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected: // Functions from base classes
-
-    /**
-     * Called by PlayerAddedL when new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSReverbSourceControlGroup();
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     */
-    void ConstructL();
-
-private: // data
-
-    // the actual room level for this control group
-    TInt iRoomLevel;
-
-};
-
-#endif // CAMMSREVERBSOURCECONTROLGROUP_H
--- a/javauis/amms_qt/ammscontrol/audioeffect/src/cammsaudiovirtualizercontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <StereoWideningUtility.h>
-#include <StereoWideningUtilityData.h>
-#include <logger.h>
-#include "cammsaudiovirtualizercontrolgroup.h"
-#include "cammsaudiovirtualizercontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioVirtualizerControlGroup* CAMMSAudioVirtualizerControlGroup::NewLC()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::NewLC +");
-
-    CAMMSAudioVirtualizerControlGroup* self =
-        new(ELeave) CAMMSAudioVirtualizerControlGroup;
-
-    CleanupStack::PushL(self);
-    self->BaseConstructL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::NewLC -");
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioVirtualizerControlGroup::~CAMMSAudioVirtualizerControlGroup()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::~ +");
-
-    delete iEmptyStereoWideningUtility;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::~ -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSAudioVirtualizerControlGroup::ClassName()
-{
-    return KAMMSAudioVirtualizerControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSEffectControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::PresetChangedL
-// Called when the current preset changes
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::PresetChangedL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::InitializeL
-// Finish initialization (after the 1st player is added)
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::InitializeL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::PrepareEmptyGroupUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::PrepareEmptyGroupUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::PrepareEmptyGroupUtilitiesL +");
-
-    if (!iEmptyStereoWideningUtility)
-    {
-        CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL();
-
-        iEmptyStereoWideningUtility =
-            CStereoWideningUtility::NewL(*iEmptyPlayerUtility);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::PrepareEmptyGroupUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::DeleteEmptyGroupUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::DeleteEmptyGroupUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::DeleteEmptyGroupUtilities +");
-
-    if (iEmptyPlayerUtility)
-    {
-        delete iEmptyStereoWideningUtility;
-        iEmptyStereoWideningUtility = NULL;
-
-        CAMMSEffectControlGroup::DeleteEmptyGroupUtilities();
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::DeleteEmptyGroupUtilities -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::GetPresetNamesL +");
-
-    // Create empty group utilities for getting preset names.
-    PrepareEmptyGroupUtilitiesL();
-
-    TArray< TEfStereoWideningUtilityPreset > presetNames =
-        iEmptyStereoWideningUtility->Presets();
-
-
-    TInt presetCount = presetNames.Count();
-
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-
-
-    // Delete empty group utilities in order to save memory.
-    DeleteEmptyGroupUtilities();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControlGroup::GetPresetNamesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::CAMMSAudioVirtualizerControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioVirtualizerControlGroup::CAMMSAudioVirtualizerControlGroup()
-        : CAMMSEffectControlGroup(KAMMSAudioVirtualizerControl)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControlGroup::ConstructL()
-{
-    CAMMSEffectControlGroup::BaseConstructL();
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audioeffect/src/cammseffectcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,436 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammseffectcontrolgroup.h"
-#include "cammseffectcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSEffectControlGroup::~CAMMSEffectControlGroup()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::~ +");
-
-    delete iPresetNames;
-    delete iActiveSchedulerWait;
-
-    if (iEmptyPlayerUtility)
-    {
-        iEmptyPlayerUtility->Close();
-        delete iEmptyPlayerUtility;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::~ -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::PresetL
-// Gets the current preset.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::GetPresetL(TDes& aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::GetPresetL +");
-
-    // Return KNullDesC if no preset is set.
-    if (iPresetIndex >= 0)
-    {
-        aPreset = (*iPresetNames)[ iPresetIndex ];    // CSI: 2 Wrong index means implementation error #
-    }
-    else
-    {
-        aPreset = KNullDesC;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::GetPresetL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::PresetNamesL
-// Gets the available preset names
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const CDesCArray& CAMMSEffectControlGroup::PresetNamesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::PresetNamesL");
-
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::Scope
-// Returns the scope in which the effect is present.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSEffectControlGroup::TEffectScope CAMMSEffectControlGroup::Scope()
-{
-    return iScope;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::Enabled
-// Returns true if the effect is enabled and false otherwise.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TBool CAMMSEffectControlGroup::Enabled()
-{
-    return iEnabled;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::EnforcedL
-// Returns the current enforced setting of the effect.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TBool CAMMSEffectControlGroup::Enforced()
-{
-    return iEnforced;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::SetEnabledL
-// Enables/disables the effect.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::SetEnabledL(TBool aEnabled)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetEnabledL +");
-
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetEnabledL(aEnabled);
-    }
-
-    iEnabled = aEnabled;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetEnabledL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::SetEnforcedL
-// Enforces the effect to be in use.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::SetEnforcedL(TBool aEnforced)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetEnforcedL +");
-
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetEnforcedL(aEnforced);
-    }
-
-    iEnforced = aEnforced;
-
-    // remember that enforce was set when the group was not yet initialized
-    if (!iInitialized)
-    {
-        iInitialEnforceSet = ETrue;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetEnforcedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::SetPresetL
-// Sets the effect according to the given preset.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::SetPresetL(const TDesC& aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetPresetL +");
-
-    // Leave if the given preset does not exist.
-    TInt presetIndex = -1;
-    if (!(iPresetNames->Find(aPreset, presetIndex) == 0))
-    {
-        User::Leave(KErrNotFound);
-    }
-
-    // Set new preset to the controls.
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetPresetL(aPreset);
-    }
-
-    // Change preset.
-    iPresetIndex = presetIndex;
-
-    // Announce a preset change.
-    PresetChangedL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetPresetL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::SetScopeL
-// Sets the scope of the effect.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::SetScopeL(TEffectScope aScope)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetScopeL +");
-
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetScopeL(aScope);
-    }
-
-    iScope = aScope;
-
-    // remember that scope was set when the group was not yet initialized
-    if (!iInitialized)
-    {
-        iInitialScopeSet = ETrue;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::SetScopeL -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::MapcInitComplete
-// Called when file KAMMSEmptyGroupSoundPath has been opened.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::MapcInitComplete(TInt aError,
-        const TTimeIntervalMicroSeconds& /*aDuration*/)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::MapcInitComplete +");
-
-    __ASSERT_DEBUG(iActiveSchedulerWait->IsStarted(), User::Invariant());
-
-    iEmptyPlayerUtilityError = aError;
-
-    // Stop waiting in PrepareEmptyGroupUtilityL() function.
-    iActiveSchedulerWait->AsyncStop();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::MapcInitComplete -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::MapcPlayComplete
-// Called when KAMMSEmptyGroupSoundPath has been played.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::MapcPlayComplete(TInt /*aError*/)
-{
-    // No implementation needed.
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSEffectControl*
-CAMMSEffectControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSEffectControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::NotifyPlayerAddedL +");
-
-    CAMMSControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSEffectControl* control =
-        static_cast<CAMMSEffectControl*>(aControl);
-
-    // set current preset if any
-    if (iPresetIndex >= 0)
-    {
-        control->SetPresetL((*iPresetNames)[ iPresetIndex ]);      // CSI: 2 Wrong index means implementation error #
-    }
-
-    // handle default values if this is the first control added into empty and
-    // uninitialized group
-    if (!iInitialized)
-    {
-
-        InitializeL();
-
-        // if parameters, whose default values are not known, have not been set,
-        // ask them from the first control added to the empty group
-        if (!iInitialEnforceSet)
-        {
-
-            iEnforced = control->Enforced();
-
-        }
-
-        if (!iInitialScopeSet)
-        {
-
-            iScope = (TEffectScope) control->Scope();
-
-        }
-
-        iInitialized = ETrue;
-    }
-
-    // set current parameters
-
-    control->SetEnabledL(iEnabled);
-
-    control->SetEnforcedL(iEnforced);
-
-    control->SetScopeL(iScope);
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::NotifyPlayerAddedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::PresetChangedL
-// Called when the current preset changes
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::PresetChangedL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::InitializeL
-// Finish initialization (after the 1st player is added)
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::InitializeL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL
-// Creates an utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL +");
-
-    if (!iEmptyPlayerUtility)
-    {
-        iEmptyPlayerUtility = CMdaAudioPlayerUtility::NewL(*this,
-                              EMdaPriorityMin, EMdaPriorityPreferenceNone);
-
-        iEmptyPlayerUtility->OpenFileL(KAMMSEmptyGroupSoundPath);
-
-        __ASSERT_DEBUG(!iActiveSchedulerWait->IsStarted(), User::Invariant());
-
-        // Wait until MapcInitComplete() has been called.
-        iActiveSchedulerWait->Start();  // CSI: 10 iActiveSchedulerWait cannot be started, also checked in debug build #
-
-        ELOG1( EJavaAMMS, 
-            "AMMS::CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL, err=%d",
-            iEmptyPlayerUtilityError);
-
-        // Leave if file opening returned an error.
-        User::LeaveIfError(iEmptyPlayerUtilityError);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::DeleteEmptyGroupUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::DeleteEmptyGroupUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::DeleteEmptyGroupUtilities +");
-
-    if (iEmptyPlayerUtility)
-    {
-        iEmptyPlayerUtility->Close();
-
-        delete iEmptyPlayerUtility;
-        iEmptyPlayerUtility = NULL;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::DeleteEmptyGroupUtilities -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::CAMMSEffectControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSEffectControlGroup::CAMMSEffectControlGroup(const TDesC& aName) :
-        CAMMSControlGroup(aName)
-{
-    iScope = CAMMSEffectControlGroup::EScopeLiveOnly;
-    iEnabled = EFalse;
-    iEnforced = ETrue;
-    iPresetIndex = -1;  // no preset set
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEffectControlGroup::BaseConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::BaseConstructL +");
-
-    CAMMSControlGroup::ConstructL();
-
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-    iPresetNames = new(ELeave)CDesCArrayFlat(KAMMSPresetGranularity);
-
-    // If the Effect API implementation does not support the effect,
-    // the function leaves with KErrNotSupported. The leaving can be ignored
-    // in this case, the result is that the list of supported presets
-    // remain empty.
-    TRAPD(err, GetPresetNamesL(*iPresetNames));
-
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEffectControlGroup::BaseConstructL, err %d", err);
-
-    // In case of an error, delete possible utilities to save memory.
-    if (err != KErrNone)
-    {
-        DeleteEmptyGroupUtilities();
-    }
-
-    // Leave if some error occured (other than KErrNotSupported).
-    if ((err != KErrNone) && (err != KErrNotSupported))
-    {
-        User::Leave(err);
-    }
-
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControlGroup::BaseConstructL -");
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audioeffect/src/cammsequalizercontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,617 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for equalizer controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <AudioEqualizerUtility.h>
-#include <AudioEqualizerUtilityData.h>
-#include <logger.h>
-
-#include "cammsequalizercontrolgroup.h"
-#include "cammsbaseequalizercontrol.h"
-
-// CONSTANTS
-namespace
-{
-const TInt KAMMSDefaultEqualizerLevel = 0;
-const TInt KAMMSDefaultEqualizerMaxLevel = 1200;
-const TInt KAMMSDefaultEqualizerMinLevel = -1200;
-const TInt KAMMSDefaultEqualizerTrebleAndBassLevel = 50;
-const TInt KAMMSUndefinedTrebleOrBass = -1004;
-const TInt KAMMSKilo = 1000;  // e.g. 1Hz = 1000 mHz
-}
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEqualizerControlGroup* CAMMSEqualizerControlGroup::NewLC()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::NewLC +");
-
-    CAMMSEqualizerControlGroup* self =
-        new(ELeave) CAMMSEqualizerControlGroup;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::NewLC -");
-
-    return self;
-}
-
-// Destructor
-CAMMSEqualizerControlGroup::~CAMMSEqualizerControlGroup()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::~ +");
-
-    delete iEmptyAudioEqualizerUtility;
-
-    iBands.Close();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::~ -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::Band
-// Gets the band that has the most effect on the given frequency
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::Band(TInt aFrequency)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::Band +");
-
-    // Check whether bands have effect on the given frequency.
-    if ((aFrequency <= 0) ||
-            (aFrequency > KAMMSHalfOfSamplingFrequency))    // 24000000 milliHertz
-    {
-        return -1;  // no effect on the frequency. Frequency 0 goes here too.
-    }
-
-    TInt bandCount = iBands.Count();
-    if (bandCount == 0)
-    {
-        return 0;  // if the number of the bands is zero, return band zero.
-    }
-
-    // Effect API uses hertzes whereas AMMS uses millihertzes.
-    TInt frequencyInHertzes = aFrequency / KAMMSKilo;
-
-    // Find the first band whose cross-over frequency is greater than the
-    // given frequency (the band has effect on the given frequency).
-    TInt i = 0;
-    for (i = 0; i < bandCount; i++)
-    {
-        if (iBands[ i ].iCrossoverFrequency >= frequencyInHertzes)
-        {
-            return i;
-        }
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::Band -");
-
-    // If the given frequency if bigger than any cross-over frequency,
-    // return the last band.
-    return (bandCount - 1);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::GetBandLevelL
-// Gets the gain set for the given equalizer band.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::GetBandLevelL(TInt aBand, TInt& aBandLevel)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetBandLevelL +");
-
-    CheckBandIndexL(aBand);
-
-    aBandLevel = iBands[ aBand ].iBandLevel;  // CSI: 2 Index checked above #
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetBandLevelL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::Bass
-// Gets the bass level.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::Bass()
-{
-    return iBass;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::GetCenterFreqL
-// Gets the center frequency of the given band
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::GetCenterFreqL(TInt aBand, TInt& aCenterFreq)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetCenterFreqL +");
-
-    CheckBandIndexL(aBand);
-
-    // Effect API uses hertzes whereas AMMS uses millihertzes.
-    aCenterFreq = iBands[ aBand ].iCenterFrequency * KAMMSKilo; // CSI: 2 Index checked above #
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetCenterFreqL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::MaxBandLevel
-// Returns the maximum band level supported
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::MaxBandLevel()
-{
-    return iMaxBandLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::MinBandLevel
-// Returns the minimum band level supported.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::MinBandLevel()
-{
-    return iMinBandLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::NumberOfBands
-// Gets the number of frequency bands that the equalizer supports.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::NumberOfBands()
-{
-    return iBands.Count();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::Treble
-// Gets the treble level.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEqualizerControlGroup::Treble()
-{
-    return iTreble;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::SetBandLevelL
-// Sets the given equalizer band to the given gain value.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::SetBandLevelL(TInt aLevel, TInt aBand)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetBandLevelL +");
-
-    // check given parameters
-    CheckBandIndexL(aBand);
-
-    if (aLevel < iMinBandLevel || aLevel > iMaxBandLevel)
-    {
-        User::Leave(KErrArgument);
-    }
-
-    // Set new level to controls.
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetBandLevelL(aLevel, aBand);
-    }
-
-    iBands[ aBand ].iBandLevel = aLevel;  // CSI: 2 Index checked above #
-
-    // remove current preset since it is not valid any more
-    iPresetIndex = -1;
-
-    iTreble = KAMMSUndefinedTrebleOrBass;
-    iBass = KAMMSUndefinedTrebleOrBass;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetBandLevelL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::SetBassL
-// Sets the bass level
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::SetBassL(TInt aLevel, TInt& aSetLevel)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetBassL +");
-
-    __ASSERT_DEBUG((aLevel >= iMinBandLevel) &&
-                   (aLevel <= iMaxBandLevel), User::Invariant());
-
-    // Set the bass band (first band) to the given percentage of the valid range
-    // between MinBandLevel and MaxBandLevel.
-    TInt newBandLevel = iMinBandLevel + aLevel *
-                        (iMaxBandLevel - iMinBandLevel) / 100;   // CSI: 47 Value 100 means 100% here #
-
-    // Set new value to bass band (band 0) if band count > 0
-    if (iBands.Count() > 0)
-    {
-        // Set new bass (band 0) to controls.
-        TInt count = ControlCount();
-        for (TInt i = 0; i < count; i++)
-        {
-            TypeSafeControl(i)->SetBandLevelL(newBandLevel, 0);
-        }
-
-        iBands[ 0 ].iBandLevel = newBandLevel;
-    }
-
-    // remove the current preset since it is not valid any more
-    iPresetIndex = -1;
-
-    iBass = aLevel;
-
-    aSetLevel = iBass;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetBassL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::SetTrebleL
-// Sets the treble level
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::SetTrebleL(TInt aLevel, TInt& aSetLevel)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetTrebleL +");
-
-    __ASSERT_DEBUG((aLevel >= iMinBandLevel) &&
-                   (aLevel <= iMaxBandLevel), User::Invariant());
-
-    TInt bands = iBands.Count();
-    // Set new values to treble bands if there is at least two bands.
-    if (bands > 1)
-    {
-        // Treble affects to two bands.
-        TInt trebleIndex1 = bands - 1;  // CSI: 47 Last band #
-        TInt trebleIndex2 = bands - 2;  // CSI: 47 Second last band #
-
-        // Set the highest band with 100% weight of the given percentage
-        // of the valid range between MinBandLevel and MaxBandLevel.
-        TInt newBandLevel1 = iMinBandLevel +
-                             aLevel * (iMaxBandLevel - iMinBandLevel) / 100;   // CSI: 47 Value 100 means 100% #
-
-        // The treble affects 50% to the next highest band.
-        TInt newBandLevel2 = KAMMSDefaultEqualizerLevel +
-                             (newBandLevel1 - KAMMSDefaultEqualizerLevel) / 2;   // CSI: 47 Divided by 2 is the same as 50% #
-
-        // Set new treble level to controls.
-        TInt count = ControlCount();
-        for (TInt i = 0; i < count; i++)
-        {
-            TypeSafeControl(i)->SetBandLevelL(newBandLevel1, trebleIndex1);
-            TypeSafeControl(i)->SetBandLevelL(newBandLevel2, trebleIndex2);
-        }
-
-        iBands[ trebleIndex1 ].iBandLevel = newBandLevel1;
-        iBands[ trebleIndex2 ].iBandLevel = newBandLevel2;
-    }
-
-    // remove the current preset since it is not valid any more
-    iPresetIndex = -1;
-
-    iTreble = aLevel;
-
-    aSetLevel = iTreble;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::SetTrebleL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSBaseEqualizerControl*
-CAMMSEqualizerControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSBaseEqualizerControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::CheckBandIndexL
-// Checks whether the band index is between 0 and number of bands -1.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::CheckBandIndexL(TInt aBand) const
-{
-    if (aBand < 0 || aBand >= iBands.Count())
-    {
-        User::Leave(KErrArgument);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::GetPresetBandsL
-// Gets bands corresponding to the given preset index.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::GetPresetBandsL(TUint /*aPresetIndex*/,
-        RArray< TEfAudioEqualizerBand >& aBands)
-{
-    aBands.Reset();
-
-    TInt count = ControlCount();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetPresetBandsL, controls=%d",
-              count);
-
-    // Get data of each band from a control. If there is no controls in the
-    // group, get the data from the empty group utility.
-    if (count > 0)
-    {
-        CAMMSBaseEqualizerControl* control =
-            CAMMSEqualizerControlGroup::TypeSafeControl(0);
-
-        TInt bands = control->NumberOfBands();
-
-        for (TInt i = 0; i < bands; i++)
-        {
-            TEfAudioEqualizerBand band;
-
-            band.iBandLevel = control->BandLevelL(i);
-            band.iBandWidth = control->BandWidth(i);
-            band.iCenterFrequency = control->CenterFrequency(i);
-            band.iCrossoverFrequency = control->CrossoverFrequency(i);
-
-            aBands.AppendL(band);
-        }
-    }
-    else
-    {
-        // Create empty group utilities for getting preset data.
-        PrepareEmptyGroupUtilitiesL();
-
-        CAudioEqualizer& audioEffect = iEmptyAudioEqualizerUtility->Equalizer();
-        TInt bands = audioEffect.NumberOfBands();
-
-        for (TInt i = 0; i < bands; i++)
-        {
-            TEfAudioEqualizerBand band;
-
-            // Band 0 in JSR-234 equals Band 1 in Effect API
-            TUint8 bandId = (TUint8)(i + KAMMSBandOffset);
-
-            band.iBandLevel = audioEffect.BandLevel(bandId);
-            band.iBandWidth = audioEffect.BandWidth(bandId);
-            band.iCenterFrequency = audioEffect.CenterFrequency(bandId);
-            band.iCrossoverFrequency = audioEffect.CrossoverFrequency(bandId);
-
-            aBands.AppendL(band);
-        }
-
-        // Delete empty group utilities in order to save memory.
-        DeleteEmptyGroupUtilities();
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetPresetBandsL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSEqualizerControlGroup::ClassName()
-{
-    return KAMMSEqualizerControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::NotifyPlayerAddedL +");
-
-    CAMMSEffectControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSBaseEqualizerControl* control =
-        static_cast<CAMMSBaseEqualizerControl*>(aControl);
-
-    // if preset was not set into the new control by the main class,
-    // set bands, treble, and bass manually
-    if (iPresetIndex < 0)
-    {
-        TInt bands = iBands.Count();
-
-        // set current band levels
-        for (TInt i = 0; i < bands; i++)
-        {
-            control->SetBandLevelL(iBands[ i ].iBandLevel, i);
-        }
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::NotifyPlayerAddedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::PresetChangedL
-// Called when the current preset changes
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::PresetChangedL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::PresetChangedL +");
-
-    // Invalidate bass and treble levels
-    iBass = KAMMSUndefinedTrebleOrBass;
-    iTreble = KAMMSUndefinedTrebleOrBass;
-
-    // Get band data from controls (or from empty group utility, if the
-    // group has no controls).
-    GetPresetBandsL(iPresetIndex, iBands);   // index limits already checked
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::PresetChangedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::InitializeL
-// Finish initialization (after the 1st player is added)
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::InitializeL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::InitializeL +");
-
-    CAMMSBaseEqualizerControl* control = TypeSafeControl(0);
-
-    iMaxBandLevel = control->MaxBandLevel();
-    iMinBandLevel = control->MinBandLevel();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::InitializeL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::PrepareEmptyGroupUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::PrepareEmptyGroupUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::PrepareEmptyGroupUtilitiesL +");
-
-    if (!iEmptyAudioEqualizerUtility)
-    {
-        CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL();
-
-        iEmptyAudioEqualizerUtility =
-            CAudioEqualizerUtility::NewL(*iEmptyPlayerUtility);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::PrepareEmptyGroupUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::DeleteEmptyGroupUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::DeleteEmptyGroupUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::DeleteEmptyGroupUtilities +");
-
-    if (iEmptyPlayerUtility)
-    {
-        delete iEmptyAudioEqualizerUtility;
-        iEmptyAudioEqualizerUtility = NULL;
-
-        CAMMSEffectControlGroup::DeleteEmptyGroupUtilities();
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::DeleteEmptyGroupUtilities -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetPresetNamesL +");
-
-    // Create empty group utilities for getting preset names.
-    PrepareEmptyGroupUtilitiesL();
-
-    TArray< TEfAudioEqualizerUtilityPreset > presetNames =
-        iEmptyAudioEqualizerUtility->Presets();
-
-
-    TInt presetCount = presetNames.Count();
-
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-
-    // Delete empty group utilities in order to save memory.
-    DeleteEmptyGroupUtilities();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::GetPresetNamesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::CAMMSEqualizerControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSEqualizerControlGroup::CAMMSEqualizerControlGroup()
-        : CAMMSEffectControlGroup(KAMMSBaseEqualizerControl)
-{
-    iMaxBandLevel = KAMMSDefaultEqualizerMaxLevel;
-    iMinBandLevel = KAMMSDefaultEqualizerMinLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControlGroup::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::ConstructL +");
-
-    CAMMSEffectControlGroup::BaseConstructL();
-
-    // Get band data from empty group utility.
-    // If the Effect API implementation does not support the effect,
-    // the function leaves with KErrNotSupported. The leaving can be ignored
-    // in this case, the result is that the list of supported presets
-    // remain empty.
-    TRAPD(err, GetPresetBandsL(0, iBands));
-
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEqualizerControlGroup::ConstructL, err %d", err);
-
-    // In case of an error, delete possible utilities to save memory.
-    if (err != KErrNone)
-    {
-        DeleteEmptyGroupUtilities();
-    }
-
-    // Ignore the error so that using MMA and AMMS is possible.
-    // Only successfully read bands are visible for the user.
-
-
-    TInt bands = iBands.Count();
-
-    // Set default band levels.
-    for (TInt i = 0; i < bands; i++)
-    {
-        iBands[ i ].iBandLevel = KAMMSDefaultEqualizerLevel;
-    }
-
-    // Set default values for Bass and Treble. Value 50 means flat equalization.
-    iBass = KAMMSDefaultEqualizerTrebleAndBassLevel;
-    iTreble = KAMMSDefaultEqualizerTrebleAndBassLevel;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControlGroup::ConstructL -");
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audioeffect/src/cammsreverbcontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,355 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <EnvironmentalReverbUtility.h>
-#include <EnvironmentalReverbUtilityData.h>
-#include <logger.h>
-
-#include "cammsreverbcontrolgroup.h"
-#include "cammsbasereverbcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSReverbControlGroup* CAMMSReverbControlGroup::NewLC()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::NewLC +");
-
-    CAMMSReverbControlGroup* self = new(ELeave) CAMMSReverbControlGroup;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::NewLC -");
-
-    return self;
-}
-
-// Destructor
-CAMMSReverbControlGroup::~CAMMSReverbControlGroup()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::~");
-
-    delete iEmptyEnvironmentalReverbUtility;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::ReverbLevel
-// Gets the gain level of the reverberation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSReverbControlGroup::ReverbLevel()
-{
-    return iReverbLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::ReverbTime
-// Gets the reverberation time, as set either explicitly via
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSReverbControlGroup::ReverbTime()
-{
-    return iReverbTime;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::SetReverbLevelL
-// Sets the gain level of the reverberation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::SetReverbLevelL(TInt aLevel)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::SetReverbLevelL");
-
-    __ASSERT_DEBUG(aLevel <= 0, User::Invariant());
-
-    // Set the level between the accepted limits [iReverbMinLevel,
-    // iReverbMaxLevel].
-    TInt reverbLevel = Min(aLevel, iReverbMaxLevel);
-    reverbLevel = Max(reverbLevel, iReverbMinLevel);
-
-    // Set reverb level to the controls.
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetReverbLevelL(reverbLevel);
-    }
-
-    // Invalidate current preset and save the new reverb level
-    iPresetIndex = -1;
-    iReverbLevel = reverbLevel;
-
-    LOG4( EJavaMMAPI, EInfo, "CAMMSReverbControlGroup::SetReverbLevelL, levels: %d, %d, %d %d",
-        aLevel, iReverbMinLevel, iReverbMaxLevel, reverbLevel);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::SetReverbTimeL
-// Sets the reverberation time of the reverb
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::SetReverbTimeL(TInt aTime)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::SetReverbTimeL +");
-
-    __ASSERT_DEBUG(aTime >= 0, User::Invariant());
-
-    // Set reverb time to controls.
-    TInt count = ControlCount();
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetReverbTimeL(aTime);
-    }
-
-    // Invalidate current preset and save new reverb time
-    iPresetIndex = -1;
-    iReverbTime = aTime;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::SetReverbTimeL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSBaseReverbControl*
-CAMMSReverbControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSBaseReverbControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSReverbControlGroup::ClassName()
-{
-    return KAMMSReverbControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::NotifyPlayerAddedL +");
-
-    CAMMSEffectControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSBaseReverbControl* control =
-        static_cast<CAMMSBaseReverbControl*>(aControl);
-
-    // if the preset is not valid, set reverb level and time to the added
-    // control
-    if (iPresetIndex < 0)
-    {
-        control->SetReverbLevelL(iReverbLevel);
-        control->SetReverbTimeL(iReverbTime);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::NotifyPlayerAddedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::PresetChangedL
-// Called when the current preset changes
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::PresetChangedL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PresetChangedL +");
-
-    TInt count = ControlCount();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PresetChangedL, controls=%d",
-              count);
-
-    // Ask preset data from the first control if exists. If not, ask the
-    // data from the empty group utility.
-    if (count > 0)
-    {
-        CAMMSBaseReverbControl* control = TypeSafeControl(0);
-
-        iReverbTime = control->ReverbTime();
-        iReverbLevel = control->ReverbLevel();
-        iReverbMinLevel = control->MinReverbLevel();
-        iReverbMaxLevel = control->MaxReverbLevel();
-    }
-    else
-    {
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PresetChangedL, index=%d",
-                  iPresetIndex);
-
-        __ASSERT_DEBUG(iPresetIndex >= 0, User::Invariant());
-
-        // Create empty group utilities for getting preset data.
-        PrepareEmptyGroupUtilitiesL();
-
-        // Set the preset to the empty group utility.
-        iEmptyEnvironmentalReverbUtility->GetPresetL(iPresetIndex);
-
-        CEnvironmentalReverb& audioEffect =
-            iEmptyEnvironmentalReverbUtility->EnvironmentalReverb();
-
-
-        iReverbTime = audioEffect.DecayTime();
-        iReverbLevel =
-            audioEffect.ReflectionsLevel() + audioEffect.RoomLevel();
-
-        TInt32 minLevel;
-        TInt32 maxLevel;
-        audioEffect.ReverbLevelRange(minLevel, maxLevel);
-
-        iReverbMinLevel = minLevel;
-        iReverbMaxLevel = maxLevel;
-
-        // Delete empty group utilities in order to save memory.
-        DeleteEmptyGroupUtilities();
-    }
-
-    LOG4( EJavaAMMS, EInfo, "CAMMSReverbControlGroup::PresetChangedL, values: %d, %d, %d %d",
-        iReverbTime, iReverbLevel, iReverbMinLevel, iReverbMaxLevel);
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PresetChangedL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::InitializeL
-// Finish initialization (after the 1st player is added)
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::InitializeL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::PrepareEmptyGroupUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::PrepareEmptyGroupUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PrepareEmptyGroupUtilitiesL +");
-
-    if (!iEmptyEnvironmentalReverbUtility)
-    {
-        CAMMSEffectControlGroup::PrepareEmptyGroupUtilitiesL();
-
-        iEmptyEnvironmentalReverbUtility =
-            CEnvironmentalReverbUtility::NewL(*iEmptyPlayerUtility);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::PrepareEmptyGroupUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::DeleteEmptyGroupUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::DeleteEmptyGroupUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::DeleteEmptyGroupUtilities +");
-
-    if (iEmptyPlayerUtility)
-    {
-        delete iEmptyEnvironmentalReverbUtility;
-        iEmptyEnvironmentalReverbUtility = NULL;
-
-        CAMMSEffectControlGroup::DeleteEmptyGroupUtilities();
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::DeleteEmptyGroupUtilities -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::GetPresetNamesL +");
-
-    // Create empty group utilities for getting preset names.
-    PrepareEmptyGroupUtilitiesL();
-
-    TArray< TEfEnvironmentalReverbUtilityPreset > presetNames =
-        iEmptyEnvironmentalReverbUtility->Presets();
-
-
-    TInt presetCount = presetNames.Count();
-
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-
-    // Delete empty group utilities in order to save memory.
-    DeleteEmptyGroupUtilities();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::GetPresetNamesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::CAMMSReverbControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSReverbControlGroup::CAMMSReverbControlGroup()
-        : CAMMSEffectControlGroup(KAMMSBaseReverbControl)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSReverbControlGroup::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::ConstructL +");
-
-    CAMMSEffectControlGroup::BaseConstructL();
-
-    TRAPD(err, SetPresetL(KAMMSBaseDefaultReverbPreset));
-
-    // The following code prevents build warning.
-    if (err != KErrNone)
-    {
-        ELOG1( EJavaAMMS, "AMMS::CAMMSReverbControlGroup::ConstructL, err %d", err);
-    }
-
-    // Ignore the error so that using MMA and AMMS is possible.
-    // Error is visible so that "smallroom" preset is not activated.
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControlGroup::ConstructL -");
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/audioeffect/src/cammsreverbsourcecontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for reverb source controls
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsreverbsourcecontrolgroup.h"
-#include "cammsbasereverbsourcecontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSReverbSourceControlGroup* CAMMSReverbSourceControlGroup::NewLC()
-{
-    CAMMSReverbSourceControlGroup* self =
-        new(ELeave) CAMMSReverbSourceControlGroup;
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSReverbSourceControlGroup::~CAMMSReverbSourceControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::RoomLevel
-// Gets the gain level of the reverberation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSReverbSourceControlGroup::RoomLevel()
-{
-    return iRoomLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::SetRoomLevelL
-// Sets the gain level of the reverberation
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbSourceControlGroup::SetRoomLevelL(TInt aLevel)
-{
-    // Set room level to controls.
-    TInt count = ControlCount();
-
-    for (TInt i = 0; i < count; i++)
-    {
-        TypeSafeControl(i)->SetRoomLevelL(aLevel);
-    }
-
-    iRoomLevel = aLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSBaseReverbSourceControl*
-CAMMSReverbSourceControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast< CAMMSBaseReverbSourceControl* >(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSReverbSourceControlGroup::ClassName()
-{
-    return KAMMSReverbSourceControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::NotifyPlayerAddedL
-// Called by PlayerRemoved when new player is added.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSReverbSourceControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSBaseReverbSourceControl* control =
-        static_cast<CAMMSBaseReverbSourceControl*>(aControl);
-
-    // set the current parameters
-    control->SetRoomLevelL(iRoomLevel);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::CAMMSReverbSourceControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSReverbSourceControlGroup::CAMMSReverbSourceControlGroup()
-        : CAMMSControlGroup(KAMMSBaseReverbSourceControl),
-        iRoomLevel(0)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControlGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSReverbSourceControlGroup::ConstructL()
-{
-    CAMMSControlGroup::ConstructL();
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/inc/cammspancontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for panning controls
-*
-*/
-
-
-#ifndef CAMMSPANCONTROLGROUP_H
-#define CAMMSPANCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrolgroup.h"
-
-// CONSTANTS
-_LIT(KAMMSPanControlClassName, ".amms.control.PanControl");
-
-// FORWARD DECLARATIONS
-class CAMMSPanControl;
-
-// CLASS DECLARATION
-
-/**
- *  Group for panning controls
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSPanControlGroup): public CAMMSControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     */
-    static CAMMSPanControlGroup* NewLC();
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSPanControlGroup();
-
-public: // New functions
-
-    /**
-     * Gets the current panning set.
-     *
-     * @return The current panning.
-     */
-    TInt Pan();
-
-    /**
-     * Sets the panning using a linear point scale with values between -100
-     * and 100. 0 represents panning for both channels, -100 full panning to
-     * the left and 100 full panning to the right. If the given panning
-     * value is less than -100 or greater than 100, the panning will be set
-     * to -100 or 100, respectively.
-     *
-     * @param aPan The new panning to be set.
-     * @param aSetPan Returned pan that has been set.
-     */
-    void SetPanL(TInt aPan, TInt& aSetPan);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSPanControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base classes
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected:
-    /*
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     */
-    CAMMSPanControlGroup();
-
-private: //Data
-
-    // the actual volume for this control group
-    TInt iPan;
-};
-
-#endif // CAMMSPANCONTROLGROUP_H
--- a/javauis/amms_qt/ammscontrol/inc/cammsvolumecontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for volume controls
-*
-*/
-
-
-#ifndef CAMMSVOLUMECONTROLGROUP_H
-#define CAMMSVOLUMECONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrolgroup.h"
-
-// FORWARD DECLARATIONS
-class CAMMSVolumeControl;
-
-// CONSTANTS
-_LIT(KAMMSVolumeControlClassName, ".amms.control.VolumeControl");
-
-// CLASS DECLARATION
-
-/**
- *  Group for volume controls.
- *  This volume control group can be used with many CAMMSVolumeControl
- *  instances. Controls that belong to this group are identified with
- *  aClassName parameter given to the NewL / NewLC method.
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSVolumeControlGroup): public CAMMSControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     * @param aControlName Class name that identifies controls
-     * belonging tothis control group.
-     */
-    static CAMMSVolumeControlGroup* NewLC(const TDesC& aControlName);
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSVolumeControlGroup();
-
-public: // New functions
-    /**
-     * Sets the current volume.
-     *
-     * @param aVolume Volume to be set.
-     */
-    void SetVolumeL(TInt aVolume);
-
-private: // New functions
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    CAMMSVolumeControl* TypeSafeControl(TInt aIndex) const;
-
-public: // Functions from base class
-    /**
-     * Returns class name that identifies this control group.
-     *
-     * @return Control group name.
-     */
-    const TDesC16& ClassName();
-
-protected: // From
-    /**
-     * Called by when a new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
-
-private:
-    /**
-     * C++ default constructor.
-     * @param aControlName Class name that identifies controls
-     * belonging tothis control group.
-     */
-    CAMMSVolumeControlGroup(const TDesC& aControlName);
-
-protected: //Data
-
-    TInt iVolume;
-};
-
-#endif // CAMMSVOLUMECONTROLGROUP_H
-
-
--- a/javauis/amms_qt/ammscontrol/src/cammspancontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for panning controls
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammspancontrolgroup.h"
-#include "cammspancontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPanControlGroup* CAMMSPanControlGroup::NewLC()
-{
-    CAMMSPanControlGroup* self = new(ELeave) CAMMSPanControlGroup;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-
-}
-
-// Destructor.
-CAMMSPanControlGroup::~CAMMSPanControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::Pan
-// Gets the current panning set.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSPanControlGroup::Pan()
-{
-    return iPan;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::SetPanL
-// Sets the panning value
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPanControlGroup::SetPanL(TInt aPan, TInt& aSetPan)
-{
-    TInt groups = ControlCount();
-    TInt retVal = aPan;
-
-    for (TInt i = 0; i < groups; i++)
-    {
-        retVal = TypeSafeControl(i)->SetPanL(aPan);
-    }
-
-    iPan = retVal;
-
-    aSetPan = retVal;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSPanControl* CAMMSPanControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast<CAMMSPanControl*>(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSPanControlGroup::ClassName()
-{
-    return KAMMSPanControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPanControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSPanControl* control = static_cast<CAMMSPanControl*>(aControl);
-
-    // set the current parameters
-    control->SetPanL(iPan);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControlGroup::CAMMSPanControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPanControlGroup::CAMMSPanControlGroup()
-        : CAMMSControlGroup(KAMMSPanControl)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/ammscontrol/src/cammsvolumecontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for volume controls
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsvolumecontrolgroup.h"
-#include "cammsvolumecontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControlGroup* CAMMSVolumeControlGroup::NewLC(const TDesC& aControlName)
-{
-    CAMMSVolumeControlGroup* self = new(ELeave) CAMMSVolumeControlGroup(
-        aControlName);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-//   Destructor
-CAMMSVolumeControlGroup::~CAMMSVolumeControlGroup()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlGroup::SetVolumeL
-// Sets the current volume set.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSVolumeControlGroup::SetVolumeL(TInt aVolume)
-{
-    TInt controls = ControlCount();
-    for (TInt i = 0; i < controls; i++)
-    {
-        TypeSafeControl(i)->SetVolumeL(aVolume);
-    }
-
-    iVolume = aVolume;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlGroup::TypeSafeControl
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSVolumeControl*
-CAMMSVolumeControlGroup::TypeSafeControl(TInt aIndex) const
-{
-    return static_cast< CAMMSVolumeControl* >(Control(aIndex));
-}
-
-// -----------------------------------------------------------------------------
-// TDesC16& CAMMSVolumeControlGroup::ClassName
-// Returns class name that identifies this control group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-const TDesC16& CAMMSVolumeControlGroup::ClassName()
-{
-    return KAMMSVolumeControlClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlGroup::NotifyPlayerAddedL
-// Called by when a new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSVolumeControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer *aPlayer,
-    CMMAControl* aControl)
-{
-    CAMMSControlGroup::NotifyPlayerAddedL(aPlayer, aControl);
-
-    CAMMSVolumeControl* control =
-        static_cast< CAMMSVolumeControl* >(aControl);
-
-    // set the current parameters
-    control->SetVolumeL(iVolume);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlGroup::CAMMSVolumeControlGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControlGroup::CAMMSVolumeControlGroup(const TDesC& aControlName)
-        : CAMMSControlGroup(aControlName)
-{
-    iVolume = KAMMSMAXVolume;
-}
-
-//  End of File
--- a/javauis/amms_qt/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="javaamms" default="deploy" basedir=".">
-
-  <import file="../../../build/utilities.xml"/>
-
-  <!--property name="java.src.paths" value="../javasrc:../src_tuner/javasrc"/-->
-  <property name="java.src.paths" value="../javasrc"/>
-
-  <!-- Needed by the utilities.xml. See the description form the utilities.xml
-       file -->
-
-  <target name="compile">
-              <omj.javac classpath="${compile.result.root}/javamobilemedia/classes/first:${compile.result.root}/javautils/classes/first"/>
-  </target>
-
-  <!-- Needed by the utilities.xml. See the description form the utilities.xml
-       file -->
-  <property name="javah.classnames" 
-            value="com.nokia.amms.control.audioeffect.EqualizerControl,
-                   com.nokia.amms.control.audioeffect.ReverbControl,
-                   com.nokia.amms.control.audioeffect.ReverbSourceControl,
-                   com.nokia.amms.control.audio3d.CommitControl,
-                   com.nokia.amms.control.audio3d.DistanceAttenuationControl,
-                   com.nokia.amms.control.audio3d.DopplerControl,
-                   com.nokia.amms.control.audio3d.LocationControl,
-                   com.nokia.amms.control.audio3d.OrientationControl,
-                   com.nokia.amms.control.EffectControl,
-                   com.nokia.amms.control.PanControl,
-                   com.nokia.amms.control.PriorityControl,
-                   com.nokia.mid.impl.media.AudioOutputControl,
-                   com.nokia.amms.control.VolumeControl,
-                   com.nokia.amms.AMMSPlugin,
-                   com.nokia.amms.ControlContainer,
-                   com.nokia.amms.GlobalManagerImpl,
-                   com.nokia.amms.ModuleBase"/>
-
-
-  <target name="system.properties">
-    <properties>
-        audio.samplerates=8000 16000
-        audio3d.simultaneouslocations=4
-        microedition.amms.version=1.1
-        supports.mediacapabilities=music audio3d
-    </properties>
-  </target>
-</project>
--- a/javauis/amms_qt/build/bwins/javaammsu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
-	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-	?NewL@CTimeOutTimer@@SAPAV1@HAAVMTimeOutNotify@@@Z @ 2 NONAME ; class CTimeOutTimer * CTimeOutTimer::NewL(int, class MTimeOutNotify &)
-
--- a/javauis/amms_qt/build/eabi/javaammsu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXPORTS
-	_Z10jni_lookupPKc @ 1 NONAME
-	_ZN13CTimeOutTimer4NewLEiR14MTimeOutNotify @ 2 NONAME
-	_ZTI13CTimeOutTimer @ 3 NONAME
-	_ZTV13CTimeOutTimer @ 4 NONAME
-
--- a/javauis/amms_qt/build/javaamms.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TARGET=javaamms
-TEMPLATE=lib
-CONFIG += omj java stl
-
-include(../../../inc/build_defines.pri)
-
-DEFINES += RD_JAVA_VOLUME_CONTROL
-DEFINES += RD_JAVA_OMA_DRM_V2
-DEFINES += __JAVA_JSR234_TUNER
-
-
-INCLUDEPATH +=  /epoc32/include/mmf/common \
-                /epoc32/include/caf \
-                ../ammscontrol/inc \
-                ../ammscontrol/audio3D/inc \
-                ../ammscontrol/audioeffect/inc \
-                ../mmacontrol/inc \
-                ../module/inc \
-                ../src_tuner/native/external_include \
-                ../src_tuner/native/inc \
-                ../ammscontrol/inc \
-                ../../mmapi_qt/baseline/inc \
-                ../../mmapi_qt/utils/inc \
-                 /epoc32/include/mw/Qt 
-
-
-SOURCES +=  ../ammscontrol/src/*.cpp \
-            ../ammscontrol/audio3D/src/*.cpp \
-            ../ammscontrol/audioeffect/src/*.cpp \
-            ../jni/src/*.cpp \
-            ../mmacontrol/src/*.cpp \
-            ../module/src/*.cpp \
-            ../../mmapi_qt/utils/src/*.cpp
-          
-contains(PROJECT_DEFINES,RD_JAVA_HTTP_EMC_ENABLED) {
-        INCLUDEPATH +=  ../../mmapi_qt/baseline/inc.emc \
-        ../mmacontrol/inc.emc \
-        
-        SOURCES += ../mmacontrol/src.emc/*.cpp
-         
-         
-        LIBS += -lEnhancedMediaClient \
-        -lmmfdevsound
-}
-else{
-			 INCLUDEPATH +=  ../../mmapi_qt/baseline/inc.mmf \
-        ../mmacontrol/inc.mmf \
-        
-			  SOURCES += ../mmacontrol/src.mmf/*.cpp
-			  
-}
-
-contains(PROJECT_DEFINES,RD_JAVA_NGA_ENABLED) {
-				INCLUDEPATH +=  ../../mmapi_qt/baseline/inc.nga
-}
-else {
-				INCLUDEPATH +=  ../../mmapi_qt/baseline/inc.dsa
-}
-
-
-LIBS += -lAudioEqualizerEffect \
-        -lAudioEqualizerUtility \
-        -lCustomCommandUtility \
-        -lDistanceAttenuationEffect \
-        -lDopplerBase \
-        -lEnvironmentalReverbEffect \
-        -lEnvironmentalReverbUtility \
-        -lListenerDopplerEffect \
-        -lListenerLocationEffect \
-        -lListenerOrientationEffect \
-        -lLocationBase \
-        -lMediaClientAudio \
-        -lOrientationBase \
-        -lRoomLevelEffect \
-        -lSourceDopplerEffect \
-        -lSourceLocationEffect \
-        -lStereoWideningEffect \
-        -lStereoWideningUtility \
-        -lbafl \
-        -lcentralrepository \
-        -lestor \
-        -leuser \
-        -lflogger \
-        -ljavamobilemedia \
-        -lmidiclient \
-        -lmmfcontrollerframework \
-        -lmmfstandardcustomcommands \
-        -laudiooutputrouting \
-        -laccmonitor
-
-include(../../../build/omj.pri)
--- a/javauis/amms_qt/javasrc/com/nokia/amms/AMMSError.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.NativeError;
-
-/**
- * This class contains general helper methods for error conversion
- * between native side and java side.
- */
-public final class AMMSError
-{
-    /**
-     * Private, because this class is not intended to be constructed.
-     */
-    private AMMSError()
-    {
-    }
-
-    /**
-     * This method throws IllegalStateException if error code is
-     * KErrNotReady (-18)
-     *
-     * @param aNativeErrorCode Native error code.
-     */
-    static public void checkIllegalState(int aNativeErrorCode)
-    {
-        if (aNativeErrorCode == NativeError.KErrNotReady)
-        {
-            throw new IllegalStateException();
-        }
-    }
-
-    /**
-     * This method throws MediaException if checked native error
-     * code is below KErrNone.
-     * @param aNativeErrorCode Native error code.
-     */
-    static public void checkMediaException(int aNativeErrorCode)
-    throws MediaException
-    {
-        NativeError.checkOOMOnly(aNativeErrorCode);
-        if (aNativeErrorCode < NativeError.KErrNone)
-        {
-            throw new MediaException();
-        }
-    }
-    /**
-     * @param aObject Object to be checked.
-     */
-    static public void checkArgument(Object aObject)
-    {
-        if (aObject == null)
-        {
-            throw new IllegalArgumentException();
-        }
-    }
-
-    /**
-     * Checks for basic native error codes that map to standard Java
-     * exceptions and throws the exception if the error code matches.
-     * Otherwise throws basic Error class.
-     * @param aNativeErrorCode Native error code.
-     */
-    static public void check(int aNativeErrorCode)
-    {
-        NativeError.check(aNativeErrorCode);
-    }
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/AMMSPlugin.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Adds PriorityControl when a player is created.
-*
-*/
-
-package com.nokia.amms;
-
-import com.nokia.amms.control.PriorityControl;
-import com.nokia.mid.impl.media.AudioOutputControl;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlayerImpl;
-import com.nokia.microedition.media.PlugIn;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.NativeError;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.protocol.DataSource;
-import java.io.IOException;
-
-
-// CLASS DEFINITION
-/**
- * MMA Manager calls AMMSPlugin class when a new player is created.
- * The plugin adds PriorityControl to the created player.
- */
-public class AMMSPlugin implements PlugIn
-{
-    private final String PRIORITY_CONTROL =
-        "javax.microedition.amms.control.PriorityControl";
-    private final String AUDIO_OUTPUT_CONTROL =
-        "com.nokia.mid.media.AudioOutputControl";
-
-    /**
-     * Default constructor.
-     */
-    public AMMSPlugin()
-    {
-    }
-
-    /**
-     * From PlugIn. Empty implementation.
-     */
-    public String[] getSupportedContentTypes(String aProtocol)
-    {
-        return new String[ 0 ];
-    }
-
-    /**
-     * From PlugIn. Empty implementation.
-     */
-    public String[] getSupportedProtocols(String aContentType)
-    {
-        return new String[ 0 ];
-    }
-
-    /**
-     * From PlugIn. Empty implementation.
-     */
-    public InternalPlayer createPlayer(DataSource aDataSource)
-    throws MediaException, IOException
-    {
-        return null;
-    }
-
-    /**
-     * From PlugIn.
-     */
-    public void preparePlayer(InternalPlayer aPlayer) throws MediaException
-    {
-        // Do not add PriorityControl if the player is not derived from
-        // PlayerImpl (because native player handle is needed).
-        if (aPlayer instanceof PlayerImpl)
-        {
-            PlayerImpl player = (PlayerImpl)aPlayer;
-
-            int eventSource = ManagerImpl.getEventSource();
-            createAndAddPriorityControlToPlayer(eventSource, player);
-            createAndAddAudioOutputControlToPlayer(eventSource, player);
-        }
-
-    }
-    /**
-    * Create and add priority control to player
-    */
-    public void createAndAddPriorityControlToPlayer(int eventSource, PlayerImpl aPlayer)
-    {
-        // Create native PriorityControl and add it to the native player.
-        int nativePriorityControl = _createNativePriorityControl(
-                                        eventSource, aPlayer.getPlayerHandle());
-
-        NativeError.check(nativePriorityControl);
-
-
-        // Create java side control.
-        PriorityControl priorityControl = new PriorityControl(aPlayer);
-        priorityControl.initControl(eventSource, nativePriorityControl,
-                                    null);   // This control does not belong to any module.
-
-        aPlayer.addControl(priorityControl, PRIORITY_CONTROL);
-    }
-    /**
-    * Create and add AudioOutput control to player
-    */
-    public void createAndAddAudioOutputControlToPlayer(int eventSource, PlayerImpl aPlayer)
-    {
-        // Create native AudioOutputControl and add it to the native player.
-        int nativeAudioOutputControl = _createNativeAudioOutputControl(
-                                           eventSource, aPlayer.getPlayerHandle());
-        NativeError.check(nativeAudioOutputControl);
-
-
-        // Create java side control.
-        AudioOutputControl audioOutputControl = new AudioOutputControl(aPlayer);
-        audioOutputControl.initControl(eventSource, nativeAudioOutputControl,
-                                       null);  // This control does not belong to any module.
-        audioOutputControl.SetAudioOutputToNative();
-        aPlayer.addControl(audioOutputControl, AUDIO_OUTPUT_CONTROL);
-    }
-
-    /**
-     * Creates native PriorityControl and adds it
-     */
-    private static native int _createNativePriorityControl(
-        int aEventSource, int aPlayerHandle);
-    /**
-    * Creates native AudioOutputControl and adds it
-    */
-    private static native int _createNativeAudioOutputControl(
-        int aEventSource, int aPlayerHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/ControlContainer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for controls.
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.Controllable;
-import com.nokia.amms.ModuleBase;
-import com.nokia.amms.control.ControlImpl;
-import com.nokia.mj.impl.utils.Logger;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-/**
- * ControlContainer class creates java control objects according to a classname
- * which is got from native control object. Created controls are accessible
- * through Controllable interface which is implemented in this class.
- */
-public class ControlContainer implements Controllable
-{
-    /**
-     * Default control package. Used when getting control with
-     * getControl method which appends default control package if package is
-     * not specified.
-     */
-    static final String CONTROL_DEFAULT_PACKAGE =
-        "javax.microedition.media.control.";
-
-    /**
-     * Package where control implementation are.
-     */
-    static final String PRIVATE_PACKAGE = "com.nokia";
-
-    /**
-     * Hashtable containing controls identified with a full package name.
-     * All control names starts with iDefaultPackage.
-     */
-    private final Hashtable iControls = new Hashtable();
-
-    /**
-     * Creates new ControlContainer.
-     */
-    private ControlContainer()
-    {
-    }
-
-    /**
-     * Create new ControlContainer and populates the controls.
-     *
-     * @param aDefaultPackege Default control package. Used when getting control
-     * with getControl method which appends default control package if package
-     * is not specified.
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aNativeHandle Handle to native control source.
-     * @param aModule Module where the controls belong to.
-     */
-    public static final ControlContainer populateControls(
-        int aEventSourceHandle,
-        int aNativeHandle,
-        ModuleBase aModule)
-    {
-        ControlContainer container = new ControlContainer();
-
-        // Get amount of controls in native object.
-        int controlCount = _getControlsCount(aEventSourceHandle,
-                                             aNativeHandle);
-
-        // Create java object for each native objects.
-        for (int i = 0; i < controlCount; i++)
-        {
-            // Get handle to native object at index i
-            int controlHandle = _getControlHandle(aEventSourceHandle,
-                                                  aNativeHandle,
-                                                  i);
-
-            // Get controls class name which will be used to create java object
-            String className = _getControlClassName(aEventSourceHandle,
-                                                    controlHandle);
-
-            // create java instance
-            Control control = createControl(className,
-                                            controlHandle,
-                                            aEventSourceHandle,
-                                            aModule);
-
-            // Add package if it does not exists
-            if (className.indexOf('.') < 0)
-            {
-                className = CONTROL_DEFAULT_PACKAGE + className;
-            }
-            container.iControls.put(className, control);
-        }
-
-        // population succeed, return created collection
-        return container;
-    }
-
-    /**
-     * Implements method defined in javax.microedition.media.Controllable.
-     *
-     * @see javax.microedition.media.Controllable
-     * @param aControlType  the class name of the Control. The class name should
-     * be given either as the fully-qualified name of the class; or if the
-     * package of the class is not given, the package
-     * javax.microedition.media.control is assumed.
-     * @return the object that implements the control, or null.
-     */
-    public Control getControl(String aControlType)
-    {
-        if (aControlType == null)
-        {
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "ControlContainer::getControl parameter was null");
-            throw new IllegalArgumentException("argument was null");
-        }
-
-        String controlType = aControlType;
-
-        // check if package name exists
-        if (controlType.indexOf(".") == -1)
-        {
-            // add package name
-            controlType = CONTROL_DEFAULT_PACKAGE + aControlType;
-        }
-        Control control = (Control)iControls.get(controlType);
-
-        // If control does not exists with default name, check if there is
-        // is a control with same type ( extends the given class name ).
-        if (control == null)
-        {
-            try
-            {
-                // try to create class for control
-                Class controlClass = Class.forName(controlType);
-
-                Enumeration elements = iControls.elements();
-
-                // search if any control is same type that requested control
-                while (elements.hasMoreElements() &&
-                        control == null)
-                {
-                    Control tmpControl = (Control)elements.nextElement();
-                    if (controlClass.isInstance(tmpControl))
-                    {
-                        // control is found
-                        control = tmpControl;
-                    }
-                }
-            }
-            catch (ClassNotFoundException cnfe)  // the class could not be found
-            {
-                // Exception is ignored and null is returned from this method
-                Logger.ELOG(Logger.EJavaMMAPI,
-                            "ControlContainer::getControl ",
-                            cnfe);
-            }
-            catch (Error e)  // the function failed for any other reason.
-            {
-                // Error is ignored and null is returned from this method
-                Logger.ELOG(Logger.EJavaMMAPI,
-                            "ControlContainer::getControl ",
-                            e);
-            }
-        }
-        return control;
-    }
-
-    /**
-     * Implements method defined in javax.microedition.media.Controllable.
-     *
-     * @see javax.microedition.media.Controllable
-     * @return the collection of Control objects.
-     */
-    public Control[] getControls()
-    {
-        Control[] controls = new Control[ iControls.size()];
-        Enumeration elements = iControls.elements();
-        int i = 0;
-        // Put all controls to array
-        while (elements.hasMoreElements())
-        {
-            controls[ i ] = (Control)elements.nextElement();
-            i++;
-        }
-        return controls;
-    }
-
-    /**
-     * Invalidates the controls stored in this container.
-     * After this using controls in Java side will throw
-     * RuntimeException.
-     */
-    public void invalidateControls()
-    {
-        Enumeration elements = iControls.elements();
-
-        while (elements.hasMoreElements())
-        {
-            // All controls are instances of ControlImpl class.
-            ControlImpl control = (ControlImpl)elements.nextElement();
-            control.invalidateControl();
-        }
-    }
-
-    /**
-     * Creates new Control instance.
-     * All control classes must be in iPrivatePackage package and
-     * extend the ControlImpl base class. Created control is initialized
-     * with native control handle and eventsource handle.
-     *
-     * @param aClassName Control's class name without the package.
-     * @param aControlHandle Handle to native control.
-     * @param aModule Module where the control belongs to.
-     * @return created control
-     */
-    static private final Control createControl(String aClassName,
-            int aControlHandle,
-            int aEventSourceHandle,
-            ModuleBase aModule)
-    {
-        ControlImpl control = null;
-
-        // Try to make control instance. If instantion fails, it is an internal
-        // error and can only occur in development time.
-        try
-        {
-            Class controlClass =
-                Class.forName(PRIVATE_PACKAGE +
-                              aClassName);
-            control = (ControlImpl)controlClass.newInstance();
-            control.initControl(aEventSourceHandle, aControlHandle, aModule);
-        }
-        catch (InstantiationException ie)
-        {
-            throw new OutOfMemoryError(ie.getMessage());
-        }
-        catch (IllegalAccessException iae)
-        {
-            throw new OutOfMemoryError(iae.getMessage());
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            throw new OutOfMemoryError(cnfe.getMessage());
-        }
-        return control;
-    }
-
-
-    /**
-     * Return the amount of controls in native control source.
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aNativeHandle Handle to native control source object.
-     */
-    private static native int _getControlsCount(int aEventSourceHandle,
-            int aNativeHandle);
-
-    /**
-     * Return native handle to control at specified index.
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aNativeHandle Handle to native control source object.
-     * @param aControlIndex Control's index.
-     */
-    private static native int _getControlHandle(int aEventSourceHandle,
-            int aNativeHandle,
-            int aControlIndex);
-    /**
-     * Returns the control class name that can be used to instantiate Java
-     * object.
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aControlHandle Handle to native control.
-     */
-    private static native String _getControlClassName(int aEventSourceHandle,
-            int aControlHandle);
-
-
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/EffectModuleImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.amms.EffectModule;
-import javax.microedition.media.Control;
-
-/**
- * EffectModuleImpl provides functionality defined in EffectModule.
- * This class is used through EffectModule interface which implements the
- * Module interface and does not define any new methods. Methods defined in
- * Module are implemented in ModuleBase class.
- * Can be accessed only from com.nokia.amms package.
- */
-class EffectModuleImpl extends ModuleBase
-        implements EffectModule
-{
-    /**
-     * Constructs new EffectModuleImpl instance.
-     * Package private.
-     * @param aEventSourceHandle Handle to event source.
-     * @param aNativeHandle Handle to corresponding native object.
-     * @param aManagerHandle Handle to native global manager.
-     */
-    EffectModuleImpl(int aEventSourceHandle,
-                     int aNativeHandle,
-                     int aManagerHandle)
-    {
-        super(aEventSourceHandle,
-              aNativeHandle,
-              aManagerHandle);
-    }
-
-    /**
-     * Obtain the object that implements the specified Control interface.
-     *
-     * @see javax.microedition.media.Controllable
-     * @param aControlType  the class name of the Control. The class name should
-     * be given either as the fully-qualified name of the class; or if the
-     * package of the class is not given, the package
-     * javax.microedition.media.control is assumed.
-     * @return the object that implements the control, or null if no objects
-     * implement the control or if there is no players in the module.
-     */
-    public Control getControl(String aControlType)
-    {
-        if (iPlayers.size() > 0)
-        {
-            // Delegate to ControlContainer
-            return iControls.getControl(aControlType);
-        }
-        // An EffectModule, that has no Players attached to it, does not
-        // provide any Controls.
-        else
-        {
-            return null;
-        }
-    }
-
-    /**
-     * Obtain the collection of Controls.
-     *
-     * @see javax.microedition.media.Controllable
-     * @return the collection of Control objects or a zero length array if
-     * there is no controls or players in the module.
-     */
-    public Control[] getControls()
-    {
-        if (iPlayers.size() > 0)
-        {
-            // Delegate to ControlContainer
-            return iControls.getControls();
-        }
-        // An EffectModule, that has no Players attached to it, does not
-        // provide any Controls.
-        else
-        {
-            return new Control[ 0 ];
-        }
-
-
-    }
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/GlobalManagerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,372 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.amms;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.amms.EffectModule;
-import javax.microedition.amms.SoundSource3D;
-import javax.microedition.amms.MediaProcessor;
-import javax.microedition.media.Manager;
-import java.util.Vector;
-
-/**
- * GlobalManager implementation used by
- * javax.microedition.amms.GlobalManager.
- */
-public class GlobalManagerImpl extends ModuleBase
-{
-    /**
-     * There is no supported media processor input types.
-     */
-    private static final String[] SUPPORTED_MEDIA_PROCESSOR_INPUT_TYPES =
-        new String[ 0 ];
-
-    // Constants needed when getting supported player content types.
-    private static final String AUDIO_STRING = "audio";
-    private static final String VIDEO_STRING = "video";
-    private static final String CAPTURE_STRING = "capture";
-    private static final String DEVICE_STRING = "device";
-    private static final String PROTOCOL_SEPARATOR = "://";
-    private static final char MEDIA_SEPARATOR = '/';
-
-    /**
-     * Singleton instance.
-     */
-    static private GlobalManagerImpl iInstance;
-
-    /**
-     * Implements Spectator functionality.
-     */
-    private SpectatorImpl iSpectator;
-
-    /**
-     * Private constructor not to allow direct construction, because
-     * this class is singleton.
-     */
-    private GlobalManagerImpl(int aEventSourceHandle)
-    {
-        com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javaamms");
-
-        iEventSourceHandle = aEventSourceHandle;
-
-        // Create native instance
-        iModuleHandle = _createGlobalManager(iEventSourceHandle);
-
-
-        if (iModuleHandle < 0)
-        {
-            // Could not create native object
-            throw new OutOfMemoryError();
-        }
-    }
-
-    /**
-     * Creates static GlobalManagerImpl instance. Instance can be obtained
-     * with getInstance method.
-     * @param aEventSourceHandle Handle to native event source.
-     */
-    public static void invoke(int aEventSourceHandle)
-    {
-        // create static instance
-        iInstance = new GlobalManagerImpl(aEventSourceHandle);
-    }
-
-    /**
-     * Returns static GlobalManagerImpl instance. This method will be called
-     * from GlobalManager's static block when it is loaded for the first time.
-     * @return GlobalManagerImpl instance
-     */
-    public static GlobalManagerImpl getInstance()
-    {
-        if (iInstance == null)
-        {
-            // GlobalManagerImpl is not initialized because iInstance is null.
-            // Invoke MMA1.1 by calling one of Manager's static methods.
-            // MMA will invoke its invoke listener that will result a call to
-            // GlobalManagerImpl::invoke method which creates static global
-            // manager instance.
-            Manager.getSystemTimeBase();
-        }
-
-        // if spectator isn't null init is already called
-        if (iInstance.iSpectator == null)
-        {
-            iInstance.init();
-        }
-        return iInstance;
-    }
-
-    /**
-     * Finalizes GlobalManagerImpl's initialization.
-     * This method creates native global controls and corresponding Java
-     * controls.
-     */
-    private void init()
-    {
-        // Initialize native global manager instance.
-        int err = _init(iInstance.iEventSourceHandle,
-                        iInstance.iModuleHandle);
-
-
-        // Initialize super class which will add global controls
-        init(iEventSourceHandle, iModuleHandle);
-
-        if (err < 0)
-        {
-            // Init failed. AMMS functionality cannot be used.
-            throw new OutOfMemoryError();
-        }
-        int handle = _createSpectator(iEventSourceHandle, iModuleHandle);
-        if (handle < 0)
-        {
-            // Could not create native object
-            throw new OutOfMemoryError();
-        }
-
-        // Create Java object for native spectator
-        iSpectator = new SpectatorImpl(iEventSourceHandle, handle);
-    }
-
-    /**
-     * Creates an <code>EffectModule</code>.
-     *
-     * @throws MediaException if creation of <code>EffectModule</code>
-     * is not supported.
-     * @return An <code>EffectModule</code> object that may be used to group
-     * <code>Player</code>s.
-     */
-    public EffectModule createEffectModule() throws MediaException
-    {
-        int handle = _createEffectModule(iEventSourceHandle, iModuleHandle);
-        if (handle < 0)
-        {
-            throw new MediaException();
-        }
-        return new EffectModuleImpl(iEventSourceHandle,
-                                    handle,
-                                    iModuleHandle);
-    }
-
-    /**
-     * Creates a <code>SoundSource3D</code>.
-     *
-     * @throws MediaException if creation of <code>SoundSource3D</code>
-     * is not supported.
-     * @return A <code>SoundSource3D</code> object that represents
-     * a virtual sound source and that may be used to group
-     * <code>Player</code>s.
-     */
-    public SoundSource3D createSoundSource3D() throws MediaException
-    {
-        int handle = _createSoundSource3D(iEventSourceHandle, iModuleHandle);
-        if (handle < 0)
-        {
-            throw new MediaException();
-        }
-        return new SoundSource3DImpl(iEventSourceHandle,
-                                     handle,
-                                     iModuleHandle);
-    }
-
-    /**
-     * Gets the supported player content types that can be added
-     * to a <code>SoundSource3D</code>.
-     * {@link javax.microedition.amms.control.AudioFormatControl}
-     * specifies constants for content types commonly used with
-     * <code>SoundSource3D</code>.
-     *
-     * @return a list of content types that can be used to create
-     * <code>Player</code>s supported by <code>SoundSource3D</code>
-     * (e.g. "audio/midi") and of device and capture locators that can
-     * be used to create <code>Player</code>s supported by
-     * <code>SoundSource3D</code> (e.g. "capture://radio")
-     */
-    public String[] getSupportedSoundSource3DPlayerTypes()
-    {
-        Vector resultVector = new Vector();
-
-        // Get content types (e.g. audio/midi)
-        playerTypes(null, resultVector);
-
-        // Get device locators (e.g. "device://video)
-        playerTypes(DEVICE_STRING, resultVector);
-
-
-        // Convert the vector to string array.
-
-        int resultLength = resultVector.size();
-
-        String[] result = new String[ resultLength ];
-
-        for (int i = 0; i < resultLength; i++)
-        {
-            result[ i ] = (String)resultVector.elementAt(i);
-        }
-
-        return result;
-    }
-
-    /**
-     * Returns player types that supports the given protocol.
-     * @param aProtocol Protocol (e.g. capture) or null if all protocols are used.
-     * @param aResultVector Vector where the result is stored.
-     */
-    private void playerTypes(String aProtocol, Vector aResultVector)
-    {
-        String[] contentTypes = Manager.getSupportedContentTypes(aProtocol);
-
-        int contents = contentTypes.length;
-
-        for (int i = 0; i < contents; i++)
-        {
-            String contentType = contentTypes[ i ];
-
-            // Select those types that are supported by AMMS.
-            if (contentType.startsWith(AUDIO_STRING + MEDIA_SEPARATOR) ||
-                    contentType.startsWith(VIDEO_STRING + MEDIA_SEPARATOR))
-            {
-                String playerType = contentType;
-
-                // Add the protocol string if a specific one is used.
-                if (aProtocol != null)
-                {
-                    int endIndex = contentType.indexOf(MEDIA_SEPARATOR);
-                    if (endIndex >= 0)
-                    {
-                        contentType = contentType.substring(0, endIndex);
-                    }
-
-                    playerType = aProtocol + PROTOCOL_SEPARATOR + contentType;
-                }
-
-                // Add the type to the vector.
-                if (!aResultVector.contains(playerType))
-                {
-                    aResultVector.addElement(playerType);
-                }
-            }
-        }
-    }
-
-    /**
-     * Gets the <code>Spectator</code>, which represents the listener
-     * in the virtual acoustical space.
-     *
-     * @return the <code>Spectator</code>, which represents the listener
-     * in the virtual acoustical space
-     */
-    public SpectatorImpl getSpectator()
-    {
-        return iSpectator;
-    }
-
-    /**
-     * Creates a <code>MediaProcessor</code> object. Content type is passed
-     * as a MIME type as specified in javax.microedition.media.Manager.
-     * {@link FormatControl},
-     * {@link javax.microedition.amms.control.ContainerFormatControl},
-     * {@link javax.microedition.amms.control.VideoFormatControl},
-     * {@link javax.microedition.amms.control.AudioFormatControl}
-     * and {@link javax.microedition.amms.control.ImageFormatControl} specify
-     * constants for a set of commonly used content types.
-     *
-     *
-     * @param contentType the content type of the source data to be processed.
-     * @throws MediaException if a <code>MediaProcessor</code> could
-     * not be created for the given content type.
-     * @return An instance of <code>MediaProcessor</code>
-     */
-    public MediaProcessor createMediaProcessor(String aContentType)
-    throws MediaException
-    {
-        // MediaProcessor is not supported.
-        throw new MediaException();
-    }
-
-    /**
-     * Obtain the handle of the GlobalManager.
-     *
-     * @return the module handle.
-     */
-    public static int getHandle()
-    {
-        if (iInstance == null)
-        {
-            // GlobalManagerImpl is not initialized because iInstance is null.
-            // Invoke MMA1.1 by calling one of Manager's static methods.
-            // MMA will invoke its invoke listener that will result a call to
-            // GlobalManagerImpl::invoke method which creates static global
-            // manager instance.
-            Manager.getSystemTimeBase();
-        }
-
-        return iInstance.iModuleHandle;
-    }
-
-    /**
-     * Gets the supported MediaProcessor input content types.
-     *
-     * @return Supported MediaProcessor input content types.
-     */
-    public String[] getSupportedMediaProcessorInputTypes()
-    {
-        return SUPPORTED_MEDIA_PROCESSOR_INPUT_TYPES;
-    }
-
-    /**
-     * @param aEventSourceHandle Handle to native event source.
-     * @return Handle to native object or an error code.
-     */
-    private static native int _createGlobalManager(int aEventSourceHandle);
-
-    /**
-     * Initializes native object.
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aGlobalManagerHandle Handle to native global manager.
-     * @return 0 if success or an error code.
-     */
-    private static native int _init(int aEventSourceHandle,
-                                    int aGlobalManagerHandle);
-
-    /**
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aGlobalManagerHandle Handle to native global manager.
-     * @return Handle to native object or an error code.
-     */
-    private static native int _createEffectModule(int aEventSourceHandle,
-            int aGlobalManagerHandle);
-
-    /**
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aGlobalManagerHandle Handle to native global manager.
-     * @return Handle to native object or an error code.
-     */
-    private static native int _createSoundSource3D(int aEventSourceHandle,
-            int aGlobalManagerHandle);
-
-    /**
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aGlobalManagerHandle Handle to native global manager.
-     * @return Handle to native object or an error code.
-     */
-    private static native int _createSpectator(int aEventSourceHandle,
-            int aGlobalManagerHandle);
-
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/MMAInvokeListenerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is invoked when MMA event source is created.
-*
-*/
-
-package com.nokia.amms;
-
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.MMAInvokeListener;
-
-/**
- * This class will be created and invoked when MMA event source is created.
- */
-public class MMAInvokeListenerImpl implements MMAInvokeListener
-{
-    /**
-     * Public empty constructor to used from MMA.
-     */
-    public MMAInvokeListenerImpl()
-    {
-    }
-
-    /**
-     * From MMAInvokeListener. Invokes GlobalManager and adds AMMSPlugin to
-     * the MMA Manager.
-     * @param aEventSourceHandle Handle to native MMA event source.
-     */
-    public void notifyInvoke(int aEventSourceHandle)
-    {
-        // Create GlobalManagerImpl static instance.
-        GlobalManagerImpl.invoke(aEventSourceHandle);
-
-        // Add AMMSPlugin to MMA Manager. The plugin is called every time
-        // a player is created.
-        ManagerImpl.getInstance().addPlugIn(new AMMSPlugin());
-    }
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/ModuleBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,400 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for modules.
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.Control;
-import com.nokia.microedition.media.PlayerImpl;
-
-import com.nokia.microedition.media.NativeError;
-import java.util.Vector;
-import com.nokia.mj.impl.rt.support.Finalizer;
-
-/**
- * Base class for all modules.
- */
-public class ModuleBase implements PlayerListener
-{
-    /**
-     * Player is already in some other module.
-     */
-    private static final int PLAYER_ALREADY_IN_MODULE = -123;
-    private static final int MIXING_NOT_SUPPORTED = -1234;
-
-    /**
-     * Current implementation does not support midi channels in modules.
-     */
-    private static final String MIDI_CHANNELS_NOT_SUPPORTED =
-        "Adding MIDI channels is not supported.";
-
-    /**
-     * Contains all controls in the module. Package private.
-     */
-    ControlContainer iControls;
-
-    /**
-     * Handle to native implemantation. Package private.
-     */
-    int iModuleHandle;
-
-    /**
-     * Handle to native event source. Package private.
-     */
-    int iEventSourceHandle;
-
-    /**
-     * Handle to native global mabager. Package private.
-     * Used to dispose native module.
-     */
-    int iManagerHandle;
-
-    /**
-     * Java-side players. Package private.
-     */
-    Vector iPlayers = new Vector();
-
-    private Finalizer mFinalizer;
-
-    /**
-     * Constructs new Module base. Package private.
-     * Module is registered for the finalization.
-     *
-     * @param aEventSourceHandle Handle to event source.
-     * @param aModuleHandle Handle to corresponding native object.
-     * @param aManagerHandle Handle to native global manager.
-     * @param aMana
-     */
-    ModuleBase(int aEventSourceHandle,
-               int aModuleHandle,
-               int aManagerHandle)
-    {
-        // registeredFinalize() method is called when this class is finalized.
-        mFinalizer = new Finalizer()
-        {
-            public void finalizeImpl()
-            {
-                doFinalize();
-            }
-        };
-
-        iManagerHandle = aManagerHandle;
-
-        init(aEventSourceHandle,
-             aModuleHandle);
-    }
-
-    /**
-     * Constructs new Module base. Package private.
-     * Module is not registered for the finalization.
-     */
-    ModuleBase()
-    {
-    }
-
-    /**
-     * Initialises module base. This method must be called before module can be
-     * used. Package private.
-     *
-     * @param aEventSourceHandle Handle to event source.
-     * @param aModuleHandle Handle to corresponding native object.
-     */
-    final void init(int aEventSourceHandle,
-                    int aModuleHandle)
-    {
-        iEventSourceHandle = aEventSourceHandle;
-        iModuleHandle = aModuleHandle;
-
-        iControls = ControlContainer.populateControls(
-                        iEventSourceHandle,
-                        iModuleHandle,
-                        this);
-    }
-
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            registeredFinalize();
-            mFinalizer = null;
-        }
-    }
-
-    /**
-     * This method is called when garbage collector finalizes this object.
-     */
-    void registeredFinalize()
-    {
-        iControls.invalidateControls();
-
-        _dispose(iManagerHandle,
-                 iModuleHandle);
-    }
-
-    /**
-     * <p>Adds an individual MIDI channel of a MIDI <code>Player</code>
-     * to the module.</p>
-     *
-     * <p>If the played MIDI file or MIDI stream contains information
-     * that is contradictory
-     * to what is specified via this <code>Module</code> the behavior
-     * will be implementation specific.</p>
-     *
-     * @param player The MIDI <code>Player</code> whose channel is to be added.
-     * @param channel The channel of the given <code>Player</code> to be added.
-     * The range is 0-15.
-     *
-     * @throws MediaException if adding of channels is not supported.
-     * @throws IllegalArgumentException if the <code>player</code> is not a MIDI player or the <code>player</code> is null
-     * or if the <code>player</code> is already part of the module.
-     * @throws IllegalArgumentException if <code>channel</code> > 15 or <code>channel</code> < 0.
-     * @throws IllegalStateException if some <code>Player</code>
-     * in the <code>Module</code> tree is not in
-     * <code>UNREALIZED</code> or <code>REALIZED</code> state.
-     */
-    public void addMIDIChannel(Player aPlayer, int aChannel)
-    throws MediaException
-    {
-        // Midi channels are not supported modules.
-        throw new MediaException(MIDI_CHANNELS_NOT_SUPPORTED);
-    }
-
-    /**
-     * Removes a MIDI channel from the module.
-     *
-     * All channels can be removed at once by {@link #removePlayer removePlayer}
-     *
-     * @param player The MIDI <code>Player</code> whose channel is to be removed.
-     * @param channel The channel of the given MIDI <code>Player</code>
-     * to be removed.
-     * @throws IllegalArgumentException if the given <code>channel</code> is
-     * not part of the <code>Module</code> or if the <code>player</code> is null.
-     * @throws IllegalStateException if some <code>Player</code>
-     * in the <code>Module</code> tree is not in
-     * <code>UNREALIZED</code> or <code>REALIZED</code> state
-     */
-    public void removeMIDIChannel(Player aPlayer, int aChannel)
-    {
-        // Midi channels are not supported modules.
-        throw new IllegalArgumentException(MIDI_CHANNELS_NOT_SUPPORTED);
-    }
-
-    /**
-     * Adds a <code>Player</code> to the module.
-     * @param player The <code>Player</code> to be added.
-     * @throws IllegalArgumentException if the <code>player</code> is null or
-     * if the <code>player</code> or some channels of
-     * the <code>player</code> already belong to the module.
-     * @throws MediaException if the <code>player</code> cannot be added.
-     * @throws IllegalStateException if some <code>Player</code>
-     * in the <code>Module</code> tree is not in
-     * <code>UNREALIZED</code> or <code>REALIZED</code> state.
-     */
-    public void addPlayer(Player aPlayer) throws MediaException
-    {
-        if (aPlayer == null)
-        {
-            throw new IllegalArgumentException("Player is null.");
-        }
-        if (!(aPlayer instanceof PlayerImpl))
-        {
-            throw new MediaException("Player is not supported.");
-        }
-
-        // It is not reasonable to add a player that is in CLOSED state.
-        if (aPlayer.getState() == Player.CLOSED)
-        {
-            throw new IllegalStateException("Cannot add Player while it is in CLOSED state.");
-        }
-
-        int playerHandle = ((PlayerImpl)aPlayer).getPlayerHandle();
-
-        int err = _addPlayer(iEventSourceHandle,
-                             iModuleHandle,
-                             playerHandle);
-
-        // Throw IllegalArgumentException if the player or some channels of
-        // the player already belong to the module.
-        if (err == NativeError.KErrArgument)
-        {
-            throw new IllegalArgumentException("Player already belongs to the module.");
-        }
-
-        //  Throw IllegalStateException if some Player in the Module
-        // (or the player to be added) is in PREFETCHED or STARTED state
-        if (err == NativeError.KErrNotReady)
-        {
-            throw new IllegalStateException("Cannot Add Player while any player in the module is in PREFETCHED or STARTED state");
-        }
-
-        // Throw MediaException if the player already exists in some
-        // other module.
-        if (err == PLAYER_ALREADY_IN_MODULE)
-        {
-            throw new MediaException("Player already in other module.");
-        }
-
-        // Throw MediaException if audio mixing is not supported (emulator).
-        if (err == MIXING_NOT_SUPPORTED)
-        {
-            throw new MediaException("Mixing is not supported in emulator.");
-        }
-
-        // Throw MediaException if the player cannot be added.
-        if (err < 0)
-        {
-            throw new MediaException(NativeError.errorMessage(err));
-        }
-
-        iPlayers.addElement(aPlayer);
-        aPlayer.addPlayerListener(this);
-    }
-
-    /**
-     * Removes a <code>Player</code> or all channels of a <code>Player</code>
-     * from the module.
-     * @param player The <code>Player</code> to be removed.
-     * @throws IllegalArgumentException if <code>player</code> is not part of
-     * the
-     * module or if <code>player</code> is null.
-     * @throws IllegalStateException if some <code>Player</code>
-     * in the <code>Module</code> tree is not in
-     * <code>UNREALIZED</code> or <code>REALIZED</code> state.
-     */
-    public void removePlayer(Player aPlayer)
-    {
-        // Throw IllegalArgumentException if the player is null, incorrect
-        // type, or does not belong to the module.
-        if (aPlayer == null)
-        {
-            throw new IllegalArgumentException("Player is null.");
-        }
-        if (!(aPlayer instanceof PlayerImpl))
-        {
-            throw new IllegalArgumentException("Not supported player.");
-        }
-
-        // If the player is in CLOSED state, the native side player is
-        // already removed and destroyed.
-        if (aPlayer.getState() != Player.CLOSED)
-        {
-            // The player list does not contain CLOSED players, thus do not
-            // check the existence for these players.
-            if (!iPlayers.contains(aPlayer))
-            {
-                throw new IllegalArgumentException(
-                    "Player does not belong to the module.");
-            }
-
-            int playerHandle = ((PlayerImpl)aPlayer).getPlayerHandle();
-
-            int err = _removePlayer(iEventSourceHandle,
-                                    iModuleHandle,
-                                    playerHandle);
-
-            if (err == NativeError.KErrNotReady)
-            {
-                throw new IllegalStateException(
-                    "Cannot remove Player while any player in the module is in PREFETCHED or STARTED state");
-            }
-
-            NativeError.check(err);
-
-            aPlayer.removePlayerListener(this);
-        }
-
-        iPlayers.removeElement(aPlayer);
-    }
-
-    /**
-     * Obtain the object that implements the specified Control interface.
-     *
-     * @see javax.microedition.media.Controllable
-     * @param aControlType  the class name of the Control. The class name should
-     * be given either as the fully-qualified name of the class; or if the
-     * package of the class is not given, the package
-     * javax.microedition.media.control is assumed.
-     * @return the object that implements the control, or null.
-     */
-    public Control getControl(String aControlType)
-    {
-        // Delegate to ControlContainer
-        return iControls.getControl(aControlType);
-    }
-
-    /**
-     * Obtain the collection of Controls.
-     *
-     * @see javax.microedition.media.Controllable
-     * @return the collection of Control objects.
-     */
-    public Control[] getControls()
-    {
-        // Delegate to ControlContainer
-        return iControls.getControls();
-    }
-
-    /**
-     * From PlayerListener.
-     */
-    public void playerUpdate(Player aPlayer, String aEvent, Object aEventData)
-    {
-        // Remove the player from the vector in order to allow
-        // the garbage collector to dispose the player.
-        if (aEvent == PlayerListener.CLOSED)
-        {
-            iPlayers.removeElement(aPlayer);
-        }
-    }
-
-    /**
-     * Removes a Player from module.
-     * (The function is protected to allow inherited modules to remove
-     * CLOSED players which is not possible by removePlayer() function).
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aModuleHandle Handle to native module object.
-     * @param aPlayerHandle Handle to native player object.
-     * @return Negative value if player does not exist in the module.
-     */
-    static native protected int _removePlayer(int aEventSourceHandle,
-            int aModuleHandle,
-            int aPlayerHandle);
-
-    /**
-     * Adds a Player to module.
-     *
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aModuleHandle Handle to native module object.
-     * @param aPlayerHandle Handle to native player object.
-     * @return Error code
-     */
-    static native private int _addPlayer(int aEventSourceHandle,
-                                         int aModuleHandle,
-                                         int aPlayerHandle);
-
-    /**
-     * Disposes native module.
-     *
-     * @param aManagerHandle Handle to native global manager.
-     * @param aModuleHandle Handle to native module object.
-     */
-    static native private void _dispose(int aManagerHandle,
-                                        int aModuleHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/SoundSource3DImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.amms.SoundSource3D;
-
-/**
- * SoundSource3DImpl provides functionality defined in SoundSource3D.
- * This class is used through SoundSource3D interface which implements the
- * Module interface and does not define any new methods. Methods defined in
- * Module are implemented in ModuleBase class.
- * Can be accessed only from com.nokia.amms package.
- */
-class SoundSource3DImpl extends ModuleBase
-        implements SoundSource3D
-{
-    /**
-     * Constructs new EffectModuleImpl instance.
-     * Package private.
-     * @param aEventSourceHandle Handle to event source.
-     * @param aNativeHandle Handle to corresponding native object.
-     * @param aManagerHandle Handle to native global manager.
-     */
-    SoundSource3DImpl(int aEventSourceHandle,
-                      int aNativeHandle,
-                      int aManagerHandle)
-    {
-        super(aEventSourceHandle,
-              aNativeHandle,
-              aManagerHandle);
-    }
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/SpectatorImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms;
-
-import javax.microedition.media.Controllable;
-
-/**
- * SpectatorImpl provides functionality defined in Spectator class.
- * This class is used through Controllable interface which methods are
- * implemented in ModuleBase.
- */
-class SpectatorImpl extends ModuleBase implements Controllable
-{
-    /**
-     * Constructs new SpectatorImpl instance.
-     * @param aEventSourceHandle Handle to event source.
-     * @param aNativeHandle Handle to corresponding native object.
-     */
-    SpectatorImpl(int aEventSourceHandle,
-                  int aNativeHandle)
-    {
-        // use empty constructor which don't register this object for
-        // finalization. Finalization is not needed because spectator's
-        // is singleton class in the global manager.
-        init(aEventSourceHandle,
-             aNativeHandle);
-    }
-
-
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/ControlImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for all AMMS controls.
-*
-*/
-
-package com.nokia.amms.control;
-
-import javax.microedition.media.Control;
-import com.nokia.amms.ModuleBase;
-import com.nokia.mj.impl.utils.Logger;
-
-
-/**
- * Base class for all AMMS controls.
- */
-public class ControlImpl implements Control
-{
-    protected int iControlHandle;
-    protected int iEventSource;
-    // Module that owns this control. Storing the reference to the module
-    // will prevent the garbage collector from deleting the module if some
-    // controls are still used.
-    protected ModuleBase iModule;
-
-    protected static final int NO_ERROR = 0;
-    protected static final int NOT_READY = -18;
-    protected static final int NOT_FOUND = -1;
-    protected static final int NOT_SUPPORTED = -5;
-
-    /**
-     * Constructor
-     */
-    protected ControlImpl()
-    {
-    }
-
-    /**
-     * Initializes control with event source and native implementation handles.
-     * @param aEventSource Handle to native event source.
-     * @param aControl Handle to native control implementation.
-     * @param aModule Module that owns this control.
-     */
-    public void initControl(int aEventSource,
-                            int aControlHandle,
-                            ModuleBase aModule)
-    {
-        iEventSource = aEventSource;
-        iControlHandle = aControlHandle;
-        iModule = aModule;
-
-        Logger.LOG(Logger.EJavaMMAPI,
-                   Logger.EInfo,
-                   "created: " + toString() + " handle = " + aControlHandle);
-    }
-
-    /**
-     * Invalidates the control. Using this control after invalidating
-     * throws a RuntimeException.
-     */
-    public void invalidateControl()
-    {
-        iControlHandle = 0;
-    }
-
-
-    public void checkValid()
-    {
-        if ((iEventSource == 0) || (iControlHandle == 0))
-        {
-            throw new IllegalStateException("Control creation failed");
-        }
-    }
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/EffectControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for Effect controls
-*
-*/
-
-package com.nokia.amms.control;
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.NativeError;
-
-public class EffectControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.EffectControl
-{
-    /**
-     * Constructor
-     */
-    public EffectControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setEnabled(boolean aEnable)
-    {
-        checkValid();
-
-        int err = _setEnabled(iEventSource, iControlHandle, aEnable);
-
-        if (err == NOT_READY)
-        {
-            throw new IllegalStateException(
-                "Enabling effect failed: Symbian OS error " + err);
-        }
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isEnabled()
-    {
-        checkValid();
-
-        // must ask the actual value from the native side
-        // because the effect can be dropped (if it's not enforced)
-
-        int err = _isEnabled(iEventSource, iControlHandle);
-        NativeError.check(err);
-
-        return err != 0;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setScope(int aScope) throws MediaException
-    {
-        checkValid();
-
-        String KScopeNotSupported = "Only SCOPE_LIVE_ONLY scope is supported";
-
-        // Only SCOPE_LIVE_ONLY is supported at the moment.
-        if (aScope != SCOPE_LIVE_ONLY)
-        {
-            throw new MediaException(KScopeNotSupported);
-        }
-
-        int err = _setScope(iEventSource, iControlHandle, aScope);
-        if (err < NO_ERROR)
-        {
-            if (err == NOT_READY)
-            {
-                throw new IllegalStateException(
-                    "Setting scope failed: Symbian OS error " + err);
-            }
-            else if (err == NOT_SUPPORTED)
-            {
-                throw new MediaException(KScopeNotSupported);
-            }
-            else
-            {
-                NativeError.check(err);
-            }
-        }
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getScope()
-    {
-        checkValid();
-
-        int err = _getScope(iEventSource, iControlHandle);
-        NativeError.check(err);
-
-        return err;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setEnforced(boolean aEnforced)
-    {
-        checkValid();
-
-        int err = _setEnforced(iEventSource, iControlHandle, aEnforced);
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isEnforced()
-    {
-        checkValid();
-
-        int err = _isEnforced(iEventSource, iControlHandle);
-        NativeError.check(err);
-
-        return err != 0;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setPreset(String aPreset)
-    {
-        checkValid();
-
-        if (aPreset == null)
-        {
-            throw new IllegalArgumentException("Preset is null");
-        }
-
-        int err = _setPreset(iEventSource, iControlHandle, aPreset);
-
-        if (err == NOT_FOUND)
-        {
-            throw new IllegalArgumentException("Preset is not available");
-        }
-        else
-        {
-            NativeError.check(err);
-        }
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getPreset()
-    {
-        checkValid();
-
-        String[] preset = new String[1];
-        int err = _getPreset(iEventSource, iControlHandle, preset);
-        if (err < NO_ERROR)
-        {
-            throw new IllegalStateException();
-        }
-
-        return preset[0];
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String[] getPresetNames()
-    {
-        checkValid();
-
-        String[] presets = _getPresetNames(iEventSource, iControlHandle);
-
-        // native function must not return null, unless an error occures. If
-        // there is no supported types zero length array will be returned.
-        if (presets == null)
-        {
-            throw new OutOfMemoryError();
-        }
-        return presets;
-    }
-
-    // native methods
-    private static native int _setEnabled(
-        int aEventSource,
-        int aControlHandle,
-        boolean aEnable);
-    private static native int _isEnabled(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _setScope(
-        int aEventSource,
-        int aControlHandle,
-        int aScope);
-    private static native int _getScope(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _setEnforced(
-        int aEventSource,
-        int aControlHandle,
-        boolean aEnforced);
-    private static native int _isEnforced(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _setPreset(
-        int aEventSource,
-        int aControlHandle,
-        String aPreset);
-    private static native int _getPreset(
-        int aEventSource,
-        int aControlHandle,
-        String[] aPreset);
-    private static native String[] _getPresetNames(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/PanControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control;
-
-import com.nokia.microedition.media.NativeError;
-
-public class PanControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.PanControl
-{
-    private static final int MIN_PAN = -100;
-    private static final int MAX_PAN = 100;
-
-    /**
-     * Constructor
-     */
-    public PanControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setPan(int aPan)
-    {
-        checkValid();
-
-        int pan = aPan;
-        // Panning value that is out of range is set to the valid range.
-        if (pan < MIN_PAN)
-        {
-            pan = MIN_PAN;
-        }
-        if (pan > MAX_PAN)
-        {
-            pan = MAX_PAN;
-        }
-
-        // SetBalance method in native side returns a system wide error code.
-        int[] error = new int[ 1 ];
-        int value = _setPan(iEventSource, iControlHandle, pan, error);
-        NativeError.check(error[ 0 ]);
-
-        return value;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getPan()
-    {
-        checkValid();
-
-        int value = _getPan(iEventSource, iControlHandle);
-        // GetBalance method in native would return a system wide error code,
-        // but the panning value is just instead queried from the control group.
-
-        return value;
-    }
-
-    // native methods
-    private static native int _setPan(
-        int aEventSource,
-        int aControlHandle,
-        int aPan,
-        int[] aError);
-    private static native int _getPan(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/PriorityControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Control for adjusting player priorities.
-*
-*/
-
-package com.nokia.amms.control;
-
-import com.nokia.microedition.media.NativeError;
-import javax.microedition.media.Player;
-
-/**
- * Control for adjusting player priorities.
- */
-public class PriorityControl
-        extends ControlImpl
-        implements javax.microedition.amms.control.PriorityControl
-{
-    private static final int MIN_PRIORITY = 0;
-    private static final int MAX_PRIORITY = 100;
-
-    // The player owning this control.
-    private Player iPlayer;
-
-
-    /**
-     * Constructor
-     */
-    public PriorityControl(Player aPlayer)
-    {
-        iPlayer = aPlayer;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setPriority(int aPriority)
-    {
-        checkValid();
-
-        int priority = aPriority;
-        // Panning value that is out of range is set to the valid range.
-        if (aPriority < MIN_PRIORITY ||
-                aPriority > MAX_PRIORITY)
-        {
-            throw new IllegalArgumentException(
-                "Priority must be between 0 and 100");
-        }
-
-        // Priority setting in native side returns a system wide error code.
-        int error = _setPriority(iEventSource, iControlHandle, aPriority);
-        NativeError.check(error);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getPriority()
-    {
-        checkValid();
-
-        int value = _getPriority(iEventSource, iControlHandle);
-
-        return value;
-    }
-
-    public void checkValid()
-    {
-        super.checkValid();
-
-        if (iPlayer.getState() == Player.CLOSED)
-        {
-            throw new IllegalStateException("Player is closed.");
-        }
-    }
-
-    // native methods
-    private static native int _setPriority(
-        int aEventSource,
-        int aControlHandle,
-        int aPriority);
-    private static native int _getPriority(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/VolumeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.amms.control;
-
-import com.nokia.amms.AMMSError;
-
-public class VolumeControl extends ControlImpl
-        implements javax.microedition.media.control.VolumeControl
-{
-    private static final int MAX_VOLUME = 100;
-    private int iLevel = MAX_VOLUME;
-    private boolean iMuted = false;
-
-    /**
-     * Constructor
-     */
-    public VolumeControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isMuted()
-    {
-        checkValid();
-        return iMuted;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getLevel()
-    {
-        checkValid();
-        return iLevel;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setLevel(int aLevel)
-    {
-        checkValid();
-        int level = aLevel;
-
-        // Set level to between 0 and 100
-        if (level < 0)
-        {
-            level = 0;
-        }
-        else if (level > MAX_VOLUME)
-        {
-            level = MAX_VOLUME;
-        }
-
-        if (!iMuted)
-        {
-            AMMSError.check(_setLevel(iEventSource,
-                                      iControlHandle,
-                                      level));
-        }
-        iLevel = level;
-        return level;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setMute(boolean aMuted)
-    {
-        checkValid();
-
-        // Check if mute status is changed
-        if (aMuted != iMuted)
-        {
-            iMuted = aMuted;
-
-            int level = iLevel;
-
-            // If mute is on set volume to 0, otherwise set to level set before
-            if (iMuted)
-            {
-                level = 0;
-            }
-
-            AMMSError.check(_setLevel(iEventSource,
-                                      iControlHandle,
-                                      level));
-        }
-    }
-
-    /**
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aControlHandle Handle to native control.
-     * @param aLevel New volume level.
-     */
-    private static native int _setLevel(int aEventSourceHandle,
-                                        int aControlHandle,
-                                        int aLevel);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/CommitControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audio3d;
-
-import com.nokia.microedition.media.NativeError;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public class CommitControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audio3d.CommitControl
-{
-    // data
-    private boolean iIsDeferred = false;
-
-    /**
-     * Constructor
-     */
-    public CommitControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setDeferred(boolean aDeferred)
-    {
-        checkValid();
-
-        int err = _setDeferred(iEventSource, iControlHandle, aDeferred);
-
-        // check error
-        NativeError.check(err);
-
-        iIsDeferred = aDeferred;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isDeferred()
-    {
-        checkValid();
-
-        return iIsDeferred;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void commit()
-    {
-        checkValid();
-
-        int err = _commit(iEventSource, iControlHandle);
-
-        // check error
-        NativeError.check(err);
-    }
-
-    // native function
-    private static native int _setDeferred(int aEventSource, int aControlHandle, boolean aDeferred);
-    private static native int _commit(int aEventSource, int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/DistanceAttenuationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audio3d;
-
-import com.nokia.microedition.media.NativeError;
-
-public class DistanceAttenuationControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audio3d.DistanceAttenuationControl
-{
-    private static final int MIN_MINIMUM_DISTANCE = 1;
-    private static final int MIN_MAXIMUM_DISTANCE = 1;
-    private static final int MIN_ROLLOF_FACTOR = 0;
-    /**
-     * Constructor
-     */
-    public DistanceAttenuationControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setParameters(int aMinDistance,
-                              int aMaxDistance,
-                              boolean aMuteAfterMax,
-                              int aRolloffFactor)
-    {
-        checkValid();
-
-        if (aMaxDistance <= aMinDistance)
-        {
-            throw new IllegalArgumentException("maxDistance must be equal or greater than minDistance");
-        }
-        if (aMinDistance < MIN_MINIMUM_DISTANCE)
-        {
-            throw new IllegalArgumentException("minDistance must be greater than zero");
-        }
-        if (aMaxDistance < MIN_MAXIMUM_DISTANCE)
-        {
-            throw new IllegalArgumentException("maxDistance must be greater than zero");
-        }
-        if (aRolloffFactor < MIN_ROLLOF_FACTOR)
-        {
-            throw new IllegalArgumentException("rolloffFactor cannot be less than zero");
-        }
-
-        int err = _setParameters(iEventSource, iControlHandle,
-                                 aMinDistance, aMaxDistance, aMuteAfterMax, aRolloffFactor);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinDistance()
-    {
-        checkValid();
-
-        // have to ask the native control because of commiting
-        return _getMinDistance(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxDistance()
-    {
-        checkValid();
-
-        // have to ask the native control because of commiting
-        return _getMaxDistance(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean getMuteAfterMax()
-    {
-        checkValid();
-
-        // have to ask the native control because of commiting
-        return _getMuteAfterMax(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getRolloffFactor()
-    {
-        checkValid();
-
-        // have to ask the native control because of commiting
-        return _getRolloffFactor(iEventSource, iControlHandle);
-    }
-
-    // native functions
-    private static native int _setParameters(
-        int aEventSource,
-        int aControlHandle,
-        int aMinDistance,
-        int aMaxDistance,
-        boolean aMuteAfterMax,
-        int aRolloffFactor);
-    private static native int _getMaxDistance(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _getMinDistance(
-        int aEventSource,
-        int aControlHandle);
-    private static native boolean _getMuteAfterMax(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _getRolloffFactor(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/DopplerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audio3d;
-
-import com.nokia.microedition.media.NativeError;
-
-public class DopplerControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audio3d.DopplerControl
-{
-    /**
-     * Constructor
-     */
-    public DopplerControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isEnabled()
-    {
-        checkValid();
-
-        // have to ask the native control because of commiting
-        return _isEnabled(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getVelocityCartesian()
-    {
-        checkValid();
-
-        int[] error = new int[ 1 ];
-        // have to ask the native control because of commiting
-        int[] velocity = _getVelocityCartesian(iEventSource,
-                                               iControlHandle,
-                                               error);
-        if (velocity == null)
-        {
-            // couldn't allocate memory
-            throw new OutOfMemoryError("Unable to obatin velocity.");
-        }
-
-        NativeError.check(error[ 0 ]);
-
-        return velocity;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setEnabled(boolean aDopplerEnabled)
-    {
-        checkValid();
-
-        int err = _setEnabled(iEventSource, iControlHandle, aDopplerEnabled);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setVelocityCartesian(int aX, int aY, int aZ)
-    {
-        checkValid();
-
-        int err = _setVelocityCartesian(iEventSource, iControlHandle, aX, aY, aZ);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setVelocitySpherical(int aAzimuth, int aElevation, int aRadius)
-    {
-        checkValid();
-
-        int err = _setVelocitySpherical(
-                      iEventSource,
-                      iControlHandle,
-                      aAzimuth,
-                      aElevation,
-                      aRadius);
-
-        NativeError.check(err);
-    }
-
-    private static native boolean _isEnabled(
-        int aEventSource,
-        int aControlHandle);
-    private static native int[] _getVelocityCartesian(
-        int aEventSource,
-        int aControlHandle,
-        int[] aError);
-    private static native int _setEnabled(
-        int aEventSource,
-        int aControlHandle,
-        boolean dopplerEnabled);
-    private static native int _setVelocityCartesian(
-        int aEventSource,
-        int aControlHandle,
-        int x,
-        int y,
-        int z);
-    private static native int _setVelocitySpherical(
-        int aEventSource,
-        int aControlHandle,
-        int azimuth,
-        int elevation,
-        int radius);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/LocationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audio3d;
-
-import com.nokia.microedition.media.NativeError;
-
-public class LocationControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audio3d.LocationControl
-{
-    private static final int MIN_RADIUS = 0;
-
-    /**
-     * Constructor
-     */
-    public LocationControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setCartesian(int aX, int aY, int aZ)
-    {
-        checkValid();
-
-        int err = _setCartesian(iEventSource, iControlHandle, aX, aY, aZ);
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setSpherical(int aAzimuth, int aElevation, int aRadius)
-    {
-        checkValid();
-
-        if (aRadius < MIN_RADIUS)
-        {
-            throw new IllegalArgumentException("Radius cannot be less than zero");
-        }
-
-        int err = _setSpherical(
-                      iEventSource,
-                      iControlHandle,
-                      aAzimuth,
-                      aElevation,
-                      aRadius);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getCartesian()
-    {
-        checkValid();
-
-        int[] error = new int[ 1 ];
-        int[] location = _getCartesian(iEventSource, iControlHandle, error);
-        if (location == null)
-        {
-            throw new OutOfMemoryError("Unable to obtain coordinates");
-        }
-
-        NativeError.check(error[ 0 ]);
-
-        return location;
-    }
-
-    private static native int[] _getCartesian(
-        int aEventSource,
-        int aControlHandle,
-        int[] aError);
-    private static native int _setCartesian(
-        int aEventSource,
-        int aControlHandle,
-        int x,
-        int y,
-        int z);
-    private static native int _setSpherical(
-        int aEventSource,
-        int aControlHandle,
-        int azimuth,
-        int elevation,
-        int radius);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/OrientationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audio3d;
-
-import com.nokia.microedition.media.NativeError;
-
-public class OrientationControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audio3d.OrientationControl
-{
-    private static final int REQUIRED_VECTOR_SIZE = 3;
-    private static final int COMPONENT_X = 0;
-    private static final int COMPONENT_Y = 1;
-    private static final int COMPONENT_Z = 2;
-
-    /**
-     * Constructor
-     */
-    public OrientationControl()
-    {
-    }
-
-    /**
-    * Please refer to JSR 234 for more details.
-    */
-    public void setOrientation(int aHeading, int aPitch, int aRoll)
-    {
-        checkValid();
-
-        int err = _setOrientation(
-                      iEventSource,
-                      iControlHandle,
-                      aHeading,
-                      aPitch,
-                      aRoll);
-
-        NativeError.check(err);
-    }
-
-    /**
-    * Please refer to JSR 234 for more details.
-    */
-    public void setOrientation(int[] aFrontVector, int[] aAboveVector)
-    throws IllegalArgumentException
-    {
-        checkValid();
-
-        if ((aFrontVector == null) ||
-                (aAboveVector == null))
-        {
-            throw new IllegalArgumentException("Argument is null");
-        }
-
-        if ((aFrontVector.length < REQUIRED_VECTOR_SIZE) ||
-                (aAboveVector.length < REQUIRED_VECTOR_SIZE) ||
-                (aFrontVector.length > REQUIRED_VECTOR_SIZE) ||
-                (aAboveVector.length > REQUIRED_VECTOR_SIZE))
-        {
-            throw new IllegalArgumentException("Required orientation vector size is 3");
-        }
-
-        // Vector is a zero vector if all the components are zero
-        if (((aFrontVector[ COMPONENT_X ] == 0) &&
-                (aFrontVector[ COMPONENT_Y ] == 0) &&
-                (aFrontVector[ COMPONENT_Z ] == 0)) ||
-                ((aAboveVector[ COMPONENT_X ] == 0) &&
-                 (aAboveVector[ COMPONENT_Y ] == 0) &&
-                 (aAboveVector[ COMPONENT_Z ] == 0)))
-        {
-            throw new IllegalArgumentException("Orientation vector cannot be a zero vector");
-        }
-
-        // Two vectors are parallel if their cross product is zero vector.
-        // Cross product of vectors a1*i + a2*j + a3*k and b1*i + b2*j + b3*k :
-        // (a2*b3 - a3*b2)i + (a3*b1 - a1*b3)j + (a1*b2 - a2*b1)k
-        if ((
-                    (aFrontVector[ COMPONENT_Y ] * aAboveVector[ COMPONENT_Z ]) -
-                    (aFrontVector[ COMPONENT_Z ] * aAboveVector[ COMPONENT_Y ]) == 0
-                )
-                &&
-                (
-                    (aFrontVector[ COMPONENT_Z ] * aAboveVector[ COMPONENT_X ]) -
-                    (aFrontVector[ COMPONENT_X ] * aAboveVector[ COMPONENT_Z ]) == 0
-                )
-                &&
-                (
-                    (aFrontVector[ COMPONENT_X ] * aAboveVector[ COMPONENT_Y ]) -
-                    (aFrontVector[ COMPONENT_Y ] * aAboveVector[ COMPONENT_X ]) == 0
-                ))
-        {
-            throw new IllegalArgumentException("Orientation vectors cannot be parallel");
-        }
-
-        int err = _setOrientationVectors(
-                      iEventSource,
-                      iControlHandle,
-                      aFrontVector,
-                      aAboveVector);
-
-        NativeError.check(err);
-    }
-
-    /**
-    * Please refer to JSR 234 for more details.
-    */
-    public int[] getOrientationVectors()
-    {
-        checkValid();
-
-        int[] error = new int[ 1 ];
-
-        int[] orientation = _getOrientationVectors(
-                                iEventSource,
-                                iControlHandle,
-                                error);
-
-        if (error[ 0 ] != NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError("Obtaining orientation vectors failed: Symbian OS error " +
-                                       error[ 0 ]);
-        }
-
-        if (orientation == null)
-        {
-            throw new OutOfMemoryError("Unable to obtain orientation vectors");
-        }
-        return orientation;
-    }
-
-    private static native int _setOrientation(
-        int aEventSource,
-        int aControlHandle,
-        int heading,
-        int pitch,
-        int roll);
-
-    private static native int _setOrientationVectors(
-        int aEventSource,
-        int aControlHandle,
-        int[] frontVector,
-        int[] aboveVector);
-
-    private static native int[] _getOrientationVectors(
-        int aEventSource,
-        int aControlHandle,
-        int[] error);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/AudioVirtualizerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audioeffect;
-
-public class AudioVirtualizerControl
-        extends com.nokia.amms.control.EffectControl
-        implements javax.microedition.amms.control.audioeffect.AudioVirtualizerControl
-{
-    /**
-     * Constructor
-     */
-    public AudioVirtualizerControl()
-    {
-    }
-
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/EqualizerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audioeffect;
-
-import com.nokia.microedition.media.NativeError;
-
-public class EqualizerControl
-        extends com.nokia.amms.control.EffectControl
-        implements javax.microedition.amms.control.audioeffect.EqualizerControl
-{
-    private static final int MAX_LEVEL = 100;
-    private static final int MIN_LEVEL = 0;
-
-    /**
-     * Constructor
-     */
-    public EqualizerControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinBandLevel()
-    {
-        checkValid();
-
-        return _getMinBandLevel(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxBandLevel()
-    {
-        checkValid();
-
-        return _getMaxBandLevel(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setBandLevel(int aLevel, int aBand)
-    throws IllegalArgumentException
-    {
-        checkValid();
-
-        int err = _setBandLevel(iEventSource, iControlHandle, aLevel, aBand);
-
-        // throws IllegalArgumentException on KErrArgument
-        NativeError.check(err);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getBandLevel(int aBand) throws IllegalArgumentException
-    {
-        checkValid();
-
-        int[] level = new int[ 1 ];
-
-        int error = _getBandLevel(iEventSource, iControlHandle, aBand, level);
-
-        // throws IllegalArgumentException on KErrArgument
-        NativeError.check(error);
-
-        return level[ 0 ];
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getNumberOfBands()
-    {
-        checkValid();
-
-        return _getNumberOfBands(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getCenterFreq(int aBand) throws IllegalArgumentException
-    {
-        checkValid();
-
-        int err = _getCenterFreq(iEventSource, iControlHandle, aBand);
-        NativeError.check(err);
-
-        return err;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getBand(int aFrequency)
-    {
-        checkValid();
-
-        int band = _getBand(iEventSource, iControlHandle, aFrequency);
-
-        return band;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-    */
-    public int setBass(int aLevel) throws IllegalArgumentException
-    {
-        checkValid();
-
-        if (aLevel < MIN_LEVEL || aLevel > MAX_LEVEL)
-        {
-            throw new IllegalArgumentException("Bass level out of range");
-        }
-
-        int err = _setBass(iEventSource, iControlHandle, aLevel);
-        NativeError.check(err);
-
-        return err;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setTreble(int aLevel) throws IllegalArgumentException
-    {
-        checkValid();
-
-        if (aLevel < MIN_LEVEL || aLevel > MAX_LEVEL)
-        {
-            throw new IllegalArgumentException("Treble level out of range");
-        }
-
-        int err = _setTreble(iEventSource, iControlHandle, aLevel);
-        NativeError.check(err);
-        return err;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getBass()
-    {
-        checkValid();
-
-        return _getBass(iEventSource, iControlHandle);
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getTreble()
-    {
-        checkValid();
-
-        return _getTreble(iEventSource, iControlHandle);
-    }
-
-    private static native int _getMinBandLevel(
-        int iEventSource,
-        int iControlHandle);
-    private static native int _getMaxBandLevel(
-        int iEventSource,
-        int iControlHandle);
-    private static native int _setBandLevel(
-        int iEventSource,
-        int iControlHandle,
-        int level,
-        int band);
-    private static native int _getBandLevel(
-        int iEventSource,
-        int iControlHandle,
-        int band,
-        int[] level);
-    private static native int _getCenterFreq(
-        int iEventSource,
-        int iControlHandle,
-        int band);
-    private static native int _getBand(
-        int iEventSource,
-        int iControlHandle,
-        int frequency);
-    private static native int _setBass(
-        int iEventSource,
-        int iControlHandle,
-        int level);
-    private static native int _setTreble(
-        int iEventSource,
-        int iControlHandle,
-        int level);
-    private static native int _getBass(
-        int iEventSource,
-        int iControlHandle);
-    private static native int _getTreble(
-        int iEventSource,
-        int iControlHandle);
-    private static native int _getNumberOfBands(
-        int iEventSource,
-        int iControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/ReverbControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audioeffect;
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.NativeError;
-
-public class ReverbControl
-        extends com.nokia.amms.control.EffectControl
-        implements javax.microedition.amms.control.audioeffect.ReverbControl
-{
-    private static final int MAX_REVERB_LEVEL = 0;
-    private static final int MIN_REVERB_TIME = 0;
-
-    /**
-     * Constructor
-     */
-    public ReverbControl()
-    {
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setReverbLevel(int aLevel) throws IllegalArgumentException
-    {
-        checkValid();
-
-        if (aLevel > MAX_REVERB_LEVEL)
-        {
-            throw new IllegalArgumentException("Reverb level cannot be greater than zero.");
-        }
-
-        int err[] = new int[ 1 ];
-        int setLevel = _setReverbLevel(iEventSource,
-                                       iControlHandle,
-                                       aLevel,
-                                       err);
-        NativeError.check(err[ 0 ]);
-
-        return setLevel;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getReverbLevel()
-    {
-        checkValid();
-
-        int level = _getReverbLevel(iEventSource, iControlHandle);
-
-        return level;
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setReverbTime(int aTime)
-    throws IllegalArgumentException, MediaException
-    {
-        checkValid();
-
-        if (aTime < MIN_REVERB_TIME)
-        {
-            throw new IllegalArgumentException("Reverb time cannot be less than zero");
-        }
-
-        int err = _setReverbTime(iEventSource, iControlHandle, aTime);
-        if (err < NO_ERROR)
-        {
-            if (err == NOT_READY)
-            {
-                NativeError.check(err);
-            }
-            else
-            {
-                throw new MediaException(
-                    "Setting reverb time failed: Symbian OS error " + err);
-            }
-        }
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getReverbTime() throws javax.microedition.media.MediaException
-    {
-        checkValid();
-
-        int time = _getReverbTime(iEventSource, iControlHandle);
-
-        if (time == NOT_SUPPORTED)
-        {
-            throw new MediaException(
-                "Obtaining reverb time failed: Symbian OS error " + time);
-        }
-
-        return time;
-    }
-
-    // native methods
-    private static native int _setReverbLevel(
-        int aEventSource,
-        int aControlHandle,
-        int aLevel,
-        int aError[]);
-    private static native int _getReverbLevel(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _setReverbTime(
-        int aEventSource,
-        int aControlHandle,
-        int aTime);
-    private static native int _getReverbTime(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/amms/control/audioeffect/ReverbSourceControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.amms.control.audioeffect;
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.NativeError;
-
-public class ReverbSourceControl
-        extends com.nokia.amms.control.ControlImpl
-        implements javax.microedition.amms.control.audioeffect.ReverbSourceControl
-{
-
-    /**
-     * Constructor
-     */
-    public ReverbSourceControl()
-    {
-    }
-
-    /**
-      * Please refer to JSR 234 for more details.
-      */
-    public void setRoomLevel(int aLevel)
-    throws IllegalArgumentException, MediaException
-    {
-        checkValid();
-
-        if ((aLevel > 0) &&
-                (aLevel != DISCONNECT))
-        {
-            throw new IllegalArgumentException("Room level must be less than zero");
-        }
-
-        int level = aLevel;
-        int err = _setRoomLevel(iEventSource, iControlHandle, level);
-
-        if (err < NO_ERROR)
-        {
-            if (err == NOT_READY)
-            {
-                NativeError.check(err);
-            }
-            else
-            {
-                throw new MediaException(
-                    "Room level cannot be set: Symbian OS error " + err);
-            }
-        }
-    }
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getRoomLevel()
-    {
-        checkValid();
-
-        return _getRoomLevel(iEventSource, iControlHandle);
-    }
-
-    // native methods
-    private static native int _setRoomLevel(
-        int aEventSource,
-        int aControlHandle,
-        int aLevel);
-
-    private static native int _getRoomLevel(
-        int aEventSource,
-        int aControlHandle);
-}
--- a/javauis/amms_qt/javasrc/com/nokia/mid/impl/media/AudioOutput.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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: Control for routing the player's audio output.
-*
-*/
-package com.nokia.mid.impl.media;
-//AudioOutput Class which has info regarding the Output mode and device type
-public class AudioOutput implements com.nokia.mid.media.AudioOutput
-{
-    //Constructor
-    public AudioOutput(int mode)
-    {
-        outputmode = mode;
-    }
-    //public
-    public int getActiveOutputMode()
-    {
-        return outputmode;
-    }
-    public int[] getOutputDevices()
-    {        
-        return null;
-    }
-    //package access
-    void setOutputMode(int mode)
-    {
-        outputmode = mode;
-    }
-
-    //private
-    private int outputmode;
-    
-
-}
-
-
-
-
--- a/javauis/amms_qt/javasrc/com/nokia/mid/impl/media/AudioOutputControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +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: Control for routing the player's audio output.
-*
-*/
-package com.nokia.mid.impl.media;
-
-import com.nokia.microedition.media.NativeError;
-import javax.microedition.media.Player;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.util.*;
-import com.nokia.mid.impl.media.AudioOutput;
-
-/**
- * Control for adjusting player's Audio output routing. Note : This doesn't have any interface defined in javax.microediton.amms.control package
- * as its internal to nokia
- */
-public class AudioOutputControl
-        extends com.nokia.amms.control.ControlImpl
-        implements com.nokia.mid.media.AudioOutputControl
-{
-    // The player owning this control.
-    private Player iPlayer;
-    private AudioOutput audioOutputObj;
-    /**
-     * Constructor
-     */
-    public AudioOutputControl(Player aPlayer)
-    {
-        iPlayer = aPlayer;
-    }
-
-    public void SetAudioOutputToNative()
-    {
-        // Create an AudioOutput object and pass it to native
-        audioOutputObj = new AudioOutput(AudioOutputControl.DEFAULT);
-        setAudioOutputObject(audioOutputObj);
-    }
-    /**
-     * Sets the new mode.
-     * Throws IllegalArgumentException if the argument is invalid
-     * @param mode The new Output mode to be set.
-     */
-    public int setOutputMode(int mode)
-    {
-        checkValid();
-        int value = _setOutputMode(iEventSource, iControlHandle, mode);
-        NativeError.check(value);
-        return value;
-    }
-
-    /**
-     * Gets the previous set mode by user.
-     *
-     * @return The last set user mode .
-     */
-    public int getOutputMode()
-    {
-        checkValid();
-        int value = _getOutputMode(iEventSource, iControlHandle);
-        return value;
-    }
-
-    /**
-    * Gets the actual routing at that time.
-    * @return The current preference.
-    */
-
-    public com.nokia.mid.media.AudioOutput getCurrent()
-    {
-        checkValid();
-        int value = _getCurrent(iEventSource, iControlHandle);
-        NativeError.check(value);
-        return audioOutputObj;
-    }
-
-    /**
-     * @return all the available output modes.
-     */
-    public int[] getAvailableOutputModes()
-    {
-        checkValid();
-        int[] availableOutputModes = { DEFAULT, ALL, NONE, PRIVATE, PUBLIC };
-        return availableOutputModes;
-    }
-
-
-    public void checkValid()
-    {
-        super.checkValid();
-
-        if (iPlayer.getState() == Player.CLOSED)
-        {
-            throw new IllegalStateException("Closed player");
-        }
-    }
-    /**
-    * pass the AudioOutput object to native
-    */
-    public void setAudioOutputObject(AudioOutput obj)
-    {
-        checkValid();
-        int value = _setAudioOutputObject(iEventSource, iControlHandle, obj);
-        NativeError.check(value);
-    }
-
-
-    // native methods
-    private static native int _setOutputMode(
-        int aEventSource,
-        int aControlHandle,
-        int aMode);
-    private static native int _getOutputMode(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _getCurrent(
-        int aEventSource,
-        int aControlHandle);
-    private static native int _setAudioOutputObject(
-        int aEventSource, int aControlHandle,
-        AudioOutput audioOutputObj);
-
-}
--- a/javauis/amms_qt/javasrc/com/nokia/mid/media/AudioOutput.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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: Control for routing the player's audio output.
-*
-*/
-
-package com.nokia.mid.media;
-
-/**
- * <code>AudioOutput</code> 
- * Encapsulates current audio output mode and output device(s) used. 
- * <p>
- * <p>
- * @since 1.4
- * <p> 
- */
-public interface AudioOutput
-{
-   /**
-    * Get active output mode.
-    * <p>
-    * The different modes are defined in AudioOutputControl class.
-    *
-    * @return The current audio output mode or -1 if unable to determine
-    *
-    * @exception SecurityException with message "Permission denied" if the
-    * called does not have permission to set the audio routing.
-    */
-    public int getActiveOutputMode();
-    
-    /**
-     * Get supported output devices
-     * <p>
-     *  returns array of audio output device types if it is supported
-     * otherwise returns "null" 
-    */
-    public int[] getOutputDevices();
-}
--- a/javauis/amms_qt/javasrc/com/nokia/mid/media/AudioOutputControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +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: Control for routing the player's audio output.
-*
-*/
-
-package com.nokia.mid.media;
-
-/**
- * <code>AudioOutputControl</code> is an interface for setting application 
- * preferred audio output mode.
- * <p>
- * <strong><u>SYMBIAN SPECIFIC BEHAVIOR:</u></strong> <BR><BR>
- * Audio output mode is within the scope of a player instance and can be set
- * when the MIDlet which set the audio routing is finished with the audio
- * when the player is in REALIZED, PREFETCHED, STARTED or STOPPED state. 
- * The preferences are applied or imposed when media is played. <BR><BR>
- * Audio output control is retrieved using 'Player' interface by calling 
- * <code>Control getControl ( java.lang.string controlType ) </code> 
- * The control type to be passed as an argument is 
- * <code>com.nokia.mid.media.AudioOutputControl</code>
- * <p>
- * <strong><u>S40 SPECIFIC BEHAVIOR:</u></strong> <BR><BR>
- * The AudioOutputControl is a Global Control and will effect all players.
- * When the MIDlet which set the audio routing is finished with the audio
- * change then it must set it back to DEFAULT.
- * <p>
- * Audio output control is retrieved using 'GlobalManager' interface by calling 
- * <code>Control getControl ( java.lang.string controlType ) </code> 
- * The control type to be passed as an argument is 
- * <code>com.nokia.mid.media.AudioOutputControl</code>
- * <p>
- * <strong><u>Code Snippet:</u></strong><BR> 
- * <BR>
- * <strong><u>1. Getting AudioOutputControl:</u></strong><BR><BR>
- * <strong><u>In SYMBIAN:</u></strong> <BR><BR>
- * <code>Player p =  
- *         Manager.createPlayer(getClass().getResourceAsStream
- *         ("nokia_tune.mid"), "audio/midi"); <BR>
- * p.realize(); <BR> 
- * AudioOutputControl iAudioOutputControl=  
- * (AudioOutputControl)p.getControl("com.nokia.mid.media.AudioOutputControl");<BR>
- * p.addPlayerListener(this); </code> <BR> <BR>
- * <strong><u>In S40:</u></strong> <BR><BR>
- * <code>import javax.microedition.amms.*; <BR> 
- * iAudioOutputControl = (AudioOutputControl) GlobalManager.getControl("com.nokia.mid.media.AudioOutputControl"); <BR>
- * </code> <BR> <BR>
- * <strong><u>2. Setting and getting Audio Output Mode:</u></strong> <BR><BR>
- * <strong><u>2.1 Setting PRIVATE mode:</u></strong> <BR><BR>
- * <code>iAudioOutputControl.setOutputMode(PRIVATE);</code><BR> <BR>
- * <strong><u>2.2 Getting Current Mode:</u></strong> <BR><BR> 
- * <code>AudioOutput audioOutput = iAudioOutputControl.getCurrent();</code><BR>
- * <code>int mode = audioOutput.getOutputMode();</code> <BR><BR>
- * <strong><u>3. Getting notification:</u></strong> <BR><BR>
- * Notifications are supported only on SYMBIAN. <BR>
- * The notification about the preference change is done using 
- * PlayerListener's playerUpdate() function. 
- * Whereas, this specific Event type is "com.nokia.audiooutputchange.event" 
- * and Event data is AudioOutput object. <BR><BR>
- * <code> 
- * public void playerUpdate(Player aPlayer, String aEvent, Object aEventData){<BR>
- * <DD>if(aEvent.equals("com.nokia.audiooutputchange.event")){ </DD>
- *     <DD><DD>helloForm.append("com.nokia.audiooutputchange.event"); </DD></DD>
- *     <DD><DD>// get the mode </DD></DD>
- *     <DD><DD>Int mode = ((AudioOutput)aEventData).getActiveOutputMode();</DD></DD>
- *   <DD>}</DD><BR>
- * } </code> <BR>
- * <p>
- * <p>
- * @since 1.4
- * <p>   
- */
-
-
-public interface AudioOutputControl extends javax.microedition.media.Control
-{
-   /** 
-    * The DEFAULT audio output mode.   
-    * <p>
-    * No Preference. The audio routing is restored to the default value.
-    * <p>
-    * Value 0 is assigned to <code>DEFAULT</code>.
-    * <p>
-	* <strong><u>SYMBIAN SPECIFIC BEHAVIOR:</u></strong> <BR>
-	* Audio is by default routed to loudspeaker. 
-    * Audio output changes dynamically to headset, when headset is connected to 
-    * the device and vice versa. Application is notified about audio output 
-    * change with audio output change event.     
-    * <p> 
-   */
-    public static final int DEFAULT = 0;    
-    
-   /** 
-    * The ALL audio output mode.   
-    * <p>
-    * Audio is routed to one public and one private output at the same time. 
-    * The primary output method within public and private outputs is selected 
-    * by the device and can change dynamically when external peripherals are 
-    * connected or disconnected by the user (see "public" and "private" for  
-    * their priorities). 
-    * <p>
-    * Value 1 is assigned to <code>ALL</code>.
-   */    
-    public static final int ALL = 1;
-    
-   /** 
-    * The NONE audio output mode.   
-    * <p>
-    * Audio is not routed to any output. 
-    * <p>
-    * Value 2 is assigned to <code>NONE</code>.
-   */     
-    public static final int NONE = 2;
-    
-   /** 
-    * The PRIVATE audio output mode.   
-    * <p>
-    * Audio is routed to earpiece or wired / wireless(BT) headset if connected.
-    * If there are several private output methods available at the same time 
-    * audio is routed to only one of those selected with following priority 
-     * order 1) wired headset 2) wireless headset 3) earpiece.
-    * <p>
-    * Value 3 is assigned to <code>PRIVATE</code>.
-   */     
-    public static final int PRIVATE = 3;
-  
-    /** 
-     * The PUBLIC audio output mode.
-     * <p>
-     * Audio is routed to loudspeaker, wireless(BT) speakers or TV output. If
-     * there are several public output methods available at the same time
-     * audio is routed to only one of those selected with following priority
-     * order: (1) wired headset 2) Loudspeaker
-     * <p>
-     * Value 4 is assigned to <code>PUBLIC</code>.
-     */    
-    public static final int PUBLIC = 4;    
-
-    /**
-     * Get all supported audio output modes
-     * <p>
-     * @return The currently supported output modes
-     * <p>
-     */
-    int[] getAvailableOutputModes();
-
-    /**
-     * Get the currently set audio output mode. This is the last audioOutputMode
-     * sent to setOutputMode or DEFAULT if none has been set.
-     * <p>
-     * This does not return the actual audio output mode of the device. The
-     * AudioOutput can be used to provide the actual audio output mode.
-     *
-     * @return The last audio output mode which was sent to setOutputMode.
-     */
-    int getOutputMode();
-
-    /**
-     * returns an AudioOutput object which consists
-     * Device Type and the mode of the audio output
-     */
-    com.nokia.mid.media.AudioOutput getCurrent();
-	
-    /**
-     * Sets the preferred audio output mode.
-     * <p>
-	 * 
-	 * @return audio output mode set or -1 if unable to set
-	 * 
-     * @exception IllegalArgumentException with message "audio output mode is
-     * not valid" when the audio output mode is not valid
-     *
-     * @exception IllegalStateException with message "Accessory connected" if
-     * unable to change the audio routing due to an accessory connected
-     *
-     * @exception SecurityException with message "Permission denied" if the
-     * called does not have permission to set the audio routing.	 
-     * <p>
-	 * <strong><u>SYMBIAN SPECIFIC BEHAVIOR:</u></strong> <BR>
-	 * This effects only a specific player instance. 
-     * Preference can be set when Player is in REALIZED, PREFETCHED, 
-     * STARTED or STOPPED state.
-     * <p>
-     * <strong><u>S40 SPECIFIC BEHAVIOR:</u></strong> <BR>
-	 * This will effect all players	 
-     */      
-    int setOutputMode(int mode);
-
-}
-
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/EffectModule.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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:
-*
-*/
-package javax.microedition.amms;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface EffectModule extends Module
-{
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/GlobalManager.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +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:
-*
-*/
-package javax.microedition.amms;
-
-import javax.microedition.amms.control.audio3d.LocationControl;
-import javax.microedition.amms.control.FormatControl;
-import javax.microedition.media.*;
-
-// Implementation
-import com.nokia.amms.GlobalManagerImpl;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public class GlobalManager
-{
-    /**
-     * Static spectator instance. Returned from getSpectator method.
-     */
-    private static Spectator iSpectator;
-
-    /**
-     * Implementation. All method calls in this class will be delegated
-     * GlobalManagerImpl.
-     */
-    private static GlobalManagerImpl iManagerImpl;
-
-    static
-    {
-        // Get static instance.
-        iManagerImpl = GlobalManagerImpl.getInstance();
-
-        // Spectator delegates all method calls to spectator got from
-        // GlobalManagerImpl
-        iSpectator = new Spectator(iManagerImpl.getSpectator());
-    }
-
-    /**
-     * Private not allow construction
-     */
-    private GlobalManager()
-    {
-    }
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static Control[] getControls()
-    {
-        return iManagerImpl.getControls();
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static Control getControl(String aControlType)
-    {
-        return iManagerImpl.getControl(aControlType);
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static EffectModule createEffectModule() throws MediaException
-    {
-        return iManagerImpl.createEffectModule();
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static SoundSource3D createSoundSource3D() throws MediaException
-    {
-        return iManagerImpl.createSoundSource3D();
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static String[] getSupportedSoundSource3DPlayerTypes()
-    {
-        return iManagerImpl.getSupportedSoundSource3DPlayerTypes();
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static Spectator getSpectator() throws MediaException
-    {
-        return iSpectator;
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static MediaProcessor createMediaProcessor(String aContentType)
-    throws MediaException
-    {
-        return iManagerImpl.createMediaProcessor(aContentType);
-    }
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static String[] getSupportedMediaProcessorInputTypes()
-    {
-        return iManagerImpl.getSupportedMediaProcessorInputTypes();
-    }
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/MediaProcessor.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +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:
-*
-*/
-package javax.microedition.amms;
-
-import javax.microedition.media.*;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface MediaProcessor extends Controllable
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final int UNKNOWN = -1;
-
-    /**
-     * Please refer JSR 234 for more details.
-     *
-     */
-    public final int UNREALIZED = 100;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final int REALIZED = 200;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final int STARTED = 400;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final int STOPPED = 300;
-
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     *
-     */
-    public void setInput(InputStream input, int length) throws javax.microedition.media.MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     *
-     */
-    public void setInput(Object image) throws javax.microedition.media.MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void setOutput(OutputStream output);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void start() throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void stop() throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void complete() throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void abort();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void addMediaProcessorListener(MediaProcessorListener mediaProcessorListener);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void removeMediaProcessorListener(MediaProcessorListener mediaProcessorListener);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public int getProgress();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public int getState();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/MediaProcessorListener.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-package javax.microedition.amms;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface MediaProcessorListener
-{
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSOR_REALIZED = "processRealized";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSING_STARTED = "processingStarted";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSING_STOPPED = "processingStopped";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSING_ABORTED = "processingAborted";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSING_COMPLETED = "processingCompleted";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final String PROCESSING_ERROR = "processingError";
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void mediaProcessorUpdate(MediaProcessor processor, String event, Object eventData);
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/Module.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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:
-*
-*/
-package javax.microedition.amms;
-
-import javax.microedition.media.*;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface Module extends Controllable
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void addMIDIChannel(Player player, int channel)
-    throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void removeMIDIChannel(Player player, int channel);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void addPlayer(Player player) throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void removePlayer(Player player);
-
-};
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/SoundSource3D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +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:
-*
-*/
-package javax.microedition.amms;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface SoundSource3D extends Module
-{
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/Spectator.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +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:
-*
-*/
-package javax.microedition.amms;
-
-import javax.microedition.media.Controllable;
-import javax.microedition.media.Control;
-import javax.microedition.amms.control.audio3d.LocationControl;
-
-
-/**
- * Please refer JSR 234 for more details.
- *
- */
-public class Spectator implements Controllable
-{
-    /**
-     * All method calls are delegated to this Controllable object
-     */
-    private Controllable iControllable;
-
-    /**
-     * Package private constructor. Can be used only from GlobalManager.
-     * @param aControllable Used to delegate all operations.
-     */
-    Spectator(Controllable aControllable)
-    {
-        iControllable = aControllable;
-    }
-
-    /**
-     * From JSR. This is never called. Added to state that constructor
-     * is private.
-     */
-    private Spectator()
-    {
-    }
-
-    /**
-     * From JSR
-     */
-    public Control getControl(java.lang.String aControlType)
-    {
-        return iControllable.getControl(aControlType);
-    }
-
-    /**
-     * From JSR
-     */
-    public Control[] getControls()
-    {
-        return iControllable.getControls();
-    }
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/AudioFormatControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface AudioFormatControl extends FormatControl
-{
-
-
-
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/ContainerFormatControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface ContainerFormatControl extends FormatControl
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     *
-     */
-    void setFormat(String format);
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/EffectControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.*;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface EffectControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final int SCOPE_LIVE_ONLY = 1;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final int SCOPE_RECORD_ONLY = 2;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public static final int SCOPE_LIVE_AND_RECORD = 3;
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void setEnabled(boolean enable);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public boolean isEnabled();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void setScope(int scope) throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public int getScope();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void setEnforced(boolean enforced);
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public boolean isEnforced();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    void setPreset(String preset);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public String getPreset();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public String[] getPresetNames();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/EffectOrderControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface EffectOrderControl extends Control
-{
-
-    /**
-     Please refer JSR 234 for more details.
-     */
-    public int setEffectOrder(EffectControl effect, int order);
-
-    /**
-     Please refer JSR 234 for more details.
-     */
-    public int getEffectOrder(EffectControl effect);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public EffectControl[] getEffectOrders();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/FormatControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.*;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface FormatControl extends Control
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static int METADATA_NOT_SUPPORTED = 0;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static int METADATA_SUPPORTED_FIXED_KEYS = 1;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static int METADATA_SUPPORTED_FREE_KEYS = 2;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_BITRATE = "bitrate";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_BITRATE_TYPE = "bitrate type";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_SAMPLERATE = "sample rate";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_FRAMERATE = "frame rate";
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_QUALITY = "quality";
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public final static String PARAM_VERSION_TYPE = "version type";
-
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String[] getSupportedFormats();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String[] getSupportedStrParameters();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String[] getSupportedIntParameters();
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String[] getSupportedStrParameterValues(String parameter);
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int[] getSupportedIntParameterRange(String parameter);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    void setFormat(String format);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String getFormat();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int setParameter(String parameter, int value);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    void setParameter(String parameter, String value);
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String getStrParameterValue(String parameter);
-
-    /**
-     *Please refer JSR 234 for more details.
-     */
-    int getIntParameterValue(String parameter);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int getEstimatedBitRate() throws MediaException;
-
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    void setMetadata(String key, String value) throws MediaException;
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    String[] getSupportedMetadataKeys();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int getMetadataSupportMode();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    void setMetadataOverride(boolean override);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    boolean getMetadataOverride();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/ImageFormatControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface ImageFormatControl extends FormatControl
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int getEstimatedImageSize();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/MIDIChannelControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-
-/**
- * Please refer JSR 234 for more details.
- */
-
-public interface MIDIChannelControl
-            extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    Control getChannelControl(java.lang.String controlType, int channel);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    Control[] getChannelControls(int channel);
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/PanControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-/**
- * Please refer JSR 234 for more details.
- */
-
-public interface PanControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int setPan(int pan);
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    int getPan();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/PriorityControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-/**
-Please refer JSR 234 for more details.
-*/
-public interface PriorityControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public int getPriority();
-
-    /**
-     * Please refer JSR 234 for more details.
-     */
-    public void setPriority(int level);
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/VideoFormatControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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:
-*
-*/
-package javax.microedition.amms.control;
-
-import javax.microedition.media.MediaException;
-
-/**
- * Please refer JSR 234 for more details.
- */
-public interface VideoFormatControl extends FormatControl
-{
-
-
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/CommitControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.media.*;
-import javax.microedition.amms.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface CommitControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setDeferred(boolean deferred);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isDeferred();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void commit();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DirectivityControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-
-public interface DirectivityControl extends OrientationControl
-{
-
-    /**
-    Please refer to JSR 234 for more details.
-     */
-    public void setParameters(int minAngle,
-                              int maxAngle,
-                              int rearLevel);
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getParameters();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DistanceAttenuationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.media.*;
-import javax.microedition.amms.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface DistanceAttenuationControl
-            extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setParameters(int minDistance,
-                              int maxDistance,
-                              boolean muteAfterMax,
-                              int rolloffFactor);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinDistance();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxDistance();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean getMuteAfterMax();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getRolloffFactor();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/DopplerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.media.*;
-import javax.microedition.media.control.PitchControl;
-import javax.microedition.amms.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface DopplerControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setEnabled(boolean dopplerEnabled);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isEnabled();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setVelocityCartesian(int x, int y, int z);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getVelocityCartesian();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setVelocitySpherical(int azimuth, int elevation, int radius);
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/LocationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.media.*;
-
-/**
- * 
- Please refer to JSR 234 for more details.
- */
-
-public interface LocationControl extends javax.microedition.media.Control
-{
-
-    /**
-     Please refer to JSR 234 for more details.
-     */
-    public void setCartesian(int x, int y, int z);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setSpherical(int azimuth, int elevation, int radius);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getCartesian();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/MacroscopicControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.amms.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-
-public interface MacroscopicControl extends OrientationControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setSize(int x, int y, int z);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int[] getSize();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/ObstructionControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "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 javax.microedition.amms.control.audio3d;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ObstructionControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setLevel(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getLevel();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setHFLevel(int HFLevel);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getHFLevel();
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audio3d/OrientationControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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:
-*
-*/
-package javax.microedition.amms.control.audio3d;
-
-import javax.microedition.media.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-
-public interface OrientationControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setOrientation(int heading, int pitch, int roll);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setOrientation(int[] frontVector, int[] aboveVector)
-    throws IllegalArgumentException;
-
-    /**
-      * Please refer to JSR 234 for more details.
-      */
-    public int[] getOrientationVectors();
-
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/AudioVirtualizerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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:
-*
-*/
-package javax.microedition.amms.control.audioeffect;
-
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface AudioVirtualizerControl extends EffectControl
-{
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ChorusControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +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:
-*
-*/
-package javax.microedition.amms.control.audioeffect;
-
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ChorusControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setWetLevel(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     *
-     */
-    public int getWetLevel();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setModulationRate(int rate);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getModulationRate();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMinModulationRate();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMaxModulationRate();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setModulationDepth(int percentage);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getModulationDepth();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMaxModulationDepth();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setAverageDelay(int delay);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getAverageDelay();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMaxAverageDelay();
-
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/EqualizerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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:
-*
-*/
-package javax.microedition.amms.control.audioeffect;
-
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-
-public interface EqualizerControl
-            extends EffectControl
-{
-
-    public final int UNDEFINED = -1004;
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMinBandLevel();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMaxBandLevel();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setBandLevel(int level, int band) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getBandLevel(int band) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getNumberOfBands();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getCenterFreq(int band) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getBand(int frequency);
-
-    /**
-     * Please refer to JSR 234 for more details.
-    */
-    int setBass(int level) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setTreble(int level) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getBass();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getTreble();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ReverbControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +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:
-*
-*/
-package javax.microedition.amms.control.audioeffect;
-
-import javax.microedition.media.*;
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ReverbControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setReverbLevel(int level) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getReverbLevel();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setReverbTime(int time) throws IllegalArgumentException,
-                javax.microedition.media.MediaException;
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getReverbTime() throws
-                javax.microedition.media.MediaException;
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/audioeffect/ReverbSourceControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:
-*
-*/
-package javax.microedition.amms.control.audioeffect;
-
-import javax.microedition.media.*;
-import javax.microedition.media.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ReverbSourceControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final int DISCONNECT = Integer.MAX_VALUE;
-
-
-    /**
-      * Please refer to JSR 234 for more details.
-      */
-    public void setRoomLevel(int level)
-    throws MediaException;
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getRoomLevel();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/CameraControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface CameraControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int ROTATE_LEFT = 2;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int ROTATE_RIGHT = 3;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int ROTATE_NONE = 1;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int UNKNOWN = -1004;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getCameraRotation();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void enableShutterFeedback(boolean enable) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isShutterFeedbackEnabled();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String[] getSupportedExposureModes();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setExposureMode(String mode);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getExposureMode();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedVideoResolutions();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedStillResolutions();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setVideoResolution(int index);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setStillResolution(int index);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getVideoResolution();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getStillResolution();
-}
-
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/ExposureControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- *
-
- *
- * @see CameraControl#setExposureMode
- */
-public interface ExposureControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedFStops();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getFStop();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setFStop(int aperture) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinExposureTime();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxExposureTime();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getExposureTime();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setExposureTime(int time) throws MediaException;
-
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedISOs();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getISO();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setISO(int iso) throws MediaException;
-
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedExposureCompensations();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getExposureCompensation();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setExposureCompensation(int ec) throws MediaException;
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getExposureValue();
-
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String[] getSupportedLightMeterings();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setLightMetering(String metering);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getLightMetering();
-
-
-}
-
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/FlashControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface FlashControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int OFF = 1;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO = 2;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO_WITH_REDEYEREDUCE = 3;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int FORCE = 4;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int FORCE_WITH_REDEYEREDUCE = 5;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int FILLIN = 6;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int[] getSupportedModes();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setMode(int mode);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMode();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isFlashReady();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/FocusControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface FocusControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO = -1000;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO_LOCK = -1005;
-
-    /**
-      * Please refer to JSR 234 for more details.
-      */
-    public final static int NEXT = -1001;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int PREVIOUS = -1002;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int UNKNOWN = -1004;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setFocus(int distance) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getFocus();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinFocus();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getFocusSteps();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isManualFocusSupported();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isAutoFocusSupported();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean isMacroSupported();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setMacro(boolean enable) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean getMacro();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/SnapshotControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface SnapshotControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String SHOOTING_STOPPED = "SHOOTING_STOPPED";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String STORAGE_ERROR = "STORAGE_ERROR";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String WAITING_UNFREEZE = "WAITING_UNFREEZE";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int FREEZE = -2;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int FREEZE_AND_CONFIRM = -1;
-
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setDirectory(String directory);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getDirectory();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setFilePrefix(String prefix);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getFilePrefix();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setFileSuffix(String suffix);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getFileSuffix();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void start(int maxShots) throws SecurityException;
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void stop();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void unfreeze(boolean save);
-
-}
-
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/camera/ZoomControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +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:
-*
-*/
-package javax.microedition.amms.control.camera;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ZoomControl extends Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int NEXT = -1001;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int PREVIOUS = -1002;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int UNKNOWN = -1004;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setOpticalZoom(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getOpticalZoom();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxOpticalZoom();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getOpticalZoomLevels();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinFocalLength();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setDigitalZoom(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getDigitalZoom();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxDigitalZoom();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getDigitalZoomLevels();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageEffectControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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:
-*
-*/
-package javax.microedition.amms.control.imageeffect;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.lcdui.Image;
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ImageEffectControl extends EffectControl
-{
-
-}
-
-
-
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageTonalityControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +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:
-*
-*/
-package javax.microedition.amms.control.imageeffect;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.amms.control.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface ImageTonalityControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO = -1000;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int NEXT = -1001;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int PREVIOUS = -1002;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setBrightness(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getBrightness();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getBrightnessLevels();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setContrast(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getContrast();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getContrastLevels();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setGamma(int level);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getGamma();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getGammaLevels();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/ImageTransformControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +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:
-*
-*/
-package javax.microedition.amms.control.imageeffect;
-
-import javax.microedition.media.Control;
-import javax.microedition.amms.control.*;
-
-/**
- * 
- * Please refer to JSR 234 for more details.
- */
-public interface ImageTransformControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getSourceWidth();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getSourceHeight();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setSourceRect(int x, int y, int width, int height);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setTargetSize(int width, int height, int rotation);
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/OverlayControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +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:
-*
-*/
-package javax.microedition.amms.control.imageeffect;
-
-import javax.microedition.lcdui.Image;
-import javax.microedition.amms.control.*;
-import javax.microedition.media.*;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface OverlayControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int insertImage(Object image, int x, int y, int order) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int insertImage(Object image, int x, int y, int order, int transparentColor) throws IllegalArgumentException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void removeImage(Object image);
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    Object getImage(int order);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int numberOfImages();
-
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     *
-     */
-    void clear();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/imageeffect/WhiteBalanceControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +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:
-*
-*/
-package javax.microedition.amms.control.imageeffect;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-import javax.microedition.amms.control.EffectControl;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-public interface WhiteBalanceControl extends EffectControl
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int AUTO = -1000;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int NEXT = -1001;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int PREVIOUS = -1002;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public final static int UNKNOWN = -1004;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int setColorTemp(int temp);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getColorTemp();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMinColorTemp();
-
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int getMaxColorTemp();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getNumberOfSteps();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/tuner/RDSControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +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:
-*
-*/
-package javax.microedition.amms.control.tuner;
-
-import javax.microedition.media.*;
-
-import java.util.Date;
-
-/**
- * Please refer to JSR 234 for more details.
- */
-
-public interface RDSControl extends javax.microedition.media.Control
-{
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String RDS_NEW_DATA = "RDS_NEW_DATA";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String RDS_NEW_ALARM = "RDS_ALARM";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String RADIO_CHANGED = "radio_changed";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    boolean isRDSSignal();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getPS();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getRT();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    short getPTY();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String getPTYString(boolean longer);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    short getPI();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int[] getFreqsByPTY(short PTY);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    int[][] getFreqsByTA(boolean TA);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String[] getPSByPTY(short PTY);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    String[] getPSByTA(boolean TA);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    Date getCT();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    boolean getTA();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    boolean getTP();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setAutomaticSwitching(boolean automatic)
-    throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    boolean getAutomaticSwitching();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    void setAutomaticTA(boolean automatic) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    boolean getAutomaticTA();
-
-}
--- a/javauis/amms_qt/javasrc/javax/microedition/amms/control/tuner/TunerControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +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:
-*
-*/
-package javax.microedition.amms.control.tuner;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-
-/**
- * 
- * Please refer to JSR 234 for more details.
- */
-
-public interface TunerControl extends Control
-{
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public static final int MONO = 1;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public static final int STEREO = 2;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public static final int AUTO = 3;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public static final String MODULATION_FM = "fm";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public static final String MODULATION_AM = "am";
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMinFreq(String modulation);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getMaxFreq(String modulation);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int setFrequency(int freq, String modulation);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getFrequency();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int seek(int startFreq, String modulation, boolean upwards) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public boolean getSquelch();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setSquelch(boolean squelch) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getModulation();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getSignalStrength() throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getStereoMode();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setStereoMode(int mode);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getNumberOfPresets();
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void usePreset(int preset);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setPreset(int preset);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setPreset(int preset, int freq, String mod, int stereoMode);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getPresetFrequency(int preset);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getPresetModulation(int preset);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public int getPresetStereoMode(int preset) throws MediaException;
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public String getPresetName(int preset);
-
-    /**
-     * Please refer to JSR 234 for more details.
-     */
-    public void setPresetName(int preset, String name);
-}
--- a/javauis/amms_qt/jni/src/ammsplugin.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Creates CAMMSPriorityControl and adds it to the player.
-*
-*/
-
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include "com_nokia_amms_AMMSPlugin.h"
-#include <mmafunctionserver.h>
-#include <cmmaplayer.h>
-#include "cammsprioritycontrol.h"
-#include "cammsaudiooutputcontrol.h"
-
-/**
- * Creates CAMMSPriorityControl and adds it to the player.
- * Returns the created control through the given parameter.
- */
-static void CreatePriorityControlL(CMMAPlayer* aPlayer,
-                                   CAMMSPriorityControl** aControl)
-{
-    LOG( EJavaAMMS, EInfo, "CreatePriorityControlL +");
-
-    CAMMSPriorityControl* control = CAMMSPriorityControl::NewLC(aPlayer);
-
-    aPlayer->AddControlL(control);
-
-    CleanupStack::Pop(control);
-
-    *aControl = control;
-
-    LOG( EJavaAMMS, EInfo, "CreatePriorityControlL -");
-}
-
-/**
-* Creates CAMMSAudioOutputControl and adds it to the player.
-* Returns the created control through the given parameter.
-*/
-static void CreateAudioOutputControlL(CMMAPlayer* aPlayer,
-                                      CAMMSAudioOutputControl** aControl)
-{
-    LOG( EJavaAMMS, EInfo, "CreatePriorityControlL +");
-
-    CAMMSAudioOutputControl* control = CAMMSAudioOutputControl::NewLC(aPlayer);
-
-    aPlayer->AddControlL(control);
-
-    CleanupStack::Pop(control);
-
-    *aControl = control;
-
-    LOG( EJavaAMMS, EInfo, "CAMMSAudioOutputControl -");
-}
-/*
- * Class:     com_nokia_amms_AMMSPlugin
- * Method:    _createNativePriorityControl
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_AMMSPlugin__1createNativePriorityControl(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS: Java_com_nokia_amms_AMMSPlugin__1createNativePriorityControl + ");
-
-    MMAFunctionServer* eventSource =
-    	reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAPlayer* player = reinterpret_cast< CMMAPlayer* >(aPlayer);
-
-
-    // Create control and add it to the player.
-    CAMMSPriorityControl* control = NULL;
-
-    TInt handle =
-        eventSource->ExecuteTrap(&CreatePriorityControlL, player, &control);
-
-    __ASSERT_DEBUG(control, User::Invariant());
-
-    if (handle == KErrNone)
-    {
-        handle = reinterpret_cast<TInt>(control);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS: Java_com_nokia_amms_AMMSPlugin__1createNativePriorityControl - ");
-
-    return handle;
-}
-
-/*
-* Class:     com_nokia_amms_AMMSPlugin
-* Method:    _createNativeAudioOutputControl
-*
-*/
-
-JNIEXPORT jint JNICALL Java_com_nokia_amms_AMMSPlugin__1createNativeAudioOutputControl(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS: Java_com_nokia_amms_AMMSPlugin__1createNativeAudioOutputControl + ");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAPlayer* player = reinterpret_cast< CMMAPlayer* >(aPlayer);
-
-
-    // Create control and add it to the player.
-    CAMMSAudioOutputControl* control = NULL;
-
-    TInt handle =
-        eventSource->ExecuteTrap(&CreateAudioOutputControlL, player, &control);
-
-    __ASSERT_DEBUG(control, User::Invariant());
-
-    if (handle == KErrNone)
-    {
-       handle = reinterpret_cast<TInt>(control);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS: Java_com_nokia_amms_AMMSPlugin__1createNativeAudioOutputControl - ");
-
-    return handle;
-}
-//  End of File
--- a/javauis/amms_qt/jni/src/audiooutputcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +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:  Creates cammsaudiooutputcontrol.
-*
-*/
-
-
-//#include <jutils.h>
-#include <logger.h>
-#include "com_nokia_mid_impl_media_AudioOutputControl.h"
-#include <mmafunctionserver.h>
-#include "cammsaudiooutputcontrol.h"
-
-/**
-* wrapper for CAMMSAudioOutputControl::GetPreference()
-*/
-static TInt GetPreference(CAMMSAudioOutputControl* aControl)
-{
-    TInt val = aControl->GetAudioOutput();
-    return val;
-}
-
-/**
-* wrapper for CAMMSAudioOutputControl::SetPreferenceL()
-*/
-static TInt SetPreference(CAMMSAudioOutputControl* aControl, TInt aPreference)
-{
-    return aControl->SetAudioOutput(aPreference);
-}
-
-/**
-* wrapper for CAMMSAudioOutputControl::GetCurrent()
-*/
-static void GetCurrent(CAMMSAudioOutputControl* aControl)
-{
-    aControl->GetCurrentPreference();
-}
-
-/**
-* wrapper for CAMMSAudioOutputControl::SetJavaAudioOutputObj()
-*/
-static void SetJavaAudioOutputObj(CAMMSAudioOutputControl* aControl,jobject obj)
-{
-    aControl->SetJavaAudioOutputObject(obj);
-}
-
-/*
-* Class:     Java_com_nokia_mj_impl_media_AudioOutputControl
-* Method:    _getOutputMode
-*
-*/
-
-JNIEXPORT jint JNICALL Java_com_nokia_mid_impl_media_AudioOutputControl__1getOutputMode(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-    CAMMSAudioOutputControl* control = static_cast< CAMMSAudioOutputControl* >(
-                                           reinterpret_cast< CAMMSControl* >(aControl));
-    __ASSERT_DEBUG(control, User::Invariant());
-    return eventSource->Execute(GetPreference, control);
-}
-
-/*
-* Class:     Java_com_nokia_mj_impl_media_AudioOutputControl
-* Method:    _setOutputMode
-*
-*/
-JNIEXPORT jint JNICALL Java_com_nokia_mid_impl_media_AudioOutputControl__1setOutputMode(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aPreference)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSAudioOutputControl* control = static_cast< CAMMSAudioOutputControl* >(
-                                          reinterpret_cast< CAMMSControl* >(aControl));
-    __ASSERT_DEBUG(control, User::Invariant());
-    TInt error = eventSource->Execute(
-                     &SetPreference, control, (TInt) aPreference);
-    ELOG1( EJavaAMMS, "AMMS::AudioOutputControl_JNI::setOutputMode =  %d", error);
-    return error;
-}
-
-
-/*
-* Class:     Java_com_nokia_mj_impl_media_AudioOutputControl
-* Method:    _getCurrent
-*
-*/
-
-JNIEXPORT jint JNICALL Java_com_nokia_mid_impl_media_AudioOutputControl__1getCurrent(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    MMAFunctionServer* eventSource =
-       reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSAudioOutputControl* control = static_cast< CAMMSAudioOutputControl* >(
-                                           reinterpret_cast< CAMMSControl* >(aControl));
-    __ASSERT_DEBUG(control, User::Invariant());
-    TInt err = eventSource->ExecuteTrap(GetCurrent, control);
-    ELOG1( EJavaAMMS, "AMMS::AudioOutputControl_JNI::getCurrent =  %d", err);
-    return err;
-}
-
-
-/*
-* Class:     com_nokia_mj_impl_media_AudioOutputControl
-* Method:    _setAudioOutputObject
-* Signature: (IILjava/lang/Object;)I
-*/
-JNIEXPORT jint JNICALL Java_com_nokia_mid_impl_media_AudioOutputControl__1setAudioOutputObject
-(JNIEnv *jni, jclass, jint aEventSource, jint aControl, jobject audioOutputObj)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-    CAMMSAudioOutputControl* control = static_cast< CAMMSAudioOutputControl* >(
-                                           reinterpret_cast< CAMMSControl* >(aControl));
-    __ASSERT_DEBUG(control, User::Invariant());
-    jobject obj = jni->NewWeakGlobalRef(audioOutputObj);
-    TInt err = eventSource->ExecuteTrap(SetJavaAudioOutputObj,control ,obj);
-    ELOG1( EJavaAMMS, "AMMS::AudioOutputControl_JNI::setAudioOutputObject =  %d", err);
-    return err;
-}
-
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/commitcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audio3d_CommitControl.h"
-#include <mmafunctionserver.h>
-#include "cammscommitcontrolgroup.h"
-
-/**
- * wrapper for CAMMSCommitControlGroup::CommitAllControlsL()
- */
-static void CommitL(CAMMSCommitControlGroup* aControl)
-{
-    aControl->CommitAllControlsL();
-}
-
-/**
- * wrapper for CAMMSCommitControlGroup::SetDeferredL()
- */
-static void SetDeferredL(CAMMSCommitControlGroup* aControl, TBool aDeferred)
-{
-    aControl->SetDeferredL(aDeferred);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_CommitControl
- * Method:    _commit
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_CommitControl__1commit(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aCommitControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSCommitControlGroup* commitControl =
-        static_cast<CAMMSCommitControlGroup*>(
-        	reinterpret_cast< CAMMSControlGroup* >(aCommitControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(&CommitL, commitControl);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_CommitControl
- * Method:    _setDeferred
- * Signature: (IIZ)V
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_CommitControl__1setDeferred(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aCommitControl,
-    jboolean aDeferred)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSCommitControlGroup* commitControl =
-        static_cast<CAMMSCommitControlGroup*>(
-        	reinterpret_cast< CAMMSControlGroup* >(aCommitControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(&SetDeferredL, commitControl,
-                                     (TBool) aDeferred);
-
-    return error;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/controlcontainer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI file for ControlContainer
-*
-*/
-
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include "com_nokia_amms_ControlContainer.h"
-
-#include "cammscontrolgroup.h"
-#include "cammsmodule.h"
-#include "jstringutils.h"
-#include "s60commonutils.h"
-using namespace java::util;
-
-/**
- * JNI function.
- */
-JNIEXPORT jstring JNICALL Java_com_nokia_amms_ControlContainer__1getControlClassName
-(JNIEnv* aJniEnv,
- jclass,
- jint /*aEventSourceHandle*/,
- jint aNativeHandle)
-{
-    CAMMSControlGroup* controlGroup =
-        reinterpret_cast< CAMMSControlGroup* >(aNativeHandle);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::ControlContainer.cpp::getControlClassName name = %S",
-              controlGroup->ClassName().Ptr());
-
-    return S60CommonUtils::NativeToJavaString(*aJniEnv, controlGroup->ClassName());
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_ControlContainer__1getControlsCount
-(JNIEnv*,
- jclass,
- jint /*aEventSourceHandle*/,
- jint aNativeHandle)
-{
-    CAMMSModule* module = reinterpret_cast< CAMMSModule* >(aNativeHandle);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::ControlContainer.cpp::getControlsCount count = %d",
-              module->Count());
-    return module->Count();
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_ControlContainer__1getControlHandle
-(JNIEnv*,
- jclass,
- jint /*aEventSourceHandle*/,
- jint aNativeHandle,
- jint aIndex)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::ControlContainer.cpp::getControlHandle index = %d",
-              aIndex);
-    CAMMSModule* module = reinterpret_cast< CAMMSModule *>(aNativeHandle);
-
-    // Java handles must be created from CBase derived classes.
-    // Casting here is safe because all groups in the modules are derived from
-    // CAMMSControlGroup.
-    CAMMSControlGroup* group = static_cast< CAMMSControlGroup* >(
-                                   module->At(aIndex));     // CSI: 1 Wrong index means implementation error #
-
-	return  reinterpret_cast<TInt>(group);
-}
-
-//  End of File
-
-
-
--- a/javauis/amms_qt/jni/src/distanceattenuationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI file for DistanceAttenuationControl
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audio3d_DistanceAttenuationControl.h"
-#include <mmafunctionserver.h>
-#include "cammsdistanceattenuationcontrolgroup.h"
-
-/**
- * wrapper for CAMMSDistanceAttenuationControlGroup::MuteAfterMax()
- */
-static TBool MuteAfterMax(CAMMSDistanceAttenuationControlGroup* aControl)
-{
-    return aControl->MuteAfterMax();
-}
-
-/**
- * wrapper for CAMMSDistanceAttenuationControlGroup::MinDistance()
- */
-static TInt32 MinDistance(CAMMSDistanceAttenuationControlGroup* aControl)
-{
-    return aControl->MinDistance();
-}
-
-/**
- * wrapper for CAMMSDistanceAttenuationControlGroup::MaxDistance()
- */
-static TInt32 MaxDistance(CAMMSDistanceAttenuationControlGroup* aControl)
-{
-    return aControl->MaxDistance();
-}
-
-/**
- * wrapper for CAMMSDistanceAttenuationControlGroup::RolloffFactor()
- */
-static TUint32 RolloffFactor(CAMMSDistanceAttenuationControlGroup* aControl)
-{
-    return aControl->RolloffFactor();
-}
-
-/**
- * wrapper for CAMMSDistanceAttenuationControlGroup::SetParametersL()
- */
-static void SetParametersL(
-    CAMMSDistanceAttenuationControlGroup* aControl,
-    TInt aMinDistance,
-    TInt aMaxDistance,
-    TBool aMuteAfterMax,
-    TInt aRolloffFactor)
-{
-    aControl->SetParametersL(
-        aMinDistance,
-        aMaxDistance,
-        aMuteAfterMax,
-        aRolloffFactor);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DistanceAttenuationControl
- * Method:    _getMuteAfterMax
- * Signature: (II)Z
- */
-JNIEXPORT jboolean JNICALL
-Java_com_nokia_amms_control_audio3d_DistanceAttenuationControl__1getMuteAfterMax(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDistControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDistanceAttenuationControlGroup* distControl =
-        static_cast<CAMMSDistanceAttenuationControlGroup*>(
-    	    reinterpret_cast< CAMMSControlGroup* >(aDistControl));
-
-    return (jboolean) eventSource->Execute(MuteAfterMax, distControl);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DistanceAttenuationControl
- * Method:    _getMinDistance
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DistanceAttenuationControl__1getMinDistance(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDistControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDistanceAttenuationControlGroup* distControl =
-        static_cast<CAMMSDistanceAttenuationControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDistControl));
-
-    return (jint) eventSource->Execute(MinDistance, distControl);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DistanceAttenuationControl
- * Method:    _getMaxDistance
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DistanceAttenuationControl__1getMaxDistance(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDistControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDistanceAttenuationControlGroup* distControl =
-        static_cast<CAMMSDistanceAttenuationControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDistControl));
-
-    return (jint) eventSource->Execute(MaxDistance, distControl);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DistanceAttenuationControl
- * Method:    _getRolloffFactor
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DistanceAttenuationControl__1getRolloffFactor(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDistControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDistanceAttenuationControlGroup* distControl =
-        static_cast<CAMMSDistanceAttenuationControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup *>(aDistControl));
-
-    return (jint) eventSource->Execute(RolloffFactor, distControl);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DistanceAttenuationControl
- * Method:    _setParameters
- * Signature: (IIIIZI)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DistanceAttenuationControl__1setParameters(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDistControl,
-    jint aMinDistance,
-    jint aMaxDistance,
-    jboolean aMuteAfterMax,
-    jint aRolloffFactor)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDistanceAttenuationControlGroup* distControl =
-        static_cast<CAMMSDistanceAttenuationControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDistControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                &SetParametersL,
-                distControl,
-                (TInt) aMinDistance,
-                (TInt) aMaxDistance,
-                (TBool) aMuteAfterMax,
-                (TInt) aRolloffFactor);
-
-    return error;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/dopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI file for DopplerControl
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audio3d_DopplerControl.h"
-#include <mmafunctionserver.h>
-#include "cammsdopplercontrolgroup.h"
-
-/**
- * wrapper for CAMMSDopplerControlGroup::SetEnabledL()
- */
-static void SetEnabledL(CAMMSDopplerControlGroup* aControl, TBool aEnabled)
-{
-    aControl->SetEnabledL(aEnabled);
-}
-
-/**
- * wrapper for CAMMSDopplerControlGroup::SetVelocitySphericalL()
- */
-static void SetVelocitySphericalL(CAMMSDopplerControlGroup* aControl,
-                                  TInt aAzimuth, TInt aElevation, TInt aRadius)
-{
-    aControl->SetVelocitySphericalL(aAzimuth, aElevation, aRadius);
-}
-
-/**
- * wrapper for CAMMSDopplerControlGroup::VelocityCartesian()
- */
-static void GetVelocityCartesianL(
-    CAMMSDopplerControlGroup* aControl,
-    TInt aVelocity[ KAMMSVectorComponents ])
-{
-    aControl->VelocityCartesianL(aVelocity);
-}
-
-/**
- * wrapper for CAMMSDopplerControlGroup::Enabled()
- */
-static TBool IsEnabled(CAMMSDopplerControlGroup* aControl)
-{
-    return aControl->Enabled();
-}
-
-/**
- * wrapper for CAMMSDopplerControlGroup::SetVelocityCartesianL()
- */
-static void SetVelocityCartesianL(
-    CAMMSDopplerControlGroup* aControl,
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-    aControl->SetVelocityCartesianL(aX, aY, aZ);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DopplerControl
- * Method:    _setEnabled
- * Signature: (IIZ)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DopplerControl__1setEnabled(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDopplerControl,
-    jboolean aEnabled)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDopplerControlGroup* dopplerControl =
-        static_cast<CAMMSDopplerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDopplerControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetEnabledL,
-                dopplerControl,
-                (TBool) aEnabled);
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DopplerControl
- * Method:    _setVelocitySpherical
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DopplerControl__1setVelocitySpherical(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDopplerControl,
-    jint aAzimuth,
-    jint aElevation,
-    jint aRadius)
-{
-    MMAFunctionServer* eventSource =
-		reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDopplerControlGroup* dopplerControl =
-        static_cast<CAMMSDopplerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup *>(aDopplerControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetVelocitySphericalL, dopplerControl,
-                                     (TInt) aAzimuth, (TInt) aElevation, (TInt) aRadius);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DopplerControl
- * Method:    _getVelocityCartesian
- * Signature: (II)[I
- */
-JNIEXPORT jintArray JNICALL
-Java_com_nokia_amms_control_audio3d_DopplerControl__1getVelocityCartesian(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aDopplerControl,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSDopplerControlGroup* dopplerControl =
-        static_cast<CAMMSDopplerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDopplerControl));
-
-    TInt velocity[ KAMMSVectorComponents ];
-    TInt error = eventSource->ExecuteTrap(GetVelocityCartesianL,
-                                          dopplerControl,
-                                          velocity);
-    // allocate new array
-    jintArray javaArray = aJni->NewIntArray(KAMMSVectorComponents);
-    if (javaArray)
-    {
-        aJni->SetIntArrayRegion(
-            /*destination*/ javaArray,
-            /*first*/ 0,
-            /*count*/ KAMMSVectorComponents,
-            /*source*/ velocity);
-    }
-
-    jint javaError[ 1 ] = { error };
-    aJni->SetIntArrayRegion(aError, 0, 1, javaError);
-
-    return javaArray;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DopplerControl
- * Method:    _isEnabled
- * Signature: (II)Z
- */
-JNIEXPORT jboolean JNICALL
-Java_com_nokia_amms_control_audio3d_DopplerControl__1isEnabled(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDopplerControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDopplerControlGroup* dopplerControl =
-        static_cast<CAMMSDopplerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDopplerControl));
-
-    return (jboolean) eventSource->Execute(IsEnabled, dopplerControl);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_DopplerControl
- * Method:    _setVelocityCartesian
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_DopplerControl__1setVelocityCartesian(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aDopplerControl,
-    jint aX,
-    jint aY,
-    jint aZ)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSDopplerControlGroup* dopplerControl =
-        static_cast<CAMMSDopplerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aDopplerControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetVelocityCartesianL,
-                dopplerControl,
-                (TInt) aX,
-                (TInt) aY,
-                (TInt) aZ);
-
-    return error;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/effectcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI for EffectControl
-*
-*/
-
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include "com_nokia_amms_control_EffectControl.h"
-#include <mmafunctionserver.h>
-#include "cammseffectcontrolgroup.h"
-#include "jstringutils.h"
-#include "s60commonutils.h"
-using namespace java::util;
-#include <JniEnvWrapper.h>
-
-/**
- * wrapper for CAMMSEffectControlGroup::PresetNamesL()
- */
-LOCAL_C void GetPresetNamesL(CAMMSEffectControlGroup* aControl,
-                             JNIEnv* aJni,
-                             jobjectArray* aArray)
-{
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-    //aJni = JniEnvWrapper::GetValidJniRef();
-
-    // Create new java String array and copy values from the values array
-    *aArray = MMAPIUtils::CopyToNewJavaStringArrayL(*aJni, aControl->PresetNamesL());
-}
-
-/**
- * wrapper for CAMMSEffectControlGroup::PresetL()
- */
-static void GetPresetL(
-    CAMMSEffectControlGroup* aControl,
-    TDes* aPreset)
-{
-    aControl->GetPresetL(*aPreset);
-}
-
-/**
- * wrapper for CAMMSEffectControlGroup::SetEnabledL()
- */
-static void SetEnabledL(CAMMSEffectControlGroup* aControl, TBool aEnabled)
-{
-    aControl->SetEnabledL(aEnabled);
-}
-
-/**
- * wrapper for CAMMSEffectControlGroup::SetScopeL()
- */
-static void SetScopeL(CAMMSEffectControlGroup* aControl, TInt aScope)
-{
-    aControl->SetScopeL((CAMMSEffectControlGroup::TEffectScope) aScope);
-}
-
-/**
- * wrapper for CAMMSEffectControlGroup::SetEnforcedL()
- */
-static void SetEnforcedL(CAMMSEffectControlGroup* aControl, TBool aEnforced)
-{
-    aControl->SetEnforcedL(aEnforced);
-}
-
-/**
- * wrapper for CAMMSEffectControlGroup::SetPresetL()
- */
-static void SetPresetL(CAMMSEffectControlGroup* aControl, TDesC* aPreset)
-{
-    aControl->SetPresetL(*aPreset);
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _isEnabled
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1isEnabled(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    /*MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);*/
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->Enabled();
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _isEnforced
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1isEnforced(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-   /* MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);*/
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->Enforced();
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _getPresetNames
- * Signature: (II[Ljava/lang/String;)I
- */
-JNIEXPORT jobjectArray JNICALL Java_com_nokia_amms_control_EffectControl__1getPresetNames(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    jobjectArray presetNames = NULL;
-
-    TInt error = eventSource->ExecuteTrap(GetPresetNamesL,
-                                          control,
-                                          aJni,
-                                          &presetNames);
-
-    // If an error happened, return null to Java
-    if (error != KErrNone)
-    {
-        presetNames = NULL;
-    }
-    return presetNames;
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _getPreset
- * Signature: (II[Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1getPreset(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jobjectArray aPreset)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-											reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    TBuf< KAMMSMaxPresetNameLength > preset;
-
-    error = eventSource->ExecuteTrap(GetPresetL, control, (TDes*) &preset);
-
-    if (error == KErrNone)
-    {
-        // return NULL if there is no preset set in the native class
-        if (preset == KNullDesC)
-        {
-            aJni->SetObjectArrayElement(aPreset, 0, NULL);
-        }
-        else
-        {
-            jstring javaStr = S60CommonUtils::NativeToJavaString(*aJni, preset);
-            if (!javaStr)
-            {
-                return KErrNoMemory;
-            }
-
-            aJni->SetObjectArrayElement(aPreset, 0, javaStr);
-        }
-    }
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _setScope
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1setScope(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jint aScope)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetScopeL, control, aScope);
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _setEnabled
- * Signature: (IIZ)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1setEnabled(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jboolean aEnabled)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetEnabledL, control, (TBool) aEnabled);
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _getScope
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1getScope(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    /*MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);*/
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->Scope();
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _setPreset
- * Signature: (IILjava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1setPreset(
-    JNIEnv* aJni, jclass, jint aEventSource, jint aControl, jstring aPreset)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    JStringUtils preset(*aJni, aPreset);
-    error = eventSource->ExecuteTrap(SetPresetL, control, (TDesC*) &preset);
-
-    ELOG1( EJavaAMMS, "AMMS:JNI:EffectControl:setPreset, err=%d", error);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_EffectControl
- * Method:    _setEnforced
- * Signature: (IIZ)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_EffectControl__1setEnforced(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jboolean aEnforced)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSEffectControlGroup* control = static_cast<CAMMSEffectControlGroup*>(
-                                           reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetEnforcedL,
-                control,
-                (TBool) aEnforced);
-    return error;
-}
-
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/equalizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audioeffect_EqualizerControl.h"
-#include <mmafunctionserver.h>
-#include "cammsequalizercontrolgroup.h"
-
-/**
- * wrapper for CAMMSEqualizerControlGroup::GetBandLevelL()
- */
-static void GetBandLevelL(
-    CAMMSEqualizerControlGroup *aControl,
-    TInt aBand,
-    TInt *aLevel)
-{
-    aControl->GetBandLevelL(aBand, *aLevel);
-}
-
-/**
- * wrapper for CAMMSEqualizerControlGroup::CenterFreqL()
- */
-static void GetCenterFreqL(
-    CAMMSEqualizerControlGroup *aControl,
-    TInt aBand,
-    TInt *aFrequency)
-{
-    aControl->GetCenterFreqL(aBand, *aFrequency);
-}
-
-/**
- * wrapper for CAMMSEqualizerControlGroup::SetBandLevelL()
- */
-static void SetBandLevelL(
-    CAMMSEqualizerControlGroup *aControl,
-    TInt aLevel,
-    TInt aBand)
-{
-    aControl->SetBandLevelL(aLevel, aBand);
-}
-
-/**
- * wrapper for CAMMSEqualizerControlGroup::SetBassL()
- */
-static void SetBassL(CAMMSEqualizerControlGroup *aControl, TInt *aLevel, TInt *aSetLevel)
-{
-    aControl->SetBassL(*aLevel, *aSetLevel);
-}
-
-/**
- * wrapper for CAMMSEqualizerControlGroup::SetTrebleL()
- */
-static void SetTrebleL(CAMMSEqualizerControlGroup *aControl, TInt *aLevel, TInt *aSetLevel)
-{
-    aControl->SetTrebleL(*aLevel, *aSetLevel);
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getBand
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getBand(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jint aFrequency)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->Band(aFrequency);
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getTreble
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getTreble(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    return control->Treble();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _setBass
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1setBass(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jint aLevel)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    TInt level = aLevel;
-    TInt setLevel;
-
-    error = eventSource->ExecuteTrap(SetBassL, control, &level, &setLevel);
-    return (error < KErrNone) ? error : setLevel;
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getCenterFreq
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getCenterFreq(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jint aBand)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    TInt error;
-    TInt freq;
-
-    error = eventSource->ExecuteTrap(
-                GetCenterFreqL,
-                control,
-                (TInt) aBand,
-                &freq);
-
-    return (error < KErrNone) ? error : freq;
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _setBandLevel
- * Signature: (IIII)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1setBandLevel(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aLevel,
-    jint aBand)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetBandLevelL,
-                control,
-                (TInt) aLevel,
-                (TInt) aBand);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _setTreble
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1setTreble(
-    JNIEnv*, jclass, jint aEventSource, jint aControl, jint aLevel)
-{
-    MMAFunctionServer* eventSource =
-            reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    TInt level = aLevel;
-    TInt setLevel;
-
-    error = eventSource->ExecuteTrap(SetTrebleL, control, &level, &setLevel);
-    return (error < KErrNone) ? error : setLevel;
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getNumberOfBands
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getNumberOfBands(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->NumberOfBands();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getMinBandLevel
- * Signature: (IILI)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getMinBandLevel(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-
-    return control->MinBandLevel();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getBass
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getBass(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->Bass();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getMaxBandLevel
- * Signature: (IILI)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getMaxBandLevel(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    return control->MaxBandLevel();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_EqualizerControl
- * Method:    _getBandLevel
- * Signature: (IIILI)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_EqualizerControl__1getBandLevel(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aBand,
-    jintArray aLevel)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSEqualizerControlGroup* control =
-        static_cast<CAMMSEqualizerControlGroup*>(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    TInt level;
-
-    error = eventSource->ExecuteTrap(
-                GetBandLevelL,
-                control,
-                (TInt) aBand,
-                &level);
-
-    if (error == KErrNone)
-    {
-        // aLevel is an array of 1 element allocated at the java side
-        aJni->SetIntArrayRegion(
-            /*destination*/ aLevel,
-            /*first*/ 0,
-            /*count*/ 1,
-            /*source*/ &level);
-    }
-    return error;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/globalmanager.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include <mmafunctionserver.h>
-
-#include "com_nokia_amms_GlobalManagerImpl.h"
-#include "cammsglobalmanager.h"
-
-/**
- * Creates new CAMMSGlobalManager instance which is added to
- * MMAFunctionServer for cleanup.
- * @param aHandle will contain handle to created object.
- * @param aEventSource MMA event source instance.
- */
-LOCAL_C void CreateManagerL(TInt* aHandle,
-                            MMAFunctionServer* aEventSource)
-{
-    CAMMSGlobalManager* manager = CAMMSGlobalManager::NewLC();
-
-    // Make Java handle
-    *aHandle = reinterpret_cast<TInt>(manager);
-
-    MMAFunctionServer::StaticAddObjectFromHandleL(aEventSource,
-            *aHandle);
-
-    CleanupStack::Pop(manager);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_GlobalManagerImpl__1createGlobalManager
-(JNIEnv*,
- jclass,
- jint aEventSourceHandle)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::GlobalManager.cpp::createGlobalManager +");
-
-    // Development time check.
-    __ASSERT_DEBUG(aEventSourceHandle > 0, User::Invariant());
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    // handle will be set in CreateManagerL function.
-    TInt handle = KErrNotReady;
-
-    // Call CreateManagerL. If it leaves handle will not be set
-    TInt error = eventSource->ExecuteTrap(&CreateManagerL,
-                                          &handle,
-                                          eventSource);
-
-    if (error != KErrNone)
-    {
-        // executed function leaved. Set error to be returned to java.
-        handle = error;
-    }
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::GlobalManager.cpp::createGlobalManager return %d",
-              handle);
-
-    return handle;
-}
-
-/**
- * Calls CAMMSGlobalManager::InitL method.
- *
- * @param aManager CAMMSGlobalManager instance.
- * @param aEventSource MMAFunctionServer instance.
- */
-LOCAL_C void InitManagerL(CAMMSGlobalManager* aManager,
-                          MMAFunctionServer* aEventSource)
-{
-    aManager->InitL(aEventSource->Players());
-
-    // Receive notifications when new players are created or deleted.
-    aEventSource->SetPlayerInstanceObserver(aManager);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_GlobalManagerImpl__1init
-(JNIEnv*,
- jclass,
- jint aEventSourceHandle,
- jint aGlobalManagerHandle)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::GlobalManager.cpp::init +");
-
-    // Development time check.
-    __ASSERT_DEBUG(aEventSourceHandle > 0 &&
-                   aGlobalManagerHandle > 0, User::Invariant());
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSGlobalManager* manager =
-        reinterpret_cast< CAMMSGlobalManager* >(aGlobalManagerHandle);
-
-    // Call InitManagerL.
-    TInt error = eventSource->ExecuteTrap(&InitManagerL,
-                                          manager,
-                                          eventSource);
-
-    ELOG1( EJavaAMMS, "AMMS::GlobalManager.cpp::init error code %d", error);
-    return error;
-}
-
-/**
- * Calls CAMMSGlobalManager::CreateSoundSource3DL method.
- * @param aManager CAMMSGlobalManager instance.
- * @param aHandle will contain handle to created object.
- */
-LOCAL_C void CreateSoundSource3DL(CAMMSGlobalManager* aManager, TInt* aHandle)
-{
-    CAMMSModule* module = aManager->CreateSoundSource3DL();
-
-    // Make Java handle
-    *aHandle = reinterpret_cast<TInt>(module);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_GlobalManagerImpl__1createSoundSource3D
-(JNIEnv*,
- jclass,
- jint aEventSourceHandle,
- jint aGlobalManagerHandle)
-{
-    MMAFunctionServer* eventSource =
-		reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSGlobalManager* manager =
-        reinterpret_cast< CAMMSGlobalManager* >(aGlobalManagerHandle);
-
-    // handle will be set in CreateSoundSource3DL function.
-    TInt handle = KErrNotReady;
-
-    // Call CreateSoundSource3DL. If it leaves handle will not be set
-    TInt error = eventSource->ExecuteTrap(&CreateSoundSource3DL,
-                                          manager,
-                                          &handle);
-
-    if (error != KErrNone)
-    {
-        // executed function leaved. Set error to be returned to java.
-        handle = error;
-    }
-    ELOG1( EJavaAMMS, "AMMS::GlobalManager.cpp::createSoundSource3D return value %d",
-              error);
-    return handle;
-}
-
-/**
- * Calls CAMMSGlobalManager::CreateEffectModuleL method.
- * @param aManager CAMMSGlobalManager instance.
- * @param aHandle will contain handle to created object.
- */
-LOCAL_C void CreateEffectModuleL(CAMMSGlobalManager* aManager, TInt* aHandle)
-{
-    CAMMSModule* module = aManager->CreateEffectModuleL();
-
-    // Make Java handle
-    *aHandle = reinterpret_cast<TInt>(module);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_GlobalManagerImpl__1createEffectModule
-(JNIEnv*,
- jclass,
- jint aEventSourceHandle,
- jint aGlobalManagerHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSGlobalManager* manager =
-        reinterpret_cast< CAMMSGlobalManager* >(aGlobalManagerHandle);
-
-    // handle will be set in CreateEffectModuleL function.
-    TInt handle = KErrNotReady;
-
-    // Call CreateEffectModuleL. If it leaves handle will not be set
-    TInt error = eventSource->ExecuteTrap(&CreateEffectModuleL,
-                                          manager,
-                                          &handle);
-
-    if (error != KErrNone)
-    {
-        // executed function leaved. Set error to be returned to java.
-        handle = error;
-    }
-    ELOG1( EJavaAMMS, "AMMS::GlobalManager.cpp::createEffectModule return value %d",
-              error);
-    return handle;
-}
-
-/**
- * Calls CAMMSGlobalManager::Spectator method.
- * @param aManager CAMMSGlobalManager instance.
- * @param aHandle will contain handle to created object.
- */
-LOCAL_C void CreateSpectatorL(CAMMSGlobalManager* aManager, TInt* aHandle)
-{
-    CAMMSModule* spectator = aManager->Spectator();
-
-    // Make Java handle
-    *aHandle = reinterpret_cast<TInt>(spectator);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_GlobalManagerImpl__1createSpectator
-(JNIEnv*,
- jclass,
- jint aEventSourceHandle,
- jint aGlobalManagerHandle)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::GlobalManager.cpp::createSpectator +");
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSGlobalManager* manager =
-        reinterpret_cast< CAMMSGlobalManager* >(aGlobalManagerHandle);
-
-    // handle will be set in CreateSpectatorL function.
-    TInt handle = KErrNotReady;
-
-    // Call CreateSpectatorL. If it leaves handle will not be set
-    TInt error = eventSource->ExecuteTrap(&CreateSpectatorL,
-                                          manager,
-                                          &handle);
-
-    if (error != KErrNone)
-    {
-        // executed function leaved. Set error to be returned to java.
-        handle = error;
-    }
-    LOG1( EJavaAMMS, EInfo, "AMMS::GlobalManager.cpp::createSpectator error code %d", handle);
-    return handle;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/locationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audio3d_LocationControl.h"
-#include <mmafunctionserver.h>
-#include "cammslocationcontrolgroup.h"
-#include "ammsconstants.h"
-
-/**
- * wrapper for CAMMSLocationControlGroup::Cartesian()
- */
-static void GetCartesianL(
-    CAMMSLocationControlGroup* control,
-    TInt aLocation[ KAMMSVectorComponents ])
-{
-    control->CartesianL(aLocation);
-}
-
-/**
- * wrapper for CAMMSLocationControlGroup::SetCartesianL()
- */
-static void SetCartesianL(
-    CAMMSLocationControlGroup* control,
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-    control->SetCartesianL(aX, aY, aZ);
-}
-
-/**
- * wrapper for CAMMSLocationControlGroup::SetSphericalL()
- */
-static void SetSphericalL(
-    CAMMSLocationControlGroup* control,
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    control->SetSphericalL(aAzimuth, aElevation, aRadius);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_LocationControl
- * Method:    _setSpherical
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_LocationControl__1setSpherical(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aAzimuth,
-    jint aElevation,
-    jint aRadius)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSLocationControlGroup* control = static_cast<CAMMSLocationControlGroup*>(
-                                             reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetSphericalL, control,
-                                     aAzimuth, aElevation, aRadius);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_LocationControl
- * Method:    _getCartesian
- * Signature: (II)LI
- */
-JNIEXPORT jintArray JNICALL Java_com_nokia_amms_control_audio3d_LocationControl__1getCartesian(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSLocationControlGroup* control = static_cast<CAMMSLocationControlGroup*>(
-                                             reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt location[ KAMMSVectorComponents ];
-    TInt error = eventSource->ExecuteTrap(GetCartesianL,
-                                          control,
-                                          location);
-    // allocate new array
-    jintArray javaArray = aJni->NewIntArray(KAMMSVectorComponents);
-    if (javaArray)
-    {
-        aJni->SetIntArrayRegion(
-            /*destination*/ javaArray,
-            /*first*/0,
-            /*count*/KAMMSVectorComponents,
-            /*source*/ &location[ 0 ]);
-    }
-
-    jint javaError[ 1 ] = { error };
-    aJni->SetIntArrayRegion(aError, 0, 1, javaError);
-
-    return javaArray;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_LocationControl
- * Method:    _setCartesian
- * Signature: (IIIII)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audio3d_LocationControl__1setCartesian(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aX,
-    jint aY,
-    jint aZ)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSLocationControlGroup* control = static_cast<CAMMSLocationControlGroup*>(
-                                             reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetCartesianL,
-                control,
-                aX,
-                aY,
-                aZ);
-
-    return error;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/modulebase.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include <mmafunctionserver.h>
-#include <cmmaplayer.h>
-
-// Generated JNI header.
-#include "com_nokia_amms_ModuleBase.h"
-
-#include "cammsmodule.h"
-#include "cammsglobalmanager.h"
-
-/**
- * Calls CAMMSModule::AddPlayerL method.
- * @param aModule Module instance.
- * @param aPlayer Player to add.
- */
-LOCAL_C void AddPlayerL(CAMMSModule* aModule, CMMAPlayer* aPlayer)
-{
-    aModule->AddPlayerL(aPlayer);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_ModuleBase__1addPlayer
-(JNIEnv* /*aJniEnv*/,
- jclass,
- jint aEventSourceHandle,
- jint aModuleHandle,
- jint aPlayerHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSModule* module =
-        reinterpret_cast< CAMMSModule* >(aModuleHandle);
-
-    CMMAPlayer* player =
-        reinterpret_cast< CMMAPlayer *>(aPlayerHandle);
-
-    // call CAMMSModule::AddPlayerL through local AddPlayerL function.
-    return eventSource->ExecuteTrap(&AddPlayerL,
-                                    module,
-                                    player);
-}
-
-/**
- * Calls CAMMSModule::RemovePlayerL method.
- * @param aModule Module instance.
- * @param aPlayer Player to remove.
- * @return KErrNotFound if player does not exist in the module.
- */
-LOCAL_C TInt RemovePlayer(CAMMSModule* aModule, CMMAPlayer* aPlayer)
-{
-    return aModule->RemovePlayer(aPlayer);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_ModuleBase__1removePlayer
-(JNIEnv* /*aJniEnv*/,
- jclass,
- jint aEventSourceHandle,
- jint aModuleHandle,
- jint aPlayerHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CAMMSModule* module =
-        reinterpret_cast< CAMMSModule *>(aModuleHandle);
-
-    CMMAPlayer* player =
-        reinterpret_cast< CMMAPlayer *>(aPlayerHandle);
-
-    // call CAMMSModule::RemovePlayerL through local RemovePlayerL function.
-    return eventSource->Execute(&RemovePlayer,
-                                module,
-                                player);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT void JNICALL Java_com_nokia_amms_ModuleBase__1dispose
-(JNIEnv*,
- jclass,
- jint aManagerHandle,
- jint aModuleHandle)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::ModuleBase.cpp::finalize %d", aModuleHandle);
-
-    // Module to dispose
-    CAMMSModule* module =
-        reinterpret_cast< CAMMSModule* >(aModuleHandle);
-
-    CAMMSGlobalManager* manager =
-        reinterpret_cast< CAMMSGlobalManager* >(aManagerHandle);
-
-    manager->DisposeModule(module);
-}
-//  End of File
-
-
-
--- a/javauis/amms_qt/jni/src/orientationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI file for OrientationControl
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audio3d_OrientationControl.h"
-#include <mmafunctionserver.h>
-#include "cammsorientationcontrolgroup.h"
-
-/**
- * wrapper for CAMMSOrientationControlGroup::OrientationVectors()
- */
-static void GetOrientationVectorsL(
-    CAMMSOrientationControlGroup* control,
-    TInt aOrientation[ KAMMSTwoVectorComponents ])
-{
-    control->OrientationVectorsL(aOrientation);
-}
-
-/**
- * wrapper for CAMMSOrientationControlGroup::SetOrientationVectorsL()
- */
-static void SetOrientationVectorsL(
-    CAMMSOrientationControlGroup* control,
-    TInt aFrontVector[ KAMMSVectorComponents ],
-    TInt aAboveVector[ KAMMSVectorComponents ])
-{
-    control->SetOrientationVectorsL(aFrontVector, aAboveVector);
-}
-
-/**
- * wrapper for CAMMSOrientationControlGroup::SetOrientationL()
- */
-static void SetOrientationL(
-    CAMMSOrientationControlGroup* control,
-    TInt aHeading,
-    TInt aPitch,
-    TInt aRoll)
-{
-    control->SetOrientationL(aHeading, aPitch, aRoll);
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_OrientationControl
- * Method:    _setOrientation
- * Signature:
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_OrientationControl__1setOrientation(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aHeading,
-    jint aPitch,
-    jint aRoll)
-{
-    MMAFunctionServer* eventSource =
-       reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSOrientationControlGroup* control =
-        static_cast< CAMMSOrientationControlGroup* >(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetOrientationL, control,
-                                     aHeading, aPitch, aRoll);
-
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_OrientationControl
- * Method:    _getOrientationVectros
- * Signature:
- */
-JNIEXPORT jintArray JNICALL
-Java_com_nokia_amms_control_audio3d_OrientationControl__1getOrientationVectors(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSOrientationControlGroup* control =
-        static_cast< CAMMSOrientationControlGroup* >(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt orientation[ KAMMSTwoVectorComponents ];
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                GetOrientationVectorsL,
-                control,
-                orientation);
-
-    // Java side method can not throw exception, store possible error here
-    // aError is an array of 1 element allocated at the java side
-    aJni->SetIntArrayRegion(
-        /*destination*/ aError,
-        /*first*/ 0,
-        /*count*/ 1,
-        /*source*/ &error);
-
-    // allocate new array
-    jintArray javaArray = aJni->NewIntArray(KAMMSTwoVectorComponents);
-
-    if (javaArray)
-    {
-        aJni->SetIntArrayRegion(
-            /*destination*/ javaArray,
-            /*first*/0,
-            /*count*/KAMMSTwoVectorComponents,
-            /*source*/ &orientation[ 0 ]);
-    }
-
-    return javaArray;
-}
-
-/*
- * Class:     com_nokia_amms_control_audio3d_OrientationControl
- * Method:    _setOrientation
- * Signature:
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_audio3d_OrientationControl__1setOrientationVectors(
-    JNIEnv* aJni,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jintArray aFrontVector,
-    jintArray aAboveVector)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSOrientationControlGroup* control =
-        static_cast< CAMMSOrientationControlGroup* >(
-           reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    TInt i;
-
-    // copy java front vector array to native front vector array
-    TInt frontVector[ KAMMSVectorComponents ];
-    TInt count = aJni->GetArrayLength(aFrontVector);
-    jint* elements = aJni->GetIntArrayElements(aFrontVector, NULL);
-    for (i = 0; i < count; i++)
-    {
-        frontVector[ i ] = elements[ i ];
-    }
-    aJni->ReleaseIntArrayElements(aFrontVector, elements, 0);
-
-    // copy java above vector array to native above vector array
-    TInt aboveVector[ KAMMSVectorComponents ];
-    count = aJni->GetArrayLength(aAboveVector);
-    elements = aJni->GetIntArrayElements(aAboveVector, NULL);
-    for (i = 0; i < count; i++)
-    {
-        aboveVector[ i ] = elements[ i ];
-    }
-    aJni->ReleaseIntArrayElements(aAboveVector, elements, 0);
-
-    TInt error;
-    error = eventSource->ExecuteTrap(
-                SetOrientationVectorsL,
-                control,
-                frontVector,
-                aboveVector);
-
-    return error;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/pancontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_PanControl.h"
-#include <mmafunctionserver.h>
-#include "cammspancontrolgroup.h"
-
-/**
- * wrapper for CAMMSPanControlGroup::Pan()
- */
-static TInt GetPan(CAMMSPanControlGroup* aControl)
-{
-    return aControl->Pan();
-}
-
-/**
- * wrapper for CAMMSPanControlGroup::SetPanL()
- */
-static void SetPanL(CAMMSPanControlGroup* aControl, TInt aPan, TInt *aReturnedPan)
-{
-    aControl->SetPanL(aPan, *aReturnedPan);
-}
-
-/*
- * Class:     com_nokia_amms_control_PanControl
- * Method:    _getPan
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_PanControl__1getPan(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSPanControlGroup* control = static_cast< CAMMSPanControlGroup* >(
-                                        reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return eventSource->Execute(GetPan, control);
-}
-
-/*
- * Class:     com_nokia_amms_control_PanControl
- * Method:    _setPan
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_PanControl__1setPan(
-    JNIEnv* aJniEnv,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aPan,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSPanControlGroup* control = static_cast< CAMMSPanControlGroup* >(
-                                        reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    TInt error;
-    TInt aReturnedPan;
-    error = eventSource->ExecuteTrap(SetPanL, control, (TInt) aPan, &aReturnedPan);
-
-    // the returned pan value is between -100 and 100 (and the error code as well)
-    jint javaError[ 1 ] = { error };
-    aJniEnv->SetIntArrayRegion(aError, 0, 1, javaError);
-    return aReturnedPan;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/prioritycontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_PriorityControl.h"
-#include <mmafunctionserver.h>
-#include "cammsprioritycontrol.h"
-
-/**
- * wrapper for CAMMSPriorityControl::Priority()
- */
-static TInt GetPriority(CAMMSPriorityControl* aControl)
-{
-    return aControl->Priority();
-}
-
-/**
- * wrapper for CAMMSPriorityControl::SetPriorityL()
- */
-static void SetPriorityL(CAMMSPriorityControl* aControl, TInt aPriority)
-{
-    aControl->SetPriorityL(aPriority);
-}
-
-/*
- * Class:     com_nokia_amms_control_PriorityControl
- * Method:    _getPriority
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_PriorityControl__1getPriority(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSPriorityControl* control = static_cast< CAMMSPriorityControl* >(
-                                        reinterpret_cast< CAMMSControl *>(aControl));
-
-    return eventSource->Execute(GetPriority, control);
-}
-
-/*
- * Class:     com_nokia_amms_control_PriorityControl
- * Method:    _setPriority
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_PriorityControl__1setPriority(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aPriority)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSPriorityControl* control = static_cast< CAMMSPriorityControl* >(
-                                        reinterpret_cast< CAMMSControl* >(aControl));
-
-    TInt error = eventSource->ExecuteTrap(
-                     &SetPriorityL, control, (TInt) aPriority);
-
-    return error;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/reverbcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audioeffect_ReverbControl.h"
-#include <mmafunctionserver.h>
-#include "cammsreverbcontrolgroup.h"
-
-/**
- * wrapper for CAMMSReverbControlGroup::SetReverbLevelL()
- */
-static void SetReverbLevelL(
-    CAMMSReverbControlGroup* aControl,
-    TInt *aLevel)
-{
-    aControl->SetReverbLevelL(*aLevel);
-    *aLevel = aControl->ReverbLevel();
-}
-
-/**
- * wrapper for CAMMSReverbControlGroup::SetReverbLevelL()
- */
-static void SetReverbTimeL(
-    CAMMSReverbControlGroup* aControl,
-    TInt aTime)
-{
-    aControl->SetReverbTimeL(aTime);
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbControl
- * Method:    _getReverbLevel
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbControl__1getReverbLevel(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    CAMMSReverbControlGroup* control = static_cast< CAMMSReverbControlGroup* >(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->ReverbLevel();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbControl
- * Method:    _getReverbTime
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbControl__1getReverbTime(
-    JNIEnv*, jclass, jint aEventSource, jint aControl)
-{
-    CAMMSReverbControlGroup* control = static_cast< CAMMSReverbControlGroup* >(
-                                           reinterpret_cast< CAMMSControlGroup *>(aControl));
-
-    return control->ReverbTime();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbControl
- * Method:    _setReverbTime
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbControl__1setReverbTime(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aTime)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CAMMSReverbControlGroup* control = static_cast< CAMMSReverbControlGroup* >(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetReverbTimeL, control, (TInt) aTime);
-    return error;
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbControl
- * Method:    _setReverbLevel
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbControl__1setReverbLevel(
-    JNIEnv* aJniEnv,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aLevel,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSReverbControlGroup* control = static_cast< CAMMSReverbControlGroup* >(
-                                           reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    TInt level = aLevel;
-
-    error = eventSource->ExecuteTrap(
-                SetReverbLevelL,
-                control,
-                (TInt *) &level);
-
-    jint javaError[ 1 ] = { error };
-    aJniEnv->SetIntArrayRegion(aError, 0, 1, javaError);
-
-    return level;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/jni/src/reverbsourcecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//#include <jutils.h>
-
-#include "com_nokia_amms_control_audioeffect_ReverbSourceControl.h"
-#include <mmafunctionserver.h>
-#include "cammsreverbsourcecontrolgroup.h"
-
-
-/**
- * wrapper for CAMMSReverbSourceControlGroup::SetRoomLevelL()
- */
-static void SetRoomLevelL(
-    CAMMSReverbSourceControlGroup* aControl,
-    TInt aLevel)
-{
-    aControl->SetRoomLevelL(aLevel);
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbSourceControl
- * Method:    _getRoomLevel
- * Signature:
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbSourceControl__1getRoomLevel(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl)
-{
-    CAMMSReverbSourceControlGroup* control =
-        static_cast< CAMMSReverbSourceControlGroup* >(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    return control->RoomLevel();
-}
-
-/*
- * Class:     com_nokia_amms_control_audioeffect_ReverbSourceControl
- * Method:    _setRoomLevel
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbSourceControl__1setRoomLevel(
-    JNIEnv*,
-    jclass,
-    jint aEventSource,
-    jint aControl,
-    jint aLevel)
-{
-    MMAFunctionServer* eventSource =
-	    reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CAMMSReverbSourceControlGroup* control =
-        static_cast< CAMMSReverbSourceControlGroup* >(
-            reinterpret_cast< CAMMSControlGroup* >(aControl));
-
-    TInt error;
-    error = eventSource->ExecuteTrap(SetRoomLevelL, control, (TInt) aLevel);
-    return error;
-}
-
-//  End of File
--- a/javauis/amms_qt/jni/src/volumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//#include <jutils.h>
-#include <logger.h>
-
-#include <mmafunctionserver.h>
-
-// Generated JNI header.
-#include "com_nokia_amms_control_VolumeControl.h"
-
-#include "cammsvolumecontrolgroup.h"
-
-/**
- * Calls CAMMSVolumeControlGroup::SetLevelL method.
- * @param aVolumeControl CAMMSVolumeControlGroup instance.
- * @param aLevel Level to set.
- */
-LOCAL_C void SetVolumeL(CAMMSVolumeControlGroup* aVolumeControl, TInt aLevel)
-{
-    aVolumeControl->SetVolumeL(aLevel);
-}
-
-/**
- * JNI function.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_amms_control_VolumeControl__1setLevel
-(JNIEnv* /*aJniEnv*/,
- jclass,
- jint aEventSourceHandle,
- jint aControlHandle,
- jint aVolume)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::VolumeControl.cpp::setLevel level = %d", aVolume);
-    MMAFunctionServer* eventSource =
-       reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CAMMSVolumeControlGroup* control =
-        reinterpret_cast< CAMMSVolumeControlGroup* >(aControlHandle);
-
-    // call CAMMSVolumeControlGroup::SetVolumeL through local SetVolumeL function.
-    return eventSource->ExecuteTrap(&SetVolumeL,
-                                    control,
-                                    aVolume);
-}
-
-//  End of File
-
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiodopplercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an effect called Doppler.
-*
-*/
-
-
-#ifndef CAMMSEMCAUDIODOPPLERCONTROL_H
-#define CAMMSEMCAUDIODOPPLERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<SourceDopplerControl.h>
-#include <DopplerData.h>
-#include "cammsdopplercontrol.h"
-
-#include <cmmaemcaudioplayer.h>
-
-using multimedia :: MSourceDopplerControl;
-using multimedia :: KSourceDopplerEffectControl;
-
-
-// CONSTANTS
-_LIT(KAMMSEMCAudioDopplerControl, "DopplerControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Doppler Control effect for the Audio source.
-*  This class delegates Doppler Control effect method calls to
-*  MEffectControl.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCAudioDopplerControl): public CAMMSDopplerControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    *
-    */
-    static CAMMSEMCAudioDopplerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCAudioDopplerControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCAudioDopplerControl(CMMAPlayer* aPlayer);
-
-
-public:
-
-    void SetEnabledL(TBool aDopplerEnabled);
-
-    TBool Enabled();
-
-    void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ);
-
-    void VelocityCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation,
-                               TInt aRadius);
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC SourceDoppler Control
-    */
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MSourceDopplerControl *iMSourceDopplerControl;
-};
-
-#endif // CAMMSEMCAUDIODOPPLERCONTROL_H
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiolocationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-#ifndef CAMMSEMCAUDIOLOCATIONCONTROL_H
-#define CAMMSEMCAUDIOLOCATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<SourceLocationControl.h>
-#include <LocationData.h>
-#include "cammslocationcontrol.h"
-
-#include <cmmaemcaudioplayer.h>
-
-using multimedia :: MSourceLocationControl;
-using multimedia :: KSourceLocationEffectControl;
-
-// CONSTANTS
-_LIT(KAMMSEMCAudioLocationControl, "LocationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Location Control effect for the Audio source.
-*  This class delegates Location Control effect method calls to
-*  MSourceLocationControl.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCAudioLocationControl): public CAMMSLocationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCAudioLocationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCAudioLocationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCAudioLocationControl(CMMAPlayer* aPlayer);
-
-
-public:
-
-    void SetLocationCartesianL(TInt& aX, TInt& aY, TInt& aZ);
-
-    void LocationCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    void SetLocationSphericalL(TInt& aAzimuth, TInt& aElevation,
-                               TInt& aRadius);
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC SourceLocation Control
-    */
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MSourceLocationControl *iMSourceLocationControl;
-};
-
-#endif // CAMMSEMCAUDIOLOCATIONCONTROL_H
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiovirtualizercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Virtualizes audio channels.
-*
-*/
-
-
-#ifndef CAMMSEMCAUDIOVIRTUALIZERCONTROL_H
-#define CAMMSEMCAUDIOVIRTUALIZERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrol.h"
-#include "cammseffectcontrolgroup.h"
-#include <cmmaemcaudioplayer.h>
-#include<StereoWideningControl.h>
-//Utility for getting EnvironmentalPreset
-#include "cammsemcaudiovirtualizerenvironmentalpresetutility.h"
-
-
-using multimedia :: KStereoWideningEffectControl;
-using multimedia :: MStereoWideningControl;
-
-
-// CONSTANTS
-_LIT(KAMMSEMCAudioVirtualizerControl, "AudioVirtualizerControl");
-
-// CLASS DECLARATION
-/**
-*
-*  Controls for the Audio Virtualizer effect.
-*  This class delegates Audio Virtualizer effect method calls to
-*  CStereoWidening.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCAudioVirtualizerControl): public CAMMSEffectControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCAudioVirtualizerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCAudioVirtualizerControl();
-
-public: // Functions from base classes
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-public: // overriden virtual functions from CAMMSEffectControl
-
-
-    virtual void SetEnforcedL(TBool aEnforced);
-
-    virtual TBool Enforced();
-
-    virtual void SetScopeL(TInt aScope);
-
-    virtual TInt Scope();
-
-protected:
-
-    virtual void ApplySettingsL();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCAudioVirtualizerControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /** Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-    TBuf<KAMMSMaxPresetNameLength> iPresetName;
-
-    /** Index of the current preset */
-    TInt iCurrentPreset;
-    /* AudioVirtualizer utility to get preset and data related to that preset*/
-    CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility * iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility;
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC AudioVirtualizer Control
-    */
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MStereoWideningControl *iMStereoWideningControl;
-
-
-};
-
-#endif // CAMMSEMCAUDIOVIRTUALIZERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcaudiovirtualizerenvironmentalpresetutility.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utility to get the preset and data
-*
-*/
-
-
-#ifndef CAMMSEMCAUDIOVIRTUALIZERENVIRONMENTALPRESETUTILITY_H
-#define CAMMSEMCAUDIOVIRTUALIZERENVIRONMENTALPRESETUTILITY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsemcbasemmfdevsound.h"
-#include <StereoWideningUtility.h>
-#include <StereoWideningUtilityData.h>
-
-
-// CLASS DECLARATION
-
-/**
- *  @since 5.1
- */
-NONSHARABLE_CLASS(CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility)
-        : public CAMMSEMCBaseMMFDevSound
-{
-public:  // destructor
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility();
-
-public: // New functions
-
-    /**
-     * Gets the current preset.
-     *
-     * @return the current preset
-     */
-    void GetPresetAtIndexL(TDes& aPreset ,TInt iPresetIndex);
-
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset       The new preset that will be taken into use
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Creates utilities that can be used to obtain CSterioWidening Utility
-    * and preset data .
-    * Does nothing if the utility already exists.
-    */
-    virtual void PrepareEmptyStereoWideningUtilitiesL();
-
-    /**
-     * Deletes Environmental utilities
-     * Does nothing if the utilities have already been deleted.
-     */
-    virtual void DeleteEmptyStereoWideningUtilities();
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    virtual void GetPresetNamesL(CDesCArray& aPresetNames);
-
-    CStereoWidening * GetStereoWideningAtPresetIndexL(TInt iPresetIndex);
-
-public:
-    /**
-     * c++ constructor.
-     */
-    CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility();
-    /**
-     * 2nd phase constructor.
-     */
-
-    void ConstructL();
-
-protected: // data
-
-    // Available preset names, owned
-    CDesCArrayFlat* iPresetNames;
-    // Used to get preset names and data when the group is empty
-    // (there are no controls in the group, and thus, no actual
-    // control can be used for that purpose).
-    CStereoWideningUtility* iEmptyStereoWideningUtility;
-
-};
-
-#endif // CAMMSEMCAUDIOVIRTUALIZERENVIRONMENTALPRESETUTILITY_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcbasemmfdevsound.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utility to get the preset and data
-*
-*/
-
-
-#ifndef CAMMSEMCBASEMMFDEVSOUND_H
-#define CAMMSEMCBASEMMFDEVSOUND_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <badesca.h>
-#include <mmf/server/sounddevice.h>
-#include <mmf/common/mmfbase.h>
-
-
-// CLASS DECLARATION
-
-/**
- *  Group for effect controls
- *
- *  @since 5.1
- */
-NONSHARABLE_CLASS(CAMMSEMCBaseMMFDevSound)
-        :public CBase, public MDevSoundObserver
-{
-public:  // destructor
-    /**
-    * Destructor.
-    */
-    virtual ~CAMMSEMCBaseMMFDevSound();
-
-public:  // From MDevSoundObserver
-
-    // empty implementation for callback methods from MDevSoundObserver
-    virtual void InitializeComplete(TInt aError);
-    virtual void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}
-    virtual void PlayError(TInt /*aError*/) {}
-
-    virtual void ToneFinished(TInt /*aError*/) {}
-    virtual void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}
-    virtual void RecordError(TInt /*aError*/) {}
-    virtual void ConvertError(TInt /*aError*/) {}
-    virtual void DeviceMessage(TUid /*aMessageType*/,
-                               const TDesC8& /*aMsg*/) {}
-    virtual void SendEventToClient(const TMMFEvent& /*aEvent*/) {}
-
-
-protected:
-    virtual TInt CreateAndInitializeDevSoundL();
-
-    /**
-     * Deletes utilities
-     * Does nothing if the utilities have already been deleted.
-     */
-    virtual void DeleteDevSound();
-
-public:
-    /**
-     * c++ constructor.
-     */
-    CAMMSEMCBaseMMFDevSound();
-    /**
-     * 2nd phase constructor.
-     */
-
-    void ConstructL();
-
-protected:
-
-    CMMFDevSound* iMMFDevSound;
-
-
-private:
-    // Used to wait for Initializing the iMMFDevSound.
-    CActiveSchedulerWait* iActiveSchedulerWait; // Owned.
-
-};
-
-#endif // CAMMSEMCBASEMMFDEVSOUND_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcdistanceattenuationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-#ifndef CAMMSEMCDISTANCEATTENUATIONCONTROL_H
-#define CAMMSEMCDISTANCEATTENUATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<DistanceAttenuationControl.h>
-#include <DistanceAttenuationData.h>
-#include "cammsbasedistanceattenuationcontrol.h"
-
-#include <cmmaemcaudioplayer.h>
-
-using multimedia :: MDistanceAttenuationControl;
-using multimedia :: KDistanceAttenuationEffectControl;
-
-
-// CONSTANTS
-_LIT(KAMMSEMCDistanceAttenuationControl, "DistanceAttenuationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Distance Attenuation effect.
-*  This class delegates Distance Attenuation effect method calls to
-*  CDistanceAttenuation.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCDistanceAttenuationControl): public CAMMSBaseDistanceAttenuationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCDistanceAttenuationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCDistanceAttenuationControl();
-
-public: // Overriden the base class function
-
-    /**
-    * Sets all the 3D audio distance attenuation parameters simultaneously.
-    * Distances are specified in units defined by
-    * "GlobalManager.getUnitsPerMeter()"
-    *
-    * @param aMinDistance The minimum distance, below which the distance
-    * gain is clipped to its maximum value of 1.0.
-    * @param aMaxDistance The maximum distance, beyond which the distance
-    * gain does not decrease any more. The exact behaviour of the gain at
-    * distances beyond the maximum distance depends on the value of the
-    * muteAfterMax.
-    * @param aMuteAfterMax A boolean determining how the distance gain
-    * behaves at distances greater than maxDistance: true if beyond the
-    * maximum distance the source is silent; false if beyond the maximum
-    * distance the source's gain is held constant at the level at the
-    * maximum distance.
-    * @param aRolloffFactor The rolloff factor, specified in thousandths
-    * (1000 representing a rolloff factor of 1.0, 2000 representing 2.0 and
-    * 500 representing 0.5). Higher values cause the distance gain to
-    * attenuate more quickly.
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aMaxDistance <= \a aMinDistance,
-    * \a aMinDistance <= 0, \a aMaxDistance <= 0 or \a aRolloffFactor < 0
-    */
-    void SetParametersL(
-        TInt aMinDistance,
-        TInt aMaxDistance,
-        TBool aMuteAfterMax,
-        TInt aRolloffFactor);
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCDistanceAttenuationControl(CMMAPlayer* aPlayer);
-
-private:  // Data
-
-    CMMAPlayer *iMMAPlayer;
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MDistanceAttenuationControl *iMDistanceAttenuationControl;
-
-};
-
-#endif // CAMMSEMCDISTANCEATTENUATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcequalizercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-#ifndef CAMMSEMCEQUALIZERCONTROL_H
-#define CAMMSEMCEQUALIZERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrolgroup.h"
-//EMC
-#include <EffectControl.h>
-#include <EqualizerControl.h>
-#include "cammsbaseequalizercontrol.h"
-#include <cmmaemcaudioplayer.h>
-//Utility for getting EnvironmentalReverb
-#include "cammsemcequalizerenvironmentalpresetutility.h"
-
-
-using multimedia :: KEqualizerEffectControl;
-using multimedia::MEqualizerControl;
-
-
-// CONSTANTS
-_LIT(KAMMSEMCEqualizerControl, "EqualizerControl");
-_LIT(KAMMSEMCDefaultEqualizerPreset, "smallroom");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Equalizer effect.
-*  This class delegates Equalizer effect method calls to CAudioEqualizer.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCEqualizerControl): public CAMMSBaseEqualizerControl
-{
-public:
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCEqualizerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCEqualizerControl();
-
-public: // New functions
-
-    /**
-    * Gets the gain set for the given equalizer band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The gain set for the given band in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand is out of range.
-    */
-    TInt BandLevelL(TInt aBand);
-
-    /**
-    * Returns the maximum band level supported.
-    *
-    * @return The maximum band level in millibels.
-    */
-    TInt MaxBandLevel();
-
-    /**
-    * Returns the minimum band level supported.
-    *
-    * @return The minimum band level in millibels.
-    */
-    TInt MinBandLevel();
-
-    /**
-    * Returns the band width in Hz for the specified band.
-    *
-    * @param aBand The frequency band whose band width is asked.
-    * The numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @return The band width in Hz for the specified band.
-    */
-    TInt BandWidth(TInt aBand);
-
-    /**
-    * Returns the center frequency in Hz for a given band.
-    *
-    * @param aBand The frequency band whose center frequency
-    * is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The center frequency in Hz for a given band.
-    */
-    TInt CenterFrequency(TInt aBand);
-
-    /**
-    * Returns the cross-over frequency between the given frequency
-    * band (aBand) and the next band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return Crossover frequency.
-    */
-    TInt CrossoverFrequency(TInt aBand);
-
-    /**
-    * Gets the number of frequency bands that the equalizer supports.
-    *
-    * @return The number of frequency bands that the equalizer supports.
-    */
-    TInt NumberOfBands();
-
-    /**
-    * Sets the given equalizer band to the given gain value.
-    *
-    * @param aLevel The new gain in millibels that will be set to the given
-    * band. getMinBandLevel() and getMaxBandLevel() will define the maximum
-    * and minimum values.
-    * @param aBand The frequency band that will have the new gain. The
-    * numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand or \a aLevel is out of range.
-    */
-    void SetBandLevelL(TInt aLevel, TInt aBand);
-
-public: // Functions from base classes
-
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-public: // override the virtual functions from base class CAMMSEffectControl
-
-    void SetEnforcedL(TBool aEnforced);
-    TBool Enforced();
-    void SetScopeL(TInt aScope);
-    TInt Scope();
-    void ApplySettingsL();
-
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCEqualizerControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /** Native audio equalizer */
-    // CAudioEqualizerUtility* iEqualizerUtility;
-
-    /* Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-
-    TBuf<KAMMSMaxPresetNameLength> iPresetName;
-
-    /* Index of the current preset */
-    TInt iCurrentPreset;
-
-    /* Equalizer utility to get preset and data related to that preset*/
-    CAMMSEMCEqualizerEnvironmentalPresetUtility * iAMMSEMCEqualizerEnvironmentalPresetUtility;
-
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Equalizer Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MEqualizerControl *iMEqualizerControl;
-
-};
-
-#endif // CAMMSEMCEQUALIZERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcequalizerenvironmentalpresetutility.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utility to get the preset and data
-*
-*/
-
-
-#ifndef CAMMSEMCEQUALIZERENVIRONMENTALPRESETUTILITY_H
-#define CAMMSEMCEQUALIZERENVIRONMENTALPRESETUTILITY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsemcbasemmfdevsound.h"
-#include <AudioEqualizerUtility.h>
-#include <AudioEqualizerUtilityData.h>
-
-// CLASS DECLARATION
-
-/**
- *  Group for effect controls
- *
- *  @since 5.1
- */
-NONSHARABLE_CLASS(CAMMSEMCEqualizerEnvironmentalPresetUtility)
-        : public CAMMSEMCBaseMMFDevSound
-{
-public:  // destructor
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSEMCEqualizerEnvironmentalPresetUtility();
-
-public: // New functions
-
-    /**
-     * Gets the current preset.
-     *
-     * @return the current preset
-     */
-    void GetPresetAtIndexL(TDes& aPreset ,TInt iPresetIndex);
-
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset       The new preset that will be taken into use
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Creates utilities that can be used to obtain CAudioEqualizer Utility
-    * and preset data .
-    * Does nothing if the utility already exists.
-    */
-    virtual void PrepareEmptyEqualizerUtilitiesL();
-
-    /**
-     * Deletes Environmental utilities
-     * Does nothing if the utilities have already been deleted.
-     */
-    virtual void DeleteEmptyEqualizerUtilities();
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    virtual void GetPresetNamesL(CDesCArray& aPresetNames);
-
-    CAudioEqualizer * GetEqualizerAtPresetIndexL(TInt iPresetIndex);
-
-public:
-    /**
-     * c++ constructor.
-     */
-    CAMMSEMCEqualizerEnvironmentalPresetUtility();
-    /**
-     * 2nd phase constructor.
-     */
-
-    void ConstructL();
-
-protected: // data
-
-    // Available preset names, owned
-    CDesCArrayFlat* iPresetNames;
-    // Pointer to the EqualizerUtility
-    CAudioEqualizerUtility* iEmptyEqualizerUtility;
-
-};
-
-#endif // CAMMSEMCEQUALIZERENVIRONMENTALPRESETUTILITY_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-
-#ifndef CAMMSEMCREVERBCONTROL_H
-#define CAMMSEMCREVERBCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <EnvironmentalReverbBase.h>
-#include <EnvironmentalReverbUtility.h>
-#include "cammseffectcontrol.h"
-#include "cammseffectcontrolgroup.h"
-
-//EMC
-#include <EffectControl.h>
-#include <ReverbControl.h>
-#include <cammsbasereverbcontrol.h>
-#include <cmmaemcaudioplayer.h>
-//Utility for getting EnvironmentalReverb
-#include "cammsemcreverbenvironmentalpresetutility.h"
-
-
-using multimedia :: KReverbEffectControl;
-using multimedia :: MReverbControl;
-
-// CONSTANTS
-_LIT(KAMMSEMCReverbControl, "ReverbControl");
-_LIT(KAMMSEMCDefaultReverbPreset, "smallroom");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb effect.
-*  This class delegates Reverb effect method calls to CReverb.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCReverbControl): public CAMMSBaseReverbControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCReverbControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCReverbControl();
-
-public:  // New functions
-
-    /**
-    * Sets the gain level of the reverberation. The value defines what is
-    * the relative level of the first reflections compared to the sound
-    * source without possible distance attenuations, directivities or
-    * obstructions taken into account.
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    TInt SetReverbLevelL(TInt aLevel);
-
-    /**
-    * Sets the reverberation time of the reverb. The reverberation time is
-    * the time taken for the reverberant sound to attenuate by 60 dB from
-    * its initial level. Typical values are in the range from 100 to 20000
-    * milliseconds.
-    * The implementation might not support long reverberation times.
-    * Therefore, the actual time used might be shorter than the time
-    * specified with this method.
-    *
-    * @param aTime The new reverberation time in milliseconds.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aTime is negative.
-    * From Java API more leave codes are:
-    * - java.lang.IllegalArgumentException - when the given time is
-    * negative
-    * - javax.microedition.media.MediaException - when the changing of the
-    * reverb time is not supported
-    */
-    void SetReverbTimeL(TInt aTime);
-
-    /**
-    * Gets the gain level of the reverberation.
-    *
-    * @return The level of the reverberation in millibels.
-    */
-    TInt ReverbLevel();
-
-    /**
-    * Gets the reverberation time.
-    *
-    * @return The time of the reverberation in milliseconds.
-    */
-    TInt ReverbTime();
-
-    /**
-    * Gets the minimum level of the reverberation.
-    *
-    * @return The minimum level of the reverberation in millibels.
-    */
-    TInt MinReverbLevel();
-
-    /**
-    * Gets the maximum level of the reverberation.
-    *
-    * @return The maximum level of the reverberation in millibels.
-    */
-    TInt MaxReverbLevel();
-
-public: // Functions from base classes
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-public:  // Functions needed by reverb source control
-    /**
-    * Returns the Reverb Control.
-    * CAMMSEMCReverbSourceControl has to use the same instance.
-    * The function creates the instance if they do not exist yet.
-    */
-    MReverbControl * GetReverbControlL();
-
-
-    /**
-     * Returns the Current Preset Index.
-     * CAMMSEMCReverbSourceControl has to use it.
-     */
-
-    TInt CurrentPresetIndex();
-
-public: // override the virtual functions from base class CAMMSEffectControl
-
-    void SetEnforcedL(TBool aEnforced);
-    TBool Enforced();
-    void SetScopeL(TInt aScope);
-    TInt Scope();
-    void ApplySettingsL();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCReverbControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /* Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-
-    TBuf<KAMMSMaxPresetNameLength> iPresetName;
-
-    /* Index of the current preset */
-    TInt iCurrentPreset;
-
-    /* Reverb utility to get Environmental Reverb*/
-    CAMMSEMCReverbEnvironmentalPresetUtility *iAMMSEMCReverbEnvironmentalPresetUtility;
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Reverb Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MReverbControl *iMReverbControl;
-    TInt iEnvReverbLevel;
-
-};
-
-#endif // CAMMSEMCREVERBCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbenvironmentalpresetutility.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Utility to get the preset and data
-*
-*/
-
-
-#ifndef CAMMSEMCREVERBENVIRONMENTALPRESETUTILITY_H
-#define CAMMSEMCREVERBENVIRONMENTALPRESETUTILITY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsemcbasemmfdevsound.h"
-#include <EnvironmentalReverbUtility.h>
-#include <EnvironmentalReverbData.h>
-
-
-// CLASS DECLARATION
-
-/**
- *  Group for effect controls
- *
- *  @since 5.1
- */
-NONSHARABLE_CLASS(CAMMSEMCReverbEnvironmentalPresetUtility)
-        : public CAMMSEMCBaseMMFDevSound
-{
-public:  // destructor
-
-    /**
-     * Destructor.
-     */
-    ~CAMMSEMCReverbEnvironmentalPresetUtility();
-
-public: // New functions
-
-    /**
-     * Gets the current preset.
-     *
-     * @return the current preset
-     */
-    void GetPresetAtIndexL(TDes& aPreset ,TInt iPresetIndex);
-
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset       The new preset that will be taken into use
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Creates utilities that can be used to obtain CEnvironmentalReverb Utility
-    * and preset data .
-    * Does nothing if the utility already exists.
-    */
-    virtual TInt PrepareEmptyReverbUtilitiesL();
-
-    /**
-     * Deletes Environmental utilities
-     * Does nothing if the utilities have already been deleted.
-     */
-    virtual void DeleteEmptyReverbUtilities();
-    /**
-     * Gets list of preset names available.
-     * @param aPresetNames Returned preset names
-     */
-    virtual void GetPresetNamesL(CDesCArray& aPresetNames);
-
-    CEnvironmentalReverb * GetEnvironmentalReverbAtPresetIndexL(TInt iPresetIndex);
-
-    CMMFDevSound* MMFDevSound();
-
-public:
-    /**
-     * c++ constructor.
-     */
-    CAMMSEMCReverbEnvironmentalPresetUtility();
-    /**
-     * 2nd phase constructor.
-     */
-
-    void ConstructL();
-
-protected: // data
-
-    // Available preset names, owned
-    CDesCArrayFlat* iPresetNames;
-    // Used to get preset names and data when the group is empty
-    // (there are no controls in the group, and thus, no actual
-    // control can be used for that purpose).
-    CEnvironmentalReverbUtility* iEmptyEnvironmentalReverbUtility;
-
-};
-
-#endif // CAMMSEMCREVERBENVIRONMENTALPRESETUTILITY_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcreverbsourcecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect reverb source.
-*
-*/
-
-
-#ifndef CAMMSEMCREVERBSOURCECONTROL_H
-#define CAMMSEMCREVERBSOURCECONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <RoomLevelControl.h>
-#include "cammsbasereverbsourcecontrol.h"
-#include <cmmaemcaudioplayer.h>
-// CONSTANTS
-_LIT(KAMMSEMCReverbSourceControl, "ReverbSourceControl");
-
-using multimedia::MRoomLevelControl;
-using multimedia::KRoomLevelEffectControl;
-
-// FORWARD DECLARATIONS
-class CAMMSBaseReverbControl;
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb Source effect.
-*  This class delegates Reverb Source effect method calls to CRoomLevel.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCReverbSourceControl): public CAMMSBaseReverbSourceControl  /*CAMMSControl*/
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    * @param aReverbControl Reverb control belonging to aPlayer.
-    */
-    static CAMMSEMCReverbSourceControl* NewLC(CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aBaseReverbControl);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCReverbSourceControl();
-
-public:  // New functions
-
-    /**
-    * Sets the object specific level for the reverberant sound.
-    * The default value is 0 meaning the natural room gain (set by
-    * ReverbControl's presets).
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    void SetRoomLevelL(TInt aLevel);
-
-public: // Functions from base classes
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    * @param aReverbControl Reverb control belonging to aPlayer.
-    */
-    CAMMSEMCReverbSourceControl(CMMAPlayer* aPlayer,
-                                CAMMSBaseReverbControl* aReverbControl);
-
-private:  // Data
-
-    /** Reverb control belonging to the player */
-    CAMMSBaseReverbControl* iBaseReverbControl;
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC ReverbSource Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MRoomLevelControl* iRoomLevelControl;
-};
-
-#endif // CAMMSEMCREVERBSOURCECONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatordopplercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler of the spectator.
-*
-*/
-
-
-#ifndef CAMMSEMCSPECTATORDOPPLERCONTROL_H
-#define CAMMSEMCSPECTATORDOPPLERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<ListenerDopplerControl.h>
-#include <DopplerData.h>
-#include "cammsdopplercontrol.h"
-#include <cmmaemcaudioplayer.h>  // from MMAPI
-
-using multimedia :: MListenerDopplerControl;
-using multimedia :: KListenerDopplerEffectControl;
-
-// CONSTANTS
-_LIT(KAMMSEMCListenerDopplerControl, "DopplerControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Doppler Control effect for the Spectator.
-*  This class delegates Doppler Control effect method calls to
-*  MListenerDopplerControl.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCSpectatorDopplerControl): public CAMMSDopplerControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCSpectatorDopplerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCSpectatorDopplerControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCSpectatorDopplerControl(CMMAPlayer* aPlayer);
-
-public:
-
-    void SetEnabledL(TBool aDopplerEnabled);
-
-    TBool Enabled();
-
-    void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ);
-
-    void VelocityCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation,
-                               TInt aRadius);
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Spectator Doppler Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MListenerDopplerControl *iMListenerDopplerControl;
-};
-
-#endif // CAMMSEMCSPECTATORDOPPLERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatorlocationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-#ifndef CAMMSEMCSPECTATORLOCATIONCONTROL_H
-#define CAMMSEMCSPECTATORLOCATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<ListenerLocationControl.h>
-#include <LocationData.h>
-#include "cammslocationcontrol.h"
-#include <cmmaemcaudioplayer.h>
-
-using multimedia :: MListenerLocationControl;
-using multimedia :: KListenerLocationEffectControl;
-
-// CONSTANTS
-_LIT(KAMMSEMCSpectatorLocationControl, "LocationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Location Control effect for the Audio source.
-*  This class delegates Location Control effect method calls to
-*  MSourceLocationControl.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCSpectatorLocationControl): public CAMMSLocationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCSpectatorLocationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCSpectatorLocationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCSpectatorLocationControl(CMMAPlayer* aPlayer);
-
-
-public:
-
-    void SetLocationCartesianL(TInt& aX, TInt& aY, TInt& aZ);
-
-    void LocationCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    void SetLocationSphericalL(TInt& aAzimuth, TInt& aElevation,
-                               TInt& aRadius);
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Listener Location Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MListenerLocationControl *iMListenerLocationControl;
-};
-
-#endif // CAMMSEMCSPECTATORLOCATIONCONTROL_H
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammsemcspectatororientationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of the spectator.
-*
-*/
-
-
-#ifndef CAMMSEMCSPECTATORORIENTATIONCONTROL_H
-#define CAMMSEMCSPECTATORORIENTATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include<ListenerOrientationControl.h>
-#include <OrientationData.h>
-#include "cammsorientationcontrol.h"
-#include <cmmaemcaudioplayer.h>
-
-using multimedia :: MListenerOrientationControl;
-using multimedia :: KListenerOrientationEffectControl;
-
-// CONSTANTS
-_LIT(KAMMSEMCSpectatorOrientationControl, "OrientationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Orientation Control effect for the Spectator.
-*  This class delegates Orientation Control effect method calls to
-*  MListenerOrientationControl.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSEMCSpectatorOrientationControl): public CAMMSOrientationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEMCSpectatorOrientationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEMCSpectatorOrientationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEMCSpectatorOrientationControl(CMMAPlayer* aPlayer);
-public:
-    //base class function overidden
-    virtual void SetOrientationL(TInt aHeading, TInt aPitch, TInt aRoll);
-    virtual void SetOrientationL(TInt aFrontX,
-                                 TInt aFrontY,
-                                 TInt aFrontZ,
-                                 TInt aAboveX,
-                                 TInt aAboveY,
-                                 TInt aAboveZ);
-
-    virtual void OrientationVectors(TInt& aFrontX,
-                                    TInt& aFrontY,
-                                    TInt& aFrontZ,
-                                    TInt& aAboveX,
-                                    TInt& aAboveY,
-                                    TInt& aAboveZ);
-
-
-private:
-
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Listener Orientation Control
-    */
-
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MListenerOrientationControl *iMListenerOrientationControl;
-
-};
-
-#endif // CAMMSEMCSPECTATORORIENTATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.emc/cammspancontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the panning of a Player in the stereo output mix.
-*
-*/
-
-
-#ifndef CAMMSPANCONTROL_H
-#define CAMMSPANCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <mmfstandardcustomcommands.h>
-#include <midiclientutility.h>
-#include "cammscontrol.h"
-
-//EMC header
-#include <BalanceControl.h>
-#include <cmmaemcaudioplayer.h>
-using multimedia :: MBalanceControl;
-using multimedia :: KBalanceEffectControl;
-// CONSTANTS
-_LIT(KAMMSPanControl, "PanControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Panning effect.
-*  This class delegates Pan effect method calls to CBalance.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSPanControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSPanControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSPanControl();
-
-public: // New functions
-
-    /**
-    * Gets the current panning set.
-    *
-    * @return The current balance or panning setting.
-    */
-    TInt PanL();
-
-    /**
-    * Sets the panning using a linear point scale with values between -100
-    * and 100. 0 represents panning for both channels, -100 full panning to
-    * the left and 100 full panning to the right. If the given panning
-    * value is less than -100 or greater than 100, the panning will be set
-    * to -100 or 100, respectively.
-    *
-    * @param aPan The new panning to be set.
-    *
-    * @return The panning that was actually set.
-    */
-    TInt SetPanL(TInt aPan);
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSPanControl(CMMAPlayer* aPlayer);
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-
-
-private:  // Data
-
-    /** Client class to access Audio Play Device functionality, owned */
-    RMMFAudioPlayDeviceCustomCommands* iRMMFAudioPlayDeviceCustomCommands;
-
-    /** CMidiClientUtility, not owned. */
-    CMidiClientUtility* iMidiClientUtility;
-private:
-    CMMAPlayer *iMMAPlayer;
-    /**
-    * EMC Pan Control
-    */
-    CMultimediaFactory* iFactory;
-    MStreamControl* iStreamControl;
-    MBalanceControl *iMBalanceControl;
-};
-
-#endif // CAMMSPANCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc.mmf/cammspancontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the panning of a Player in the stereo output mix.
-*
-*/
-
-
-#ifndef CAMMSPANCONTROL_H
-#define CAMMSPANCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <MMFStandardCustomCommands.h>
-#include <MidiClientUtility.h>
-#include "CAMMSControl.h"
-
-// CONSTANTS
-_LIT(KAMMSPanControl, "PanControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Panning effect.
-*  This class delegates Pan effect method calls to CBalance.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSPanControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSPanControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSPanControl();
-
-public: // New functions
-
-    /**
-    * Gets the current panning set.
-    *
-    * @return The current balance or panning setting.
-    */
-    TInt PanL();
-
-    /**
-    * Sets the panning using a linear point scale with values between -100
-    * and 100. 0 represents panning for both channels, -100 full panning to
-    * the left and 100 full panning to the right. If the given panning
-    * value is less than -100 or greater than 100, the panning will be set
-    * to -100 or 100, respectively.
-    *
-    * @param aPan The new panning to be set.
-    *
-    * @return The panning that was actually set.
-    */
-    TInt SetPanL(TInt aPan);
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSPanControl(CMMAPlayer* aPlayer);
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-
-
-private:  // Data
-
-    /** Client class to access Audio Play Device functionality, owned */
-    RMMFAudioPlayDeviceCustomCommands* iRMMFAudioPlayDeviceCustomCommands;
-
-    /** CMidiClientUtility, not owned. */
-    CMidiClientUtility* iMidiClientUtility;
-};
-
-#endif // CAMMSPANCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsaudiodopplercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an effect called Doppler.
-*
-*/
-
-
-#ifndef CAMMSAUDIODOPPLERCONTROL_H
-#define CAMMSAUDIODOPPLERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <SourceDopplerBase.h>
-#include <CustomCommandUtility.h>
-#include "cammsdopplercontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSAudioDopplerControl, "DopplerControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Doppler Control effect for the Audio source.
-*  This class delegates Doppler Control effect method calls to
-*  CSourceDoppler.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSAudioDopplerControl): public CAMMSDopplerControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    *
-    */
-    static CAMMSAudioDopplerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSAudioDopplerControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSAudioDopplerControl(CMMAPlayer* aPlayer);
-};
-
-#endif // CAMMSAUDIODOPPLERCONTROL_H
--- a/javauis/amms_qt/mmacontrol/inc/cammsaudiolocationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-#ifndef CAMMSAUDIOLOCATIONCONTROL_H
-#define CAMMSAUDIOLOCATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <SourceLocationBase.h>
-#include <CustomCommandUtility.h>
-#include "cammslocationcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSAudioLocationControl, "LocationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Location Control effect for the Audio source.
-*  This class delegates Location Control effect method calls to
-*  CSourceLocation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSAudioLocationControl): public CAMMSLocationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSAudioLocationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSAudioLocationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSAudioLocationControl(CMMAPlayer* aPlayer);
-};
-
-#endif // CAMMSAUDIOLOCATIONCONTROL_H
--- a/javauis/amms_qt/mmacontrol/inc/cammsaudiooutputcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +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:  Manipulates the audio output mode.
-*
-*/
-#ifndef CAMMSAUDIOOUTPUTCONTROL_H
-#define CAMMSAUDIOOUTPUTCONTROL_H
-
-//  INCLUDES
-#include "cammscontrol.h"
-#include <cmmamidiplayer.h>
-#include <mmmaplayerstatelistener.h>
-// for audio routing control
-#include <AudioOutput.h>
-
-// for audio routing observers
-#include <MAudioOutputObserver.h>
-#include <AccMonitor.h>
-#include <AccMonitorInfo.h>
-
-
-
-
-// CONSTANTS
-_LIT(KAMMSAudioOutputControl, "AudioOutputControl");
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Audio Routing.
-*  This class delegates Audio Routing setting calls to RMMFController.
-*
-*
-*  @since X.X
-*/
-NONSHARABLE_CLASS(CAMMSAudioOutputControl)
-        : public CAMMSControl, public MMMAPlayerStateListener ,public MAudioOutputObserver,public MAccMonitorObserver
-{
-public:
-    // Constructors and destructor
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSAudioOutputControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSAudioOutputControl();
-
-public:
-    // New functions
-    /**
-    * Sets the AudioOutput.
-    *
-    * @param aPreference The new AudioOutput to be set.
-    */
-    TInt SetAudioOutput(TInt aPreference);
-
-    /**
-    * Gets the Audio Routing preference.
-    *
-    * @return The previously set Audio Routing preference.
-    */
-    TInt GetAudioOutput();
-    /**
-    * Reset the AudioOutput java object with changed value of current
-    */
-    void GetCurrentPreference();
-    /**
-    * Gets the Audio Routing preference.
-    *
-    * @return The previously set Audio Routing preference. and if not set retruns the device default
-    */
-
-    TInt GetCurrentPrefInt();
-    /**
-    * Gets the Audio Routing Device Default.
-    *
-    * @returns the device default
-    */
-    TInt GetDeviceDefaultPreference();
-    /**
-    * Create an Observer to get the notification for the Headset state.
-    * Also initializes iCurrentActualPreference with CAudioOutput::EPrivate if headset is connected.
-    * @returns the device default
-    */
-    void CreateHeadsetStateObserverL();
-    /**
-    * Actual native control is created using this function
-    */
-    void CreateNativeAudioOutputControlL();
-    /**
-    * seting java object used to send as callback event
-    */
-    void SetJavaAudioOutputObject(jobject object);
-    /**
-    * Reset the value of java object with current values
-    */
-    void ResetJavaAudioOutputObject();
-    /**
-    * Check if there is any change in Current output Mode,It sends a event to java
-    * If there is no change it returns silently
-    */
-    void NotifyJavaOnChange();
-
-
-public:
-    // From MMMAPlayerStateListener
-    void StateChanged(TInt aState);
-
-
-public:
-    // From MAudioOutputObserver
-    void DefaultAudioOutputChanged(CAudioOutput& aAudioOutput,  CAudioOutput::TAudioOutputPreference aNewDefault);
-    void DisconnectedL(CAccMonitorInfo *aAccessoryInfo);
-    void ConnectedL(CAccMonitorInfo* aAccessoryInfo);
-    void AccMonitorObserverError(TInt aError);
-
-public:
-    // Functions from base classes
-    const TDesC& ClassName() const;
-
-protected:
-    // New functions
-    /**
-    * @param aAmmsPreference AMMS preference to be set.
-    */
-    TInt SetAudioOutputToMmf(CAudioOutput::TAudioOutputPreference aAmmsPreference);
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSAudioOutputControl(CMMAPlayer* aPlayer);
-
-    /**
-    * Symbian 2nd phase constructor.
-    */
-    void ConstructL();
-
-private:
-    //Data
-    // Preference visible in AMMS.
-    CAudioOutput::TAudioOutputPreference iRoutingUserPreference;
-    // Preference of the device changes by inserting/removing Jack.
-    CAudioOutput::TAudioOutputPreference iDefaultDevicePreference;
-    // Preference of the device changes by inserting/removing Jack.
-    TInt iCurrentPreference;
-    // owned
-    CAudioOutput* iAudioOutput;
-    CMMAPlayer::TPlayerState playerState;
-    //To get the peripheral attached/detached notification
-    CAccMonitorInfo* iAccessoryInfo;
-    RAccMonCapabilityArray capabilityArray;
-    CAccMonitor *iAccMonitor;
-    RConnectedAccessories array;
-    jobject iJavaAudioOutputObj;
-    JNIEnv* iJni;
-
-};
-
-#endif // CAMMSAUDIOOUTPUTCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsaudioplayerbuilder.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder for adding AMMS audio player controls.
-*
-*/
-
-
-#ifndef CAMMSAUDIOPLAYERBUILDER_H
-#define CAMMSAUDIOPLAYERBUILDER_H
-
-//  INCLUDES
-#include "cammsplayerbuilder.h"
-
-
-// CLASS DECLARATION
-
-/**
-*
-*  AudioControl player builder.
-*  This class adds AMMS audio player controls.
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSAudioPlayerBuilder): public CAMMSPlayerBuilder
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSAudioPlayerBuilder* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSAudioPlayerBuilder();
-
-public: // Funtions from base classes
-    /**
-    * Adds the AMMS audio controls to the player
-    *
-    * @param aPlayer The Player where the AMMS controls are added
-    */
-    void PreparePlayerL(CMMAPlayer* aPlayer);
-
-private:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSAudioPlayerBuilder();
-
-};
-
-#endif // CAMMSAUDIOPLAYERBUILDER_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsaudiovirtualizercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Virtualizes audio channels.
-*
-*/
-
-
-#ifndef CAMMSAUDIOVIRTUALIZERCONTROL_H
-#define CAMMSAUDIOVIRTUALIZERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <StereoWideningBase.h>
-#include <StereoWideningUtility.h>
-#include <CustomCommandUtility.h>
-#include "cammseffectcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSAudioVirtualizerControl, "AudioVirtualizerControl");
-
-// CLASS DECLARATION
-/**
-*
-*  Controls for the Audio Virtualizer effect.
-*  This class delegates Audio Virtualizer effect method calls to
-*  CStereoWidening.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSAudioVirtualizerControl): public CAMMSEffectControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSAudioVirtualizerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSAudioVirtualizerControl();
-
-public:  // New functions
-
-public: // Functions from base classes
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSAudioVirtualizerControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /** Native Stereo Widening Utility */
-    CStereoWideningUtility* iStereoWideningUtility;
-
-    /** Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-
-    /** Index of the current preset */
-    TInt iCurrentPreset;
-
-};
-
-#endif // CAMMSAUDIOVIRTUALIZERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsbasedistanceattenuationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-#ifndef CAMMSBASEDISTANCEATTENUATIONCONTROL_H
-#define CAMMSBASEDISTANCEATTENUATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSBaseDistanceAttenuationControl, "DistanceAttenuationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Base class for the Distance Attenuation effect.
-*  This class delegates Distance Attenuation effect method calls to
-*  to corresponding control.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSBaseDistanceAttenuationControl): public CAMMSControl
-{
-public:  //destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSBaseDistanceAttenuationControl();
-
-public: // New functions
-
-    virtual void SetParametersL(
-        TInt/* aMinDistance*/,
-        TInt /*aMaxDistance*/,
-        TBool /*aMuteAfterMax*/,
-        TInt /*aRolloffFactor*/) = 0;
-
-public:
-    const TDesC& ClassName() const  = 0;
-
-protected:
-    /**
-    * C++ default constructor, protected to allow access from derived class
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSBaseDistanceAttenuationControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSBASEDISTANCEATTENUATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsbaseequalizercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-#ifndef CAMMSBASEEQUALIZERCONTROL_H
-#define CAMMSBASEEQUALIZERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammseffectcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSBaseEqualizerControl, "EqualizerControl");
-const TInt KAMMSHalfOfSamplingFrequency = 24000000; //in milliHertz
-const TInt KAMMSBandOffset = 1; // Band 0 in JSR-234 equals Band 1 in Effect API
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Equalizer effect.
-*
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSBaseEqualizerControl): public CAMMSEffectControl
-{
-public:
-    /**
-     * Destructor.
-     */
-    ~CAMMSBaseEqualizerControl();
-
-public: // New functions
-
-    /**
-    * Gets the gain set for the given equalizer band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The gain set for the given band in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand is out of range.
-    */
-    virtual TInt BandLevelL(TInt aBand) = 0;
-
-    /**
-    * Returns the maximum band level supported.
-    *
-    * @return The maximum band level in millibels.
-    */
-    virtual TInt MaxBandLevel() = 0;
-
-    /**
-    * Returns the minimum band level supported.
-    *
-    * @return The minimum band level in millibels.
-    */
-    virtual TInt MinBandLevel() = 0;
-
-    /**
-    * Returns the band width in Hz for the specified band.
-    *
-    * @param aBand The frequency band whose band width is asked.
-    * The numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @return The band width in Hz for the specified band.
-    */
-    virtual TInt BandWidth(TInt aBand) = 0;
-
-    /**
-    * Returns the center frequency in Hz for a given band.
-    *
-    * @param aBand The frequency band whose center frequency
-    * is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The center frequency in Hz for a given band.
-    */
-    virtual TInt CenterFrequency(TInt aBand) = 0;
-
-    /**
-    * Returns the cross-over frequency between the given frequency
-    * band (aBand) and the next band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return Crossover frequency.
-    */
-    virtual TInt CrossoverFrequency(TInt aBand) = 0;
-
-    /**
-    * Gets the number of frequency bands that the equalizer supports.
-    *
-    * @return The number of frequency bands that the equalizer supports.
-    */
-    virtual TInt NumberOfBands() = 0;
-
-    /**
-    * Sets the given equalizer band to the given gain value.
-    *
-    * @param aLevel The new gain in millibels that will be set to the given
-    * band. getMinBandLevel() and getMaxBandLevel() will define the maximum
-    * and minimum values.
-    * @param aBand The frequency band that will have the new gain. The
-    * numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand or \a aLevel is out of range.
-    */
-    virtual void SetBandLevelL(TInt aLevel, TInt aBand) = 0;
-
-public:
-    virtual const TDesC& ClassName() const = 0;
-
-protected:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSBaseEqualizerControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSBASEEQUALIZERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsbasereverbcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-#ifndef CAMMSBASEREVERBCONTROL_H
-#define CAMMSBASEREVERBCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <EnvironmentalReverbBase.h>
-#include <EnvironmentalReverbUtility.h>
-#include <CustomCommandUtility.h>
-#include "cammseffectcontrol.h"
-// only require if platform support EMC
-#ifdef RD_JAVA_HTTP_EMC_ENABLED
-#include <ReverbControl.h>
-#endif
-// CONSTANTS
-_LIT(KAMMSBaseReverbControl, "ReverbControl");
-_LIT(KAMMSBaseDefaultReverbPreset, "smallroom");
-
-// only require if platform support EMC
-#ifdef RD_JAVA_HTTP_EMC_ENABLED
-using multimedia :: MReverbControl;
-#endif
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb effect.
-*  This class delegates Reverb effect method calls to CReverb.
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSBaseReverbControl): public CAMMSEffectControl
-{
-public:  // destructor
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSBaseReverbControl();
-
-public:  // New functions
-
-    /**
-    * Sets the gain level of the reverberation. The value defines what is
-    * the relative level of the first reflections compared to the sound
-    * source without possible distance attenuations, directivities or
-    * obstructions taken into account.
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    virtual TInt SetReverbLevelL(TInt aLevel) = 0;
-
-    /**
-    * Sets the reverberation time of the reverb. The reverberation time is
-    * the time taken for the reverberant sound to attenuate by 60 dB from
-    * its initial level. Typical values are in the range from 100 to 20000
-    * milliseconds.
-    * The implementation might not support long reverberation times.
-    * Therefore, the actual time used might be shorter than the time
-    * specified with this method.
-    *
-    * @param aTime The new reverberation time in milliseconds.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aTime is negative.
-    * From Java API more leave codes are:
-    * - java.lang.IllegalArgumentException - when the given time is
-    * negative
-    * - javax.microedition.media.MediaException - when the changing of the
-    * reverb time is not supported
-    */
-    virtual void SetReverbTimeL(TInt aTime) = 0;
-
-    /**
-    * Gets the gain level of the reverberation.
-    *
-    * @return The level of the reverberation in millibels.
-    */
-    virtual TInt ReverbLevel() = 0;
-
-    /**
-    * Gets the reverberation time.
-    *
-    * @return The time of the reverberation in milliseconds.
-    */
-    virtual TInt ReverbTime() = 0;
-
-    /**
-    * Gets the minimum level of the reverberation.
-    *
-    * @return The minimum level of the reverberation in millibels.
-    */
-    virtual TInt MinReverbLevel() = 0;
-
-    /**
-    * Gets the maximum level of the reverberation.
-    *
-    * @return The maximum level of the reverberation in millibels.
-    */
-    virtual TInt MaxReverbLevel() = 0;
-
-    /**
-    * Gets the current preset index.
-    *
-    */
-    virtual TInt CurrentPresetIndex() = 0;
-
-public:
-
-    virtual const TDesC& ClassName() const = 0;
-
-
-public:  // Functions needed by reverb source control
-
-    /**
-     * Returns the environmental reverb utility.
-     * ReverbSourceControl has to use the same instance.
-     * The function creates the instance if they do not exist yet.
-     *
-     * @param aEnvironmentalReverbUtility Returned utility instance.
-     */
-    virtual void GetEnvironmentalReverbUtilityL(
-        CEnvironmentalReverbUtility** aEnvironmentalReverbUtility);
-    // only require if platform support EMC
-#ifdef RD_JAVA_HTTP_EMC_ENABLED
-    virtual MReverbControl* GetReverbControlL();
-#endif
-protected:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSBaseReverbControl(CMMAPlayer* aPlayer);
-
-
-};
-
-#endif // CAMMSBASEREVERBCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsbasereverbsourcecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class behaves like interface of an audio effect reverb source.
-*
-*/
-
-
-#ifndef CAMMSBASEREVERBSOURCECONTROL_H
-#define CAMMSBASEREVERBSOURCECONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSBaseReverbSourceControl, "ReverbSourceControl");
-
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb Source effect.
-*  This class delegates Base class of Reverb Source effect method .
-*
-*
-*  @since 5.1
-*/
-NONSHARABLE_CLASS(CAMMSBaseReverbSourceControl): public CAMMSControl
-{
-public:
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSBaseReverbSourceControl();
-
-public:
-    /**
-    * Sets the object specific level for the reverberant sound.
-    * The default value is 0 meaning the natural room gain (set by
-    * ReverbControl's presets).
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    virtual void SetRoomLevelL(TInt aLevel) = 0;
-
-public:
-
-    const TDesC& ClassName() const = 0;
-
-protected:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    * @param aReverbControl Reverb control belonging to aPlayer.
-    */
-    CAMMSBaseReverbSourceControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSBASEREVERBSOURCECONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammscontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for AMMS controls.
-*
-*/
-
-
-#ifndef CAMMSCONTROL_H
-#define CAMMSCONTROL_H
-//  INCLUDES
-#include <e32base.h>
-#include <cmmacontrol.h>
-#include "ammsconstants.h"
-// RD_JAVA_HTTP_EMC_ENABLED
-#ifdef RD_JAVA_HTTP_EMC_ENABLED
-#include "StreamControl.h"
-#include "EffectControl.h"
-#include "MMControlFactory.h"
-using namespace multimedia;
-using multimedia ::MStreamControl;
-using multimedia ::MEffectControl;
-using multimedia ::CMultimediaFactory;
-#endif
-
-// FORWARD DECLARATIONS
-class CCustomCommandUtility;
-class CMMAPlayer;
-
-// CLASS DECLARATION
-
-/**
-*
-*  Base class for AMMS controls.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSControl): public CMMAControl
-{
-public:
-    /**
-    * Destructor.
-    */
-    virtual ~CAMMSControl();
-
-public: // New functions
-    /**
-    * Creates the custom command utility.
-    * @since 3.0
-    */
-    CCustomCommandUtility* CreateCustomCommandUtilityL();
-
-    /**
-    * Prepares the Control by creating the Effect API Control.
-    */
-    virtual void PrepareControlL();
-
-    /**
-    * Deallocates the Control by deleting the Effect API Control.
-    */
-    virtual void DeallocateControl();
-
-public:  // From CMMAControl
-
-    const TDesC& PublicClassName() const;
-
-protected:
-
-    /**
-    * C++ default constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSControl(CMMAPlayer* aPlayer);
-
-public:  // Data
-
-    /** Type of the Control */
-    TAMMSControlTypes iControlType;
-
-protected:   // Data
-
-    CMMAPlayer* iPlayer;  // Not owned.
-};
-
-#endif // CAMMSCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammscustomcommandutility.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Custom command utility class for AMMS custom commands.
-*
-*/
-
-
-#ifndef CAMMSCUSTOMCOMMANDUTILITY_H
-#define CAMMSCUSTOMCOMMANDUTILITY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <CustomCommandUtility.h>
-#include <mmfcontroller.h>
-
-// CLASS DECLARATION
-
-/**
-*
-*  Custom command Utility implementation class.
-*  This class is used to deliver custom commands to MMFController.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSCustomCommandUtility): public CCustomCommandUtility
-{
-public:  // Constructors and destructor
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSCustomCommandUtility* NewL(
-        RMMFController& aMMFController);
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSCustomCommandUtility* NewLC(
-        RMMFController& aMMFController);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSCustomCommandUtility();
-
-public: // New functions
-
-public: // Functions from base classes
-
-    TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
-                           TInt                         aFunction,
-                           const TDesC8&                      aDataTo1,
-                           const TDesC8&                      aDataTo2,
-                           TDes8&                       aDataFrom);
-
-    TInt CustomCommandSync(const TMMFMessageDestinationPckg&  aDestination,
-                           TInt                         aFunction,
-                           const TDesC8&                      aDataTo1,
-                           const TDesC8&                      aDataTo2);
-
-    void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
-                            TInt                        aFunction,
-                            const TDesC8&                     aDataTo1,
-                            const TDesC8&                     aDataTo2,
-                            TDes8&                      aDataFrom,
-                            TRequestStatus&             aStatus);
-
-    void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,
-                            TInt                        aFunction,
-                            const TDesC8&                     aDataTo1,
-                            const TDesC8&                     aDataTo2,
-                            TRequestStatus&             aStatus);
-
-private:
-    /**
-    * C++ constructor.
-    */
-    CAMMSCustomCommandUtility(RMMFController& aMMFController);
-
-private:  // Data
-
-    RMMFController& iMMFController;
-
-};
-
-#endif // CAMMSCUSTOMCOMMANDUTILITY_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsdistanceattenuationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-#ifndef CAMMSDISTANCEATTENUATIONCONTROL_H
-#define CAMMSDISTANCEATTENUATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <DistanceAttenuationBase.h>
-#include <CustomCommandUtility.h>
-#include "cammsbasedistanceattenuationcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSDistanceAttenuationControl, "DistanceAttenuationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Distance Attenuation effect.
-*  This class delegates Distance Attenuation effect method calls to
-*  CDistanceAttenuation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSDistanceAttenuationControl): public CAMMSBaseDistanceAttenuationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSDistanceAttenuationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSDistanceAttenuationControl();
-
-public: // override base class functions
-
-    /**
-    * Sets all the 3D audio distance attenuation parameters simultaneously.
-    * Distances are specified in units defined by
-    * "GlobalManager.getUnitsPerMeter()"
-    *
-    * @param aMinDistance The minimum distance, below which the distance
-    * gain is clipped to its maximum value of 1.0.
-    * @param aMaxDistance The maximum distance, beyond which the distance
-    * gain does not decrease any more. The exact behaviour of the gain at
-    * distances beyond the maximum distance depends on the value of the
-    * muteAfterMax.
-    * @param aMuteAfterMax A boolean determining how the distance gain
-    * behaves at distances greater than maxDistance: true if beyond the
-    * maximum distance the source is silent; false if beyond the maximum
-    * distance the source's gain is held constant at the level at the
-    * maximum distance.
-    * @param aRolloffFactor The rolloff factor, specified in thousandths
-    * (1000 representing a rolloff factor of 1.0, 2000 representing 2.0 and
-    * 500 representing 0.5). Higher values cause the distance gain to
-    * attenuate more quickly.
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aMaxDistance <= \a aMinDistance,
-    * \a aMinDistance <= 0, \a aMaxDistance <= 0 or \a aRolloffFactor < 0
-    */
-    void SetParametersL(
-        TInt aMinDistance,
-        TInt aMaxDistance,
-        TBool aMuteAfterMax,
-        TInt aRolloffFactor);
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSDistanceAttenuationControl(CMMAPlayer* aPlayer);
-
-private:  // Data
-
-    /** Native distance attenuation */
-    CDistanceAttenuation* iDistanceAttenuation;
-
-
-};
-
-#endif // CAMMSDISTANCEATTENUATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsdopplercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an effect called Doppler.
-*
-*/
-
-
-#ifndef CAMMSDOPPLERCONTROL_H
-#define CAMMSDOPPLERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <DopplerBase.h>
-#include "cammscontrol.h"
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Doppler effect.
-*  This class delegates Doppler effect method calls to CDoppler.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSDopplerControl): public CAMMSControl
-{
-public:  // Destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSDopplerControl();
-
-public: // New functions
-    /**
-    * Specifies if this Doppler effect is active or ignored. In case the
-    * DopplerControl is fetched from the Spectator, this method does not
-    * affect anything.
-    *
-    * @param aEnabled The boolean specifying if this Doppler effect is to
-    * be applied.
-    *
-    * @par Leaving:
-    * From Java API there are no leave codes, but the uset EffectControl's
-    * method leaves with the sama way as in effect control, if:
-    * - the effect cannot be enabled in this state of the player.
-    * - enabling is not supported (with the scope set).
-    */
-    virtual void SetEnabledL(TBool aDopplerEnabled);
-
-    /**
-    * Returns whether this Doppler effect is currently active.
-    *
-    * @return The boolean, true if Doppler is being applied.
-    */
-    virtual TBool Enabled();
-
-    /**
-    * Sets the velocity, used in calculations for the Doppler effect.
-    *
-    * The velocity is specified using right-handed cartesian components in
-    * units defined by GlobalManager.getUnitsPerMeter(). For example, if
-    * the x parameter is specified to be 5000 and
-    * GlobalManager.getUnitsPerMeter() returns 1000 the actual x component
-    * will be 5 m/s. The same applies to y and z parameters.
-    *
-    * @param aX The x-coordinate of the new velocity.
-    * @param aY The y-coordinate of the new velocity.
-    * @param aZ The z-coordinate of the new velocity.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - coordinates are not correct.
-    */
-    virtual void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ);
-
-    /**
-    * Returns the current velocity, used in calculations for the Doppler
-    * effect. The velocity is specified using right-handed cartesian
-    * components in units defined by GlobalManager.getUnitsPerMeter().
-    * The referenced memory of arguments will contain the coordinate values.
-    *
-    * @param aX The x-coordinate of the velocity.
-    * @param aY The y-coordinate of the velocity.
-    * @param aZ The z-coordinate of the velocity.
-    */
-    virtual void VelocityCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    /**
-    * Sets the velocity, used in calculations for the Doppler effect.
-    *
-    * The velocity is specified using spherical components. The radius
-    * component is specified in units defined by
-    * GlobalManager.getUnitsPerMeter(). For example, if the radius
-    * parameter is specified to be 5000 and
-    * GlobalManager.getUnitsPerMeter() returns 1000 the actual radius
-    * component will be 5 m/s.
-    *
-    * @param aAzimuth The azimuth angle of the new velocity in degrees.
-    * @param aElevation The elevation angle of the new velocity in degrees.
-    * @param aRadius The magnitude of the new velocity (namely the speed).
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - coordinates are not correct.
-    */
-    virtual void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation,
-                                       TInt aRadius);
-
-protected:
-    /**
-    * C++ default constructor, protected to allow access from derived class
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSDopplerControl(CMMAPlayer* aPlayer);
-
-
-protected:  // Data
-
-    /* Native Doppler effect, set from derived classes */
-    CDoppler* iDopplerEffect;
-};
-
-#endif // CAMMSDOPPLERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammseffectcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls an abstract filter with various preset settings.
-*
-*/
-
-
-#ifndef CAMMSEFFECTCONTROL_H
-#define CAMMSEFFECTCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <badesca.h>
-#include <AudioEffectBase.h>
-#include "cammscontrol.h"
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the audio effect control.
-*  This class delegates Audio Effect method calls to native
-*  audio effect (created either in CAMMSEqualizerControl or
-*  in CAMMSReverbControl).
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSEffectControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSEffectControl();
-
-public: // New functions
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    virtual void SetPresetL(const TDesC& aPreset) = 0;
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    virtual const CDesCArray& PresetNamesL() = 0;
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    virtual const TDesC& PresetL() = 0;
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    virtual void SetEnabledL(TBool aEnable) = 0;
-
-//Making the following funcitons virtual because of EMC added functionalities
-    /**
-    * Enforces the effect to be in use. If this is an EffectControl of a
-    * MediaProcessor, the enforced setting does not affect in any way.
-    *
-    * @param aPreset The boolean value - true if the effect is essential
-    * and cannot be dropped, false if the effect can be dropped if the
-    * system runs out of resources.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - some error happened.
-    */
-    virtual void SetEnforcedL(TBool aEnforced);
-
-    /**
-    * Returns the current enforced setting of the effect.
-    *
-    * @return The boolean, true if the effect is an enforced effect, false
-    * if not.
-    */
-    virtual TBool Enforced();
-
-    /**
-    * Sets the scope of the effect. If this is an EffectControl of the
-    * MediaProcessor, the scope setting does not affect in anything.
-    *
-    * @param aScope SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY or
-    * SCOPE_LIVE_AND_RECORD.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - javax.microedition.media.MediaException - if the given scope is
-    * not supported
-    */
-    virtual void SetScopeL(TInt aScope);
-
-    /**
-    * Returns the scope in which the effect is present.
-    *
-    * @return SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY or SCOPE_LIVE_AND_RECORD.
-    */
-    virtual TInt Scope();
-
-protected:
-    /**
-    * C++ default constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEffectControl(CMMAPlayer* aPlayer);
-
-protected:
-    /**
-    * Apply changed settings if Effect is in enabled state.
-    */
-    virtual void ApplySettingsL();
-
-protected:
-    /**
-    * By default Symbian 2nd phase constructor is private,
-    * but allow now the base class to access ConstructL.
-    */
-    void ConstructL();
-
-protected: // Data
-
-    /* Native audio effect */
-    CAudioEffect* iAudioEffect;
-
-};
-
-#endif // CAMMSEFFECTCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsequalizercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-#ifndef CAMMSEQUALIZERCONTROL_H
-#define CAMMSEQUALIZERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <AudioEqualizerBase.h>
-#include <AudioEqualizerUtility.h>
-#include <CustomCommandUtility.h>
-#include "cammsbaseequalizercontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSEqualizerControl, "EqualizerControl");
-
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Equalizer effect.
-*  This class delegates Equalizer effect method calls to CAudioEqualizer.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSEqualizerControl): public CAMMSBaseEqualizerControl
-{
-public:
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSEqualizerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEqualizerControl();
-
-public: // New functions
-
-    /**
-    * Gets the gain set for the given equalizer band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The gain set for the given band in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand is out of range.
-    */
-    TInt BandLevelL(TInt aBand);
-
-    /**
-    * Returns the maximum band level supported.
-    *
-    * @return The maximum band level in millibels.
-    */
-    TInt MaxBandLevel();
-
-    /**
-    * Returns the minimum band level supported.
-    *
-    * @return The minimum band level in millibels.
-    */
-    TInt MinBandLevel();
-
-    /**
-    * Returns the band width in Hz for the specified band.
-    *
-    * @param aBand The frequency band whose band width is asked.
-    * The numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @return The band width in Hz for the specified band.
-    */
-    TInt BandWidth(TInt aBand);
-
-    /**
-    * Returns the center frequency in Hz for a given band.
-    *
-    * @param aBand The frequency band whose center frequency
-    * is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return The center frequency in Hz for a given band.
-    */
-    TInt CenterFrequency(TInt aBand);
-
-    /**
-    * Returns the cross-over frequency between the given frequency
-    * band (aBand) and the next band.
-    *
-    * @param aBand The frequency band whose gain is asked. The numbering of
-    * the bands starts from 0 and ends at (getNumberOfBands() - 1).
-    *
-    * @return Crossover frequency.
-    */
-    TInt CrossoverFrequency(TInt aBand);
-
-    /**
-    * Gets the number of frequency bands that the equalizer supports.
-    *
-    * @return The number of frequency bands that the equalizer supports.
-    */
-    TInt NumberOfBands();
-
-    /**
-    * Sets the given equalizer band to the given gain value.
-    *
-    * @param aLevel The new gain in millibels that will be set to the given
-    * band. getMinBandLevel() and getMaxBandLevel() will define the maximum
-    * and minimum values.
-    * @param aBand The frequency band that will have the new gain. The
-    * numbering of the bands starts from 0 and ends at
-    * (getNumberOfBands() - 1).
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aBand or \a aLevel is out of range.
-    */
-    void SetBandLevelL(TInt aLevel, TInt aBand);
-
-public: // Functions from base classes
-
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSEqualizerControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /** Native audio equalizer */
-    CAudioEqualizerUtility* iEqualizerUtility;
-
-    /* Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-
-    /* Index of the current preset */
-    TInt iCurrentPreset;
-
-};
-
-#endif // CAMMSEQUALIZERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammslocationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of an object.
-*
-*/
-
-
-#ifndef CAMMSLOCATIONCONTROL_H
-#define CAMMSLOCATIONCONTROL_H
-
-//  INCLUDES
-#include <LocationBase.h>
-#include "cammscontrol.h"
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Location Control effect.
-*  This class delegates Location Control effect method calls to
-*  CSourceLocation or CListenerLocation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSLocationControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSLocationControl();
-
-public: // New functions
-    /**
-    * Moves the object to the new location.
-    *
-    * Sets the location using cartesian right-handed coordinates that are
-    * relative to the origin. The measures are defined in units specified
-    * by GlobalManager.getUnitsPerMeter().
-    *
-    * @param aX The x-coordinate of the new location.
-    * @param aY The y-coordinate of the new location.
-    * @param aZ The z-coordinate of the new location.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - coordinates are not correct.
-    */
-    virtual void SetLocationCartesianL(TInt& aX, TInt& aY, TInt& aZ);
-
-    /**
-    * Gets the coordinates of the current location. The measures are
-    * defined in units specified by GlobalManager.getUnitsPerMeter(). .
-    *
-    * @param aX The x-coordinate of the location.
-    * @param aY The y-coordinate of the location.
-    * @param aZ The z-coordinate of the location.
-    */
-    virtual void LocationCartesian(TInt& aX, TInt& aY, TInt& aZ);
-
-    /**
-    * Moves the object to the new location.
-    *
-    * Sets the new location using spherical coordinates. The negative
-    * z-axis is the reference. That is, a location where both azimuth and
-    * elevation are zero, is on the negative z-axis. Radius is defined in
-    * units specified by GlobalManager.getUnitsPerMeter().
-    *
-    * @param aAzimuth The azimuth angle of the new location in degrees. The
-    * azimuth is measured from the negative z-axis in the direction of the
-    * x-axis.
-    * @param aElevation The elevation angle of the new location in degrees.
-    * The elevation is measured from the x-z-plane in the direction of the
-    * y-axis.
-    * @param aRadius The radius of the new location from the origin.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aRadius < 0.
-    */
-    virtual void SetLocationSphericalL(TInt& aAzimuth, TInt& aElevation,
-                                       TInt& aRadius);
-
-protected:
-    /**
-    * C++ default constructor, protected to allow access from derived class
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSLocationControl(CMMAPlayer* aPlayer);
-
-protected:  // Data
-
-    /* Native location effect, set from derived classes */
-    CLocation* iLocationEffect;
-};
-
-#endif // CAMMSLOCATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsorientationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of an object.
-*
-*/
-
-
-#ifndef CAMMSORIENTATIONCONTROL_H
-#define CAMMSORIENTATIONCONTROL_H
-
-//  INCLUDES
-#include <OrientationBase.h>
-#include "cammscontrol.h"
-
-// CONSTANS
-_LIT(KAMMSOrientationControl, "OrientationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Orientation Control effect.
-*  This class delegates Orientation Control effect method calls to
-*  CListenerOrientation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSOrientationControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSOrientationControl();
-
-public: // New functions
-    /**
-    * Turns the object to the new orientation.
-    *
-    * The new orientation is given using rotation angles. A zero vector
-    * corresponds to the orientation pointing directly towards the negative
-    * Z-axis. Orientation is applied in the following order: heading,
-    * pitch, and roll. Therefore, notice that heading turns the X-axis and
-    * therefore affects the pitch, and similarly heading and pitch turn the
-    * Z-axis and therefore affect the roll.
-    *
-    * @param aHeading The rotation around the Y-axis in degrees.
-    * @param aPitch The rotation around the X-axis in degrees.
-    * @param aRoll The rotation around the Z-axis in degrees.
-    */
-    virtual void SetOrientationL(TInt aHeading, TInt aPitch, TInt aRoll);
-
-    /**
-    * Turns the object to the new orientation.
-    *
-    * The orientation is specified using two vectors, one specifying the
-    * direction of the front vector of the object in world coordinates, and
-    * another specifying the "above" vector of the object. The right and up
-    * vectors of the object are calculated by first normalizing both source
-    * vectors, then calculating the right vector as the cross product of the
-    * "above" vector and the front vector, and the up vector as a cross
-    * product of the front and right vectors.
-    *
-    * Because both vectors are normalized, they may be of any length.
-    *
-    * @param aFrontX X value of Front vector
-    * @param aFrontY Y value of Front vector
-    * @param aFrontZ Z value of Front vector
-    * @param aAboveX X value of Above vector
-    * @param aAboveY Y value of Above vector
-    * @param aAboveZ Z value of Above vector
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - In case any of the parameters is a zero vector
-    * or they are parallel to each other.
-    * In that case, the orientation of the object remains unchanged.
-    */
-    virtual void SetOrientationL(TInt aFrontX,
-                                 TInt aFrontY,
-                                 TInt aFrontZ,
-                                 TInt aAboveX,
-                                 TInt aAboveY,
-                                 TInt aAboveZ);
-
-    /**
-    * Gets the orientation of the object using two vectors.
-    *
-    * Sets the location using cartesian right-handed coordinates that are
-    * relative to the origin. The measures are defined in units specified
-    * by GlobalManager.getUnitsPerMeter().
-    * Referenced memory of the arguments will contain the coordinate values.
-    *
-    * @param aFrontX X value of Front vector
-    * @param aFrontY Y value of Front vector
-    * @param aFrontZ Z value of Front vector
-    * @param aAboveX X value of Above vector
-    * @param aAboveY Y value of Above vector
-    * @param aAboveZ Z value of Above vector
-    */
-    virtual void OrientationVectors(TInt& aFrontX,
-                                    TInt& aFrontY,
-                                    TInt& aFrontZ,
-                                    TInt& aAboveX,
-                                    TInt& aAboveY,
-                                    TInt& aAboveZ);
-
-protected:
-    /**
-    * C++ default constructor, protected to allow access from derived class
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSOrientationControl(CMMAPlayer* aPlayer);
-
-protected:  // Data
-
-    /* Native orientation effect, set from derived classes */
-    COrientation* iOrientationEffect;
-};
-
-#endif // CAMMSORIENTATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsplayerbuilder.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for AMMS player builders.
-*
-*/
-
-
-#ifndef CAMMSPLAYERBUILDER_H
-#define CAMMSPLAYERBUILDER_H
-
-//  INCLUDES
-#include <cmmaplayer.h>
-
-// CLASS DECLARATION
-
-/**
-*
-*  Base class for AMMS player and control builders.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSPlayerBuilder): public CBase
-{
-public:  // Constructors and destructor
-    /**
-    * Destructor.
-    */
-    ~CAMMSPlayerBuilder();
-
-public: // New methods
-    /**
-    * Adds the AMMS audio controls to the player
-    *
-    * @param aPlayer The MMA Player where the AMMS controls are added
-    */
-    virtual void PreparePlayerL(CMMAPlayer* aPlayer) = 0;
-
-protected: //Protected so derived classes can access
-    /**
-    * C++ default constructor.
-    */
-    CAMMSPlayerBuilder();
-};
-
-#endif // CAMMSPLAYERBUILDER_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsplayerbuildergroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder group for adding players.
-*
-*/
-
-
-#ifndef CAMMSPLAYERBUILDERGROUP_H
-#define CAMMSPLAYERBUILDERGROUP_H
-
-//  INCLUDES
-#include "cammsplayerbuilder.h"
-
-// CLASS DECLARATION
-
-/**
-*
-*  This class is used to add AMMS audio controls to the player.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSPlayerBuilderGroup): public CAMMSPlayerBuilder
-{
-public:  // Constructors and destructor
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSPlayerBuilderGroup* NewL();
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSPlayerBuilderGroup* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSPlayerBuilderGroup();
-
-public: // Funtions from base classes
-    /**
-    * Adds the AMMS audio controls to the player
-    *
-    * @param aPlayer The MMA Player where the AMMS controls are added
-    */
-    virtual void PreparePlayerL(CMMAPlayer* aPlayer);
-
-public: // New methods
-    /**
-    * Adds the AMMS control builder
-    *
-    * @param aPlayerBuilder The AMMS player builder
-    */
-    void AddBuilderAndPopL(CAMMSPlayerBuilder* aPlayerBuilder);
-
-private:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSPlayerBuilderGroup();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private: // Data
-
-    CArrayPtrSeg< CAMMSPlayerBuilder >* iPlayerBuilders; // Owned
-
-};
-
-#endif // CAMMSPLAYERBUILDERGROUP_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsprioritycontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the priority of a Player.
-*
-*/
-
-
-#ifndef CAMMSPRIORITYCONTROL_H
-#define CAMMSPRIORITYCONTROL_H
-
-//  INCLUDES
-#include "cammscontrol.h"
-#include <mmmaplayerstatelistener.h>
-
-// CONSTANTS
-_LIT(KAMMSPriorityControl, "PriorityControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the priority.
-*  This class delegates priority setting calls to RMMFController.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSPriorityControl)
-        : public CAMMSControl, public MMMAPlayerStateListener
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSPriorityControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSPriorityControl();
-
-public: // New functions
-
-    /**
-    * Sets the priority.
-    *
-    * @param aPriority The new priority to be set.
-    */
-    void SetPriorityL(TInt aPriority);
-
-    /**
-    * Gets the priority.
-    *
-    * @return The set priority.
-    */
-    TInt Priority();
-
-public:  // From MMMAPlayerStateListener
-
-    void StateChanged(TInt aState);
-
-public: // Functions from base classes
-
-    const TDesC& ClassName() const;
-
-protected:  // New functions
-
-    /**
-     * Scales the given AMMS priority to MMF priority
-     * and sets it to MMF if the priority has changed.
-     * @param aAmmsPriority AMMS priority to be set.
-     */
-    void SetPriorityToMmfL(TInt aAmmsPriority);
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSPriorityControl(CMMAPlayer* aPlayer);
-
-    /**
-     * Symbian 2nd phase constructor.
-     */
-    void ConstructL();
-
-private:  // data
-
-    // Priority cannot be set if player is REALIZED. The priority is set
-    // when the player is prefetched.
-
-    TInt iVisiblePriority;  // Priority visible in AMMS.
-
-    TInt iActualPriority;   // Priority set in MMF.
-
-};
-
-#endif // CAMMSPRIORITYCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsreverbcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-#ifndef CAMMSREVERBCONTROL_H
-#define CAMMSREVERBCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <EnvironmentalReverbBase.h>
-#include <EnvironmentalReverbUtility.h>
-#include <CustomCommandUtility.h>
-#include "cammseffectcontrol.h"
-#include "cammsbasereverbcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSReverbControl, "ReverbControl");
-_LIT(KAMMSDefaultReverbPreset, "smallroom");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb effect.
-*  This class delegates Reverb effect method calls to CReverb.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSReverbControl): public CAMMSBaseReverbControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSReverbControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSReverbControl();
-
-public:  // New functions
-
-    /**
-    * Sets the gain level of the reverberation. The value defines what is
-    * the relative level of the first reflections compared to the sound
-    * source without possible distance attenuations, directivities or
-    * obstructions taken into account.
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    TInt SetReverbLevelL(TInt aLevel);
-
-    /**
-    * Sets the reverberation time of the reverb. The reverberation time is
-    * the time taken for the reverberant sound to attenuate by 60 dB from
-    * its initial level. Typical values are in the range from 100 to 20000
-    * milliseconds.
-    * The implementation might not support long reverberation times.
-    * Therefore, the actual time used might be shorter than the time
-    * specified with this method.
-    *
-    * @param aTime The new reverberation time in milliseconds.
-    *
-    * @return The value that was actually set.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aTime is negative.
-    * From Java API more leave codes are:
-    * - java.lang.IllegalArgumentException - when the given time is
-    * negative
-    * - javax.microedition.media.MediaException - when the changing of the
-    * reverb time is not supported
-    */
-    void SetReverbTimeL(TInt aTime);
-
-    /**
-    * Gets the gain level of the reverberation.
-    *
-    * @return The level of the reverberation in millibels.
-    */
-    TInt ReverbLevel();
-
-    /**
-    * Gets the reverberation time.
-    *
-    * @return The time of the reverberation in milliseconds.
-    */
-    TInt ReverbTime();
-
-    /**
-    * Gets the minimum level of the reverberation.
-    *
-    * @return The minimum level of the reverberation in millibels.
-    */
-    TInt MinReverbLevel();
-
-    /**
-    * Gets the maximum level of the reverberation.
-    *
-    * @return The maximum level of the reverberation in millibels.
-    */
-    TInt MaxReverbLevel();
-    virtual TInt CurrentPresetIndex();
-
-public: // Functions from base classes
-    /**
-    * Sets the effect according to the given preset.
-    *
-    * @param aPreset The new preset that will be taken into use.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aPreset is not available or it is null.
-    */
-    void SetPresetL(const TDesC& aPreset);
-
-    /**
-    * Gets the available preset names.
-    *
-    * @return The names of all the available preset modes.
-    */
-    const CDesCArray& PresetNamesL();
-
-    /**
-    * Gets the current preset.
-    *
-    * @return The preset that is set at the moment. If none of the presets
-    * is set, null will be returned.
-    */
-    const TDesC& PresetL();
-
-    /**
-    * Enables/disables the effect.
-    *
-    * @param aEnabled The boolean value, true=enabled, false=disabled.
-    *
-    * @par Leaving:
-    * From Java API the leave codes are:
-    * - java.lang.IllegalStateException - if the effect cannot be enabled
-    * in this state of the player.
-    * - javax.microedition.media.MediaException - if enabling is not
-    * supported (with the scope set).
-    */
-    void SetEnabledL(TBool aEnable);
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-public:  // Functions needed by reverb source control
-
-    /**
-     * Returns the environmental reverb utility.
-     * ReverbSourceControl has to use the same instance.
-     * The function creates the instance if they do not exist yet.
-     *
-     * @param aEnvironmentalReverbUtility Returned utility instance.
-     */
-    void GetEnvironmentalReverbUtilityL(
-        CEnvironmentalReverbUtility** aEnvironmentalReverbUtility);
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSReverbControl(CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-
-    /** Native reverb utility */
-    CEnvironmentalReverbUtility* iReverbUtility;
-
-    /* Array for querying the preset names, owned */
-    CDesCArray* iPresetNames;
-
-    /* Index of the current preset */
-    TInt iCurrentPreset;
-
-};
-
-#endif // CAMMSREVERBCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsreverbsourcecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect reverb source.
-*
-*/
-
-
-#ifndef CAMMSREVERBSOURCECONTROL_H
-#define CAMMSREVERBSOURCECONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <RoomLevelBase.h>
-#include <EnvironmentalReverbBase.h>
-#include <CustomCommandUtility.h>
-//#include "CAMMSControl.h"
-#include "cammsbasereverbsourcecontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSReverbSourceControl, "ReverbSourceControl");
-
-// FORWARD DECLARATIONS
-class CAMMSBaseReverbControl;
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Reverb Source effect.
-*  This class delegates Reverb Source effect method calls to CRoomLevel.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSReverbSourceControl): public CAMMSBaseReverbSourceControl  //CAMMSControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    * @param aReverbControl Reverb control belonging to aPlayer.
-    */
-    static CAMMSReverbSourceControl* NewLC(CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aReverbControl);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSReverbSourceControl();
-
-public:  // New functions
-
-    /**
-    * Sets the object specific level for the reverberant sound.
-    * The default value is 0 meaning the natural room gain (set by
-    * ReverbControl's presets).
-    *
-    * @param aLevel The new level of the reverberation in millibels.
-    *
-    * @par Leaving:
-    * @li \c KErrArgument - \a aLevel is greater than 0
-    */
-    void SetRoomLevelL(TInt aLevel);
-
-public: // Functions from base classes
-
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    * @param aReverbControl Reverb control belonging to aPlayer.
-    */
-    CAMMSReverbSourceControl(CMMAPlayer* aPlayer,
-                             CAMMSBaseReverbControl* aReverbControl);
-
-private:  // Data
-
-    /** Native reverb source */
-    CRoomLevel* iReverbSource;
-
-    /** Reverb control belonging to the player */
-    CAMMSBaseReverbControl* iReverbControl;
-
-};
-
-#endif // CAMMSREVERBSOURCECONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsspectatordopplercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler of the spectator.
-*
-*/
-
-
-#ifndef CAMMSSPECTATORDOPPLERCONTROL_H
-#define CAMMSSPECTATORDOPPLERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <ListenerDopplerBase.h>
-#include <CustomCommandUtility.h>
-#include "cammsdopplercontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSSpectatorDopplerControl, "DopplerControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Doppler Control effect for the Spectator.
-*  This class delegates Doppler Control effect method calls to
-*  CListenerDoppler.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSSpectatorDopplerControl): public CAMMSDopplerControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSSpectatorDopplerControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSSpectatorDopplerControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSSpectatorDopplerControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSSPECTATORDOPPLERCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsspectatorlocationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the spectator.
-*
-*/
-
-
-#ifndef CAMMSSPECTATORLOCATIONCONTROL_H
-#define CAMMSSPECTATORLOCATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <ListenerLocationBase.h>
-#include <CustomCommandUtility.h>
-#include "cammslocationcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSSpectatorLocationControl, "LocationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Location Control effect for the Spectator.
-*  This class delegates Location Control effect method calls to
-*  CListenerLocation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSSpectatorLocationControl): public CAMMSLocationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSSpectatorLocationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSSpectatorLocationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSSpectatorLocationControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSSPECTATORLOCATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsspectatororientationcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of the spectator.
-*
-*/
-
-
-#ifndef CAMMSSPECTATORORIENTATIONCONTROL_H
-#define CAMMSSPECTATORORIENTATIONCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <ListenerOrientationBase.h>
-#include <CustomCommandUtility.h>
-#include "cammsorientationcontrol.h"
-
-// CONSTANTS
-_LIT(KAMMSSpectatorOrientationControl, "OrientationControl");
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls for the Orientation Control effect for the Spectator.
-*  This class delegates Orientation Control effect method calls to
-*  CListenerOrientation.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSSpectatorOrientationControl): public CAMMSOrientationControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSSpectatorOrientationControl* NewLC(CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSSpectatorOrientationControl();
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-    /**
-    * Prepares the Control.
-    */
-    void PrepareControlL();
-
-    /**
-    * Deallocates the Control.
-    */
-    void DeallocateControl();
-
-private:
-    /**
-    * C++ constructor.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSSpectatorOrientationControl(CMMAPlayer* aPlayer);
-
-};
-
-#endif // CAMMSSPECTATORORIENTATIONCONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsvolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls the volume of a CMMAVolumeControl.
-*
-*/
-
-
-#ifndef CAMMSVOLUMECONTROL_H
-#define CAMMSVOLUMECONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammscontrol.h"
-
-// FORWARD DECLARATIONS
-class CMMAVolumeControl;
-
-// CONSTANTS
-const TInt KAMMSMAXVolume = 100;
-
-// CLASS DECLARATION
-
-/**
-*
-*  Controls the volume of a CMMAVolumeControl.
-*  This class delegates SetVolumeL method calls to CMMAVolumeControl
-*  given in constructor.
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSVolumeControl): public CAMMSControl
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    * @param aControlName Class name for this control.
-    * @param aVolumeControl Delegated control.
-    * @param aPlayer Player that has this control.
-    */
-    static CAMMSVolumeControl* NewLC(const TDesC& aControlName,
-    CMMAVolumeControl* aVolumeControl,
-    CMMAPlayer* aPlayer);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSVolumeControl();
-
-public: // New functions
-    /**
-    * Sets the volume..
-    *
-    * @param aVolume The new volume to be set.
-    */
-    void SetVolumeL(TInt aVolume);
-
-public: // Functions from base classes
-    const TDesC& ClassName() const;
-
-private:
-    /**
-    * C++ constructor.
-    * @param aControlName Class name for this control.
-    * @param aVolumeControl Delegated control.
-    * @param aPlayer Player that has this control.
-    */
-    CAMMSVolumeControl(const TDesC& aControlName,
-                       CMMAVolumeControl* aVolumeControl,
-                       CMMAPlayer* aPlayer);
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // Data
-    const TDesC& iClassName;
-
-    // Not owned mma volume control.
-    CMMAVolumeControl* iVolumeControl;
-
-    // Index in iVolumeControl
-    TInt iControlLevelIndex;
-};
-
-#endif // CAMMSVOLUMECONTROL_H
-
-
--- a/javauis/amms_qt/mmacontrol/inc/cammsvolumecontrolbuilder.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  VolumeControl player builder.
-*
-*/
-
-
-#ifndef CAMMSVOLUMECONTROLBUILDER_H
-#define CAMMSVOLUMECONTROLBUILDER_H
-
-//  INCLUDES
-#include "cammsplayerbuilder.h"
-
-// CLASS DECLARATION
-
-/**
-*
-*  VolumeControl player builder.
-*  This class adds CAMMSVolumeControl to all players that have
-*  CMMAVolumeControl.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSVolumeControlBuilder): public CAMMSPlayerBuilder
-{
-public:  // Constructors and destructor
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSVolumeControlBuilder* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSVolumeControlBuilder();
-
-public: // Funtions from CAMMSPlayerBuilder
-    void PreparePlayerL(CMMAPlayer* aPlayer);
-
-private:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSVolumeControlBuilder();
-};
-
-#endif // CAMMSVOLUMECONTROLBUILDER_H
-
-
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsaudioplayerbuilder.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder for adding AMMS audio player controls.
-*
-*/
-
-
-// INCLUDE FILES
-#include <cmmamidiplayer.h>
-#include <cmmaaudioplayer.h>
-
-#include <logger.h>
-#include "cammsaudioplayerbuilder.h"
-#include "cammscustomcommandutility.h"
-
-//MMF
-#include "cammsequalizercontrol.h"
-#include "cammsreverbcontrol.h"
-#include "cammsreverbsourcecontrol.h"
-#include "cammsaudiovirtualizercontrol.h"
-#include "cammspancontrol.h"                  // same header will be used for EMC Control too
-#include "cammsdistanceattenuationcontrol.h"
-#include "cammsaudiodopplercontrol.h"
-#include "cammsspectatordopplercontrol.h"
-#include "cammsaudiolocationcontrol.h"
-#include "cammsspectatorlocationcontrol.h"
-#include "cammsspectatororientationcontrol.h"
-#include "cammsvolumecontrol.h"
-#include "ammsconstants.h"
-
-
-//EMC
-#include <cmmaemcaudioplayer.h>
-#include "cammsemcaudiodopplercontrol.h"
-#include "cammsemcspectatordopplercontrol.h"
-#include "cammsemcaudiolocationcontrol.h"
-#include "cammsemcspectatorlocationcontrol.h"
-#include "cammsemcspectatororientationcontrol.h"
-#include "cammsemcdistanceattenuationcontrol.h"
-#include "cammsemcreverbcontrol.h"
-#include "cammsemcreverbsourcecontrol.h"
-#include "cammsemcaudiovirtualizercontrol.h"
-#include "cammsemcequalizercontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioPlayerBuilder* CAMMSAudioPlayerBuilder::NewLC()
-{
-    CAMMSAudioPlayerBuilder* self = new(ELeave) CAMMSAudioPlayerBuilder();
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioPlayerBuilder::~CAMMSAudioPlayerBuilder()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::PreparePlayerL
-// Adds the AMMS audio controls to the player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioPlayerBuilder::PreparePlayerL(CMMAPlayer* aPlayer)
-{
-    const TDesC& playerType = aPlayer->Type();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL type %S",
-              playerType.Ptr());
-
-    if ((playerType != KMMAAudioPlayer) &&
-            (playerType != KMMAMIDIPlayer) && (playerType != KMMAEMCAudioPlayer))
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL, not supported");
-        return;
-    }
-
-
-    // Default type for a Control is base Control (=not a derived Control).
-    // DopplerControl and LocationControl have different Effect API
-    // implementations and also different corresponding AMMS Controls for
-    // SoundSource3D and for Spectator, so these Control types need to be
-    // set accordingly.
-    //
-    // CMMAPlayer::AddControlL( CMMAControl* aControl ) adds a new control.
-    // Ownership of the control is transferred to CMMAPlayer.
-    //
-
-    // CAMMSPanControl is common class to create control for MMF,MIDI and EMC type of Player,however implementation is different
-
-#ifndef __WINS__
-    // PanControl is not supported in WINSCW builds.
-    // This is because of limited pan support in DirectX.
-    CAMMSPanControl* panControl = CAMMSPanControl::NewLC(aPlayer);
-    aPlayer->AddControlL(panControl);
-    CleanupStack::Pop(panControl);
-#endif // __WINS__
-
-
-    if (playerType != KMMAEMCAudioPlayer)
-    {
-        CAMMSAudioDopplerControl* audioDopplerControl =
-            CAMMSAudioDopplerControl::NewLC(aPlayer);
-        audioDopplerControl->iControlType = EAMMSSoundSource3DControl;
-        aPlayer->AddControlL(audioDopplerControl);
-        CleanupStack::Pop(audioDopplerControl);
-
-        CAMMSSpectatorDopplerControl* spectatorDopplerControl =
-            CAMMSSpectatorDopplerControl::NewLC(aPlayer);
-        spectatorDopplerControl->iControlType = EAMMSSpectatorControl;
-        aPlayer->AddControlL(spectatorDopplerControl);
-        CleanupStack::Pop(spectatorDopplerControl);
-
-        CAMMSAudioLocationControl* audioLocationControl =
-            CAMMSAudioLocationControl::NewLC(aPlayer);
-        audioLocationControl->iControlType = EAMMSSoundSource3DControl;
-        aPlayer->AddControlL(audioLocationControl);
-        CleanupStack::Pop(audioLocationControl);
-
-        CAMMSSpectatorLocationControl* spectatorLocationControl =
-            CAMMSSpectatorLocationControl::NewLC(aPlayer);
-        spectatorLocationControl->iControlType = EAMMSSpectatorControl;
-        aPlayer->AddControlL(spectatorLocationControl);
-        CleanupStack::Pop(spectatorLocationControl);
-
-        CAMMSSpectatorOrientationControl* spectatorOrientationControl =
-            CAMMSSpectatorOrientationControl::NewLC(aPlayer);
-        aPlayer->AddControlL(spectatorOrientationControl);
-        CleanupStack::Pop(spectatorOrientationControl);
-
-        CAMMSDistanceAttenuationControl* distanceAttenuationControl =
-            CAMMSDistanceAttenuationControl::NewLC(aPlayer);
-        aPlayer->AddControlL(distanceAttenuationControl);
-        CleanupStack::Pop(distanceAttenuationControl);
-
-        CAMMSReverbControl* reverbControl =
-            CAMMSReverbControl::NewLC(aPlayer);
-        aPlayer->AddControlL(reverbControl);
-        CleanupStack::Pop(reverbControl);
-
-        CAMMSReverbSourceControl* reverbSourceControl =
-            CAMMSReverbSourceControl::NewLC(aPlayer, reverbControl);
-        aPlayer->AddControlL(reverbSourceControl);
-        CleanupStack::Pop(reverbSourceControl);
-
-        CAMMSAudioVirtualizerControl* audioVirtualizerControl =
-            CAMMSAudioVirtualizerControl::NewLC(aPlayer);
-        aPlayer->AddControlL(audioVirtualizerControl);
-        CleanupStack::Pop(audioVirtualizerControl);
-
-        CAMMSEqualizerControl* equalizerControl =
-            CAMMSEqualizerControl::NewLC(aPlayer);
-        aPlayer->AddControlL(equalizerControl);
-        CleanupStack::Pop(equalizerControl);
-
-    }
-    else  //EMC Player
-    {
-
-        CAMMSEMCAudioDopplerControl* emcaudioDopplerControl =
-            CAMMSEMCAudioDopplerControl::NewLC(aPlayer);
-        emcaudioDopplerControl->iControlType = EAMMSSoundSource3DControl;
-        aPlayer->AddControlL(emcaudioDopplerControl);
-        CleanupStack::Pop(emcaudioDopplerControl);
-
-        CAMMSEMCSpectatorDopplerControl* emcspectatorDopplerControl =
-            CAMMSEMCSpectatorDopplerControl::NewLC(aPlayer);
-        emcspectatorDopplerControl->iControlType = EAMMSSpectatorControl;
-        aPlayer->AddControlL(emcspectatorDopplerControl);
-        CleanupStack::Pop(emcspectatorDopplerControl);
-
-        CAMMSEMCAudioLocationControl* emcaudioLocationControl =
-            CAMMSEMCAudioLocationControl::NewLC(aPlayer);
-        emcaudioLocationControl->iControlType = EAMMSSoundSource3DControl;
-        aPlayer->AddControlL(emcaudioLocationControl);
-        CleanupStack::Pop(emcaudioLocationControl);
-
-        CAMMSEMCSpectatorLocationControl* emcspectatorLocationControl =
-            CAMMSEMCSpectatorLocationControl::NewLC(aPlayer);
-        emcspectatorLocationControl->iControlType = EAMMSSpectatorControl;
-        aPlayer->AddControlL(emcspectatorLocationControl);
-        CleanupStack::Pop(emcspectatorLocationControl);
-
-        CAMMSEMCSpectatorOrientationControl* emcspectatorOrientationControl =
-            CAMMSEMCSpectatorOrientationControl::NewLC(aPlayer);
-        aPlayer->AddControlL(emcspectatorOrientationControl);
-        CleanupStack::Pop(emcspectatorOrientationControl);
-
-        CAMMSEMCDistanceAttenuationControl* emcdistanceAttenuationControl =
-            CAMMSEMCDistanceAttenuationControl::NewLC(aPlayer);
-        aPlayer->AddControlL(emcdistanceAttenuationControl);
-        CleanupStack::Pop(emcdistanceAttenuationControl);
-
-        CAMMSEMCReverbControl* emcreverbControl =
-            CAMMSEMCReverbControl::NewLC(aPlayer);
-        aPlayer->AddControlL(emcreverbControl);
-        CleanupStack::Pop(emcreverbControl);
-
-        CAMMSEMCReverbSourceControl* emcreverbSourceControl =
-            CAMMSEMCReverbSourceControl::NewLC(aPlayer, emcreverbControl);
-        aPlayer->AddControlL(emcreverbSourceControl);
-        CleanupStack::Pop(emcreverbSourceControl);
-
-        CAMMSEMCAudioVirtualizerControl* emcaudioVirtualizerControl =
-            CAMMSEMCAudioVirtualizerControl::NewLC(aPlayer);
-        aPlayer->AddControlL(emcaudioVirtualizerControl);
-        CleanupStack::Pop(emcaudioVirtualizerControl);
-
-        CAMMSEMCEqualizerControl* emcequalizerControl =
-            CAMMSEMCEqualizerControl::NewLC(aPlayer);
-        aPlayer->AddControlL(emcequalizerControl);
-        CleanupStack::Pop(emcequalizerControl);
-
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL add OK");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::CAMMSAudioPlayerBuilder
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioPlayerBuilder::CAMMSAudioPlayerBuilder()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiodopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler effect of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsemcaudiodopplercontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioDopplerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioDopplerControl* CAMMSEMCAudioDopplerControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSEMCAudioDopplerControl* self =
-        new(ELeave) CAMMSEMCAudioDopplerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCAudioDopplerControl::~CAMMSEMCAudioDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::~CAMMSEMCAudioDopplerControl");
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioDopplerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioDopplerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMSourceDopplerControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::PrepareControlL");
-        //Create Doppler Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-        //Check the state of stream control ,it must be INITIALIZED
-        TInt state = iStreamControl->GetState();
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::PrepareControlL: Stream state = %d,",state);
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KSourceDopplerEffectControl, temp));
-        iMSourceDopplerControl  = static_cast<MSourceDopplerControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMSourceDopplerControl));
-        iMSourceDopplerControl->Enable();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioDopplerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioDopplerControl::DeallocateControl()
-{
-    if (iMSourceDopplerControl)
-    {
-
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::DeallocateControl");
-
-        // Doppler for Audio can be disabled or enabled
-        if (Enabled())
-        {
-            iMSourceDopplerControl->Disable();
-        }
-        //return the control to factory
-        MEffectControl* temp = iMSourceDopplerControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMSourceDopplerControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMSourceDopplerControl = NULL;
-
-    }
-
-}
-
-const TDesC& CAMMSEMCAudioDopplerControl::ClassName() const
-{
-    return KAMMSEMCAudioDopplerControl;
-}
-
-
-
-void CAMMSEMCAudioDopplerControl::SetEnabledL(TBool aDopplerEnabled)
-{
-
-    if (aDopplerEnabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::SetEnabledL(true)");
-        iMSourceDopplerControl->Enable();
-    }
-    else
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::SetEnabledL(false)");
-        iMSourceDopplerControl->Disable();
-    }
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDopplerControl::Enabled
-// Returns whether this Doppler effect is currently active.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSEMCAudioDopplerControl::Enabled()
-{
-    TBool temp;
-    iMSourceDopplerControl->IsEnabled(temp);
-    return temp;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDopplerControl::SetVelocityCartesianL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioDopplerControl::SetVelocityCartesianL(
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::SetVelocityCartesianL: X=%d, Y=%d, Z=%d",
-               aX, aY, aZ);
-    //Check the state of stream control ,it must be INITIALIZED
-    TInt state = iStreamControl->GetState();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::SetVelocityCartesianL: Stream state = %d,",state);
-    TInt err = iMSourceDopplerControl->SetCartesianVelocity(aX, aY, aZ);
-
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCAudioDopplerControl::SetVelocityCartesianL: err = %d,",err);
-
-
-    // Apply updated settings to Effect API.
-    iMSourceDopplerControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDopplerControl::VelocityCartesian
-// Returns the current velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioDopplerControl::VelocityCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Get the velocity's cartesian settings
-    // aX, aY and aZ are velocities in format mm/s
-    TInt err = iMSourceDopplerControl->CartesianVelocity(aX,aY,aZ);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCAudioDopplerControl::VelocityCartesian: err = %d,",err);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDopplerControl::SetVelocitySphericalL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioDopplerControl::SetVelocitySphericalL(
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    // Parameters are thousandths of radians
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioDopplerControl::SetVelocitySphericalL %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth * KDegToRad *
-                                       1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedElevation = (TInt32)(aElevation * KDegToRad *
-                                         1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCDopplerControl::SetVelocitySphericalL %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    TInt err = iMSourceDopplerControl->SetSphericalVelocity(
-                   convertedAzimuth, convertedElevation, aRadius);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCAudioDopplerControl::SetVelocitySphericalL: err = %d,",err);
-    // Apply updated settings to EMC API.
-    iMSourceDopplerControl->Apply();
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioDopplerControl::CAMMSEMCAudioDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioDopplerControl::CAMMSEMCAudioDopplerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSDopplerControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiolocationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsemcaudiolocationcontrol.h"
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMinRadius = 0;
-#endif // _DEBUG
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioLocationControl* CAMMSEMCAudioLocationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCAudioLocationControl* self =
-        new(ELeave) CAMMSEMCAudioLocationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCAudioLocationControl::~CAMMSEMCAudioLocationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::~CAMMSEMCAudioLocationControl");
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioLocationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMSourceLocationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::PrepareControlL");
-        //Create Location Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KSourceLocationEffectControl, temp));
-        iMSourceLocationControl  = static_cast<MSourceLocationControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMSourceLocationControl));
-        iMSourceLocationControl->Enable();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioLocationControl::DeallocateControl()
-{
-    if (iMSourceLocationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::DeallocateControl");
-
-        // Location for Audio can be disabled or enabled
-        TRAPD(err,iMSourceLocationControl->Disable());
-        if (err != KErrNone)
-        {
-            // some EMC Error
-            ELOG1( EJavaAMMS, "AMMS::CAMMSEMCAudioLocationControl::DeallocateControl err = %d",err);
-        }
-        //return the control to factory
-        MEffectControl* temp = iMSourceLocationControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMSourceLocationControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMSourceLocationControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCAudioLocationControl::ClassName() const
-{
-    return KAMMSEMCAudioLocationControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::SetLocationCartesianL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioLocationControl::SetLocationCartesianL(
-    TInt& aX,
-    TInt& aY,
-    TInt& aZ)
-{
-    // Sets the cartesian coordinates for the source location.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::SetLocationCartesianL: %d, %d, %d",
-               aX, aY, aZ);
-
-    iMSourceLocationControl->SetLocationCartesian(aX, aY, aZ);
-
-    // Apply updated settings to EMC API.
-    iMSourceLocationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::LocationCartesian
-// Gets the coordinates of the current location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioLocationControl::LocationCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Gets the cartesian coordinates for the location of the source position.
-    // The coordinates of the positions are in millimeters.
-    iMSourceLocationControl->LocationCartesian(aX, aY, aZ);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::SetLocationSphericalL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioLocationControl::SetLocationSphericalL(
-    TInt& aAzimuth,
-    TInt& aElevation,
-    TInt& aRadius)
-{
-    // Check in debug build that aRadius is within valid range.
-    __ASSERT_DEBUG(aRadius >= KAMMSMinRadius, User::Invariant());
-
-    // Sets the spherical coordinates for the location of the source position.
-    // The parameters are thousandths of radians
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::SetLocationSphericalL: %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth *
-                                       KDegToRad * 1000);
-
-    TInt32 convertedElevation = (TInt32)(aElevation *
-                                         KDegToRad * 1000);
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioLocationControl::SetLocationSphericalL: %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    iMSourceLocationControl->SetLocationSpherical(
-        convertedAzimuth, convertedElevation, (TInt32&)aRadius);
-
-    // Apply updated settings to EMC API.
-    iMSourceLocationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioLocationControl::CAMMSEMCAudioLocationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioLocationControl::CAMMSEMCAudioLocationControl(CMMAPlayer* aPlayer)
-        : CAMMSLocationControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiovirtualizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,324 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Virtualizes audio channels.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcaudiovirtualizercontrol.h"
-
-
-// CONSTANTS
-const TInt KAMMSEMCDefaultStereoWideningLevel = 100;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioVirtualizerControl* CAMMSEMCAudioVirtualizerControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCAudioVirtualizerControl* self =
-        new(ELeave) CAMMSEMCAudioVirtualizerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCAudioVirtualizerControl::~CAMMSEMCAudioVirtualizerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::~CAMMSEMCAudioVirtualizerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    if (iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility)
-        delete iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility;
-    delete iPresetNames;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::SetPresetL(const TDesC& aPreset)
-{
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::SetPresetL \"%S\"",
-              aPreset.Ptr());
-    CStereoWidening *iStereoWidening = NULL;
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->PrepareEmptyStereoWideningUtilitiesL();
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    TInt presetPosition = 0;
-    TInt findPreset = iPresetNames->Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        iStereoWidening = iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->GetStereoWideningAtPresetIndexL(presetPosition);
-        iCurrentPreset = presetPosition;
-    }
-    else
-    {
-        iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->DeleteEmptyStereoWideningUtilities();
-        User::Leave(KErrArgument);
-    }
-
-    if (!iStereoWidening)
-    {
-        iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->DeleteEmptyStereoWideningUtilities();
-        return;
-    }
-    //Get all preset data here
-    TUint8 iStereoWideningLevel = iStereoWidening->StereoWideningLevel();
-    // Set all preset data to EMC
-    iMStereoWideningControl->SetStereoWideningLevel(iStereoWideningLevel);
-    iMStereoWideningControl->Apply();
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->DeleteEmptyStereoWideningUtilities();
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::SetPresetL \"%S\" GetPresetL OK",
-              aPreset.Ptr());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSEMCAudioVirtualizerControl::PresetNamesL()
-{
-    // Returns an array of all preset names (pre-defined and user-defined).
-    // The pre-defined presets are in the beginning of the list.
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->PrepareEmptyStereoWideningUtilitiesL();
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->DeleteEmptyStereoWideningUtilities();
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSEMCAudioVirtualizerControl::PresetL()
-{
-    //if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-
-    else
-    {
-        // Retrieves a Preset with the given index from the utility class
-        iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->PrepareEmptyStereoWideningUtilitiesL();
-        iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->GetPresetAtIndexL(iPresetName , iCurrentPreset);
-        iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->DeleteEmptyStereoWideningUtilities();
-        return iPresetName;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect.
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::SetEnabledL(true).");
-        iMStereoWideningControl->Enable();
-        iMStereoWideningControl->SetStereoWideningLevel(KAMMSEMCDefaultStereoWideningLevel);
-        iMStereoWideningControl->Apply();
-    }
-    else
-    {
-        // Disable the effect
-
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::SetEnabledL(false).");
-        iMStereoWideningControl->Disable();
-    }
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMStereoWideningControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::PrepareControlL");
-        //Create AudioVirtualizer Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KStereoWideningEffectControl, temp));
-        iMStereoWideningControl  = static_cast<MStereoWideningControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMStereoWideningControl));
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::DeallocateControl()
-{
-
-    if (iMStereoWideningControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl::DeallocateControl");
-
-        // StereoWidening for Audio can be disabled or enabled
-        TRAPD(err,iMStereoWideningControl->Disable());
-        if (err != KErrNone)
-        {
-            //Some EMC Error
-            ELOG1( EJavaAMMS, "AMMS::CAMMSEMCAudioVirtualizerControl::DeallocateControl err = %d",err);
-        }
-        //return the control to factory
-        MEffectControl* temp = iMStereoWideningControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMStereoWideningControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMStereoWideningControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCAudioVirtualizerControl::ClassName() const
-{
-    return KAMMSEMCAudioVirtualizerControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::SetEnforcedL
-// Enforces the effect to be in use.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::SetEnforcedL(TBool aEnforced)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl:SetEnforcedL");
-    // Indicate the effect is to be enforced or not. ETrue = Enforced.
-
-    iMStereoWideningControl->Enforce(aEnforced);
-
-    ApplySettingsL();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::Enforced
-// Returns the current enforced setting of the effect.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSEMCAudioVirtualizerControl::Enforced()
-{
-    // Returns ETrue if the effect is enforced, EFalse if not enforced.
-    TBool enforced;
-    iMStereoWideningControl->IsEnforced(enforced);
-    return enforced;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::SetScopeL
-// Sets the scope of the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCAudioVirtualizerControl::SetScopeL(TInt aScope)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl:SetScopeL");
-    __ASSERT_DEBUG(
-        (aScope == CAMMSEffectControlGroup::EScopeLiveOnly),
-        User::Invariant());
-    // Just to suppress warning in release build
-    (void)aScope;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::Scope
-// Returns the scope in which the effect is present.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCAudioVirtualizerControl::Scope()
-{
-    // For now only the (LIVE_ONLY) scope is supported.
-    return CAMMSEffectControlGroup::EScopeLiveOnly;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::ApplySettingsL
-// Apply changed settings if Effect is in enabled state.
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerControl::ApplySettingsL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl:ApplySettingsL called, checking state");
-    TBool enabled;
-    iMStereoWideningControl->IsEnabled(enabled);
-    if (enabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerControl:ApplySettingsL calling ApplyL");
-        iMStereoWideningControl->Apply();
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility =
-        new(ELeave)CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility;
-    iAMMSEMCAudioVirtualizerEnvironmentalPresetUtility->ConstructL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::CAMMSEMCAudioVirtualizerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCAudioVirtualizerControl::CAMMSEMCAudioVirtualizerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSEffectControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcaudiovirtualizerenvironmentalpresetutility.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcaudiovirtualizerenvironmentalpresetutility.h"
-
-const TInt KAMMSEMCPresetGranularity = 5;
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// Constructors
-
-CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility:: constructor");
-}
-
-// Destructor
-CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::~CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility()
-{
-    delete iPresetNames;
-    if (iEmptyStereoWideningUtility)
-    {
-        delete iEmptyStereoWideningUtility;
-        iEmptyStereoWideningUtility = NULL;
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::~ ");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetAtIndexL
-// Gets the current preset.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetAtIndexL(TDes& aPreset ,TInt iIndex)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetAtIndexL +");
-    // Return KNullDesC if no preset is set.
-    if (iIndex >= 0)
-    {
-
-        TArray< TEfStereoWideningUtilityPreset > presetNames =
-            iEmptyStereoWideningUtility->Presets();
-        aPreset = presetNames[ iIndex ].iPresetName ;
-
-    }
-    else
-    {
-        aPreset = KNullDesC;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetAtIndexL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::PrepareEmptyStereoWideningUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::PrepareEmptyStereoWideningUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::PrepareEmptyStereoWideningUtilitiesL +");
-    //Calling base class function to create and initialize the CMMFDevSound
-    CreateAndInitializeDevSoundL();
-    if (!iEmptyStereoWideningUtility)
-    {
-        iEmptyStereoWideningUtility =
-            CStereoWideningUtility::NewL(*iMMFDevSound);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::PrepareEmptyStereoWideningUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::DeleteEmptyStereoWideningUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::DeleteEmptyStereoWideningUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::DeleteEmptyStereoWideningUtilities +");
-
-    if (iEmptyStereoWideningUtility)
-    {
-        delete iEmptyStereoWideningUtility;
-        iEmptyStereoWideningUtility = NULL;
-    }
-    //Calling base class function to delete CMMFDevSound object to free memory
-    DeleteDevSound();
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::DeleteEmptyStereoWideningUtilities -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetNamesL +");
-    TArray< TEfStereoWideningUtilityPreset > presetNames =
-        iEmptyStereoWideningUtility->Presets();
-    TInt presetCount = presetNames.Count();
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetPresetNamesL -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetEnvironmentalStereoWideningAtPresetIndexL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CStereoWidening * CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetStereoWideningAtPresetIndexL(TInt iIndex)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::GetStereoWideningAtPresetIndexL, index=%d",
-              iIndex);
-
-    __ASSERT_DEBUG(iIndex >= 0, User::Invariant());
-
-    // Set the preset to the empty Environmental Reverb utility.
-    iEmptyStereoWideningUtility->GetPresetL(iIndex);
-    return &(iEmptyStereoWideningUtility->StereoWidening());
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::ConstructL()
-{
-    iPresetNames = new(ELeave)CDesCArrayFlat(KAMMSEMCPresetGranularity);
-    CAMMSEMCBaseMMFDevSound ::ConstructL();
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCAudioVirtualizerEnvironmentalPresetUtility::ConstructL");
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcbasemmfdevsound.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcbasemmfdevsound.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// Constructors
-
-CAMMSEMCBaseMMFDevSound::CAMMSEMCBaseMMFDevSound()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound:: CAMMSEMCBaseMMFDevSound()");
-}
-
-// Destructor
-CAMMSEMCBaseMMFDevSound::~CAMMSEMCBaseMMFDevSound()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::~ +");
-    if (iMMFDevSound)
-    {
-        delete iMMFDevSound;
-        iMMFDevSound = NULL;
-    }
-
-    if (iActiveSchedulerWait)
-    {
-        delete iActiveSchedulerWait;
-        iActiveSchedulerWait = NULL;
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::~ -");
-}
-
-/******************************************************************************
-* Method Name:  CAMMSEMCBaseMMFDevSound::CreateAndInitializeDevSoundL()
-******************************************************************************/
-TInt CAMMSEMCBaseMMFDevSound::CreateAndInitializeDevSoundL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::CreateAndInitializeDevSoundL");
-    TInt initError;
-    if (iMMFDevSound)
-    {
-        delete iMMFDevSound;
-        iMMFDevSound = NULL;
-    }
-    TRAP(initError, iMMFDevSound = CMMFDevSound::NewL());
-    if (initError)
-        return initError;
-
-    TRAP(initError,iMMFDevSound->InitializeL(*this, EMMFStatePlaying));
-
-    if (!initError)
-    {
-        __ASSERT_DEBUG(!iActiveSchedulerWait->IsStarted(), User::Invariant());
-        // Wait until InitializeComplete() has been called.
-        iActiveSchedulerWait->Start();  // CSI: 10 iActiveSchedulerWait cannot be started, also checked in debug build #
-
-    }
-
-    return initError;
-}
-
-/******************************************************************************
-* Method Name:  CAMMSEMCBaseMMFDevSound::DeleteDevSound()
-******************************************************************************/
-void CAMMSEMCBaseMMFDevSound::DeleteDevSound()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::DeleteDevSound + ");
-    if (iMMFDevSound)
-    {
-        delete iMMFDevSound;
-        iMMFDevSound = NULL;
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::DeleteDevSound - ");
-}
-
-/******************************************************************************
-******************************** CALLBACK ************************************
-*******************************************************************************/
-
-/******************************************************************************
-* Method Name:  CAMMSEMCBaseMMFDevSound::InitializeComplete
-* Description:  CMMFDevSound callback when Initialization is complete
-******************************************************************************/
-void CAMMSEMCBaseMMFDevSound::InitializeComplete(TInt aError)
-{
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCBaseMMFDevSound::InitializeComplete err = %d ",aError);
-    // Just to suppress warning in release build
-    (void)aError;
-    __ASSERT_DEBUG(iActiveSchedulerWait->IsStarted(), User::Invariant());
-    // Stop waiting in CreateAndInitializeDevSoundL() function.
-    iActiveSchedulerWait->AsyncStop();
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCBaseMMFDevSound::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCBaseMMFDevSound::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCBaseMMFDevSound::ConstructL ");
-    // create CActiveSchedulerWait
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcdistanceattenuationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcdistanceattenuationcontrol.h"
-
-// CONSTANTS
-namespace
-{
-const TInt KAMMSRoomRollOffFactor = 0; // The logical default value set to 0
-// Rolloff factor 1000 in AMMS is 100 in EMC API
-const TInt KAMMSRolloffDivider = 10;
-
-#ifdef _DEBUG
-const TInt KAMMSMinDistance = 1;
-const TInt KAMMSMinRollofFactor = 0;
-#endif // _DEBUG
-}
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDistanceAttenuationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCDistanceAttenuationControl* CAMMSEMCDistanceAttenuationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCDistanceAttenuationControl* self =
-        new(ELeave)CAMMSEMCDistanceAttenuationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCDistanceAttenuationControl::~CAMMSEMCDistanceAttenuationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCDistanceAttenuationControl::~CAMMSEMCDistanceAttenuationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDistanceAttenuationControl::SetParametersL
-// Sets all the 3D audio distance attenuation parameters simultaneously.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCDistanceAttenuationControl::SetParametersL(
-    TInt aMinDistance,
-    TInt aMaxDistance,
-    TBool aMuteAfterMax,
-    TInt aRolloffFactor)
-{
-    // Check in debug build that parameters are within valid range.
-    __ASSERT_DEBUG(
-        (aMaxDistance > aMinDistance) &&
-        (aMinDistance >= KAMMSMinDistance) &&
-        (aMaxDistance >= KAMMSMinDistance) &&
-        (aRolloffFactor >= KAMMSMinRollofFactor),
-        User::Invariant());
-
-    // NOTE: Effect API uses hundreths (100 corresponds to 1.00),
-    // but JSR234 uses thousandths (1000 represents a rolloff factor of 1.0)
-    //
-    LOG4( EJavaMMAPI, EInfo, "AMMS::CAMMSEMCDistanceAttenuationControl::SetParametersL %d, %d, %d, %d",
-               aMinDistance, aMaxDistance, aMuteAfterMax, aRolloffFactor);
-
-    TInt convertedRolloffFactor = aRolloffFactor / KAMMSRolloffDivider;
-
-    iMDistanceAttenuationControl->SetDistanceAttenuation(aMinDistance, aMaxDistance,
-            aMuteAfterMax, convertedRolloffFactor, KAMMSRoomRollOffFactor);
-
-    // Apply updated settings to EMC API.
-    iMDistanceAttenuationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDistanceAttenuationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCDistanceAttenuationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMDistanceAttenuationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCDistanceAttenuationControl::PrepareControlL");
-        //Create Orientation Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KDistanceAttenuationEffectControl, temp));
-        iMDistanceAttenuationControl  = static_cast<MDistanceAttenuationControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMDistanceAttenuationControl));
-        iMDistanceAttenuationControl->Enable();
-
-    }
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDistanceAttenuationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCDistanceAttenuationControl::DeallocateControl()
-{
-    if (iMDistanceAttenuationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCDistanceAttenuationControl::DeallocateControl");
-
-        // Location for Audio can be disabled or enabled
-        TRAPD(err,iMDistanceAttenuationControl->Disable());
-        if (err != KErrNone)
-        {
-            //Some EMC Error
-            ELOG1( EJavaAMMS, "AMMS::CAMMSEMCDistanceAttenuationControl::DeallocateControl err = %d",err);
-        }
-        //return the control to factory
-        MEffectControl* temp = iMDistanceAttenuationControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMDistanceAttenuationControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMDistanceAttenuationControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCDistanceAttenuationControl::ClassName() const
-{
-    return KAMMSEMCDistanceAttenuationControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCDistanceAttenuationControl::CAMMSEMCDistanceAttenuationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCDistanceAttenuationControl::CAMMSEMCDistanceAttenuationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSBaseDistanceAttenuationControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcequalizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,456 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcequalizercontrol.h"
-
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCEqualizerControl* CAMMSEMCEqualizerControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSEMCEqualizerControl* self =
-        new(ELeave) CAMMSEMCEqualizerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCEqualizerControl::~CAMMSEMCEqualizerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::~CAMMSEMCEqualizerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    if (iAMMSEMCEqualizerEnvironmentalPresetUtility)
-        delete iAMMSEMCEqualizerEnvironmentalPresetUtility;
-    delete iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::BandLevelL
-// Gets the gain set for the given equalizer band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::BandLevelL(TInt aBand)
-{
-    // if aBand is out of range the method must leave with KErrArgument.
-
-    if (aBand < 0 || aBand > (NumberOfBands() - 1))
-    {
-        User::Leave(KErrArgument);
-    }
-    // Returns the band level in mB for the specified band
-    TInt bandlevel;
-    TInt aNativeBand = aBand + KAMMSBandOffset;
-    iMEqualizerControl->BandLevel(aNativeBand,bandlevel);
-    return bandlevel;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::MaxBandLevel
-// Returns the maximum band level supported.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::MaxBandLevel()
-{
-    // Get the dB range in mB for the equalizer.
-    TInt min,max;
-    iMEqualizerControl->DbLevelLimits(min,max);
-    return max;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::MinBandLevel
-// Returns the minimum band level supported.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::MinBandLevel()
-{
-    // Get the dB range in mB for the equalizer.
-    TInt min,max;
-    iMEqualizerControl->DbLevelLimits(min,max);
-    return min;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::BandWidth
-// Returns the band width in Hz for the specified band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::BandWidth(TInt aBand)
-{
-    TInt bndwdth;
-    TInt aNativeBand = aBand + KAMMSBandOffset;
-    iMEqualizerControl->BandWidth(aNativeBand,bndwdth);
-    return bndwdth;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::CenterFrequency
-// Returns the center frequency in Hz for a given band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::CenterFrequency(TInt aBand)
-{
-    TInt cntrfreq;
-    TInt aNativeBand = aBand + KAMMSBandOffset;
-    iMEqualizerControl->CenterFrequency(aNativeBand,cntrfreq);
-    return cntrfreq;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::CrossoverFrequency
-// Returns the cross-over frequency between the given frequency.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::CrossoverFrequency(TInt aBand)
-{
-    TInt aCrossOverFreq;
-    TInt aNativeBand = aBand + KAMMSBandOffset;
-    iMEqualizerControl->CrossoverFrequency(aNativeBand, aCrossOverFreq);
-    return aCrossOverFreq;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::NumberOfBands
-// Gets the number of frequency bands that the equalizer supports.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::NumberOfBands()
-{
-    // Returns the number of equalizer bands.
-    // AudioEqualizerBase: TUint8 NumberOfBands() const;
-
-    TInt aNumOfBands;
-    iMEqualizerControl->NumberOfBands(aNumOfBands);
-    return aNumOfBands;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::SetBandLevelL
-// Sets the given equalizer band to the given gain value.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::SetBandLevelL(
-    TInt aLevel,
-    TInt aBand)
-{
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::SetBandLevelL: level=%d, band=%d",
-               aLevel, aBand);
-    // If aBand or aLevel is out of valid range the method must leave
-    // with KErrArgument.
-    if (aBand < 0 ||
-            aBand > (NumberOfBands() - 1) ||
-            aLevel < MinBandLevel() ||
-            aLevel > MaxBandLevel())
-    {
-        User::Leave(KErrArgument);
-    }
-    TInt aNativeBand = aBand + KAMMSBandOffset;
-    // Sets the equalizer band level value in mB, ranging from Min to Max
-    iMEqualizerControl->SetBandLevel(aNativeBand, aLevel);
-
-    ApplySettingsL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::SetPresetL(const TDesC& aPreset)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::SetPresetL \"%S\"", aPreset.Ptr());
-    CAudioEqualizer *iAudioEqualizer = NULL;
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->PrepareEmptyEqualizerUtilitiesL();
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    TInt presetPosition = 0;
-    TInt findPreset = iPresetNames->Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        iAudioEqualizer = iAMMSEMCEqualizerEnvironmentalPresetUtility->GetEqualizerAtPresetIndexL(presetPosition);
-        iCurrentPreset = presetPosition;
-    }
-    else
-    {
-        iAMMSEMCEqualizerEnvironmentalPresetUtility->DeleteEmptyEqualizerUtilities();
-        User::Leave(KErrArgument);
-    }
-
-    if (!iAudioEqualizer)
-    {
-        iAMMSEMCEqualizerEnvironmentalPresetUtility->DeleteEmptyEqualizerUtilities();
-        return;
-    }
-    //Get all preset data here
-    // For each band of AudioEqualizer get the band level and set it to iMEqualizerControl
-
-    TInt noOfbands = iAudioEqualizer->NumberOfBands();
-
-    for (TInt i = 0; i < noOfbands; i++)
-    {
-        // Band 0 in JSR-234 equals Band 1 in Effect API
-        TInt aNativeBand =  i + KAMMSBandOffset;
-        TInt iBandLevel = iAudioEqualizer->BandLevel(aNativeBand);
-        iMEqualizerControl->SetBandLevel(aNativeBand, iBandLevel);
-    }
-
-    iMEqualizerControl->Apply();
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->DeleteEmptyEqualizerUtilities();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSEMCEqualizerControl::PresetNamesL()
-{
-    // Returns an array of all preset names (pre-defined and user-defined).
-    // The pre-defined presets are in the beginning of the list.
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->PrepareEmptyEqualizerUtilitiesL();
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->DeleteEmptyEqualizerUtilities();
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSEMCEqualizerControl::PresetL()
-{//if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-
-    else
-    {
-        // Retrieves a Preset with the given index from the utility class
-        iAMMSEMCEqualizerEnvironmentalPresetUtility->PrepareEmptyEqualizerUtilitiesL();  // codescanner::leave
-        iAMMSEMCEqualizerEnvironmentalPresetUtility->GetPresetAtIndexL(iPresetName , iCurrentPreset);  // codescanner::leave
-        iAMMSEMCEqualizerEnvironmentalPresetUtility->DeleteEmptyEqualizerUtilities();
-        return iPresetName;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect.
-
-        iMEqualizerControl->Enable();
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::SetEnabledL(true), calling Apply");
-        iMEqualizerControl->Apply();
-    }
-    else
-    {
-        // Disable the effect
-
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::SetEnabledL(false), calling Disable");
-        iMEqualizerControl->Disable();
-        iMEqualizerControl->Apply();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMEqualizerControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::PrepareControlL");
-        //Create Equalizer Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KEqualizerEffectControl, temp));
-        iMEqualizerControl  = static_cast<MEqualizerControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMEqualizerControl));
-        iMEqualizerControl->Enable();
-    }
-
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::DeallocateControl()
-{
-    if (iMEqualizerControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl::DeallocateControl");
-
-        // Equalizer for Audio can be disabled or enabled
-        TRAPD(err,iMEqualizerControl->Disable());
-        if (err != KErrNone)
-        {
-            //Some EMC Error
-            ELOG1( EJavaAMMS, "AMMS::CAMMSEMCEqualizerControl::DeallocateControl err = %d",err);
-        }
-        //return the control to factory
-        MEffectControl* temp = iMEqualizerControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMEqualizerControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMEqualizerControl = NULL;
-    }
-}
-
-
-const TDesC& CAMMSEMCEqualizerControl::ClassName() const
-{
-    return KAMMSEMCEqualizerControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::SetEnforcedL
-// Enforces the effect to be in use.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::SetEnforcedL(TBool aEnforced)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl:SetEnforcedL");
-    // Indicate the effect is to be enforced or not. ETrue = Enforced.
-
-    iMEqualizerControl->Enforce(aEnforced);
-
-    ApplySettingsL();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::Enforced
-// Returns the current enforced setting of the effect.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSEMCEqualizerControl::Enforced()
-{
-    // Returns ETrue if the effect is enforced, EFalse if not enforced.
-    TBool enforced;
-    iMEqualizerControl->IsEnforced(enforced);
-    return enforced;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::SetScopeL
-// Sets the scope of the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCEqualizerControl::SetScopeL(TInt aScope)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl:SetScopeL");
-    __ASSERT_DEBUG(
-        (aScope == CAMMSEffectControlGroup::EScopeLiveOnly),
-        User::Invariant());
-    // Just to suppress warning in release build
-    (void)aScope;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::Scope
-// Returns the scope in which the effect is present.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCEqualizerControl::Scope()
-{
-    // For now only the (LIVE_ONLY) scope is supported.
-    return CAMMSEffectControlGroup::EScopeLiveOnly;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCAudioVirtualizerControl::ApplySettingsL
-// Apply changed settings if Effect is in enabled state.
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerControl::ApplySettingsL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl:ApplySettingsL called, checking state");
-    TBool enabled;
-    iMEqualizerControl->IsEnabled(enabled);
-    if (enabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerControl:ApplySettingsL calling ApplyL");
-        iMEqualizerControl->Apply();
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-    iAMMSEMCEqualizerEnvironmentalPresetUtility =  new(ELeave)CAMMSEMCEqualizerEnvironmentalPresetUtility;
-    iAMMSEMCEqualizerEnvironmentalPresetUtility->ConstructL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerControl::CAMMSEMCEqualizerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCEqualizerControl::CAMMSEMCEqualizerControl(CMMAPlayer* aPlayer)
-        : CAMMSBaseEqualizerControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
-
-
-
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcequalizerenvironmentalpresetutility.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcequalizerenvironmentalpresetutility.h"
-
-const TInt KAMMSEMCPresetGranularity = 5;
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// Constructors
-
-CAMMSEMCEqualizerEnvironmentalPresetUtility::CAMMSEMCEqualizerEnvironmentalPresetUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility:: CAMMSEMCEqualizerEnvironmentalPresetUtility()");
-}
-
-// Destructor
-CAMMSEMCEqualizerEnvironmentalPresetUtility::~CAMMSEMCEqualizerEnvironmentalPresetUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::~ +");
-    delete iPresetNames;
-    if (iEmptyEqualizerUtility)
-    {
-        TRAPD(err,iEmptyEqualizerUtility ->DisableEqualizerL());
-        if (err)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Utility
-            // class is already created, that situation can be discarded here.
-        }
-        delete iEmptyEqualizerUtility;
-        iEmptyEqualizerUtility = NULL;
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::~ -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetAtIndexL
-// Gets the current preset.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetAtIndexL(TDes& aPreset ,TInt iIndex)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetAtIndexL +");
-    // Return KNullDesC if no preset is set.
-    if (iIndex >= 0)
-    {
-
-        TArray< TEfAudioEqualizerUtilityPreset > presetNames =
-            iEmptyEqualizerUtility->Presets();
-        aPreset = presetNames[ iIndex ].iPresetName ;
-
-    }
-    else
-    {
-        aPreset = KNullDesC;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetAtIndexL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::PrepareEmptyEqualizerUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerEnvironmentalPresetUtility::PrepareEmptyEqualizerUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::PrepareEmptyEqualizerUtilitiesL +");
-    //Calling base class function to create and initialize the CMMFDevSound
-    CreateAndInitializeDevSoundL();
-    if (!iEmptyEqualizerUtility)
-    {
-        iEmptyEqualizerUtility =
-            CAudioEqualizerUtility::NewL(*iMMFDevSound);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::PrepareEmptyEqualizerUtilitiesL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::DeleteEmptyEqualizerUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerEnvironmentalPresetUtility::DeleteEmptyEqualizerUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::DeleteEmptyEqualizerUtilities +");
-
-    if (iEmptyEqualizerUtility)
-    {
-        TRAPD(err,iEmptyEqualizerUtility ->DisableEqualizerL());
-        if (err)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Utility
-            // class is already created, that situation can be discarded here.
-        }
-        delete iEmptyEqualizerUtility;
-        iEmptyEqualizerUtility = NULL;
-    }
-
-    //Calling base class function to delete CMMFDevSound object to free memory
-    DeleteDevSound();
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::DeleteEmptyEqualizerUtilities -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetNamesL +");
-    TArray< TEfAudioEqualizerUtilityPreset > presetNames =
-        iEmptyEqualizerUtility->Presets();
-    TInt presetCount = presetNames.Count();
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::GetPresetNamesL -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::GetEqualizerAtPresetIndexL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAudioEqualizer * CAMMSEMCEqualizerEnvironmentalPresetUtility::GetEqualizerAtPresetIndexL(TInt iIndex)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::GetEqualizerAtPresetIndexL, index=%d",
-              iIndex);
-
-    __ASSERT_DEBUG(iIndex >= 0, User::Invariant());
-
-    // Set the preset to the empty Environmental Equalizer utility.
-    iEmptyEqualizerUtility->GetPresetL(iIndex);
-    return &(iEmptyEqualizerUtility->Equalizer());
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCEqualizerEnvironmentalPresetUtility::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCEqualizerEnvironmentalPresetUtility::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCEqualizerEnvironmentalPresetUtility::ConstructL");
-    iPresetNames = new(ELeave)CDesCArrayFlat(KAMMSEMCPresetGranularity);
-    CAMMSEMCBaseMMFDevSound ::ConstructL();
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,464 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsemcreverbcontrol.h"
-#include <RoomLevelBase.h>
-#include <logger.h>
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxReverbLevel = 0;
-const TInt KAMMSMinReverbTime = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCReverbControl* CAMMSEMCReverbControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSEMCReverbControl* self = new(ELeave) CAMMSEMCReverbControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCReverbControl::~CAMMSEMCReverbControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::~CAMMSEMCReverbControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    if (iAMMSEMCReverbEnvironmentalPresetUtility)
-        delete iAMMSEMCReverbEnvironmentalPresetUtility;
-    delete iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::SetReverbLevelL
-// Sets the gain level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCReverbControl::SetReverbLevelL(TInt aLevel)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetReverbLevelL: %d", aLevel);
-    __ASSERT_DEBUG(aLevel <= KAMMSMaxReverbLevel, User::Invariant());
-    TInt roomLevel = 0;
-    iMReverbControl->RoomLevel(roomLevel);
-    TInt reflectionLevel =0;
-    iMReverbControl->ReflectionsLevel(reflectionLevel);
-    TInt tempChange = aLevel - reflectionLevel - roomLevel;
-
-    // Sets the reverb reflections level in mB
-    iMReverbControl->SetReflectionsLevel(aLevel - roomLevel);
-
-    // Calculate native reverb level.
-    TInt reverbLevel;
-    // iMReverbControl->ReverbLevel(reverbLevel);
-    reverbLevel = iEnvReverbLevel + tempChange;
-
-    // Ensure that the level is within the limits.
-
-    TInt minLevel = 0;
-    TInt maxLevel = 0;
-    iMReverbControl->ReverbLevelRange(minLevel, maxLevel);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetReverbLevelL: orig %d",
-              reverbLevel);
-
-    reverbLevel = Min(reverbLevel, maxLevel);
-    reverbLevel = Max(reverbLevel, minLevel);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetReverbLevelL: set %d",
-              reverbLevel);
-    // Sets the reverb level in mB
-    iMReverbControl->SetReverbLevel(reverbLevel);
-    // Apply can be called for Reverb, as it does not internally include EnableL
-    // unlike in case of Equalizer or StereoWidening
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetReverbLevelL calling ApplyL");
-    iMReverbControl->Apply();
-
-    // Return the value that was used in setting the reverb
-    return aLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::SetReverbTimeL
-// Sets the reverberation time of the reverb.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbControl::SetReverbTimeL(TInt aTime)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetReverbTimeL: %d", aTime);
-    // Check in debug build that aTime is within valid range.
-    __ASSERT_DEBUG(aTime >= KAMMSMinReverbTime, User::Invariant());
-    iMReverbControl->SetDecayTime(aTime);
-    iMReverbControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::ReverbLevel
-// Gets the gain level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCReverbControl::ReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::ReverbLevel called");
-    TInt iReverbLevel;
-    iMReverbControl->ReverbLevel(iReverbLevel);
-    return iReverbLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::ReverbTime
-// Gets the reverberation time.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCReverbControl::ReverbTime()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::ReverbTime called");
-
-    TUint iReverbTime;
-    iMReverbControl->DecayTime(iReverbTime);
-    return iReverbTime;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::MinReverbLevel
-// Gets the minimum level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCReverbControl::MinReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::MinReverbLevel called");
-
-    TInt minLevel;
-    TInt maxLevel;
-    iMReverbControl->ReverbLevelRange(
-        minLevel, maxLevel);
-
-    return minLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::MaxReverbLevel
-// Gets the maximum level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEMCReverbControl::MaxReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::MaxReverbLevel called");
-    TInt minLevel;
-    TInt maxLevel;
-    iMReverbControl->ReverbLevelRange(minLevel, maxLevel);
-    return maxLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbControl::SetPresetL(const TDesC& aPreset)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetPresetL \"%S\"", aPreset.Ptr());
-    CEnvironmentalReverb *iEnvironmentalReverb = NULL;
-    User::LeaveIfError(iAMMSEMCReverbEnvironmentalPresetUtility->PrepareEmptyReverbUtilitiesL());
-    iAMMSEMCReverbEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    TInt presetPosition = 0;
-    TInt findPreset = iPresetNames->Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        iEnvironmentalReverb = iAMMSEMCReverbEnvironmentalPresetUtility->GetEnvironmentalReverbAtPresetIndexL(presetPosition);
-        iCurrentPreset = presetPosition;
-    }
-    else
-    {
-        iAMMSEMCReverbEnvironmentalPresetUtility->DeleteEmptyReverbUtilities();
-        User::Leave(KErrArgument);
-    }
-
-    if (!iEnvironmentalReverb)
-    {
-        iAMMSEMCReverbEnvironmentalPresetUtility->DeleteEmptyReverbUtilities();
-        return;
-    }
-    //Get all preset data here
-
-    TInt iReverbTime = iEnvironmentalReverb-> DecayTime();
-    TInt iReverbLevel = iEnvironmentalReverb->ReflectionsLevel() + iEnvironmentalReverb->RoomLevel();
-    iEnvReverbLevel = iEnvironmentalReverb->ReverbLevel();
-    TInt roomLevel = iEnvironmentalReverb->RoomLevel();
-    TInt reflectionLevel = iEnvironmentalReverb->ReflectionsLevel();
-    TUint decayHFRatio = iEnvironmentalReverb->DecayHFRatio();
-    TUint density = iEnvironmentalReverb->Density();
-    TUint diffusion = iEnvironmentalReverb->Diffusion();
-    TUint reflectionsDelay = iEnvironmentalReverb->ReflectionsDelay();
-    TUint reverbDelay = iEnvironmentalReverb->ReverbDelay();
-    TUint roomHFLevel = iEnvironmentalReverb->RoomHFLevel();
-
-    // Set all preset data to EMC
-    TInt err = iMReverbControl->SetDecayTime(iReverbTime);
-    err = iMReverbControl->SetReverbLevel(iReverbLevel);
-    err = iMReverbControl->SetRoomLevel(roomLevel);
-    err = iMReverbControl->SetReflectionsLevel(reflectionLevel);
-    err = iMReverbControl->SetDecayHFRatio(decayHFRatio);
-    err = iMReverbControl->SetDensity(density);
-    err = iMReverbControl->SetDiffusion(diffusion);
-    err = iMReverbControl->SetReflectionsDelay(reflectionsDelay);
-    err = iMReverbControl->SetReverbDelay(reverbDelay);
-    err = iMReverbControl->SetRoomHFLevel(roomHFLevel);
-    err = iMReverbControl->Apply();
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCReverbControl::SetPresetL iMReverbControl setter func. err = %d",err);
-    iAMMSEMCReverbEnvironmentalPresetUtility->DeleteEmptyReverbUtilities();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSEMCReverbControl::PresetNamesL()
-{
-
-    //CEnvironmentalReverb *iEnvironmentalReverb = NULL;
-    iAMMSEMCReverbEnvironmentalPresetUtility->PrepareEmptyReverbUtilitiesL();
-    iAMMSEMCReverbEnvironmentalPresetUtility->GetPresetNamesL(*iPresetNames);
-    iAMMSEMCReverbEnvironmentalPresetUtility->DeleteEmptyReverbUtilities();
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSEMCReverbControl::PresetL()
-{
-    //if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-
-    else
-    {
-        // Retrieves a Preset with the given index from the utility class
-        iAMMSEMCReverbEnvironmentalPresetUtility->PrepareEmptyReverbUtilitiesL();
-        iAMMSEMCReverbEnvironmentalPresetUtility->GetPresetAtIndexL(iPresetName , iCurrentPreset);
-        iAMMSEMCReverbEnvironmentalPresetUtility->DeleteEmptyReverbUtilities();
-        return iPresetName;
-    }
-
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetEnabledL(true), calling Enable");
-        iMReverbControl->Enable();
-        iMReverbControl->Apply();
-    }
-    else
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetEnabledL(false), calling Disable");
-        iMReverbControl->Disable();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMReverbControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::PrepareControlL");
-        //Create Reverb Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KReverbEffectControl, temp));
-        iMReverbControl  = static_cast<MReverbControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMReverbControl));
-        iMReverbControl->Enable();
-        SetPresetL(KAMMSEMCDefaultReverbPreset);
-
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbControl::DeallocateControl()
-{
-
-    if (iMReverbControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::DeallocateControl");
-
-        // Reverb for Audio can be disabled or enabled
-        TRAPD(err,iMReverbControl->Disable());
-        if (err != KErrNone)
-        {
-            //Some EMC Error
-            ELOG1( EJavaAMMS, "AMMS::CAMMSEMCReverbControl::DeallocateControl err = %d",err);
-        }
-        //return the control to factory
-        MEffectControl* temp = iMReverbControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMReverbControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMReverbControl = NULL;
-
-        iCurrentPreset = -1;
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::GetReverbControl
-// Returns the  reverb control. It will be used by CAMMSEMCReverbSourceControl
-// -----------------------------------------------------------------------------
-MReverbControl * CAMMSEMCReverbControl::GetReverbControlL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::GetReverbControl");
-
-    if (! iMReverbControl)
-    {
-        PrepareControlL(); // creates the control
-    }
-
-    return iMReverbControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::CurrentPresetIndex
-// Returns the  Current Preset Index. It will be used by CAMMSEMCReverbSourceControl
-// -----------------------------------------------------------------------------
-TInt CAMMSEMCReverbControl::CurrentPresetIndex()
-{
-    return iCurrentPreset;
-}
-
-// -----------------------------------------------------------------------------
-// Overriding the base class CAMMSEffectControl function here
-//------------------------------------------------------------------------------
-
-void CAMMSEMCReverbControl::SetEnforcedL(TBool aEnforced)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetEnforcedL");
-    // Indicate the effect is to be enforced or not. ETrue = Enforced.
-    iMReverbControl->Enforce(aEnforced);
-
-    ApplySettingsL();
-
-}
-TBool CAMMSEMCReverbControl::Enforced()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::Enforced");
-    // Returns ETrue if the effect is enforced, EFalse if not enforced.
-    TBool enforced;
-    iMReverbControl->IsEnforced(enforced);
-    return enforced;
-
-}
-void CAMMSEMCReverbControl::SetScopeL(TInt aScope)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::SetScopeL");
-    __ASSERT_DEBUG(
-        (aScope == CAMMSEffectControlGroup::EScopeLiveOnly),
-        User::Invariant());
-    // Just to suppress warning in release build
-    (void)aScope;
-}
-TInt CAMMSEMCReverbControl::Scope()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::Scope");
-    // For now only the (LIVE_ONLY) scope is supported.
-    return CAMMSEffectControlGroup::EScopeLiveOnly;
-
-}
-void CAMMSEMCReverbControl::ApplySettingsL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl::ApplySettingsL");
-    TBool enabled;
-    iMReverbControl->IsEnabled(enabled);
-    if (enabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbControl:ApplySettingsL calling ApplyL");
-        iMReverbControl->Apply();
-    }
-}
-
-const TDesC& CAMMSEMCReverbControl::ClassName() const
-{
-    return KAMMSEMCReverbControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEMCReverbControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-    iAMMSEMCReverbEnvironmentalPresetUtility = new(ELeave) CAMMSEMCReverbEnvironmentalPresetUtility;
-    iAMMSEMCReverbEnvironmentalPresetUtility->ConstructL();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbControl::CAMMSEMCReverbControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCReverbControl::CAMMSEMCReverbControl(CMMAPlayer* aPlayer)
-        : CAMMSBaseReverbControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbenvironmentalpresetutility.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Group for effect controls
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcreverbenvironmentalpresetutility.h"
-
-const TInt KAMMSEMCPresetGranularity = 5;
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-// Constructors
-
-CAMMSEMCReverbEnvironmentalPresetUtility::CAMMSEMCReverbEnvironmentalPresetUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility:: CAMMSEMCReverbEnvironmentalPresetUtility()");
-}
-
-// Destructor
-CAMMSEMCReverbEnvironmentalPresetUtility::~CAMMSEMCReverbEnvironmentalPresetUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::~ +");
-    delete iPresetNames;
-
-    if (iEmptyEnvironmentalReverbUtility)
-    {
-        delete iEmptyEnvironmentalReverbUtility;
-        iEmptyEnvironmentalReverbUtility = NULL;
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::~ -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetAtIndexL
-// Gets the current preset.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetAtIndexL(TDes& aPreset ,TInt iIndex)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetAtIndexL +");
-    // Return KNullDesC if no preset is set.
-    if (iIndex >= 0)
-    {
-
-        TArray< TEfEnvironmentalReverbUtilityPreset > presetNames =
-            iEmptyEnvironmentalReverbUtility->Presets();
-        aPreset = presetNames[ iIndex ].iPresetName ;
-
-    }
-    else
-    {
-        aPreset = KNullDesC;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetAtIndexL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::PrepareEmptyReverbUtilitiesL
-// Creates utilities that can be used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSEMCReverbEnvironmentalPresetUtility::PrepareEmptyReverbUtilitiesL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::PrepareEmptyReverbUtilitiesL +");
-    //Calling base class function to create and initialize the CMMFDevSound
-    TInt err = CreateAndInitializeDevSoundL();
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::PrepareEmptyReverbUtilitiesL  err = %d",err);
-    if (!iEmptyEnvironmentalReverbUtility && (err == KErrNone))
-    {
-        iEmptyEnvironmentalReverbUtility =
-            CEnvironmentalReverbUtility::NewL(*iMMFDevSound);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::PrepareEmptyReverbUtilitiesL -");
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::DeleteEmptyReverbUtilities
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCReverbEnvironmentalPresetUtility::DeleteEmptyReverbUtilities()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::DeleteEmptyReverbUtilities +");
-
-    if (iEmptyEnvironmentalReverbUtility)
-    {
-        delete iEmptyEnvironmentalReverbUtility;
-        iEmptyEnvironmentalReverbUtility = NULL;
-    }
-    //Calling base class function to delete CMMFDevSound object to free memory
-    DeleteDevSound();
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::DeleteEmptyReverbUtilities -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::MMFDevSound
-// Deletes utilities that are used to obtain preset names and preset data.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CMMFDevSound* CAMMSEMCReverbEnvironmentalPresetUtility::MMFDevSound()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::MMFDevSound ");
-    return iMMFDevSound;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetNamesL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetNamesL(
-    CDesCArray& aPresetNames)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetNamesL +");
-    TArray< TEfEnvironmentalReverbUtilityPreset > presetNames =
-        iEmptyEnvironmentalReverbUtility->Presets();
-    TInt presetCount = presetNames.Count();
-    for (TInt i = 0; i < presetCount; i++)
-    {
-        aPresetNames.AppendL(presetNames[ i ].iPresetName);
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::GetPresetNamesL -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::GetEnvironmentalReverbAtPresetIndexL
-// Gets list of preset names available.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CEnvironmentalReverb * CAMMSEMCReverbEnvironmentalPresetUtility::GetEnvironmentalReverbAtPresetIndexL(TInt iIndex)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::GetEnvironmentalReverbAtPresetIndexL, index=%d",
-              iIndex);
-
-    __ASSERT_DEBUG(iIndex >= 0, User::Invariant());
-
-    // Set the preset to the empty Environmental Reverb utility.
-    iEmptyEnvironmentalReverbUtility->GetPresetL(iIndex);
-    return &(iEmptyEnvironmentalReverbUtility->EnvironmentalReverb());
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbEnvironmentalPresetUtility::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSEMCReverbEnvironmentalPresetUtility::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbEnvironmentalPresetUtility::ConstructL ");
-    iPresetNames = new(ELeave)CDesCArrayFlat(KAMMSEMCPresetGranularity);
-    CAMMSEMCBaseMMFDevSound ::ConstructL();
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcreverbsourcecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect reverb source.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsemcreverbsourcecontrol.h"
-#include "cammsbasereverbcontrol.h"
-#include "cammsemcreverbcontrol.h"
-
-// CONSTANTS
-const TInt KAMMSDisconnectReverbSource = 2147483647; // From JSR-234
-
-#ifdef _DEBUG
-const TInt KAMMSMaxRoomLevel = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbSourceControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCReverbSourceControl* CAMMSEMCReverbSourceControl::NewLC(
-    CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aBaseReverbControl)
-{
-    CAMMSEMCReverbSourceControl* self =
-        new(ELeave)CAMMSEMCReverbSourceControl(aPlayer, aBaseReverbControl);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCReverbSourceControl::~CAMMSEMCReverbSourceControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::~CAMMSEMCReverbSourceControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbSourceControl::SetRoomLevelL
-// Sets the object specific level for the reverberant sound.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbSourceControl::SetRoomLevelL(TInt aLevel)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS:: CAMMSEMCReverbSourceControl::SetRoomLevelL +: %d", aLevel);
-// Check in debug build that aLevel is within valid range.
-    __ASSERT_DEBUG(
-        (aLevel <= KAMMSMaxRoomLevel) ||
-        (aLevel == KAMMSDisconnectReverbSource),
-        User::Invariant());
-
-    // With the JSR-234 value Integer.MIN_VALUE, the reflected sound for the
-    // given object can be disabled.
-    if (aLevel == KMinTInt)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL(Integer.MIN_VALUE)");
-        aLevel = 0;
-    }
-
-    // Check the allowed boundaries for room level.
-    TInt minLevel = 0;
-    TInt maxLevel = 0;
-    iRoomLevelControl->LevelRange(minLevel, maxLevel);
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL boundaries %d, %d",
-               minLevel, maxLevel);
-
-    // Check the state of the effect. If it is in disabled state, enable it.
-    TBool enabled;
-    iRoomLevelControl->IsEnabled(enabled);
-    if (!enabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL calling EnableL");
-        iRoomLevelControl->Enable();
-    }
-
-    // With the JSR-234 value DISCONNECT, the object can be disconnected
-    // from the reverb.
-    if (aLevel == KAMMSDisconnectReverbSource)
-    {
-        // Do not call iReverbSource->DisableL(), instead set the room level to
-        // _minimum_ value (= smallest negative gain -> maximum attenuation).
-        // The CRoomLevel must also be kept enabled.
-        aLevel = minLevel;
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL(DISCONNECT) %d",
-                  minLevel);
-    }
-    else
-    {
-        // Set the room level within allowed boundaries from EMC API
-        aLevel = Min(aLevel, maxLevel);
-        aLevel = Max(aLevel, minLevel);
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL setting value: %d", aLevel);
-    }
-
-    // Sets the RoomLevel level, it will leave if aRoomLevel is not within range
-    // of Min and Max
-    iRoomLevelControl->SetRoomLevel(aLevel);
-
-    // Apply updated settings to EMC API.
-    iRoomLevelControl->Apply();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::SetRoomLevelL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbSourceControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbSourceControl::PrepareControlL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::PrepareControlL");
-
-    if (!iRoomLevelControl)
-    {
-        //Create RoomLevel Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KRoomLevelEffectControl, temp));
-        iRoomLevelControl  = static_cast<MRoomLevelControl*>(temp);
-
-
-        //Attach EMC Reverb Control to RoomLevelControl
-        MReverbControl* reverbControl = iBaseReverbControl->GetReverbControlL();
-        iRoomLevelControl->AttachReverb(*reverbControl);
-
-        //Add Effect to Stream Control
-        User::LeaveIfError(iStreamControl->AddEffect(*iRoomLevelControl));
-    }
-
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbSourceControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCReverbSourceControl::DeallocateControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCReverbSourceControl::DeallocateControl");
-    if (iRoomLevelControl)
-    {
-        /*
-        //idealy reverbControl should be checked for its existance and if it is there ,should be detached from RoomLevelControl.
-        //But in this case reverbControl is deleted till this position,so need not to do it.
-        if(reverbControl)
-            {
-            iRoomLevelControl->DetachReverb(*reverbControl);
-            }
-        */
-        iStreamControl->RemoveEffect(*iRoomLevelControl);
-        MEffectControl* objPtr2 = iRoomLevelControl;
-        iFactory->DeleteEffectControl(objPtr2);
-        iRoomLevelControl = NULL;
-    }
-
-
-
-
-}
-
-const TDesC& CAMMSEMCReverbSourceControl::ClassName() const
-{
-    return KAMMSEMCReverbSourceControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCReverbSourceControl::CAMMSEMCReverbSourceControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCReverbSourceControl::CAMMSEMCReverbSourceControl(
-    CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aBaseReverbControl)
-        : CAMMSBaseReverbSourceControl(aPlayer), iBaseReverbControl(aBaseReverbControl)
-{
-
-    iMMAPlayer = aPlayer;
-
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatordopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler effect of the spectator.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsemcspectatordopplercontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorDopplerControl* CAMMSEMCSpectatorDopplerControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCSpectatorDopplerControl* self =
-        new(ELeave)CAMMSEMCSpectatorDopplerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCSpectatorDopplerControl::~CAMMSEMCSpectatorDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::~CAMMSEMCSpectatorDopplerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorDopplerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMListenerDopplerControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::PrepareControlL");
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KListenerDopplerEffectControl, temp));
-        iMListenerDopplerControl  = static_cast<MListenerDopplerControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMListenerDopplerControl));
-        TInt err = iMListenerDopplerControl->Enable();
-        ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::PrepareControlL: EnableErr = %d", err);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorDopplerControl::DeallocateControl()
-{
-    if (iMListenerDopplerControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::DeallocateControl");
-
-        // Doppler for Spectator is always enabled (JSR-234 mandates it)
-        // so the disabling is needed here
-        iMListenerDopplerControl->Disable();
-        //return the control to factory
-        MEffectControl* temp = iMListenerDopplerControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMListenerDopplerControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMListenerDopplerControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCSpectatorDopplerControl::ClassName() const
-{
-    return KAMMSEMCListenerDopplerControl;
-}
-
-
-void CAMMSEMCSpectatorDopplerControl::SetEnabledL(TBool aDopplerEnabled)
-{
-    if (aDopplerEnabled)
-    {
-        TInt err = iMListenerDopplerControl->Enable();
-        ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::SetEnabledL: Enable err = %d", err);
-    }
-    else
-    {
-        TInt err = iMListenerDopplerControl->Disable();
-        ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::SetEnabledL: Disable err = %d", err);
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::Enabled
-// Returns whether this Doppler effect is currently active.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSEMCSpectatorDopplerControl::Enabled()
-{
-    TBool temp;
-    TInt err = iMListenerDopplerControl->IsEnabled(temp);
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::Enabled: err = %d", err);
-    return temp;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::SetVelocityCartesianL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorDopplerControl::SetVelocityCartesianL(
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::SetVelocityCartesianL: X=%d, Y=%d, Z=%d",
-               aX, aY, aZ);
-    TInt err = iMListenerDopplerControl->SetCartesianVelocity(aX, aY, aZ);
-
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::SetVelocityCartesianL: err = %d", err);
-    // Apply updated settings
-    iMListenerDopplerControl->Apply();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::VelocityCartesian
-// Returns the current velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorDopplerControl::VelocityCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Get the velocity's cartesian settings
-    // aX, aY and aZ are velocities in format mm/s
-
-    TInt err = iMListenerDopplerControl->CartesianVelocity(aX,aY,aZ);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::VelocityCartesian: err = %d", err);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::SetVelocitySphericalL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorDopplerControl::SetVelocitySphericalL(
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    // Parameters are thousandths of radians
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::SetVelocitySphericalL %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth * KDegToRad *
-                                       1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedElevation = (TInt32)(aElevation * KDegToRad *
-                                         1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorDopplerControl::SetVelocitySphericalL %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    TInt err = iMListenerDopplerControl->SetSphericalVelocity(
-                   convertedAzimuth, convertedElevation, aRadius);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorDopplerControl::SetVelocitySphericalL: err = %d", err);
-    // Apply updated settings to EMC API.
-    iMListenerDopplerControl->Apply();
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorDopplerControl::CAMMSEMCSpectatorDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorDopplerControl::CAMMSEMCSpectatorDopplerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSDopplerControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatorlocationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsemcspectatorlocationcontrol.h"
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMinRadius = 0;
-#endif // _DEBUG
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorLocationControl* CAMMSEMCSpectatorLocationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCSpectatorLocationControl* self =
-        new(ELeave) CAMMSEMCSpectatorLocationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCSpectatorLocationControl::~CAMMSEMCSpectatorLocationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::CAMMSEMCSpectatorLocationControl");
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorLocationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMListenerLocationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::PrepareControlL");
-        //Create Location Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KListenerLocationEffectControl, temp));
-        iMListenerLocationControl  = static_cast<MListenerLocationControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMListenerLocationControl));
-        iMListenerLocationControl->Enable();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorLocationControl::DeallocateControl()
-{
-    if (iMListenerLocationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::DeallocateControl");
-
-        // Location for Audio can be disabled or enabled
-        iMListenerLocationControl->Disable();
-        //return the control to factory
-        MEffectControl* temp = iMListenerLocationControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMListenerLocationControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMListenerLocationControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCSpectatorLocationControl::ClassName() const
-{
-    return KAMMSEMCSpectatorLocationControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::SetLocationCartesianL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorLocationControl::SetLocationCartesianL(
-    TInt& aX,
-    TInt& aY,
-    TInt& aZ)
-{
-    // Sets the cartesian coordinates for the source location.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::SetLocationCartesianL: %d, %d, %d",
-               aX, aY, aZ);
-
-    iMListenerLocationControl->SetLocationCartesian(aX, aY, aZ);
-
-    // Apply updated settings to EMC API.
-    iMListenerLocationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::LocationCartesian
-// Gets the coordinates of the current location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorLocationControl::LocationCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Gets the cartesian coordinates for the location of the Listener position.
-    // The coordinates of the positions are in millimeters.
-    iMListenerLocationControl->LocationCartesian(aX, aY, aZ);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::SetLocationSphericalL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorLocationControl::SetLocationSphericalL(
-    TInt& aAzimuth,
-    TInt& aElevation,
-    TInt& aRadius)
-{
-    // Check in debug build that aRadius is within valid range.
-    __ASSERT_DEBUG(aRadius >= KAMMSMinRadius, User::Invariant());
-
-    // Sets the spherical coordinates for the location of the source position.
-    // The parameters are thousandths of radians
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::SetLocationSphericalL: %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth *
-                                       KDegToRad * 1000);
-
-    TInt32 convertedElevation = (TInt32)(aElevation *
-                                         KDegToRad * 1000);
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorLocationControl::SetLocationSphericalL: %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    iMListenerLocationControl->SetLocationSpherical(
-        convertedAzimuth, convertedElevation, (TInt32&)aRadius);
-
-    // Apply updated settings to EMC API.
-    iMListenerLocationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorLocationControl::CAMMSEMCSpectatorLocationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorLocationControl::CAMMSEMCSpectatorLocationControl(CMMAPlayer* aPlayer)
-        : CAMMSLocationControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsemcspectatororientationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of the spectator.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-#include "cammsemcspectatororientationcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorOrientationControl* CAMMSEMCSpectatorOrientationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSEMCSpectatorOrientationControl* self =
-        new(ELeave)CAMMSEMCSpectatorOrientationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSEMCSpectatorOrientationControl::~CAMMSEMCSpectatorOrientationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::~CAMMSEMCSpectatorOrientationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorOrientationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iMListenerOrientationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::PrepareControlL");
-        //Create Orientation Effect Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KListenerOrientationEffectControl, temp));
-        iMListenerOrientationControl  = static_cast<MListenerOrientationControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMListenerOrientationControl));
-        iMListenerOrientationControl->Enable();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEMCSpectatorOrientationControl::DeallocateControl()
-{
-    if (iMListenerOrientationControl)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::DeallocateControl");
-
-        // Orientation for Listener can be disabled or enabled
-        iMListenerOrientationControl->Disable();
-        //return the control to factory
-        MEffectControl* temp = iMListenerOrientationControl;
-        iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMListenerOrientationControl;
-        iFactory->DeleteEffectControl(tempCtrl);
-        iMListenerOrientationControl = NULL;
-    }
-}
-
-const TDesC& CAMMSEMCSpectatorOrientationControl::ClassName() const
-{
-    return KAMMSEMCSpectatorOrientationControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::SetOrientationL
-// Turns the object to the new orientation.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorOrientationControl::SetOrientationL(
-    TInt aHeading,
-    TInt aPitch,
-    TInt aRoll)
-{
-    // Sets the Heading, Pitch, Roll values for the source/listener orientation.
-    // Parameters are given in thousandths of radians.
-    // SourceOrientationBase/ListenerLocationBase :
-    //
-    // NOTE: Effect API uses thousandths of radians for all three parameters,
-    // but JSR234 uses degrees.
-    //
-    // From e32Math.h: The multiplying factor to convert degrees to radians.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL: %d, %d, %d",
-               aHeading, aPitch, aRoll);
-
-    TInt32 convertedHeading = (TInt32)(aHeading * KDegToRad *
-                                       1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedPitch = (TInt32)(aPitch * KDegToRad *
-                                     1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedRoll = (TInt32)(aRoll * KDegToRad *
-                                    1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL: %d, %d, %d",
-               convertedHeading, convertedPitch, convertedRoll);
-
-    TInt err = iMListenerOrientationControl->SetOrientation(
-                   convertedHeading, convertedPitch, convertedRoll);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL(3 arg.) err = %d",err);
-
-
-    // Apply updated settings to EMC API.
-    iMListenerOrientationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::SetOrientationL
-// Turns the object to the new orientation.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorOrientationControl::SetOrientationL(
-    TInt aFrontX, TInt aFrontY, TInt aFrontZ,
-    TInt aAboveX, TInt aAboveY, TInt aAboveZ)
-{
-    // Check in debug build that parameters are not zero vectors.
-    __ASSERT_DEBUG(((aFrontX != 0) ||
-                    (aFrontY != 0) ||
-                    (aFrontZ != 0)) &&
-                   ((aAboveX != 0) ||
-                    (aAboveY != 0) ||
-                    (aAboveZ != 0)),
-                   User::Invariant());
-
-    // Check in debug build that vectors are not parallel.
-    // Two vectors are parallel if their cross product is zero vector.
-    // Cross product of vectors a1*i + a2*j + a3*k and b1*i + b2*j + b3*k :
-    // (a2*b3 - a3*b2)i + (a3*b1 - a1*b3)j + (a1*b2 - a2*b1)k
-    __ASSERT_DEBUG(
-        ((aFrontY * aAboveZ) - (aFrontZ * aAboveY) != 0) ||
-        ((aFrontZ * aAboveX) - (aFrontX * aAboveZ) != 0) ||
-        ((aFrontX * aAboveY) - (aFrontY * aAboveX) != 0),
-        User::Invariant());
-
-    // Sets the Front and Above vectors for the orientation of the source/listener.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL: Front %d, %d, %d",
-               aFrontX, aFrontY, aFrontZ);
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL: Above %d, %d, %d",
-               aAboveX, aAboveY, aAboveZ);
-
-    TInt err = iMListenerOrientationControl->SetOrientationVectors(
-                   (TInt32)aFrontX, (TInt32)aFrontY, (TInt32)aFrontZ,
-                   (TInt32)aAboveX, (TInt32)aAboveY, (TInt32)aAboveZ);
-    ELOG1( EJavaAMMS, "AMMS::CAMMSEMCSpectatorOrientationControl::SetOrientationL(6 arg.) err = %d",err);
-    // Apply updated settings to EMC API.
-    iMListenerOrientationControl->Apply();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::OrientationVectors
-// Gets the orientation of the object using two vectors.
-// -----------------------------------------------------------------------------
-void CAMMSEMCSpectatorOrientationControl::OrientationVectors(
-    TInt& aFrontX, TInt& aFrontY, TInt& aFrontZ,
-    TInt& aAboveX, TInt& aAboveY, TInt& aAboveZ)
-{
-    // Gets the orientation of the source.
-
-    iMListenerOrientationControl->OrientationVectors(
-        aFrontX, aFrontY, aFrontZ, aAboveX, aAboveY, aAboveZ);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEMCSpectatorOrientationControl::CAMMSEMCSpectatorOrientationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEMCSpectatorOrientationControl::CAMMSEMCSpectatorOrientationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSOrientationControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammspancontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the panning of a Player in the stereo output mix.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <cmmaaudioplayer.h>
-#include <cmmamidiplayer.h>
-#include <cmmaemcaudioplayer.h>
-#include "cammspancontrol.h"
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxPanning = 100;
-const TInt KAMMSMinPanning = -100;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPanControl* CAMMSPanControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSPanControl* self = new(ELeave) CAMMSPanControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSPanControl::~CAMMSPanControl()
-{
-    if (iRMMFAudioPlayDeviceCustomCommands)
-    {
-        delete iRMMFAudioPlayDeviceCustomCommands;
-        iRMMFAudioPlayDeviceCustomCommands = NULL;
-    }
-
-    // Remove the EMC Pan Control Effect from Stream Control
-    // Deleted the effect
-    if (iMBalanceControl)
-    {
-        //return the control to factory
-        MEffectControl* temp = iMBalanceControl;
-        if (iStreamControl)
-            iStreamControl->RemoveEffect(*temp);
-        // Delete the Effect
-        MEffectControl* tempCtrl = iMBalanceControl;
-        if (iFactory)
-            iFactory->DeleteEffectControl(tempCtrl);
-        iMBalanceControl = NULL;
-    }
-
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::PanL
-// Gets the current panning set.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSPanControl::PanL()
-{
-    TInt balance = KMMFBalanceCenter;
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iMidiClientUtility)
-    {
-        // Get the current stereo balance value.
-
-        balance = iMidiClientUtility->GetBalanceL();
-    }
-    else if (iRMMFAudioPlayDeviceCustomCommands)
-    {
-        // Gets the balance between the left and right stereo audio channels.
-
-        User::LeaveIfError(
-            iRMMFAudioPlayDeviceCustomCommands->GetBalance(balance));
-    }
-    else       // if EMC Pan Control
-    {
-        // Get the balance and set it to balance var.
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::PanL is called for EMC implemented palyer");
-        User::LeaveIfError(iMBalanceControl->GetBalance(balance));
-    }
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::PanL called, native GetBalance = %d",
-              balance);
-
-    return balance;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::SetPanL
-// Sets the panning using a linear point scale (-100 - +100).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSPanControl::SetPanL(TInt aPan)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::SetPanL: Pan = %d", aPan);
-
-    // Check in debug build that aPan is within valid range.
-    __ASSERT_DEBUG(
-        (aPan <= KAMMSMaxPanning) &&
-        (aPan >= KAMMSMinPanning),
-        User::Invariant());
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iMidiClientUtility)
-    {
-        // Set the current stereo balance value.
-        // Defaults to KMMFBalanceCenter to restore equal left-right balance.
-
-        iMidiClientUtility->SetBalanceL(aPan);
-    }
-    else if (iRMMFAudioPlayDeviceCustomCommands)
-    {
-        // Sets the balance between the left and right stereo audio channels
-        // Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.
-        // Centre balance can be restored by using KMMFBalanceCenter.
-
-        User::LeaveIfError(
-            iRMMFAudioPlayDeviceCustomCommands->SetBalance(aPan));
-    }
-    else     // EMC Pan Control
-    {
-        // Set the Balance using the Pan Control
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::SetPanL: SetBalance()-- EMC ");
-        User::LeaveIfError(iMBalanceControl->SetBalance(aPan));
-        User::LeaveIfError(iMBalanceControl->Apply());
-    }
-
-    return PanL();
-}
-
-
-const TDesC& CAMMSPanControl::ClassName() const
-{
-    return KAMMSPanControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSPanControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::ConstructL");
-
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        // In case of CMMAMIDIPlayer use CMidiClientUtility
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-
-        iMidiClientUtility = mmaMIDIPlayer->MidiClient();
-    }
-    else if (iPlayer->Type() == KMMAEMCAudioPlayer)
-    {
-        //Get MMFactory and StreamControl from the player
-        //Create Pan Control using EMC API.
-        //Add the control to Stream Control
-        //Create Balance Control
-        iStreamControl = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->StreamControl();
-        iFactory = (static_cast<CMMAEMCAudioPlayer*>(iMMAPlayer))->MMFactory();
-
-        MEffectControl* temp(NULL);
-        User::LeaveIfError(iFactory->CreateEffectControl(KBalanceEffectControl, temp));
-        iMBalanceControl  = static_cast<MBalanceControl*>(temp);
-        User::LeaveIfError(iStreamControl->AddEffect(*iMBalanceControl));
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::ConstructL is called for EMC implemented Player");
-    }
-    else
-    {
-        CMMAAudioPlayer* mmaAudioPlayer =
-            reinterpret_cast< CMMAAudioPlayer* >(iPlayer);
-
-        RMMFController& mmfController = mmaAudioPlayer->Controller();
-
-        iRMMFAudioPlayDeviceCustomCommands =
-            new(ELeave) RMMFAudioPlayDeviceCustomCommands(mmfController);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::CAMMSPanControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPanControl::CAMMSPanControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-    iMMAPlayer = aPlayer;
-}
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.emc/cammsprioritycontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the priority of a Player.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <AudioPreference.h>
-#include <logger.h>
-#include <cmmamidiplayer.h>
-#include "cammsprioritycontrol.h"
-#include <cmmaplayerevent.h>
-#include <cmmaaudioplayer.h>
-#include <cmmaemcaudioplayer.h>
-#include <mmfcontroller.h>
-#include <midiclientutility.h>
-
-
-
-const TInt KErrorMessageSize = 32;
-_LIT(KErrPriorityError, "AMMS PC error: %d");
-
-// Default AMMS priority.
-const TInt KAMMSDefaultPriority = 50;
-
-// Reasonable MMF priorities.
-const TInt KAMMSMinMMFPriority = 71;
-const TInt KAMMSMaxMMFPriority = 89;
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxPriority = 100;
-const TInt KAMMSMinPriority = 0;
-#endif // _DEBUG
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPriorityControl* CAMMSPriorityControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSPriorityControl* self = new(ELeave) CAMMSPriorityControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSPriorityControl::~CAMMSPriorityControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::~");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::SetPriorityL
-// Sets the priority using a linear point scale between 0 and 100.
-// -----------------------------------------------------------------------------
-//
-void CAMMSPriorityControl::SetPriorityL(TInt aPriority)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityL %d", aPriority);
-
-    // Check in debug build that aPriority is within valid range.
-    __ASSERT_DEBUG(
-        (aPriority <= KAMMSMaxPriority) &&
-        (aPriority >= KAMMSMinPriority),
-        User::Invariant());
-
-    // Set a new priority only if it differs from the previous one.
-    if (aPriority != iVisiblePriority)
-    {
-        // Set the new priority to MMF only if the player is PREFETCHED
-        // (otherwise setting will leave). In other states, the new priority
-        // will be set when the player state changes to PREFETCHED.
-        if (iPlayer->State() == CMMAPlayer::EPrefetched)
-        {
-            SetPriorityToMmfL(aPriority);
-        }
-
-        iVisiblePriority = aPriority;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::Priority
-// Gets the priority.
-// -----------------------------------------------------------------------------
-TInt CAMMSPriorityControl::Priority()
-{
-    return iVisiblePriority;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::StateChanged
-// Called when player state is changed.
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::StateChanged(TInt aState)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::StateChanged +, state = %d",
-              aState);
-
-    // If the state was changed to PREFETCHED, set the buffered priority to
-    // MMF. Set a new priority only if it differs from the previous one.
-
-    if ((aState == CMMAPlayer::EPrefetched) &&
-            (iActualPriority != iVisiblePriority))
-    {
-        TRAPD(err, SetPriorityToMmfL(iVisiblePriority));
-
-        ELOG1( EJavaAMMS, "AMMS::CAMMSPriorityControl::StateChanged, err = %d", err);
-
-        if (err != KErrNone)
-        {
-            TBuf<KErrorMessageSize> errorMessage;
-            errorMessage.Format(KErrPriorityError, err);
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        }
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::StateChanged -");
-}
-
-const TDesC& CAMMSPriorityControl::ClassName() const
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSPriorityControl::ClassName");
-
-    return KAMMSPriorityControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::SetPriorityToMmfL
-// Scales the given AMMS priority to MMF priority and sets it to MMF.
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::SetPriorityToMmfL(TInt aAmmsPriority)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL %d",
-              aAmmsPriority);
-
-    // Scale the AMMS priority value to MMF priority value before setting it.
-    // The default priority used by MMA is 80. MMF priority can be between
-    // -100 and 100, but values between 71 and 89 are reasonable ones.
-    TInt newPriority = KAMMSMinMMFPriority + aAmmsPriority *
-                       (KAMMSMaxMMFPriority - KAMMSMinMMFPriority) / 100;   // CSI: 47 100% for scaled value #
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL, newPriority = %d",
-              newPriority);
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        // In case of CMMAMIDIPlayer use CMidiClientUtility
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-
-        CMidiClientUtility* midiClientUtility = mmaMIDIPlayer->MidiClient();
-
-        midiClientUtility->SetPriorityL(newPriority,
-                                        KMMAMIDIPriorityPreference);
-    }
-    else if (iPlayer->Type() == KMMAAudioPlayer)
-    {
-        CMMAAudioPlayer* mmaAudioPlayer =
-            reinterpret_cast< CMMAAudioPlayer* >(iPlayer);
-
-        RMMFController& rmmfController = mmaAudioPlayer->Controller();
-
-        TMMFPrioritySettings prioritySettings;
-        prioritySettings.iPriority = newPriority;
-
-        User::LeaveIfError(
-            rmmfController.SetPrioritySettings(prioritySettings));
-    }
-    else if (iPlayer->Type() == KMMAEMCAudioPlayer)
-    {
-        MStreamControl*  streamControl = (static_cast<CMMAEMCAudioPlayer*>(iPlayer))->StreamControl();
-        User::LeaveIfError(streamControl->SetPriority(newPriority, KMMAEMCPriorityPreference));
-    }
-
-    iActualPriority = aAmmsPriority;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::CAMMSPriorityControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPriorityControl::CAMMSPriorityControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer),
-        iVisiblePriority(KAMMSDefaultPriority),
-        iActualPriority(KAMMSDefaultPriority)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::ConstructL
-// 2nd phase constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::ConstructL +");
-
-    iPlayer->AddStateListenerL(this);
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::ConstructL -");
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.mmf/cammsaudioplayerbuilder.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder for adding AMMS audio player controls.
-*
-*/
-
-
-// INCLUDE FILES
-#include <CMMAMIDIPlayer.h>
-#include <CMMAAudioPlayer.h>
-#include <logger.h>
-
-#include "CAMMSAudioPlayerBuilder.h"
-#include "CAMMSCustomCommandUtility.h"
-
-#include "CAMMSEqualizerControl.h"
-#include "CAMMSReverbControl.h"
-#include "CAMMSReverbSourceControl.h"
-#include "CAMMSAudioVirtualizerControl.h"
-#include "CAMMSPanControl.h"
-#include "CAMMSDistanceAttenuationControl.h"
-#include "CAMMSAudioDopplerControl.h"
-#include "CAMMSSpectatorDopplerControl.h"
-#include "CAMMSAudioLocationControl.h"
-#include "CAMMSSpectatorLocationControl.h"
-#include "CAMMSSpectatorOrientationControl.h"
-#include "CAMMSVolumeControl.h"
-#include "AMMSConstants.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioPlayerBuilder* CAMMSAudioPlayerBuilder::NewLC()
-{
-    CAMMSAudioPlayerBuilder* self = new(ELeave) CAMMSAudioPlayerBuilder();
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioPlayerBuilder::~CAMMSAudioPlayerBuilder()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::PreparePlayerL
-// Adds the AMMS audio controls to the player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioPlayerBuilder::PreparePlayerL(CMMAPlayer* aPlayer)
-{
-    const TDesC& playerType = aPlayer->Type();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL type %S",
-              playerType);
-
-    if ((playerType != KMMAAudioPlayer) &&
-            (playerType != KMMAMIDIPlayer))
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL, not supported");
-        return;
-    }
-
-
-    // Default type for a Control is base Control (=not a derived Control).
-    // DopplerControl and LocationControl have different Effect API
-    // implementations and also different corresponding AMMS Controls for
-    // SoundSource3D and for Spectator, so these Control types need to be
-    // set accordingly.
-    //
-    // CMMAPlayer::AddControlL( CMMAControl* aControl ) adds a new control.
-    // Ownership of the control is transferred to CMMAPlayer.
-    //
-
-#ifndef __WINS__
-    // PanControl is not supported in WINSCW builds.
-    // This is because of limited pan support in DirectX.
-    CAMMSPanControl* panControl = CAMMSPanControl::NewLC(aPlayer);
-    aPlayer->AddControlL(panControl);
-    CleanupStack::Pop(panControl);
-#endif // __WINS__
-
-    CAMMSEqualizerControl* equalizerControl =
-        CAMMSEqualizerControl::NewLC(aPlayer);
-    aPlayer->AddControlL(equalizerControl);
-    CleanupStack::Pop(equalizerControl);
-
-    CAMMSReverbControl* reverbControl =
-        CAMMSReverbControl::NewLC(aPlayer);
-    aPlayer->AddControlL(reverbControl);
-    CleanupStack::Pop(reverbControl);
-
-    CAMMSAudioVirtualizerControl* audioVirtualizerControl =
-        CAMMSAudioVirtualizerControl::NewLC(aPlayer);
-    aPlayer->AddControlL(audioVirtualizerControl);
-    CleanupStack::Pop(audioVirtualizerControl);
-
-    CAMMSReverbSourceControl* reverbSourceControl =
-        CAMMSReverbSourceControl::NewLC(aPlayer, reverbControl);
-    aPlayer->AddControlL(reverbSourceControl);
-    CleanupStack::Pop(reverbSourceControl);
-
-    CAMMSDistanceAttenuationControl* distanceAttenuationControl =
-        CAMMSDistanceAttenuationControl::NewLC(aPlayer);
-    aPlayer->AddControlL(distanceAttenuationControl);
-    CleanupStack::Pop(distanceAttenuationControl);
-
-    CAMMSAudioDopplerControl* audioDopplerControl =
-        CAMMSAudioDopplerControl::NewLC(aPlayer);
-    audioDopplerControl->iControlType = EAMMSSoundSource3DControl;
-    aPlayer->AddControlL(audioDopplerControl);
-    CleanupStack::Pop(audioDopplerControl);
-
-    CAMMSSpectatorDopplerControl* spectatorDopplerControl =
-        CAMMSSpectatorDopplerControl::NewLC(aPlayer);
-    spectatorDopplerControl->iControlType = EAMMSSpectatorControl;
-    aPlayer->AddControlL(spectatorDopplerControl);
-    CleanupStack::Pop(spectatorDopplerControl);
-
-    CAMMSAudioLocationControl* audioLocationControl =
-        CAMMSAudioLocationControl::NewLC(aPlayer);
-    audioLocationControl->iControlType = EAMMSSoundSource3DControl;
-    aPlayer->AddControlL(audioLocationControl);
-    CleanupStack::Pop(audioLocationControl);
-
-    CAMMSSpectatorLocationControl* spectatorLocationControl =
-        CAMMSSpectatorLocationControl::NewLC(aPlayer);
-    spectatorLocationControl->iControlType = EAMMSSpectatorControl;
-    aPlayer->AddControlL(spectatorLocationControl);
-    CleanupStack::Pop(spectatorLocationControl);
-
-    CAMMSSpectatorOrientationControl* spectatorOrientationControl =
-        CAMMSSpectatorOrientationControl::NewLC(aPlayer);
-    aPlayer->AddControlL(spectatorOrientationControl);
-    CleanupStack::Pop(spectatorOrientationControl);
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioPlayerBuilder::PreparePlayerL add OK");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioPlayerBuilder::CAMMSAudioPlayerBuilder
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioPlayerBuilder::CAMMSAudioPlayerBuilder()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.mmf/cammspancontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the panning of a Player in the stereo output mix.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include <CMMAAudioPlayer.h>
-#include <CMMAMidiPlayer.h>
-#include "CAMMSPanControl.h"
-
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxPanning = 100;
-const TInt KAMMSMinPanning = -100;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPanControl* CAMMSPanControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSPanControl* self = new(ELeave) CAMMSPanControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSPanControl::~CAMMSPanControl()
-{
-    delete iRMMFAudioPlayDeviceCustomCommands;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::PanL
-// Gets the current panning set.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSPanControl::PanL()
-{
-    TInt balance = KMMFBalanceCenter;
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iMidiClientUtility)
-    {
-        // Get the current stereo balance value.
-
-        balance = iMidiClientUtility->GetBalanceL();
-    }
-    else
-    {
-        // Gets the balance between the left and right stereo audio channels.
-
-        User::LeaveIfError(
-            iRMMFAudioPlayDeviceCustomCommands->GetBalance(balance));
-    }
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::PanL called, native GetBalance = %d",
-              balance);
-
-    return balance;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::SetPanL
-// Sets the panning using a linear point scale (-100 - +100).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSPanControl::SetPanL(TInt aPan)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::SetPanL: Pan = %d", aPan);
-
-    // Check in debug build that aPan is within valid range.
-    __ASSERT_DEBUG(
-        (aPan <= KAMMSMaxPanning) &&
-        (aPan >= KAMMSMinPanning),
-        User::Invariant());
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iMidiClientUtility)
-    {
-        // Set the current stereo balance value.
-        // Defaults to KMMFBalanceCenter to restore equal left-right balance.
-
-        iMidiClientUtility->SetBalanceL(aPan);
-    }
-    else
-    {
-        // Sets the balance between the left and right stereo audio channels
-        // Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.
-        // Centre balance can be restored by using KMMFBalanceCenter.
-
-        User::LeaveIfError(
-            iRMMFAudioPlayDeviceCustomCommands->SetBalance(aPan));
-    }
-
-    return PanL();
-}
-
-
-const TDesC& CAMMSPanControl::ClassName() const
-{
-    return KAMMSPanControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSPanControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPanControl::ConstructL");
-
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        // In case of CMMAMIDIPlayer use CMidiClientUtility
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-
-        iMidiClientUtility = mmaMIDIPlayer->MidiClient();
-    }
-    else
-    {
-        CMMAAudioPlayer* mmaAudioPlayer =
-            reinterpret_cast< CMMAAudioPlayer* >(iPlayer);
-
-        RMMFController& mmfController = mmaAudioPlayer->Controller();
-
-        iRMMFAudioPlayDeviceCustomCommands =
-            new(ELeave) RMMFAudioPlayDeviceCustomCommands(mmfController);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPanControl::CAMMSPanControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPanControl::CAMMSPanControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-}
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src.mmf/cammsprioritycontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the priority of a Player.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <audiopreference.h>
-#include <logger.h>
-#include <CMMAMidiPlayer.h>
-#include "CAMMSPriorityControl.h"
-#include <CMMAPlayerEvent.h>
-#include <CMMAAudioPlayer.h>
-#include <MMFController.h>
-#include <MidiClientUtility.h>
-
-
-
-const TInt KErrorMessageSize = 32;
-_LIT(KErrPriorityError, "AMMS PC error: %d");
-
-// Default AMMS priority.
-const TInt KAMMSDefaultPriority = 50;
-
-// Reasonable MMF priorities.
-const TInt KAMMSMinMMFPriority = 71;
-const TInt KAMMSMaxMMFPriority = 89;
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxPriority = 100;
-const TInt KAMMSMinPriority = 0;
-#endif // _DEBUG
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPriorityControl* CAMMSPriorityControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSPriorityControl* self = new(ELeave) CAMMSPriorityControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSPriorityControl::~CAMMSPriorityControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::~");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::SetPriorityL
-// Sets the priority using a linear point scale between 0 and 100.
-// -----------------------------------------------------------------------------
-//
-void CAMMSPriorityControl::SetPriorityL(TInt aPriority)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityL %d", aPriority);
-
-    // Check in debug build that aPriority is within valid range.
-    __ASSERT_DEBUG(
-        (aPriority <= KAMMSMaxPriority) &&
-        (aPriority >= KAMMSMinPriority),
-        User::Invariant());
-
-    // Set a new priority only if it differs from the previous one.
-    if (aPriority != iVisiblePriority)
-    {
-        // Set the new priority to MMF only if the player is PREFETCHED
-        // (otherwise setting will leave). In other states, the new priority
-        // will be set when the player state changes to PREFETCHED.
-        if (iPlayer->State() == CMMAPlayer::EPrefetched)
-        {
-            SetPriorityToMmfL(aPriority);
-        }
-
-        iVisiblePriority = aPriority;
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::Priority
-// Gets the priority.
-// -----------------------------------------------------------------------------
-TInt CAMMSPriorityControl::Priority()
-{
-    return iVisiblePriority;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::StateChanged
-// Called when player state is changed.
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::StateChanged(TInt aState)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::StateChanged +, state = %d",
-              aState);
-
-    // If the state was changed to PREFETCHED, set the buffered priority to
-    // MMF. Set a new priority only if it differs from the previous one.
-
-    if ((aState == CMMAPlayer::EPrefetched) &&
-            (iActualPriority != iVisiblePriority))
-    {
-        TRAPD(err, SetPriorityToMmfL(iVisiblePriority));
-
-        ELOG1( EJavaAMMS, "AMMS::CAMMSPriorityControl::StateChanged, err = %d", err);
-
-        if (err != KErrNone)
-        {
-            TBuf<KErrorMessageSize> errorMessage;
-            errorMessage.Format(KErrPriorityError, err);
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        }
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::StateChanged -");
-}
-
-const TDesC& CAMMSPriorityControl::ClassName() const
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSPriorityControl::ClassName");
-
-    return KAMMSPriorityControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::SetPriorityToMmfL
-// Scales the given AMMS priority to MMF priority and sets it to MMF.
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::SetPriorityToMmfL(TInt aAmmsPriority)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL %d",
-              aAmmsPriority);
-
-    // Scale the AMMS priority value to MMF priority value before setting it.
-    // The default priority used by MMA is 80. MMF priority can be between
-    // -100 and 100, but values between 71 and 89 are reasonable ones.
-    TInt newPriority = KAMMSMinMMFPriority + aAmmsPriority *
-                       (KAMMSMaxMMFPriority - KAMMSMinMMFPriority) / 100;   // CSI: 47 100% for scaled value #
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL, newPriority = %d",
-              newPriority);
-
-    // In case of MIDIPlayer, use CMidiClientUtility, otherwise RMMFController.
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        // In case of CMMAMIDIPlayer use CMidiClientUtility
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-
-        CMidiClientUtility* midiClientUtility = mmaMIDIPlayer->MidiClient();
-
-        midiClientUtility->SetPriorityL(newPriority,
-                                        KMMAMIDIPriorityPreference);
-    }
-    else
-    {
-        CMMAAudioPlayer* mmaAudioPlayer =
-            reinterpret_cast< CMMAAudioPlayer* >(iPlayer);
-
-        RMMFController& rmmfController = mmaAudioPlayer->Controller();
-
-        TMMFPrioritySettings prioritySettings;
-        prioritySettings.iPriority = newPriority;
-
-        User::LeaveIfError(
-            rmmfController.SetPrioritySettings(prioritySettings));
-    }
-
-    iActualPriority = aAmmsPriority;
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::SetPriorityToMmfL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPriorityControl::CAMMSPriorityControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPriorityControl::CAMMSPriorityControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer),
-        iVisiblePriority(KAMMSDefaultPriority),
-        iActualPriority(KAMMSDefaultPriority)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::ConstructL
-// 2nd phase constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPriorityControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::ConstructL +");
-
-    iPlayer->AddStateListenerL(this);
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSPriorityControl::ConstructL -");
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsaudiodopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler effect of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsaudiodopplercontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioDopplerControl* CAMMSAudioDopplerControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSAudioDopplerControl* self =
-        new(ELeave) CAMMSAudioDopplerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioDopplerControl::~CAMMSAudioDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::~CAMMSAudioDopplerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iDopplerEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioDopplerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class location effect as CSourceDoppler
-        // Effect API takes the ownership of customCommandUtility.
-        iDopplerEffect = CSourceDoppler::NewL(customCommandUtility);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioDopplerControl::DeallocateControl()
-{
-    if (iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioDopplerControl::DeallocateControl");
-
-        // Doppler for Audio can be disabled or enabled
-        if (Enabled())
-        {
-            TRAPD(err, iDopplerEffect->DisableL());
-            if (err != KErrNone)
-            {
-                // The only even theoritically possible error code here would be
-                // KErrAccessDenied which is a result from Effect API calling
-                // ApplyL method without having update rights, but since the
-                // Effect is already created, that situation can be discarded.
-            }
-        }
-
-        // Delete the Effect API class.
-        delete(CAudioEffect*)iDopplerEffect;
-        iDopplerEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSAudioDopplerControl::ClassName() const
-{
-    return KAMMSAudioDopplerControl;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioDopplerControl::CAMMSAudioDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioDopplerControl::CAMMSAudioDopplerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSDopplerControl(aPlayer)
-{
-}
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsaudiolocationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsaudiolocationcontrol.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioLocationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioLocationControl* CAMMSAudioLocationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSAudioLocationControl* self =
-        new(ELeave) CAMMSAudioLocationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioLocationControl::~CAMMSAudioLocationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioLocationControl::~CAMMSAudioLocationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iLocationEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioLocationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioLocationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iLocationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioLocationControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class location effect as CSourceLocation
-        // Effect API takes the ownership of customCommandUtility.
-        iLocationEffect = CSourceLocation::NewL(customCommandUtility);
-
-        // Enable the Effect API Control
-        iLocationEffect->EnableL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioLocationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioLocationControl::DeallocateControl()
-{
-    if (iLocationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioLocationControl::DeallocateControl");
-
-        // Disable the Effect API Control
-        TRAPD(err, iLocationEffect->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class.
-        // The class that is derived from CLocation is casted here to the
-        // base class CAudioEffect, since CLocation has the destructor
-        // defined as protected, but the derived class and the base class
-        // have it defined as public.
-        delete(CAudioEffect*)iLocationEffect;
-        iLocationEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSAudioLocationControl::ClassName() const
-{
-    return KAMMSAudioLocationControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioLocationControl::CAMMSAudioLocationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioLocationControl::CAMMSAudioLocationControl(CMMAPlayer* aPlayer)
-        : CAMMSLocationControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsaudiooutputcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,435 +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:  Manipulates the audio output mode.
-*
-*/
-
-// INCLUDE FILES
-#include <AudioPreference.h>
-#include <logger.h>
-#include "cammsaudiooutputcontrol.h"
-#include <cmmaplayerevent.h>
-#include <cmmaaudioplayer.h>
-#include <cmmavideoplayer.h>
-#include <mmfcontroller.h>
-#include <midiclientutility.h>
-#include <cammscustomcommandutility.h>
-#include <JniEnvWrapper.h>
-// CONSTANTS
-_LIT(KErrAudioOutputControlError, "AMMS AudioOutputControl error: %d");
-const TInt KEventMessageSize = 64;
-const TInt KNoPriference = 0;
-const TInt KAllSpeakers = 1;
-const TInt KNoAudioOutput = 2;
-const TInt KAudioEarpiece = 3;
-const TInt KAudioLoudspeaker = 4;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioOutputControl* CAMMSAudioOutputControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSAudioOutputControl* self = new(ELeave) CAMMSAudioOutputControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioOutputControl::~CAMMSAudioOutputControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::~");
-    if (iAudioOutput)
-    {
-        iAudioOutput->UnregisterObserver(*this);
-        delete iAudioOutput;
-    }
-    if (iAccMonitor)
-    {
-        iAccMonitor ->StopObserving();
-        delete iAccMonitor;
-    }
-}
-
-//set java AudioOutput object
-void CAMMSAudioOutputControl::SetJavaAudioOutputObject(jobject object)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::SetJavaAudioOutputObject ");
-    iJavaAudioOutputObj = object;
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-  //  iJni = JniEnvWrapper::GetValidJniRef();
-}
-
-void CAMMSAudioOutputControl::ResetJavaAudioOutputObject()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::ResetJavaAudioOutputObject ");
-    jmethodID setOutputModeID = iJni->GetMethodID(
-                                    iJni->GetObjectClass(iJavaAudioOutputObj),
-                                    "setOutputMode",
-                                    "(I)V");
-
-    jint jpref = (jint)GetCurrentPrefInt();
-    iJni->CallVoidMethod(iJavaAudioOutputObj,setOutputModeID,jpref);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::SetAudioOutput
-// Sets the preference using a linear point scale between 0 and 4.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSAudioOutputControl::SetAudioOutput(TInt aPreference)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::SetAudioOutputL %d", aPreference);
-
-    TInt temppreference = 0;
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::SetAudioOutputL  After __ASSERT_DEBUG");
-    // Set a new preference only if it differs from the previous one.
-    if (aPreference != iRoutingUserPreference)
-    {
-        switch (aPreference)
-        {
-        case KNoPriference:
-        {
-            temppreference = SetAudioOutputToMmf(CAudioOutput::ENoPreference);
-        }
-        break;
-        case KAllSpeakers:
-        {
-            temppreference = SetAudioOutputToMmf(CAudioOutput::EAll);
-        }
-        break;
-        case KNoAudioOutput:
-        {
-            temppreference = SetAudioOutputToMmf(CAudioOutput::ENoOutput);
-        }
-        break;
-        case KAudioEarpiece:
-        {
-            temppreference = SetAudioOutputToMmf(CAudioOutput::EPrivate);
-        }
-        break;
-        case KAudioLoudspeaker:
-        {
-            temppreference = SetAudioOutputToMmf(CAudioOutput::EPublic);
-        }
-        break;
-        default:
-            break;
-        }
-    }
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::SetAudioOutputL - = %d", temppreference);
-    return temppreference;
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::GetAudioOutput
-// Gets the preference.
-// -----------------------------------------------------------------------------
-TInt CAMMSAudioOutputControl::GetAudioOutput()
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::GetAudioOutput %d", (TInt)iRoutingUserPreference);
-    return (TInt)iRoutingUserPreference;
-}
-
-// ----------------------------------------------------------------------------------------
-// CAMMSAudioOutputControl::GetCurrentPreference
-// Gets the preference.if user preference is not set return the current device preference
-// ----------------------------------------------------------------------------------------
-void CAMMSAudioOutputControl::GetCurrentPreference()
-{
-    // reset the java AudioOutput object with current mode
-    ResetJavaAudioOutputObject();
-}
-
-// ----------------------------------------------------------------------------------------
-// CAMMSAudioOutputControl::GetCurrentPrefInt
-// Gets the preference.if user preference is not set return the current device preference in TInt form
-// ----------------------------------------------------------------------------------------
-
-TInt CAMMSAudioOutputControl::GetCurrentPrefInt()
-{
-    TInt pref ;
-    // get the value of current preference
-    if (iRoutingUserPreference == CAudioOutput::ENoPreference)
-    {
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::GetCurrentPrefInt_if %d", (TInt)iDefaultDevicePreference);
-        pref = GetDeviceDefaultPreference();
-    }
-    else
-    {
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::GetCurrentPrefInt_else %d", (TInt)iRoutingUserPreference);
-        pref = (TInt)iRoutingUserPreference;
-    }
-    return pref;
-}
-// ----------------------------------------------------------------------------------------
-// CAMMSAudioOutputControl::GetDeviceDefaultPreference
-// Gets the current device preference used as default
-// ----------------------------------------------------------------------------------------
-TInt CAMMSAudioOutputControl::GetDeviceDefaultPreference()
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::GetDeviceDefaultPreference %d", (TInt)iDefaultDevicePreference);
-    array.Reset();
-    TInt temp = 0;
-    TRAPD(err,iAccMonitor->GetConnectedAccessoriesL(array));
-    if (err)
-    {
-        temp = -1;
-    }
-    TInt count = array.Count();
-    if (count == 0)
-    {
-        temp = (TInt)CAudioOutput::EPublic;
-    }
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::GetDeviceDefaultPreference :RConnectedAccessories count = %d",count);
-    for (TInt i = 0; i != count; i++)
-    {
-        TAccMonCapability deviceType = array[ i ]->AccDeviceType();
-        if ((deviceType == KAccMonHeadset)||(deviceType == KAccMonBluetooth))
-        {
-            LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::CreateHeadsetStateObserverL info = Headset Connected  ");
-            temp = (TInt)CAudioOutput::EPrivate;
-            break;
-        }
-
-    }
-    return temp;
-}
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::StateChanged
-// Called when player state is changed.
-// -----------------------------------------------------------------------------
-void CAMMSAudioOutputControl::StateChanged(TInt aState)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::StateChanged +, state = %d",  aState);
-    playerState = (CMMAPlayer::TPlayerState)aState;
-    if (aState == CMMAPlayer::EStarted)
-    {
-        NotifyJavaOnChange();
-    }
-}
-
-const TDesC& CAMMSAudioOutputControl::ClassName() const
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSAudioOutputControl::ClassName");
-    return KAMMSAudioOutputControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::SetPriorityToMmf
-// Scales the given AMMS priority to MMF priority and sets it to MMF.
-// -----------------------------------------------------------------------------
-TInt CAMMSAudioOutputControl::SetAudioOutputToMmf(CAudioOutput::TAudioOutputPreference aPref)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::SetAudioOutputToMmfL +");
-    CAudioOutput::TAudioOutputPreference tempPreference = iRoutingUserPreference ;
-    iRoutingUserPreference = aPref;
-    TRAPD(err,CreateNativeAudioOutputControlL();
-          iAudioOutput->SetAudioOutputL(aPref));
-    if (KErrNone != err)
-    {
-        iRoutingUserPreference = tempPreference;
-        TBuf<KEventMessageSize> errorMessage;
-        errorMessage.Format(KErrAudioOutputControlError, err);
-        iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-    }
-    // if during play user set a preference event should be sent to java
-    if (playerState == CMMAPlayer::EStarted)
-    {
-        NotifyJavaOnChange();
-    }
-    return (TInt)iRoutingUserPreference;
-}
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::DefaultAudioOutputChanged
-// MAudioOutputObserver's function is implemented to notify about the change in routing preference
-// -----------------------------------------------------------------------------
-
-void CAMMSAudioOutputControl::DefaultAudioOutputChanged(CAudioOutput& /*aAudioOutput*/,
-        CAudioOutput::TAudioOutputPreference /*aNewDefault*/)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DefaultAudioOutputChanged ");
-
-}
-
-void CAMMSAudioOutputControl::NotifyJavaOnChange()
-{
-    TInt tempPref = GetCurrentPrefInt();
-    if (iCurrentPreference == tempPref)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::NotifyJavaOnChange - No Event ");
-        return;
-    }
-    //reset the java side object with the current iCurrentActualPreference
-    ResetJavaAudioOutputObject();
-    iCurrentPreference = tempPref;
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::NotifyJavaOnChange - Sending Event ");
-    iPlayer->PostObjectEvent(CMMAPlayerEvent::EAudioOutputPreferenceChangeEvent, iJavaAudioOutputObj);
-}
-
-void CAMMSAudioOutputControl::AccMonitorObserverError(TInt /*aError*/)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::AccMonitorObserverError");
-}
-// -----------------------------------------------------------------------------
-// CAMMSAudioOutputControl::CAMMSAudioOutputControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioOutputControl::CAMMSAudioOutputControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer),
-        iRoutingUserPreference(CAudioOutput::ENoPreference)
-{
-}
-// HEADSET CONNECTED OR NOT
-void CAMMSAudioOutputControl::ConnectedL(CAccMonitorInfo* aAccessoryInfo)
-{    // Reserve memory for the accessory information instance if necessary
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::ConnectedL +");
-    if (!iAccessoryInfo)
-    {
-        iAccessoryInfo = CAccMonitorInfo::NewL();
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::ConnectedL iAccessoryInfo created");
-    }
-    // Otherwise just reset accessory information instance
-    else
-    {
-        iAccessoryInfo->Reset();
-    }
-    iAccessoryInfo->CopyL(aAccessoryInfo);
-    TAccMonCapability deviceType = iAccessoryInfo->AccDeviceType() ;
-    if ((deviceType == KAccMonHeadset) || (deviceType == KAccMonBluetooth))
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DisconnectedL: Headset connected");
-        //send a callback
-        if (iRoutingUserPreference == (TInt)(CAudioOutput::ENoPreference))
-        {
-            NotifyJavaOnChange();
-        }
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::ConnectedL -");
-}
-
-
-void CAMMSAudioOutputControl::DisconnectedL(CAccMonitorInfo*  aAccessoryInfo)
-{   // Reserve memory for the accessory information instance if necessary
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DisconnectedL +");
-    if (!iAccessoryInfo)
-    {
-        iAccessoryInfo = CAccMonitorInfo::NewL();
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DisconnectedL: iAccessoryInfo created");
-    }
-    else
-    {
-        iAccessoryInfo->Reset();
-    }
-    iAccessoryInfo->CopyL(aAccessoryInfo);
-    TAccMonCapability deviceType = iAccessoryInfo->AccDeviceType();
-    if ((deviceType == KAccMonHeadset)||(deviceType == KAccMonBluetooth))
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DisconnectedL: Headset Disconnected");
-        //send a callback
-        if (iRoutingUserPreference == (TInt)(CAudioOutput::ENoPreference))
-        {
-            NotifyJavaOnChange();
-        }
-    }
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::DisconnectedL -");
-}
-
-// start observing headset connection disconnection
-
-void CAMMSAudioOutputControl::CreateHeadsetStateObserverL()
-{
-    // Headset connection and disconnection
-    iAccessoryInfo = NULL;
-    capabilityArray.Append(KAccMonHeadset);
-    capabilityArray.Append(KAccMonBluetooth);
-
-    iAccMonitor = CAccMonitor::NewL();
-    iDefaultDevicePreference = (CAudioOutput::TAudioOutputPreference)GetDeviceDefaultPreference();
-    iCurrentPreference = (TInt)iDefaultDevicePreference;
-    TBool isObserving = iAccMonitor->IsObserving();
-    if (!isObserving)
-    {
-        iAccMonitor->StartObservingL(this, capabilityArray);
-    }
-}
-
-// end CreateHeadsetStateObserver
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::ConstructL
-// 2nd phase constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSAudioOutputControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioOutputControl::ConstructL +");
-    // create an observer to notify the state of headset
-    //and initialize iDefaultDevicePreference with CAudioOutput::EPrivate if headset is connected.
-    CreateHeadsetStateObserverL();
-    iPlayer->AddStateListenerL(this);
-}
-
-void CAMMSAudioOutputControl::CreateNativeAudioOutputControlL()
-{
-    if (iAudioOutput)
-    {
-        return;
-    }
-
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-        iAudioOutput = CAudioOutput::NewL(*(mmaMIDIPlayer->MidiClient()));
-    }
-    else if (iPlayer->Type() == KMMAAudioPlayer)
-    {
-        MCustomCommand* customCommandUtility = (MCustomCommand *)CreateCustomCommandUtilityL();
-        // Create the CAudioOutput Object to handle the audio routing
-        iAudioOutput = CAudioOutput::NewL(*customCommandUtility);
-    }
-    else if (iPlayer->Type() == KMMAVideoPlayer)
-    {
-        CMMAVideoPlayer* mmaVideoPlayer =
-            reinterpret_cast< CMMAVideoPlayer* >(iPlayer);
-        RMMFController& mmfController = mmaVideoPlayer->Controller();
-        MCustomCommand* customCommandUtility =
-            CAMMSCustomCommandUtility::NewL(mmfController);
-        iAudioOutput = CAudioOutput::NewL(*customCommandUtility);
-    }
-    
-    if(iAudioOutput)
-    {
-   		iAudioOutput->RegisterObserverL(*this);
-  	}
-    else
-    {
-    	User::Leave(KErrNotSupported);
-    }	
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsaudiovirtualizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Virtualizes audio channels.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsaudiovirtualizercontrol.h"
-
-// CONSTANTS
-const TInt KAMMSDefaultStereoWideningLevel = 100;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSAudioVirtualizerControl* CAMMSAudioVirtualizerControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSAudioVirtualizerControl* self =
-        new(ELeave) CAMMSAudioVirtualizerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSAudioVirtualizerControl::~CAMMSAudioVirtualizerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::~CAMMSAudioVirtualizerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete iStereoWideningUtility;
-    delete iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioVirtualizerControl::SetPresetL(const TDesC& aPreset)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::SetPresetL \"%S\"",
-              aPreset.Ptr());
-
-    const CDesCArray& presetNames = PresetNamesL();
-
-    TInt presetPosition = 0;
-    TInt findPreset = presetNames.Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        // This supposes that the indexing of the presets starts at zero.
-        iStereoWideningUtility->GetPresetL(presetPosition);
-
-        // Set the base class audio effect as the new CStereoWidening
-        // that is set with the previous GetPresetL method.
-        iAudioEffect = &(iStereoWideningUtility->StereoWidening());
-        iCurrentPreset = presetPosition;
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::SetPresetL \"%S\" GetPresetL OK",
-                  aPreset.Ptr());
-    }
-    else
-    {
-        User::Leave(KErrArgument);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSAudioVirtualizerControl::PresetNamesL()
-{
-    // Returns an array of all preset names (pre-defined and user-defined).
-    // The pre-defined presets are in the beginning of the list.
-
-    TArray< TEfStereoWideningUtilityPreset > presetNames =
-        iStereoWideningUtility->Presets();
-
-    // Before appending the preset names, reset the member array
-    iPresetNames->Reset();
-    for (TInt i = 0; i < presetNames.Count(); i++)
-    {
-        iPresetNames->AppendL(presetNames[ i ].iPresetName);
-    }
-
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSAudioVirtualizerControl::PresetL()
-{
-    //if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-    else
-    {
-        // Retrieves a Preset with the given index from the Central Repository
-        return iStereoWideningUtility->GetPresetL(iCurrentPreset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioVirtualizerControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect.
-
-        ((CStereoWidening*)iAudioEffect)->SetStereoWideningLevelL(
-            KAMMSDefaultStereoWideningLevel);
-
-        // Instead of using CAudioEffectBase: virtual void EnableL(),
-        // use the derived effect's (=preset's) ApplyL which calls EnableL.
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::SetEnabledL(true), calling ApplyL");
-        iAudioEffect->ApplyL();
-    }
-    else
-    {
-        // Disable the effect
-        // Instead of using CAudioEffectBase: virtual void DisableL(),
-        // use the utility class DisableStereoWideningL,
-        // which calls DisableL for the correct preset
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::SetEnabledL(false), calling DisableStereoWideningL");
-        iStereoWideningUtility->DisableStereoWideningL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioVirtualizerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iStereoWideningUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Effect API takes the ownership of customCommandUtility.
-        iStereoWideningUtility = CStereoWideningUtility::NewL(
-                                     customCommandUtility);
-
-        // Set the base class audio effect as CStereoWidening
-        // even the native CStereoWideningUtility has an empty CStereoWidening
-        iAudioEffect = &(iStereoWideningUtility->StereoWidening());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSAudioVirtualizerControl::DeallocateControl()
-{
-    if (iStereoWideningUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSAudioVirtualizerControl::DeallocateControl");
-
-        // Delete the Effect API class.
-        TRAPD(err, iStereoWideningUtility->DisableStereoWideningL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Utility
-            // class is already created, that situation can be discarded here.
-        }
-
-        delete iStereoWideningUtility;
-        iStereoWideningUtility = NULL;
-    }
-}
-
-const TDesC& CAMMSAudioVirtualizerControl::ClassName() const
-{
-    return KAMMSAudioVirtualizerControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSAudioVirtualizerControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSAudioVirtualizerControl::CAMMSAudioVirtualizerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSAudioVirtualizerControl::CAMMSAudioVirtualizerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSEffectControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsbasedistanceattenuationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsbasedistanceattenuationcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// Destructor
-CAMMSBaseDistanceAttenuationControl::~CAMMSBaseDistanceAttenuationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSBaseDistanceAttenuationControl::~CAMMSBaseDistanceAttenuationControl");
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSBaseDistanceAttenuationControl::CAMMSBaseDistanceAttenuationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSBaseDistanceAttenuationControl::CAMMSBaseDistanceAttenuationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsbaseequalizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsbaseequalizercontrol.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// Destructor
-CAMMSBaseEqualizerControl::~CAMMSBaseEqualizerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSBaseEqualizerControl::~CAMMSBaseEqualizerControl");
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSBaseEqualizerControl::CAMMSBaseEqualizerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSBaseEqualizerControl::CAMMSBaseEqualizerControl(CMMAPlayer* aPlayer)
-        : CAMMSEffectControl(aPlayer)
-{
-}
-
-//  End of File
-
-
-
--- a/javauis/amms_qt/mmacontrol/src/cammsbasereverbcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsbasereverbcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSBaseReverbControl::~CAMMSBaseReverbControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSBaseReverbControl::~CAMMSBaseReverbControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSBaseReverbControl::GetEnvironmentalReverbUtilityL
-// Returns the environmental reverb utility.
-// -----------------------------------------------------------------------------
-void CAMMSBaseReverbControl::GetEnvironmentalReverbUtilityL(
-    CEnvironmentalReverbUtility** /*aEnvironmentalReverbUtility*/)
-{
-    // Derived Class will implement this method
-}
-// only require if platform support EMC
-#ifdef RD_JAVA_HTTP_EMC_ENABLED
-MReverbControl* CAMMSBaseReverbControl::GetReverbControlL()
-{
-    // derived class will implement this method
-    return (MReverbControl*)NULL;
-}
-#endif
-// -----------------------------------------------------------------------------
-// CAMMSBaseReverbControl::CAMMSBaseReverbControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSBaseReverbControl::CAMMSBaseReverbControl(CMMAPlayer* aPlayer)
-        : CAMMSEffectControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsbasereverbsourcecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect reverb source.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsbasereverbsourcecontrol.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// Destructor
-CAMMSBaseReverbSourceControl::~CAMMSBaseReverbSourceControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSBaseReverbSourceControl::~CAMMSBaseReverbSourceControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSBaseReverbSourceControl::CAMMSBaseReverbSourceControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSBaseReverbSourceControl::CAMMSBaseReverbSourceControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammscontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for AMMS controls.
-*
-*/
-
-
-// INCLUDE FILES
-#include <cmmaaudioplayer.h>
-#include <cmmamidiplayer.h>
-#include "cammscontrol.h"
-#include "cammscustomcommandutility.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSControl::~CAMMSControl()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControl::CreateCustomCommandUtilityL
-// Creates a custom command utility.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CCustomCommandUtility* CAMMSControl::CreateCustomCommandUtilityL()
-{
-    CCustomCommandUtility* customCommandUtility = NULL;
-
-    if (iPlayer->Type() == KMMAMIDIPlayer)
-    {
-        CMMAMIDIPlayer* mmaMIDIPlayer =
-            reinterpret_cast< CMMAMIDIPlayer* >(iPlayer);
-
-        CMidiClientUtility* midiClientUtility = mmaMIDIPlayer->MidiClient();
-        customCommandUtility =
-            CCustomCommandUtility::NewL(*midiClientUtility);
-    }
-    else if (iPlayer->Type() == KMMAAudioPlayer)
-    {
-        CMMAAudioPlayer* mmaAudioPlayer =
-            reinterpret_cast< CMMAAudioPlayer* >(iPlayer);
-
-        RMMFController& mmfController = mmaAudioPlayer->Controller();
-        customCommandUtility =
-            CAMMSCustomCommandUtility::NewL(mmfController);
-    }
-    else
-    {
-        // Player is KMMAEMCAudioPlayer or of other type
-        // Do nothing
-    }
-
-    return customCommandUtility;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControl::PublicClassName
-// Returns public class name.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSControl::PublicClassName() const
-{
-    // Return null descriptor so that the control name is not visible in MMA.
-    return KNullDesC;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControl::PrepareControlL
-// Virtual function to prepare Controls.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSControl::PrepareControlL()
-{
-    // Empty implementation, the Controls that need preparing overwrite this
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControl::DeallocateControl
-// Virtual function to deallocate Controls.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSControl::DeallocateControl()
-{
-    // Empty implementation, the Controls that need deallocating overwrite this
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControl::CAMMSControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSControl::CAMMSControl(CMMAPlayer* aPlayer)
-        : iPlayer(aPlayer)
-{
-}
-
-//  End of File
-
--- a/javauis/amms_qt/mmacontrol/src/cammscustomcommandutility.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Custom command utility class for AMMS custom commands.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammscustomcommandutility.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSCustomCommandUtility::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSCustomCommandUtility* CAMMSCustomCommandUtility::NewL(
-    RMMFController& aMMFController)
-{
-    CAMMSCustomCommandUtility* self = NewLC(aMMFController);
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSCustomCommandUtility::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSCustomCommandUtility* CAMMSCustomCommandUtility::NewLC(
-    RMMFController& aMMFController)
-{
-    CAMMSCustomCommandUtility* self =
-        new(ELeave) CAMMSCustomCommandUtility(aMMFController);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSCustomCommandUtility::~CAMMSCustomCommandUtility()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSCustomCommandUtility::~CAMMSCustomCommandUtility");
-}
-
-TInt CAMMSCustomCommandUtility::CustomCommandSync(
-    const TMMFMessageDestinationPckg& aDestination,
-    TInt aFunction,
-    const TDesC8& aDataTo1,
-    const TDesC8& aDataTo2,
-    TDes8& aDataFrom)
-{
-    LOG1( EJavaAMMS, EInfo, 
-        "AMMS::CAMMSCustomCommandUtility::CustomCommandSync(1) function: %d",
-        aFunction);
-
-    // In the first message (ECibGetBuilder) the aDataTo1 is null,
-    // but in the second message (ECibBuild) it should contain the interface ID
-
-    return iMMFController.CustomCommandSync(
-               aDestination,
-               aFunction,
-               aDataTo1,
-               aDataTo2,
-               aDataFrom);
-}
-
-TInt CAMMSCustomCommandUtility::CustomCommandSync(
-    const TMMFMessageDestinationPckg& aDestination,
-    TInt aFunction,
-    const TDesC8& aDataTo1,
-    const TDesC8& aDataTo2)
-{
-    LOG1( EJavaAMMS, EInfo, 
-        "AMMS::CAMMSCustomCommandUtility::CustomCommandSync(2) function: %d",
-        aFunction);
-    return iMMFController.CustomCommandSync(
-               aDestination,
-               aFunction,
-               aDataTo1,
-               aDataTo2);
-}
-
-void CAMMSCustomCommandUtility::CustomCommandAsync(
-    const TMMFMessageDestinationPckg& aDestination,
-    TInt aFunction,
-    const TDesC8& aDataTo1,
-    const TDesC8& aDataTo2,
-    TDes8& aDataFrom,
-    TRequestStatus& aStatus)
-{
-    LOG1( EJavaAMMS, EInfo, 
-        "AMMS::CAMMSCustomCommandUtility::CustomCommandAsync(1) function: %d",
-        aFunction);
-    iMMFController.CustomCommandAsync(
-        aDestination,
-        aFunction,
-        aDataTo1,
-        aDataTo2,
-        aDataFrom,
-        aStatus);
-}
-
-void CAMMSCustomCommandUtility::CustomCommandAsync(
-    const TMMFMessageDestinationPckg& aDestination,
-    TInt aFunction,
-    const TDesC8& aDataTo1,
-    const TDesC8& aDataTo2,
-    TRequestStatus& aStatus)
-{
-    LOG1( EJavaAMMS, EInfo, 
-        "AMMS::CAMMSCustomCommandUtility::CustomCommandAsync(2) function: %d",
-        aFunction);
-    iMMFController.CustomCommandAsync(
-        aDestination,
-        aFunction,
-        aDataTo1,
-        aDataTo2,
-        aStatus);
-}
-
-// -----------------------------------------------------------------------------
-// CCAMMSCustomCommandUtility::CAMMSCustomCommandUtility
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSCustomCommandUtility::CAMMSCustomCommandUtility(
-    RMMFController& aMMFController):
-        iMMFController(aMMFController)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsdistanceattenuationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls how the sound is attenuated with its distance.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsdistanceattenuationcontrol.h"
-
-// CONSTANTS
-namespace
-{
-const TInt KAMMSRoomRollOffFactor = 0; // The logical default value set to 0
-// Rolloff factor 1000 in AMMS is 100 in Effect API
-const TInt KAMMSRolloffDivider = 10;
-
-#ifdef _DEBUG
-const TInt KAMMSMinDistance = 1;
-const TInt KAMMSMinRollofFactor = 0;
-#endif // _DEBUG
-}
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSDistanceAttenuationControl* CAMMSDistanceAttenuationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSDistanceAttenuationControl* self =
-        new(ELeave)CAMMSDistanceAttenuationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSDistanceAttenuationControl::~CAMMSDistanceAttenuationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDistanceAttenuationControl::~CAMMSDistanceAttenuationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete iDistanceAttenuation;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControl::SetParametersL
-// Sets all the 3D audio distance attenuation parameters simultaneously.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDistanceAttenuationControl::SetParametersL(
-    TInt aMinDistance,
-    TInt aMaxDistance,
-    TBool aMuteAfterMax,
-    TInt aRolloffFactor)
-{
-    // Check in debug build that parameters are within valid range.
-    __ASSERT_DEBUG(
-        (aMaxDistance > aMinDistance) &&
-        (aMinDistance >= KAMMSMinDistance) &&
-        (aMaxDistance >= KAMMSMinDistance) &&
-        (aRolloffFactor >= KAMMSMinRollofFactor),
-        User::Invariant());
-
-    // NOTE: Effect API uses hundreths (100 corresponds to 1.00),
-    // but JSR234 uses thousandths (1000 represents a rolloff factor of 1.0)
-    //
-    LOG4( EJavaMMAPI, EInfo, "AMMS::CAMMSDistanceAttenuationControl::SetParametersL %d, %d, %d, %d",
-               aMinDistance, aMaxDistance, aMuteAfterMax, aRolloffFactor);
-
-    TInt convertedRolloffFactor = aRolloffFactor / KAMMSRolloffDivider;
-
-    iDistanceAttenuation->SetDistanceAttenuationL(aMinDistance, aMaxDistance,
-            aMuteAfterMax, convertedRolloffFactor, KAMMSRoomRollOffFactor);
-
-    // Apply updated settings to Effect API.
-    iDistanceAttenuation->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDistanceAttenuationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iDistanceAttenuation)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDistanceAttenuationControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Effect API takes the ownership of customCommandUtility.
-        iDistanceAttenuation = CDistanceAttenuation::NewL(
-                                   customCommandUtility);
-
-        // Enable the Effect API Control
-        iDistanceAttenuation->EnableL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDistanceAttenuationControl::DeallocateControl()
-{
-    if (iDistanceAttenuation)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDistanceAttenuationControl::DeallocateControl");
-
-        // Disable the Effect API Control
-        TRAPD(err, iDistanceAttenuation->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class (it deletes CustomCommandUtility)
-        delete iDistanceAttenuation;
-        iDistanceAttenuation = NULL;
-    }
-}
-
-const TDesC& CAMMSDistanceAttenuationControl::ClassName() const
-{
-    return KAMMSDistanceAttenuationControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDistanceAttenuationControl::CAMMSDistanceAttenuationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSDistanceAttenuationControl::CAMMSDistanceAttenuationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSBaseDistanceAttenuationControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsdopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an effect called Doppler.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32math.h>
-#include <logger.h>
-#include "cammsdopplercontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSDopplerControl::~CAMMSDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::~CAMMSDopplerControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::SetEnabled
-// Specifies if this Doppler effect is active or ignored.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDopplerControl::SetEnabledL(TBool aDopplerEnabled)
-{
-    if (aDopplerEnabled)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::SetEnabledL(true)");
-        iDopplerEffect->EnableL();
-    }
-    else
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::SetEnabledL(false)");
-        iDopplerEffect->DisableL();
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::Enabled
-// Returns whether this Doppler effect is currently active.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSDopplerControl::Enabled()
-{
-    return iDopplerEffect->IsEnabled();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::SetVelocityCartesianL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDopplerControl::SetVelocityCartesianL(
-    TInt aX,
-    TInt aY,
-    TInt aZ)
-{
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::SetVelocityCartesianL: X=%d, Y=%d, Z=%d",
-               aX, aY, aZ);
-
-    iDopplerEffect->SetCartesianVelocityL(aX, aY, aZ);
-
-    // Apply updated settings to Effect API.
-    iDopplerEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::VelocityCartesian
-// Returns the current velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDopplerControl::VelocityCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Get the velocity's cartesian settings
-    // aX, aY and aZ are velocities in format mm/s
-
-    iDopplerEffect->CartesianVelocity(
-        (TInt32&)aX, (TInt32&)aY, (TInt32&)aZ);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::SetVelocitySphericalL
-// Sets the velocity, used in calculations for the Doppler effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSDopplerControl::SetVelocitySphericalL(
-    TInt aAzimuth,
-    TInt aElevation,
-    TInt aRadius)
-{
-    // Parameters are thousandths of radians
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::SetVelocitySphericalL %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth * KDegToRad *
-                                       1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedElevation = (TInt32)(aElevation * KDegToRad *
-                                         1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSDopplerControl::SetVelocitySphericalL %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    iDopplerEffect->SetSphericalVelocityL(
-        convertedAzimuth, convertedElevation, aRadius);
-
-    // Apply updated settings to Effect API.
-    iDopplerEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSDopplerControl::CAMMSDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSDopplerControl::CAMMSDopplerControl(CMMAPlayer* aPlayer):
-        CAMMSControl(aPlayer)
-{
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammseffectcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls an abstract filter with various preset settings.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammseffectcontrol.h"
-#include "cammseffectcontrolgroup.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSEffectControl::~CAMMSEffectControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl::~CAMMSEffectControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::SetEnforcedL
-// Enforces the effect to be in use.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEffectControl::SetEnforcedL(TBool aEnforced)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:SetEnforcedL");
-    // Indicate the effect is to be enforced or not. ETrue = Enforced.
-
-    iAudioEffect->EnforceL(aEnforced);
-
-    ApplySettingsL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::Enforced
-// Returns the current enforced setting of the effect.
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSEffectControl::Enforced()
-{
-    // Returns ETrue if the effect is enforced, EFalse if not enforced.
-    return iAudioEffect->IsEnforced();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::SetScopeL
-// Sets the scope of the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEffectControl::SetScopeL(TInt aScope)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:SetScopeL");
-    // Check in debug build that scope is the only supported scope (LIVE_ONLY).
-    __ASSERT_DEBUG(
-        (aScope == CAMMSEffectControlGroup::EScopeLiveOnly),
-        User::Invariant());
-    // Just to suppress warning in release build
-    (void)aScope;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::Scope
-// Returns the scope in which the effect is present.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEffectControl::Scope()
-{
-    // For now only the (LIVE_ONLY) scope is supported.
-    return CAMMSEffectControlGroup::EScopeLiveOnly;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::ApplySettingsL
-// Apply changed settings if Effect is in enabled state.
-// -----------------------------------------------------------------------------
-void CAMMSEffectControl::ApplySettingsL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:ApplySettingsL called, checking state");
-    if (iAudioEffect->IsEnabled())
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEffectControl:ApplySettingsL calling ApplyL");
-        iAudioEffect->ApplyL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEffectControl::ConstructL()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectControl::CAMMSEffectControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEffectControl::CAMMSEffectControl(CMMAPlayer* aPlayer):
-        CAMMSControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsequalizercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,365 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the equalization settings of a Player.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsequalizercontrol.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEqualizerControl* CAMMSEqualizerControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSEqualizerControl* self =
-        new(ELeave) CAMMSEqualizerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSEqualizerControl::~CAMMSEqualizerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::~CAMMSEqualizerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete iEqualizerUtility;
-    delete iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::BandLevelL
-// Gets the gain set for the given equalizer band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::BandLevelL(TInt aBand)
-{
-    // if aBand is out of range the method must leave with KErrArgument.
-    if (aBand < 0 || aBand > (NumberOfBands() - 1))
-    {
-        User::Leave(KErrArgument);
-    }
-
-    // Returns the band level in mB for the specified band
-    // AudioEqualizerBase: TInt32 BandLevel( TUint8 aBand ) const;
-    return ((CAudioEqualizer*)iAudioEffect)->BandLevel(
-               (TUint8)(aBand + KAMMSBandOffset));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::MaxBandLevel
-// Returns the maximum band level supported.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::MaxBandLevel()
-{
-    // Get the dB range in mB for the equalizer.
-
-    TInt32 minLevel = 0;
-    TInt32 maxLevel = 0;
-    ((CAudioEqualizer*)iAudioEffect)->DbLevelLimits(minLevel, maxLevel);
-
-    return maxLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::MinBandLevel
-// Returns the minimum band level supported.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::MinBandLevel()
-{
-    // Get the dB range in mB for the equalizer.
-
-    TInt32 minLevel = 0;
-    TInt32 maxLevel = 0;
-    ((CAudioEqualizer*)iAudioEffect)->DbLevelLimits(minLevel, maxLevel);
-
-    return minLevel;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::BandWidth
-// Returns the band width in Hz for the specified band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::BandWidth(TInt aBand)
-{
-    return ((CAudioEqualizer*)iAudioEffect)->BandWidth(
-               (TUint8)(aBand + KAMMSBandOffset));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::CenterFrequency
-// Returns the center frequency in Hz for a given band.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::CenterFrequency(TInt aBand)
-{
-    return ((CAudioEqualizer*)iAudioEffect)->CenterFrequency(
-               (TUint8)(aBand + KAMMSBandOffset));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::CrossoverFrequency
-// Returns the cross-over frequency between the given frequency.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::CrossoverFrequency(TInt aBand)
-{
-    return ((CAudioEqualizer*)iAudioEffect)->CrossoverFrequency(
-               (TUint8)(aBand + KAMMSBandOffset));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::NumberOfBands
-// Gets the number of frequency bands that the equalizer supports.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSEqualizerControl::NumberOfBands()
-{
-    // Returns the number of equalizer bands.
-    // AudioEqualizerBase: TUint8 NumberOfBands() const;
-    return ((CAudioEqualizer*)iAudioEffect)->NumberOfBands();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::SetBandLevelL
-// Sets the given equalizer band to the given gain value.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEqualizerControl::SetBandLevelL(
-    TInt aLevel,
-    TInt aBand)
-{
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::SetBandLevelL: level=%d, band=%d",
-               aLevel, aBand);
-
-    // If aBand or aLevel is out of valid range the method must leave
-    // with KErrArgument.
-    if (aBand < 0 ||
-            aBand > (NumberOfBands() - 1) ||
-            aLevel < MinBandLevel() ||
-            aLevel > MaxBandLevel())
-    {
-        User::Leave(KErrArgument);
-    }
-
-    // Sets the equalizer band level value in mB, ranging from Min to Max
-    ((CAudioEqualizer*)iAudioEffect)->SetBandLevelL(
-        (TInt8)(aBand + KAMMSBandOffset), aLevel);
-
-    ApplySettingsL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEqualizerControl::SetPresetL(const TDesC& aPreset)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::SetPresetL \"%S\"", aPreset.Ptr());
-
-    const CDesCArray& presetNames = PresetNamesL();
-
-    TInt presetPosition = 0;
-    TInt findPreset = presetNames.Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        // This supposes that the indexing of the presets starts at zero.
-        iEqualizerUtility->GetPresetL(presetPosition);
-
-        // Set the base class audio effect as the new CAudioEqualizer
-        // that is set with the previous GetPresetL method.
-        iAudioEffect = &(iEqualizerUtility->Equalizer());
-        iCurrentPreset = presetPosition;
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::SetPresetL \"%S\" GetPresetL OK",
-                  aPreset.Ptr());
-    }
-    else
-    {
-        User::Leave(KErrArgument);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSEqualizerControl::PresetNamesL()
-{
-    // Returns an array of all preset names (pre-defined and user-defined).
-    // The pre-defined presets are in the beginning of the list.
-
-    TArray< TEfAudioEqualizerUtilityPreset > presetNames =
-        iEqualizerUtility->Presets();
-
-    // Before appending the preset names, reset the member array
-    iPresetNames->Reset();
-    for (TInt i = 0; i < presetNames.Count(); i++)
-    {
-        iPresetNames->AppendL(presetNames[ i ].iPresetName);
-    }
-
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSEqualizerControl::PresetL()
-{
-    //if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-    else
-    {
-        // Retrieves a Preset with the given index from the Central Repository
-        // AudioEqualizerUtility.h:
-        //      const TDesC& GetPresetL(TInt aPresetIndex)
-        return iEqualizerUtility->GetPresetL(iCurrentPreset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEqualizerControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect
-        // Instead of using CAudioEffectBase: virtual void EnableL(),
-        // use the derived effect's (=preset's) ApplyL which calls EnableL.
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::SetEnabledL(true), calling ApplyL");
-        iAudioEffect->ApplyL();
-    }
-    else
-    {
-        // Disable the effect
-        // Instead of using CAudioEffectBase: virtual void DisableL(),
-        // use the utility class DisableEqualizerL,
-        // which calls DisableL for the correct preset
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::SetEnabledL(false), calling DisableEqualizerL");
-        iEqualizerUtility->DisableEqualizerL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEqualizerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iEqualizerUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Effect API takes the ownership of customCommandUtility.
-        iEqualizerUtility = CAudioEqualizerUtility::NewL(
-                                customCommandUtility);
-
-        // Set the base class audio effect as CAudioEqualizer,
-        // even the native AudioEqualizerUtility has an empty CAudioEqualizer
-        iAudioEffect = &(iEqualizerUtility->Equalizer());
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSEqualizerControl::DeallocateControl()
-{
-    if (iEqualizerUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSEqualizerControl::DeallocateControlL");
-
-        // Delete the Effect API class.
-        TRAPD(err, iEqualizerUtility->DisableEqualizerL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Utility
-            // class is already created, that situation can be discarded here.
-        }
-
-        delete iEqualizerUtility;
-        iEqualizerUtility = NULL;
-    }
-}
-
-const TDesC& CAMMSEqualizerControl::ClassName() const
-{
-    return KAMMSEqualizerControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEqualizerControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEqualizerControl::CAMMSEqualizerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEqualizerControl::CAMMSEqualizerControl(CMMAPlayer* aPlayer)
-        : CAMMSBaseEqualizerControl(aPlayer)
-{
-}
-
-//  End of File
-
-
-
--- a/javauis/amms_qt/mmacontrol/src/cammslocationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of an object.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32math.h>
-#include <logger.h>
-#include "cammslocationcontrol.h"
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMinRadius = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSLocationControl::~CAMMSLocationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSLocationControl::~CAMMSLocationControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControl::SetLocationCartesianL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSLocationControl::SetLocationCartesianL(
-    TInt& aX,
-    TInt& aY,
-    TInt& aZ)
-{
-    // Sets the cartesian coordinates for the listener/source location.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSLocationControl::SetLocationCartesianL: %d, %d, %d",
-               aX, aY, aZ);
-
-    iLocationEffect->SetLocationCartesianL(
-        (TInt32&)aX, (TInt32&)aY, (TInt32&)aZ);
-
-    // Apply updated settings to Effect API.
-    iLocationEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControl::LocationCartesian
-// Gets the coordinates of the current location.
-// -----------------------------------------------------------------------------
-void CAMMSLocationControl::LocationCartesian(
-    TInt& aX, TInt& aY, TInt& aZ)
-{
-    // Gets the cartesian coordinates for the location of the listener position.
-    // The coordinates of the positions are in millimeters.
-
-    iLocationEffect->LocationCartesian(
-        (TInt32&)aX, (TInt32&)aY, (TInt32&)aZ);
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControl::SetLocationSphericalL
-// Moves the object to the new location.
-// -----------------------------------------------------------------------------
-void CAMMSLocationControl::SetLocationSphericalL(
-    TInt& aAzimuth,
-    TInt& aElevation,
-    TInt& aRadius)
-{
-    // Check in debug build that aRadius is within valid range.
-    __ASSERT_DEBUG(aRadius >= KAMMSMinRadius, User::Invariant());
-
-    // Sets the spherical coordinates for the location of the listener position.
-    // The parameters are thousandths of radians
-    //
-    // NOTE: Effect API uses thousandths of radians for aAzimuth and aElevation,
-    // but JSR234 uses degrees.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSLocationControl::SetLocationSphericalL: %d, %d, %d",
-               aAzimuth, aElevation, aRadius);
-
-    TInt32 convertedAzimuth = (TInt32)(aAzimuth *
-                                       KDegToRad * 1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedElevation = (TInt32)(aElevation *
-                                         KDegToRad * 1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSLocationControl::SetLocationSphericalL: %d, %d",
-               convertedAzimuth, convertedElevation);
-
-    iLocationEffect->SetLocationSphericalL(
-        convertedAzimuth, convertedElevation, (TInt32&)aRadius);
-
-    // Apply updated settings to Effect API.
-    iLocationEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSLocationControl::CAMMSLocationControl
-// C++ constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSLocationControl::CAMMSLocationControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsorientationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of an object.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32math.h>
-#include <logger.h>
-#include "cammsorientationcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSOrientationControl::~CAMMSOrientationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSOrientationControl::~CAMMSOrientationControl");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControl::SetOrientationL
-// Turns the object to the new orientation.
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControl::SetOrientationL(
-    TInt aHeading,
-    TInt aPitch,
-    TInt aRoll)
-{
-    // Sets the Heading, Pitch, Roll values for the source/listener orientation.
-    // Parameters are given in thousandths of radians.
-    // SourceOrientationBase/ListenerLocationBase :
-    //
-    // NOTE: Effect API uses thousandths of radians for all three parameters,
-    // but JSR234 uses degrees.
-    //
-    // From e32Math.h: The multiplying factor to convert degrees to radians.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSOrientationControl::SetOrientationL: %d, %d, %d",
-               aHeading, aPitch, aRoll);
-
-    TInt32 convertedHeading = (TInt32)(aHeading * KDegToRad *
-                                       1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedPitch = (TInt32)(aPitch * KDegToRad *
-                                     1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    TInt32 convertedRoll = (TInt32)(aRoll * KDegToRad *
-                                    1000);   // CSI: 47 Effect API uses thousands of radians #
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSOrientationControl::SetOrientationL: %d, %d, %d",
-               convertedHeading, convertedPitch, convertedRoll);
-
-    iOrientationEffect->SetOrientationL(
-        convertedHeading, convertedPitch, convertedRoll);
-
-    // Apply updated settings to Effect API.
-    iOrientationEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControl::SetOrientationL
-// Turns the object to the new orientation.
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControl::SetOrientationL(
-    TInt aFrontX, TInt aFrontY, TInt aFrontZ,
-    TInt aAboveX, TInt aAboveY, TInt aAboveZ)
-{
-    // Check in debug build that parameters are not zero vectors.
-    __ASSERT_DEBUG(((aFrontX != 0) ||
-                    (aFrontY != 0) ||
-                    (aFrontZ != 0)) &&
-                   ((aAboveX != 0) ||
-                    (aAboveY != 0) ||
-                    (aAboveZ != 0)),
-                   User::Invariant());
-
-    // Check in debug build that vectors are not parallel.
-    // Two vectors are parallel if their cross product is zero vector.
-    // Cross product of vectors a1*i + a2*j + a3*k and b1*i + b2*j + b3*k :
-    // (a2*b3 - a3*b2)i + (a3*b1 - a1*b3)j + (a1*b2 - a2*b1)k
-    __ASSERT_DEBUG(
-        ((aFrontY * aAboveZ) - (aFrontZ * aAboveY) != 0) ||
-        ((aFrontZ * aAboveX) - (aFrontX * aAboveZ) != 0) ||
-        ((aFrontX * aAboveY) - (aFrontY * aAboveX) != 0),
-        User::Invariant());
-
-    // Sets the Front and Above vectors for the orientation of the source/listener.
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSOrientationControl::SetOrientationL: Front %d, %d, %d",
-               aFrontX, aFrontY, aFrontZ);
-
-    LOG3( EJavaAMMS, EInfo, "AMMS::CAMMSOrientationControl::SetOrientationL: Above %d, %d, %d",
-               aAboveX, aAboveY, aAboveZ);
-
-    iOrientationEffect->SetOrientationVectorsL(
-        (TInt32)aFrontX, (TInt32)aFrontY, (TInt32)aFrontZ,
-        (TInt32)aAboveX, (TInt32)aAboveY, (TInt32)aAboveZ);
-
-    // Apply updated settings to Effect API.
-    iOrientationEffect->ApplyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControl::OrientationVectors
-// Gets the orientation of the object using two vectors.
-// -----------------------------------------------------------------------------
-void CAMMSOrientationControl::OrientationVectors(
-    TInt& aFrontX, TInt& aFrontY, TInt& aFrontZ,
-    TInt& aAboveX, TInt& aAboveY, TInt& aAboveZ)
-{
-    // Gets the orientation of the source.
-
-    iOrientationEffect->OrientationVectors(
-        (TInt32&)aFrontX, (TInt32&)aFrontY, (TInt32&)aFrontZ,
-        (TInt32&)aAboveX, (TInt32&)aAboveY, (TInt32&)aAboveZ);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSOrientationControl::CAMMSOrientationControl
-// C++ constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSOrientationControl::CAMMSOrientationControl(CMMAPlayer* aPlayer)
-        : CAMMSControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsplayerbuilder.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for AMMS player builders.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "cammsplayerbuilder.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSPlayerBuilder::~CAMMSPlayerBuilder()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilder::CAMMSPlayerBuilder
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPlayerBuilder::CAMMSPlayerBuilder()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsplayerbuildergroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder group for adding players.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "cammsplayerbuildergroup.h"
-
-// CONSTANTS
-const TInt KDefaultGranularity = 1;
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPlayerBuilderGroup* CAMMSPlayerBuilderGroup::NewL()
-{
-    CAMMSPlayerBuilderGroup* self = NewLC();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSPlayerBuilderGroup* CAMMSPlayerBuilderGroup::NewLC()
-{
-    CAMMSPlayerBuilderGroup* self = new(ELeave) CAMMSPlayerBuilderGroup();
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSPlayerBuilderGroup::~CAMMSPlayerBuilderGroup()
-{
-    if (iPlayerBuilders)
-    {
-        iPlayerBuilders->ResetAndDestroy();
-    }
-    delete iPlayerBuilders;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::PreparePlayerL
-// Performs PreparePlayerL for every player builder in the array.
-// -----------------------------------------------------------------------------
-void CAMMSPlayerBuilderGroup::PreparePlayerL(CMMAPlayer* aPlayer)
-{
-    TInt builderCount = iPlayerBuilders->Count();
-    for (TInt i = 0; i < builderCount; i++)
-    {
-        iPlayerBuilders->At(i)->PreparePlayerL(aPlayer);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::AddBuilderAndPopL
-// Adds a player builder to the array.
-// -----------------------------------------------------------------------------
-//
-void CAMMSPlayerBuilderGroup::AddBuilderAndPopL(
-    CAMMSPlayerBuilder* aPlayerBuilder)
-{
-    iPlayerBuilders->AppendL(aPlayerBuilder);
-    CleanupStack::Pop(aPlayerBuilder);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSPlayerBuilderGroup::ConstructL()
-{
-    iPlayerBuilders = new(ELeave) CArrayPtrSeg< CAMMSPlayerBuilder >
-    (KDefaultGranularity);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerBuilderGroup::CAMMSPlayerBuilderGroup
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSPlayerBuilderGroup::CAMMSPlayerBuilderGroup()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsreverbcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect called reverb.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsreverbcontrol.h"
-#include <RoomLevelBase.h>
-#include <logger.h>
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxReverbLevel = 0;
-const TInt KAMMSMinReverbTime = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSReverbControl* CAMMSReverbControl::NewLC(CMMAPlayer* aPlayer)
-{
-    CAMMSReverbControl* self = new(ELeave) CAMMSReverbControl(aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSReverbControl::~CAMMSReverbControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::~CAMMSReverbControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete iReverbUtility;
-    delete iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::SetReverbLevelL
-// Sets the gain level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::SetReverbLevelL(TInt aLevel)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbLevelL: %d", aLevel);
-
-    // Check in debug build that aLevel is within valid range.
-    __ASSERT_DEBUG(aLevel <= KAMMSMaxReverbLevel, User::Invariant());
-
-    CEnvironmentalReverb* reverbEffect = (CEnvironmentalReverb*)iAudioEffect;
-
-    TInt roomLevel = reverbEffect->RoomLevel();
-    TInt tempChange = aLevel - reverbEffect->ReflectionsLevel() - roomLevel;
-
-    // Sets the reverb reflections level in mB
-    reverbEffect->SetReflectionsLevelL(aLevel - roomLevel);
-
-
-    // Calculate native reverb level.
-    TInt reverbLevel = reverbEffect->ReverbLevel() + tempChange;
-
-    // Ensure that the level is within the limits.
-
-    TInt32 minLevel = 0;
-    TInt32 maxLevel = 0;
-    reverbEffect->ReverbLevelRange(minLevel, maxLevel);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbLevelL: orig %d",
-              reverbLevel);
-
-    reverbLevel = Min(reverbLevel, maxLevel);
-    reverbLevel = Max(reverbLevel, minLevel);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbLevelL: set %d",
-              reverbLevel);
-
-    // Sets the reverb level in mB
-    reverbEffect->SetReverbLevelL(reverbLevel);
-
-    // Apply can be called for Reverb, as it does not internally include EnableL
-    // unlike in case of Equalizer or StereoWidening
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbLevelL calling ApplyL");
-    reverbEffect->ApplyL();
-
-    // Return the value that was used in setting the reverb
-    return aLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::SetReverbTimeL
-// Sets the reverberation time of the reverb.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbControl::SetReverbTimeL(TInt aTime)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbTimeL: %d", aTime);
-
-    // Check in debug build that aTime is within valid range.
-    __ASSERT_DEBUG(aTime >= KAMMSMinReverbTime, User::Invariant());
-
-    // Sets the decay time in milliseconds
-    ((CEnvironmentalReverb*)iAudioEffect)->SetDecayTimeL(aTime);
-
-    // Apply can be called for Reverb, as it does not internally include EnableL
-    // unlike in case of Equalizer or StereoWidening
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetReverbTimeL calling ApplyL");
-    iAudioEffect->ApplyL();
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::ReverbLevel
-// Gets the gain level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::ReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::ReverbLevel called");
-    // Return here (reflections level + room level)
-    return (((CEnvironmentalReverb*)iAudioEffect)->ReflectionsLevel() +
-            ((CEnvironmentalReverb*)iAudioEffect)->RoomLevel());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::ReverbTime
-// Gets the reverberation time.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::ReverbTime()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::ReverbTime called");
-
-    return (((CEnvironmentalReverb*)iAudioEffect)->DecayTime());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::MinReverbLevel
-// Gets the minimum level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::MinReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::MinReverbLevel called");
-
-    TInt32 minLevel;
-    TInt32 maxLevel;
-    ((CEnvironmentalReverb*)iAudioEffect)->ReverbLevelRange(
-        minLevel, maxLevel);
-
-    return minLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::MaxReverbLevel
-// Gets the maximum level of the reverberation.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::MaxReverbLevel()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::MaxReverbLevel called");
-
-    TInt32 minLevel;
-    TInt32 maxLevel;
-    ((CEnvironmentalReverb*)iAudioEffect)->ReverbLevelRange(
-        minLevel, maxLevel);
-
-    return maxLevel;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::CurrentPresetIndex
-// Gets current preset index.
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSReverbControl::CurrentPresetIndex()
-{
-    return iCurrentPreset;
-}
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::SetPresetL
-// Sets the effect according to the given preset.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbControl::SetPresetL(const TDesC& aPreset)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetPresetL \"%S\"", aPreset.Ptr());
-
-    const CDesCArray& presetNames = PresetNamesL();
-
-    TInt presetPosition = 0;
-    TInt findPreset = presetNames.Find(aPreset, presetPosition);
-    if (findPreset == 0)  // Find returns zero, if a matching element is found.
-    {
-        // This supposes that the indexing of the presets starts at zero.
-        iReverbUtility->GetPresetL(presetPosition);
-
-        // Set the base class audio effect as the new CEnvironmentalReverb
-        // that is set with the previous GetPresetL method.
-        iAudioEffect = &(iReverbUtility->EnvironmentalReverb());
-        iCurrentPreset = presetPosition;
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetPresetL \"%S\" GetPresetL OK",
-                  aPreset.Ptr());
-    }
-    else
-    {
-        User::Leave(KErrArgument);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::PresetNamesL
-// Gets the available preset names.
-// -----------------------------------------------------------------------------
-//
-const CDesCArray& CAMMSReverbControl::PresetNamesL()
-{
-    // Returns an array of all preset names (pre-defined and user-defined).
-    // The pre-defined presets are in the beginning of the list.
-    TArray< TEfEnvironmentalReverbUtilityPreset > presetNames =
-        iReverbUtility->Presets();
-
-    // Before appending the preset names, reset the member array
-    iPresetNames->Reset();
-    for (TInt i = 0; i < presetNames.Count(); i++)
-    {
-        iPresetNames->AppendL(presetNames[ i ].iPresetName);
-    }
-
-    return *iPresetNames;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::PresetL
-// Gets the current preset.
-// -----------------------------------------------------------------------------
-//
-const TDesC& CAMMSReverbControl::PresetL()
-{
-    //if no preset is set, return null
-    if (iCurrentPreset < 0)
-    {
-        return KNullDesC;
-    }
-    else
-    {
-        // Retrieves a Preset with the given index from the Central Repository
-        return iReverbUtility->GetPresetL(iCurrentPreset);
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::SetEnabledL
-// Enables/disables the effect.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbControl::SetEnabledL(TBool aEnable)
-{
-    if (aEnable)
-    {
-        // Enable the effect
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetEnabledL(true), calling EnableL");
-        iAudioEffect->EnableL();
-    }
-    else
-    {
-        // Disable the effect
-        // Instead of using CAudioEffectBase: virtual void DisableL(),
-        // use the utility class DisableEnvironmentalReverbL,
-        // which calls DisableL for the correct preset
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::SetEnabledL(false), calling DisableEnvironmentalReverbL");
-        iReverbUtility->DisableEnvironmentalReverbL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iReverbUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Effect API takes the ownership of customCommandUtility.
-        iReverbUtility = CEnvironmentalReverbUtility::NewL(
-                             customCommandUtility);
-
-        SetPresetL(KAMMSDefaultReverbPreset);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbControl::DeallocateControl()
-{
-    if (iReverbUtility)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::DeallocateControlL");
-
-        // Delete the Effect API class.
-        TRAPD(err, iReverbUtility->DisableEnvironmentalReverbL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Utility
-            // class is already created, that situation can be discarded here.
-        }
-
-        delete iReverbUtility;
-        iReverbUtility = NULL;
-
-        // Set current preset to a negative value to state it has not been set
-        iCurrentPreset = -1;
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::GetEnvironmentalReverbUtilityL
-// Returns the environmental reverb utility.
-// -----------------------------------------------------------------------------
-void CAMMSReverbControl::GetEnvironmentalReverbUtilityL(
-    CEnvironmentalReverbUtility** aEnvironmentalReverbUtility)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::GetEnvironmentalReverbUtilityL");
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbControl::GetEnvironmentalReverbUtilityL CurrentPreset = %d",CurrentPresetIndex());
-    *aEnvironmentalReverbUtility = iReverbUtility;
-}
-
-const TDesC& CAMMSReverbControl::ClassName() const
-{
-    return KAMMSReverbControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSReverbControl::ConstructL()
-{
-    // Create array for preset names
-    iPresetNames = new(ELeave) CDesCArrayFlat(1);
-
-    // Set current preset to a negative value as it is not set yet
-    iCurrentPreset = -1;
-
-    CAMMSEffectControl::ConstructL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbControl::CAMMSReverbControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSReverbControl::CAMMSReverbControl(CMMAPlayer* aPlayer)
-        : CAMMSBaseReverbControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsreverbsourcecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the settings of an audio effect reverb source.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsreverbsourcecontrol.h"
-#include "cammsbasereverbcontrol.h"
-
-// CONSTANTS
-const TInt KAMMSDisconnectReverbSource = 2147483647; // From JSR-234
-
-
-#ifdef _DEBUG
-const TInt KAMMSMaxRoomLevel = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSReverbSourceControl* CAMMSReverbSourceControl::NewLC(
-    CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aReverbControl)
-{
-    CAMMSReverbSourceControl* self =
-        new(ELeave)CAMMSReverbSourceControl(aPlayer, aReverbControl);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSReverbSourceControl::~CAMMSReverbSourceControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::~CAMMSReverbSourceControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete iReverbSource;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControl::SetRoomLevelL
-// Sets the object specific level for the reverberant sound.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbSourceControl::SetRoomLevelL(TInt aLevel)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL +: %d", aLevel);
-
-    // Check in debug build that aLevel is within valid range.
-    __ASSERT_DEBUG(
-        (aLevel <= KAMMSMaxRoomLevel) ||
-        (aLevel == KAMMSDisconnectReverbSource),
-        User::Invariant());
-
-    // With the JSR-234 value Integer.MIN_VALUE, the reflected sound for the
-    // given object can be disabled.
-    if (aLevel == KMinTInt)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL(Integer.MIN_VALUE)");
-        aLevel = 0;
-    }
-
-    // Check the allowed boundaries for room level.
-    TInt32 minLevel = 0;
-    TInt32 maxLevel = 0;
-    iReverbSource->LevelRange(minLevel, maxLevel);
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL boundaries %d, %d",
-               minLevel, maxLevel);
-
-    // Check the state of the effect. If it is in disabled state, enable it.
-    if (!iReverbSource->IsEnabled())
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL calling EnableL");
-        iReverbSource->EnableL();
-    }
-
-    // With the JSR-234 value DISCONNECT, the object can be disconnected
-    // from the reverb.
-    if (aLevel == KAMMSDisconnectReverbSource)
-    {
-        // Do not call iReverbSource->DisableL(), instead set the room level to
-        // _minimum_ value (= smallest negative gain -> maximum attenuation).
-        // The CRoomLevel must also be kept enabled.
-        aLevel = minLevel;
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL(DISCONNECT) %d",
-                  minLevel);
-    }
-    else
-    {
-        // Set the room level within allowed boundaries from Effect API
-        aLevel = Min(aLevel, maxLevel);
-        aLevel = Max(aLevel, minLevel);
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL setting value: %d", aLevel);
-    }
-
-    // Sets the RoomLevel level, it will leave if aRoomLevel is not within range
-    // of Min and Max
-    iReverbSource->SetRoomLevelL((TInt32)aLevel);
-
-    // Apply updated settings to Effect API.
-    iReverbSource->ApplyL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::SetRoomLevelL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbSourceControl::PrepareControlL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::PrepareControlL");
-
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iReverbSource)
-    {
-        CEnvironmentalReverbUtility* reverbUtility = NULL;
-        iReverbControl->GetEnvironmentalReverbUtilityL(&reverbUtility);
-        // Reverb utility must exist, otherwise room level creation will fail.
-        __ASSERT_DEBUG(reverbUtility, User::Invariant());
-
-        CEnvironmentalReverb* reverb =
-            &(reverbUtility->EnvironmentalReverb());
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Effect API takes the ownership of customCommandUtility.
-        iReverbSource = CRoomLevel::NewL(customCommandUtility, *reverb);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSReverbSourceControl::DeallocateControl()
-{
-    if (iReverbSource)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSReverbSourceControl::DeallocateControl");
-
-        // Disable the Effect API Control
-        TRAPD(err, iReverbSource->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class (it deletes CustomCommandUtility)
-        delete iReverbSource;
-        iReverbSource = NULL;
-    }
-}
-
-const TDesC& CAMMSReverbSourceControl::ClassName() const
-{
-    return KAMMSReverbSourceControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSReverbSourceControl::CAMMSReverbSourceControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSReverbSourceControl::CAMMSReverbSourceControl(
-    CMMAPlayer* aPlayer,
-    CAMMSBaseReverbControl* aReverbControl)
-        : CAMMSBaseReverbSourceControl(aPlayer), iReverbControl(aReverbControl)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsspectatordopplercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the doppler effect of the spectator.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsspectatordopplercontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorDopplerControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorDopplerControl* CAMMSSpectatorDopplerControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSSpectatorDopplerControl* self =
-        new(ELeave)CAMMSSpectatorDopplerControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSSpectatorDopplerControl::~CAMMSSpectatorDopplerControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorDopplerControl::~CAMMSSpectatorDopplerControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iDopplerEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorDopplerControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorDopplerControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorDopplerControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class doppler effect as CListenerDoppler
-        // Effect API takes the ownership of customCommandUtility.
-        iDopplerEffect = CListenerDoppler::NewL(customCommandUtility);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorDopplerControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorDopplerControl::DeallocateControl()
-{
-    if (iDopplerEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorDopplerControl::DeallocateControl");
-
-        // Doppler for Spectator is always enabled (JSR-234 mandates it)
-        // so the disabling is needed here
-        TRAPD(err, iDopplerEffect->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class (it deletes CustomCommandUtility)
-        // The class that is derived from CDoppler is casted here to the
-        // base class CAudioEffect, since CDoppler has the destructor
-        // defined as protected, but the derived class and the base class
-        // have it defined as public.
-        delete(CAudioEffect*)iDopplerEffect;
-        iDopplerEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSSpectatorDopplerControl::ClassName() const
-{
-    return KAMMSSpectatorDopplerControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorDopplerControl::CAMMSSpectatorDopplerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorDopplerControl::CAMMSSpectatorDopplerControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSDopplerControl(aPlayer)
-{
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsspectatorlocationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual location of the spectator.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsspectatorlocationcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorLocationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorLocationControl* CAMMSSpectatorLocationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSSpectatorLocationControl* self = new(ELeave)
-    CAMMSSpectatorLocationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSSpectatorLocationControl::~CAMMSSpectatorLocationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorLocationControl::~CAMMSSpectatorLocationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iLocationEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorLocationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorLocationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iLocationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorLocationControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class location effect as CListenerLocation
-        // Effect API takes the ownership of customCommandUtility.
-        iLocationEffect = CListenerLocation::NewL(customCommandUtility);
-
-        // Enable the Effect API Control
-        iLocationEffect->EnableL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorLocationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorLocationControl::DeallocateControl()
-{
-    if (iLocationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorLocationControl::DeallocateControl");
-
-        // Disable the Effect API Control
-        TRAPD(err, iLocationEffect->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class.
-        // The class that is derived from CLocation is casted here to the
-        // base class CAudioEffect, since CLocation has the destructor
-        // defined as protected, but the derived class and the base class
-        // have it defined as public.
-        delete(CAudioEffect*)iLocationEffect;
-        iLocationEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSSpectatorLocationControl::ClassName() const
-{
-    return KAMMSSpectatorLocationControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorLocationControl::CAMMSSpectatorLocationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorLocationControl::CAMMSSpectatorLocationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSLocationControl(aPlayer)
-{
-}
-
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsspectatororientationcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manipulates the virtual orientation of the spectator.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammsspectatororientationcontrol.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorOrientationControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorOrientationControl* CAMMSSpectatorOrientationControl::NewLC(
-    CMMAPlayer* aPlayer)
-{
-    CAMMSSpectatorOrientationControl* self =
-        new(ELeave)CAMMSSpectatorOrientationControl(aPlayer);
-
-    CleanupStack::PushL(self);
-
-    return self;
-}
-
-// Destructor
-CAMMSSpectatorOrientationControl::~CAMMSSpectatorOrientationControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorOrientationControl::~CAMMSSpectatorOrientationControl");
-
-    // Perform DeallocateControl, if the state change has not yet performed it.
-    DeallocateControl();
-    delete(CAudioEffect*)iOrientationEffect;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorOrientationControl::PrepareControlL
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorOrientationControl::PrepareControlL()
-{
-    // Perform the action only for the first time, skip if called afterwards
-    if (!iOrientationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorOrientationControl::PrepareControlL");
-
-        CCustomCommandUtility* customCommandUtility =
-            CreateCustomCommandUtilityL();
-
-        // Set the base class orientation effect as CListenerOrientation
-        // Effect API takes the ownership of customCommandUtility.
-        iOrientationEffect = CListenerOrientation::NewL(
-                                 customCommandUtility);
-
-        // Enable the Effect API Control
-        iOrientationEffect->EnableL();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorOrientationControl::DeallocateControl
-// Function which is called after the correct state is set in Player.
-// -----------------------------------------------------------------------------
-//
-void CAMMSSpectatorOrientationControl::DeallocateControl()
-{
-    if (iOrientationEffect)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSSpectatorOrientationControl::DeallocateControl");
-
-        // Disable the Effect API Control
-        TRAPD(err, iOrientationEffect->DisableL());
-        if (err != KErrNone)
-        {
-            // The only even theoritically possible error code here would be
-            // KErrAccessDenied which is a result from Effect API calling ApplyL
-            // method without having update rights, but since the Effect
-            // is already created, that situation can be discarded here.
-        }
-
-        // Delete the Effect API class.
-        // The class that is derived from COrientation is casted here to the
-        // base class CAudioEffect, since COrientation has the destructor
-        // defined as protected, but the derived class and the base class
-        // have it defined as public.
-        delete(CAudioEffect*)iOrientationEffect;
-        iOrientationEffect = NULL;
-    }
-}
-
-const TDesC& CAMMSSpectatorOrientationControl::ClassName() const
-{
-    return KAMMSSpectatorOrientationControl;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSpectatorOrientationControl::CAMMSSpectatorOrientationControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSSpectatorOrientationControl::CAMMSSpectatorOrientationControl(
-    CMMAPlayer* aPlayer)
-        : CAMMSOrientationControl(aPlayer)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/mmacontrol/src/cammsvolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Controls the volume of a CMMAVolumeControl.
-*
-*/
-
-
-// INCLUDE FILES
-#include <cmmavolumecontrol.h>
-#include <logger.h>
-
-#include "cammsvolumecontrol.h"
-
-#ifdef _DEBUG
-// CONSTANTS
-const TInt KAMMSMaxVolume = 100;
-const TInt KAMMSMinVolume = 0;
-#endif // _DEBUG
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControl::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControl* CAMMSVolumeControl::NewLC(const TDesC& aControlName,
-        CMMAVolumeControl* aVolumeControl, CMMAPlayer* aPlayer)
-{
-    CAMMSVolumeControl* self = new(ELeave) CAMMSVolumeControl(
-        aControlName, aVolumeControl, aPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-// Destructor
-CAMMSVolumeControl::~CAMMSVolumeControl()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSVolumeControl::~CAMMSVolumeControl");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControl::SetVolumeL
-// Sets the volume level.
-// -----------------------------------------------------------------------------
-//
-void CAMMSVolumeControl::SetVolumeL(TInt aVolume)
-{
-    // Check in debug build that aVolume is within valid range.
-    __ASSERT_DEBUG(
-        (aVolume <= KAMMSMaxVolume) &&
-        (aVolume >= KAMMSMinVolume),
-        User::Invariant());
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSVolumeControl::SetVolumeL: Volume = %d", aVolume);
-    iVolumeControl->SetVolumeLevelL(iControlLevelIndex, aVolume);
-}
-
-const TDesC& CAMMSVolumeControl::ClassName() const
-{
-    return iClassName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSVolumeControl::ConstructL()
-{
-    iControlLevelIndex = iVolumeControl->AddLevelL();
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSVolumeControl::ConstructL level index = %d",
-              iControlLevelIndex);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControl::CAMMSVolumeControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControl::CAMMSVolumeControl(
-    const TDesC& aControlName,
-    CMMAVolumeControl* aVolumeControl,
-    CMMAPlayer* aPlayer) :
-        CAMMSControl(aPlayer),
-        iClassName(aControlName)
-{
-    iVolumeControl = aVolumeControl;
-}
-
-//  End of File
-
--- a/javauis/amms_qt/mmacontrol/src/cammsvolumecontrolbuilder.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  AMMS player builder for adding AMMS audio player controls.
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <cmmavolumecontrol.h>
-#include <cmmaaudioplayer.h>
-#include <logger.h>
-
-#include "cammsvolumecontrolbuilder.h"
-#include "cammsvolumecontrol.h"
-#include "ammsconstants.h"
-#include "ammsutil.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlBuilder::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControlBuilder* CAMMSVolumeControlBuilder::NewLC()
-{
-    CAMMSVolumeControlBuilder* self = new(ELeave) CAMMSVolumeControlBuilder();
-    CleanupStack::PushL(self);
-    return self;
-}
-
-
-// Destructor
-CAMMSVolumeControlBuilder::~CAMMSVolumeControlBuilder()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlBuilder::PreparePlayerL
-// -----------------------------------------------------------------------------
-//
-void CAMMSVolumeControlBuilder::PreparePlayerL(CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSVolumeControlBuilder::PreparePlayerL type %S",
-              aPlayer->Type().Ptr());
-
-    CMMAControl* control = AMMSUtil::FindControl(aPlayer,
-                           KMMAVolumeControlName);
-    if (control)
-    {
-        CMMAVolumeControl* mmaControl =
-            reinterpret_cast< CMMAVolumeControl* >(control);
-
-        CAMMSVolumeControl* ammsControl = CAMMSVolumeControl::NewLC(
-                                              KAMMSGlobalVolume,
-                                              mmaControl,
-                                              aPlayer);
-        aPlayer->AddControlL(ammsControl);
-        CleanupStack::Pop(ammsControl);
-
-        LOG( EJavaAMMS, EInfo, "AMMS::CAMMSVolumeControlBuilder::PreparePlayerL add OK");
-    }
-    // else volume control need not to be added, for example camera player.
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSVolumeControlBuilder::CAMMSVolumeControlBuilder
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSVolumeControlBuilder::CAMMSVolumeControlBuilder()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/module/inc/ammsconstants.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file defines global constants.
-*
-*/
-
-
-#ifndef AMMSCONSTANTS_H
-#define AMMSCONSTANTS_H
-
-/**
-*
-*  This file defines global constants.
-*
-*
-*  @since 3.0
-*/
-
-const TInt KAMMSVectorComponents = 3;    // Components in a vector
-const TInt KAMMSTwoVectorComponents = 6; // Components in two vectors
-
-// Component indexes in vectors
-enum TVectorIndex
-{
-    EComponentX = 0,
-    EComponentY = 1,
-    EComponentZ = 2,
-    EAzimuth = 0,
-    EElevation = 1,
-    ERadius = 2
-};
-
-enum TAMMSControlTypes
-{
-    EAMMSBaseControl = 0,
-    EAMMSSpectatorControl,
-    EAMMSSoundSource3DControl
-};
-
-_LIT(KAMMSGlobalVolume, "VolumeGlobal");
-
-#endif // AMMSCONSTANTS_H
-
-
--- a/javauis/amms_qt/module/inc/ammsutil.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Static general reusable methods.
-*
-*/
-
-
-#ifndef AMMSUTIL_H
-#define AMMSUTIL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "ammsconstants.h"
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-class CMMAControl;
-
-// CLASS DECLARATION
-
-/**
-*  Static general reusable methods.
-*
-*  This class contains only static method which can be used in many classes.
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(AMMSUtil)
-{
-public: // New functions
-    /**
-     * Finds the control of a corresponding type that
-     * belongs to the player given as a parameter
-     *
-     * @param aPlayer The Player where to find the Control
-     * @param aControlName Name of the control to look for
-     * @param aControlType Special AMMS type of the Control
-     * @return Control of type aControlName or NULL if not found
-     */
-    static CMMAControl* FindControl(
-        CMMAPlayer* aPlayer,
-        const TDesC& aControlName,
-        TAMMSControlTypes aControlType = EAMMSBaseControl);
-
-    /**
-      * Converts vector from spherical to cartesian.
-      *
-      * @param aSphericalVector Spherical vector to be converted
-      * @param aCartesianVector Result cartesian vector
-      */
-    static void FromSphericalToCartesianL(
-        TInt aSphericalVector[ KAMMSVectorComponents ],
-        TInt aCartesianVector[ KAMMSVectorComponents ]);
-
-    /*
-     * Rotates a vector round the given axis. The starting point of each
-     * vectors is in the origo, and thus, only coordinates of the ending
-     * point should be given.
-     *
-     * @param aVector X, Y, and Z value of a vector to be rotated
-     * @param aAxisVector X, Y, and Z value of an axis vector
-     * @param aAngle Rotation angle in degrees
-     * @param aRotatedVector X, Y, and Z value of the rotated vector
-     */
-    static void RotateVectorL(TReal aVector[ KAMMSVectorComponents ],
-                              TReal aAxisVector[ KAMMSVectorComponents ],
-                              TInt aAngle,
-                              TReal aRotatedVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Rounds each component in the given vector.
-     *
-     * @param aVector A vector to be rounded
-     * @param aRoundedVector Rounded vector
-     */
-    static void RoundVectorL(TReal aVector[ KAMMSVectorComponents ],
-                             TInt aRoundedVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Multiplies the given vector by the given scalar value.
-     *
-     * @param aVector A vector to be rounded
-     * @param aMultiplier A multiplier
-     */
-    static void MultiplyVector(TReal aVector[ KAMMSVectorComponents ],
-                               TReal aMultiplier);
-
-    /**
-     * Calculates vector cross product.
-     * @param aA A vector having KAMMSVectorComponents elements
-     * @param aB A vector having KAMMSVectorComponents elements
-     * @param aResultVector Result of the cross product
-     */
-    static void CrossProduct(TReal aA[ KAMMSVectorComponents ],
-                             TReal aB[ KAMMSVectorComponents ],
-                             TReal aResultVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Calculates the length of the given vector.
-     *
-     * @param aVector A vector whose length is calculated
-     */
-    static TReal VectorLengthL(TReal aVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Converts the given vector to the unit vector. The original vector
-     * is replaced by the result vector.
-     *
-     * @param aVector A vector that is converted to the unit vector and is
-     * replaced by the result vector
-     */
-    static void ConvertToUnitVectorL(TReal aVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Checks whether two given vectors are similar according to the given
-     * maximum error percentage. The function compares each component in
-     * aA to the corresponding component in aB.
-     *
-     * @param aA A vector
-     * @param aB A vector
-     * @param aMaxComponentErrorPercentage Maximum error percentage between
-     * a component in aA and the corresponding component in aB
-     * @return ETrue if difference between each component pair is lower
-     * than the given error, else ETrue is returned
-     */
-    static TBool AreVectorsSimilar(TReal aA[ KAMMSVectorComponents ],
-                                   TInt aB[ KAMMSVectorComponents ],
-                                   TInt aMaxComponentErrorPercentage);
-
-    /**
-     * Returns the maximum component value in the given vector.
-     *
-     * @param aVector A vector
-     * @return Maximum component value in aVector
-     */
-    static TReal MaxVectorComponent(TReal aVector[ KAMMSVectorComponents ]);
-
-    /**
-     * Returns the minimum component value in the given vector.
-     *
-     * @param aVector A vector
-     * @return Minimum component value in aVector
-     */
-    static TReal MinVectorComponent(TReal aVector[ KAMMSVectorComponents ]);
-
-private:
-    /**
-    * C++ default constructor. Private to not allow construction.
-    */
-    AMMSUtil();
-};
-
-#endif // AMMSUTIL_H
-
-
--- a/javauis/amms_qt/module/inc/cammscontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for control groups
-*
-*/
-
-
-#ifndef CAMMSCONTROLGROUP_H
-#define CAMMSCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "mammscontrolgroup.h"
-#include "ammsconstants.h"
-
-// FORWARD DECLARATIONS
-class MAMMSControllable;
-class CMMAControl;
-class CMMAPlayer;
-class CAMMSPlayerStateListener;
-
-// CLASS DECLARATION
-/**
- *  Base class for control groups
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSControlGroup): public CBase, public MAMMSControlGroup
-{
-public:  // Constructors and destructor
-
-    /**
-     * Destructor.
-     */
-    virtual ~CAMMSControlGroup();
-
-public:  // New functions
-
-    /**
-     * This function is called when state of a player has changed.
-     *
-     * @param aPlayer Player whose state has changed.
-     * @param aNewState State that the player has now.
-     */
-    void PlayerStateChangedL(CMMAPlayer* aPlayer,
-                             TInt aNewState);
-
-protected:  // New functions
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-
-    /**
-     * Returns the total count of controls in this group.
-     *
-     * @return Count of the controls.
-     */
-    TInt ControlCount() const;
-
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex    Control index.
-     *
-     * @return the control at given index
-     */
-    CMMAControl* Control(TInt aIndex) const;
-
-    /**
-     * Called by PlayerAddedL when new player is added
-     *
-     * @param aPlayer   The player being added
-     * @param aControl  The player's control relevant to this group
-     */
-    virtual void NotifyPlayerAddedL(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-    /**
-     * Called by PlayerRemoved when new player is removed
-     *
-     * @param aPlayer   The player being removed
-     * @param aControl  The player's control relevant to this group
-     */
-    virtual void NotifyPlayerRemoved(CMMAPlayer* aPlayer, CMMAControl* aControl);
-
-public:  // From MAMMSControlGroup
-
-    /**
-     * Called by the owning module when a player is added
-     *
-     * @param aPlayer   The player being added
-     */
-    void PlayerAddedL(CMMAPlayer *aPlayer);
-
-    /**
-     * Called by the owning module when a player is removed
-     *
-     * @param aPlayer   The player being removed
-     */
-    void PlayerRemoved(CMMAPlayer *aPlayer);
-
-protected:
-    /**
-     * C++ default constructor.
-     *
-     * @param aName The name of the corresponding amms control
-     *        (doesn't take a copy!)
-     * @param aControlType Special AMMS type of the Control
-     */
-    CAMMSControlGroup(
-        const TDesC& aName,
-        TAMMSControlTypes aControlType = EAMMSBaseControl);
-
-protected:    // Data
-
-    // Listeners for player state changes, owned.
-    CArrayPtrSeg< CAMMSPlayerStateListener >* iPlayerStateListeners;
-
-    // Grouped controls, not owned
-    RArray< CMMAControl* > iControls;
-
-    // The name of contained controls, not owned
-    const TDesC& iName;
-
-    // The type of the actual Control
-    TAMMSControlTypes iControlType;
-
-    // Controllable object. Not owned. (Global manager)
-    MAMMSControllable* iAMMSControllable;
-
-};
-
-#endif // CAMMSCONTROLGROUP_H
-
-
--- a/javauis/amms_qt/module/inc/cammseffectmodule.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Module for holding control groups belonging to EffectModule.
-*
-*/
-
-
-#ifndef CAMMSEFFECTMODULE_H
-#define CAMMSEFFECTMODULE_H
-
-//  INCLUDES
-#include "cammsmodule.h"
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-class CAMMSGlobalManager;
-
-
-// CLASS DECLARATION
-
-/**
-*  Module for holding control groups belonging to EffectModule.
-*
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSEffectModule): public CAMMSModule
-{
-public:
-    /**
-    * Two-phased constructor.
-    *
-    * @param aGlobalManager Global manager.
-    */
-    static CAMMSEffectModule* NewLC(CAMMSGlobalManager* aGlobalManager);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSEffectModule();
-
-public: // From CAMMSModule
-
-    void AddPlayerNoStateCheckL(CMMAPlayer* aPlayer);
-
-protected:
-    /**
-    * C++ default constructor.
-    *
-    * @param aGlobalManager Global manager.
-    */
-    CAMMSEffectModule(CAMMSGlobalManager* aGlobalManager);
-
-    void ConstructL();
-
-private: // Data
-
-    CAMMSGlobalManager* iGlobalManager;  // Not owned.
-};
-
-#endif // CAMMSEFFECTMODULE_H
-
-
--- a/javauis/amms_qt/module/inc/cammsglobalmanager.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class provides GlobalManager functionality.
-*
-*/
-
-
-#ifndef CAMMSGLOBALMANAGER_H
-#define CAMMSGLOBALMANAGER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <badesca.h>
-#include <mmmaplayerinstanceobserver.h>
-
-#include "cammsmodule.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CAMMSModuleContainer;
-class CAMMSPlayerBuilderGroup;
-
-// CLASS DECLARATION
-
-/**
-*
-*  This class provides GlobalManager functionality.
-*  The GlobalManager handles the creation of EffectModules, SoundSource3Ds
-*  and MediaProcessors. Furthermore, a Spectator can be get from the
-*  GlobalManager. GlobalManager extends the CAMMSModule and contains global
-*  controls.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSGlobalManager): public CAMMSModule, public MMMAPlayerInstanceObserver
-{
-public:
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSGlobalManager* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSGlobalManager();
-
-public: // From MMMAPlayerInstanceObserver
-    /**
-    * MMA will call this method when new player is created.
-    * @since 3.0
-    * @param aPlayer Player to add.
-    */
-    void AddPlayerNotifyL(CMMAPlayer* aPlayer);
-
-    /**
-    * MMA will call this method when player does not exist anymore.
-    * @since 3.0
-    * @param aPlayer Player to remove.
-    */
-    void RemovePlayerNotify(CMMAPlayer* aPlayer);
-
-public: // New functions
-    /**
-    * Initializes GlobalManager. This method is called when Java
-    * GlobalManager is accessed for the first time.
-    * This method creates mma controls to the added players and creates
-    * global controls. After this method is called amms controls are added
-    * to players immediately.
-    * @param aPlayers Players created with mma api.
-    * @since 3.0
-    */
-    void InitL(RPointerArray< CMMAPlayer >& aPlayers);
-
-    /**
-    * Creates a new sound source 3D module.
-    * Module will be owned by global manager.
-    * @since 3.0
-    * @return New sound source 3D module.
-    */
-    CAMMSModule* CreateSoundSource3DL();
-
-    /**
-    * Creates a new effect module.
-    * Module will be owned by global manager.
-    * @since 3.0
-    * @return New effect module.
-    */
-    CAMMSModule* CreateEffectModuleL();
-
-    /**
-    * Returns the spectator.
-    * @since 3.0
-    * @return Spectator.
-    */
-    CAMMSModule* Spectator();
-
-    /**
-    * Disposes module.
-    * @param aModule Module to dispose.
-    */
-    void DisposeModule(CAMMSModule* aModule);
-
-    /**
-     * Checks whether the given player can be added to a module (EffectModule
-     * or SoundSource3D).
-     * @param aPlayer Player to be checked.
-     * @return KErrNone if the player can be added or some error
-     * code if the adding is not allowed.
-     */
-    TInt PlayerAddingAllowed(CMMAPlayer* aPlayer);
-
-private:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSGlobalManager();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private:  // New functions
-
-    /**
-     * Checks whether the given player can be added to a module
-     * according to the given module (is there any player in
-     * the module that can prevent player adding to any module).
-     * @param aPlayer Player to be checked.
-     * @param aModule Module to be checked.
-     * @return KErrNone if the player can be added or some error
-     * code if the adding is not allowed.
-     */
-    TInt PlayerAddingAllowed(CMMAPlayer* aPlayer, CAMMSModule* aModule);
-
-
-private:    // Data
-    // Owned spectator
-    CAMMSModule* iSpectator;
-
-    // Owned effect modules
-    CAMMSModuleContainer* iEffectModules;
-
-    // Owned sound source 3Ds
-    CAMMSModuleContainer* iSoundSource3Ds;
-
-    // Owned player builder
-    CAMMSPlayerBuilderGroup* iPlayerBuilder;
-};
-
-#endif // CAMMSGLOBALMANAGER_H
-
-
--- a/javauis/amms_qt/module/inc/cammsmodule.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a container for MAMMSControlGroup objects.
-*
-*/
-
-
-#ifndef CAMMSMODULE_H
-#define CAMMSMODULE_H
-
-//  INCLUDES
-#include <e32base.h>
-
-#include <cmmaplayer.h>
-
-#include "mammscontrollable.h"
-
-// CONSTANTS
-const TInt KAMMSPlayerAlreadyInModuleError = -123;
-
-#ifdef __WINS__
-const TInt KAMMSMixingNotSupported = -1234;
-#endif  // __WINS__
-
-
-// FORWARD DECLARATIONS
-class CAMMSControlGroup;
-
-// CLASS DECLARATION
-
-/**
-*
-*  This class is a container for MAMMSControlGroup objects.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSModule): public CBase, public MAMMSControllable
-{
-public:
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSModule* NewL();
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSModule* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSModule();
-
-public: // New functions
-    /**
-    * Adds new control group to module. Ownership is transferred to
-    * the module and aGroup is removed from the cleanupstack
-    * if this method does not leave.
-    * @since 3.0
-    * @param aGroup New control group. Must be the previous item in the
-    * cleanupstack.
-    */
-    void AddControlGroupAndPopL(CAMMSControlGroup* aGroup);
-
-    /**
-     * Adds new player to this module.
-     * @param aPlayer New player to add
-     */
-    virtual void AddPlayerL(CMMAPlayer* aPlayer);
-
-    /**
-     * Removes player from module.
-     * @param aPlayer player to remove
-     * @return KErrNotFound if player was not in the module.
-     */
-    virtual TInt RemovePlayer(CMMAPlayer* aPlayer);
-
-    /**
-     * Adds new player to this module without checking player states.
-     * @param aPlayer New player to add
-     */
-    virtual void AddPlayerNoStateCheckL(CMMAPlayer* aPlayer);
-
-    /**
-     * Removes player from module without checking player states.
-     * @param aPlayer player to remove
-     * @return KErrNotFound if player was not in the module.
-     */
-    virtual TInt RemovePlayerNoStateCheck(CMMAPlayer* aPlayer);
-
-    /**
-     * Checks whether the given player is in this module.
-     * @param aPlayer Player to be checked.
-     * @return ETrue if the specified player exists in this
-     * module; EFalse otherwise.
-     */
-    TBool HasPlayer(CMMAPlayer* aPlayer);
-
-#ifdef __WINS__
-
-    /**
-     * Returns the count of players whose state is between the given
-     * limits.
-     * @param aMinState Minimum player state to be searched.
-     * @param aMaxState Maximum player state to be searched.
-     * @return The count of players having state between the given
-     * limits.
-     */
-    TInt PlayerCount(TInt aMinState, TInt aMaxState);
-
-#endif  // __WINS__
-
-
-private: // Private new functions
-    /**
-     * Checks that none of the players in this module is not in PREFETCHED
-     * or STARTED state.
-     * @return KErrNotReady if some player is in PREFETCHED or STARTED
-     * state, otherwise KErrNone.
-     */
-    TInt CheckAllPlayersState();
-
-    /**
-     * Checks that player state is not in PREFETCHED or STARTED state.
-     * @param aPlayer player to check
-     * @return KErrNotReady if player is in PREFETCHED or STARTED state,
-     * otherwise KErrNone.
-     */
-    TInt CheckPlayerState(CMMAPlayer* aPlayer);
-
-    /**
-     * Static function to be used with TCleanupItem in
-     * AddPlayerNoStateCheckL method. This method removes last added
-     * player from module and control groups.
-     * @param aModule Module to clean.
-     */
-    static void CleanupAddPlayer(TAny* aModule);
-
-public: // Functions from base classes
-    MAMMSControlGroup* Find(const TDesC& aClassName);
-    MAMMSControlGroup* At(TInt aIndex);
-    TInt Count();
-
-protected:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSModule();
-
-protected:
-    /**
-    * Protected because derived classes must call ConstructL.
-    */
-    void ConstructL();
-
-private: // Data
-    // Owned array containing control groups, which are owned.
-    // Elements are added using AddControlGroupL method and deleted
-    // in the destructor.
-    CArrayPtrSeg< CAMMSControlGroup >* iControlGroups;
-
-    // Array containing players.
-    // Elements are added using AddPlayerL method and removes
-    // with RemovePlayer
-    RPointerArray< CMMAPlayer > iPlayers;
-};
-
-#endif // CAMMSMODULE_H
-
-
--- a/javauis/amms_qt/module/inc/cammsmodulecontainer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for CAMMSModule objects.
-*
-*/
-
-
-#ifndef CAMMSMODULECONTAINER_H
-#define CAMMSMODULECONTAINER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cammsmodule.h"
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-
-// CLASS DECLARATION
-
-/**
-*
-*  This class is a container for CAMMSModule objects. All modules added to
-*  this class with CArrayPtrSeg::AppendL method are owned and deleted in the
-*  destructor.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSModuleContainer): public CArrayPtrSeg< CAMMSModule >
-{
-public:
-    /**
-    * C++ default constructor.
-    */
-    CAMMSModuleContainer();
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSModuleContainer();
-
-public: // New functions
-    /**
-     * Removes player from all modules. Player states are not checked.
-     * @param aPlayer player to remove
-     */
-    void RemovePlayer(CMMAPlayer* aPlayer);
-
-    /**
-     * Removes module from container. The module itself is not deleted
-     * by this method, so it has to be deleted elsewhere.
-     * Method returns silently if module is not found.
-     * @param aModule Module to remove.
-     */
-    void RemoveModule(CAMMSModule* aModule);
-
-};
-
-#endif // CAMMSMODULECONTAINER_H
-
-
--- a/javauis/amms_qt/module/inc/cammsplayerstatelistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for player state listener.
-*
-*/
-
-
-#ifndef CAMMSPLAYERSTATELISTENER_H
-#define CAMMSPLAYERSTATELISTENER_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <mmmaplayerstatelistener.h>
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-class CAMMSControlGroup;
-
-// CLASS DECLARATION
-/**
- *  Implementation for player state listener.
- *
- *  @since 3.0
- */
-NONSHARABLE_CLASS(CAMMSPlayerStateListener)
-        : public CBase,
-        public MMMAPlayerStateListener
-{
-public:  // Constructors and destructor
-
-    /**
-     * Two-phased constructor.
-     *
-     * @param iPlayer Player to be listened by this listener.
-     * @param iControlGroup Control group to be informed when
-     *        player state changes.
-     */
-    static CAMMSPlayerStateListener* NewLC(
-        CMMAPlayer* aPlayer,
-        CAMMSControlGroup* aControlGroup);
-    /**
-     * Destructor.
-     */
-    ~CAMMSPlayerStateListener();
-
-private:  // Constructors and destructor
-
-    /**
-     * 2nd phase constructor.
-     */
-    void ConstructL();
-
-    /**
-     * C++ constructor.
-     * @param iPlayer Player to be listened by this listener.
-     * @param iControlGroup Control group to be informed when
-     *        player state changes.
-     */
-    CAMMSPlayerStateListener(CMMAPlayer* aPlayer,
-                             CAMMSControlGroup* aControlGroup);
-
-
-public:  // New methods
-
-    /**
-     * Returns the player listened by this listener.
-     *
-     * @return Player.
-     */
-    CMMAPlayer* Player();
-
-    /**
-     * Returns the array index of the listener that listens
-     * to the given player.
-     */
-    /*        static TInt FindPlayerInArray(
-              CArrayFix< CAMMSPlayerStateListener >* aArray, CMMAPlayer* aPlayer );
-    */
-
-public:  // From MMMAPlayerStateListener
-
-    void StateChanged(TInt aState);
-
-private:    // Data
-
-    // Player to be listened, not owned.
-    CMMAPlayer* iPlayer;
-
-    // Control group to be informed when player state changes, not owned.
-    CAMMSControlGroup* iControlGroup;
-
-};
-
-#endif // CAMMSPLAYERSTATELISTENER_H
-
-
--- a/javauis/amms_qt/module/inc/cammssoundsource3d.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Module for holding control groups belonging to SoundSource3D.
-*
-*/
-
-
-#ifndef CAMMSSOUNDSOURCE3D_H
-#define CAMMSSOUNDSOURCE3D_H
-
-//  INCLUDES
-#include "cammsmodule.h"
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-class CAMMSGlobalManager;
-
-
-// CLASS DECLARATION
-
-/**
-*  Module for holding control groups belonging to SoundSource3D.
-*
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(CAMMSSoundSource3D): public CAMMSModule
-{
-public:
-    /**
-    * Two-phased constructor.
-    *
-    * @param aSpectator Spectator.
-    * @param aGlobalManager Global manager.
-    */
-    static CAMMSSoundSource3D* NewLC(CAMMSModule* aSpectator,
-    CAMMSGlobalManager* aGlobalManager);
-
-    /**
-    * Destructor.
-    */
-    ~CAMMSSoundSource3D();
-
-public: // New functions
-
-    /**
-     * From CAMMSModule.
-     */
-    void AddPlayerNoStateCheckL(CMMAPlayer* aPlayer);
-
-    /**
-     * From CAMMSModule.
-     */
-    TInt RemovePlayerNoStateCheck(CMMAPlayer* aPlayer);
-
-protected:
-    /**
-    * C++ default constructor.
-    *
-    * @param aSpectator Spectator.
-    * @param aGlobalManager Global manager.
-    */
-    CAMMSSoundSource3D(CAMMSModule* aSpectator,
-                       CAMMSGlobalManager* aGlobalManager);
-
-protected:
-    /**
-    * Protected because derived classes must call ConstructL.
-    */
-    void ConstructL();
-
-private: // Data
-
-    CAMMSModule* iSpectator;  // Not owned.
-    CAMMSGlobalManager* iGlobalManager;  // Not owned.
-};
-
-#endif // CAMMSSOUNDSOURCE3D_H
-
-
--- a/javauis/amms_qt/module/inc/mammscontrolgroup.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Interface for all control groups.
-*
-*/
-
-
-#ifndef MAMMSCONTROLGROUP_H
-#define MAMMSCONTROLGROUP_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-/**
-*
-*  Interface for all control groups.
-*
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(MAMMSControlGroup)
-{
-protected: // Enumerations
-
-    enum TCommitMode { EImmediate, EDeferred };
-
-public:  // New functions
-    /**
-    * Returns class name that identifies this control group.
-    * @return Control group name.
-    */
-    virtual const TDesC& ClassName() = 0;
-
-    /**
-     * Sets the mode of the CommitControl.
-     *
-     * @param aMode commit mode
-     */
-    virtual void SetModeL(TCommitMode /*aMode*/) {};
-
-    /**
-     * Commit all the controls in the group
-     * in immediate mode commits, in deferred mode marks what variables
-     * need to be commited later
-     */
-    virtual void CommitGroupL() {};
-
-protected:
-    /**
-    * Protected destructor not allow delete throw this interface.
-    */
-    virtual ~MAMMSControlGroup() {};
-};
-#endif // MAMMSCONTROLGROUP_H
--- a/javauis/amms_qt/module/inc/mammscontrollable.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Interface to access control groups.
-*
-*/
-
-
-#ifndef MAMMSCONTROLLABLE_H
-#define MAMMSCONTROLLABLE_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// FORWARD DECLARATIONS
-class MAMMSControlGroup;
-
-// CLASS DECLARATION
-/**
-*
-*  Interface to access control groups.
-*
-*  @since 3.0
-*/
-NONSHARABLE_CLASS(MAMMSControllable)
-{
-public:
-    /**
-    * Finds and returns control group specified with a name.
-    * @since 3.0
-    * @param aClassName Name of the control group.
-    * @return Control group or NULL if group can't be found.
-    */
-    virtual MAMMSControlGroup* Find(const TDesC& aClassName) = 0;
-
-    /**
-    * Returns control group at the specified index.
-    * @since 3.0
-    * @param aIndex Group index.
-    * @return A control group at specified index.
-    */
-    virtual MAMMSControlGroup* At(TInt aIndex) = 0;
-
-    /**
-    * Return number of control groups.
-    * @since 3.0
-    * @return Number of control groups.
-    */
-    virtual TInt Count() = 0;
-protected:
-
-    /**
-    * Protected destructor not to allow delete through this interface.
-    */
-    virtual ~MAMMSControllable() {};
-};
-
-#endif // MAMMSCONTROLLABLE_H
--- a/javauis/amms_qt/module/src/ammsutil.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,366 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Static general reusable methods.
-*
-*/
-
-
-// INCLUDE FILES
-#include <e32math.h>
-#include "ammsutil.h"
-#include <cmmaplayer.h>
-#include <cmmacontrol.h>
-#include "cammscontrol.h"
-
-// CONSTANTS
-namespace
-{
-const TInt KAMMSStraightAngle = 180;
-
-// Set a value to 0 if its absolute value is less than this.
-const TReal KAMMSDiscreteErrorConstant = 0.00000001;
-}
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::FindControl
-// Finds the control of a corresponding name.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CMMAControl* AMMSUtil::FindControl(CMMAPlayer* aPlayer,
-                                   const TDesC& aControlName,
-                                   TAMMSControlTypes aControlType)
-{
-    TInt controlCount = aPlayer->ControlCount();
-    TInt index = 0;
-
-    // if control is not found NULL will be returned
-    CMMAControl* control = NULL;
-
-    // go through all controls
-    while (index < controlCount)
-    {
-        CMMAControl* tmp = aPlayer->Control(index);
-
-        // if the name of the Control matches the name used in finding
-        if (tmp->ClassName() == aControlName)
-        {
-
-            // a base Control can be accepted always, it can not be derived
-            if (aControlType == EAMMSBaseControl)
-            {
-                // found correct control
-                control = tmp;
-
-                // set index to stop while loop
-                index = controlCount;
-            }
-
-            // in case the Control is not a base Control, check AMMS subtype
-            else
-            {
-                if (aControlType == ((CAMMSControl*)tmp)->iControlType)
-                {
-                    // found correct (derived) control
-                    control = tmp;
-
-                    // set index to stop while loop
-                    index = controlCount;
-                }
-                else
-                {
-                    // move to next control
-                    index++;
-                }
-            }
-        }
-
-        // Control name was not the one used in finding
-        else
-        {
-            // move to next control
-            index++;
-        }
-    }
-    return control;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::FromSphericalToCartesianL
-// Converts vector from spherical to cartesian.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::FromSphericalToCartesianL(
-    TInt aSphericalVector[ KAMMSVectorComponents ],
-    TInt aCartesianVector[ KAMMSVectorComponents ])
-{
-    // convert to radians
-    TReal elevation = aSphericalVector[ EElevation ] *
-                      (KPi / KAMMSStraightAngle);
-    TReal azimuth = aSphericalVector[ EAzimuth ] *
-                    (KPi / KAMMSStraightAngle);
-    TReal radius = aSphericalVector[ ERadius ];
-
-    TReal elevationSin;
-    TReal elevationCos;
-    User::LeaveIfError(Math::Sin(elevationSin, elevation));
-    User::LeaveIfError(Math::Cos(elevationCos, elevation));
-
-    TReal cartesian[ KAMMSVectorComponents ];
-
-    cartesian[ EComponentY ] = elevationSin * radius;
-    TReal distXZ = elevationCos * radius; // distance in x-z plane
-
-    TReal azimuthSin;
-    TReal azimuthCos;
-    User::LeaveIfError(Math::Sin(azimuthSin, azimuth));
-    User::LeaveIfError(Math::Cos(azimuthCos, azimuth));
-
-    // azimuth of 0 degrees points to negative z axis
-    cartesian[ EComponentZ ] = -azimuthCos * distXZ;
-    cartesian[ EComponentX ] = azimuthSin * distXZ;
-
-    // round real values and convert them to integers
-    RoundVectorL(cartesian, aCartesianVector);
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::RotateVectorL
-// Rotates a vector round the given axis.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::RotateVectorL(
-    TReal aVector[ KAMMSVectorComponents ],
-    TReal aAxisVector[ KAMMSVectorComponents ],
-    TInt aAngle,
-    TReal aRotatedVector[ KAMMSVectorComponents ])
-{
-    // calculate the length of the axis vector
-    TReal lengthSquare = aAxisVector[ EComponentX ] *
-                         aAxisVector[ EComponentX ] + aAxisVector[ EComponentY ] *
-                         aAxisVector[ EComponentY ] + aAxisVector[ EComponentZ ] *
-                         aAxisVector[ EComponentZ ];
-
-    TReal length;
-    User::LeaveIfError(Math::Sqrt(length, lengthSquare));
-
-    // check that the vector is long enough
-    __ASSERT_DEBUG(length > 0, User::Invariant());
-
-    // normalize the axis vector
-    TReal x = aAxisVector[ EComponentX ] / length;
-    TReal y = aAxisVector[ EComponentY ] / length;
-    TReal z = aAxisVector[ EComponentZ ] / length;
-
-    // calculate sine and cosine values
-    TReal angleRad = aAngle / 180.0 * KPi;
-    TReal c;
-    User::LeaveIfError(Math::Cos(c, angleRad));
-    TReal s;
-    User::LeaveIfError(Math::Sin(s, angleRad));
-
-    // calculate some help variables
-    TReal t = 1 - c;
-    TReal txy = t * x * y;
-    TReal txz = t * x * z;
-    TReal tyz = t * y * z;
-    TReal sz = s * z;
-    TReal sy = s * y;
-    TReal sx = s * x;
-    TReal x2 = aVector[ EComponentX ];
-    TReal y2 = aVector[ EComponentY ];
-    TReal z2 = aVector[ EComponentZ ];
-
-    // calculate new x value
-    aRotatedVector[ EComponentX ] = (t * x * x + c) * x2 +
-                                    (txy - sz) * y2 + (txz + sy) * z2;
-
-    // calculate new y value
-    aRotatedVector[ EComponentY ] = (txy + sz) * x2 +
-                                    (t * y * y + c) * y2 + (tyz - sx) * z2;
-
-    // calculate new z value
-    aRotatedVector[ EComponentZ ] = (txz - sy) * x2 +
-                                    (tyz + sx) * y2 + (t * z * z + c) * z2;
-
-    // Remove error of discrete values.
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        if (Abs(aRotatedVector[ i ]) < KAMMSDiscreteErrorConstant)       // CSI: 2 Wrong index means implementation error #
-        {
-            aRotatedVector[ i ] = 0;  // CSI: 2 Wrong index means implementation error #
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::RoundVectorL
-// Rounds vector components.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::RoundVectorL(
-    TReal aVector[ KAMMSVectorComponents ],
-    TInt aRoundedVector[ KAMMSVectorComponents ])
-{
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        TReal roundedValue;
-        User::LeaveIfError(Math::Round(roundedValue,
-                                       (TReal)aVector[ i ], 0));      // CSI: 2 Wrong index means implementation error #
-
-        aRoundedVector[ i ] = (TInt)roundedValue;    // CSI: 2 Wrong index means implementation error #
-    }
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::MultiplyVector
-// Multiplies a vector by a scalar.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::MultiplyVector(
-    TReal aVector[ KAMMSVectorComponents ],
-    TReal aMultiplier)
-{
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        aVector[ i ] *= aMultiplier;  // CSI: 2 Wrong index means implementation error #
-    }
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::CrossProduct
-// Calculates vector cross product.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::CrossProduct(
-    TReal aA[ KAMMSVectorComponents ],
-    TReal aB[ KAMMSVectorComponents ],
-    TReal aResultVector[ KAMMSVectorComponents ])
-{
-    // This function can handle only vectors with 3 components
-
-    // Calculate the cross product.
-    aResultVector[ EComponentX ] = -aA[ EComponentZ ] * aB[ EComponentY ] +
-                                   aA[ EComponentY ] * aB[ EComponentZ ];
-
-    aResultVector[ EComponentY ] = aA[ EComponentZ ] * aB[ EComponentX ] -
-                                   aA[ EComponentX ] * aB[ EComponentZ ];
-
-    aResultVector[ EComponentZ ] = -aA[ EComponentY ] * aB[ EComponentX ] +
-                                   aA[ EComponentX ] * aB[ EComponentY ];
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::VectorLengthL
-// Calculates the length of the given vector.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TReal AMMSUtil::VectorLengthL(
-    TReal aVector[ KAMMSVectorComponents ])
-{
-    TReal squareLength = 0;
-
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        squareLength += aVector[ i ] * aVector[ i ];
-    }
-
-    TReal length;
-    User::LeaveIfError(Math::Sqrt(length, squareLength));
-
-    return length;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::ConvertToUnitVectorL
-// Converts the given vector to unit vector.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void AMMSUtil::ConvertToUnitVectorL(
-    TReal aVector[ KAMMSVectorComponents ])
-{
-    TReal length = VectorLengthL(aVector);
-
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        aVector[ i ] /= length;  // CSI: 2 Wrong index means implementation error #
-    }
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::AreVectorsSimilar
-// Checks whether two vectors are similar enough.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TBool AMMSUtil::AreVectorsSimilar(
-    TReal aA[ KAMMSVectorComponents ],
-    TInt aB[ KAMMSVectorComponents ],
-    TInt aMaxComponentErrorPercentage)
-{
-    TReal maxRelativeError = aMaxComponentErrorPercentage / 100.0;  // CSI: 47 Value 100 means 100% #
-
-    for (TInt i = 0; i < KAMMSVectorComponents; i++)
-    {
-        TReal maxError =
-            Max(Abs(aA[ i ]), Abs(aB[ i ])) * maxRelativeError;        // CSI: 2 Wrong index means implementation error #
-
-        if (Abs(aA[ i ] - aB[ i ]) > maxError)     // CSI: 2 Wrong index means implementation error #
-        {
-            return EFalse;
-        }
-    }
-
-    // Vectors were similar enough.
-    return ETrue;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::MaxVectorComponent
-// Returns the maximum component in the given vector.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TReal AMMSUtil::MaxVectorComponent(
-    TReal aVector[ KAMMSVectorComponents ])
-{
-    TReal maxValue = aVector[ 0 ];
-
-    for (TInt i = 1; i < KAMMSVectorComponents; i++)
-    {
-        maxValue = Max(maxValue, aVector[ i ]);    // CSI: 2 Wrong index means implementation error #
-    }
-
-    return maxValue;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSUtil::MinVectorComponent
-// Returns the minimum component in the given vector.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TReal AMMSUtil::MinVectorComponent(
-    TReal aVector[ KAMMSVectorComponents ])
-{
-    TReal minValue = aVector[ 0 ];
-
-    for (TInt i = 1; i < KAMMSVectorComponents; i++)
-    {
-        minValue = Min(minValue, aVector[ i ]);    // CSI: 2 Wrong index means implementation error #
-    }
-
-    return minValue;
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammscontrolgroup.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Base class for control groups
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-#include "cammscontrolgroup.h"
-#include <cmmaplayer.h>
-#include "cammscontrol.h"
-#include "ammsutil.h"
-#include "cammsplayerstatelistener.h"
-
-#ifdef _DEBUG
-_LIT(KAMMSNoGroupNameError, "No group name");
-#endif
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::~CAMMSControlGroup
-// Destructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSControlGroup::~CAMMSControlGroup()
-{
-    if (iPlayerStateListeners)
-    {
-        iPlayerStateListeners->ResetAndDestroy();
-        delete iPlayerStateListeners;
-    }
-
-    iControls.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::PlayerStateChangedL
-// This function is called when state of a player has changed.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::PlayerStateChangedL(
-    CMMAPlayer* aPlayer,
-    TInt aNewState)
-{
-    CMMAControl* findControl = AMMSUtil::FindControl(
-                                   aPlayer, iName, iControlType);
-
-    // It is safe to cast CMMAControl to the subclass CAMMSControl, as only
-    // AMMS Controls are returned from FindControl method
-    CAMMSControl* control = static_cast< CAMMSControl* >(findControl);
-
-    // The player has a control belonging to this group if this function
-    // is called.
-    __ASSERT_DEBUG(control, User::Invariant());
-
-    TInt controlIndex = iControls.Find(control);
-
-    // Add the control of the player to the group if the player is prefetched
-    // or started.
-    if (controlIndex == KErrNotFound)
-    {
-        if ((aNewState == CMMAPlayer::EPrefetched) ||
-                (aNewState == CMMAPlayer::EStarted))
-        {
-            // Now it is safe to call PrepareControlL to initialize the Control
-            LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSControlGroup::PlayerStateChangedL calling PrepareControl for type: %d",
-                      control->iControlType);
-            control->PrepareControlL();
-
-            // Add control to controls array
-            User::LeaveIfError(iControls.Append(control));
-
-            // Notify derived classes about new player control
-            NotifyPlayerAddedL(aPlayer, control);
-        }
-    }
-
-    // Remove the control of the player from the group if the player is
-    // deallocated or closed.
-    else
-    {
-        if ((aNewState == CMMAPlayer::ERealized) ||
-                (aNewState == CMMAPlayer::EClosed))
-        {
-            // Call DeallocateControl to delete the Control's Effect API class
-            LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSControlGroup::PlayerStateChangedL calling DeallocateControl for type: %d",
-                      control->iControlType);
-            control->DeallocateControl();
-
-            NotifyPlayerRemoved(aPlayer, control);
-            iControls.Remove(controlIndex);
-        }
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::ConstructL
-// 2nd phase constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::ConstructL()
-{
-    iPlayerStateListeners =
-        new(ELeave) CArrayPtrSeg< CAMMSPlayerStateListener >(1);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::ControlCount
-// Returns the total count of controls in this group.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSControlGroup::ControlCount() const
-{
-    return iControls.Count();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::Control
-// Gets control. Ownership is not tranferred.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CMMAControl* CAMMSControlGroup::Control(TInt aIndex) const
-{
-    // aIndex must not be negative and must not be greater than the number
-    // of objects currently in the array,
-    // otherwise the operator raises a USER-130 panic.
-    return iControls[ aIndex ];
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::NotifyPlayerRemoved
-// Called by PlayerAddedL when new player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::NotifyPlayerAddedL(
-    CMMAPlayer* /*aPlayer*/,
-    CMMAControl* /*aControl*/)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::NotifyPlayerRemoved
-// Called by PlayerRemoved when a player is removed
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::NotifyPlayerRemoved(
-    CMMAPlayer* /*aPlayer*/,
-    CMMAControl* /*aControl*/)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::PlayerAddedL
-// Called by the owning module when a player is added
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::PlayerAddedL(CMMAPlayer *aPlayer)
-{
-    // All derived classes must define name for the group
-    __ASSERT_DEBUG(iName != KNullDesC,
-                   User::Panic(KAMMSNoGroupNameError,
-                               KErrUnknown));
-
-    // Do nothing if the player does not have a control belonging to this group.
-    CMMAControl* findControl = AMMSUtil::FindControl(
-                                   aPlayer, iName, iControlType);
-    if (!findControl)
-    {
-        return;
-    }
-
-    // It is safe to cast CMMAControl to the subclass CAMMSControl, as only
-    // AMMS Controls are returned from FindControl method
-    CAMMSControl* control = static_cast< CAMMSControl* >(findControl);
-
-    CAMMSPlayerStateListener* playerListener =
-        CAMMSPlayerStateListener::NewLC(aPlayer, this);
-
-    iPlayerStateListeners->AppendL(playerListener);
-
-    CleanupStack::Pop(playerListener);
-
-    // Add the control of the player directly to the group
-    // if the player is in STARTED or PREFETCHED state.
-    // If not, the control is added later when the player changes
-    // its state to PREFETCHED.
-    TInt playerState = aPlayer->State();
-
-    if ((playerState == CMMAPlayer::EPrefetched) ||
-            (playerState == CMMAPlayer::EStarted))
-    {
-        // Now it is safe to call PrepareControlL to initialize the Control
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSControlGroup::PlayerAddedL calling PrepareControl for type: %d",
-                  control->iControlType);
-        control->PrepareControlL();
-
-        // Add control to controls array
-        User::LeaveIfError(iControls.Append(control));
-
-        // Notify derived classes about new player control
-        NotifyPlayerAddedL(aPlayer, control);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::PlayerRemoved
-// Called by the owning module when a player is removed
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSControlGroup::PlayerRemoved(CMMAPlayer *aPlayer)
-{
-    CMMAControl* control = AMMSUtil::FindControl(
-                               aPlayer, iName, iControlType);
-
-    // Do nothing if the player does not have a control belonging to this group.
-    if (!control)
-    {
-        return;
-    }
-
-    // Remove the control of the player if the control is in the group.
-    TInt controlIndex = iControls.Find(control);
-    if (controlIndex != KErrNotFound)
-    {
-        // It is safe to cast CMMAControl to the subclass CAMMSControl, as only
-        // AMMS Controls are returned from FindControl method
-        CAMMSControl* ammsControl = static_cast< CAMMSControl* >(control);
-
-        // Call DeallocateControl to delete the Control's Effect API class
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSControlGroup::PlayerRemoved calling DeallocateControl for type: %d",
-                  ammsControl->iControlType);
-        ammsControl->DeallocateControl();
-
-        NotifyPlayerRemoved(aPlayer, ammsControl);
-        iControls.Remove(controlIndex);
-    }
-
-    // Remove the state listener belonging to the given player.
-
-    TInt listenerCount = iPlayerStateListeners->Count();
-    TInt listenerIndex = KErrNotFound;
-
-    for (TInt i = 0; i < listenerCount; i++)
-    {
-        // Elements in the listener array are never null.
-        if (iPlayerStateListeners->At(i)->Player() == aPlayer)
-        {
-            listenerIndex = i;
-            break;
-        }
-    }
-
-    if (listenerIndex != KErrNotFound)
-    {
-        delete iPlayerStateListeners->At(listenerIndex);
-        iPlayerStateListeners->Delete(listenerIndex);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSControlGroup::CAMMSControlGroup
-// C++ default constructor can NOT contain any code, that might leave.
-// -----------------------------------------------------------------------------
-CAMMSControlGroup::CAMMSControlGroup(
-    const TDesC& aName,
-    TAMMSControlTypes aControlType) :
-        iName(aName),
-        iControlType(aControlType)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammseffectmodule.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Module for holding control groups belonging to EffectModule.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammseffectmodule.h"
-#include "cammsaudiovirtualizercontrolgroup.h"
-#include "cammsglobalmanager.h"
-#include <logger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectModule::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSEffectModule* CAMMSEffectModule::NewLC(
-    CAMMSGlobalManager* aGlobalManager)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::NewLC +");
-
-    CAMMSEffectModule* self = new(ELeave) CAMMSEffectModule(aGlobalManager);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::NewLC -");
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectModule::~CAMMSEffectModule()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSEffectModule::~CAMMSEffectModule()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::~");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectModule::AddPlayerNoStateCheckL
-// Adds player without checking its state.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSEffectModule::AddPlayerNoStateCheckL(CMMAPlayer* aPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::AddPlayerNoStateCheckL +");
-
-    // Check that the player can be added.
-    User::LeaveIfError(iGlobalManager->PlayerAddingAllowed(aPlayer));
-
-    // Add the player to this module.
-    CAMMSModule::AddPlayerNoStateCheckL(aPlayer);
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::AddPlayerNoStateCheckL -");
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSEffectModule::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::ConstructL +");
-
-    CAMMSModule::ConstructL();
-
-    // Add required controls to the EffectModule.
-
-    AddControlGroupAndPopL(CAMMSAudioVirtualizerControlGroup::NewLC());
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSEffectModule::ConstructL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSEffectModule::CAMMSEffectModule
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSEffectModule::CAMMSEffectModule(CAMMSGlobalManager* aGlobalManager)
-        : iGlobalManager(aGlobalManager)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammsglobalmanager.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class provides GlobalManager functionality.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-
-#include "cammsglobalmanager.h"
-#include "cammsmodulecontainer.h"
-#include "cammssoundsource3d.h"
-#include "cammseffectmodule.h"
-
-// Audio 3d includes.
-#include "cammsdopplercontrolgroup.h"
-#include "cammslocationcontrolgroup.h"
-
-// Global manager
-#include "cammsreverbcontrolgroup.h"
-#include "cammsequalizercontrolgroup.h"
-#include "cammsvolumecontrolgroup.h"
-#include "cammspancontrolgroup.h"
-#include "cammscommitcontrolgroup.h"
-#include "cammsorientationcontrolgroup.h"
-
-#include "cammsplayerbuildergroup.h"
-#include "cammsaudioplayerbuilder.h"
-#include "cammsvolumecontrolbuilder.h"
-#include "ammsconstants.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSGlobalManager* CAMMSGlobalManager::NewLC()
-{
-    CAMMSGlobalManager* self = new(ELeave) CAMMSGlobalManager;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    return self;
-}
-
-//   Destructor
-CAMMSGlobalManager::~CAMMSGlobalManager()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::~CAMMSGlobalManager");
-    delete iSpectator;
-    delete iEffectModules;
-    delete iSoundSource3Ds;
-    delete iPlayerBuilder;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::AddPlayerNotifyL
-// Adds new player
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSGlobalManager::AddPlayerNotifyL(CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::AddPlayerNotifyL player type %S",
-              aPlayer->Type().Ptr());
-
-    // Add amms controls to player.
-    iPlayerBuilder->PreparePlayerL(aPlayer);
-
-    // AddPlayerNoStateCheckL is used to add players to global manager and
-    // global controls because mma player may be started or prefetched before
-    // amms global manager is created.
-
-    // Add player to global manager. All global control groups will be informed.
-    AddPlayerNoStateCheckL(aPlayer);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::RemovePlayerNotify
-// Removes player
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSGlobalManager::RemovePlayerNotify(CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::RemovePlayerNotify player type %S",
-              aPlayer->Type().Ptr());
-
-    // RemovePlayer can return only KErrNotFound or KErrNone, and in this case
-    // we do not need to handle KErrNotFound
-    RemovePlayerNoStateCheck(aPlayer);
-
-    // Removing player from other modules
-    iEffectModules->RemovePlayer(aPlayer);
-    iSoundSource3Ds->RemovePlayer(aPlayer);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::InitL
-// Initializes GlobalManager.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSGlobalManager::InitL(RPointerArray< CMMAPlayer >& aPlayers)
-{
-    TInt playerCount = aPlayers.Count();
-
-    // Add all players to the global controls and to the spectator.
-    for (TInt i = 0; i < playerCount; i++)
-    {
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::InitL adding controls to %S",
-                  aPlayers[ i ]->Type().Ptr());
-        AddPlayerNotifyL(aPlayers[ i ]);
-    }
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::CreateSoundSource3DL
-// Creates a new sound source 3D module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CAMMSModule* CAMMSGlobalManager::CreateSoundSource3DL()
-{
-    // InitL must have been called before call to this methdod.
-    __ASSERT_DEBUG(iSpectator, User::Invariant());
-
-    CAMMSSoundSource3D* soundSource3D =
-        CAMMSSoundSource3D::NewLC(iSpectator, this);
-
-    iSoundSource3Ds->AppendL(soundSource3D);
-
-    CleanupStack::Pop(soundSource3D);
-
-    return soundSource3D;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::CreateEffectModuleL
-// Creates a new effect module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CAMMSModule* CAMMSGlobalManager::CreateEffectModuleL()
-{
-    CAMMSEffectModule* module = CAMMSEffectModule::NewLC(this);
-
-    iEffectModules->AppendL(module);
-
-    CleanupStack::Pop(module);
-
-    return module;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::Spectator
-// Returns the spectator.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-CAMMSModule* CAMMSGlobalManager::Spectator()
-{
-    return iSpectator;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::DisposeModule
-// Disposes module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSGlobalManager::DisposeModule(CAMMSModule* aModule)
-{
-    // Remove the module from the module containers.
-    iSoundSource3Ds->RemoveModule(aModule);
-    iEffectModules->RemoveModule(aModule);
-
-    // Delete the module itself.
-    delete aModule;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::PlayerAddingAllowed
-// Checks whether the given player can be added to a module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSGlobalManager::PlayerAddingAllowed(CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::PlayerAddingAllowed %d +",
-              (TInt)aPlayer);
-
-    TInt result = KErrNone;
-
-    // Check whether the player can be added according to SoundSource3Ds.
-    TInt modules = iSoundSource3Ds->Count();
-
-    for (TInt i = 0; (result == KErrNone) && (i < modules); i++)
-    {
-        CAMMSModule* module = iSoundSource3Ds->At(i);
-
-        result = PlayerAddingAllowed(aPlayer, module);
-    }
-
-
-    // Check whether the player can be added according to EffectModules.
-    modules = iEffectModules->Count();
-
-    for (TInt i = 0; (result == KErrNone) && (i < modules); i++)
-    {
-        CAMMSModule* module = iEffectModules->At(i);
-
-        result = PlayerAddingAllowed(aPlayer, module);
-    }
-
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::PlayerAddingAllowed %d -", result);
-
-    return result;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::CAMMSGlobalManager
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSGlobalManager::CAMMSGlobalManager()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSGlobalManager::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::ConstructL +");
-
-    CAMMSModule::ConstructL();
-
-    iSoundSource3Ds = new(ELeave) CAMMSModuleContainer();
-    iEffectModules = new(ELeave) CAMMSModuleContainer();
-    iPlayerBuilder = CAMMSPlayerBuilderGroup::NewL();
-    iPlayerBuilder->AddBuilderAndPopL(CAMMSAudioPlayerBuilder::NewLC());
-    iPlayerBuilder->AddBuilderAndPopL(CAMMSVolumeControlBuilder::NewLC());
-
-    // Add control groups to global manager
-    AddControlGroupAndPopL(CAMMSReverbControlGroup::NewLC());
-    AddControlGroupAndPopL(CAMMSEqualizerControlGroup::NewLC());
-    AddControlGroupAndPopL(CAMMSVolumeControlGroup::NewLC(
-                               KAMMSGlobalVolume));
-
-#ifndef __WINS__
-    // PanControl is not supported in WINSCW builds.
-    // This is because of limited pan support in DirectX.
-    AddControlGroupAndPopL(CAMMSPanControlGroup::NewLC());
-#endif // __WINS__
-
-    // Create spectator and add controls.
-    iSpectator = CAMMSModule::NewL();
-    iSpectator->AddControlGroupAndPopL(CAMMSLocationControlGroup::NewLC(
-                                           EAMMSSpectatorControl));
-    iSpectator->AddControlGroupAndPopL(CAMMSOrientationControlGroup::NewLC());
-    iSpectator->AddControlGroupAndPopL(CAMMSDopplerControlGroup::NewLC(
-                                           EAMMSSpectatorControl));
-
-    // Add Commit control group to global manager, and pass required references
-    AddControlGroupAndPopL(CAMMSCommitControlGroup::NewLC(
-                               *iSpectator,
-                               *iSoundSource3Ds));
-
-    LOG( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::ConstructL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSGlobalManager::PlayerAddingAllowed
-// Checks whether the given player can be added to a module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CAMMSGlobalManager::PlayerAddingAllowed(CMMAPlayer* aPlayer,
-        CAMMSModule* aModule)
-{
-    LOG2( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::PlayerAddingAllowed %d %d +",
-               (TInt)aPlayer, (TInt)aModule);
-
-    TBool playerExists = aModule->HasPlayer(aPlayer);
-
-    TInt result = (playerExists ? KAMMSPlayerAlreadyInModuleError : KErrNone);
-
-// WINSCW build does not support audio mixing.
-// Thus, check in WINSCW build that there is not any non-closed player
-// in the module. If there is any non-closed player in the module,
-// adding a new player is not allowed to ANY module.
-// However, allow a player to be in CLOSED state, because it cannot be started
-// anymore and cannot thus reserve any resources anymore.
-
-#ifdef __WINS__
-
-    if (result == KErrNone)
-    {
-        TInt players = aModule->PlayerCount(CMMAPlayer::EUnrealized,
-                                            CMMAPlayer::EStarted);
-
-        LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::PlayerAddingAllowed players=%d",
-                  players);
-
-        result = (players == 0 ? KErrNone : KAMMSMixingNotSupported);
-    }
-
-#endif  // __WINS__
-
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSGlobalManager::PlayerAddingAllowed %d -", result);
-
-    return result;
-}
-
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammsmodule.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a container for MAMMSControlGroup objects.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsmodule.h"
-#include "cammscontrolgroup.h"
-#include <logger.h>
-
-
-// CONSTANTS
-// Before further testing is done, 4 is sufficient average value to be used here.
-const TInt KAMMSModuleDefaultGranularity = 4;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSModule* CAMMSModule::NewL()
-{
-    CAMMSModule* self = NewLC();
-    CleanupStack::Pop(self);
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSModule* CAMMSModule::NewLC()
-{
-    CAMMSModule* self = new(ELeave) CAMMSModule;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-// Destructor
-CAMMSModule::~CAMMSModule()
-{
-    // Check that construction fully succeed.
-    if (iControlGroups)
-    {
-        // control groups are owned and they must be deleted.
-        iControlGroups->ResetAndDestroy();
-        delete iControlGroups;
-    }
-
-    // Players are not owned.
-    iPlayers.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::AddControlGroupL
-// Add control to iControlGroups array.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModule::AddControlGroupAndPopL(CAMMSControlGroup* aGroup)
-{
-    // Check in debug build that group is not null.
-    __ASSERT_DEBUG(aGroup, User::Invariant());
-
-    iControlGroups->AppendL(aGroup);
-
-    // aGroup must be the previous item in the cleanupstack
-    CleanupStack::Pop(aGroup);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::AddPlayerL
-// Adds new player to this module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModule::AddPlayerL(CMMAPlayer* aPlayer)
-{
-    // Check in debug build that player is not null.
-    __ASSERT_DEBUG(aPlayer, User::Invariant());
-
-    // Must leave if the player is already in the module
-    if (HasPlayer(aPlayer))
-    {
-        User::Leave(KErrArgument);
-    }
-
-    // Must leave if player is in PREFETCHED or STARTED state
-    User::LeaveIfError(CheckPlayerState(aPlayer));
-
-    // Check that none of the players is not in PREFETCHED or STARTED state
-    User::LeaveIfError(CheckAllPlayersState());
-
-    AddPlayerNoStateCheckL(aPlayer);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::RemovePlayer
-// Removes player from module..
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::RemovePlayer(CMMAPlayer* aPlayer)
-{
-    // call RemovePlayerNoStateCheck only if aPlayer and all players in the
-    // module are in the right state.
-    TInt error = CheckPlayerState(aPlayer);
-    if (error == KErrNone)
-    {
-        error = CheckAllPlayersState();
-        if (error == KErrNone)
-        {
-            error = RemovePlayerNoStateCheck(aPlayer);
-        }
-    }
-    return error;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::AddPlayerNoStateCheckL
-// Adds player without checking its state.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModule::AddPlayerNoStateCheckL(CMMAPlayer* aPlayer)
-{
-    iPlayers.AppendL(aPlayer);
-
-    // If adding players leaves CAMMSModule::CleanupAddPlayer method will be
-    // called and player removed from module and from groups.
-    CleanupStack::PushL(TCleanupItem(&CAMMSModule::CleanupAddPlayer, this));
-
-    // Inform all control groups
-    TInt count = iControlGroups->Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iControlGroups->At(i)->PlayerAddedL(aPlayer);
-    }
-
-    CleanupStack::Pop(); // CSI: 12 Parameter TCleanupItem cannot be used as a parameter in Pop #
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::RemovePlayerNoStateCheck
-// Removes player without checking its state
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::RemovePlayerNoStateCheck(CMMAPlayer* aPlayer)
-{
-    TInt index = iPlayers.Find(aPlayer);
-    if (index != KErrNotFound)
-    {
-        // player was in the array, remove it
-        iPlayers.Remove(index);
-
-        // inform all groups
-        TInt count = iControlGroups->Count();
-        for (TInt i = 0; i < count; i++)
-        {
-            iControlGroups->At(i)->PlayerRemoved(aPlayer);
-        }
-    }
-
-    // Find returned KErrNotFound if player was not in the module
-    return index;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::HasPlayer
-// Checks whether the given player is in this module.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TBool CAMMSModule::HasPlayer(CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaAMMS, EInfo, "AMMS:CAMMSModule::HasPlayer %d +", (TInt)aPlayer);
-
-    TInt index = iPlayers.Find(aPlayer);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS:CAMMSModule::HasPlayer index=%d -", index);
-
-    return (index != KErrNotFound);
-}
-
-
-#ifdef __WINS__
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::PlayerCount
-// Returns the count of players whose state is between the given limits.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::PlayerCount(TInt aMinState, TInt aMaxState)
-{
-    LOG2( EJavaAMMS, EInfo, "AMMS:CAMMSModule::PlayerCount %d %d +", aMinState, aMaxState);
-
-    TInt result = 0;
-
-    TInt playerCount = iPlayers.Count();
-
-    LOG1( EJavaAMMS, EInfo, "AMMS:CAMMSModule::HasPlayer, players=%d", playerCount);
-
-    for (TInt i = 0; i < playerCount; i++)
-    {
-        TInt playerState = iPlayers[ i ]->State();
-
-        LOG2( EJavaAMMS, EInfo, "AMMS:CAMMSModule::HasPlayer %d, state=%d", i,
-                   playerState);
-
-        if ((playerState >= aMinState) &&
-                (playerState <= aMaxState))
-        {
-            result++;
-        }
-    }
-
-    LOG1( EJavaAMMS, EInfo, "AMMS:CAMMSModule::PlayerCount %d -", result);
-
-    return result;
-}
-
-#endif  // __WINS__
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::CheckPlayerState
-// Checks all players state.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::CheckAllPlayersState()
-{
-    TInt error = KErrNone;
-
-    TInt playerCount = iPlayers.Count();
-
-    // Loop until all players are checked or one of the players is in
-    // PREFETCHED or STARTED state
-    for (TInt i = 0; (i < playerCount) &&
-            (error == KErrNone); i++)
-    {
-        error = CheckPlayerState(iPlayers[ i ]);
-    }
-    return error;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::CheckPlayerState
-// Checks player state.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::CheckPlayerState(CMMAPlayer* aPlayer)
-{
-    // Player may not be in PREFETCHED or STARTED state
-    TInt retVal = KErrNone;
-    TInt playerState = aPlayer->State();
-    if (playerState == CMMAPlayer::EStarted ||
-            playerState == CMMAPlayer::EPrefetched)
-    {
-        retVal = KErrNotReady;
-    }
-    return retVal;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::CleanupAddPlayer
-// Static function to be used with TCleanupItem in AddPlayerNoStateCheckL
-// method. This method removes last added player from module and control
-// groups.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModule::CleanupAddPlayer(TAny* aModule)
-{
-    CAMMSModule* module = static_cast< CAMMSModule* >(aModule);
-
-    // This method is called from AddPlayerNoStateCheckL and there is always
-    // at least one player.
-    __ASSERT_DEBUG(module->iPlayers.Count() > 0, User::Invariant());
-
-    // Remove last added player from module and from control groups
-    module->RemovePlayerNoStateCheck(
-        module->iPlayers[ module->iPlayers.Count() - 1 ]);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::Find
-// Find control group with specified class name.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-MAMMSControlGroup* CAMMSModule::Find(const TDesC& aClassName)
-{
-    MAMMSControlGroup* group = NULL;
-    TInt groupIndex = 0;
-    TInt groupCount = iControlGroups->Count();
-
-    // Loop until group is found or all group are checked
-    while (!group && (groupIndex < groupCount))
-    {
-        MAMMSControlGroup* tmpGroup = iControlGroups->At(groupIndex);
-
-        if (tmpGroup->ClassName() == aClassName)
-        {
-            // found the group, set return value which will stop while loop
-            group = tmpGroup;
-        }
-
-        groupIndex++;
-    }
-
-    return group;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::At
-// Index must be non-negative and less than the number of objects currently
-// within the array otherwise the functions raise an E32USER-CBase 21 panic.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-MAMMSControlGroup* CAMMSModule::At(TInt aIndex)
-{
-    return iControlGroups->At(aIndex);    // CSI: 1 Array range panic allowed according to function description #
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::Count
-// return iControlGroup count.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSModule::Count()
-{
-    return iControlGroups->Count();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSModule::ConstructL()
-{
-    // Create array with default granularity, all derived classes must call
-    // this method.
-    iControlGroups = new(ELeave)CArrayPtrSeg< CAMMSControlGroup >(
-        KAMMSModuleDefaultGranularity);
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModule::CAMMSModule
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSModule::CAMMSModule()
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammsmodulecontainer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Container for CAMMSModule objects.
-*
-*/
-
-
-// INCLUDE FILES
-#include <logger.h>
-
-#include "cammsmodulecontainer.h"
-
-// CONSTANTS
-// Before further testing is done, 4 is sufficient average value to be used here.
-const TInt KAMMSContainerDefaultGranularity = 4;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-CAMMSModuleContainer::~CAMMSModuleContainer()
-{
-    ResetAndDestroy();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModuleContainer::RemovePlayer
-// Removes player from all modules.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModuleContainer::RemovePlayer(CMMAPlayer* aPlayer)
-{
-    // Remove player from all modules
-    for (TInt i = 0; i < Count(); i++)
-    {
-        At(i)->RemovePlayerNoStateCheck(aPlayer);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModuleContainer::RemoveModule
-// Removes module from container.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSModuleContainer::RemoveModule(CAMMSModule* aModule)
-{
-    // If the element is found, index is set to the position of that module
-    // element within the array.
-    TInt index = KErrNotFound;
-
-    TKeyArrayFix key(0, ECmpTInt);   // offset = 0, type integer
-
-    // find returns 0, if the element with the specified key is found. Non-zero
-    // if the element with the specified key is not found
-    TInt retVal = Find(aModule, key, index);
-
-    LOG1( EJavaAMMS, EInfo, "AMMS::CAMMSModuleContainer::DisposeModule find result %d",
-              retVal);
-
-    if (retVal == KErrNone)
-    {
-        // Remove the element by position. The module itself is not deleted
-        // here, so it has to be deleted elsewhere if needed.
-        Delete(index);
-    }
-    // else, module was not added to this container
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSModuleContainer::CAMMSModuleContainer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSModuleContainer::CAMMSModuleContainer():
-        CArrayPtrSeg< CAMMSModule >(KAMMSContainerDefaultGranularity)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammsplayerstatelistener.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for player state listener.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammsplayerstatelistener.h"
-#include "cammscontrolgroup.h"
-#include <cmmaplayer.h>
-#include <cmmaplayerevent.h>
-
-// CONSTANTS
-const TInt KErrorMessageSize = 32;
-_LIT(KErrDefaultError, "AMMS error: %d");
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::NewLC
-// Two-phased constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSPlayerStateListener* CAMMSPlayerStateListener::NewLC(
-    CMMAPlayer* aPlayer,
-    CAMMSControlGroup* aControlGroup)
-{
-    CAMMSPlayerStateListener* self =
-        new(ELeave) CAMMSPlayerStateListener(aPlayer,
-                                             aControlGroup);
-    CleanupStack::PushL(self);
-
-    self->ConstructL();
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::~CAMMSPlayerStateListener
-// Destructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSPlayerStateListener::~CAMMSPlayerStateListener()
-{
-    if (iPlayer)
-    {
-        iPlayer->RemoveStateListener(this);
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::ConstructL
-// 2nd phase constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPlayerStateListener::ConstructL()
-{
-    __ASSERT_DEBUG(iPlayer && iControlGroup, User::Invariant());
-
-    iPlayer->AddStateListenerL(this);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::CAMMSPlayerStateListener
-// C++ constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CAMMSPlayerStateListener::CAMMSPlayerStateListener(
-    CMMAPlayer* aPlayer,
-    CAMMSControlGroup* aControlGroup)
-        : iPlayer(aPlayer),
-        iControlGroup(aControlGroup)
-{
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::Player
-// Returns the player listened by this listener.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CMMAPlayer* CAMMSPlayerStateListener::Player()
-{
-    return iPlayer;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSPlayerStateListener::StateChanged
-// Called when player state is changed.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSPlayerStateListener::StateChanged(TInt aState)
-{
-    TRAPD(err, iControlGroup->PlayerStateChangedL(iPlayer, aState));
-
-    if (err != KErrNone)
-    {
-        TBuf<KErrorMessageSize> errorMessage;
-        errorMessage.Format(KErrDefaultError, err);
-        iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-    }
-}
-
-//  End of File
--- a/javauis/amms_qt/module/src/cammssoundsource3d.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Module for holding control groups belonging to SoundSource3D.
-*
-*/
-
-
-// INCLUDE FILES
-#include "cammssoundsource3d.h"
-#include "cammsdopplercontrolgroup.h"
-#include "cammslocationcontrolgroup.h"
-#include "cammsreverbsourcecontrolgroup.h"
-#include "cammsdistanceattenuationcontrolgroup.h"
-#include "cammspancontrolgroup.h"
-#include "cammsglobalmanager.h"
-#include <logger.h>
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-CAMMSSoundSource3D* CAMMSSoundSource3D::NewLC(CAMMSModule* aSpectator,
-        CAMMSGlobalManager* aGlobalManager)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::NewLC +");
-
-    CAMMSSoundSource3D* self = new(ELeave) CAMMSSoundSource3D(aSpectator,
-            aGlobalManager);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::NewLC -");
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::~CAMMSSoundSource3D()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSSoundSource3D::~CAMMSSoundSource3D()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::~");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::AddPlayerNoStateCheckL
-// Adds player without checking its state.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSSoundSource3D::AddPlayerNoStateCheckL(CMMAPlayer* aPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::AddPlayerNoStateCheckL +");
-
-    // Check that the player can be added.
-    User::LeaveIfError(iGlobalManager->PlayerAddingAllowed(aPlayer));
-
-    // Remove the pan control from the global manager because the pan control
-    // cannot be used when 3D sound is in use.
-    CAMMSPanControlGroup* panControlGroup =
-        (CAMMSPanControlGroup*)iGlobalManager->Find(
-            KAMMSPanControlClassName);
-
-    // PanControl is not supported in WINSCW builds.
-    if (panControlGroup)
-    {
-        panControlGroup->PlayerRemoved(aPlayer);
-    }
-
-
-    // Add the player to the spectator.
-    iSpectator->AddPlayerNoStateCheckL(aPlayer);
-
-    // Add the player to this module.
-    CAMMSModule::AddPlayerNoStateCheckL(aPlayer);
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::AddPlayerNoStateCheckL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::RemovePlayerNoStateCheck
-// Removes player without checking its state
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CAMMSSoundSource3D::RemovePlayerNoStateCheck(CMMAPlayer* aPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::RemovePlayerNoStateCheck +");
-
-    // Remove the player from the module. The method returns the index
-    // of the Player or an error code.
-    TInt error = CAMMSModule::RemovePlayerNoStateCheck(aPlayer);
-
-    ELOG1( EJavaAMMS, "AMMS:CAMMSSoundSource3D::RemovePlayerNoStateCheck err %d",
-              error);
-
-    // If the player was found in this module, remove the player also from the
-    // spectator. The method returns the index of the Player or an error code.
-    if (error >= KErrNone)
-    {
-        error = iSpectator->RemovePlayerNoStateCheck(aPlayer);
-
-        ELOG1( EJavaAMMS, "AMMS:CAMMSSoundSource3D::RemovePlayerNoStateCheck err2 %d",
-                  error);
-    }
-
-    // If the player is deleted from the module, it is required to add the
-    // pan control to the global manager.
-    if (error >= KErrNone)
-    {
-        CAMMSPanControlGroup* panControlGroup =
-            (CAMMSPanControlGroup*)iGlobalManager->Find(
-                KAMMSPanControlClassName);
-
-        // PanControl is not supported in WINSCW builds.
-        if (panControlGroup)
-        {
-            TRAP(error, panControlGroup->PlayerAddedL(aPlayer));
-        }
-
-        ELOG1( EJavaAMMS, "AMMS:CAMMSSoundSource3D::RemovePlayerNoStateCheck err3 %d",
-                  error);
-    }
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::RemovePlayerNoStateCheck -");
-
-    return error;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-void CAMMSSoundSource3D::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::ConstructL +");
-
-    CAMMSModule::ConstructL();
-
-    // Add required controls to the SoundSource3D.
-
-    AddControlGroupAndPopL(CAMMSDopplerControlGroup::NewLC(
-                               EAMMSSoundSource3DControl));
-
-    AddControlGroupAndPopL(CAMMSLocationControlGroup::NewLC(
-                               EAMMSSoundSource3DControl));
-
-    AddControlGroupAndPopL(CAMMSDistanceAttenuationControlGroup::NewLC());
-
-    AddControlGroupAndPopL(CAMMSReverbSourceControlGroup::NewLC());
-
-    LOG( EJavaAMMS, EInfo, "AMMS:CAMMSSoundSource3D::ConstructL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSSoundSource3D::CAMMSSoundSource3D
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-CAMMSSoundSource3D::CAMMSSoundSource3D(CAMMSModule* aSpectator,
-                                       CAMMSGlobalManager* aGlobalManager)
-        : iSpectator(aSpectator),
-        iGlobalManager(aGlobalManager)
-{
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/javasrc/com/nokia/amms/control/tuner/TunerControlImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements
- *                javax.microedition.amms.control.tuner.TunerControl
- *
-*/
-
-
-package com.nokia.amms.control.tuner;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlayerImpl;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.control.ControlImpl;
-import com.nokia.mj.impl.rt.legacy.NativeError;
-
-public class TunerControlImpl
-        extends ControlImpl
-        implements javax.microedition.amms.control.tuner.TunerControl
-{
-    //preset name max length
-    private static final int MAX_PRESET_NAME_LENGTH = 100;
-    //max number of presets
-    private static final int MAX_NUMBER_OF_PRESETS = 20;
-    //all frequencys are in 100 Hertzs
-    private static final int HERTZ_MULTIPLIER = 100;
-
-    /**
-     * Constructor
-     */
-    public TunerControlImpl()
-    {
-        //JDEBUG( "AMMS TunerControlImpl Constructor" );
-    }
-
-    /**
-     * Gets the minimum frequency supported by this tuner
-     * with the given modulation.
-     *
-     * @param modulation The modulation whose supported minimum frequency
-     * is asked.
-     * @return The minimum frequency in 100 Hertzs.
-     * @throws IllegalArgumentException if the <code>modulation</code> is not supported or it is null.
-     */
-    public int getMinFreq(String aModulation)
-    {
-        if (aModulation != MODULATION_FM)
-        {
-            throw new IllegalArgumentException("Modulation is not valid.");
-        }
-
-        int minFreq = _getMinFreq(iEventSource,
-                                  iControlHandle);
-
-        NativeError.check(minFreq);
-
-        return minFreq / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * Gets the maximum frequency supported by this tuner
-     * with the given modulation.
-     *
-     * @param modulation The modulation whose supported maximum frequency
-     * is asked.
-     * @return The maximum frequency in 100 Hertzs.
-     * @throws IllegalArgumentException if the <code>modulation</code> is not supported or it is null.
-     */
-    public int getMaxFreq(String aModulation)
-    {
-        if (aModulation != MODULATION_FM)
-        {
-            throw new IllegalArgumentException("Modulation is not valid.");
-        }
-
-        int maxFreq = _getMaxFreq(iEventSource,
-                                  iControlHandle);
-
-        NativeError.check(maxFreq);
-
-        return maxFreq / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * Tunes to the given frequency or to the closest supported frequency.
-     *
-     * @param freq The frequency in 100 Hertzs that will be taken into use.
-     * If that frequency is not supported, the closest supported
-     * frequency will be taken into use.
-     *
-     * @param modulation The modulation to be used. <code>TunerControl</code> specifies
-     * predefined constants <code>MODULATION_FM</code> and <code>MODULATION_AM</code>
-     * but other modulations can be supported as well. Supported modulations can be queried
-     * by <code>System</code> property <code>tuner.modulations</code>.
-     *
-     * @throws IllegalArgumentException if <code>freq</code> is not inside the frequency band supported
-     * by the device or if the <code>modulation</code> is not supported or the <code>modulation</code> is null.
-     *
-     * @return the frequency in 100 Hertzs that was taken into use.
-     */
-    public int setFrequency(int aFreq, String aModulation)
-    {
-        if (aModulation != MODULATION_FM)
-        {
-            throw new IllegalArgumentException("Modulation is not valid.");
-        }
-
-        int freqInUse = _setFrequency(iEventSource,
-                                      iControlHandle,
-                                      aFreq * HERTZ_MULTIPLIER);
-
-        NativeError.check(freqInUse);
-
-        return freqInUse / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * Gets the frequency which the tuner has been tuned to.
-     *
-     * @return The frequency to which the device has been tuned, in 100 Hertzs.
-     */
-    public int getFrequency()
-    {
-        int freq = _getFrequency(iEventSource, iControlHandle);
-
-        NativeError.check(freq);
-
-        return freq / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * <p>Seeks for the next broadcast signal. If the end of the Player's
-     * frequency band is reached before a signal was found, the scan
-     * continues from the other end until a signal is found or the
-     * starting frequency is reached.</p>
-     *
-     * <p>After seeking, the frequency of the Player is the one that
-     * was returned or if nothing was found, the original frequency.</p>
-     *
-     * @param startFreq the frequency in 100 Hertzs wherefrom the scan starts (inclusive)
-     *
-     * @param modulation The modulation to be used. <code>TunerControl</code> specifies
-     * predefined constants <code>MODULATION_FM</code> and <code>MODULATION_AM</code>
-     * but other modulations can be supported as well. Supported modulations can be queried
-     * by <code>System</code> property <code>tuner.modulations</code>.
-     * @param upwards if <code>true</code>, the scan proceeds towards higher frequencies,
-     * otherwise towards lower frequencies
-     *
-     * @return The found frequency in 100 Hertzs or, if no signal was found, 0.
-     *
-     * @throws IllegalArgumentException if <code>startFreq</code> is not between the supported minimum
-     * and maximum frequencies or if the <code>modulation</code> is null.
-     * @throws MediaException if the seek functionality is not available for the given modulation.
-     */
-    public int seek(int aStartFreq, String aModulation, boolean aUpwards)
-    throws MediaException
-    {
-        if (aModulation != MODULATION_FM)
-        {
-            throw new IllegalArgumentException("Modulation is not valid.");
-        }
-
-        int foundFreq = _seek(iEventSource,
-                              iControlHandle,
-                              aStartFreq * HERTZ_MULTIPLIER,
-                              aUpwards);
-
-        NativeError.check(foundFreq);
-
-        return foundFreq / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * Gets the current squelching (muting in frequencies without broadcast)
-     * setting.
-     *
-     * @return <code>true</code> if squelch is on or <code>false</code> if squelch is off.
-     */
-    public boolean getSquelch()
-    {
-        int retValue = _getSquelch(iEventSource, iControlHandle);
-
-        NativeError.check(retValue);
-
-        if (retValue == NativeError.KErrNone)
-        {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Sets squelching on or off. Squelching means muting the frequencies
-     * that do not contain radio broadcast.
-     *
-     * @param squelch <code>true</code> to turn the squelch on or <code>false</code> to turn the squelch off.
-     * @throws MediaException if the given squelch setting is not supported.
-     */
-    public void setSquelch(boolean aSquelch) throws MediaException
-    {
-        int err = _setSquelch(iEventSource, iControlHandle, aSquelch);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Gets the modulation in use.
-     *
-     * @return The modulation currently in use.
-     */
-    public String getModulation()
-    {
-        //only FM modulation is supported
-        return MODULATION_FM;
-    }
-
-    /**
-     * Gets the strength of the recepted signal.
-     *
-     * @return A value between 0 and 100 where 0 means the faintest and 100 the strongest possible signal strength.
-     * @throws MediaException if querying the signal strength is not supported.
-     */
-    public int getSignalStrength() throws MediaException
-    {
-        int signalStrength = _getSignalStrength(iEventSource,
-                                                iControlHandle);
-
-        if (signalStrength != NativeError.KErrNone)
-        {
-            throw new MediaException("Signal strength is not supported.");
-        }
-
-        return signalStrength;
-    }
-
-    /**
-     * Gets the stereo mode in use.
-     *
-     * @return The stereo mode in use. Stereo mode is one of <code>MONO</code>,
-     * <code>STEREO</code> or <code>AUTO</code>.
-     */
-    public int getStereoMode()
-    {
-        int stereoMode = _getStereoMode(iEventSource, iControlHandle);
-
-        NativeError.check(stereoMode);
-
-        return stereoMode;
-    }
-
-    /**
-     * Sets the stereo mode.
-     *
-     * @param mode The stereo mode to be used. Stereo mode is one of <code>MONO</code>,
-     * <code>STEREO</code> or <code>AUTO</code>.
-     * @throws IllegalArgumentException if the given mode is not supported.
-     */
-    public void setStereoMode(int aStereoMode)
-    {
-        if (aStereoMode != MONO && aStereoMode != STEREO && aStereoMode != AUTO)
-        {
-            throw new IllegalArgumentException();
-        }
-
-        int err = _setStereoMode(iEventSource, iControlHandle, aStereoMode);
-
-        if (err != NativeError.KErrNone)
-        {
-            throw new IllegalArgumentException("Stereo mode is not supported.");
-        }
-    }
-
-    /**
-     * Gets the number of presets. The numbering of presets starts from one and the largest
-     * preset number equals the value returned from this method.
-     *
-     * @return The number of presets, or zero if the presets are not supported.
-     */
-    public int getNumberOfPresets()
-    {
-
-        return 0;
-    }
-
-    /**
-     * Tunes the tuner by using settings specified in the preset. Changes to
-     * presets following a <code>usePreset</code> call do not tune the tuner automatically.
-     *
-     * @param preset the preset to be used.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets.
-     */
-    public void usePreset(int aPreset)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-        int err = _usePreset(iEventSource, iControlHandle, aPreset);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Configures the preset using current frequency and modulation
-     * (and stereo mode if native presets support storing it).
-     *
-     * @param preset the preset to be set.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of preset range.
-     * @throws SecurityException if setting presets has been prohibited.
-     */
-    public void setPreset(int aPreset)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-        int err = _setPreset(iEventSource, iControlHandle, aPreset);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Configures the preset using given settings.
-     * The stereo mode might not be stored if it is not supported by the presets.
-     * (In that case, <code>IllegalArgumentException</code> is not thrown.)
-     *
-     * @param preset the preset to be configured.
-     * @param freq the frequency of the preset in 100 Hertzs.
-     * @param mod the modulation of the preset.
-     * @param stereoMode the stereo mode of the preset.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets or
-     * <code>freq</code> or <code>modulation</code> are not available or if the <code>modulation</code> is null or if <code>stereoMode</code> is not a supported stereo mode.
-     * @throws SecurityException if setting presets has been prohibited.
-     */
-    public void setPreset(int aPreset, int aFreq, String aModulation, int aStereoMode)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-        if (aModulation != MODULATION_FM)
-        {
-            throw new IllegalArgumentException("Modulation is not valid.");
-        }
-        if (aStereoMode != MONO && aStereoMode != STEREO && aStereoMode != AUTO)
-        {
-            throw new IllegalArgumentException("Stereo mode is not supported.");
-        }
-
-        int err = _setPreset(iEventSource, iControlHandle, aPreset, aFreq * HERTZ_MULTIPLIER, aStereoMode);
-
-        NativeError.check(err);
-    }
-
-    /**
-     * Gets the preset's frequency.
-     *
-     * @param preset the preset whose frequency is to be returned.
-     * @return The frequency of the preset in 100 Hertzs.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets.
-     */
-    public int getPresetFrequency(int aPreset)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-
-        int presetFreq = _getPresetFrequency(iEventSource, iControlHandle, aPreset);
-
-        NativeError.check(presetFreq);
-
-        return presetFreq / HERTZ_MULTIPLIER;
-    }
-
-    /**
-     * Gets the preset's modulation.
-     *
-     * @param preset the preset whose modulation is to be returned.
-     * @return The modulation of the preset.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets.
-     */
-    public String getPresetModulation(int aPreset)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-        return MODULATION_FM;
-    }
-
-    /**
-     * Gets the preset's stereo mode.
-     *
-     * @param preset the preset whose stereo mode is to be returned.
-     * @return The stereo mode of the preset. Stereo mode is one of
-     * <code>MONO</code>, <code>STEREO</code> or <code>AUTO</code>.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets.
-     * @throws MediaException if the presets do not support storing of the stereo mode.
-     */
-    public int getPresetStereoMode(int aPreset) throws MediaException
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-
-        int presetStereoMode = _getPresetStereoMode(iEventSource, iControlHandle, aPreset);
-
-        NativeError.check(presetStereoMode);
-
-        return presetStereoMode;
-    }
-
-    /**
-     * Gets the preset name.
-     *
-     * @param preset the preset whose name is to be returned.
-     * @return A <code>String</code> containing the preset name.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets.
-     */
-    public String getPresetName(int aPreset)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-
-        int[] error = new int[ 1 ];
-
-        String presetName = _getPresetName(iEventSource, iControlHandle, aPreset, error);
-
-        NativeError.check(error[ 0 ]);
-
-        return presetName;
-    }
-
-    /**
-     * Sets the preset name.
-     *
-     * @param preset the preset whose name is to be set.
-     * @param name the name of the preset.
-     * @throws IllegalArgumentException if <code>preset</code> &lt 1 or <code>preset</code> &gt number of presets or
-     * if the <code>name</code> is null.
-     * @throws SecurityException if setting presets has been prohibited.
-     */
-    public void setPresetName(int aPreset, String aName)
-    {
-        if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
-        {
-            throw new IllegalArgumentException("Preset out of preset range.");
-        }
-        if (aName.length() > MAX_PRESET_NAME_LENGTH)
-        {
-            throw new IllegalArgumentException("Preset name too long");
-        }
-
-        int err = _setPresetName(iEventSource, iControlHandle, aPreset, aName);
-
-        NativeError.check(err);
-    }
-
-
-    private native int _getMinFreq(int aEventSourceHandle,
-                                   int aTunerControlHandle);
-
-    private native int _getMaxFreq(int aEventSourceHandle,
-                                   int aTunerControlHandle);
-
-    private native int _setFrequency(int aEventSourceHandle,
-                                     int aTunerControlHandle,
-                                     int aFreq);
-
-    private native int _getFrequency(int aEventSourceHandle,
-                                     int aTunerControlHandle);
-
-
-    private native int _seek(int aEventSourceHandle,
-                             int aTunerControlHandle,
-                             int aStartFreq,
-                             boolean aUpwards);
-
-    private native int _getSquelch(int aEventSourceHandle,
-                                   int aTunerControlHandle);
-
-    private native int _setSquelch(int aEventSourceHandle,
-                                   int aTunerControlHandle,
-                                   boolean aSquelch);
-
-    private native int _getSignalStrength(int aEventSourceHandle,
-                                          int aTunerControlHandle);
-
-    private native int _getStereoMode(int aEventSourceHandle,
-                                      int aTunerControlHandle);
-
-    private native int _setStereoMode(int aEventSourceHandle,
-                                      int aTunerControlHandle,
-                                      int aStereoMode);
-
-    private native int _usePreset(int aEventSourceHandle,
-                                  int aTunerControlHandle,
-                                  int aPreset);
-
-    private native int _setPreset(int aEventSourceHandle,
-                                  int aTunerControlHandle,
-                                  int aPreset);
-
-    private native int _setPreset(int aEventSourceHandle,
-                                  int aTunerControlHandle,
-                                  int aPreset,
-                                  int aFreq,
-                                  int aStereoMode);
-
-    private native int _getPresetFrequency(int aEventSourceHandle,
-                                           int aTunerControlHandle,
-                                           int aPreset);
-
-    private native int _getPresetStereoMode(int aEventSourceHandle,
-                                            int aTunerControlHandle,
-                                            int aPreset);
-
-    private native int _setPresetName(int aEventSourceHandle,
-                                      int aTunerControlHandle,
-                                      int aPreset,
-                                      String aName);
-
-    private native String _getPresetName(int aEventSourceHandle,
-                                         int aTunerControlHandle,
-                                         int aPreset,
-                                         int[] aError);
-
-
-}
--- a/javauis/amms_qt/src_tuner/javasrc/com/nokia/microedition/media/protocol/capture/radio/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is capture://radio protocol
- *
-*/
-
-package com.nokia.microedition.media.protocol.capture.radio;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlayerImpl;
-import javax.microedition.media.MediaException;
-import com.nokia.mj.impl.rt.legacy.NativeError;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.amms.control.tuner.TunerControlImpl;
-
-/**
- * This class is capture://radio protocol.
- */
-public class Protocol
-        implements com.nokia.microedition.media.protocol.Protocol
-{
-    // Constants
-    private static final String TUNER_CONTROL_NAME =
-        "javax.microedition.amms.control.tuner.TunerControl";
-
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        //   JDEBUG( "AMMS Tuner Protocol createPlayer" );
-
-        String locatorParameters = aLocator.getParameters();
-
-        // Create native tuner player. The native tuner player
-        // creates a native tuner control and adds it to its list.
-        // Handle for the native player are returned.
-        int playerHandle = 0;
-        playerHandle = _createNativeTunerPlayer(
-                           ManagerImpl.getEventSource(),
-                           locatorParameters);
-
-//      JDEBUG( "AMMS Tuner Protocol createPlayer playerHandle = " + playerHandle  );
-
-        NativeError.check(playerHandle);
-
-        PlayerImpl tunerPlayer = new PlayerImpl(playerHandle);
-
-        return tunerPlayer;
-    }
-
-    /**
-     * Creates native tuner player.
-     * Native tuner player creates and adds native tuner control.
-     *
-     * @param aEventSourceHandle Handle to event source.
-     * @param aLocatorParameters
-     * @return Error code.
-     */
-    private native int _createNativeTunerPlayer(int aEventSourceHandle,
-            String aLocatorParameters);
-}
--- a/javauis/amms_qt/src_tuner/native/external_include/fmradioenginecrkeys.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definition of central repository keys for FM Radio Engine.
-*
-*/
-
-
-#ifndef FMRADIOENGINECRKEYS_H
-#define FMRADIOENGINECRKEYS_H
-
-// FM Radio Engine UID
-const TUid KCRUidFMRadioEngine = {0x101F7CBC};
-
-// Radio headset volume
-const TUint32 KRadioHeadsetVolume =  0x00000001;
-
-// Radio speaker volume
-const TUint32 KRadioSpeakerVolume = 0x00000002;
-
-// The last played radio frequency
-const TUint32 KFmRadioFrequency = 0x00000003;
-
-// The last played radio channel
-const TUint32 KFmRadioChannel = 0x00000004;
-
-// The radio mode before radio off
-const TUint32 KFmRadioMode = 0x00000005;
-
-// The first preset channel's location in central repository
-const TUint32 KFmRadioPresetChannel1 = 0x0000000A;
-
-#endif // FMRADIOENGINECRKEYS_H
-
-// End of file
-
-
--- a/javauis/amms_qt/src_tuner/native/external_include/tuner.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2535 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Header file for Tuner component.
-*
-*/
-
-
-#ifndef TUNER_H
-#define TUNER_H
-
-#include <e32base.h>
-#include <MCustomCommand.h>
-#include <mmf/common/mmfbase.h>
-#include <mmf/common/mmfutilities.h>
-#include <mmf/common/mmfcontrollerframework.h>
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include <mmf/common/mmfaudio.h>
-#include <Mda/Common/audio.h>
-class RRadioSession;
-
-/**
-@file
-@publishedAll
-@prototype
-*/
-/**
-The Tuner Capabilities structure defines the capabilities of the tuner
-on the device, as retrieved using the function GetCapabilities.
-*/
-class TTunerCapabilities
-{
-public:
-    inline TTunerCapabilities();
-    inline TTunerCapabilities(TUint32 aTunerBands, TUint32 aAdditionalFunctions);
-public:
-    /**
-    Bitfield (as defined by CMMTunerUtility::TTunerBand) with the bits of the
-    supported bands set
-    */
-    TUint32 iTunerBands;
-
-    /** Tuner Function bit flags - may be extended in future */
-    enum TTunerFunctions
-    {
-        /** Recording of Tuner Audio is possible */
-        ETunerFunctionRecording                 = 0x01,
-        /** Tuner can record and play back simultaneously */
-        ETunerFunctionSimultaneousPlayAndRecord = 0x02,
-        /** The tuner requires an external antenna (e.g. a headset) to function */
-        ETunerFunctionRequiresAntenna           = 0x04,
-        /** CMMRdsTunerUtility supported */
-        ETunerFunctionRds                       = 0x08,
-        /** The tuner can be used when the device is in flight mode */
-        ETunerFunctionAvailableInFlightMode     = 0x10
-    };
-
-    /** Bitfield (as defined by ETunerFunctions) with the bits of the supported functions set */
-    TUint32 iAdditionalFunctions;
-};
-
-/**
-Class representing a frequency.
-*/
-class TFrequency
-{
-public:
-    inline TFrequency();
-    explicit inline TFrequency(TInt aFrequency);
-    inline TInt operator==(const TFrequency& aFrequency) const;
-    inline TInt operator!=(const TFrequency& aFrequency) const;
-    inline TInt operator> (const TFrequency& aFrequency) const;
-    inline TInt operator>=(const TFrequency& aFrequency) const;
-    inline TInt operator< (const TFrequency& aFrequency) const;
-    inline TInt operator<=(const TFrequency& aFrequency) const;
-public:
-    /**
-    The Frequency, in Hertz. A TInt is at least 32 bits, giving a maximum frequency
-    of at least 2.4GHz (i.e. 0x7fffffff Hz)
-    */
-    TInt iFrequency;
-};
-
-
-class MMMTunerObserver;
-class MMMTunerChangeObserver;
-class MMMTunerStereoObserver;
-class MMMSignalStrengthObserver;
-class MMMTunerAudioPlayerObserver;
-class MMMTunerAudioRecorderObserver;
-class CMMTunerAudioPlayerUtility;
-class CMMTunerAudioRecorderUtility;
-class CMMTunerScannerUtility;
-class CMMRdsTunerUtility;
-
-/**
-The MMF Tuner API is present to allow clients to control
-the tuner hardware present on a device.
-*/
-class CMMTunerUtility : public CBase
-{
-    friend class CMMTunerAudioPlayerUtility;
-    friend class CMMTunerAudioRecorderUtility;
-    friend class CMMTunerScannerUtility;
-    friend class CMMRdsTunerUtility;
-public:
-    /** Tuner Band bit flags - may be extended in future */
-    enum TTunerBand
-    {
-        ETunerNoBand            = 0x00,
-        /** Long Wave - uses frequencies */
-        ETunerBandLw            = 0x01,
-        /** Amplitude Modulation or Medium Wave - uses frequencies */
-        ETunerBandAm            = 0x02,
-        /** Frequency Modulation, European and American band - uses frequencies */
-        ETunerBandFm            = 0x04,
-        /** Frequency Modulation, Japanese band - uses frequencies */
-        ETunerBandJapaneseFm    = 0x08,
-        /** Digital Audio Broadcasting - uses channels */
-        ETunerBandDab           = 0x10,
-        /** Digital Video Broadcasting */
-        ETunerBandDvb           = 0x20
-    };
-    /**
-    Search direction enumeration
-    */
-    enum TSearchDirection
-    {
-        /** Search for stations upwards - i.e. by increasing frequency */
-        ESearchDirectionUp = 1,
-        /** Search for stations downwards - i.e. by decreasing frequency */
-        ESearchDirectionDown
-    };
-    /**
-    The Tuner Access Priority enables clients to correctly identify their needs
-    when it comes to accessing the tuner. A process must have the MultimediaDD
-    capability to use priorities greater than ETunerAccessPriorityNormal.
-    */
-    enum TTunerAccessPriority
-    {
-        /** Radio accessible when device is idle */
-        ETunerAccessPriorityBackground      = -100,
-        /** Ordinary application priority */
-        ETunerAccessPriorityNormal          = 0,
-        /** Radio is to be used as an alarm sound */
-        ETunerAccessPriorityAlarm           = 75,
-        /** System use only */
-        ETunerAccessPrioritySystem          = 100
-    };
-    /**
-    Bitmasks to indicate what state the tuner is in.
-    */
-    enum TTunerState
-    {
-        /**
-        Tuner is active, and can therefore report frequency etc. If this bit is
-        not set, none of the others should be set.
-        */
-        ETunerStateActive       = 0x01,
-        /** The tuner is playing sound. */
-        ETunerStatePlaying      = 0x02,
-        /** The tuner is currently recording. */
-        ETunerStateRecording    = 0x04,
-        /** The tuner is currently retuning or searching for a new station. */
-        ETunerStateRetuning     = 0x08,
-    };
-public:
-
-    /**
-    Factory function to create a new instance of the Tuner. Tuner access priority
-    setting is required to ensure that applications such as alarms using the radio
-    as an alarm sound are not prevented from doing so by other clients. Priority
-    setting is needed for audio output when accessing the sound device. Tuner is
-    ready for use on return from this function.
-
-    @param aObserver The observer object for receiving async completion callbacks
-    @param aTunerIndex An index from 0 to TunersAvailable() - 1 specifying the tuner
-            device to use.
-    @param aAccessPriority Tuner access priority value
-    @leave KErrNoMemory Out of memory
-    @leave KErrNotFound The specified tuner or tuner controller is not present
-    @return A pointer and ownership of the fully constructed CMMTunerUtility object
-    */
-    IMPORT_C static CMMTunerUtility* NewL(MMMTunerObserver& aObserver,
-                                          TTunerBand aBand,
-                                          TInt aTunerIndex,
-                                          CMMTunerUtility::TTunerAccessPriority aAccessPriority = ETunerAccessPriorityNormal);
-
-    IMPORT_C virtual ~CMMTunerUtility();
-
-
-
-    /**
-    Set the current tuner access priority of this client. This priority is used to
-    arbitrate between multiple tuner clients, determining who get control of the
-    tuner.
-
-    The platform security capability is MultimediaDD and a client with this capability
-    is allowed to set the priority in preference to a client with a lower capability.
-
-    @param aAccessPriority The new priority to use.
-    @capability MultimediaDD
-    @return A standard system error code.
-    */
-    IMPORT_C TInt SetPriority(TTunerAccessPriority aAccessPriority);
-
-    /**
-    Get the current tuner access priority of this client.
-
-    @param aAccessPriority A variable to which the current priority will be written.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetPriority(TTunerAccessPriority& aAccessPriority) const;
-
-
-    /**
-    Get the current state of the tuner.
-
-    @param aState A variable to set with the current state. Bits set according to
-           TTunerState.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetState(TUint32& aState) const;
-
-    /**
-    Indicates if the external antenna is currently attached or not. The tuner
-    capabilties should be queried to determine if the external antenna is required
-    to use the tuner or not; A value of false returned here does not necessarily
-    imply that the tuner cannot be used.
-
-    @param aAttached When this function returns, this will contain ETrue if and only
-           if an external antenna is attached.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt IsAntennaAttached(TBool& aAttached);
-
-    /**
-    Indicates if the device is currently in 'flight mode' or not. The tuner
-    capabilities should be queried to determine in the tuner can be used  in flight
-    mode or not.
-
-    @param aFlightMode On return, this will have been set to ETrue if and only if
-            the device is in flight mode.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetFlightMode(TBool& aFlightMode) const;
-
-    /**
-    Tune the tuner to the required frequency specified in Hertz. This is an asynchronous
-    command and will result in a callback to MToTuneComplete or MToTunerError.
-
-    If the session does not currently have control of the tuner, a request for control
-    will be made. If control of the tuner is granted, a callback to MToTunerControlGranted
-    will occur. If not, there will be a callback to MtoTunerError with error value
-    KErrAccessDenied.
-
-    Once control of the tuner has been granted, it will be retained until either a
-    call to ReleaseTunerControl, or the session is preempted in which case there
-    will be a callback to MToTunerError with error value KErrAccessDenied.
-
-    @param aFrequency The frequency to tune to
-    @param aBand The band to which aFrequency belongs
-    */
-    IMPORT_C void Tune(TFrequency aFrequency);
-
-    /**
-    Find a radio station, starting at the start frequency and searching in the
-    direction specified (i.e. Up or down) the search is limited to the specified
-    band.  If the session does not currently have control of the tuner, a request
-    for control will be made. If control of the tuner is granted, a callback to
-    MToTunerControlGranted will occur. If not, there will be a callback to MToTunerError
-    with error value KErrAccessDenied.
-
-    Once control of the tuner has been granted, it will be retained until either a
-    call to ReleaseTunerControl, or the session is preempted in which case there
-    will be a callback to MToTunerError with error value KErrAccessDenied.
-
-    A callback to MToTuneComplete will occur if the Seek is successful.
-
-    @param aBand The band
-    @param aSearchDirect The direction to search in
-    @param aCircularSeek If set to ETrue the station seek will loop back to the other
-           end of the band once the end of the band has been reached. (Defaults to ETrue)
-           If not set reaching the end of the band without finding a station will result
-           in a callback to MToTuneComplete with error KErrNotFound.
-    */
-    IMPORT_C void StationSeek(TSearchDirection aSearchDirection);
-
-    /**
-    Cancels an ongoing retune operation, as initiated by a call to Tune or StationSeek.
-    The usual callback will not occur if this has been called.
-
-    Has not affect if no tune or seek operation is ongoing.
-    */
-    IMPORT_C void CancelRetune();
-
-    /**
-    Makes a synchronous request for control of the tuner. If this method returns
-    KErrNone, control of the tuner has been granted. Control of the tuner is kept
-    until it is explically released using ReleaseTunerControl, or it is revoked
-    in which case a callback to MToTunerError with an error of KErrAccessDenied
-    will occur.
-
-    If this method returns with KErrAccessDenied, a request to recieve a
-    notifiaction when control could be granted can be made using
-    NotifyTunerControl.
-
-    Note that methods that require control of the tuner (such as Tune) will make
-    a request for control themselves if control has not already been granted.
-
-    @return A standard system error code. If control was granted, KErrNone, and if
-            control was denied KErrAccessDenied.
-    */
-    IMPORT_C TInt RequestTunerControl();
-
-    /**
-    Makes an asyncronous request for control of the tuner. This method should be
-    called after an control of the tuner has been denied to receive a notification
-    when control of the tuner can be granted. A callback to MToTunerControlGranted
-    will occur in this event.
-    */
-    IMPORT_C TInt NotifyTunerControl();
-
-    /**
-    Release control of the tuner, allowing other clients to tune it. Change
-    notifications may still be received. A request for control of the tuner can be
-    made again by calling RequestTunerControl, or any methods that require control
-    of the tuner.
-    */
-    IMPORT_C void ReleaseTunerControl();
-
-    /**
-    Release the tuner. Any ongoing playing or recording activity will be stopped,
-    control of the tuner will be released, and the hardware will be powered down if
-    no other clients need it.
-    */
-    IMPORT_C void Close();
-
-    /**
-    Retrieve the current frequency that the tuner is tuned to
-
-    @param aFrequency The variable to set to the current frequency,
-    -1 if channels are in use
-    @param aBand The variable used to set the current band.
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetFrequency(TFrequency& aFrequency) const;
-
-    /**
-    Retrieve the signal strenth of the currently tuned signal
-
-    @param aSignalStrength Variable into which the signal strength will be written.
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetSignalStrength(TInt& aSignalStrength) const;
-
-    /**
-    Get the maximum possible signal strength of a tuned signal.
-
-    @param aMaxSignalStrength A variable that will have the maximun signal strength
-            written to.
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetMaxSignalStrength(TInt& aMaxSignalStrength) const;
-
-    /**
-    Request notifications when the signal strength changes. Due to the potentially
-    short intervals at which the signal strength may change at, notifications will
-    only be sent when a relatively large change occurrs. This should allow a visual
-    display of signal strength to be maintained fairly accurately.
-
-    The first signal strength notification will be sent immediately after this
-    request.
-
-    @param aObserver The object which will receive notifications of signal strength
-            changes.
-    @return A standard system error code
-    */
-    IMPORT_C TInt NotifySignalStrength(MMMSignalStrengthObserver& aObserver);
-
-    /**
-    Cancel an outstanding NotifySignalStrength request.
-    */
-    IMPORT_C void CancelNotifySignalStrength();
-
-    /**
-    Find out if the current signal is being received in stereo or not.
-
-    @param aStereo On return, will be ETrue if and only if a stereo signal is
-           currently being received.
-    */
-    IMPORT_C TInt IsStereoSignal(TBool& aStereo);
-
-    /**
-    Request notifications when stereo reception is lost/restored.
-
-    @param aObserver The object requiring notification when a stereo signal is lost
-           or restored. The first notification will occur immediately.
-    @return A standard system error code
-    */
-    IMPORT_C TInt NotifyStereoChange(MMMTunerStereoObserver& aObserver);
-
-    /**
-    Cancels a stereo change notification request.
-    */
-    IMPORT_C void CancelNotifyStereoChange();
-
-    /**
-    Indicates whether the reception should be forced into monophonic mode.
-
-    @param aMono If ETrue, all reception will be in mono mode even if a stereo
-           signal is available. If EFalse, a stereo signal will be received when
-           possible.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt ForceMonoReception(TBool aMono);
-
-    /**
-    Find out whether reception is forced into monophonic mode or not.
-
-    @param aMono This will be set to ETrue if all reception is forced to be mono. If
-           this is EFalse, this does not imply that stereo reception is currently
-           available.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetForcedMonoReception(TBool& aMono) const;
-
-    /**
-    Sets the current squleching (muting in frequencies without reception) setting.
-
-    @param aEnabled ETrue to enable squelching, EFalse to disable it.
-    @return KErrNone if successful, else a system wide error code.
-    */
-    IMPORT_C TInt SetSquelch(TBool aEnabled);
-
-    /**
-    Gets the current squleching (muting in frequencies without reception) setting.
-
-    @param aEnabled This will be set to ETrue if squelching is enabled, EFalse otherwise.
-    @return KErrNone if successful, else a system wide error code.
-    */
-    IMPORT_C TInt GetSquelch(TBool& aEnabled) const;
-
-    /**
-    Get the capabilities of the tuner on the device
-
-    @param aCaps The capabilities object to fill
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetCapabilities(TTunerCapabilities& aCaps) const;
-
-    /**
-    Get the frequency range (in Hertz) of the specified band.
-    This function should be used to enquire the frequency range
-    of the bands that GetCapabilities reports as supported.
-
-    @param aBand The band to query
-    @param aBottomFrequency The variable to set to the lowest frequency allowed
-    @param aTopFrequency The variable to set to the highest frequency allowed
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetFrequencyBandRange(TFrequency& aBottomFrequency, TFrequency& aTopFrequency);
-
-    /**
-    Request to be notified when the tuned frequency or channel changes, or when the
-    tuner changes state (e.g. starts playing or recording)
-
-    @param aObserver The object wishing to receive tuning change events
-    @return A standard system error code
-    */
-    IMPORT_C TInt NotifyChange(MMMTunerChangeObserver& aObserver);
-
-    /**
-    Cancel request to be notified when the tuned frequency or channel changes
-    */
-    IMPORT_C void CancelNotifyChange();
-
-    /**
-    Send a synchronous custom command to the tuner.
-
-    @param aFunction The function number to indicate which function is to be called
-        on the interface defined by the first IPC argument
-    @param aArgs The IPC arguments to send to the tuner. The first of these
-        arguments must be the UID of the interface within the tuner to which the
-        command is destined, represented as an integer. Failure to set the first
-        argument properly will result in the command completing with
-        KErrNotSupported at best, but possibly  the client being panicked.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(TInt aFunction, const TIpcArgs& aArgs);
-
-    /**
-    Send an asynchronous custom command to the tuner.
-
-    @param aFunction The function number to indicate which function is to be called
-        on the interface defined by the first IPC argument
-    @param aArgs The IPC arguments to send to the tuner. The first of these
-        arguments must be the UID of the interface within the tuner to which the
-        command is destined, represented as an integer. Failure to set the first
-        argument properly will result in the command completing with
-        KErrNotSupported at best, but possibly  the client being panicked.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-        result of the request on completion.  The exact range of result values is
-        dependent on the interface.
-    */
-    IMPORT_C void CustomCommandAsync(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus);
-
-    /**
-    Get the Tuner Player Utility
-
-    @param aAccessPriority A variable to which the current priority will be written.
-    @return A standard system error code.
-    */
-    IMPORT_C CMMTunerAudioPlayerUtility* TunerPlayerUtilityL(MMMTunerAudioPlayerObserver& aObserver) ;
-    /**
-    Get the Tuner Recorder Utility
-
-    @param aAccessPriority A variable to which the current priority will be written.
-    @return A standard system error code.
-    */
-    IMPORT_C CMMTunerAudioRecorderUtility* TunerRecorderUtilityL(MMMTunerAudioRecorderObserver& aObserver) ;
-
-    /**
-    Get the Tuner Scanner Utility
-
-    @param aAccessPriority A variable to which the current priority will be written.
-    @return A standard system error code.
-    */
-    IMPORT_C CMMTunerScannerUtility* TunerScannerUtilityL() ;
-
-    /**
-    Get the Tuner Rds Utility
-
-    @param aAccessPriority A variable to which the current priority will be written.
-    @return A standard system error code.
-    */
-    IMPORT_C CMMRdsTunerUtility* TunerRdsUtilityL() ;
-
-private:
-    CMMTunerUtility();
-protected:
-    class CBody;
-private:
-    CBody* iBody;
-};
-
-/**
-The Tuner Observer mixin class defines asynchronous
-event completion function callbacks
-*/
-class MMMTunerObserver
-{
-public:
-    /**
-    Tune complete event. This event is asynchronous
-    and is received after a call to the Tune method.
-
-    @param aError A standard system error
-    */
-    virtual void MToTuneComplete(TInt aError) = 0;
-
-};
-
-/**
-The Tuner Change Observer mixin class defines the interface via which
-notification for changes to the tuned frequency, channel and other tuner
-state can be received. A client interested in these notifications
-should call the function CMMTunerUtility::NotifyChange.
-*/
-class MMMTunerChangeObserver
-{
-public:
-    /**
-    Called when the tuned frequency changes
-
-    @param aOldFrequency The frequency in use before the change
-    @param aNewFrequency The new tuned frequency
-    */
-    virtual void MTcoFrequencyChanged(const TFrequency& aOldFrequency, const TFrequency& aNewFrequency) = 0;
-
-    /**
-    Called when the state of the tuner changes.
-
-    @param aOldState The old state. Bits are set according to TTunerState.
-    @param aNewState The new state. Bits are set according to TTunerState.
-    */
-    virtual void MTcoStateChanged(const TUint32& aOldState, const TUint32& aNewState) = 0;
-
-    /**
-    This function is called when an external antenna is detached from the device.
-    This does not necessarily indicate that the tuner can no longer be used; the
-    capabilities of the tuner indicate if the external antenna is required in order
-    to use the tuner.
-    */
-    virtual void MTcoAntennaDetached() = 0;
-
-    /**
-    This function is called when an external antenna is attached to the device. If
-    the antenna is required to use the tuner, this indicates that the tuner can be
-    used again.
-    */
-    virtual void MTcoAntennaAttached() = 0;
-
-    /**
-    This function is called when the device enters or leaves flight mode. If the tuner
-    cannot be used in flight mode when the device enters this mode, this indicates
-    that the tuner can no longer be used; the capabilities of the tuner indicate if
-    it can be used in flight mode or not.
-
-    @param aFlightMode ETrue if the device has just entered flight mode, EFalse if
-            flight mode has just been left.
-    */
-    virtual void FlightModeChanged(TBool aFlightMode) = 0;
-};
-
-/**
-The stereo observer mixin class defines the interface by which clients can be
-notified when a stereo signal is received/lost. An interested client should call
-the function CMMTunerUtility::NotifyStereoChange.
-*/
-class MMMTunerStereoObserver
-{
-public:
-    /**
-    Called when stereo reception is lost/restored.
-
-    @param aStereo If true, indicates that stereo reception has just been restored.
-           If false, indicates that stereo reception has just been lost.
-    */
-    virtual void MTsoStereoReceptionChanged(TBool aStereo) = 0;
-
-    /**
-    Called when a client enables/disabled forced mono reception.
-
-    @param aForcedMono ETrue if reception is forced to be mono, even when a stereo
-           signal is available.
-    */
-    virtual void MTsoForcedMonoChanged(TBool aForcedMono) = 0;
-};
-
-/**
-This mixin class should be derived from by clients wishing to receive
-notifications when the signal strength changes. Such a client should call
-function CMMTunerUtility::NotifySignalStrength.
-*/
-class MMMSignalStrengthObserver
-{
-public:
-    /**
-    Callback indicating that the signal strength has changed by an amount meriting
-    a notification.
-
-    @param aNewSignalStrength The new signal strength.
-    */
-    virtual void MssoSignalStrengthChanged(TInt aNewSignalStrength) = 0;
-};
-
-
-class MMMAudioResourceNotificationCallback;
-
-/**
-The Tuner Audio Player Utility is used to initiate and control playback of audio
-from the tuner.
-*/
-class CMMTunerAudioPlayerUtility : public CBase, public MCustomCommand
-{
-    friend class CMMTunerUtility::CBody;
-public:
-
-    IMPORT_C ~CMMTunerAudioPlayerUtility();
-
-    /**
-    Set-up the API for playing the output from tuner to the speaker asynchronously.
-    Calls MMMTunerAudioPlayerObserver::MTapoInitializeComplete on completion. This must be
-    called before Play.
-
-    @param aPriority Sound device priority value
-    @param aPref Sound device priority preference value
-    */
-    IMPORT_C void InitializeL(TInt aAudioPriority = EMdaPriorityNormal, TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
-    /**
-    Start playback of the tuner output. To stop playback, call Mute, or Stop if
-    play will not need to be restarted. InitializeL() must have already been
-    called, and a callback to MTapoInitializeComplete with an error of KErrNone must
-    have occurred; if this is not the case, this raises a TunerAudioPlay 1 panic.
-    */
-    IMPORT_C void Play();
-
-    /**
-    Mute or unmute playback.
-
-    Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
-    @param aMute ETrue to mute the audio, EFalse to unmute it.
-    @return A standard system error code
-    */
-    IMPORT_C TInt Mute(TBool aMute);
-
-    /**
-    Stop playback, and release the output device for use by other clients
-
-    Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
-    Playback should already be under way.
-    */
-    IMPORT_C void Stop();
-
-    /**
-    Set the current audio priority. This priority is used to arbitrate
-    between multiple audio sources trying to access the audio hardware.
-
-    @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax
-    @param aPref Time vs Quality priority preferences, enumerated in TMdaPriorityPreference
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
-
-    /**
-    Get the current audio priority. This is used to arbitrate between simultaneous
-    accesses to the sound hardware.
-
-    @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax to return
-    @param aPref Time vs Quality priority preferences to return, enumerated in TMdaPriorityPreference
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetPriority(TInt& aPriority, TMdaPriorityPreference& aPref) const;
-
-    /**
-    Set the volume to the specified level
-
-    Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
-    @param aVolume The volume level to set
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetVolume(TInt aVolume);
-
-    /**
-    Return the current volume
-
-    @param aVolume The variable to set to the current volume
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetVolume(TInt& aVolume) const;
-
-    /**
-    Define a volume ramp, aRampInterval defining
-    the interval between valid volume settings
-
-    Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
-    @param aRampInterval The time interval over which the volume
-    should be increased from zero to the current volume setting
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampInterval);
-
-    /**
-    Return the maximum volume supported
-
-    @return The maximum volume setting permitted
-    */
-    IMPORT_C TInt MaxVolume() const;
-
-    /**
-    Set the stereo balance between left and right channels
-
-    Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
-    @param aBalance The balance value to set - must be between
-    KMMFBalanceMaxLeft and KMMFBalanceMaxRight
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetBalance(TInt aBalance = KMMFBalanceCenter);
-
-    /**
-    Return the current stereo balance
-
-    @param aBalance The variable to set to the current balance
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetBalance(TInt& aBalance) const;
-
-    /**
-    Register for audio resource notifications, in the event that the audio resource is lost due to pre-emption
-    by a higher priority audio client.
-    */
-    IMPORT_C TInt RegisterAudioResourceNotification(MMMAudioResourceNotificationCallback& aCallback, TUid aNotificationEventUid, const TDesC8* aNotificationRegistrationData = NULL);
-
-    /**
-    Cancel an outstanding audio resource notification.
-    */
-    IMPORT_C void CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
-
-    /**
-    Returns the controller implementation information associated with the current controller, if any.
-
-    @return The controller implementation structure associated with the controller
-    @leave KErrNotFound if no controller is in use.
-    */
-    IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
-
-    /**
-    Send a synchronous custom command to the playback controller, if ones exists.
-
-    @param aDestination The destination of the message, consisting of the uid of
-            the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-            on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2);
-
-    /**
-    Send a synchronous custom command to the playback controller, if ones exists.
-
-    @param aDestination The destination of the message, consisting of the uid of
-            the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-            on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataFrom The area of memory to which the controller framework
-            will write any data to be passed back to the client. Can't be KNullDesC8.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TDes8& aDataFrom);
-
-    /**
-    Send an asynchronous custom command to the playback controller, if ones exists.
-
-    @param aDestination The destination of the message, consisting of the uid of
-            the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-            on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-            result of the request on completion.  The exact range of result values is
-            dependent on the interface.
-    */
-    IMPORT_C void CustomCommandAsync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TRequestStatus& aStatus);
-
-    /**
-    Send an asynchronous custom command to the playback controller, if ones exists.
-
-    @param aDestination The destination of the message, consisting of the uid of
-            the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-            on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-            framework. The exact contents of the data are dependent on the
-            interface being called. Can be KNullDesC8.
-    @param aDataFrom The area of memory to which the controller framework
-            will write any data to be passed back to the client. Can't be KNullDesC8.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-            result of the request on completion.  The exact range of result values is
-            dependent on the interface.
-    */
-    IMPORT_C void CustomCommandAsync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TDes8& aDataFrom,
-        TRequestStatus& aStatus);
-
-protected:
-    /**
-    Factory function to create a new Tuner Audio Player utility. Note that only one audio player
-    utility may be created per instance of CMMTunerUtility. Multiple instances will result in an
-    error of KErrAlreadyExists when InitializeL() is called.
-
-    @param aTuner The tuner object which this utility will play the audio from.
-    @param aObserver The observer of the player utility to receive asychronous completion and
-            notifiction callbacks.
-    @leave KErrNoMemory Out of memory
-    @leave KErrNotSupported If the given tuner doesn't support audio playback.
-    @return A new tuner audio player utility.
-    */
-    static CMMTunerAudioPlayerUtility* NewL(CMMTunerUtility& aTuner, RRadioSession& aRadioSession, MMMTunerAudioPlayerObserver& aObserver);
-
-private:
-    CMMTunerAudioPlayerUtility();
-private:
-    class CBody;
-    CBody* iBody;
-};
-
-class MMMTunerAudioPlayerObserver
-{
-public:
-    /**
-    The TEvent enumeration is used to indicate which type of event is being sent to the client.
-    Each event will be associated with an error code and potentially some addition information,
-    and will be passed to the client via method MTapoPlayEvent().
-    */
-    enum TEventType
-    {
-        /** An event relating to the tuner itself. Any error other than KErrNone associated
-        with this event type may indicate that the tuner cannot be used anymore.
-
-        No additional information is associated with this type of event. */
-        ETunerEvent,
-        /**
-        An event relating to audio playback.
-
-        No additional information is associated with this type of event.
-        */
-        EAudioEvent
-    };
-public:
-    /**
-    Initialize complete event. This event is asynchronous and is received after
-    a call to CMMTunerAudioPlayerUtility::InitializeL().
-
-    @param aError A standard system error
-    */
-    virtual void MTapoInitializeComplete(TInt aError) = 0;
-
-    /**
-    Passes an asychronous event to the tuner client.
-
-    @param aEvent The type of event. See enumeration MMMTunerAudioPlayerObserver::TEventType
-            for more information about when the event types mean.
-    @param aError An error code associated with the event.
-    @param aAdditionalInfo Any additional information associated with the event, or NULL if
-            no such additional information exists.
-    */
-    virtual void MTapoPlayEvent(TEventType aEvent, TInt aError, TAny* aAdditionalInfo) = 0;
-};
-
-/**
-This class is used to perform recording of audio from the tuner. Many of the methods
-in this class have identical functionality to similarly names functions in class
-CMdaAudioRecorderUtility.
-*/
-class CMMTunerAudioRecorderUtility : public CBase
-{
-    friend class CMMTunerUtility::CBody;
-public:
-
-    IMPORT_C ~CMMTunerAudioRecorderUtility();
-
-    /**
-    Initialize for recording from the tuner to the specified file
-    asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete on completion
-
-    @param aRecordFilename The name of the file to create, if necessary, and record to
-    @param "aDestinationDataType" Data type for recording
-    @param "aControllerUid" The Uid of the controller to use for recording
-    @param "aDestinationFormatUid" Uid of record format
-    @param aPriority Sound device priority value
-    @param aPref Sound device priority preference value
-    */
-    IMPORT_C void InitializeL(const TDesC& aRecordFilename,
-                              TFourCC aDestinationDataType = KFourCCNULL,
-                              TUid aControllerUid=KNullUid,
-                              TUid aDestinationFormatUid=KNullUid,
-                              TInt aAudioPriority = EMdaPriorityNormal,
-                              TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
-    /**
-    Initialize for recording from the tuner to the specified descriptor
-    asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete on completion
-
-    @param aRecordDescriptor The descriptor to record to
-    @param "aDestinationDataType" Data type for recording
-    @param "aControllerUid" The Uid of the controller to use for recording
-    @param "aDestinationFormatUid" Uid of record format
-    @param aPriority Sound device priority value
-    @param aPref Sound device priority preference value
-    */
-    IMPORT_C void InitializeL(TDes8& aRecordDescriptor,
-                              TFourCC aDestinationDataType = KFourCCNULL,
-                              TUid aControllerUid=KNullUid,
-                              TUid aDestinationFormatUid=KNullUid,
-                              TInt aAudioPriority = EMdaPriorityNormal,
-                              TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
-    /**
-    Return a list of the supported data types for the record destination
-    @param "aSupportedDataTypes" list of four character codes, representing supported data
-        encodings for the record destination.
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void GetSupportedDestinationDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
-
-    /**
-    Set the data type of the destination audio clip
-    @param "aDataType" four character code, representing the encoding of the destination audio clip
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void SetDestinationDataTypeL(TFourCC aDataType);
-
-    /**
-    Return the data type of the destination audio clip
-    @returns four character code, representing the encoding of the destination audio clip
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C TFourCC DestinationDataTypeL() const;
-
-    /**
-    Set the bit rate for recording
-    @param "aBitRate" destination bit rate in bits/second
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void SetDestinationBitRateL(TUint aBitRate);
-
-    /**
-    Return the recording bit rate
-    @returns destination bit rate in bits/second
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C TUint DestinationBitRateL() const;
-
-    /**
-    Return a list of the supported bit rates for recording
-    @param "aSupportedBitRates" List of bit rates supported for the record
-           destination
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void GetSupportedBitRatesL(RArray<TUint>& aSupportedBitRates) const;
-
-    /**
-    Set the sample rate for the record destination
-    @param "aSampleRate" The sample rate of the record destination
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void SetDestinationSampleRateL(TUint aSampleRate);
-
-    /**
-    Return the sample rate of the record destination
-    @returns The sample rate of the record destination
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C TUint DestinationSampleRateL() const;
-
-    /**
-    Get a list of supported recording sample rates.
-    @param "aSupportedSampleRates" List of the sample rates that are supported for
-           recording
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void GetSupportedSampleRatesL(RArray<TUint>& aSupportedSampleRates) const;
-
-    /**
-    Set the format of the audio clip. This can only be done if the audio clip does not
-    exist
-
-    @param "aFormatUid" Uid of the audio clip format
-    @leaves KErrAlreadyExists if the clip already exists and the format is different
-     from the existing format, or can leave with one of the system-wide error codes
-    */
-    IMPORT_C void SetDestinationFormatL(TUid aFormatUid);
-
-    /**
-    Return the format of the audio clip
-    @returns Uid of the audio clip format
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C TUid DestinationFormatL() const;
-
-    /**
-    Set the number of channels for the recorded audio clip
-    @param "aNumberOfChannels" The number of channels to record
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void SetDestinationNumberOfChannelsL(TUint aNumberOfChannels);
-
-    /**
-    Return the number of channels in audio clip
-    @returns number of channels supported by audio clip
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C TUint DestinationNumberOfChannelsL() const;
-
-    /**
-    Return a list of the supported number of channels for recording
-    @param "aSupportedNumChannels" List of the number of channels supported for
-            recording
-    @leaves Can leave with one of the system-wide error codes
-    */
-    IMPORT_C void GetSupportedNumberOfChannelsL(RArray<TUint>& aSupportedNumChannels) const;
-
-    /** Start recording of the tuner output */
-    IMPORT_C void RecordL();
-
-    /**
-    Pause recording. Recording can be resumed with another call to Record.
-
-    @return A standard system error code
-    */
-    IMPORT_C TInt PauseRecord();
-
-    /**
-    Stop recording, and release the output device for use by other clients
-
-    Recording should already be under way.
-    */
-    IMPORT_C void Stop();
-
-    /**
-    Stop recording, and release the output device for use by other clients
-
-    Recording should already be under way.
-    */
-    IMPORT_C void Close();
-
-    /**
-    Return the maximum value for the gain
-
-    @return The maximum gain. For devices where automatic gain control is used, this value may be zero.
-    */
-    IMPORT_C TInt MaxGain() const;
-
-    /**
-    Sets the gain for the audio device to a specified value.
-
-    @param aGain The gain setting. This can be any value from zero to the value returned by a call to
-            MaxGain(). A value which is less than zero is set to zero. A value which is greater than
-            MaxGain() is set to MaxGain().
-    */
-    IMPORT_C void SetGain(TInt aGain);
-
-    /**
-    Sets the current recording balance setting between the left and right stereo channels
-
-    The balance can be changed before or during recording and is effective immediately.
-
-    @param aBalance The balance value to set. Any value between KMMFBalanceMaxLeft and
-            KMMFBalanceMaxRight, the default value being KMMFBalanceCenter.
-    @return An error code indicating if the call was successful. KErrNone on success,
-            otherwise another of the system-wide error codes.
-    */
-    IMPORT_C TInt SetRecordBalance(TInt aBalance = KMMFBalanceCenter);
-
-    /**
-    Returns the current recording balance setting between the left and right stereo channels.
-
-    @param aBalance On return, contains the current recording balance between KMMFBalanceMaxLeft
-            and KMMFBalanceMaxRight.
-    @return An error code indicating if the call was successful. KErrNone on success, otherwise
-            another of the system-wide error codes.
-    */
-    IMPORT_C TInt GetRecordBalance(TInt& aBalance) const;
-
-    /**
-    Set the current audio priority. This priority is used to arbitrate
-    between multiple audio sources trying to access the audio hardware.
-
-    @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax
-    @param aPref Time vs Quality priority preferences, enumerated in TMdaPriorityPreference
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
-
-    /**
-    Get the current audio priority. This is used to arbitrate between simultaneous
-    accesses to the sound hardware.
-
-    @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax to return
-    @param aPref Time vs Quality priority preferences to return, enumerated in TMdaPriorityPreference
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetPriority(TInt& aPriority, TMdaPriorityPreference& aPref) const;
-
-    /**
-    Register for audio resource notifications, in the event that the audio resource is lost due to pre-emption
-    by a higher priority audio client.
-    */
-    IMPORT_C TInt RegisterAudioResourceNotification(MMMAudioResourceNotificationCallback& aCallback, TUid aNotificationEventUid, const TDesC8* aNotificationRegistrationData = NULL);
-
-    /**
-    Cancel an outstanding audio resource notification.
-    */
-    IMPORT_C void CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
-
-
-    /**
-    Sets the maximum size for a file that is being recorded.
-
-    When this limit is reached, MMF stops recording and notifies the client application. Notification is caused
-    by MMdaObjectStateChangeObserver::MoscoStateChangeEvent() with the error code KErrEof.
-
-    This function is provided so that applications such as recorders can limit the amount of file storage/memory
-    that should be allocated.
-
-    @param aMaxWriteLength
-           The maximum file size in kilobytes. If the default value is used, there is no maximum file size.
-
-    */
-    IMPORT_C void SetMaxWriteLength(TInt aMaxWriteLength = KMdaClipLocationMaxWriteLengthNone);
-
-    /**
-    Returns the recording time available for the selected file or descriptor and encoding format.
-    */
-    IMPORT_C const TTimeIntervalMicroSeconds& RecordTimeAvailable();
-
-    /**
-    Returns the duration of the audio sample data.
-    */
-    IMPORT_C const TTimeIntervalMicroSeconds& Duration();
-
-    /**
-    Return the controller implementation information structure of the current controller
-
-    @leave KErrNoMemory Out of memory
-    @return A reference to the current controller information
-    */
-    IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
-
-    /*
-    Returns the number of meta data entries associated with this clip.
-    @return Number of metadata entries
-    */
-    IMPORT_C TInt GetNumberOfMetaDataEntries(TInt& aNumEntries);
-
-    /*
-    Returns the specified meta data entry from the current audio clip.
-    @return Metadata entry
-    */
-    IMPORT_C CMMFMetaDataEntry* GetMetaDataEntryL(TInt aMetaDataIndex);
-
-    /*
-    Adds a meta data entry to the audio clip.
-    */
-    IMPORT_C void AddMetaDataEntryL(CMMFMetaDataEntry& aMetaDataEntry);
-
-    /*
-    Removes a specified meta data entry from the audio clip
-    @return An error code indicating if the call was successful
-    */
-    IMPORT_C TInt RemoveMetaDataEntry(TInt aMetaDataIndex);
-
-    /*
-    Replaces the specified meta data entry with a new entry
-    */
-    IMPORT_C void ReplaceMetaDataEntryL(TInt aMetaDataIndex, CMMFMetaDataEntry& aMetaDataEntry);
-
-
-    /**
-    Send a synchronous custom command to the recording controller
-
-    @param aDestination The destination of the message, consisting of the uid of
-    the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-    on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2);
-
-    /**
-    Send a synchronous custom command to the recording controller
-
-    @param aDestination The destination of the message, consisting of the uid of
-    the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-    on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataFrom The area of memory to which the controller framework
-    will write any data to be passed back to the client. Can't be KNullDesC8.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TDes8& aDataFrom);
-
-    /**
-    Send an asynchronous custom command to the recording controller
-
-    @param aDestination The destination of the message, consisting of the uid of
-    the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-    on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-    result of the request on completion.  The exact range of result values is
-    dependent on the interface.
-    @return A standard system error code
-    */
-    IMPORT_C void CustomCommandAsync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TRequestStatus& aStatus);
-
-    /**
-    Send an asynchronous custom command to the recording controller
-
-    @param aDestination The destination of the message, consisting of the uid of
-    the interface of this message
-    @param aFunction The function number to indicate which function is to be called
-    on the interface defined in the aDestination parameter
-    @param aDataTo1 The first chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataTo2 The second chunk of data to be copied to the controller
-    framework. The exact contents of the data are dependent on the
-    interface being called. Can be KNullDesC8.
-    @param aDataFrom The area of memory to which the controller framework
-    will write any data to be passed back to the client. Can't be KNullDesC8.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-    result of the request on completion.  The exact range of result values is
-    dependent on the interface.
-    @return A standard system error code
-    */
-    IMPORT_C void CustomCommandAsync(
-        const TMMFMessageDestinationPckg& aDestination,
-        TInt aFunction,
-        const TDesC8& aDataTo1,
-        const TDesC8& aDataTo2,
-        TDes8& aDataFrom,
-        TRequestStatus& aStatus);
-
-protected:
-    /**
-    Create a new audio recorder utility. Note that only one audio recorder utility may be created
-    per instance of CMMTunerUtility. Multiple instances will result in an error of KErrAlreadyExists
-    when InitializeL() is called.
-    */
-    static CMMTunerAudioRecorderUtility* NewL(CMMTunerUtility& aTuner, MMMTunerAudioRecorderObserver& aObserver);
-
-private:
-    CMMTunerAudioRecorderUtility();
-private:
-    class CBody;
-    CBody* iBody;
-
-};
-
-class MMMTunerAudioRecorderObserver
-{
-public:
-    /**
-    The TEvent enumeration is used to indicate which type of event is being sent to the client.
-    Each event will be associated with an error code and potentially some addition information,
-    and will be passed to the client via method MTaroRecordEvent().
-    */
-    enum TEventType
-    {
-        /** An event relating to the tuner itself. Any error other than KErrNone associated
-        with this event type may indicate that the tuner cannot be used anymore.
-
-        No additional information is associated with this type of event. */
-        ETunerEvent,
-        /**
-        An event relating to audio recording.
-
-        No additional information is associated with this type of event.
-        */
-        EAudioEvent
-    };
-public:
-    /**
-    Initialize complete event. This event is asynchronous and is received after
-    a call to CMMTunerAudioRecorderUtility::InitializeL.
-
-    @param aError A standard system error
-    */
-    virtual void MTaroInitializeComplete(TInt aError) = 0;
-
-    /**
-    Passes an asychronous event to the tuner client.
-
-    @param aEvent The type of event. See enumeration MMMTunerAudioRecorderObserver::TEventType
-            for more information about when the event types mean.
-    @param aError An error code associated with the event.
-    @param aAdditionalInfo Any additional information associated with the event, or NULL if
-            no such additional information exists.
-    */
-    virtual void MTaroRecordEvent(TEventType aEvent, TInt aError, TAny* aAdditionalInfo) = 0;
-};
-
-/**
-This class augments CMMTunerUtility to provide station scanning functionality,
-whereby the frequency spectrum is searched, pausing for a specified amount of
-time when a station is found.
-*/
-class CMMTunerScannerUtility : public CBase
-{
-    friend class CMMTunerUtility::CBody;
-public:
-
-    IMPORT_C ~CMMTunerScannerUtility();
-
-    /**
-    Continuously scan for a radio station, pausing for the time specified before
-    continuing on to the next station. Call StopScan to select the currently tuned
-    station. The search is limited to the specified band.
-
-    @note The control of a CMMTunerUtility object must have been passed to this
-          class (using TransferTunerControl) before this function is called.
-
-    @param aBand The band to which aStartFrequency belongs
-    @param aSearchDirect The direction to search in
-    @param aPauseDuration Time to pause at each station
-    @param aCircularScan If set to ETrue the station scan will loop back to the other
-           end of the band once the end of the band has been reached. (Defaults to ETrue)
-    */
-    IMPORT_C void StationScan(CMMTunerUtility::TSearchDirection aSearchDirection,
-                              TTimeIntervalMicroSeconds32 aPauseDuration
-                             );
-
-    /**
-    Stop scanning and use the currently tuned station
-
-    @return ETrue if a station is tuned, EFalse otherwise
-    */
-    IMPORT_C TBool StopScan();
-
-protected:
-    /**
-    Factory function to create a new CMMTunerScannerUtility.
-
-    @param aTuner The tuner with which to perform the scanning.
-    @leave KErrNoMemory Out of memory.
-    @return A newly contructed tuner scanner utility.
-    */
-    static CMMTunerScannerUtility* NewL(CMMTunerUtility& aTuner,CMMTunerUtility::TTunerBand aBand);
-
-private:
-    CMMTunerScannerUtility();
-private:
-    class CBody;
-    CBody* iBody;
-
-};
-
-
-/** Programme Station name, 8 characters */
-typedef TBuf<8> TRdsStationName;
-/** Programme Type Name, 8 characters */
-typedef TBuf<8> TRdsProgrammeTypeName;
-/** RDS Programme Identifier, a unique ID for each radio station */
-typedef TInt TRdsProgrammeIdentifier;
-
-/**
-Programme Item Number - identifies the start time of the current programme,
-as published by the broadcaster.
-*/
-class TRdsProgrammeItemNumber
-{
-public:
-    /** The day of the month of the broadcast, in the range 1-31 */
-    TInt iDayOfMonth;
-    /** The hour of the day, in the range 0-23 */
-    TInt iHour;
-    /** The minute past the hour, in the range 0-59 */
-    TInt iMinute;
-public:
-    inline TInt operator==(const TRdsProgrammeItemNumber& aPin) const;
-    inline TInt operator!=(const TRdsProgrammeItemNumber& aPin) const;
-};
-
-/**
-An RDS extended country code. The meaning of a value of this type is defined
-by the RDS specification, IEC62106.
-*/
-typedef TInt TRdsCountryCode;
-
-/**
-An RDS language identification code. The meaning of a value of this type is
-defined by the RDS specification, IEC62106.
-*/
-typedef TInt TRdsLanguageIdentifier;
-
-/**
-RDS Programme Type.
-
-The interpretation of values of this type depends on the origin of the RDS
-broadcast: in North America, a slightly different standard, RBDS, is used.
-These PTY codes are defined by static values KRbdsPtyXxxxx, for example
-KRbdsPtySoftRock.
-
-Elsewhere, including Europe, the RDS standard is used. In these areas, the
-PTY codes are defined by static values KRdsPtyXxxxx, for example
-KRdsPtyChildrensProgrammes.
-
-In all other important aspects, the European RDS and North American RBDS
-standards are identical.
-*/
-typedef TInt TRdsProgrammeType;
-
-/** No programme type or undefined */
-const static TRdsProgrammeType KRdsPtyNone = 0;
-/** News */
-const static TRdsProgrammeType KRdsPtyNews = 1;
-/** CurrentAffairs */
-const static TRdsProgrammeType KRdsPtyCurrentAffairs = 2;
-/** Information */
-const static TRdsProgrammeType KRdsPtyInformation = 3;
-/** Sport */
-const static TRdsProgrammeType KRdsPtySport = 4;
-/** Education */
-const static TRdsProgrammeType KRdsPtyEducation = 5;
-/** Drama */
-const static TRdsProgrammeType KRdsPtyDrama = 6;
-/** Culture */
-const static TRdsProgrammeType KRdsPtyCulture = 7;
-/** Science */
-const static TRdsProgrammeType KRdsPtyScience = 8;
-/** VariedSpeech */
-const static TRdsProgrammeType KRdsPtyVariedSpeech = 9;
-/** PopMusic */
-const static TRdsProgrammeType KRdsPtyPopMusic = 10;
-/** RockMusic */
-const static TRdsProgrammeType KRdsPtyRockMusic = 11;
-/** EasyListening */
-const static TRdsProgrammeType KRdsPtyEasyListening = 12;
-/** LightClassical */
-const static TRdsProgrammeType KRdsPtyLightClassical = 13;
-/** SeriousClassics */
-const static TRdsProgrammeType KRdsPtySeriousClassical = 14;
-/** OtherMusic */
-const static TRdsProgrammeType KRdsPtyOtherMusic = 15;
-/** Weather */
-const static TRdsProgrammeType KRdsPtyWeather = 16;
-/** Finance */
-const static TRdsProgrammeType KRdsPtyFinance = 17;
-/** ChildrensProgrammes */
-const static TRdsProgrammeType KRdsPtyChildrensProgrammes = 18;
-/** SocialAffairs */
-const static TRdsProgrammeType KRdsPtySocialAffairs = 19;
-/** Religion */
-const static TRdsProgrammeType KRdsPtyReligion = 20;
-/** PhoneIn */
-const static TRdsProgrammeType KRdsPtyPhoneIn = 21;
-/** Travel */
-const static TRdsProgrammeType KRdsPtyTravel = 22;
-/** Leisure */
-const static TRdsProgrammeType KRdsPtyLeisure = 23;
-/** JazzMusic */
-const static TRdsProgrammeType KRdsPtyJazzMusic = 24;
-/** CountryMusic */
-const static TRdsProgrammeType KRdsPtyCountryMusic = 25;
-/** NationalMusic */
-const static TRdsProgrammeType KRdsPtyNationalMusic = 26;
-/** OldiesMusic */
-const static TRdsProgrammeType KRdsPtyOldiesMusic = 27;
-/** FolkMusic */
-const static TRdsProgrammeType KRdsPtyFolkMusic = 28;
-/** Documentary */
-const static TRdsProgrammeType KRdsPtyDocumentary = 29;
-/** AlarmTest */
-const static TRdsProgrammeType KRdsPtyAlarmTest = 30;
-/** Alarm */
-const static TRdsProgrammeType KRdsPtyAlarm = 31;
-
-
-/** No programme type or undefined */
-const static TRdsProgrammeType KRbdsPtyNone = 0;
-/** News */
-const static TRdsProgrammeType KRbdsPtyNews = 1;
-/** Informaion */
-const static TRdsProgrammeType KRbdsPtyInformation = 2;
-/** Sports */
-const static TRdsProgrammeType KRbdsPtySports = 3;
-/** Talk */
-const static TRdsProgrammeType KRbdsPtyTalk = 4;
-/** Rock */
-const static TRdsProgrammeType KRbdsPtyRock = 5;
-/** Classic Rock */
-const static TRdsProgrammeType KRbdsPtyClassicRock = 6;
-/** Adult Hits */
-const static TRdsProgrammeType KRbdsPtyAdultHits = 7;
-/** Soft Rock */
-const static TRdsProgrammeType KRbdsPtySoftRock = 8;
-/** Top 40 */
-const static TRdsProgrammeType KRbdsPtyTop40 = 9;
-/** Country */
-const static TRdsProgrammeType KRbdsPtyCountry = 10;
-/** Oldies */
-const static TRdsProgrammeType KRbdsPtyOldies = 11;
-/** Soft */
-const static TRdsProgrammeType KRbdsPtySoft = 12;
-/** Nostalgia */
-const static TRdsProgrammeType KRbdsPtyNostalgia = 13;
-/** Jazz */
-const static TRdsProgrammeType KRbdsPtyJazz = 14;
-/** Classical */
-const static TRdsProgrammeType KRbdsPtyClassical = 15;
-/** Rhythm and Blues */
-const static TRdsProgrammeType KRbdsPtyRhythmAndBlues = 16;
-/** Soft Rhythm and Blues */
-const static TRdsProgrammeType KRbdsPtySoftRhythmAndBlues = 17;
-/** Language */
-const static TRdsProgrammeType KRbdsPtyLanguage = 18;
-/** Religious Music */
-const static TRdsProgrammeType KRbdsPtyReligiousMusic = 19;
-/** Religious Talk */
-const static TRdsProgrammeType KRbdsPtyReligiousTalk = 20;
-/** Personality */
-const static TRdsProgrammeType KRbdsPtyPersonality = 21;
-/** Public */
-const static TRdsProgrammeType KRbdsPtyPublic = 22;
-/** College */
-const static TRdsProgrammeType KRbdsPtyCollege = 23;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned1 = 24;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned2 = 25;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned3 = 26;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned4 = 27;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned5 = 28;
-/** Weather */
-const static TRdsProgrammeType KRbdsPtyWeather = 29;
-/** Emergency Test */
-const static TRdsProgrammeType KRbdsPtyEmergencyTest = 30;
-/** Emergency */
-const static TRdsProgrammeType KRbdsPtyEmergency = 31;
-
-/**
-The RDS Capabilities class defines the capabilities of the RDS tuner on the
-device, as retrieved using the function GetRdsCapabilities.
-*/
-class TRdsCapabilities
-{
-public:
-    /** RDS Function Bit Flags */
-    enum TRdsFunctions
-    {
-        /** Traffic Announcement */
-        ERdsFunctionTa      = 0x01,
-        /** Regional Links */
-        ERdsFunctionRegLink = 0x02,
-        /** News Announcement */
-        ERdsFunctionNa      = 0x04,
-        /** Programme Type */
-        ERdsFunctionPty     = 0x08,
-        /** Clock Time */
-        ERdsFunctionCt      = 0x10,
-        /** Enhanced Other Networks */
-        ERdsFunctionEon     = 0x20,
-        /** Alternative Frequency */
-        ERdsFunctionAf      = 0x40
-    };
-public:
-    /** Bitfield as defined by ERdsFunctions with the bits of the supported functions set */
-    TUint32 iRdsFunctions;
-};
-
-class MMMRdsDataObserver;
-class MMMRdsEonObserver;
-class MMMRdsStateChangeObserver;
-class MMMRdsAnnouncementObserver;
-
-/**
-This class represents the basic RDS data associated with an RDS station.
-*/
-class TRdsData
-{
-public:
-    inline TRdsData();
-public:
-    /**
-    Enumeration to indicate a subset of the members of class TRdsData. These values should
-    be bitwise or'ed together to indicate which members belong in a set.
-    */
-    enum TField
-    {
-        /** Indicates the the member iPi is in a set */
-        EProgrammeIdentifier    = 0x001,
-        /** Indicates the the member iPs is in a set */
-        EStationName            = 0x002,
-        /** Indicates the the member iTp is in a set */
-        ETrafficProgramme       = 0x004,
-        /** Indicates the the member iTa is in a set */
-        ETrafficAnnouncement    = 0x008,
-        /** Indicates the the member iPty is in a set */
-        EProgrammeType          = 0x010,
-        /** Indicates the the member iPtyn is in a set */
-        EProgrammeTypeName      = 0x020,
-        /** Indicates the the member iPin is in a set */
-        EProgrammeItemNumber    = 0x040,
-        /** Indicates the the member iMs is in a set */
-        EMusicSpeech            = 0x080,
-        /** Indicates the the member iBroadcastLanguage is in a set */
-        EBroadcastLanguage      = 0x100,
-        /** Indicates the the member iEcc is in a set */
-        EExtendedCountryCode    = 0x200
-    };
-    /**
-    A value indicating a set containig all RDS data encapsulated by class TRdsData.
-    */
-    const static TUint32 KAllRdsData = (EProgrammeIdentifier | EStationName | ETrafficProgramme | ETrafficAnnouncement
-                                        | EProgrammeType | EProgrammeTypeName | EProgrammeItemNumber | EMusicSpeech
-                                        | EBroadcastLanguage | EExtendedCountryCode);
-public:
-    /** Programme Identifier of the station */
-    TRdsProgrammeIdentifier iPi;
-    /** Programme Station name of the station */
-    TRdsStationName iPs;
-    /** Value of the Traffic Programme flag of the station */
-    TBool iTp;
-    /** Value of the Traffic Announcement flag of the station */
-    TBool iTa;
-    /** Programme Type of the station */
-    TRdsProgrammeType iPty;
-    /** Programme Type Name of the station */
-    TRdsProgrammeTypeName iPtyn;
-    /** Programme Item Number of the station */
-    TRdsProgrammeItemNumber iPin;
-    /** Value of the Music Speech flag of the station. EFalse indicates the speech is being
-    broadcast at present. ETrue indicates that music is being broadcast, or that the flag is
-    not in use by the broadcaster. */
-    TBool iMs;
-    /** The current language of the broadcast */
-    TRdsLanguageIdentifier iBroadcastLanguage;
-    /** The Extended Country Code of the station */
-    TRdsCountryCode iEcc;
-};
-
-/**
-Class representing a station broadcast as an Enhanced Other Networks station.
-*/
-class TEonStation
-{
-public:
-    /**
-    Enumeration to indicate a subset of the members of class TEonStation. These values should
-    be bitwise or'ed together to indicate which members belong in a set.
-    */
-    enum TField
-    {
-        /** Indicates that member iProgrammeIdentifier is valid. */
-        EProgrammeIdentifier= 0x01,
-        /** Indicates that member iStationName is valid. */
-        EStationName        = 0x02,
-        /** Indicates that member iProgrammeType is valid. */
-        EProgrammeType      = 0x04,
-        /** Indicates that member iTrafficProgramme is valid. */
-        ETrafficProgramme   = 0x08,
-        /** Indicates that member iTrafficAnnouncement is valid. */
-        ETrafficAnnouncement= 0x10,
-        /** Indicates that member iProgrammeItemNumber is valid. */
-        EProgrammeItemNumber= 0x20,
-        /** Indicates that member iNoFrequencies is valid. */
-        ENoFrequencies      = 0x40,
-        /** Indicates that member iNoMappedFrequencies is valid. */
-        ENoMappedFrequencies= 0x80
-    };
-public:
-    /** The unique identifier of this station */
-    TRdsProgrammeIdentifier iProgrammeIdentifier;
-    /** The textual name of this station */
-    TRdsStationName iStationName;
-    /** The current programme type (PTY) of this station */
-    TRdsProgrammeType iProgrammeType;
-    /** Indicates if this station broadcasts traffic programmes */
-    TBool iTrafficProgramme;
-    /** Indicates if this station is currently broadcasting a traffic announcement */
-    TBool iTrafficAnnouncement;
-    /** The programme item number (PIN) of the current broadcast on this station. */
-    TRdsProgrammeItemNumber iProgrammeItemNumber;
-    /**
-    The number of frequencies associated with this station. If this number is zero,
-    it may be that the EON station uses the mapped frequencies method instead. See
-    iNoMappedFrequencies.
-    */
-    TInt iNoFrequencies;
-    /**
-    The number of mapped frequencies associated with this station. If this number is
-    zero, it may be that the EON station uses a flat frequency list instead. See
-    iNoFrequencies.
-    */
-    TInt iNoMappedFrequencies;
-    /**
-    Indicates the subset of fields of the class that are valid. Bits are set according to enumeration
-    TEonStation::TField
-    */
-    TUint32 iValid;
-};
-
-/**
-Mapped frequencies can be broadcast as a part of the EON information. They relate the
-current tuning frequency with the frequency which the referred EON station will be
-broadcast on.
-*/
-class TEonMappedFrequency
-{
-public:
-    inline TEonMappedFrequency(TFrequency aTuningFrequency, TFrequency aMappedFrequency);
-public:
-    /** The current tuning frequency, relating to the station broadcasting the EON informarion. */
-    TFrequency iTuningFrequency;
-    /**
-    The mapped frequency. If iTunedFrequency matches the currently tuned frequency, the
-    EON station will be broadcast on this frequency.
-    */
-    TFrequency iMappedFrequency;
-};
-
-/**
-The RDS class augments the tuner API to give access to the RDS capabilities
-of the device. As such additional tuner technologies can be supported without
-changing the Tuner API.
-
-Note that despite this class being names 'RDS', it is capable of supporting both
-the RDS standard, and the North American equivilant RBDS. The only important difference
-from the APIs perspective is the interpretation of the Programme Type (PTY) codes. See
-TRdsProgrammeType for more information.
-*/
-class CMMRdsTunerUtility : public CBase
-{
-    friend class CMMTunerUtility::CBody;
-public:
-    /** RDS Announcement Type */
-    enum TAnnouncementType
-    {
-        /** Traffic announcement */
-        ERdsTrafficAnnouncement,
-        /** News announcement */
-        ERdsNewsAnnouncement
-    };
-public:
-    /**
-    Factory function to create a new instance of the RDS Tuner API
-
-    @param aTuner A RDS capable tuner object (check using CMMTunerUtility::GetCapabilities())
-    @param aObserver The observer of the tuner to receive asynchronous completion messages.
-    @leave KErrNoMemory Out of memory
-    @leave KErrNotFound CMMRdsTunerUtility object is not present
-    @leave KErrNotSupported RDS is not supported by the tuner
-    @return A pointer and ownership of a fully constructed CMMRdsTunerUtility object
-    */
-    IMPORT_C static CMMRdsTunerUtility* NewL(CMMTunerUtility& aTuner, MMMTunerObserver& aObserver, CMMTunerUtility::TTunerBand aBand);
-
-    IMPORT_C ~CMMRdsTunerUtility();
-
-    /**
-    Get the RDS capabilities of the device
-
-    @param aCaps The capabilities object to fill
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetRdsCapabilities(TRdsCapabilities& aCaps) const;
-
-    /**
-    Find a radio station which contains RDS data starting at the start frequency
-    and searching in the direction specified (i.e. Up or down).
-
-    @note this function is subject to the same access control scheme as the Tune
-          methods of CMMTunerUtility
-
-    @param aStartFrequency The frequency to start searching from, or 0 to start at the
-            beginning of the stated band.
-    @param aBand The frequency band to search. This must be a FM band.
-    @param aSearchDirection The direction to search in
-    @param aCircularSeek If set to ETrue the station seek will loop back to the
-           other end of the band once the end of the band has been reached.
-           (Defaults to ETrue) If not set reaching the end of the band without
-           finding a station will result in a callback to MToTuneComplete with error
-           KErrNotFound.
-    */
-    IMPORT_C void StationSearchByRds(TFrequency     aStartFrequency,
-                                     CMMTunerUtility::TSearchDirection aSearchDirection
-                                    );
-
-    /**
-    Find a radio station, of the specified programme type starting at the start
-    frequency and searching in the direction specified (i.e. Up or down).
-
-    @note this function is subject to the same access control scheme as the Tune
-          methods of CMMTunerUtility
-
-    @param aProgType The type of programme to search for
-    @param aStartFrequency The frequency to start searching from, or 0 to start at the
-            beginning of the stated band.
-    @param aBand The frequency band to search. This must be a FM band.
-    @param aSearchDirection The direction to search in
-    @param aCircularSeek If set to ETrue the station seek will loop back to the
-           other end of the band once the end of the band has been reached.
-           (Defaults to ETrue) If not set reaching the end of the band without
-           finding a station will result in a callback to MToTuneComplete with error
-           KErrNotFound.
-    */
-    IMPORT_C void StationSearchByProgrammeType(
-        TRdsProgrammeType aProgType,
-        TFrequency aStartFrequency,
-        CMMTunerUtility::TSearchDirection aSearchDirection
-    );
-
-    /**
-    Find a radio station, with the specified programme identifier starting at the
-    start frequency and searching in the direction specified (i.e. Up or down).
-
-    @note this function is subject to the same access control scheme as the Tune
-          methods of CMMTunerUtility
-
-    @param aPi The programme identifier of the station to search for
-    @param aStartFrequency The frequency to start searching from, or 0 to start at the
-            beginning of the stated band.
-    @param aBand The frequency band to search. This must be a FM band.
-    @param aSearchDirection The direction to search in
-    @param aCircularSeek If set to ETrue the station seek will loop back to the other
-           end of the band once the end of the band has been reached. (Defaults to ETrue)
-           If not set reaching the end of the band without finding a station will result
-           in a callback to MToTuneComplete with error KErrNotFound.
-    */
-    IMPORT_C void StationSearchByProgrammeIdentifier(
-        TRdsProgrammeIdentifier             aPi,
-        TFrequency                          aStartFrequency,
-        CMMTunerUtility::TSearchDirection   aSearchDirection
-    );
-
-    /**
-    Find a radio station, with the specified traffic programme flag value starting at
-    the start frequency and searching in the direction specified (i.e. Up or down).
-
-    @note this function is subject to the same access control scheme as the Tune
-          methods of CMMTunerUtility
-
-    @param aTp The TP flag value of a station to search for
-    @param aStartFrequency The frequency to start searching from, or 0 to start at the
-            beginning of the stated band.
-    @param aBand The frequency band to search. This must be a FM band.
-    @param aSearchDirection The direction to search in
-    @param aCircularSeek If set to ETrue the station seek will loop back to the other
-           end of the band once the end of the band has been reached. (Defaults to ETrue)
-           If not set reaching the end of the band without finding a station will result
-           in a callback to MToTuneComplete with error KErrNotFound.
-    */
-    IMPORT_C void StationSearchByTrafficProgramme(
-        TBool                              aTp,
-        TFrequency                         aStartFrequency,
-        CMMTunerUtility::TSearchDirection  aSearchDirection
-    );
-
-    /**
-    Cancels an ongoing RDS search as initiated by one of the functions
-    StationSearchByRds, StationSearchByProgrammeType,
-    StationSearchByProgrammeIdentifier or StationSearchByTrafficProgramme. The
-    asynchronous callback will not occur if this is called.
-
-    Has not affect if no RDS search operation is ongoing.
-    */
-    IMPORT_C void CancelRdsSearch();
-
-    /**
-    Requests notifications when all RDS data become invalid due to the tuner being
-    retuned.
-
-    @param aObserver The client to be notified.
-    @param aWhichData The subset of data for which change notifications are required.
-    @return A standard system wide error code.
-    */
-    IMPORT_C TInt NotifyRdsDataChange(MMMRdsDataObserver& aObserver, TUint32 aWhichData = TRdsData::KAllRdsData);
-
-    /**
-    Cancel a NotifyRdsDataChange request.
-    */
-    IMPORT_C void CancelNotifyRdsDataChange();
-
-    /**
-    Request some RDS data. This will complete immediately with whatever RDS data have already been
-    received.
-
-    When this function returns, and data that was requested but is not indicated to be
-    valid can be assumed not to have been received.
-
-    @param aData The RDS data will be written to this variable.
-    @param aValid On return, indicates a subset of RDS data that are valid.
-    @param aWhichData The subset of RDS data that are being requested.
-    @return A standard system wide error code.
-    */
-    IMPORT_C TInt GetRdsData(TRdsData& aData, TUint32& aValid, TUint32 aWhichData = TRdsData::KAllRdsData) const;
-
-    /**
-    Converts an RDS language identifier into a Symbian TLanguage type. Note that not all
-    languages defined by the RDS specification IEC62106 are present in the TLanguage
-    enumeration; in these cases, a value of ELangOther will be returned.
-
-    @param aRdsLangId An RDS language identification code
-    @return The corresponding TLanguage member, or ELangOther if none exists.
-    */
-    IMPORT_C static TLanguage ConvertRdsLanguageId(TRdsLanguageIdentifier aRdsLangId);
-
-    /**
-    Get the length of the available radio text. If no radio text is available this
-    function will return KErrNotFound. The maximum possible length for radio text is 64 characters.
-
-    @param aLength The variable to set to the length of the avaiable radio text
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetRadioTextLength(TUint& aLength) const;
-
-    /**
-    Get the radio text. If no radio text is available, this will return KErrNotFound. In this
-    case, a client can call NotifyRadioText to receive a notification when it is received.
-
-    The radio text will have been converted to unicode, eliminating any control characters
-    within it.
-
-    @param aRadioText The descriptor to fill with the radio text
-    @return A standard system error code
-    */
-    IMPORT_C TInt GetRadioText(TDes& aRadioText) const;
-
-    /**
-    Request notification when the radio text is received or changes.
-
-    @param aObserver The client to be notified when the radio text is received or changes.
-    @return A standard system wide error code.
-    */
-    IMPORT_C TInt NotifyRadioText(MMMRdsDataObserver& aObserver);
-
-    /**
-    Cancel a NotifyRadioText request.
-    */
-    IMPORT_C void CancelNotifyRadioText();
-
-    /**
-    Turns regional link function on or off depending on the value of the parameter.
-    A value of ETrue should be passed if you wish to stay tuned to the currently
-    tuned local station regardless of signal quality and signal strength.
-    i.e. don't switch to another local station in the region.
-
-    @param aRegOn ETrue to turn regional link on, EFalse to turn it off
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetRegionalLink(TBool aRegOn);
-
-    /**
-    Finds out if the regional link function is currently on or off.
-
-    @param aRegOn This will be set to ETrue on return if and only if the regional
-           link function is currently enabled.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetRegionalLink(TBool& aRegOn) const;
-
-    /**
-    Turn the travel announcement function on or off depending on the value of the
-    parameter. A value of ETrue turns on Traffic Announcements, EFalse turns them off.
-
-    If Traffic announcements are disabled while the tuner is retuned to a traffic
-    announcement, the tuner will not revert to the original frequency. To revert to
-    the original frequency, StopAnnouncement() must be called before the traffic
-    announcement feature is disabled.
-
-    @param aTaOn ETrue to turn TA on, EFalse to turn it off
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetTrafficAnnouncement(TBool aTaOn);
-
-    /**
-    Finds out if the traffic announcement function is currently enabled or not.
-
-    @param aTaOn This is set to ETrue on return if and only if the traffic
-           announcement function is currenly enabled.
-    */
-    IMPORT_C TInt GetTrafficAnnouncement(TBool& aTaOn) const;
-
-    /**
-    Set the absolute volume to apply during a traffic or news announcement.
-
-    @param aVolume The volume to use. Must be between 0 and MaxVolume.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt SetAnnouncementVolume(TInt aVolume);
-
-    /**
-    Find the current absolute volume level used for news of traffic annoucements.
-
-    @param aVolume This will be set to the current volume used for annoucements.
-    @return A standard system error code, KErrNotFound if a annoucement volume offset has been set.
-            use.
-    */
-    IMPORT_C TInt GetAnnouncementVolume(TInt& aVolume) const;
-
-    /**
-    Set the offset to the system volume level to apply during a traffic or news announcement
-
-    @param aVolumeOffset The offset to the volume level to set for announcements. Must be between -MaxVolume and MaxVolume inclusive.
-                         the actual volume with the offset applied will be clipped between 0 and MaxVolume if the offset would
-                         otherwise result in a volume outside this range.
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetAnnouncementVolumeOffset(TInt aVolumeOffset);
-
-    /**
-    Find the current offset of the system volume that applies during traffic and news announcements.
-
-    @param aVolumeOffset This will be set to the current traffic and news announcement offset on return.
-    @return A standard system error code, KErrNotFound if an absolute annoucement volume has been set.
-    */
-    IMPORT_C TInt GetAnnouncementVolumeOffset(TInt& aVolumeOffset) const;
-
-    /**
-    Turn the news announcement function on or off depending on the value of the
-    parameter. The news announcement function when enabled causes the radio to
-    retune to a station when that station is broadcasting a news report. When the
-    news announcement is finished the radio will tune back to the original station.
-    A value of ETrue turns on News Announcements, EFalse turns them off.
-
-    If News announcements are disabled while the tuner is retuned to a news
-    announcement, the tuner will not revert to the original frequency. To revert to
-    the original frequency, StopAnnouncement() must be called before the news
-    announcement feature is disabled.
-
-    @param aNaOn ETrue to turn NA on, EFalse to turn it off
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetNewsAnnouncement(TBool aNaOn);
-
-    /**
-    Finds out whether the news announcement function is on or off.
-
-    @param aNaOn This will be set to ETrue if and only if the new announcement
-           function is currently on.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetNewsAnnouncement(TBool& aNaOn) const;
-
-    /**
-    Cancels any current announcement, reverting to the original frequency. The announcement
-    feature will remain enabled. If no announcement is currently happening, this function
-    has no affect. This can be used for both News and Traffic announcements.
-
-    @return A standard system error code. KErrNone if an announcement was successfully
-            stopped, or KErrNotReady if no announcement is currently happening.
-    */
-    IMPORT_C TInt StopAnnouncement();
-
-    /**
-    Turns alternative frequency function on or off depending on the value of the parameter.
-    A value of ETrue should be passed if you wish to enable automatic retuning to the current
-    station on an alternative frequency.
-
-    @param aAfOn ETrue to turn alternative frequency on, EFalse to turn it off
-    @return A standard system error code
-    */
-    IMPORT_C TInt SetAlternativeFrequency(TBool aAfOn);
-
-    /**
-    Finds out whether the alternative frequency function is on or off.
-
-    @param aAfOn This will be set to ETrue if and only if the alternative frequency
-           function is currently on.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt GetAlternativeFrequency(TBool& aAfOn) const;
-
-    /**
-    Requests a notification when RDS functionality is enabled or disabled, or when
-    the traffic announcement volume offset is changed.
-
-    @param aObserver The class which is to be notified of the changes.
-    @return A standard system error code.
-    */
-    IMPORT_C TInt NotifyRdsStateChange(MMMRdsStateChangeObserver& aObserver);
-
-    /**
-    Cancels an outstanding RDS state change notification request.
-    */
-    IMPORT_C void CancelNotifyRdsStateChange();
-
-    /**
-    Get the current RDS time. This is an asynchronous function due to the latency of
-    the RDS information becoming available. This information is broadcast at the start of
-    every minute, and is not cached for obvious reasons. Thus, whenever a request is made,
-    it will complete next time the Data and Time are broadcast. The RDS standard states
-    that this is broadcast within 0.1s of the start of a minute, and is accurate to one
-    minute. The latency of the notification reaching the application cannot be guarteed.
-
-    @param aTimeAndDate The variable to set to the current RDS time and date
-    @param aStatus A TRequestStatus. This will be signalled when the request completes
-    and will contain the result of the request, this will be one of the system error codes.
-    */
-    IMPORT_C void GetRdsTime(TPckg<TDateTime>& aTimeAndDate, TRequestStatus& aStatus) const;
-
-    /**
-    Cancel the GetRdsTime request
-    */
-    IMPORT_C void CancelGetRdsTime();
-
-    /**
-    Request notification when a retune caused by an announcement occurs. This will be
-    a traffic or news announcement. A notification will be provided both at
-    the start of the announcement and at the end.
-
-    @param aObserver The object wishing to receive announcement events
-    @return A standard system error code
-    */
-    IMPORT_C TInt NotifyAnnouncement(MMMRdsAnnouncementObserver& aObserver);
-
-    /**
-    Cancel the NotifyAnnouncement request
-    */
-    IMPORT_C void CancelNotifyAnnouncement();
-
-    /**
-    Returns a list containing information about other networks broadcast with the currently tuned
-    programmme. This call will return immediately with whatever EON information is currently available.
-    Note that is is possible for this function to return no EON stations when several are being broadcast
-    simply because not enough RDS frames have been received yet. An interested application should make a
-    call to NotifyEonInfo to receive notifications when EON information is received or changes.
-
-    @param aEonInfo An array to which the EON information will be appended.
-    */
-    IMPORT_C void GetEonInfoL(RArray<TEonStation>& aEonInfo) const;
-
-    /**
-    Gets the frequencies assoicated with an EON station. This will complete immediately with whatever
-    frequencies are currently cached. An interested application should make a call to NotifyEonChange
-    to receive notifications when more frequencies are received.
-
-    @param aEonStation the EON station to get the frequencies for
-    @param aFrequencies an array to which the frequencies associated with the given station will be
-            appended.
-    */
-    IMPORT_C void GetEonFrequenciesL(const TEonStation& aEonStation, RArray<TFrequency>& aFrequencies) const;
-
-    /**
-    Gets the mapped frequencies associated with an EON station. This will complete immediately with whatever
-    mapped frequencies are currently cached. An interested application should make a call to NotifyEonChange
-    to receive notifications when more frequencies are received.
-
-    @param aEonStation the EON station to get the mapped frequencies for
-    @param aMappedFrequencies an array to which the mapped frequencies associated with the given station
-            will be appended.
-    */
-    IMPORT_C void GetEonMappedFrequenciesL(const TEonStation& aEonStation, RArray<TEonMappedFrequency>& aMappedFrequencies) const;
-
-    /**
-    Request notification when the Enhanced Other Networks (EON) information changes.
-
-    @param aObserver The client to be notifier when EON information changes or an error occurs.
-    */
-    IMPORT_C TInt NotifyEonInfo(MMMRdsEonObserver& aObserver);
-
-    /**
-    Cancels a NotifyEonInfo request.
-    */
-    IMPORT_C void CancelNotifyEonInfo();
-
-    /**
-    Tunes to a station represented by a TEonStation. This will result to a callback to MtoTuneComplete.
-
-    @param aEonStation The EON station that is to be tuned to.
-    */
-    IMPORT_C void TuneToEonStation(const TEonStation& aEonStation);
-
-    /**
-    Send a synchronous custom command to the RDS tuner.
-
-    @param aFunction The function number to indicate which function is to be called
-        on the interface defined by the first IPC argument
-    @param aArgs The IPC arguments to send to the RDS tuner. The first of these
-        arguments must be the UID of the interface within the tuner to which the
-        command is destined, represented as an integer. Failure to set the first
-        argument properly will result in the command completing with
-        KErrNotSupported at best, but possibly the client being panicked.
-    @return A standard system error code
-    */
-    IMPORT_C TInt CustomCommandSync(TInt aFunction, const TIpcArgs& aArgs);
-
-    /**
-    Send an asynchronous custom command to the RDS tuner.
-
-    @param aFunction The function number to indicate which function is to be called
-        on the interface defined by the first IPC argument
-    @param aArgs The IPC arguments to send to the RDS tuner. The first of these
-        arguments must be the UID of the interface within the tuner to which the
-        command is destined, represented as an integer. Failure to set the first
-        argument properly will result in the command completing with
-        KErrNotSupported at best, but possibly  the client being panicked.
-    @param aStatus The TRequestStatus of an active object. This will contain the
-        result of the request on completion.  The exact range of result values is
-        dependent on the interface.
-    */
-    IMPORT_C void CustomCommandAsync(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus);
-
-private:
-    CMMRdsTunerUtility();
-private:
-    class CBody;
-    CBody* iBody;
-
-};
-
-/**
-This mixin class should be implemented by applications wishing to receive notifications
-when RDS data is received, changes or becomes invalid. Each method corresponds to a
-particular request in CMMRdsTunerUtility. Only methods corresponding to requests in
-CMMRdsTunerUtility that are used by a client need be implemented - empty default
-implementations are provided.
-*/
-class MMMRdsDataObserver
-{
-public:
-    /**
-    Called when some error occurs which makes RDS data unavailable.
-    */
-    virtual void MrdoError(TInt aError)  = 0;
-
-    /**
-    Called when some RDS data is received or has changed.
-
-    Two subsets of the RDS data supplied are indicted: that which has changed and that which is
-    valid. This information can be interpreted as follows:
-    For an item of RDS data x:
-        valid(x)  & !changed(x) => x was received before and has not changed
-        valid(x)  & changed(x)  => x has either just been received for the first time, or has just changed
-        !valid(x) & changed(x)  => x is no longer available
-        !valid(x) & !changed(x) => x was not available before, and is still not available.
-
-    When the tuner is retuned to a new station, all RDS data will be flushed. This will result in
-    a call to this function indicating that all RDS data has changed and is longer valid.
-
-    @param aData The RDS data.
-    @param aValid Indicates a subset of aData that is valid (i.e. has been received)
-    @param aChanged Indicates a subset of aData that has changed since the last call to this function.
-    */
-    virtual void MrdoDataReceived(const TRdsData& aData, TUint32 aValid, TUint32 aChanged) = 0;
-
-    /**
-    Called when the RDS Radio Text (RT) is received, changes, or is no longer available.
-
-    @param aRt The Radio Text message. This will be empty if aValid==EFalse.
-    @param aValid Indicates if the radio text is valid.
-    @param aChanges Indicates if the radio test has changed.
-    */
-    virtual void MrdoRadioTextReceived(const TDesC& aRt, TBool aValid, TBool aChanged) = 0;
-};
-
-/**
-The state change observer mixin class defines the interface via which changes to
-the state of the RDS radio can be observed. These state changes will be a result
-of a client enabling or disabling RDS functionality.
-*/
-class MMMRdsStateChangeObserver
-{
-public:
-    /**
-    Called when the regional link functionality is enabled/disabled.
-
-    @param aNewRegLinkOn The new setting: ETrue if the regional link function has
-           just been enabled.
-    */
-    virtual void MrscoRegionalLinkChanged(TBool aNewRegLinkOn) = 0;
-
-    /**
-    Called when the traffic announcement functionality has just been enabled or
-    disabled.
-
-    @param aNewTaOn ETrue if the TA function is now on, EFalse otherwise.
-    */
-    virtual void MrscoTrafficAnnouncementChanged(TBool aNewTaOn) = 0;
-
-    /**
-    Called when the traffic and news announcement volume offset is changed. A callback to
-    this method indicates the a volume offset is being used instead of an absolute volume.
-
-    @param aOldOffset The announcement volume offset before the change
-    @param aNewOffset The announcement volume offset after the change
-    */
-    virtual void MrscoAnnouncementVolumeOffsetChanged(TInt aOldOffset, TInt aNewOffset) = 0;
-
-    /**
-    Called when the traffic an news announcement volume is changed. A callback to
-    this method indicates that an absolute volume is being used instead of volume offsets.
-
-    @param aOldVolume The announcement volume before the change.
-    @param aNewVolume The announcement volume after the change.
-    */
-    virtual void MrscoAnnouncementVolumeChanged(TInt aOldVolume, TInt aNewVolume) = 0;
-
-    /**
-    Called when the news announcement functionality has just been enabled or
-    disabled.
-
-    @param aNewNAOn ETrue if the NA function is now enabled, else EFalse.
-    */
-    virtual void MrscoNewsAnnouncementChanged(TBool aNewNAOn) = 0;
-
-    /**
-    Called when the alternative frequencies function is turned on or off.
-
-    @param aNewAFOn ETrue if the AF function has just been turned on, else EFalse.
-    */
-    virtual void MrscoAlternativeFrequenciesChanged(TBool aNewAFOn) = 0;
-};
-
-
-/**
-The Announcement Observer mixin class defines the interface via which
-announcement events can be received. A client interested in such
-information calls the function NotifyAnnouncement.
-*/
-class MMMRdsAnnouncementObserver
-{
-public:
-    /**
-    Called when an announcement starts
-
-    @param aType The type of announcement (travel or news)
-    */
-    virtual void MraoAnnouncementStart(CMMRdsTunerUtility::TAnnouncementType aType) = 0;
-
-    /**
-    Called when an announcement ends
-
-    @param aType The type of announcement (travel or news)
-    */
-    virtual void MraoAnnouncementEnd(CMMRdsTunerUtility::TAnnouncementType aType) = 0;
-
-    /**
-    Called when an error occurs which results in announcement notifications
-    becoming unavailable.
-    */
-    virtual void MraoError(TInt aError) = 0;
-};
-
-/**
-The enhanced other networks observer mixin class defines the interface via
-which changes to the enhanced other networks information can be notified. A
-client interested in such information calls the function NotifyEonChange.
-*/
-class MMMRdsEonObserver
-{
-public:
-    /**
-    Called when some details of an EON station change. The station can be referenced
-    to an existing one using it's Programme Identifier, which cannot change.
-
-    @param aStation A TEonStation containing the new information about the station.
-    @param aChanged The subset of the members of aStation that have changed. Bits are
-            set according to TEonStation::TField.
-    */
-    virtual void MreoEonStationChanged(const TEonStation& aStation, TUint32 aChanged) = 0;
-
-    /**
-    Called when details of a new EON station are received.
-
-    @param aStation A TEonStation containing the new information about the station.
-    */
-    virtual void MreoNewEonStation(const TEonStation& aStation) = 0;
-
-    /**
-    Called when details of <b>all</b> EON stations cease to be broadcast. This will
-    typically happen when the tuner is retuned. More EON stations may continue to be
-    recieved: this call does not indicate that EON information is no longer available.
-    */
-    virtual void MreoAllEonStationsRemoved() = 0;
-
-    /**
-    Called when details of an EON station cease to be broadcast.
-
-    @param aPi The programme identifier of the EON station which has been removed.
-    */
-    virtual void MreoEonStationRemoved(const TRdsProgrammeIdentifier& aPi) = 0;
-
-    /**
-    Called when an error occurs resulting in EON notifications not being available.
-    */
-    virtual void MreoError(TInt aError) = 0;
-};
-
-#include <tuner.inl>
-
-#endif // TUNER_H
-
-// End of file
-
--- a/javauis/amms_qt/src_tuner/native/external_include/tuner.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Inline functions for Tuner component.
-*
-*/
-
-
-TTunerCapabilities::TTunerCapabilities()
-        : iTunerBands(0), iAdditionalFunctions(0)
-{}
-
-TTunerCapabilities::TTunerCapabilities(TUint32 aTunerBands, TUint32 aAdditionalFunctions)
-        : iTunerBands(aTunerBands), iAdditionalFunctions(aAdditionalFunctions)
-{}
-
-TFrequency::TFrequency()
-        : iFrequency(0)
-{}
-
-TFrequency::TFrequency(TInt aFrequency)
-        : iFrequency(aFrequency)
-{}
-
-TInt TFrequency::operator==(const TFrequency& aFrequency) const
-{
-    return (iFrequency==aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator!=(const TFrequency& aFrequency) const
-{
-    return (iFrequency!=aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator> (const TFrequency& aFrequency) const
-{
-    return (iFrequency>aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator>=(const TFrequency& aFrequency) const
-{
-    return (iFrequency>=aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator< (const TFrequency& aFrequency) const
-{
-    return (iFrequency<aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator<=(const TFrequency& aFrequency) const
-{
-    return (iFrequency<=aFrequency.iFrequency);
-}
-
-TRdsData::TRdsData()
-{
-}
-
-TEonMappedFrequency::TEonMappedFrequency(TFrequency aTuningFrequency, TFrequency aMappedFrequency)
-        : iTuningFrequency(aTuningFrequency), iMappedFrequency(aMappedFrequency)
-{
-}
-
-TInt TRdsProgrammeItemNumber::operator==(const TRdsProgrammeItemNumber& aPin) const
-{
-    return ((iDayOfMonth==aPin.iDayOfMonth)&&(iHour==aPin.iHour)&&(iMinute==aPin.iMinute));
-}
-
-TInt TRdsProgrammeItemNumber::operator!=(const TRdsProgrammeItemNumber& aPin) const
-{
-    return (!((*this)==aPin));
-}
-
-// End of file
--- a/javauis/amms_qt/src_tuner/native/inc/ammstunerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to create tuner player and control
-*
-*/
-
-
-
-#ifndef AMMSTUNERFACTORY_H
-#define AMMSTUNERFACTORY_H
-
-//  INCLUDES
-#include <e32base.h>
-
-#include "CAMMSTunerControl.h"
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-class CAMMSTunerControl;
-
-// CLASS DECLARATION
-/**
-*  This class is used to create tuner player and control.
-*  It parses locator parameters and set them to control.
-*/
-
-NONSHARABLE_CLASS(AMMSTunerFactory)
-{
-public:  // Constructors and destructor
-
-    /**
-    * Destructor.
-    */
-    virtual ~AMMSTunerFactory();
-
-public: // New functions
-
-    /**
-    * ?member_description.
-    * @param aTunerPlayer
-    * @param aLocatorParams
-    */
-    static void CreatePlayerL(CAMMSTunerPlayer** aTunerPlayer,
-                              const TDesC* aLocatorParams);
-
-protected:  // New functions
-
-    /**
-    * Parse all locator parameters.
-    * @param aLocatorParams
-    * @param aFrequency
-    * @param aStereoMode
-    * @param aPreset
-    */
-    static void ParseParamsL(const TDesC* aLocatorParams,
-                             TInt& aFrequency,
-                             TInt& aStereoMode,
-                             TInt& aPreset);
-
-    /**
-    * Parses frequency parameter
-    * @param aFrequency - locator's frequency parameter
-    * @return frequency in TInt
-    */
-    static TInt ParseFreqL(const TPtrC aFrequency);
-
-    /**
-    * Converts TPtrC to TReal using TLex.
-    * @param aHertz - hertzs in TPtrC
-    * @return hertzs in TReal
-    */
-    static TReal TDesCToTRealL(const TPtrC aHertz);
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    AMMSTunerFactory();
-};
-
-#endif // AMMSTUNERFACTORY_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunercontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Control for tuner
-*
-*/
-
-
-#ifndef CAMMSTUNERCONTROL_H
-#define CAMMSTUNERCONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <tuner.h>
-
-#include <CMMAControl.h>
-
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-class CAMMSTunerPresetsHandler;
-
-// CLASS DECLARATION
-/**
-*  Control for tuner
-*/
-
-NONSHARABLE_CLASS(CAMMSTunerControl) : public CMMAControl,
-        public MMMTunerObserver,
-        public MMMTunerChangeObserver,
-        public MMMTunerStereoObserver
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSTunerControl* NewL();
-
-    /**
-    * Destructor.
-    */
-    virtual ~CAMMSTunerControl();
-
-public: // New functions
-
-    /**
-    * Getter for CMMTunerUtility
-    * @return CMMTunerUtility
-    */
-    CMMTunerUtility* TunerUtility();
-
-    /**
-    * Gets the minimum frequency supported by this tuner
-    * with the given modulation.
-    * @return minimum frequency supported by this tuner
-    */
-    TInt MinFreqL();
-
-    /**
-    * Gets the maximum frequency supported by this tuner
-    * with the given modulation.
-    * @return maximum frequency supported by this tuner
-    */
-    TInt MaxFreqL();
-
-    /**
-    * Tunes to the given frequency or to the closest supported frequency.
-    * @param aFreq - the frequency in Hertzs that will be taken into use
-    * @return the frequency in 100 Hertzs that was taken into use
-
-    */
-    void SetFrequencyL(TInt aFreq);
-
-    /**
-    * Gets the frequency which the tuner has been tuned to.
-    * @return the frequency to which the device has been tuned,
-    *         in 100 Hertzs
-    */
-    TInt FrequencyL();
-
-    /**
-    * Seeks for the next broadcast signal.
-    * @param aStartFreq - the frequency in Hertzs wherefrom the scan starts
-    * @param aUpwards - if true, the scan proceeds towards higher
-    *                   frequencies, otherwise towards lower frequencies
-    * @return the found frequency
-    */
-    TInt SeekL(TInt aStartFreq, TBool aUpwards);
-
-    /**
-    * Gets the current squelching (muting in frequencies without broadcast)
-    * setting.
-    * @return true if squelch is on or false if squelch is off
-    */
-    TBool SquelchL();
-
-    /**
-    * Sets squelching on or off.
-    * @param aSquelch - true to turn the squelch on or false
-    *                   to turn the squelch off
-    */
-    void SetSquelchL(TBool aSquelch);
-
-    /**
-    * Gets the strength of the recepted signal.
-    * @return a value between 0 and 100 where 0 means the faintest
-    *         and 100 the strongest possible signal strength
-    */
-    TInt SignalStrengthL();
-
-    /**
-    * Gets the stereo mode in use.
-    * @return stereo mode in use
-    */
-    TInt StereoModeL();
-
-    /**
-    * Sets the stereo mode.
-    * @param aMode - the stereo mode to be used
-    */
-    void SetStereoModeL(TInt aMode);
-
-    /**
-    * Tunes the tuner by using settings specified in the preset.
-    * @param aPreset - the preset to be used.
-    */
-    void UsePresetL(TInt aPreset);
-
-    /**
-    * Configures the preset using current frequency and modulation
-    * and stereo mode.
-    * @param aPreset - the preset to be set.
-    */
-    void SetPresetL(TInt aPreset);
-
-    /**
-    * Configures the preset using given settings.
-    * @param aPreset - the preset to be set.
-    * @param aFrequency - the frequency to be set.
-    * @param aStereoMode - the stereo mode to be set.
-    */
-    void SetPresetL(TInt aPreset, TInt aFrequency, TInt aStereoMode);
-
-    /**
-    * Gets preset frequency
-    * @param aPreset - the preset whose frequency is to be returned
-    .       * @return the frequency of the preset in 100 Hertzs
-    */
-    TInt PresetFrequencyL(TInt aPreset);
-
-    /**
-    * Gets preset stereo mode
-    * @param aPreset - the preset whose stereo mode is to be returned
-    .       * @return the stereo mode of the preset.
-    */
-    TInt PresetStereoModeL(TInt aPreset);
-
-    /**
-    * Set preset name
-    * @param aPreset - the preset whose name is to be set
-    * @param aPresetName - the name of the preset
-    */
-    void SetPresetNameL(TInt aPreset, const TDesC* aPresetName);
-
-    /**
-    * Get preset name
-    * @param aPreset - the preset whose name is asked
-    * @param aPresetName - the name of the preset
-    */
-    void GetPresetNameL(TInt aPreset, TPtrC* aPresetName);
-
-public: // functions from base classes
-
-    // from CMMAControl
-
-    const TDesC& ClassName() const;
-
-    const TDesC& PublicClassName() const;
-
-    // from MMMTunerObserver
-
-    void MToTuneComplete(TInt aError);
-
-    // from class MMMTunerChangeObserver
-
-    /**
-    Called when the tuned frequency changes
-
-    @param aOldFrequency The frequency in use before the change
-    @param aNewFrequency The new tuned frequency
-    */
-    void MTcoFrequencyChanged(const TFrequency& aOldFrequency,
-                              const TFrequency& aNewFrequency);
-
-    /**
-    Called when the state of the tuner changes.
-
-    @param aOldState The old state. Bits are set according to TTunerState.
-    @param aNewState The new state. Bits are set according to TTunerState.
-    */
-    void MTcoStateChanged(const TUint32& aOldState,
-                          const TUint32& aNewState);
-
-    /**
-    This function is called when an external antenna is detached from the device.
-    This does not necessarily indicate that the tuner can no longer be used; the
-    capabilities of the tuner indicate if the external antenna is required in order
-    to use the tuner.
-    */
-    void MTcoAntennaDetached();
-
-    /**
-    This function is called when an external antenna is attached to the device. If
-    the antenna is required to use the tuner, this indicates that the tuner can be
-    used again.
-    */
-    void MTcoAntennaAttached();
-
-    /**
-    This function is called when the device enters or leaves flight mode. If the tuner
-    cannot be used in flight mode when the device enters this mode, this indicates
-    that the tuner can no longer be used; the capabilities of the tuner indicate if
-    it can be used in flight mode or not.
-
-    @param aFlightMode ETrue if the device has just entered flight mode, EFalse if
-            flight mode has just been left.
-    */
-    void FlightModeChanged(TBool aFlightMode);
-
-    // from class MMMTunerStereoObserver
-
-    /**
-    Called when stereo reception is lost/restored.
-
-    @param aStereo If true, indicates that stereo reception has just been restored.
-           If false, indicates that stereo reception has just been lost.
-    */
-    void MTsoStereoReceptionChanged(TBool aStereo);
-
-    /**
-    Called when a client enables/disabled forced mono reception.
-
-    @param aForcedMono ETrue if reception is forced to be mono, even when a stereo
-           signal is available.
-    */
-    void MTsoForcedMonoChanged(TBool aForcedMono);
-
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CAMMSTunerControl();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-    // Prohibit copy constructor if not deriving from CBase.
-    // CAMMSTunerControl( const CAMMSTunerControl& );
-    // Prohibit assigment operator if not deriving from CBase.
-    // CAMMSTunerControl& operator=( const CAMMSTunerControl& );
-
-
-private:    // Data
-
-    TInt iMinFreq;
-    TInt iMaxFreq;
-
-    CMMTunerUtility*  iTunerUtility;
-    CActiveSchedulerWait* iActiveSchedulerWait;
-    CAMMSTunerPresetsHandler* iPresetsHandler;
-};
-
-#endif // CAMMSTUNERCONTROL_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunerplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef CAMMSTUNERPLAYER_H
-#define CAMMSTUNERPLAYER_H
-
-//  INCLUDES
-#include <CMMAPlayer.h>
-#include "CAMMSTunerControl.h"
-
-#include <e32base.h>
-#include <tuner.h>
-
-
-// CLASS DECLARATION
-
-/**
-*  Player for tuner
-*
-*/
-NONSHARABLE_CLASS(CAMMSTunerPlayer) : public CMMAPlayer,
-        public MMMTunerAudioPlayerObserver
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSTunerPlayer* NewL(CAMMSTunerControl* aTunerControl);
-
-    /**
-    * Destructor.
-    */
-    virtual ~CAMMSTunerPlayer();
-
-public: // from CMMAPlayer
-
-    void PrefetchL();
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void DeallocateL();
-    void GetMediaTime(TInt64* aMediaTime);
-
-public: // from MMMTunerAudioPlayerObserver
-
-    void MTapoInitializeComplete(TInt aError);
-    void MTapoPlayEvent(MMMTunerAudioPlayerObserver::TEventType aEvent, TInt aError, TAny* aAdditionalInfo);
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CAMMSTunerPlayer();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL(CAMMSTunerControl* aTunerControl);
-
-
-    TInt64 CurrentTime();
-
-private:    // Data
-    CMMTunerAudioPlayerUtility* iTunerPlayerUtility;
-    CAMMSTunerControl* iTunerControl;
-    CActiveSchedulerWait* iActiveSchedulerWait;
-
-    TBool  iIsInitialized;
-    TInt64 iMediaTime;
-    TInt64 iStartTime;
-};
-
-#endif // CAMMSTUNERPLAYER_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunerpresetshandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles presets central repository usage.
-*
-*/
-
-
-
-#ifndef CAMMSTUNERPRESETSHANDLER_H
-#define CAMMSTUNERPRESETSHANDLER_H
-
-//  INCLUDES
-#include    <e32base.h>
-#include    <centralrepository.h>
-
-
-// FORWARD DECLARATIONS
-class TAMMSTunerPreset;
-
-// CLASS DECLARATION
-/**
-* This class handles presets central repository usage.
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CAMMSTunerPresetsHandler) : public CBase
-{
-public:  // Constructors and destructor
-
-    /**
-    * Two-phased constructor.
-    */
-    static CAMMSTunerPresetsHandler* NewL();
-
-    /**
-    * Destructor.
-    */
-    virtual ~CAMMSTunerPresetsHandler();
-
-public: // New functions
-
-    /**
-    * Gets presets from central repository
-    * @param aPreset - presets index
-    * @param aTunerPreset
-    */
-    void GetPresetL(TInt aPreset, TAMMSTunerPreset &aTunerPreset);
-
-    /**
-    * Save presets to central repository
-    * @param aPreset - presets index
-    * @param aTunerPreset
-    */
-    void SavePresetL(TInt aPreset, TAMMSTunerPreset aTunerPreset);
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CAMMSTunerPresetsHandler();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-    // Prohibit copy constructor if not deriving from CBase.
-    // CAMMSTunerPresetsHandler( const CAMMSTunerPresetsHandler& );
-    // Prohibit assigment operator if not deriving from CBase.
-    // CAMMSTunerPresetsHandler& operator=( const CAMMSTunerPresetsHandler& );
-
-
-private:    // Data
-
-    CRepository* iCentralRepository;
-
-
-};
-
-#endif // CAMMSTUNERPRESETSHANDLER_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunervolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to tuner player
-*
-*/
-
-
-#ifndef CAMMSTUNERVOLUMECONTROL_H
-#define CAMMSTUNERVOLUMECONTROL_H
-
-//  INCLUDES
-#include <e32base.h>
-
-#include <CMMAVolumeControl.h>
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-
-// CLASS DECLARATION
-/**
-*  This class is used for setting volume to tuner player
-*/
-
-NONSHARABLE_CLASS(CAMMSTunerVolumeControl) : public CMMAVolumeControl
-{
-public:  // Constructor
-    static CAMMSTunerVolumeControl* NewL(CAMMSTunerPlayer* aTunerPlayer);
-
-public: // functions from base classes
-
-    // from CMMAVolumeControl
-
-    void DoSetLevelL(TInt aLevel);
-
-private:
-
-    /**
-    * C++ default constructor.
-    */
-    CAMMSTunerVolumeControl(CAMMSTunerPlayer* aTunerPlayer);
-
-
-private:    // Data
-
-    CAMMSTunerPlayer* iTunerPlayer;
-};
-
-#endif // CAMMSTUNERVOLUMECONTROL_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/tammstunerpreset.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Helper class for preset handling, reads and writes preset
-*                values in/out stream.
-*
-*/
-
-
-
-#ifndef TAMMSTUNERPRESET_H
-#define TAMMSTUNERPRESET_H
-
-//  INCLUDES
-#include <e32base.h>
-
-
-// FORWARD DECLARATIONS
-class RWriteStream;
-class RReadStream;
-
-// CONSTANTS
-const TInt KPresetNameLength = 100;
-
-// CLASS DECLARATION
-/**
-*  Helper class for preset handling, reads and writes preset
-*  values in/out stream.
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS(TAMMSTunerPreset)
-{
-public:
-
-    /**
-    * C++ default constructor.
-    */
-    TAMMSTunerPreset();
-
-    /**
-    * Setter for preset name.
-    */
-    void SetPresetName(const TDesC* aPresetName);
-
-    /**
-    * Setter for preset frequency.
-    */
-    void SetPresetFrequency(const TInt aPresetFrequency);
-
-    /**
-    * Setter for preset stereo mode.
-    */
-    void SetPresetStereoMode(const TInt aPresetStereoMode);
-
-    /**
-    * Getter for preset name.
-    */
-    TPtrC PresetName();
-
-    /**
-    * Getter for preset frequency.
-    */
-    TInt PresetFrequency();
-
-    /**
-    * Getter for preset stereo mode.
-    */
-    TInt PresetStereoMode();
-
-    /**
-    * Serialize the data to stream.
-    * @param aStream - used for write stream
-    */
-    void ExternalizeL(RWriteStream &aStream) const;
-
-    /**
-    * deserialize the data out of stream.
-    * @param aStream  used for read stream
-    */
-    void InternalizeL(RReadStream &aStream);
-
-private:
-
-    TBuf<KPresetNameLength> iPresetName;
-    TInt iPresetFrequency;
-    TInt iPresetStereoMode;
-
-};
-
-#endif // TAMMSTUNERPRESET_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/ammstunerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to create tuner player and control
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "AMMSTunerFactory.h"
-#include    "CAMMSTunerPlayer.h"
-#include    "CAMMSTunerControl.h"
-//#include    "CAMMSTunerVolumeControl.h"
-#include    <CMMAPlayerProperties.h>
-
-#include    <e32std.h>
-#include    <e32math.h>
-#include <logger.h>
-
-// CONSTANTS
-_LIT(KFreqParam, "f");
-
-_LIT(KModulationParam, "mod");
-
-_LIT(KStereoModeParam, "st");
-MMA_PARAMETER_STR(KStereoModeParamMono, "mono");
-MMA_PARAMETER_STR(KStereoModeParamStereo, "stereo");
-MMA_PARAMETER_STR(KStereoModeParamAuto, "auto");
-MMA_PARAMETER_ARRAY(KValidStereoModeValues)
-{
-    {
-        &KStereoModeParamMono
-    }, {&KStereoModeParamStereo}, {&KStereoModeParamAuto}
-};
-
-_LIT(KProgramIdParam, "id");
-_LIT(KPresetParam, "preset");
-
-_LIT(KModulationFm, "fm");
-
-_LIT(KStereoModeMono, "mono");
-_LIT(KStereoModeStereo, "stereo");
-_LIT(KStereoModeAuto, "auto");
-
-const TInt KMegaHertzChar = 'M';
-const TInt KKiloHertzChar = 'k';
-const TInt KFreqDotChar   = '.';
-
-const TInt KMegaHzMultiplier = 1000000;
-const TInt KKiloHzMultiplier = 1000;
-
-const TInt KStereoModeMonoInt   = 1;
-const TInt KStereoModeStereoInt = 2;
-const TInt KStereoModeAutoInt   = 3;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-AMMSTunerFactory::~AMMSTunerFactory()
-{
-
-}
-
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::CreatePlayerL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void AMMSTunerFactory::CreatePlayerL(CAMMSTunerPlayer** aTunerPlayer,
-                                     const TDesC* aLocatorParams)
-{
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL +");
-
-    TInt frequency = 0;
-    TInt stereoMode = 0;
-    TInt preset = 0;
-
-    if (aLocatorParams->Length() != 0)
-    {
-        LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL 1");
-        ParseParamsL(aLocatorParams, frequency, stereoMode, preset);
-    }
-
-    //create tunercontrol
-    CAMMSTunerControl* tunerControl = CAMMSTunerControl::NewL();
-    CleanupStack::PushL(tunerControl);
-
-    //set values to tunercontrol
-    if (frequency > 0)
-    {
-        tunerControl->SetFrequencyL(frequency);
-    }
-
-    if (frequency == 0)
-    {
-        //by default frequency is fm modulation's min freq
-        tunerControl->SetFrequencyL(tunerControl->MinFreqL());
-    }
-
-    if (stereoMode > 0)
-    {
-        tunerControl->SetStereoModeL(stereoMode);
-    }
-
-    if (preset > 0)
-    {
-        tunerControl->UsePresetL(preset);
-    }
-
-    //create tunerplayer
-    *aTunerPlayer = CAMMSTunerPlayer::NewL(tunerControl);
-
-    //create tunervolumeconrol
-    //CAMMSTunerVolumeControl* tunerVolumeControl = CAMMSTunerVolumeControl::NewL( *aTunerPlayer );
-
-    //add controls to player
-    (*aTunerPlayer)->AddControlL(tunerControl);
-    //(*aTunerPlayer)->AddControlL( tunerVolumeControl );
-    CleanupStack::Pop(tunerControl);
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL -");
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::ParseParamsL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void AMMSTunerFactory::ParseParamsL(const TDesC* aLocatorParams,
-                                    TInt& aFrequency,
-                                    TInt& aStereoMode,
-                                    TInt& aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseParamsL +");
-    CMMAParameterRuleSet* rules = CMMAParameterRuleSet::NewLC();
-
-    //freq rule
-    TMMAParameterRuleDes freqRule(KFreqParam);
-    rules->AppendRuleL(&freqRule);
-
-    //modulation rule
-    TMMAParameterRuleDes modulationRule(KModulationParam);
-    rules->AppendRuleL(&modulationRule);
-
-    //stereo mode rule
-    TMMAParameterRuleDes stereoModeRule(KStereoModeParam, KValidStereoModeValues,
-                                        MMA_PARAMETER_ARRAY_SIZE(KValidStereoModeValues));
-    rules->AppendRuleL(&stereoModeRule);
-
-    //preset rule KMinTInt-KMaxTInt
-    TMMAParameterRuleInt presetRule(KPresetParam);
-    rules->AppendRuleL(&presetRule);
-
-    //id rule
-    TMMAParameterRuleDes idRule(KProgramIdParam);
-    rules->AppendRuleL(&idRule);
-
-    CMMAPlayerProperties* properties = CMMAPlayerProperties::NewL(*aLocatorParams, *rules);
-    CleanupStack::PushL(properties);
-
-    // validating properties
-    properties->ValidateL();
-
-    //get freq
-    TPtrC freq(NULL, 0);
-    properties->GetProperty(KFreqParam, freq);
-    //parse frequency
-    if (freq.Length() != 0)
-    {
-        aFrequency = ParseFreqL(freq);
-    }
-
-    //get modulation
-    TPtrC modulation(NULL, 0);
-    properties->GetProperty(KModulationParam, modulation);
-    if (modulation.Length() != 0)
-    {
-        // only fm modulation is supported
-        if (modulation.Compare(KModulationFm) != 0)
-        {
-            User::Leave(KErrNotSupported);
-        }
-    }
-
-    //get stereo mode
-    TPtrC stereoMode(NULL, 0);
-    properties->GetProperty(KStereoModeParam, stereoMode);
-    if (stereoMode.Compare(KStereoModeMono) == 0)
-    {
-        aStereoMode = KStereoModeMonoInt;
-    }
-    else if (stereoMode.Compare(KStereoModeStereo) == 0)
-    {
-        aStereoMode = KStereoModeStereoInt;
-    }
-    else if (stereoMode.Compare(KStereoModeAuto) == 0)
-    {
-        aStereoMode = KStereoModeAutoInt;
-    }
-
-    //get preset
-    properties->GetProperty(KPresetParam, aPreset);
-
-    //get id
-    TPtrC id(NULL, 0);
-    properties->GetProperty(KProgramIdParam, id);
-    if (id.Length() != 0)
-    {
-        // id is not supported
-        User::Leave(KErrNotSupported);
-    }
-
-    CleanupStack::PopAndDestroy(properties);
-    CleanupStack::PopAndDestroy(rules);
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseParamsL -");
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::ParseFreqL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt AMMSTunerFactory::ParseFreqL(const TPtrC aFrequency)
-{
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseFreqL +");
-    TReal freqReal = 0;
-
-    //is value MHz or kHz or just hertz
-    TInt freqPrefixMPos = aFrequency.Locate(KMegaHertzChar);
-    TInt freqPrefixKPos = aFrequency.Locate(KKiloHertzChar);
-
-    if (freqPrefixMPos != KErrNotFound)
-    {
-        //there is a M
-        TPtrC hertz = aFrequency.Left(freqPrefixMPos);
-        //TPtrC -> TReal
-        TReal value = TDesCToTRealL(hertz);
-
-        freqReal = value * KMegaHzMultiplier;
-    }
-    else if (freqPrefixKPos != KErrNotFound)
-    {
-        //there is a k
-        TPtrC hertz = aFrequency.Left(freqPrefixKPos);
-        //TPtrC -> TReal
-        TReal value = TDesCToTRealL(hertz);
-
-        freqReal = value * KKiloHzMultiplier;
-    }
-    else
-    {
-        //parameter value is simply hertz, there is no M or k
-        //TPtrC -> TReal
-        freqReal = TDesCToTRealL(aFrequency);
-    }
-    TInt32 freqInt = 0;
-    //TReal -> TInt
-    TInt err = Math::Int(freqInt, freqReal);
-    if (err != KErrNone)
-    {
-        User::Leave(KErrArgument);
-    }
-
-    return freqInt;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::TDesCToTRealL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TReal AMMSTunerFactory::TDesCToTRealL(const TPtrC aHertz)
-{
-    LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::TDesCToTRealL +");
-    TReal valueReal = 0;
-    TLex lex(aHertz);
-    if ((lex.Val(valueReal, KFreqDotChar) != KErrNone) ||
-            !lex.Eos())
-    {
-        User::Leave(KErrArgument);
-    }
-    return valueReal;
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to control tuner
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "CAMMSTunerControl.h"
-#include    "CAMMSTunerPlayer.h"
-#include    "CAMMSTunerPresetsHandler.h"
-#include    "TAMMSTunerPreset.h"
-#include    "AMMSTunerFactory.h"
-
-#include    <tuner.h>
-#include <logger.h>
-
-
-// CONSTANTS
-_LIT(KControlImplName, "com.nokia.amms.control.tuner.TunerControlImpl");
-_LIT(KControlPublicName, "javax.microedition.amms.control.tuner.TunerControl");
-
-const TInt KStereoModeMono   = 1;
-const TInt KStereoModeStereo = 2;
-const TInt KStereoModeAuto   = 3;
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::CAMMSTunerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerControl::CAMMSTunerControl()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerControl* CAMMSTunerControl::NewL()
-{
-    CAMMSTunerControl* self = new(ELeave) CAMMSTunerControl;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerControl::ConstructL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::ConstructL +");
-
-    iTunerUtility = CMMTunerUtility::NewL(*this,
-                                          CMMTunerUtility::ETunerBandFm,
-                                          1,
-                                          CMMTunerUtility::ETunerAccessPriorityNormal);
-
-    iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
-
-    iPresetsHandler = CAMMSTunerPresetsHandler::NewL();
-
-    iMinFreq = MinFreqL();
-    iMaxFreq = MaxFreqL();
-
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::ConstructL -");
-}
-
-
-// Destructor
-CAMMSTunerControl::~CAMMSTunerControl()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::~CAMMSTunerControl +");
-    delete iTunerUtility;
-    delete iActiveSchedulerWait;
-    delete iPresetsHandler;
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::~CAMMSTunerControl -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::TunerUtility()
-// -----------------------------------------------------------------------------
-CMMTunerUtility* CAMMSTunerControl::TunerUtility()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::TunerUtility");
-    return iTunerUtility;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MinFreq()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::MinFreqL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MinFreqL +");
-    TFrequency minFreq;
-    TFrequency maxFreq;
-    User::LeaveIfError(iTunerUtility->GetFrequencyBandRange(minFreq,
-                       maxFreq));
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::MinFreqL = %d", minFreq.iFrequency);
-    return minFreq.iFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MaxFreq()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::MaxFreqL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MaxFreqL +");
-    TFrequency minFreq;
-    TFrequency maxFreq;
-    User::LeaveIfError(iTunerUtility->GetFrequencyBandRange(minFreq,
-                       maxFreq));
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::MaxFreqL = %d", maxFreq.iFrequency);
-    return maxFreq.iFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetFrequency()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetFrequencyL(TInt aFreq)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency +");
-    if (aFreq < iMinFreq || aFreq > iMaxFreq)
-    {
-        User::Leave(KErrArgument);
-    }
-
-    TFrequency freq = TFrequency(aFreq);
-
-    TUint32 state = 0;
-    iTunerUtility->GetState(state);
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency, state = %d", state);
-
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency = %d", freq.iFrequency);
-
-    iTunerUtility->Tune(freq);
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();  // CSI: 10 Active object state already checked. #
-    }
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::Frequency()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::FrequencyL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::Frequency +");
-    TFrequency freq;
-
-    User::LeaveIfError(iTunerUtility->GetFrequency(freq));
-    TInt frequency = freq.iFrequency;
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::Frequency frequency = %d", frequency);
-    return frequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SeekL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::SeekL(TInt aStartFreq, TBool aUpwards)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SeekL +");
-    if (aStartFreq < iMinFreq || aStartFreq > iMaxFreq)
-    {
-        User::Leave(KErrArgument);
-    }
-
-    if (aUpwards)
-    {
-        iTunerUtility->StationSeek(CMMTunerUtility::ESearchDirectionUp);
-        if (!iActiveSchedulerWait->IsStarted())
-        {
-            iActiveSchedulerWait->Start();  // CSI: 10 Active object state already checked. #
-        }
-    }
-    else
-    {
-        iTunerUtility->StationSeek(CMMTunerUtility::ESearchDirectionDown);
-        if (!iActiveSchedulerWait->IsStarted())
-        {
-            iActiveSchedulerWait->Start();  // CSI: 10 Active object state already checked. #
-        }
-    }
-
-    return FrequencyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SquelchL()
-// -----------------------------------------------------------------------------
-TBool CAMMSTunerControl::SquelchL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SquelchL +");
-    TBool enabled = EFalse;
-    User::LeaveIfError(iTunerUtility->GetSquelch(enabled));
-    return enabled;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetSquelchL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetSquelchL(TBool aSquelch)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetSquelchL +");
-    User::LeaveIfError(iTunerUtility->SetSquelch(aSquelch));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SignalStrengthL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::SignalStrengthL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL +");
-    TInt maxSignalStrength = 0;
-    TInt signalStrength = 0;
-
-    User::LeaveIfError(iTunerUtility->GetMaxSignalStrength(maxSignalStrength));
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL, maxSignalStrength = %d", maxSignalStrength);
-    User::LeaveIfError(iTunerUtility->GetSignalStrength(signalStrength));
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL, signalStrength = %d", signalStrength);
-    if (maxSignalStrength > 0)
-    {
-        return signalStrength / maxSignalStrength * 100; // CSI: 47 signal strength must be between 0 and 100 #
-    }
-    return KErrNotSupported;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::StereoModeL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::StereoModeL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::StereoModeL +");
-    TBool mono = EFalse;
-    TBool stereo = EFalse;
-
-    User::LeaveIfError(iTunerUtility->GetForcedMonoReception(mono));
-    if (mono)
-    {
-        return KStereoModeMono;
-    }
-
-    //User::LeaveIfError( iTunerUtility->IsStereoSignal( stereo ) );
-    TInt err = iTunerUtility->IsStereoSignal(stereo);
-    //this is for emulator testing, FIX IT
-    if (err == KErrNotReady)
-    {
-        return KStereoModeAuto;
-    }
-    else if (err != KErrNone)
-    {
-        User::LeaveIfError(err);
-    }
-
-    if (stereo)
-    {
-        return KStereoModeStereo;
-    }
-
-    return KStereoModeAuto;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetStereoMode()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetStereoModeL(TInt aMode)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetStereoModeL +");
-    if (aMode == KStereoModeMono)
-    {
-        User::LeaveIfError(iTunerUtility->ForceMonoReception(ETrue));
-    }
-
-    if (aMode == KStereoModeStereo)
-    {
-        User::LeaveIfError(iTunerUtility->ForceMonoReception(EFalse));
-        TBool stereo = EFalse;
-        User::LeaveIfError(iTunerUtility->IsStereoSignal(stereo));
-        if (!stereo)
-        {
-            User::Leave(KErrNotSupported);
-        }
-    }
-
-    if (aMode == KStereoModeAuto)
-    {
-        User::LeaveIfError(iTunerUtility->ForceMonoReception(EFalse));
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::UsePresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::UsePresetL(TInt aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::UsePresetL +");
-    TAMMSTunerPreset tunerPreset;
-
-    //get presets
-    iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
-    //set presets to tunerutility
-    SetFrequencyL(tunerPreset.PresetFrequency());
-    SetStereoModeL(tunerPreset.PresetStereoMode());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetL(TInt aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetL1 +");
-    TAMMSTunerPreset tunerPreset;
-
-    //get current frequency
-    tunerPreset.SetPresetFrequency(FrequencyL());
-    //get current stereo mode
-    tunerPreset.SetPresetStereoMode(StereoModeL());
-
-    iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetL(TInt aPreset,
-                                   TInt aFrequency,
-                                   TInt aStereoMode)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetL2 +");
-    TAMMSTunerPreset tunerPreset;
-
-    tunerPreset.SetPresetFrequency(aFrequency);
-    tunerPreset.SetPresetStereoMode(aStereoMode);
-
-    iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PresetFrequencyL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::PresetFrequencyL(TInt aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::PresetFrequencyL +");
-    TAMMSTunerPreset tunerPreset;
-
-    iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
-    return tunerPreset.PresetFrequency();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PresetStereoModeL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::PresetStereoModeL(TInt aPreset)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::PresetStereoModeL +");
-    TAMMSTunerPreset tunerPreset;
-
-    iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
-    return tunerPreset.PresetStereoMode();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetNameL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetNameL(TInt aPreset, const TDesC* aPresetName)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetNameL +");
-    TAMMSTunerPreset tunerPreset;
-
-    iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
-    tunerPreset.SetPresetName(aPresetName);
-
-    iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::GetPresetNameL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::GetPresetNameL(TInt aPreset, TPtrC* aPresetName)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::GetPresetNameL +");
-    TAMMSTunerPreset tunerPreset;
-
-    iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
-    aPresetName->Set(tunerPreset.PresetName());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::ClassName()
-// -----------------------------------------------------------------------------
-const TDesC& CAMMSTunerControl::ClassName() const
-{
-    return KControlImplName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PublicClassName()
-// -----------------------------------------------------------------------------
-const TDesC& CAMMSTunerControl::PublicClassName() const
-{
-    return KControlPublicName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MToTuneComplete()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MToTuneComplete(TInt aError)
-{
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MToTuneComplete AsyncStop");
-        iActiveSchedulerWait->AsyncStop();
-    }
-    ELOG1( EJavaAMMS, "CAMMSTunerControl::MToTuneComplete ERROR = %d", aError);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoFrequencyChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoFrequencyChanged(const TFrequency& /*aOldFrequency*/,
-        const TFrequency& /*aNewFrequency*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoFrequencyChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoStateChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoStateChanged(const TUint32& /*aOldState*/,
-        const TUint32& /*aNewState*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoStateChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoAntennaDetached
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoAntennaDetached()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoAntennaDetached");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoAntennaAttached
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoAntennaAttached()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoAntennaAttached");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::FlightModeChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::FlightModeChanged(TBool /*aFlightMode*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::FlightModeChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTsoStereoReceptionChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTsoStereoReceptionChanged(TBool /*aStereo*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTsoStereoReceptionChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTsoForcedMonoChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTsoForcedMonoChanged(TBool /*aForcedMono*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTsoForcedMonoChanged");
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunerplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a tuner player
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "CAMMSTunerPlayer.h"
-#include    "CAMMSTunerControl.h"
-
-#include    <tuner.h>
-#include <logger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::CAMMSTunerPlayer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPlayer::CAMMSTunerPlayer()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPlayer* CAMMSTunerPlayer::NewL(CAMMSTunerControl* aTunerControl)
-{
-    CAMMSTunerPlayer* self = new(ELeave) CAMMSTunerPlayer;
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aTunerControl);
-    CleanupStack::Pop();
-
-    return self;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPlayer::ConstructL(CAMMSTunerControl* aTunerControl)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::ConstructL +");
-    iTunerControl = aTunerControl;
-    iTunerPlayerUtility = iTunerControl->TunerUtility()->TunerPlayerUtilityL(*this);
-    iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
-    iIsInitialized = EFalse;
-
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::ConstructL -");
-}
-
-// Destructor
-CAMMSTunerPlayer::~CAMMSTunerPlayer()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::~CAMMSTunerPlayer +");
-    delete iTunerPlayerUtility;
-    delete iActiveSchedulerWait;
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::~CAMMSTunerPlayer -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::PrefetchL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::PrefetchL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::PrefetchL +");
-    //this must be called before play, stop, mute etc...
-    iTunerPlayerUtility->InitializeL(EMdaPriorityNormal,
-                                     EMdaPriorityPreferenceTimeAndQuality);
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();  // CSI: 10 Active object state already checked. #
-    }
-
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::PrefetchL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::StartL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::StartL()
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StartL +");
-    if (iIsInitialized)
-    {
-        // inform java side
-        ChangeState(EStarted);
-        iTunerPlayerUtility->Play();
-        // set time when started
-        iStartTime = CurrentTime();
-
-        TInt64 time;
-        GetMediaTime(&time);
-        PostLongEvent(CMMAPlayerEvent::EStarted, time);
-    }
-    else
-    {
-        User::Leave(KErrNotReady);
-    }
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StartL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::StopL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::StopL(TBool /*aPostEvent*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StopL +");
-    if (iIsInitialized)
-    {
-        ChangeState(EPrefetched);
-
-        iTunerPlayerUtility->Stop();
-
-        TInt64 time;
-        GetMediaTime(&time);
-        iStartTime = KErrNotFound;
-        PostLongEvent(CMMAPlayerEvent::EStopped, time);
-    }
-    else
-    {
-        User::Leave(KErrNotReady);
-    }
-
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StopL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::DeallocateL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::DeallocateL()
-{
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::GetMediaTime()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    if (iState == EStarted)
-    {
-        // add play time to media time
-        iMediaTime += CurrentTime() - iStartTime;
-        // set new start time
-        iStartTime = CurrentTime();
-    }
-
-    // set value to parameter
-    (*aMediaTime) = iMediaTime;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::MTapoInitializeComplete
-// Initialize complete event. This event is asynchronous and is received after
-//  a call to CMMTunerAudioPlayerUtility::InitializeL().
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::MTapoInitializeComplete(TInt aError)
-{
-    ELOG1( EJavaAMMS, "CAMMSTunerPlayer::MTapoInitializeComplete aError = %d", aError);
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MToTuneComplete AsyncStop");
-        iActiveSchedulerWait->AsyncStop();
-    }
-    if (aError == KErrNone)
-    {
-        iIsInitialized = ETrue;
-        ChangeState(EPrefetched);
-        // Inform Java side.
-        PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        ELOG1( EJavaAMMS, "CAMMSTunerPlayer::MTapoInitializeComplete aError = %d", aError);
-        PostLongEvent(CMMAPlayerEvent::EError, aError);
-        //User::Leave( aError );
-    }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::MTapoPlayEvent
-// Passes an asychronous event to the tuner client.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::MTapoPlayEvent(
-    MMMTunerAudioPlayerObserver::TEventType /*aEvent*/,
-    TInt /*aError*/, TAny* /*aAdditionalInfo*/)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::MTapoPlayEvent +");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::CurrentTime()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt64 CAMMSTunerPlayer::CurrentTime()
-{
-    TTime time;
-    time.HomeTime();
-    return time.Int64();
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunerpresetshandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "CAMMSTunerPresetsHandler.h"
-#include    "TAMMSTunerPreset.h"
-
-#include    <FMRadioEngineCRKeys.h>
-#include    <s32mem.h>
-#include <logger.h>
-
-
-// CONSTANTS
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::CAMMSTunerPresetsHandler
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPresetsHandler::CAMMSTunerPresetsHandler()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::ConstructL()
-{
-    iCentralRepository = CRepository::NewL(KCRUidFMRadioEngine);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPresetsHandler* CAMMSTunerPresetsHandler::NewL()
-{
-    CAMMSTunerPresetsHandler* self = new(ELeave) CAMMSTunerPresetsHandler;
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-}
-
-
-// Destructor
-CAMMSTunerPresetsHandler::~CAMMSTunerPresetsHandler()
-{
-    delete iCentralRepository;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::GetPreset
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::GetPresetL(TInt aPreset, TAMMSTunerPreset &aTunerPreset)
-{
-    // KFmRadioPresetChannel1 = The first preset channel's location in central repository
-    TInt tempChannelIndex = KFmRadioPresetChannel1 + aPreset;
-
-    HBufC8* buf = HBufC8::NewLC(sizeof(TAMMSTunerPreset));
-    TPtr8 bufPtr = buf->Des();
-
-    TInt err = iCentralRepository->Get(tempChannelIndex, bufPtr);
-    if (err == KErrNone)
-    {
-        RDesReadStream inStream;
-        inStream.Open(bufPtr);
-        CleanupClosePushL(inStream);
-        aTunerPreset.InternalizeL(inStream);
-        CleanupStack::PopAndDestroy(&inStream);
-    }
-    else
-    {
-        User::Leave(err);
-    }
-    CleanupStack::PopAndDestroy(); // buf
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::SavePreset
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::SavePresetL(TInt aPreset, TAMMSTunerPreset aTunerPreset)
-{
-    // KFmRadioPresetChannel1 = The first preset channel's location in central repository
-    TInt fieldNameIndex = KFmRadioPresetChannel1 + TUint32(aPreset);
-
-    HBufC8* buf = HBufC8::NewLC(sizeof(TAMMSTunerPreset));
-    TPtr8 bufPtr = buf->Des();
-
-    RDesWriteStream outStream(bufPtr);
-    CleanupClosePushL(outStream);
-    aTunerPreset.ExternalizeL(outStream);
-    outStream.CommitL();
-    CleanupStack::PopAndDestroy(&outStream);
-
-    iCentralRepository->Set(fieldNameIndex, bufPtr);
-    CleanupStack::PopAndDestroy(); //buf
-}
-
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunervolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to tuner player
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "CAMMSTunerVolumeControl.h"
-#include    "CAMMSTunerPlayer.h"
-
-#include <logger.h>
-
-
-CAMMSTunerVolumeControl::CAMMSTunerVolumeControl(CAMMSTunerPlayer* aTunerPlayer)
-        : CMMAVolumeControl(aTunerPlayer)
-{
-    iTunerPlayer = aTunerPlayer;
-}
-
-CAMMSTunerVolumeControl* CAMMSTunerVolumeControl::NewL(CAMMSTunerPlayer* aTunerPlayer)
-{
-    LOG( EJavaAMMS, EInfo, "CAMMSTunerVolumeControl::NewL +");
-    CAMMSTunerVolumeControl* self = new(ELeave) CAMMSTunerVolumeControl(aTunerPlayer);
-
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-}
-
-void CAMMSTunerVolumeControl::DoSetLevelL(TInt aLevel)
-{
-    LOG1( EJavaAMMS, EInfo, "CAMMSTunerVolumeControl::DoSetLevelL, aLevel = %d", aLevel);
-    // TunerPlayer does not currently have SetVolumeL method
-    User::Invariant();
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/protocol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Protocol JNI wrapper.
- *
-*/
-
-
-// EXTERNAL INCLUDES
-//#include <jutils.h>
-#include <logger.h>
-
-// INTERNAL INCLUDES
-#include "com_nokia_microedition_media_protocol_capture_radio_Protocol.h"
-#include <MMAFunctionServer.h>
-#include "CAMMSTunerControl.h"
-#include "CAMMSTunerPlayer.h"
-#include "AMMSTunerFactory.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-// Creates native tuner player
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_protocol_capture_radio_Protocol__1createNativeTunerPlayer(
-    JNIEnv* aJniEnv,
-    jobject /*aPeer*/,
-    jint aEventSourceHandle,
-    jstring aLocatorParameters)
-{
-    LOG( EJavaAMMS, EInfo, "AMMS Java_com_nokia_microedition_media_protocol_capture_radio_Protocol__1createNativeTunerPlayer +");
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    JStringUtils locatorParams(*aJniEnv, aLocatorParameters);
-
-    CAMMSTunerPlayer* tunerPlayer = NULL;
-
-    TInt error = eventSource->ExecuteTrap(
-                     &AMMSTunerFactory::CreatePlayerL,
-                     &tunerPlayer,
-                     (const TDesC*)&locatorParams);
-
-    ELOG1( EJavaAMMS, "AMMS __1createNativeTunerPlayer, error = %d", error);
-
-    if (error != KErrNone)
-    {
-        return error;
-    }
-
-    return reinterpret_cast<TInt>(tunerPlayer);
-}
-
--- a/javauis/amms_qt/src_tuner/native/src/tammstunerpreset.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "TAMMSTunerPreset.h"
-
-#include    <s32mem.h>
-#include <logger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::TAMMSTunerPreset
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TAMMSTunerPreset::TAMMSTunerPreset()
-{
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetName
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetName(const TDesC* aPresetName)
-{
-    iPresetName.Copy(*aPresetName);
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetFrequency
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetFrequency(const TInt aPresetFrequency)
-{
-    iPresetFrequency = aPresetFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetStereoMode
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetStereoMode(const TInt aPresetStereoMode)
-{
-    iPresetStereoMode = aPresetStereoMode;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetName
-// -----------------------------------------------------------------------------
-//
-TPtrC TAMMSTunerPreset::PresetName()
-{
-    return iPresetName;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetFrequency
-// -----------------------------------------------------------------------------
-//
-TInt TAMMSTunerPreset::PresetFrequency()
-{
-    return iPresetFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetStereoMode
-// -----------------------------------------------------------------------------
-//
-TInt TAMMSTunerPreset::PresetStereoMode()
-{
-    return iPresetStereoMode;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::ExternalizeL
-// Writes preset values to stream.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::ExternalizeL(RWriteStream& aStream) const
-{
-    aStream<<iPresetName;
-    aStream.WriteUint32L(iPresetFrequency);
-    aStream.WriteUint32L(iPresetStereoMode);
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::InternalizeL
-// Reads preset values from stream.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::InternalizeL(RReadStream& aStream)
-{
-    aStream>>iPresetName;
-    iPresetFrequency = aStream.ReadUint32L();
-    iPresetStereoMode = aStream.ReadUint32L();
-}
-
-//  End of File
--- a/javauis/amms_qt/src_tuner/native/src/tunercontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,731 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  TunerControl JNI wrapper.
- *
-*/
-
-
-// EXTERNAL INCLUDES
-//#include <jutils.h>
-
-// INTERNAL INCLUDES
-#include "com_nokia_amms_control_tuner_TunerControlImpl.h"
-#include <MMAFunctionServer.h>
-#include "CAMMSTunerControl.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-/**
-* Static delegator function for getMinFreq
-*/
-LOCAL_C void GetMinFreqL(CAMMSTunerControl* aNativeClass,
-                         TInt *aMinFreq)
-{
-
-    *aMinFreq = aNativeClass->MinFreqL();
-}
-
-/**
-*  getMinFreq JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getMinFreq(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    TInt minFreq;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetMinFreqL,
-                                        nativeHandle,
-                                        &minFreq);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return minFreq;
-}
-
-
-/**
-* Static delegator function for getMaxFreq
-*/
-LOCAL_C void GetMaxFreqL(CAMMSTunerControl* aNativeClass,
-                         TInt *aMaxFreq)
-{
-
-    *aMaxFreq = aNativeClass->MaxFreqL();
-}
-
-/**
-*  getMaxFreq JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getMaxFreq(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    TInt maxFreq;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetMaxFreqL,
-                                        nativeHandle,
-                                        &maxFreq);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return maxFreq;
-}
-
-
-/**
-* Static delegator function for setFrequency
-*/
-LOCAL_C void SetFreqL(CAMMSTunerControl* aNativeClass,
-                      TInt aFreq)
-{
-
-    aNativeClass->SetFrequencyL(aFreq);
-}
-
-/**
-* Static delegator function for getFrequency
-*/
-LOCAL_C void GetFreqL(CAMMSTunerControl* aNativeClass,
-                      TInt *aFreq)
-{
-    *aFreq = aNativeClass->FrequencyL();
-}
-
-/**
-*  setFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setFrequency(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aFreq)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SetFreqL,
-                                        nativeHandle,
-                                        aFreq);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    //get tuned frequency
-    TInt tunedFreq;
-    err = eventSource->ExecuteTrap(GetFreqL,
-                                   nativeHandle,
-                                   &tunedFreq);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return tunedFreq;
-}
-
-/**
-*  getFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getFrequency(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    TInt freq;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetFreqL,
-                                        nativeHandle,
-                                        &freq);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return freq;
-}
-
-
-/**
-* Static delegator function for seek
-*/
-LOCAL_C void SeekL(CAMMSTunerControl* aNativeClass,
-                   TInt aStartFreq,
-                   TBool aUpwards,
-                   TInt* aSeekedFreq)
-{
-
-    *aSeekedFreq = aNativeClass->SeekL(aStartFreq, aUpwards);
-}
-
-/**
-*  seek JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1seek(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aStartFreq,
-    jboolean aUpwards)
-{
-    TInt seekedFreq;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SeekL,
-                                        nativeHandle,
-                                        aStartFreq,
-                                        (TBool) aUpwards,
-                                        &seekedFreq);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return seekedFreq;
-}
-
-
-/**
-* Static delegator function for getSquelch
-*/
-LOCAL_C void GetSquelchL(CAMMSTunerControl* aNativeClass,
-                         TBool* aSquelch)
-{
-
-    *aSquelch = aNativeClass->SquelchL();
-}
-
-/**
-*  getSquelch JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getSquelch(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TBool squelch = EFalse;
-
-    TInt err = eventSource->ExecuteTrap(GetSquelchL,
-                                        nativeHandle,
-                                        &squelch);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    if (!squelch)
-    {
-        //return 1 if false
-        return 1;
-    }
-    //return 0 if true
-    return KErrNone;
-}
-
-
-/**
-* Static delegator function for setSquelch
-*/
-LOCAL_C void SetSquelchL(CAMMSTunerControl* aNativeClass,
-                         TBool aSquelch)
-{
-
-    aNativeClass->SetSquelchL(aSquelch);
-}
-
-/**
-*  setSquelch JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setSquelch(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jboolean aSquelch)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SetSquelchL,
-                                        nativeHandle,
-                                        (TBool) aSquelch);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return KErrNone;
-}
-
-
-/**
-* Static delegator function for getSignalStrength
-*/
-LOCAL_C void GetSignalStrengthL(CAMMSTunerControl* aNativeClass,
-                                TInt *aSignalStrength)
-{
-
-    *aSignalStrength = aNativeClass->SignalStrengthL();
-}
-
-/**
-*  getSignalStrength JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getSignalStrength(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    TInt signalStrength;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetSignalStrengthL,
-                                        nativeHandle,
-                                        &signalStrength);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return signalStrength;
-}
-
-
-/**
-* Static delegator function for getStereoMode
-*/
-LOCAL_C void GetStereoModeL(CAMMSTunerControl* aNativeClass,
-                            TInt *aStereoMode)
-{
-
-    *aStereoMode = aNativeClass->StereoModeL();
-}
-
-/**
-*  getStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getStereoMode(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle)
-{
-    TInt stereoMode;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetStereoModeL,
-                                        nativeHandle,
-                                        &stereoMode);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return stereoMode;
-}
-
-
-/**
-* Static delegator function for setStereoMode
-*/
-LOCAL_C void SetStereoModeL(CAMMSTunerControl* aNativeClass,
-                            TInt aStereoMode)
-{
-    aNativeClass->SetStereoModeL(aStereoMode);
-}
-
-/**
-*  setStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setStereoMode(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aStereoMode)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SetStereoModeL,
-                                        nativeHandle,
-                                        aStereoMode);
-
-    return err;
-}
-
-
-/**
-* Static delegator function for usePreset
-*/
-LOCAL_C void UsePresetL(CAMMSTunerControl* aNativeClass,
-                        TInt aPreset)
-{
-    aNativeClass->UsePresetL(aPreset);
-}
-
-/**
-*  usePreset JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1usePreset(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(UsePresetL,
-                                        nativeHandle,
-                                        aPreset);
-
-    return err;
-}
-
-
-/**
-* Static delegator function for setPreset__III
-*/
-LOCAL_C void SetPresetL(CAMMSTunerControl* aNativeClass,
-                        TInt aPreset)
-{
-    aNativeClass->SetPresetL(aPreset);
-}
-
-/**
-*  setPreset__III JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPreset__III(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SetPresetL,
-                                        nativeHandle,
-                                        aPreset);
-
-    return err;
-}
-
-
-/**
-* Static delegator function for setPreset__IIIII
-*/
-LOCAL_C void SetPresetL(CAMMSTunerControl* aNativeClass,
-                        TInt aPreset,
-                        TInt aFrequency,
-                        TInt aStereoMode)
-{
-    aNativeClass->SetPresetL(aPreset, aFrequency, aStereoMode);
-}
-
-/**
-*  setPreset__IIIII JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPreset__IIIII(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset,
-    jint aFrequency,
-    jint aStereoMode)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(SetPresetL,
-                                        nativeHandle,
-                                        aPreset,
-                                        aFrequency,
-                                        aStereoMode);
-
-    return err;
-}
-
-
-/**
-* Static delegator function for getPresetFrequency
-*/
-LOCAL_C void GetPresetFreqL(CAMMSTunerControl* aNativeClass,
-                            TInt aPreset,
-                            TInt *aPresetFreq)
-{
-
-    *aPresetFreq = aNativeClass->PresetFrequencyL(aPreset);
-}
-
-/**
-*  getPresetFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetFrequency(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset)
-{
-    TInt presetFreq;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetPresetFreqL,
-                                        nativeHandle,
-                                        aPreset,
-                                        &presetFreq);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return presetFreq;
-}
-
-
-/**
-* Static delegator function for getPresetStereoMode
-*/
-LOCAL_C void GetPresetStereoModeL(CAMMSTunerControl* aNativeClass,
-                                  TInt aPreset,
-                                  TInt *aPresetStereoMode)
-{
-
-    *aPresetStereoMode = aNativeClass->PresetStereoModeL(aPreset);
-}
-
-/**
-*  getPresetStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetStereoMode(
-    JNIEnv* /*aJni*/,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset)
-{
-    TInt presetStereoMode;
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(GetPresetStereoModeL,
-                                        nativeHandle,
-                                        aPreset,
-                                        &presetStereoMode);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    return presetStereoMode;
-}
-
-
-/**
-* Static delegator function for setPresetName
-*/
-LOCAL_C void SetPresetNameL(CAMMSTunerControl* aNativeClass,
-                            TInt aPreset,
-                            const TDesC* aPresetName)
-{
-    aNativeClass->SetPresetNameL(aPreset, aPresetName);
-}
-
-/**
-*  setPresetName JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPresetName(
-    JNIEnv* aJni,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset,
-    jstring aPresetName)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    JStringUtils presetName(*aJni, aPresetName);
-
-    TInt err = eventSource->ExecuteTrap(SetPresetNameL,
-                                        nativeHandle,
-                                        aPreset,
-                                        (const TDesC*)&presetName);
-
-    return err;
-}
-
-
-/**
-* Static delegator function for getPresetName
-*/
-LOCAL_C void GetPresetNameL(CAMMSTunerControl* aNativeClass,
-                            TInt aPreset,
-                            TPtrC* aPresetName)
-{
-    aNativeClass->GetPresetNameL(aPreset, aPresetName);
-}
-
-/**
-*  getPresetName JNI function
-*/
-JNIEXPORT jstring JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetName(
-    JNIEnv* aJni,
-    jobject /*aJobject*/,
-    jint aEventSourceHandle,
-    jint aTunerControlHandle,
-    jint aPreset,
-    jintArray aError)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CAMMSTunerControl* nativeHandle =
-        reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
-    TPtrC presetNamePtr(NULL, 0);
-    jstring presetName = NULL;
-
-    TInt err = eventSource->ExecuteTrap(GetPresetNameL,
-                                        nativeHandle,
-                                        aPreset,
-                                        &presetNamePtr);
-
-    if (err == KErrNone)
-    {
-        presetName = S60CommonUtils::NativeToJavaString(*aJni, presetNamePtr);
-        if (!presetName)
-        {
-            err = KErrNotSupported;
-        }
-    }
-
-    jint javaErr[ 1 ] = { err };
-    aJni->SetIntArrayRegion(aError, 0, 1, javaErr);
-
-    return presetName;
-}
-
-// End of file
Binary file javauis/bin/armv5/cgfx.dll has changed
Binary file javauis/bin/armv5/swt-pi-qt.dll has changed
Binary file javauis/bin/eswt.jar has changed
--- a/javauis/bin/eswt.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-[container]
-name=eswt.jar
-type=JAR
-
-[packages]
-org/eclipse/swt
-org/eclipse/swt/events
-org/eclipse/swt/graphics
-org/eclipse/swt/internal
-org/eclipse/swt/internal/symbian
-org/eclipse/swt/layout
-org/eclipse/swt/browser
-org/eclipse/swt/dnd
-org/eclipse/swt/widgets
-org/eclipse/ercp/swt/mobile
-org/eclipse/ercp/swt/mobile/internal
-org/eclipse/ercp/swt/expanded/internal
-
-[properties]
Binary file javauis/bin/eswtqt.dll has changed
--- a/javauis/bin/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +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: 
-*
-*/
-PRJ_EXPORTS
-
-#include "../../inc/build_defines.hrh"
-
-#ifdef RD_JAVA_SYMBIAN_TARGET
-#ifdef RD_JAVA_OPENLCDUI_ENABLED
-#ifdef RD_JAVA_S60_RELEASE_10_1
-
-qt_jxe/armv5/eswtqt.dll             /epoc32/release/armv5/udeb/eswtqt.dll
-qt_jxe/armv5/eswtqt.dll             /epoc32/release/armv5/urel/eswtqt.dll
-qt_jxe/armv5/eswtqt.odc             /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/eswtqt.odc
-qt_jxe/armv5/eswtqt.odc             /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/eswtqt.odc
-
-qt_jxe/armv5/openlcdui.dll          /epoc32/release/armv5/udeb/openlcdui.dll
-qt_jxe/armv5/openlcdui.dll          /epoc32/release/armv5/urel/openlcdui.dll
-qt_jxe/armv5/openlcdui.odc          /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/openlcdui.odc
-qt_jxe/armv5/openlcdui.odc          /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/openlcdui.odc
-
-qt_jxe/winscw/eswtqt.dll            /epoc32/release/winscw/udeb/eswtqt.dll
-qt_jxe/winscw/eswtqt.dll            /epoc32/release/winscw/urel/eswtqt.dll
-qt_jxe/winscw/eswtqt.odc            /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/eswtqt.odc
-qt_jxe/winscw/eswtqt.odc            /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/eswtqt.odc
-
-qt_jxe/winscw/openlcdui.dll         /epoc32/release/winscw/udeb/openlcdui.dll
-qt_jxe/winscw/openlcdui.dll         /epoc32/release/winscw/urel/openlcdui.dll
-qt_jxe/winscw/openlcdui.odc         /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/openlcdui.odc
-qt_jxe/winscw/openlcdui.odc         /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/openlcdui.odc
-
-
-#else //RD_JAVA_S60_RELEASE_10_1
-
-eswt.jar               /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/eswt.jar
-eswt.jar               /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/eswt.jar
-eswt.jar               /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/eswt.jar
-eswt.jar               /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/eswt.jar
-
-eswt.odc               /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/eswt.odc
-eswt.odc               /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/eswt.odc
-eswt.odc               /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/eswt.odc
-eswt.odc               /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/eswt.odc
-
-openlcdui.jar          /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/openlcdui.jar
-openlcdui.jar          /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/openlcdui.jar
-openlcdui.jar          /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/openlcdui.jar
-openlcdui.jar          /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/openlcdui.jar
-
-openlcdui.odc          /epoc32/release/winscw/udeb/z/resource/java/jvm/lib/jrt/openlcdui.odc
-openlcdui.odc          /epoc32/release/winscw/urel/z/resource/java/jvm/lib/jrt/openlcdui.odc
-openlcdui.odc          /epoc32/release/armv5/udeb/z/resource/java/jvm/lib/jrt/openlcdui.odc
-openlcdui.odc          /epoc32/release/armv5/urel/z/resource/java/jvm/lib/jrt/openlcdui.odc
-
-eswtqt.dll             /epoc32/release/armv5/udeb/eswtqt.dll
-eswtqt.dll             /epoc32/release/armv5/urel/eswtqt.dll
-
-winscw/cgfx.dll        /epoc32/release/winscw/udeb/cgfx.dll
-winscw/cgfx.dll        /epoc32/release/winscw/urel/cgfx.dll
-armv5/cgfx.dll         /epoc32/release/armv5/udeb/cgfx.dll
-armv5/cgfx.dll         /epoc32/release/armv5/urel/cgfx.dll
-
-winscw/swt-pi-qt.dll   /epoc32/release/winscw/udeb/swt-pi-qt.dll
-winscw/swt-pi-qt.dll   /epoc32/release/winscw/urel/swt-pi-qt.dll
-armv5/swt-pi-qt.dll    /epoc32/release/armv5/udeb/swt-pi-qt.dll
-armv5/swt-pi-qt.dll    /epoc32/release/armv5/urel/swt-pi-qt.dll
-
-#endif //RD_JAVA_S60_RELEASE_10_1
-#endif //RD_JAVA_OPENLCDUI_ENABLED
-#endif //RD_JAVA_SYMBIAN_TARGET
Binary file javauis/bin/openlcdui.jar has changed
--- a/javauis/bin/openlcdui.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-[container]
-name=openlcdui.jar
-type=JAR
-
-[packages]
-com/nokia/mid/ui
-com/nokia/mid/ui/impl
-javax/microedition/lcdui
-javax/microedition/lcdui/game
-
-[properties]
Binary file javauis/bin/qt_jxe/armv5/eswtqt.dll has changed
--- a/javauis/bin/qt_jxe/armv5/eswtqt.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-[container]
-name=eswtqt
-type=JXESL
-
-[packages]
-org/eclipse/ercp/swt/midp
-org/eclipse/ercp/swt/mobile
-org/eclipse/swt
-org/eclipse/swt/browser
-org/eclipse/swt/dnd
-org/eclipse/swt/events
-org/eclipse/swt/graphics
-org/eclipse/swt/internal
-org/eclipse/swt/internal/extension
-org/eclipse/swt/internal/image
-org/eclipse/swt/internal/qt
-org/eclipse/swt/internal/qt/graphics
-org/eclipse/swt/internal/qt/s60
-org/eclipse/swt/layout
-org/eclipse/swt/widgets
-
-[properties]
--Dorg.eclipse.ercp.swt.defaultOrientation=system
Binary file javauis/bin/qt_jxe/armv5/openlcdui.dll has changed
--- a/javauis/bin/qt_jxe/armv5/openlcdui.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-[container]
-name=openlcdui
-type=JXESL
-
-[packages]
-com/nokia/mid/ui
-com/nokia/mj/impl/nokialcdui
-com/nokia/mj/impl/rt/properties/lcduib
-javax/microedition/lcdui
-javax/microedition/lcdui/game
-
-[properties]
--Dcom.nokia.mid.ui.version=1.2
--Dcom.nokia.canvas.net.indicator.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey1.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey2.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey3.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey1.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey2.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey3.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.keyboard.type=:lcduib.DynamicPropertyHandler
--Dcom.nokia.key.scancode=:lcduib.DynamicPropertyHandler
--Dcom.nokia.key.modifier=:lcduib.DynamicPropertyHandler
Binary file javauis/bin/qt_jxe/winscw/eswtqt.dll has changed
--- a/javauis/bin/qt_jxe/winscw/eswtqt.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-[container]
-name=eswtqt
-type=JXESL
-
-[packages]
-org/eclipse/ercp/swt/midp
-org/eclipse/ercp/swt/mobile
-org/eclipse/swt
-org/eclipse/swt/browser
-org/eclipse/swt/dnd
-org/eclipse/swt/events
-org/eclipse/swt/graphics
-org/eclipse/swt/internal
-org/eclipse/swt/internal/extension
-org/eclipse/swt/internal/image
-org/eclipse/swt/internal/qt
-org/eclipse/swt/internal/qt/graphics
-org/eclipse/swt/internal/qt/s60
-org/eclipse/swt/layout
-org/eclipse/swt/widgets
-
-[properties]
--Dorg.eclipse.ercp.swt.defaultOrientation=system
Binary file javauis/bin/qt_jxe/winscw/openlcdui.dll has changed
--- a/javauis/bin/qt_jxe/winscw/openlcdui.odc	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-[container]
-name=openlcdui
-type=JXESL
-
-[packages]
-com/nokia/mid/ui
-com/nokia/mj/impl/nokialcdui
-com/nokia/mj/impl/rt/properties/lcduib
-javax/microedition/lcdui
-javax/microedition/lcdui/game
-
-[properties]
--Dcom.nokia.mid.ui.version=1.2
--Dcom.nokia.canvas.net.indicator.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey1.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey2.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey3.label.location=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey1.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey2.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.softkey3.label.anchor=:lcduib.DynamicPropertyHandler
--Dcom.nokia.keyboard.type=:lcduib.DynamicPropertyHandler
--Dcom.nokia.key.scancode=:lcduib.DynamicPropertyHandler
--Dcom.nokia.key.modifier=:lcduib.DynamicPropertyHandler
--- a/javauis/bin/readme.txt	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-These binaries contains eSWT on top of S60 QT and open LCDUI on top of eSWT.
-The binaries are exported to correct places if OMJ is used for QT development
-(which is not default at the moment). Sources of S60 open LCDUI + eSWT + QT
-are not part of the OMJ version control.
-
-Be careful when modifying this folder. The Linux uses eswt.jar in 
-bootclasspath during compile time.
\ No newline at end of file
Binary file javauis/bin/winscw/cgfx.dll has changed
Binary file javauis/bin/winscw/swt-pi-qt.dll has changed
--- a/javauis/coreui_akn/build/javacoreui_0x2002DCA8.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/coreui_akn/build/javacoreui_0x2002DCA8.mmp	Tue May 25 12:34:19 2010 +0300
@@ -109,6 +109,10 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eiksrv.lib
+LIBRARY		charconv.lib
+LIBRARY		hal.lib
 
 CAPABILITY		all -tcb 
 
@@ -129,10 +133,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/eswt_akn/eswtdirectcontent/build/eswtdirectcontent_0x2002DC94.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/eswtdirectcontent/build/eswtdirectcontent_0x2002DC94.mmp	Tue May 25 12:34:19 2010 +0300
@@ -93,6 +93,11 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eiksrv.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		hal.lib
 
 CAPABILITY		all -tcb 
 
@@ -113,10 +118,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/eswt_akn/eswtdirectcontent/native/src/swtdccontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/eswtdirectcontent/native/src/swtdccontrol.cpp	Tue May 25 12:34:19 2010 +0300
@@ -230,6 +230,7 @@
              ((iLastFadeMessage == KEikMessageUnfadeWindows) ||
               (iLastFadeMessage == KEikMessageFadeAllWindows)))
     {
+#ifdef SWTDCCONTROL_DSA_ENABLED
         TBool isFaded = iLastFadeMessage == KEikMessageFadeAllWindows;
 
         DEBUG_INT("CSwtDCControl::HandleResourceChange(): isFaded=%d", isFaded);
@@ -243,7 +244,7 @@
                 iContent->MdcContainerVisibilityChanged(!isFaded);
             }
         }
-
+#endif
         iLastFadeMessage = 0;
     }
 
@@ -422,7 +423,16 @@
         }
     }
 #else
-    (void)aFocused; //Supresses compilation warning
+    DEBUG_INT("CSwtDCControl::HandleAppFocusChangeL(): aFocused=%d", aFocused);
+
+    // Hide anytime, but show only when visibility conditions are fulfilled
+    if (!aFocused || IsContentVisibilityAllowed())
+    {
+        if (iContent)
+        {
+            iContent->MdcContainerVisibilityChanged(aFocused);
+        }
+    }
 #endif
 }
 
@@ -509,6 +519,9 @@
 {
     DEBUG_INT("CSwtDCControl::MdcGetDSAResources()+ eswt_thread=%d", aIsInUiThread);
 
+    // To avoid compilation warnings
+    (void)aIsInUiThread;
+
     iDcObserver->InvokeDSAResourcesCallback(*this,
                                             aConsumer);
     DEBUG("CSwtDCControl::MdcGetDSAResources()-");
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eswt_0x2002DC93.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eswt_0x2002DC93.mmp	Tue May 25 12:34:19 2010 +0300
@@ -248,6 +248,9 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eiksrv.lib
+LIBRARY		charconv.lib
 
 CAPABILITY		all -tcb 
 
@@ -268,10 +271,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 SOURCEPATH ../src
 
 START RESOURCE eswtcore.rss
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp	Tue May 25 12:34:19 2010 +0300
@@ -22,6 +22,7 @@
 #include <swtbuttonproxy.h>
 #include <aknconsts.h>
 #include <avkon.mbg>
+#include <fepbase.h>
 #endif // RD_SCALABLE_UI_V2
 #include "swteditindicator.h"
 #include "swtfont.h"
@@ -67,7 +68,6 @@
 //
 CSwtDateEditor::~CSwtDateEditor()
 {
-    iEikonEnv->SyncNotifyFocusObserversOfChangeInFocus();
     delete iEditor;
     delete iIndicator;
     if (iDefaultFont)
@@ -202,10 +202,17 @@
 // ---------------------------------------------------------------------------------------------
 //
 void CSwtDateEditor::FocusChanged(TDrawNow aDrawNow)
-{
+{    
     if (iEditor)
     {
         TRAP_IGNORE(PrepareForFocusChangeL());
+        
+        // Aparenlty this is the only way of forcing the VKB to close.
+        if (iEditor->IsFocused() && !IsFocused())
+        {
+            iDisplay.CoeEnv()->Fep()->HandleDestructionOfFocusedItem();
+        }
+        
         iEditor->SetFocus(IsFocused());
     }
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplay.cpp	Tue May 25 12:34:19 2010 +0300
@@ -152,7 +152,10 @@
         TBool focused = aEvent == SwtWsEventAppFocusGained;
 
         // UiUtils intentionally handled separately although it is an app focus observer also.
-        iUiUtils->HandleAppFocusChangeL(focused);
+        if (iUiUtils)
+        {
+            iUiUtils->HandleAppFocusChangeL(focused);
+        }
 
         // Inform other observers.
         const TInt count = iAppFocusObservers.Count();
@@ -182,7 +185,10 @@
     if (aEvent == CSwtLafFacade::GetConstant(CSwtLafFacade::EBrowserFreeRam)
             ||  aEvent == CSwtLafFacade::GetConstant(CSwtLafFacade::EBrowserMemoryGood))
     {
-        iUiUtils->HandleFreeRamEventL(aEvent);
+        if (iUiUtils)
+        {
+            iUiUtils->HandleFreeRamEventL(aEvent);
+        }
     }
 }
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp	Tue May 25 12:34:19 2010 +0300
@@ -922,6 +922,13 @@
 
         iSearchField->AddAdaptiveSearchTextObserverL(this);
         iSearchField->SetComponentsToInheritVisibility(ETrue);
+
+        // Set search field to use only second column to get
+        // item text. Items use \t as column separators, see method 
+        // CSwtListBase::CreateItemTextLC() for details. 
+        const int KItemTextColumnFlag = 2;
+        iSearchField->SetListColumnFilterFlags(KItemTextColumnFlag);
+
         CAknFilteredTextListBoxModel* model = STATIC_CAST(
                                                   CAknFilteredTextListBoxModel*, iList->Model());
         ASSERT(model);
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp	Tue May 25 12:34:19 2010 +0300
@@ -48,7 +48,6 @@
 //
 CSwtTextBase::~CSwtTextBase()
 {
-    iEikonEnv->SyncNotifyFocusObserversOfChangeInFocus();
     // Own
     delete iEditor;
     iEditor = NULL;
@@ -910,35 +909,29 @@
 //
 void CSwtTextBase::FocusChanged(TDrawNow aDrawNow)
 {
-    TBool isFocused = IsFocused();
-
     if (iEditor)
     {
         TRAP_IGNORE(iEditor->UpdateScrollBarsL());
     }
 
-    if (!isFocused)
+    if (iEditor)
     {
-        if (iEditor)
+        if (iIndicator)
         {
-            iEditor->SetFocus(IsFocused());
-
-            if (iIndicator)
-            {
+            if (!IsFocused())
                 iIndicator->SetState(EStateNone);
-            }
         }
+        
+        // Aparenlty this is the only way of forcing the VKB to close.
+        if (iEditor->IsFocused() && !IsFocused())
+        {
+            iDisplay.CoeEnv()->Fep()->HandleDestructionOfFocusedItem();
+        }
+        
+        iEditor->SetFocus(IsFocused());
     }
 
     HandleFocusChanged(aDrawNow);
-
-    if (isFocused)
-    {
-        if (iEditor)
-        {
-            iEditor->SetFocus(IsFocused());
-        }
-    }
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/ercp/swt/midp/UIThreadSupport.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/ercp/swt/midp/UIThreadSupport.java	Tue May 25 12:34:19 2010 +0300
@@ -60,6 +60,8 @@
  * 
  * @param runnable The Runnable object to call back
  * @exception SWTError <ul>
+ *                <li>ERROR_NULL_ARGUMENT if the runnable is null</li>
+ * @exception SWTError <ul>
  *                <li>ERROR_NO_HANDLES if a handle could not be obtained for
  *                thread creation</li>
  * @exception SWTError <ul>
@@ -68,6 +70,9 @@
  * @see MIDlet#startApp
  */
 public static void startInUIThread(Runnable runnable) {
+    if(runnable == null) {
+        SWT.error(SWT.ERROR_NULL_ARGUMENT);
+    }
     synchronized(UIThreadSupport.class) {
         if(started) {
             SWT.error(SWT.ERROR_FAILED_EXEC);
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/widgets/Display.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/widgets/Display.java	Tue May 25 12:34:19 2010 +0300
@@ -1479,23 +1479,91 @@
 
     void releaseSystemColors()
     {
-        if (COLOR_WIDGET_DARK_SHADOW != null) COLOR_WIDGET_DARK_SHADOW.dispose();
-        if (COLOR_WIDGET_NORMAL_SHADOW != null) COLOR_WIDGET_NORMAL_SHADOW.dispose();
-        if (COLOR_WIDGET_LIGHT_SHADOW != null) COLOR_WIDGET_LIGHT_SHADOW.dispose();
-        if (COLOR_WIDGET_HIGHLIGHT_SHADOW != null) COLOR_WIDGET_HIGHLIGHT_SHADOW.dispose();
-        if (COLOR_WIDGET_FOREGROUND != null) COLOR_WIDGET_FOREGROUND.dispose();
-        if (COLOR_WIDGET_BACKGROUND != null) COLOR_WIDGET_BACKGROUND.dispose();
-        if (COLOR_WIDGET_BORDER != null) COLOR_WIDGET_BORDER.dispose();
-        if (COLOR_LIST_FOREGROUND != null) COLOR_LIST_FOREGROUND.dispose();
-        if (COLOR_LIST_BACKGROUND != null) COLOR_LIST_BACKGROUND.dispose();
-        if (COLOR_LIST_SELECTION != null) COLOR_LIST_SELECTION.dispose();
-        if (COLOR_LIST_SELECTION_TEXT != null) COLOR_LIST_SELECTION_TEXT.dispose();
-        if (COLOR_TITLE_FOREGROUND != null) COLOR_TITLE_FOREGROUND.dispose();
-        if (COLOR_TITLE_BACKGROUND != null) COLOR_TITLE_BACKGROUND.dispose();
-        if (COLOR_TITLE_BACKGROUND_GRADIENT != null) COLOR_TITLE_BACKGROUND_GRADIENT.dispose();
-        if (COLOR_TITLE_INACTIVE_FOREGROUND != null) COLOR_TITLE_INACTIVE_FOREGROUND.dispose();
-        if (COLOR_TITLE_INACTIVE_BACKGROUND != null) COLOR_TITLE_INACTIVE_BACKGROUND.dispose();
-        if (COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT != null) COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT.dispose();
+        if (COLOR_WIDGET_DARK_SHADOW != null) 
+        {
+            COLOR_WIDGET_DARK_SHADOW.dispose(); 
+            COLOR_WIDGET_DARK_SHADOW = null;
+        }
+        if (COLOR_WIDGET_NORMAL_SHADOW != null) 
+        {
+            COLOR_WIDGET_NORMAL_SHADOW.dispose();
+            COLOR_WIDGET_NORMAL_SHADOW = null;
+        }
+        if (COLOR_WIDGET_LIGHT_SHADOW != null) 
+        {
+            COLOR_WIDGET_LIGHT_SHADOW.dispose();
+            COLOR_WIDGET_LIGHT_SHADOW = null;
+        }
+        if (COLOR_WIDGET_HIGHLIGHT_SHADOW != null) 
+        {
+            COLOR_WIDGET_HIGHLIGHT_SHADOW.dispose();
+            COLOR_WIDGET_HIGHLIGHT_SHADOW = null;
+        }
+        if (COLOR_WIDGET_FOREGROUND != null)
+        { 
+            COLOR_WIDGET_FOREGROUND.dispose();
+            COLOR_WIDGET_FOREGROUND = null;
+        }
+        if (COLOR_WIDGET_BACKGROUND != null)
+        {
+            COLOR_WIDGET_BACKGROUND.dispose();
+            COLOR_WIDGET_BACKGROUND = null;
+        }
+        if (COLOR_WIDGET_BORDER != null)
+        {
+            COLOR_WIDGET_BORDER.dispose();
+            COLOR_WIDGET_BORDER = null;
+        }
+        if (COLOR_LIST_FOREGROUND != null)
+        {
+            COLOR_LIST_FOREGROUND.dispose();
+            COLOR_LIST_FOREGROUND = null;
+        }
+        if (COLOR_LIST_BACKGROUND != null)
+        {
+            COLOR_LIST_BACKGROUND.dispose();
+            COLOR_LIST_BACKGROUND = null;
+        }
+        if (COLOR_LIST_SELECTION != null)
+        {
+            COLOR_LIST_SELECTION.dispose();
+            COLOR_LIST_SELECTION = null;
+        }
+        if (COLOR_LIST_SELECTION_TEXT != null)
+        {
+            COLOR_LIST_SELECTION_TEXT.dispose();
+            COLOR_LIST_SELECTION_TEXT = null;
+        }
+        if (COLOR_TITLE_FOREGROUND != null)
+        {
+            COLOR_TITLE_FOREGROUND.dispose();
+            COLOR_TITLE_FOREGROUND = null;
+        }
+        if (COLOR_TITLE_BACKGROUND != null)
+        {
+            COLOR_TITLE_BACKGROUND.dispose();
+            COLOR_TITLE_BACKGROUND = null;
+        }
+        if (COLOR_TITLE_BACKGROUND_GRADIENT != null)
+        {
+            COLOR_TITLE_BACKGROUND_GRADIENT.dispose();
+            COLOR_TITLE_BACKGROUND_GRADIENT = null;
+        }
+        if (COLOR_TITLE_INACTIVE_FOREGROUND != null)
+        {
+            COLOR_TITLE_INACTIVE_FOREGROUND.dispose();
+            COLOR_TITLE_INACTIVE_FOREGROUND = null;
+        }
+        if (COLOR_TITLE_INACTIVE_BACKGROUND != null)
+        {
+            COLOR_TITLE_INACTIVE_BACKGROUND.dispose();
+            COLOR_TITLE_INACTIVE_BACKGROUND = null;
+        }
+        if (COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT != null)
+        {
+            COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT.dispose();
+            COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = null;
+        }
     }
 
     /**
--- a/javauis/javalegacyutils/build/javalegacyutils_0x2002DCBB.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/javalegacyutils/build/javalegacyutils_0x2002DCBB.mmp	Tue May 25 12:34:19 2010 +0300
@@ -100,6 +100,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -120,10 +132,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/lcdui_akn/javalcdui/build/javalcdui_0x2002DCBA.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/build/javalcdui_0x2002DCBA.mmp	Tue May 25 12:34:19 2010 +0300
@@ -167,6 +167,12 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		hal.lib
 
 CAPABILITY		all -tcb 
 
@@ -187,10 +193,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/lcdui_akn/javalcdui/inc/lcdui.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/inc/lcdui.h	Tue May 25 12:34:19 2010 +0300
@@ -2166,7 +2166,8 @@
     // Form/Item
     EItemChanged = 0,       // Futuredev: value
     // EList
-    ESelect = 0             // Futuredev: value
+    ESelect = 0,             // Futuredev: value
+    EM3GDraw = 32           // M3G content is drowned on canvas
 };
 
 /**
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Canvas.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Canvas.java	Tue May 25 12:34:19 2010 +0300
@@ -635,6 +635,16 @@
                 }
             }
             break;
+        case Toolkit.EVENT_M3G_DRAW:
+            if (shown)
+             {
+                synchronized (iCallbackLock)
+                {
+                   Graphics graphics = GetPaintGraphics();
+                   graphics.M3Gdraw(aData0);
+                }
+             }
+             break;    
         default:
             super.handleEvent(aEvent, aData0, aData1);
             break;
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Graphics.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Graphics.java	Tue May 25 12:34:19 2010 +0300
@@ -157,6 +157,7 @@
     private Font    iScalableFont;
     private boolean iFontSet;
     private boolean iScalableFontSet;
+    private boolean iM3Gdraw;
 
     private int iOnScreenWidth;  // width of screen
     private int iOnScreenHeight; // height of screen
@@ -195,7 +196,7 @@
         iToolkit = aToolkit;
         iBuffer = aToolkit.iBuffer;
         iTarget = aTarget;
-
+        iM3Gdraw = false;
         iIsSetTargetSize = false;
         // If a Graphics is drawing to image then a image is saved. Null otherwise
         iImage = (aTarget instanceof Image) ? (Image)aTarget : null;
@@ -954,8 +955,17 @@
             {
                 // checking of anchor
                 aAnchor = checkAnchor(aAnchor, IMAGE_ANCHOR_MASK);
-                // send image with drawing point to native side
-                iBuffer.write(iHandle, OP_DRAW_IMAGE, aImage.iHandle, aX, aY, aAnchor);
+
+                // Prevent aImage to be disposed when in use
+                synchronized (aImage)
+                {
+                    // Check that aImage haven't been disposed yet
+                    if (aImage.iHandle != 0)
+                    {
+                        // send image with drawing point to native side
+                        iBuffer.write(iHandle, OP_DRAW_IMAGE, aImage.iHandle, aX, aY, aAnchor);
+                    }
+                }
             }
         }
     }
@@ -1388,18 +1398,27 @@
         {
             synchronized (iBuffer)
             {
-                // If downscaling off, then it only send data to native side
-                iBuffer.write(iHandle,
-                              OP_DRAW_REGION,
-                              aImage.iHandle,
-                              aXsrc,
-                              aYsrc,
-                              aWidth,
-                              aHeight,
-                              aTransform,
-                              aXdest,
-                              aYdest,
-                              aAnchor);
+                // Prevent aImage to be disposed when in use
+                synchronized (aImage)
+                {
+                    // Check that aImage haven't been disposed yet
+                    if (aImage.iHandle != 0)
+                    {
+                        // If downscaling off, 
+                        // then it only send data to native side
+                        iBuffer.write(iHandle,
+                                      OP_DRAW_REGION,
+                                      aImage.iHandle,
+                                      aXsrc,
+                                      aYsrc,
+                                      aWidth,
+                                      aHeight,
+                                      aTransform,
+                                      aXdest,
+                                      aYdest,
+                                      aAnchor);
+                    }
+                }
             }
         }
     }
@@ -1457,14 +1476,33 @@
     }
 
     /**
+     *this function blocking downscaled when M3G drawing some content    
+     **/    
+    void M3Gdraw(int aM3Gdraw)
+    {
+       if (aM3Gdraw == 0) 
+          {
+             iM3Gdraw = false;
+          }
+       else
+       { 
+          iM3Gdraw = true; 
+       }
+    }
+    /**
      * This function return flag if Graphics is downscaled.
      * Graphics is downscaled on if we have set original size, this size is bigger then screen
      * (at least on one measure) and iTarget is Canvas in full screen Canvas or a target size is
      * smaller than original size.
      * @return true if Graphics is downscaled, false otherwise
-     */
+     */ 
     boolean isDownscaled()
     {
+       // If M3G is drawnig then downscaling is turn off.
+       if (iM3Gdraw)
+          { 
+             return false;
+          }
         if ((iTarget instanceof Canvas) && ((Canvas)iTarget).getFullScreenMode()
                 && iIsSetOriginalSize)
         {
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Image.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Image.java	Tue May 25 12:34:19 2010 +0300
@@ -569,8 +569,9 @@
 
     /**
      * destroy native image.
+     * Synchronization prevents Image to be disposed when in use.     
      */
-    private void dispose()
+    synchronized private void dispose()
     {
         boolean freed = false;
         synchronized (iToolkit)
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java	Tue May 25 12:34:19 2010 +0300
@@ -127,13 +127,14 @@
     static final int EVENT_TRAVERSE    = 26;
     static final int EVENT_SET_CURRENT = 29;
     static final int EVENT_SERIAL      = 30;
-
+    
     static final int EVET_CANVAS_GRAPHICS_ITEM_REPAINT = 31;
-
+    static final int EVENT_M3G_DRAW = 32 ;
     // IMPLICIT EVENT TYPES
     static final int EVENT_DISMISS = 0;         // ALERT
     static final int EVENT_ITEM_CHANGED = 0;    // ITEM(S)
     static final int EVENT_SELECT  = 0;         // LIST
+    
 
     //
     // Op codes for syncing to screen
--- a/javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp	Tue May 25 12:34:19 2010 +0300
@@ -30,7 +30,7 @@
 #include <e32property.h>
 #include <centralrepository.h>
 #include <settingsinternalcrkeys.h>
-#include <screensaverinternalpskeys.h>      // to work with screensaver
+#include <ScreensaverInternalPSKeys.h>      // to work with screensaver
 #include <gfxtranseffect/gfxtranseffect.h>  // For transition effects
 #include <akntranseffect.h>                                 // For transition effects
 //
@@ -566,34 +566,35 @@
 
         if (mFirst)
         {
-            java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
-            if (appUi && appUi->hasStartScreen())
-            {
-                MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL;
+            mFirst = EFalse;
+        }
+    }
+    
+    // Stop the start screen if it is still active.
+    java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
+    if (appUi && appUi->hasStartScreen())
+    {
+        MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL;
 
-                TBool isCanvas = EFalse;
-                TBool isCanvasReadyToBlit = EFalse;
-                if (content)
-                {
-                    if (content->Type() == MMIDComponent::ECanvas)
-                    {
-                        isCanvas = ETrue;
-                        MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content);
-                        isCanvasReadyToBlit = canvas->ReadyToBlit();
-                    }
-                }
+        TBool isCanvas = EFalse;
+        TBool isCanvasReadyToBlit = EFalse;
+        if (content)
+        {
+            if (content->Type() == MMIDComponent::ECanvas)
+            {
+                isCanvas = ETrue;
+                MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content);
+                isCanvasReadyToBlit = canvas->ReadyToBlit();
+            }
+        }
 
-                if (!content || !isCanvas || isCanvasReadyToBlit)
-                {
-                    if (iCurrentDisplayable)
-                    {
-                        iCurrentDisplayable->DrawNow();
-                    }
-                    appUi->stopStartScreen();
-                }
+        if (!content || !isCanvas || isCanvasReadyToBlit)
+        {
+            if (iCurrentDisplayable)
+            {
+                iCurrentDisplayable->DrawNow();
             }
-
-            mFirst = EFalse;
+            appUi->stopStartScreen();
         }
     }
 }
@@ -605,7 +606,7 @@
     if (mFirst)
     {
         java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
-        appUi->stopStartScreen();
+        appUi->stopStartScreen(false); // no screenshot
         mFirst = EFalse;
     }
     iMidletRequestedBg = ETrue;
--- a/javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItem.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItem.h	Tue May 25 12:34:19 2010 +0300
@@ -21,8 +21,11 @@
 
 // EXTERNAL INCLUDES
 #include <e32base.h>
+
+// INTERNAL INCLUDES
 #include <MMIDCanvasGraphicsItem.h>
 #include <MMIDCustomComponent.h>
+#include <MMIDScalable.h>
 
 // FORWARD DECLARATIONS
 class CMIDCanvasGraphicsItemPainter;
@@ -37,7 +40,8 @@
 NONSHARABLE_CLASS(CMIDCanvasGraphicsItem) :
         public CBase,
         public MMIDCanvasGraphicsItem,
-        public MMIDCustomComponent
+        public MMIDCustomComponent,
+        public MMIDScalable
 {
 public: // Type definitions
 
@@ -50,8 +54,8 @@
         CMIDUtils* iUtils;
 
         TCtorParams::TCtorParams() :
-                iPainterHandle(NULL),
-                iUtils(NULL) {}
+            iPainterHandle(NULL),
+            iUtils(NULL) {}
     };
 
 public: // Constructors and destructor
@@ -143,6 +147,12 @@
         return EFalse;
     }
 
+public: // From MMIDScalable
+
+    TBool IsScalingOn() const;
+
+public: //Own methods
+
     /**
      * Handles fullscreen state of parent Canvas.
      *
@@ -284,6 +294,12 @@
 
     // The shared CMIDUtils instance. Not owned.
     CMIDUtils* iUtils;
+
+    // A non-scaled size of item. Needed by scaling.
+    TSize iNonScaledSize;
+
+    // A non-scaled position of item. Needed by scaling.
+    TPoint iNonScaledPosition;
 };
 
 #endif // CMIDCANVASGRAPHICSITEM_H
--- a/javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItemPainter.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDCanvasGraphicsItemPainter.h	Tue May 25 12:34:19 2010 +0300
@@ -59,9 +59,9 @@
         MMIDEnv* iEnv;
 
         TCtorParams::TCtorParams() :
-                iWidth(0),
-                iHeight(0),
-                iEnv(NULL)
+            iWidth(0),
+            iHeight(0),
+            iEnv(NULL)
         {}
     };
 
@@ -280,6 +280,33 @@
      */
     void MdcResumeDSA();
 
+public:    // Own methods
+
+    /**
+     * Sets the new view size. Needed by scaling.
+     *
+     * @param aSize New view size.
+     * @since S60 5.0
+     */
+    inline void SetViewSize(const TSize& aSize);
+
+    /**
+     * Sets the rect of canvas if it is scaled. Needed by scaling.
+     *
+     * @param aSize New view size.
+     * @since S60 5.0
+     */
+    inline void SetOnScreenCanvasRect(const TRect& aSize);
+
+    /**
+     * Sets the item. Called during construction of CMIDCanvasGraphicsItem.
+     *
+     * @param aItem CMIDCanvasGraphicsItem to which is this painter assigned.
+     * @since S60 5.0
+     */
+    inline void SetItem(CMIDCanvasGraphicsItem* aItem);
+
+
 private: // Construtors
 
     /**
@@ -355,14 +382,40 @@
     TRect iContentRect;
 
     /**
+     * View rectangle.
+     */
+    TSize iViewSize;
+
+    /**
      * Canvas graphics item painter inner visibility
      */
     TBool iVisible;
 
     // A MIDlet environment.
     MMIDEnv& iEnv;
+
+    // rect of canvas if it is scaled
+    TRect iOnScreenCanvasRect;
+
 };
 
+inline void CMIDCanvasGraphicsItemPainter::SetItem(
+                                          CMIDCanvasGraphicsItem* aItem)
+{
+    iItem = aItem;
+}
+
+inline void CMIDCanvasGraphicsItemPainter::SetViewSize(const TSize& aSize)
+{
+    iViewSize = aSize;
+}
+
+inline void CMIDCanvasGraphicsItemPainter::SetOnScreenCanvasRect(
+                                          const TRect& aRect)
+{
+    iOnScreenCanvasRect = aRect;
+}
+
 #endif // CMIDCANVASGRAPHICSITEMPAINTER_H
 
 // End of file
--- a/javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupControl.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupControl.h	Tue May 25 12:34:19 2010 +0300
@@ -226,6 +226,13 @@
 
 #ifdef RD_JAVA_S60_RELEASE_9_2
     CMIDForm* Form() const;
+
+    /**
+     * Fuction sets ESingleClickDisabledHighlight - item drawer flags
+     * and reports current highlight element change event
+     */
+    void SingleClickDisableHighlightL(TBool aDisable);
+
 #endif // RD_JAVA_S60_RELEASE_9_2    
 
 #ifdef RD_TACTILE_FEEDBACK
--- a/javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupListBox.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupListBox.h	Tue May 25 12:34:19 2010 +0300
@@ -76,6 +76,14 @@
      * visible element in ChoiceGroup from top of Form.
      */
     TInt TopVisibleItemIndex();
+
+    /**
+     * Fuction sets ESingleClickDisabledHighlight - item drawer flags
+     * and reports current highlight element change event
+     */
+    void SingleClickDisableHighlightL(TBool aDisable);
+    void SetHighlight(TBool aVisible);
+
 #endif // RD_JAVA_S60_RELEASE_9_2
 
 #ifdef RD_TACTILE_FEEDBACK
@@ -92,12 +100,21 @@
 private:
     void SetTextColors();
 
+    /**
+     * Checks if highlight is needed
+     * @param aCurrentSelected - currently selected item
+     * @param aKeyEvent
+     * @return EFalse when highlight is not needed
+     */
+    TBool IsHighlightNeeded(TInt aCurrentSelected, const TKeyEvent& aKeyEvent);
+
 #ifdef RD_JAVA_S60_RELEASE_9_2
     /**
      * Fuction calculates index of element, which is the first
      * visible element in ChoiceGroup from top of Form.
      */
     void UpdateTopVisibleItemIndex();
+
 #endif // RD_JAVA_S60_RELEASE_9_2
 
 private:
--- a/javauis/lcdui_akn/lcdui/inc/CMIDEditingStateIndicator.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDEditingStateIndicator.h	Tue May 25 12:34:19 2010 +0300
@@ -196,6 +196,24 @@
      */
     void OverrideColorL(TInt aLogicalColor, TRgb aColor);
 
+    /**
+     * Sets flag if scaling is on now.
+     *
+     * @param Flag if scaling is on now.
+     *
+     * @since S60 5.0
+     */
+    inline void SetScalingOn(TBool aScaling);
+
+    /**
+     * Sets current fullscreen canvas size.
+     *
+     * @param Current fullscreen canvas size.
+      *
+     * @since S60 5.0
+     */
+    inline void SetCanvasRect(const TRect& aRect);
+
 private: // From CAknIndicatorContainer
 
     /**
@@ -238,8 +256,22 @@
     TRgb iBackgroundColor;
     // Top parent of this control. Not owned.
     CCoeControl* iParent;
+    // Flag if scaling is on now.
+    TBool iIsScalingOn;
+    // Canvas fullscreen size
+    TRect iOnScreenCanvasRect;
 };
 
+void CMIDEditingStateIndicator::SetScalingOn(TBool aScaling)
+{
+    iIsScalingOn = aScaling;
+}
+
+void CMIDEditingStateIndicator::SetCanvasRect(const TRect& aRect)
+{
+    iOnScreenCanvasRect = aRect;
+}
+
 #endif // CMIDEDITINGSTATEINDICATOR_H
 
 // End of file
--- a/javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h	Tue May 25 12:34:19 2010 +0300
@@ -200,6 +200,7 @@
     void MakeVisible(TBool aVisible);
     void SizeChanged();
     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+    void HandleResourceChange(TInt aType);
 #ifdef RD_SCALABLE_UI_V2
     void HandlePointerEventL(const TPointerEvent &aPointerEvent);
 #endif // RD_SCALABLE_UI_V2
@@ -305,6 +306,8 @@
 
     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
 
+    void CMIDTextBoxQueryDialog::SetRightScrollBarPosition();
+
 private:
     inline TUint GetConstraints() const;
     inline TBool IsConstraintSet(TUint aConstraints);
@@ -379,11 +382,18 @@
      * Boolean value indicating whether key events are pending.
      */
     TBool                       iKeyEventsPending;
-
     /**
      * Used key event
      */
     const TKeyEvent*            iusedKeyEvent;
+    /**
+     * Count line of text in iEditor
+     */
+    TInt                        iLastCountLine;
+    /**
+     * Rect of Editor
+     */
+    TRect iEditorRect;
 };
 
 
--- a/javauis/lcdui_akn/lcdui/inc/CMIDTextEditor.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDTextEditor.h	Tue May 25 12:34:19 2010 +0300
@@ -21,8 +21,11 @@
 
 // EXTERNAL INCLUDES
 #include <e32base.h>
+
+// INTERNAL INCLUDES
 #include <MMIDTextEditor.h>
 #include <MMIDCustomComponent.h>
+#include <MMIDScalable.h>
 
 #ifdef RD_TACTILE_FEEDBACK
 #include <peninputclient.h>
@@ -49,7 +52,8 @@
         public MMIDTextEditor,
         public MMIDCustomComponent,
         public MDirectContent,
-        public MCoeControlObserver
+        public MCoeControlObserver,
+        public MMIDScalable
 {
 public: // Type definitions
 
@@ -68,11 +72,11 @@
         CMIDUtils* iUtils;
 
         TCtorParams::TCtorParams() :
-                iMaxSize(0),
-                iWidth(0),
-                iHeight(0),
-                iHeightInRows(EFalse),
-                iUtils(NULL) {}
+            iMaxSize(0),
+            iWidth(0),
+            iHeight(0),
+            iHeightInRows(EFalse),
+            iUtils(NULL) {}
     };
 
 public: // Constructors and destructor
@@ -647,6 +651,12 @@
      */
     void SetDefaultIndicatorsL();
 
+public: // From MMIDScalable
+
+    TBool IsScalingOn() const;
+
+public: // own methods
+
     /**
      * Handles fullscreen state of parent Canvas.
      *
--- a/javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwin.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwin.h	Tue May 25 12:34:19 2010 +0300
@@ -21,6 +21,7 @@
 
 // INTERNAL INCLUDES
 #include "CMIDEdwinUtils.h"
+#include <MMIDScalable.h>
 
 // EXTERNAL INCLUDES
 #include <eikedwin.h>
@@ -42,7 +43,8 @@
  */
 NONSHARABLE_CLASS(CMIDTextEditorEdwin) :
         public CEikEdwin,
-        public MEikEdwinObserver
+        public MEikEdwinObserver,
+        public MMIDScalable
 {
 public: // Constructors and destructor
 
@@ -477,6 +479,36 @@
      */
     const TPtrC Read() const;
 
+    /**
+     * Sets current fullscreen canvas size.
+     *
+     * @param Current fullscreen canvas size.
+      *
+     * @since S60 5.0
+     */
+    inline void SetOnScreenCanvasRect(const TRect& aSize);
+
+    /**
+     * Gets current fullscreen canvas size.
+     *
+     * @return Current fullscreen canvas size.
+      *
+     * @since S60 5.0
+     */
+    inline TRect GetOnScreenCanvasRect() const;
+
+    /**
+     * Sets flag if scaling is on now.
+     *
+     * @param Flag if scaling is on now.
+     *
+     * @since S60 5.0
+     */
+    inline void SetScaling(TBool aScaling);
+
+public: // From MMIDScalable
+    inline TBool IsScalingOn() const;
+
 protected: // New methods.
 
     /**
@@ -559,6 +591,10 @@
     TAknLayoutId iDirection;
     // Visible content height used for sending scroll event
     TBool iVisibleContentHeight;
+    // Canvas fullscreen size
+    TRect iOnScreenCanvasRect;
+    // Flag if scaling is on now.
+    TBool iIsScalingOn;
 };
 
 // ---------------------------------------------------------------------------
@@ -571,6 +607,26 @@
     return (iConstraints & MMIDTextField::EConstraintMask) == aConstraint;
 }
 
+inline void CMIDTextEditorEdwin::SetOnScreenCanvasRect(const TRect& aRect)
+{
+    iOnScreenCanvasRect = aRect;
+}
+
+inline TRect CMIDTextEditorEdwin::GetOnScreenCanvasRect() const
+{
+    return iOnScreenCanvasRect;
+}
+
+inline TBool CMIDTextEditorEdwin::IsScalingOn() const
+{
+    return iIsScalingOn;
+}
+
+inline void CMIDTextEditorEdwin::SetScaling(TBool aScaling)
+{
+    iIsScalingOn = aScaling;
+}
+
 #endif // CMIDTEXTEDITOREDWIN_H
 
 // End of file
--- a/javauis/lcdui_akn/lcdui/inc/CMIDUtils.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDUtils.h	Tue May 25 12:34:19 2010 +0300
@@ -87,7 +87,6 @@
     {
     public:
         inline TScalingData();
-        inline TBool operator==(const TScalingData& aData) const;
 
         TSize iOriginalSize;
         TSize iTargetSize;
@@ -280,12 +279,26 @@
      */
     TSize DoDescaling(TSize aNonScaled);
 
+
     /**
-     * Reset of iScalingData
+     * Get information about scaling settings.
+     *
+     * @return ETrue if Nokia-MIDlet-Original-Display-Size is set.
+     *         EFalse otherwise.
      *
      * @since S60 5.0
      */
-    void ResetScalingData();
+    TBool IsScalingEnabled();
+
+
+    /**
+     * Gets current size of fullscreen canvas.
+     *
+     * @return current size of fullscreen canvas
+     *
+     * @since S60 5.0
+     */
+    TRect GetOnScreenCanvasRect();
 
     /**
      * @return ETrue if aChar is one of the following characters: 0x0a, 0x0d, 0x2028
@@ -354,6 +367,8 @@
      */
     CMIDUtils::TScalingData GetScalingData();
 
+    void UpdateScalingData();
+
     void UpdateStickyKeyFlags(const TKeyEvent& aKeyEvent);
     void UpdatePTIEngineStatusL();
 
@@ -410,6 +425,9 @@
 
     // Instace of menu handler. Needed for scaling. Not owned.
     CMIDMenuHandler* iMenuHandler;
+
+    // Flag if scaling data was initialized.
+    TBool iScalingDataInitialized;
 };
 
 inline void CMIDUtils::Dispose()
@@ -418,25 +436,11 @@
 }
 
 inline CMIDUtils::TScalingData::TScalingData(): iOriginalSize(),
-        iTargetSize(),
-        iScreenSize(),
-        iCanvasSize(),
-        iRatioX(1.0f),
-        iRatioY(1.0f)
+    iTargetSize(),
+    iScreenSize(),
+    iCanvasSize(),
+    iRatioX(1.0f),
+    iRatioY(1.0f)
 {}
 
-inline TBool CMIDUtils::TScalingData::operator==(const TScalingData& aData) const
-{
-    if (iOriginalSize == aData.iOriginalSize
-            && iTargetSize == aData.iTargetSize
-            && iScreenSize == aData.iScreenSize
-            && iCanvasSize == aData.iCanvasSize
-            && iRatioX == aData.iRatioX
-            && iRatioY == aData.iRatioY)
-    {
-        return ETrue;
-    }
-    return EFalse;
-}
-
 #endif // CMIDUTILS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/lcdui_akn/lcdui/inc/MMIDScalable.h	Tue May 25 12:34:19 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.
+*
+*/
+
+
+#ifndef MMIDSCALABLE_H
+#define MMIDSCALABLE_H
+
+// For TBool type
+#include <e32def.h>
+
+/**
+ * Interface class for scalable components.
+ *
+ * @since S60 5.0
+ */
+class MMIDScalable
+{
+public:
+
+    /**
+     * Get information if current Displayble (like Canvas) is scaled.
+      *
+     * @return ETrue if scaling is on. EFalse otherwise.
+     * @since S60 5.0
+     */
+    virtual TBool IsScalingOn() const = 0;
+};
+
+#endif // MMIDSCALEBLE_H
+
+// End of File
--- a/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp	Tue May 25 12:34:19 2010 +0300
@@ -146,7 +146,7 @@
     return *static_cast< const TBitBltData* >(aOp->Data());
 }
 
-
+#ifdef RD_JAVA_NGA_ENABLED
 // ---------------------------------------------------------------------------
 // IsDownScaling
 // Check if downscaling in use.
@@ -154,13 +154,30 @@
 // @param aDestRect Destination rect.
 // ---------------------------------------------------------------------------
 //
+inline TBool IsDownScaling(const TSize& aSourceSize, const TRect& aDestRect, TBool aM3GContent)
+{
+    // if m3G is drawing then downscaling is turn off
+    if (aM3GContent)
+    {
+        return EFalse;
+    }
+    return (aSourceSize.iWidth > aDestRect.Width() ||
+            aSourceSize.iHeight > aDestRect.Height());
+}
+#else
+// ---------------------------------------------------------------------------
+// IsDownScaling
+// Check if downscaling in use.
+// @param aSourceSize Source rect size.
+// @param aDestRect Destination rect.
+// ---------------------------------------------------------------------------
 inline TBool IsDownScaling(const TSize& aSourceSize, const TRect& aDestRect)
 {
     return (aSourceSize.iWidth > aDestRect.Width() ||
             aSourceSize.iHeight > aDestRect.Height());
 }
 
-
+#endif //RD_JAVA_NGA_ENABLED
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -384,7 +401,7 @@
 //
 void CMIDCanvas::SetFocusedComponent(MMIDCustomComponent* aComponent)
 {
-    if (aComponent == NULL)
+    if (!aComponent)
     {
         iFocusedComponent = KComponentFocusedNone;
         iPressedComponent = NULL;
@@ -829,7 +846,7 @@
             DEBUG("CMIDCanvas::ProcessL - M3G content start");
             iM3GContent = ETrue;
             iM3GStart = ETrue;
-
+            PostEvent(EM3GDraw, iM3GContent, 0);
             // First time when M3G content is drawn =>
             // switch to EGL surface drawing.
             // Pixel source must be disposed first.
@@ -854,7 +871,7 @@
         {
             iFirstPaintState = EFirstPaintInitiated;
         }
-        
+
         const TBitBltData& data = BitBltData(aRead);
         UpdateL(data.iRect);
     }
@@ -865,7 +882,7 @@
         {
             iFirstPaintState = EFirstPaintInitiated;
         }
-        
+
         UpdateL(iViewRect);
     }
     break;
@@ -963,12 +980,12 @@
         aRead += aRead->Size();
     }
 #endif // CANVAS_DOUBLE_BUFFER
-    
+
     if (iFirstPaintState == EFirstPaintNeverOccurred)
     {
         if (iForeground)
         {
-            // The canvas is current, therefore we can flush 
+            // The canvas is current, therefore we can flush
             // the graphics and take the start screen snapshot.
             iFirstPaintState = EFirstPaintOccurred;
             java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->stopStartScreen();
@@ -980,9 +997,9 @@
             iFirstPaintState = EFirstPaintInitiated;
         }
     }
-    
+
     DEBUG("- CMIDCanvas::ProcessL");
-    
+
     return EFalse;
 }
 #endif // RD_JAVA_NGA_ENABLED
@@ -1534,7 +1551,14 @@
     else
     {
         // Must draw via CCoeControl framework
-        DrawNow(aRect);
+        if (iFullScreen && iScalingOn)
+        {
+            DrawNow(iViewRect);
+        }
+        else
+        {
+            DrawNow(aRect);
+        }
     }
 
     // This is needed to avoid artifacting after orientation switch.
@@ -1725,9 +1749,9 @@
             ELOG1(EJavaUI, "eglSwapBuffers() failed, eglError=%d", eglGetError());
             ASSERT(EFalse);
         }
-        
+
         SetCurrentEglType(EEglNone);
-        
+
         if (iFirstPaintState != EFirstPaintOccurred)
         {
             iFirstPaintState = EFirstPaintOccurred;
@@ -1768,40 +1792,45 @@
         DEBUG("DrawWindow - Not scaled - BitBlt");
         gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect);
     }
-    else if (IsDownScaling(iContentSize, iViewRect))
-    {
-        DEBUG("DrawWindow - Downscaling - BitBlt");
-        gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect.Size());
-    }
+    else
+#ifdef RD_JAVA_NGA_ENABLED
+        if (IsDownScaling(iContentSize, iViewRect, iM3GContent))
+#else
+        if (IsDownScaling(iContentSize, iViewRect))
+#endif //RD_JAVA_NGA_ENABLED
+        {
+            DEBUG("DrawWindow - Downscaling - BitBlt");
+            gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect.Size());
+        }
     // Upscaling
-    else if (iScaler)
-    {
-        iFrameBuffer->LockHeap();
-        TUint32* pixelData = iFrameBuffer->DataAddress();
-
-        // Scale the framebuffer content.
-        CFbsBitmap* map = iScaler->Process(
-                              iFrameBuffer->DisplayMode(),
-                              pixelData,
-                              iContentSize.iWidth,
-                              iContentSize.iHeight,
-                              iFrameBuffer->SizeInPixels().iWidth - iContentSize.iWidth,
-                              iViewRect.Width(),
-                              iViewRect.Height());
-
-        iFrameBuffer->UnlockHeap();
-
-        if (map)
+        else if (iScaler)
         {
-            DEBUG("DrawWindow - Upscaling - BitBlt - map ok");
-            gc.BitBlt(windowRect.iTl, map, windowRect.Size());
+            iFrameBuffer->LockHeap();
+            TUint32* pixelData = iFrameBuffer->DataAddress();
+
+            // Scale the framebuffer content.
+            CFbsBitmap* map = iScaler->Process(
+                                  iFrameBuffer->DisplayMode(),
+                                  pixelData,
+                                  iContentSize.iWidth,
+                                  iContentSize.iHeight,
+                                  iFrameBuffer->SizeInPixels().iWidth - iContentSize.iWidth,
+                                  iViewRect.Width(),
+                                  iViewRect.Height());
+
+            iFrameBuffer->UnlockHeap();
+
+            if (map)
+            {
+                DEBUG("DrawWindow - Upscaling - BitBlt - map ok");
+                gc.BitBlt(windowRect.iTl, map, windowRect.Size());
+            }
+            else
+            {
+                DEBUG("DrawWindow - Upscaling - DrawBitmap - no map");
+                gc.DrawBitmap(windowRect, iFrameBuffer, iContentSize);
+            }
         }
-        else
-        {
-            DEBUG("DrawWindow - Upscaling - DrawBitmap - no map");
-            gc.DrawBitmap(windowRect, iFrameBuffer, iContentSize);
-        }
-    }
 
 #ifdef RD_JAVA_NGA_ENABLED
     iCoeEnv->WsSession().Finish();
@@ -2040,8 +2069,7 @@
     {
         // If orientation change is done,
         // then we have to inform all components about it.
-        if (iFocusedComponent != KComponentFocusedNone &&
-                iFullScreen)
+        if (iFullScreen && iScalingOn)
         {
             for (int i = 0; i < iCustomComponents.Count(); i++)
             {
@@ -2393,12 +2421,12 @@
             CustomComponentControl(KComponentMainControl)->
             SetFocus(EFalse);
         }
-        
-#ifdef RD_JAVA_NGA_ENABLED        
+
+#ifdef RD_JAVA_NGA_ENABLED
         // Avoid the situation when the content is drawn over the menu
         SuspendPixelSource();
 #endif // RD_JAVA_NGA_ENABLED
-        
+
         // Repaint to ensure that fading will be displayed correctly for Alert
         // or PopupTextBox when DSA is paused.
         DrawDeferred();
@@ -2631,23 +2659,23 @@
     TBool aUpdateRequired
 #endif // CANVAS_DIRECT_ACCESS
 ) :
-        CCoeControl()
-        ,iEnv(aEnv)
+    CCoeControl()
+    ,iEnv(aEnv)
 #ifdef CANVAS_DOUBLE_BUFFER
-        ,iFrameBuffer(NULL)
+    ,iFrameBuffer(NULL)
 #endif // CANVAS_DOUBLE_BUFFER
-        ,iIsGameCanvas((
-                           aComponentType == MMIDComponent::EGameCanvas ? ETrue : EFalse))
-        ,iFlags(EPostKeyEvents)
-        ,iFullScreen(EFalse)
-        ,iScalingOn(EFalse)
-        ,iS60SelectionKeyCompatibility(EFalse)
-        ,iRestoreContentWhenUnfaded(EFalse)
-        ,iLastFadeMessage(0)
+    ,iIsGameCanvas((
+                       aComponentType == MMIDComponent::EGameCanvas ? ETrue : EFalse))
+    ,iFlags(EPostKeyEvents)
+    ,iFullScreen(EFalse)
+    ,iScalingOn(EFalse)
+    ,iS60SelectionKeyCompatibility(EFalse)
+    ,iRestoreContentWhenUnfaded(EFalse)
+    ,iLastFadeMessage(0)
 #ifdef CANVAS_DIRECT_ACCESS
-        ,iDcDsaToStart(EFalse)
+    ,iDcDsaToStart(EFalse)
 #endif // CANVAS_DIRECT_ACCESS
-        ,iDragEventsStartedInside(EFalse)
+    ,iDragEventsStartedInside(EFalse)
 {
     DEBUG("+ CMIDCanvas::CMIDCanvas - EDirectEnabled");
 
@@ -3407,7 +3435,7 @@
 void CMIDCanvas::HandleForeground(TBool aForeground)
 {
     DEBUG_INT("CMIDCanvas::HandleForeground(%d) ++", aForeground);
-    
+
     iForeground = aForeground;
 
 #ifdef RD_JAVA_NGA_ENABLED
@@ -3429,7 +3457,7 @@
         SuspendPixelSource();
     }
 #endif // RD_JAVA_NGA_ENABLED
-    
+
     DEBUG("CMIDCanvas::HandleForeground --");
 }
 
@@ -3511,7 +3539,7 @@
         return;
     }
 
-    // ProduceNewFrameL() is called in some cases 
+    // ProduceNewFrameL() is called in some cases
     // directly from ActivateSyncL(), need to set iFrameReady
     // before ActivateSyncL()
     iFrameReady = ETrue;
@@ -3589,27 +3617,27 @@
     else
     {
         NotifyMonitor();
-    
+
         TUint8* from = (TUint8*)iFrameBuffer->DataAddress();
-    
-        TBool downScaling = IsDownScaling(iContentSize, iViewRect);
+
+        TBool downScaling = IsDownScaling(iContentSize, iViewRect, iM3GContent);
         TInt width =  downScaling ? iViewRect.Width()  : iContentSize.iWidth;
         TInt height = downScaling ? iViewRect.Height() : iContentSize.iHeight;
-    
+
         TUint bytes = width * KBytesPerPixel;
         TInt scanLength = CFbsBitmap::ScanLineLength(
                               iFrameBuffer->SizeInPixels().iWidth, iFrameBuffer->DisplayMode());
-    
+
         for (TInt y = 0; y < height; ++y)
         {
             Mem::Copy(aBuffer, from, bytes);
             aBuffer += iAlfBufferAttributes.iStride;
             from += scanLength;
         }
-    
+
         res = ETrue;
     }
-    
+
     if (iFirstPaintState == EFirstPaintInitiated || iFirstPaintState == EFirstPaintPrepared)
     {
         if (iFirstPaintState == EFirstPaintInitiated)
@@ -3622,9 +3650,9 @@
             java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->stopStartScreen();
         }
     }
-    
+
     DEBUG("CMIDCanvas::ProduceNewFrameL --");
-    
+
     return res;
 }
 
@@ -3639,7 +3667,7 @@
     DEBUG_INT2("CMIDCanvas::BufferAttributes - iContentSize(w=%d, h=%d) ++",
                iContentSize.iWidth, iContentSize.iHeight);
 
-    TBool downScaling = IsDownScaling(iContentSize, iViewRect);
+    TBool downScaling = IsDownScaling(iContentSize, iViewRect, iM3GContent);
     iAlfBufferAttributes.iWidth  = downScaling ? iViewRect.Width() : iContentSize.iWidth;
     iAlfBufferAttributes.iHeight = downScaling ? iViewRect.Height() : iContentSize.iHeight;
 
@@ -3804,7 +3832,7 @@
     iM3GStart = EFalse;
     iEglPendingResize = EFalse;
     iEglPendingDispose = EFalse;
-
+    PostEvent(EM3GDraw, iM3GContent, 0);
     if (iEglDisplay == EGL_NO_DISPLAY)
     {
         return;
@@ -4209,7 +4237,7 @@
         return EFalse;
     }
     TEglType current = GetCurrentEglType();
-    if (aSurfaceType == EEglNone || aRgba == NULL)
+    if (aSurfaceType == EEglNone || !aRgba)
     {
         if (iScalingOn && iFullScreen)
         {
@@ -4217,7 +4245,7 @@
             {
                 aSurfaceType = EEglPbuffer;
             }
-            if (aRgba == NULL)
+            if (!aRgba)
             {
                 glClearColor(0.f, 0.f, 0.f, 1.f);
             }
@@ -4228,14 +4256,14 @@
             {
                 aSurfaceType = EEglWindow;
             }
-            if (aRgba == NULL)
+            if (!aRgba)
             {
                 glClearColor(1.f, 1.f, 1.f, 1.f);
             }
         }
     }
     SetCurrentEglType(aSurfaceType);
-    if (aRgba != NULL)
+    if (aRgba)
     {
         glClearColor(
             aRgba->Red() / 255.f, aRgba->Green() / 255.0f,
@@ -4260,7 +4288,7 @@
     }
 
     TRect rect(aRect);
-    TRect canvasRect = IsDownScaling(iContentSize, iViewRect) ?
+    TRect canvasRect = IsDownScaling(iContentSize, iViewRect, iM3GContent) ?
                        TRect(iViewRect.Size()) : TRect(iContentSize);
     rect.Intersection(canvasRect);
 
@@ -4897,6 +4925,5 @@
     return KEglSuccess;
 }
 
-
 #endif // RD_JAVA_NGA_ENABLED        
 // End of File.
--- a/javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItem.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItem.cpp	Tue May 25 12:34:19 2010 +0300
@@ -53,6 +53,7 @@
 {
     // Set painter
     iItemPainter = aParams.iPainterHandle;
+    iItemPainter->SetItem(this);
     iComponentContainer = NULL;
     iUtils = aParams.iUtils;
 }
@@ -61,7 +62,8 @@
 // CMIDCanvasGraphicsItem::CMIDCanvasGraphicsItem
 // ---------------------------------------------------------------------------
 //
-CMIDCanvasGraphicsItem::CMIDCanvasGraphicsItem()
+CMIDCanvasGraphicsItem::CMIDCanvasGraphicsItem() :
+    iUtils(NULL)
 {
     // No implementation.
 }
@@ -150,6 +152,18 @@
     // Store container. NULL is ok.
     iComponentContainer = aComponentContainer;
 
+    // Set item size and position is needed here.
+    TSize size = iItemPainter->Size();
+    SetSizeL(size.iWidth, size.iHeight);
+    TPoint position = iItemPainter->Position();
+    SetPosition(position.iX, position.iY);
+
+    if (iUtils)
+    {
+        // Set canvas fullscreen size is needed here.
+        iItemPainter->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
+
     DEBUG("CMIDCanvasGraphicsItem::SetParentL -");
 }
 
@@ -227,12 +241,28 @@
 //
 void CMIDCanvasGraphicsItem::SetSizeL(const TInt aWidth, const TInt aHeight)
 {
+    // We need store non-scaled size for possible resolution
+    // and fullscreen mode changes.
+    iNonScaledSize = TSize(aWidth, aHeight);
     DEBUG_INT2(
         "CMIDCanvasGraphicsItem::SetItemSize +, aWidth=%d, aHeight=%d",
         aWidth, aHeight);
 
+    // Set item size.
     iItemPainter->SetItemSizeL(aWidth, aHeight);
 
+    // If parent is in fullscreen mode
+    // then it tries scale viewing rect for painter.
+    // Otherwise the non scaled size is set.
+    if (IsScalingOn())
+    {
+        iItemPainter->SetViewSize(iUtils->DoScaling(iNonScaledSize));
+    }
+    else
+    {
+        iItemPainter->SetViewSize(iNonScaledSize);
+    }
+
     DEBUG("CMIDCanvasGraphicsItem::SetItemSize -");
 }
 
@@ -245,7 +275,22 @@
 {
     DEBUG_INT2("CMIDCanvasGraphicsItem::SetPosition +, aX=%d, aY=%d", aX, aY);
 
-    iItemPainter->SetPosition(aX, aY);
+    // We need store non-scaled size for possible resolution
+    // and fullscreen mode changes.
+    iNonScaledPosition = TPoint(aX, aY);
+
+    // If parent is in fullscreen mode
+    // then it tries scale position of item.
+    // Otherwise the non scaled size is set.
+    if (IsScalingOn())
+    {
+        TPoint origin = iUtils->DoScalingAndPositioning(iNonScaledPosition);
+        iItemPainter->SetPosition(origin.iX, origin.iY);
+    }
+    else
+    {
+        iItemPainter->SetPosition(aX, aY);
+    }
 
     DEBUG("CMIDCanvasGraphicsItem::SetPosition -");
 }
@@ -266,22 +311,51 @@
 
 // ---------------------------------------------------------------------------
 // CMIDCanvasGraphicsItem::HandleFullscreenModeChange
-// Intentionally this is not implemented.
-// CanavsGraohicsItem is not doing any action in this case.
+// (other items are commented in the header file)
 // ---------------------------------------------------------------------------
 //
 void CMIDCanvasGraphicsItem::HandleFullscreenModeChange()
 {
+    // Calling all functions which set size and position.
+    TRAPD(err, SetSizeL(iNonScaledSize.iWidth, iNonScaledSize.iHeight));
+    if (err != KErrNone)
+    {
+        DEBUG_INT("CMIDCanvasGraphicsItem::HandleFullscreenModeChange: SetSizeL method leave with %d code", err);
+    }
+    SetPosition(iNonScaledPosition.iX, iNonScaledPosition.iY);
+
+    if (iUtils)
+    {
+        // Setting of fullscreen canvas rect.
+        iItemPainter->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
 }
 
 // ---------------------------------------------------------------------------
 // CMIDCanvasGraphicsItem::HandleResolutionChange
-// Intentionally this is not implemented.
-// CanavsGraohicsItem is not doing any action in this case.
+// (other items are commented in the header file)
 // ---------------------------------------------------------------------------
 //
 void CMIDCanvasGraphicsItem::HandleResolutionChange()
 {
+    // Calling all functions which set size and position.
+    TRAPD(err, SetSizeL(iNonScaledSize.iWidth, iNonScaledSize.iHeight));
+    if (err != KErrNone)
+    {
+        DEBUG_INT("CMIDCanvasGraphicsItem::HandleFullscreenModeChange: SetSizeL method leave with %d code", err);
+    }
+    SetPosition(iNonScaledPosition.iX, iNonScaledPosition.iY);
+    if (iUtils)
+    {
+        // Setting of fullscreen canvas rect.
+        iItemPainter->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
+}
+
+TBool CMIDCanvasGraphicsItem::IsScalingOn() const
+{
+    return iUtils && iComponentContainer && iUtils->IsScalingEnabled() &&
+           iComponentContainer->IsFullScreen();
 }
 
 // End of file
--- a/javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItemPainter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDCanvasGraphicsItemPainter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -64,7 +64,7 @@
 // ---------------------------------------------------------------------------
 //
 CMIDCanvasGraphicsItemPainter::CMIDCanvasGraphicsItemPainter(MMIDEnv& aEnv) :
-        iEnv(aEnv)
+    iEnv(aEnv)
 {
     // No implementation.
 }
@@ -117,7 +117,8 @@
         switch (aOp->OpCode())
         {
         case ESync:
-            DrawNow();
+            // We redraw the proper drawing rect.
+            DrawNow(TRect(iPosition, iViewSize));
             break;
 
         case ESyncRect:
@@ -501,11 +502,38 @@
     DEBUG("+ CMIDCanvasGraphicsItemPainter::Draw");
     ASSERT(iFrameBuffer);
 
-    if (IsVisible())
+    // This verifies if canvas graphics item can be drawn.
+    if (iItem && IsVisible())
     {
+        // Gets a size of content.
+        TSize nonScaledSize = iContentRect.Size();
+
         CWindowGc& gc = SystemGc();
 
-        gc.BitBlt(iContentRect.iTl, iFrameBuffer);
+        if (nonScaledSize == iViewSize)
+        {
+            // It draws non-scaled canvas graphics item.
+            DEBUG("BitBlt - non-scaled - DrawBitmap");
+            gc.BitBlt(iContentRect.iTl, iFrameBuffer);
+        }
+        else
+        {
+            // Scaling.
+
+            // When scaling is on, move drawing position is needed.
+            TRect windowRect = TRect(iViewSize);
+            windowRect.Move(PositionRelativeToScreen());
+
+            // It sets clip of system gc to current canvas size.
+            gc.SetClippingRect(iOnScreenCanvasRect);
+
+            // It draws scaled canvas graphics item.
+            DEBUG("DrawWindow - Scaling - DrawBitmap");
+            gc.DrawBitmap(windowRect, iFrameBuffer, TRect(nonScaledSize));
+
+            // Cancel of clipping rect.
+            gc.CancelClippingRect();
+        }
     }
 
     DEBUG("- CMIDCanvasGraphicsItemPainter::Draw");
--- a/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp	Tue May 25 12:34:19 2010 +0300
@@ -307,6 +307,21 @@
     }
 }
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+/**
+ * Fuction sets ESingleClickDisabledHighlight - item drawer flags
+ * and reports current highlight element change event
+ */
+void CMIDChoiceGroupControl::SingleClickDisableHighlightL(TBool aDisable)
+{
+    // Highlight should be disabled when listbox element taped
+    if (iListBox)
+    {
+        iListBox->SingleClickDisableHighlightL(aDisable);
+    }
+}
+#endif
+
 // msk
 void CMIDChoiceGroupControl::CurrentItemChanged()
 {
@@ -633,6 +648,14 @@
     case MEikListBoxObserver::EEventItemActioned:
         ToggleCurrentItemSelectionL();
         break;
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    case MEikListBoxObserver::EEventPenDownOnItem:
+        if (iListBox)
+        {
+            iListBox->SetHighlight(EFalse);
+        }
+        break;
+#endif
 
     default:
         break;
--- a/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupItem.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupItem.cpp	Tue May 25 12:34:19 2010 +0300
@@ -509,7 +509,7 @@
         {
             CMIDControlItem::HandlePointerEventL(aPointerEvent);
         }
-#endif // RD_JAVA_S60_RELEASE_9_2        
+#endif // RD_JAVA_S60_RELEASE_9_2
         break;
     }
 
@@ -517,6 +517,14 @@
         CMIDControlItem::HandlePointerEventL(aPointerEvent);
         break;
     }
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aPointerEvent.iType == TPointerEvent::EButton1Down)
+    {
+        // highlight should be disabled when choicegroup taped
+        iChoiceGroupControl->SingleClickDisableHighlightL(ETrue);
+    }
+#endif // RD_JAVA_S60_RELEASE_9_2
 }
 #endif //RD_SCALABLE_UI_V2
 
--- a/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupListBox.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupListBox.cpp	Tue May 25 12:34:19 2010 +0300
@@ -134,18 +134,14 @@
             {
                 // First top visible element should be highlighted
                 iView->SetCurrentItemIndex(iTopVisibleItemIndex);
+
                 // Item drawer must know, that highlight should be enabled
                 // from now.
-                CColumnListBoxItemDrawer* drawer = ItemDrawer();
-                if (drawer)
+                if (IsHighlightNeeded(oldCurrent,aKeyEvent))
                 {
-                    drawer->ClearFlags(
-                        CListItemDrawer::ESingleClickDisabledHighlight);
+                    SingleClickDisableHighlightL(EFalse);
                 }
-                // Report, that current highlighted element changed
-                ReportEventL(MCoeControlObserver::EEventStateChanged);
                 resp = EKeyWasConsumed;
-                DrawNow();
                 iTopVisibleItemIndex = KErrNotFound;
             }
             // Enable highlight flag for this ChoiceGroup, even if top visible
@@ -170,19 +166,7 @@
         // Return  EKeyWasNotConsumed so that the form knows to transfer focus
         // BUT ONLY if not used in a popup (otherwise the form will get it and
         // move focus under the popup)
-        TInt newCurrent = iView->CurrentItemIndex();
-        TBool change = oldCurrent != newCurrent;
-        TInt lastItemIdx = KErrNotFound;
-        if (iModel)
-        {
-            lastItemIdx = iModel->NumberOfItems() - 1;
-        }
-        if ((aKeyEvent.iCode == EKeyUpArrow) && !change && (newCurrent == 0))
-        {
-            resp = EKeyWasNotConsumed;
-        }
-        if ((aKeyEvent.iCode == EKeyDownArrow) && !change &&
-                (newCurrent == lastItemIdx))
+        if (!IsHighlightNeeded(oldCurrent,aKeyEvent))
         {
             resp = EKeyWasNotConsumed;
         }
@@ -470,6 +454,37 @@
 }
 #endif
 
+/**
+ * Checks if highlight is needed
+ * Returns EFalse if there should be no highlight
+ */
+TBool CMIDChoiceGroupListBox::IsHighlightNeeded(TInt aCurrentSelected,
+        const TKeyEvent& aKeyEvent)
+{
+    // If the key was up or down, and the current item did not change,
+    // we were apparently already on the first or last item.
+    // Return  EFalse when highlight should be lost
+    TBool isHighlightNeeded = ETrue;
+    TInt newCurrent = iView->CurrentItemIndex();
+    TBool change = aCurrentSelected != newCurrent;
+    TInt lastItemIdx = KErrNotFound;
+
+    if (iModel)
+    {
+        lastItemIdx = iModel->NumberOfItems() - 1;
+    }
+    if ((aKeyEvent.iCode == EKeyUpArrow) && !change && (newCurrent == 0))
+    {
+        isHighlightNeeded = EFalse;
+    }
+    if ((aKeyEvent.iCode == EKeyDownArrow) && !change &&
+            (newCurrent == lastItemIdx))
+    {
+        isHighlightNeeded = EFalse;
+    }
+    return isHighlightNeeded;
+}
+
 #ifdef RD_JAVA_S60_RELEASE_9_2
 /**
  * Returns index of ChoiceGroup element, which is the first
@@ -530,4 +545,40 @@
         iTopVisibleItemIndex = KErrNotFound;
     }
 }
+/**
+ * Fuction sets ESingleClickDisabledHighlight - item drawer flags
+ * and reports current highlight element change event
+ */
+void CMIDChoiceGroupListBox::SingleClickDisableHighlightL(TBool aDisable)
+{
+    // Item drawer must know, that highlight should be enabled/disabled
+    // when listbox element taped
+    CColumnListBoxItemDrawer* drawer = ItemDrawer();
+    if (drawer)
+    {
+        if (aDisable)
+        {
+            if (iHighlight)
+            {
+                // Set flags in Item drawer so that highlight could be disabled
+                drawer->SetFlags(CListItemDrawer::ESingleClickDisabledHighlight);
+                iHighlight = EFalse;
+                iTopVisibleItemIndex = KErrNotFound;
+            }
+        }
+        else
+        {
+            // Set flags in Item drawer so that highlight could be enabled
+            drawer->ClearFlags(CListItemDrawer::ESingleClickDisabledHighlight);
+        }
+    }
+    // Report, that current highlighted element changed
+    ReportEventL(MCoeControlObserver::EEventStateChanged);
+    DrawNow();
+}
+
+void CMIDChoiceGroupListBox::SetHighlight(TBool aVisible)
+{
+    iHighlight = aVisible;
+}
 #endif // RD_JAVA_S60_RELEASE_9_2
--- a/javauis/lcdui_akn/lcdui/src/CMIDEditingStateIndicator.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDEditingStateIndicator.cpp	Tue May 25 12:34:19 2010 +0300
@@ -591,12 +591,25 @@
     DEBUG("CMIDEditingStateIndicator::Draw +");
 
     CWindowGc& gc = SystemGc();
+
+    // If scaling is on, clip to canvas rect is needed.
+    if (iIsScalingOn)
+    {
+        gc.SetClippingRect(iOnScreenCanvasRect);
+    }
+
     // Draw background with background color
     TRgb backgroundColor;
     GetColor(EColorControlBackground, backgroundColor);
     gc.SetBrushColor(backgroundColor);
     gc.Clear(aRect);
 
+    // cancel of clip
+    if (iIsScalingOn)
+    {
+        gc.CancelClippingRect();
+    }
+
     DEBUG("CMIDEditingStateIndicator::Draw -");
 }
 
@@ -615,7 +628,7 @@
 // ---------------------------------------------------------------------------
 //
 CMIDEditingStateIndicator::CMIDEditingStateIndicator() :
-        CAknIndicatorContainer(CAknIndicatorContainer::EQueryEditorIndicators)
+    CAknIndicatorContainer(CAknIndicatorContainer::EQueryEditorIndicators)
 {
     DEBUG("CMIDEditingStateIndicator::CMIDEditingStateIndicator");
 }
--- a/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp	Tue May 25 12:34:19 2010 +0300
@@ -3647,6 +3647,14 @@
 // modifies: CMIDForm, CMIDFormRow
 void CMIDForm::DeleteRows()
 {
+    // By deleting rows we are losing pointers to original items.
+    // To avoid any problems with using iPointedControl, which
+    // could points to invalid object (e.g. used in
+    // CMIDForm::HandleHighlightTimer or
+    // in CMIDForm::HandlePhysicsPointerEventL),
+    // iPointedControl must be set to NULL.
+    iPointedControl = NULL;
+
     for (TInt i=0; i < iRows.Count(); i++)
     {
         delete iRows[i];
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp	Tue May 25 12:34:19 2010 +0300
@@ -87,7 +87,7 @@
     iEdwinUtils = CMIDEdwinUtils::NewL(this, iDecimalSeparator);
 
     iConstraints = aConstraints;
-
+    iLastCountLine = 0;
     // if text is invalid according to constraints, throw IllegalArgumentException,
     // except for a PHONENUMBER which only has the invalid characters removed
     if ((iConstraints & MMIDTextField::EConstraintMask) != MMIDTextField::EPhoneNumber
@@ -456,6 +456,7 @@
 {
     CAknTextQueryDialog::FocusChanged(aDrawNow);
     TBool isFocused = IsFocused();
+    SetRightScrollBarPosition();
 }
 //
 // We do not want to become visible if we are not showing
@@ -484,6 +485,12 @@
     {
         CAknTextQueryDialog::SizeChanged();
     }
+    if (iEditor && iEditor->ScrollBarFrame() && iEditor->ScrollBarFrame()->VerticalScrollBar())
+    {
+        iEditorRect = iEditor->Rect();
+        iEditorRect.SetWidth(iEditorRect.Width() - iEditor->ScrollBarFrame()->VerticalScrollBar()->Rect().Width());
+        SetRightScrollBarPosition();
+    }
 }
 
 TKeyResponse CMIDTextBoxQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
@@ -953,6 +960,14 @@
         {
             iEditor->HandleTextChangedL();
         }
+        if (iEditor && iEditor->TextLayout())
+        {
+            if (iLastCountLine != iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1))
+            {
+                iLastCountLine = iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1);
+                SetRightScrollBarPosition();
+            }
+        }
     }
 }
 
@@ -1308,8 +1323,8 @@
 and other parameters.
 */
 void CMIDTextBoxQueryDialog::AddCommandToEdwinL(TInt aCommandResIdShort,
-                                                TInt aCommandResIdLong,
-                                                TInt aCommandId)
+        TInt aCommandResIdLong,
+        TInt aCommandId)
 {
     TBuf<64> shortLabel;
     iEikonEnv->ReadResourceL(shortLabel, aCommandResIdShort);
@@ -1329,7 +1344,7 @@
 Creates and adds new command to edwin, short label is the same as long label.
 */
 void CMIDTextBoxQueryDialog::AddCommandToEdwinL(TInt aCommandResId,
-                                                TInt aCommandId)
+        TInt aCommandId)
 {
     AddCommandToEdwinL(aCommandResId, aCommandResId, aCommandId);
 }
@@ -1431,16 +1446,54 @@
 
 TTypeUid::Ptr CMIDTextBoxQueryDialog::MopSupplyObject(TTypeUid aId)
 {
+    TTypeUid::Ptr ret = TTypeUid::Null();
+
     if (aId.iUid == CEikMenuBar::ETypeId)
     {
         if (iDisplayable && iDisplayable->MenuHandler())
         {
-            return SupplyMopObject(aId,
-                                   iDisplayable->MenuHandler()->Cba(),
-                                   iDisplayable->MenuHandler()->MenuBar());
+            // number of all commands
+            TInt numberOfCommands = iDisplayable->CommandCount();
+
+            // If there are no commands we should not call SupplyMopObject
+            if (numberOfCommands > 0)
+            {
+                ret = SupplyMopObject(aId,
+                                      iDisplayable->MenuHandler()->Cba(),
+                                      iDisplayable->MenuHandler()->MenuBar());
+            }
         }
     }
-    return CAknTextQueryDialog::MopSupplyObject(aId);
+
+    if (!ret.Pointer())
+    {
+        ret = CAknTextQueryDialog::MopSupplyObject(aId);
+    }
+    return ret;
 }
 
+/* HandleResourceChange
+ *
+ * This method is called after a resource change event, for example after
+ * screen dynamic resolution change.
+ */
+void CMIDTextBoxQueryDialog::HandleResourceChange(TInt aType)
+{
+    CAknTextQueryDialog::HandleResourceChange(aType);
+    if (aType == KEikDynamicLayoutVariantSwitch ||
+            aType == KEikColorResourceChange || aType == KAknsMessageSkinChange ||
+            aType == KUidValueCoeColorSchemeChangeEvent)
+    {
+        SetRightScrollBarPosition();
+    }
+
+}
+
+void CMIDTextBoxQueryDialog::SetRightScrollBarPosition()
+{
+    if (iEditor)
+    {
+        iEditor->SetRect(iEditorRect);
+    }
+}
 // End of file
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditor.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditor.cpp	Tue May 25 12:34:19 2010 +0300
@@ -217,8 +217,7 @@
 
     // If parent is in fullscreen mode then it tries scale input size.
     // Only setting otherwise.
-    if (!iRowCountActive &&iComponentContainer &&
-            iComponentContainer->IsFullScreen())
+    if (IsScalingOn())
     {
         iTextEdwin->SetSize(iUtils->DoScaling(aWidth, CMIDUtils::EHorizontal),
                             iUtils->DoScaling(aHeight, CMIDUtils::EVertical));
@@ -260,7 +259,7 @@
     TSize editorSize = iTextEdwin->Size();
 
     // When scaling is on it has to descaled editor size.
-    if (iComponentContainer && iComponentContainer->IsFullScreen())
+    if (IsScalingOn())
     {
         editorSize = iUtils->DoDescaling(editorSize);
     }
@@ -314,19 +313,33 @@
     // Store container. NULL is ok.
     iComponentContainer = aComponentContainer;
 
-    if (iComponentContainer &&
-            iComponentContainer->IsFullScreen())
+    if (iComponentContainer)
     {
         if (!iRowCountActive)
         {
-            // When it is fullscreen we need call SetEditorSize to prevent wrong
+            // We need call SetEditorSize to prevent wrong
             // scaling of TextEditor.
             // (only for TextEditor not created with row counter)
             SetEditorSize(iTextEdwin->Size().iWidth, iTextEdwin->Size().iHeight);
         }
+        else
+        {
+            iNonScaledEditorSize = iTextEdwin->Size();
+        }
         SetFontL(iNonScaledFont);
     }
 
+    if (iUtils)
+    {
+        // It sets edwin variables necessary for correct clipping.
+        iTextEdwin->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+        iTextEdwin->SetScaling(IsScalingOn());
+
+        // It sets indicator variables necessary for correct clipping.
+        iEditingStateIndicator->SetScalingOn(IsScalingOn());
+        iEditingStateIndicator->SetCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
+
     DEBUG("CMIDTextEditor::SetParentL -");
 }
 
@@ -504,7 +517,7 @@
 
     // If parent is in fullscreen mode then it tries scale input position.
     // Only setting otherwise.
-    if (iComponentContainer && iComponentContainer->IsFullScreen())
+    if (IsScalingOn())
     {
         DEBUG_INT2("CMIDTextEditor::SetPosition DoScaling, aX=%d, aY=%d",
                    iUtils->DoScaling(aX, CMIDUtils::EHorizontal),
@@ -540,14 +553,14 @@
     // If position will be found in formatted text, posInfo will be filled
     // with desired informations.
     TTmPosInfo2 posInfo;
-    
+
     if (iTextEdwin->TextLayout()->FindXyPos(pos, posInfo))
     {
         // Position was found. Try to set cursor to found position.
         iTextEdwin->SetCursorPosL(posInfo.iDocPos.iPos, EFalse);
     }
 
-    DEBUG("CMIDTextEditor::SetCaretXYL -");    
+    DEBUG("CMIDTextEditor::SetCaretXYL -");
 }
 
 // ---------------------------------------------------------------------------
@@ -582,7 +595,7 @@
             iTextEdwin->SetCursorVisible(EFalse);
         }
         else if (iEditingStateIndicator->EnabledState() ==
-            CMIDEditingStateIndicator::EIndicatorStateRelative)
+                 CMIDEditingStateIndicator::EIndicatorStateRelative)
         {
             // Enable the custom indicators as in Avkon if not controlled
             // by the client application
@@ -906,7 +919,7 @@
 
     // If parent is in fullscreen mode,
     // then content height has to be descaled.
-    if (iComponentContainer && iComponentContainer->IsFullScreen())
+    if (IsScalingOn())
     {
         height = iUtils->DoDescaling(height, CMIDUtils::EHorizontal);
     }
@@ -1076,7 +1089,7 @@
     // if the constraint modifier PASSWORD is set. Passwords are single
     // line editors due to CMIDEdwinUtils::CPasswordText implementation.
     if (aMultiline == iTextEdwin->IsWrapEnabled() ||
-        iConstraints & MMIDTextField::EPassword)
+            iConstraints & MMIDTextField::EPassword)
     {
         DEBUG("CMIDTextEditor::SetMultilineL -, ignoring request");
 
@@ -1104,7 +1117,7 @@
     // it needs to redraw itself again.
     iTextEdwin->HandleTextChangedL();
     // Cursor position handling is done in CMIDTextEditorEdwin
-    iTextEdwin->SetCursorPosL(iTextEdwin->CursorPos(), EFalse); 
+    iTextEdwin->SetCursorPosL(iTextEdwin->CursorPos(), EFalse);
 
     DEBUG("CMIDTextEditor::SetMultilineL -");
 }
@@ -1335,7 +1348,7 @@
 
     TFontSpec fontspec = (aFont->Font(ETrue))->FontSpecInTwips();
     // If scaling is on, this code does scaling of size of font.
-    if (iComponentContainer && iComponentContainer->IsFullScreen())
+    if (IsScalingOn())
     {
         fontspec.iHeight=iUtils->DoScaling(fontspec.iHeight, CMIDUtils::EVertical);
     }
@@ -1972,9 +1985,7 @@
 // CMIDTextEditor::CMIDTextEditor
 // ---------------------------------------------------------------------------
 //
-CMIDTextEditor::CMIDTextEditor() : iNonScaledFont(NULL),
-        iNonScaledPosition(),
-        iNonScaledEditorSize()
+CMIDTextEditor::CMIDTextEditor() : iNonScaledFont(NULL)
 {
     // No implementation.
 }
@@ -2108,6 +2119,17 @@
 
     // restoring of iRowCountActive
     iRowCountActive = rowCountActive;
+
+    if (iUtils)
+    {
+        // It sets edwin variables necessary for correct clipping.
+        iTextEdwin->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+        iTextEdwin->SetScaling(IsScalingOn());
+
+        // It sets indicator variables necessary for correct clipping.
+        iEditingStateIndicator->SetScalingOn(IsScalingOn());
+        iEditingStateIndicator->SetCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
 }
 
 // ---------------------------------------------------------------------------
@@ -2117,9 +2139,6 @@
 //
 void CMIDTextEditor::HandleResolutionChange()
 {
-    // Reset of scaling data is needed, because size of screen is changed.
-    iUtils->ResetScalingData();
-
     // It is needed to store iRowCountActive, because SetEditorSize resets it.
     TBool rowCountActive = iRowCountActive;
 
@@ -2137,6 +2156,21 @@
 
     // restoring of iRowCountActive
     iRowCountActive = rowCountActive;
+
+    if (iUtils)
+    {
+        // It sets edwin variable necessary for correct clipping.
+        iTextEdwin->SetOnScreenCanvasRect(iUtils->GetOnScreenCanvasRect());
+
+        // It sets indicator variable necessary for correct clipping.
+        iEditingStateIndicator->SetCanvasRect(iUtils->GetOnScreenCanvasRect());
+    }
+}
+
+TBool CMIDTextEditor::IsScalingOn() const
+{
+    return iUtils && iComponentContainer && iUtils->IsScalingEnabled() &&
+           iComponentContainer->IsFullScreen();
 }
 
 // End of file
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwin.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwin.cpp	Tue May 25 12:34:19 2010 +0300
@@ -37,10 +37,10 @@
 // ---------------------------------------------------------------------------
 //
 CMIDTextEditorEdwin::CMIDTextEditorEdwin(CMIDEdwinUtils& aEdwinUtils)
-        : CEikEdwin(),
-        iMultiline(EFalse),
-        iCursorPosForAction(KErrNotFound),
-        iEdwinUtils(aEdwinUtils)
+    : CEikEdwin(),
+      iMultiline(EFalse),
+      iCursorPosForAction(KErrNotFound),
+      iEdwinUtils(aEdwinUtils)
 {
     DEBUG("CMIDTextEditorEdwin::CMIDTextEditorEdwin +");
 
@@ -247,6 +247,12 @@
     // problems. Currently it just handles the selection color.
     CWindowGc& gc = SystemGc();
 
+    // If scaling is on, clip to canvas rect is needed.
+    if (iIsScalingOn)
+    {
+        gc.SetClippingRect(iOnScreenCanvasRect);
+    }
+
     // Draw background with alpha.
     gc.SetBrushColor(iBackgroundColor);
     gc.Clear(aRect);
@@ -254,6 +260,12 @@
     // Now draw the content of the editor.
     CEikEdwin::Draw(aRect);
 
+    // cancel of clip
+    if (iIsScalingOn)
+    {
+        gc.CancelClippingRect();
+    }
+
     // Part of transparency workaround. Set drawing not active.
     iDrawInvoked = EFalse;
 
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp	Tue May 25 12:34:19 2010 +0300
@@ -31,8 +31,8 @@
     const MLafEnv& aLafEnv,
     const MFormCustomDraw& aParentDraw,
     const CMIDTextEditorEdwin& aEdwin) :
-        CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
-        iEdwin(aEdwin), iParentDraw(aParentDraw)
+    CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
+    iEdwin(aEdwin), iParentDraw(aParentDraw)
 {
     DEBUG("CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw");
 }
@@ -71,7 +71,21 @@
     }
     else
     {
-        iParentDraw.DrawBackground(aParam, aBackground, aDrawn);
+        // If scaling is on, it clips drawing to canvas size. After it
+        // draws its background.
+        // Only drawing otherwise.
+        if (iEdwin.IsScalingOn())
+        {
+            aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+            iParentDraw.DrawBackground(aParam, aBackground, aDrawn);
+
+            aParam.iGc.CancelClippingRect();
+        }
+        else
+        {
+            iParentDraw.DrawBackground(aParam, aBackground, aDrawn);
+        }
     }
 }
 
@@ -84,7 +98,21 @@
     const TParam& aParam,
     const TLineInfo& aLineInfo) const
 {
-    iParentDraw.DrawLineGraphics(aParam, aLineInfo);
+    // If scaling is on, it clips drawing to canvas size. After it
+    // draws its lines.
+    // Only drawing otherwise.
+    if (iEdwin.IsScalingOn())
+    {
+        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+        iParentDraw.DrawLineGraphics(aParam, aLineInfo);
+
+        aParam.iGc.CancelClippingRect();
+    }
+    else
+    {
+        iParentDraw.DrawLineGraphics(aParam, aLineInfo);
+    }
 }
 
 // ---------------------------------------------------------------------------
@@ -113,13 +141,33 @@
         return;
     }
 
-    iParentDraw.DrawText(
-        aParam,
-        aLineInfo,
-        aFormat,
-        aText,
-        aTextOrigin,
-        aExtraPixels);
+    // If scaling is on, it clips drawing to canvas size. After it
+    // draws its text.
+    // Only drawing otherwise.
+    if (iEdwin.IsScalingOn())
+    {
+        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+        iParentDraw.DrawText(
+            aParam,
+            aLineInfo,
+            aFormat,
+            aText,
+            aTextOrigin,
+            aExtraPixels);
+
+        aParam.iGc.CancelClippingRect();
+    }
+    else
+    {
+        iParentDraw.DrawText(
+            aParam,
+            aLineInfo,
+            aFormat,
+            aText,
+            aTextOrigin,
+            aExtraPixels);
+    }
 }
 
 #ifdef RD_JAVA_S60_RELEASE_9_2
@@ -151,15 +199,37 @@
         return;
     }
 
-    iParentDraw.DrawText(
-        aParam,
-        aLineInfo,
-        aFormat,
-        aText,
-        aStart,
-        aEnd,
-        aTextOrigin,
-        aExtraPixels);
+    // If scaling is on, it clips drawing to canvas size. After it
+    // draws its text.
+    // Only drawing otherwise.
+    if (iEdwin.IsScalingOn())
+    {
+        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+        iParentDraw.DrawText(
+            aParam,
+            aLineInfo,
+            aFormat,
+            aText,
+            aStart,
+            aEnd,
+            aTextOrigin,
+            aExtraPixels);
+
+        aParam.iGc.CancelClippingRect();
+    }
+    else
+    {
+        iParentDraw.DrawText(
+            aParam,
+            aLineInfo,
+            aFormat,
+            aText,
+            aStart,
+            aEnd,
+            aTextOrigin,
+            aExtraPixels);
+    }
 }
 #endif
 
--- a/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp	Tue May 25 12:34:19 2010 +0300
@@ -712,7 +712,8 @@
         textCase = EPtiCaseUpper;
     }
     if (modifiers & EModifierRightFunc)
-    {//EModifierRightFunc in Fn key
+    {
+        //EModifierRightFunc in Fn key
         textCase = EPtiCaseFnLower;
     }
     else if (modifiers & EModifierLeftFunc)
@@ -837,13 +838,14 @@
 // ---------------------------------------------------------------------------
 //
 CMIDUtils::CMIDUtils(MMIDEnv& aEnv, CMIDUIManager* aUIManager)
-        : iEnv(&aEnv)
-        , iUIManager(aUIManager)
-        , iScalingData()
-        , iQwertyMode(EFalse)
-        , iStickyKey(0)
-        , iLastScanCode(0)
-        , iModifier(0)
+    : iEnv(&aEnv)
+    , iUIManager(aUIManager)
+    , iScalingData()
+    , iQwertyMode(EFalse)
+    , iStickyKey(0)
+    , iLastScanCode(0)
+    , iModifier(0)
+    , iScalingDataInitialized(EFalse)
 {}
 
 CMIDUtils::~CMIDUtils()
@@ -925,7 +927,7 @@
         scaled *= data.iRatioY;
     }
 
-    DEBUG_INT("DoScaling scaled %d", scaled);
+    DEBUG_INT("DoScaling processed %d", scaled);
 
     // return of scaled value
     return scaled;
@@ -945,7 +947,7 @@
     scaled.iX *= data.iRatioX;
     scaled.iY *= data.iRatioY;
 
-    DEBUG_INT2("DoScaling scaled %d %d", scaled.iX, scaled.iY);
+    DEBUG_INT2("DoScaling processed %d %d", scaled.iX, scaled.iY);
 
     // return of scaled value
     return scaled;
@@ -972,7 +974,8 @@
     // move according to canvas origin
     scaled += canvasOrigin;
 
-    DEBUG_INT2("DoScalingAndPositioning scaled %d %d", scaled.iX, scaled.iY);
+    DEBUG_INT2("DoScalingAndPositioning processed %d %d",
+               scaled.iX, scaled.iY);
 
     // return of scaled value
     return scaled;
@@ -994,7 +997,8 @@
     scaled.iTl.iX *= data.iRatioX;
     scaled.iTl.iY *= data.iRatioY;
 
-    DEBUG_INT4("DoScaling scaled %d %d", scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
+    DEBUG_INT4("DoScaling processed %d %d",
+               scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
 
     // return of scaled value
     return scaled;
@@ -1023,8 +1027,8 @@
     // move according to canvas origin
     scaled.Move(canvasOrigin);
 
-    DEBUG_INT4("DoScalingAndPositioning scaled %d %d", scaled.iBr.iX, scaled.iBr.iY,
-               scaled.iTl.iX, scaled.iTl.iY);
+    DEBUG_INT4("DoScalingAndPositioning processed %d %d",
+               scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
 
     // return of scaled value
     return scaled;
@@ -1044,7 +1048,7 @@
     scaled.iWidth *= data.iRatioX;
     scaled.iHeight *= data.iRatioY;
 
-    DEBUG_INT2("DoScaling scaled %d %d", scaled.iWidth, scaled.iHeight);
+    DEBUG_INT2("DoScaling processed %d %d", scaled.iWidth, scaled.iHeight);
 
     // return of scaled value
     return scaled;
@@ -1071,7 +1075,7 @@
         scaled /= data.iRatioY;
     }
 
-    DEBUG_INT("DoDescaling scaled %d", scaled);
+    DEBUG_INT("DoDescaling processed %d", scaled);
 
     // return of descaled value
     return scaled;
@@ -1091,7 +1095,7 @@
     scaled.iX /= data.iRatioX;
     scaled.iY /= data.iRatioY;
 
-    DEBUG_INT2("DoDescaling scaled %d %d", scaled.iX, scaled.iY);
+    DEBUG_INT2("DoDescaling processed %d %d", scaled.iX, scaled.iY);
 
     // return of descaled value
     return scaled;
@@ -1118,7 +1122,8 @@
     scaled.iX /= data.iRatioX;
     scaled.iY /= data.iRatioY;
 
-    DEBUG_INT2("DoDescalingAndPositioning scaled %d %d", scaled.iX, scaled.iY);
+    DEBUG_INT2("DoDescalingAndPositioning processed %d %d",
+               scaled.iX, scaled.iY);
 
     // return of descaled value
     return scaled;
@@ -1140,7 +1145,8 @@
     scaled.iTl.iX /= data.iRatioX;
     scaled.iTl.iY /= data.iRatioY;
 
-    DEBUG_INT4("DoDescaling scaled %d %d", scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
+    DEBUG_INT4("DoDescaling processed %d %d",
+               scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
 
     // return of descaled value
     return scaled;
@@ -1169,7 +1175,8 @@
     scaled.iTl.iX /= data.iRatioX;
     scaled.iTl.iY /= data.iRatioY;
 
-    DEBUG_INT4("DoDescalingAndPositioning scaled %d %d", scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
+    DEBUG_INT4("DoDescalingAndPositioning processed %d %d",
+               scaled.iBr.iX, scaled.iBr.iY, scaled.iTl.iX, scaled.iTl.iY);
 
     // return of descaled value
     return scaled;
@@ -1187,7 +1194,7 @@
     scaled.iWidth /= data.iRatioX;
     scaled.iHeight /= data.iRatioY;
 
-    DEBUG_INT2("DoDescaling scaled %d %d", scaled.iWidth, scaled.iHeight);
+    DEBUG_INT2("DoDescaling processed %d %d", scaled.iWidth, scaled.iHeight);
 
     // return of descaled value
     return scaled;
@@ -1195,93 +1202,88 @@
 
 CMIDUtils::TScalingData CMIDUtils::GetScalingData()
 {
-    // If iScalingData is not initialized, this method will initialized it.
-    if (iScalingData == TScalingData())
-    {
-        // Create local instance of TScalingData
-        TScalingData data = TScalingData();
-
-        // Get actual rect of screen without with eventual OSK.
-        TRect screenRect =iEnv->Current()->GetCanvasRectFromLaf();
-
-        // Traslate of rect of screen into size
-        data.iScreenSize = screenRect.Size();
-
-        // Check if scaling is is on now.
-        if (iMenuHandler->IsScalingEffectiveInCurrentScreen())
-        {
-
-            // Get original and target size from JAD attributes
-            data.iOriginalSize = iMenuHandler->GetScalingParameterOrgMIDletScrSize();
-            data.iTargetSize = iMenuHandler->GetScalingParameterTargetMIDletScrSize();
-
-            // Check if JAD attribute allows orientation change during scalling
-            // is present. If it is present, this switches orientation of original
-            // size, if it is needed.
-            if (iMenuHandler->GetScalingParameterScaleMIDletOnOrientSwitch())
-            {
-                // portait
-                if (data.iScreenSize.iWidth < data.iScreenSize.iHeight)
-                {
-                    data.iOriginalSize = TSize(Min(data.iOriginalSize.iHeight,
-                                                   data.iOriginalSize.iWidth),
-                                               Max(data.iOriginalSize.iHeight,
-                                                   data.iOriginalSize.iWidth));
-                }
-                // landscape
-                else
-                {
-                    data.iOriginalSize = TSize(Max(data.iOriginalSize.iHeight,
-                                                   data.iOriginalSize.iWidth),
-                                               Min(data.iOriginalSize.iHeight,
-                                                   data.iOriginalSize.iWidth));
-                }
-            }
-
-        }
-
-        if (data.iTargetSize != TSize())
-        {
-            // When target size is set, then possible horizontal and vertical
-            // scaling factor are various. And in this case canvas size is
-            //  equal to target size.
-            data.iRatioX = (TReal) data.iTargetSize.iWidth / data.iOriginalSize.iWidth;
-            data.iRatioY = (TReal) data.iTargetSize.iHeight / data.iOriginalSize.iHeight;
-            data.iCanvasSize = data.iTargetSize;
-        }
-        else if (data.iOriginalSize != TSize())
-        {
-            // When target size is not set, then only one scaling factor is present.
-            // It is smaller of horizontal and vertical scaling factors.
-            // And in this case canvas have size calculated according to
-            // the scaling factor.
-            data.iRatioX = (TReal) data.iScreenSize.iWidth / data.iOriginalSize.iWidth;
-            data.iRatioY = (TReal) data.iScreenSize.iHeight / data.iOriginalSize.iHeight;
-            TReal ratio = Min(data.iRatioX, data.iRatioY);
-            data.iRatioX = ratio;
-            data.iRatioY = ratio;
-            data.iCanvasSize = TSize(data.iOriginalSize.iWidth * ratio,
-                                     data.iOriginalSize.iHeight * ratio);
-        }
-        else
-        {
-            // When scaling is off, then canvas ocupied whole screen.
-            data.iCanvasSize = data.iScreenSize;
-        }
-
-        // Set local variable to iScalingData
-        iScalingData = data;
-    }
-
+	UpdateScalingData();
     return iScalingData;
 }
 
-void CMIDUtils::ResetScalingData()
+void CMIDUtils::UpdateScalingData()
 {
-    // Firstly is needed set iScaling data to notinicialized value.
-    iScalingData = TScalingData();
-    // Now we can set new scaling data.
-    iScalingData = GetScalingData();
+    // Create local instance of TScalingData
+    TScalingData data = TScalingData();
+
+    //
+    iScalingDataInitialized = ETrue;
+
+    // Get actual rect of screen without with eventual OSK.
+    TRect screenRect =iEnv->Current()->GetCanvasRectFromLaf();
+
+    // Traslate of rect of screen into size
+    data.iScreenSize = screenRect.Size();
+
+    // Check if scaling is is on now.
+    if (iMenuHandler->IsScalingEffectiveInCurrentScreen())
+    {
+
+        // Get original and target size from JAD attributes
+        data.iOriginalSize = iMenuHandler->GetScalingParameterOrgMIDletScrSize();
+        data.iTargetSize = iMenuHandler->GetScalingParameterTargetMIDletScrSize();
+
+        // Check if JAD attribute allows orientation change during scalling
+        // is present. If it is present, this switches orientation of original
+        // size, if it is needed.
+        if (iMenuHandler->GetScalingParameterScaleMIDletOnOrientSwitch())
+        {
+            // portait
+            if (data.iScreenSize.iWidth < data.iScreenSize.iHeight)
+            {
+                data.iOriginalSize = TSize(Min(data.iOriginalSize.iHeight,
+                                               data.iOriginalSize.iWidth),
+                                           Max(data.iOriginalSize.iHeight,
+                                               data.iOriginalSize.iWidth));
+            }
+            // landscape
+            else
+            {
+                data.iOriginalSize = TSize(Max(data.iOriginalSize.iHeight,
+                                               data.iOriginalSize.iWidth),
+                                           Min(data.iOriginalSize.iHeight,
+                                               data.iOriginalSize.iWidth));
+            }
+        }
+
+    }
+
+    if (data.iTargetSize != TSize())
+    {
+        // When target size is set, then possible horizontal and vertical
+        // scaling factor are various. And in this case canvas size is
+        //  equal to target size.
+        data.iRatioX = (TReal) data.iTargetSize.iWidth / data.iOriginalSize.iWidth;
+        data.iRatioY = (TReal) data.iTargetSize.iHeight / data.iOriginalSize.iHeight;
+        data.iCanvasSize = data.iTargetSize;
+    }
+    else if (data.iOriginalSize != TSize())
+    {
+        // When target size is not set, then only one scaling factor is present.
+        // It is smaller of horizontal and vertical scaling factors.
+        // And in this case canvas have size calculated according to
+        // the scaling factor.
+        data.iRatioX = (TReal) data.iScreenSize.iWidth / data.iOriginalSize.iWidth;
+        data.iRatioY = (TReal) data.iScreenSize.iHeight / data.iOriginalSize.iHeight;
+        TReal ratio = Min(data.iRatioX, data.iRatioY);
+        data.iRatioX = ratio;
+        data.iRatioY = ratio;
+        data.iCanvasSize = TSize(data.iOriginalSize.iWidth * ratio,
+                                 data.iOriginalSize.iHeight * ratio);
+    }
+    else
+    {
+        // When scaling is off, then canvas ocupied whole screen.
+        data.iCanvasSize = data.iScreenSize;
+    }
+
+    // Set local variable to iScalingData
+    iScalingData = data;
 }
 
 // ============================ TStickyKeysHandler ===========================
@@ -1593,4 +1595,29 @@
            aModifiers & EModifierRightShift;
 }
 
+TBool CMIDUtils::IsScalingEnabled()
+{
+    // If iScalingData is not initialized, we do it.
+    if (!iScalingDataInitialized)
+    {
+        UpdateScalingData();
+    }
+
+    //If iOrgMIDletScrSize has been initialized then scaling is on.
+    //It's enough to check either height or width only.
+    return (iScalingData.iOriginalSize.iHeight != 0);
+}
+
+TRect CMIDUtils::GetOnScreenCanvasRect()
+{
+    if (!iScalingDataInitialized)
+    {
+        UpdateScalingData();
+    }
+
+    TSize subtract = iScalingData.iScreenSize - iScalingData.iCanvasSize;
+    TPoint canvasOrigin = TPoint(subtract.iWidth / 2, subtract.iHeight / 2);
+    return TRect(canvasOrigin, iScalingData.iCanvasSize);
+}
+
 // End of File
--- a/javauis/m2g_akn/build/javam2g_0x2002DCBD.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/m2g_akn/build/javam2g_0x2002DCBD.mmp	Tue May 25 12:34:19 2010 +0300
@@ -99,6 +99,14 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		efsrv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -119,10 +127,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/m2g_akn/javasrc/eclipse/swt/widgets/SVGAnimatorControl.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/m2g_akn/javasrc/eclipse/swt/widgets/SVGAnimatorControl.java	Tue May 25 12:34:19 2010 +0300
@@ -34,7 +34,8 @@
         KeyListener,
         MouseListener,
         DisposeListener,
-        ShellListener
+        ShellListener,
+        PaintListener
 {
     //--------------------------------------------------
     // STATIC CONSTANTS
@@ -91,6 +92,7 @@
         addMouseListener(this);
         addDisposeListener(this);
         parent.getShell().addShellListener(this);
+        addPaintListener(this);
 
         return true;
     }
@@ -98,11 +100,8 @@
     /**
      * @see org.eclipse.swt.widgets.Control#paint()
      */
-    Rectangle paint(Rectangle aRect,
-                    boolean aPaintNatively, boolean aPaintChildren)
-    {
-
-        GC gc = new GC(this);
+        public void paintControl(PaintEvent e) {
+        GC gc = e.gc;
 
         // Render image
         try
@@ -116,10 +115,6 @@
         {
             iSg.releaseTarget();
         }
-
-        gc.dispose();
-
-        return null;
     }
 
     /**
--- a/javauis/m3g_akn/build/javam3g_0x2002DCBE.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/m3g_akn/build/javam3g_0x2002DCBE.mmp	Tue May 25 12:34:19 2010 +0300
@@ -87,6 +87,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -107,10 +119,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/m3g_qt/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="javam3g" default="deploy" basedir=".">
-
-  <import file="../../../build/utilities.xml"/>
-
-  <!-- Needed by the utilities.xml. See the description form the utilities.xml
-       file -->
-
-  <target name="compile">
-    <omj.javac  classpath="../../bin/eswt.jar:../../bin/openlcdui.jar"/>
-  </target>
-
-
-  <!-- Needed by the utilities.xml. See the description form the utilities.xml
-       file -->
-
-  <property name="javah.classnames" 
-            value="javax.microedition.m3g.AnimationController,
-                   javax.microedition.m3g.AnimationTrack,
-                   javax.microedition.m3g.Appearance,
-                   javax.microedition.m3g.Background,
-                   javax.microedition.m3g.Camera,
-                   javax.microedition.m3g.CompositingMode,
-                   javax.microedition.m3g.Fog,
-                   javax.microedition.m3g.Graphics3D,
-                   javax.microedition.m3g.Group,
-                   javax.microedition.m3g.Image2D,
-                   javax.microedition.m3g.Interface,
-                   javax.microedition.m3g.KeyframeSequence,
-                   javax.microedition.m3g.Light,
-                   javax.microedition.m3g.Loader,
-                   javax.microedition.m3g.Material,
-                   javax.microedition.m3g.Mesh,
-                   javax.microedition.m3g.MorphingMesh,
-                   javax.microedition.m3g.Node,
-                   javax.microedition.m3g.Object3D,
-                   javax.microedition.m3g.Platform,
-                   javax.microedition.m3g.PolygonMode,
-                   javax.microedition.m3g.SkinnedMesh,
-                   javax.microedition.m3g.Sprite3D,
-                   javax.microedition.m3g.Texture2D,
-                   javax.microedition.m3g.Transform,
-                   javax.microedition.m3g.Transformable,
-                   javax.microedition.m3g.TriangleStripArray,
-                   javax.microedition.m3g.VertexArray,
-                   javax.microedition.m3g.VertexBuffer,
-                   javax.microedition.m3g.World"/>
-
-  <target name="system.properties">
-    <properties>
-        microedition.m3g.version=1.1
-    </properties>
-  </target>
-  
-    <target name="create.public.api.jar">
-      <omj.public.apis includes="javax/microedition/m3g/AnimationController.class,
-                                 javax/microedition/m3g/AnimationTrack.class,
-                                 javax/microedition/m3g/Appearance.class,
-                                 javax/microedition/m3g/Background.class,
-                                 javax/microedition/m3g/Camera.class,
-                                 javax/microedition/m3g/CompositingMode.class,
-                                 javax/microedition/m3g/Fog.class,
-                                 javax/microedition/m3g/Graphics3D.class,
-                                 javax/microedition/m3g/Group.class,
-                                 javax/microedition/m3g/Image2D.class,
-                                 javax/microedition/m3g/Interface.class,
-                                 javax/microedition/m3g/KeyframeSequence.class,
-                                 javax/microedition/m3g/Light.class,
-                                 javax/microedition/m3g/Loader.class,
-                                 javax/microedition/m3g/Material.class,
-                                 javax/microedition/m3g/Mesh.class,
-                                 javax/microedition/m3g/MorphingMesh.class,
-                                 javax/microedition/m3g/Node.class,
-                                 javax/microedition/m3g/Object3D.class,
-                                 javax/microedition/m3g/Platform.class,
-                                 javax/microedition/m3g/PolygonMode.class,
-                                 javax/microedition/m3g/SkinnedMesh.class,
-                                 javax/microedition/m3g/Sprite3D.class,
-                                 javax/microedition/m3g/Texture2D.class,
-                                 javax/microedition/m3g/Transform.class,
-                                 javax/microedition/m3g/Transformable.class,
-                                 javax/microedition/m3g/TriangleStripArray.class,
-                                 javax/microedition/m3g/VertexArray.class,
-                                 javax/microedition/m3g/VertexBuffer.class,
-                                 javax/microedition/m3g/World.class"/>
-  </target>
-
-</project>
--- a/javauis/m3g_qt/build/bwins/javam3gu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-
--- a/javauis/m3g_qt/build/eabi/javam3gu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z10jni_lookupPKc @ 1 NONAME
-
--- a/javauis/m3g_qt/build/javam3g.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE=lib
-TARGET=javam3g
-CONFIG += omj java staticdata stl
-CONFIG -= qt
-
-QT += core gui
-
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../src/jni
-INCLUDEPATH += ../../../../eSWT/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics
-
-SOURCES += ../src/*.cpp
-         
-DEFINES += M3G_TARGET_SYMBIAN
-DEFINES += M3G_NATIVE_LOADER
-
-LIBS += -lcone \
-        -lezlib \
-#        -lfbscli \
-        -llibgles_cm \
-        -lm3gcore \
-        -leswt-qt
-
-include(../../../build/omj.pri)
--- a/javauis/m3g_qt/inc/CSynchronization.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  M3GCore function call serialization and synchronization
-*
-*/
-
-#ifndef CSYNCHRONIZATION_H
-#define CSYNCHRONIZATION_H
-
-// INCLUDE FILES
-#include <e32std.h>
-#include <e32base.h>
-
-// CLASS DECLARATION
-/**
- * @class CSynchronization
- */
-class CSynchronization : public CBase
-{
-public:
-    /**
-     * Two-phased constructor.
-         */
-    static CSynchronization* InstanceL();
-
-    /**
-         * Dtor
-         */
-    ~CSynchronization();
-
-    /**
-       * Locks the semaphore
-       */
-    void Lock();
-
-    /**
-       * Unlocks the semaphore
-       */
-    void Unlock();
-
-    /**
-    * Sets error code for error occured during lock period
-    */
-    void SetErrorCode(TInt aCode);
-
-    /**
-    * Returns error string set with SetErrorString
-    */
-    TInt GetErrorCode();
-
-private: // METHODS
-    /**
-      * Constructor
-      */
-    CSynchronization();
-
-    /**
-    * Two-phased constructor.
-    * @return New object
-    */
-    static CSynchronization* NewL();
-
-    /**
-     * Constructor
-     */
-    void ConstructL();
-
-private: // MEMBER VARIABLES
-    static CSynchronization* iSelf;
-    RCriticalSection iGuard;
-    TInt iErrorCode;
-};
-
-#endif // CSYNCHRONIZATION_H
--- a/javauis/m3g_qt/inc/m3g_jsr184.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef M3G_JSR184_H
-#define M3G_JSR184_H
-
-/*!
- * \file \brief Global enumerations for JSR-184
- *
- */
-
-#if defined(M3G_CORE_INCLUDE)
-#   error includes Java dependencies; do not include into the core module.
-#endif
-
-#include <m3g/m3g_core.h>
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-    /*----------------------------------------------------------------------
-     * Enumerations
-     *--------------------------------------------------------------------*/
-
-    /*----------------------------------------------------------------------
-     * JSR-184 API internal functions
-     *--------------------------------------------------------------------*/
-
-    static M3Guint jsr184BytesPerPixels(int format);
-    static const char *jsr184Exception(M3Genum errorCode);
-
-#if defined(__cplusplus)
-} /* extern "C" */
-#endif
-
-#endif // M3G_JSR184_H
-
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/AnimationController.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class AnimationController extends Object3D
-{
-    //------------------------------------------------------------------
-    // Constructor
-    //------------------------------------------------------------------
-
-    public AnimationController()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    AnimationController(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setActiveInterval(int worldTimeMin, int worldTimeMax)
-    {
-        _setActiveInterval(handle, worldTimeMin, worldTimeMax);
-    }
-
-    public int getActiveIntervalStart()
-    {
-        return _getActiveIntervalStart(handle);
-    }
-
-    public int getActiveIntervalEnd()
-    {
-        return _getActiveIntervalEnd(handle);
-    }
-
-    public void setSpeed(float factor, int worldTime)
-    {
-        _setSpeed(handle, factor, worldTime);
-    }
-
-    public float getSpeed()
-    {
-        return _getSpeed(handle);
-    }
-
-    public void setPosition(float time, int worldTime)
-    {
-        _setPosition(handle, time, worldTime);
-    }
-
-    public float getPosition(int worldTime)
-    {
-        return _getPosition(handle, worldTime);
-    }
-
-    public void setWeight(float weight)
-    {
-        _setWeight(handle, weight);
-    }
-
-    public float getWeight()
-    {
-        return _getWeight(handle);
-    }
-
-    // M3G maintenance version 1.1
-    public int getRefWorldTime()
-    {
-        return _getRefWorldTime(handle);
-    }
-
-
-    // Native methods
-    private native static int _ctor(int hInterface);
-    private native static void _setActiveInterval(int handle, int worldTimeMin, int worldTimeMax);
-    private native static int _getActiveIntervalStart(int handle);
-    private native static int _getActiveIntervalEnd(int handle);
-    private native static void _setSpeed(int handle, float factor, int worldTime);
-    private native static float _getSpeed(int handle);
-    private native static void _setPosition(int handle, float time, int worldTime);
-    private native static float _getPosition(int handle, int worldTime);
-    private native static void _setWeight(int handle, float weight);
-    private native static float _getWeight(int handle);
-
-    // M3G maintenance version 1.1
-    private native static int _getRefWorldTime(int handle);
-
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/AnimationTrack.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class AnimationTrack extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int ALPHA               = 256;
-    public static final int AMBIENT_COLOR       = 257;
-    public static final int COLOR               = 258;
-    public static final int CROP                = 259;
-    public static final int DENSITY             = 260;
-    public static final int DIFFUSE_COLOR       = 261;
-    public static final int EMISSIVE_COLOR      = 262;
-    public static final int FAR_DISTANCE        = 263;
-    public static final int FIELD_OF_VIEW       = 264;
-    public static final int INTENSITY           = 265;
-    public static final int MORPH_WEIGHTS       = 266;
-    public static final int NEAR_DISTANCE       = 267;
-    public static final int ORIENTATION         = 268;
-    public static final int PICKABILITY         = 269;
-    public static final int SCALE               = 270;
-    public static final int SHININESS           = 271;
-    public static final int SPECULAR_COLOR      = 272;
-    public static final int SPOT_ANGLE          = 273;
-    public static final int SPOT_EXPONENT       = 274;
-    public static final int TRANSLATION         = 275;
-    public static final int VISIBILITY          = 276;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private AnimationController controller;
-    private KeyframeSequence sequence;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    AnimationTrack(int handle)
-    {
-        super(handle);
-        controller = (AnimationController)getInstance(_getController(handle));
-        sequence = (KeyframeSequence)getInstance(_getSequence(handle));
-    }
-
-    public AnimationTrack(KeyframeSequence sequence, int property)
-    {
-        super(_ctor(Interface.getHandle(),
-                    sequence != null ? sequence.handle : 0, property));
-        this.sequence = sequence;
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setController(AnimationController controller)
-    {
-        _setController(handle, controller != null ? controller.handle : 0);
-        this.controller = controller;
-    }
-
-    public AnimationController getController()
-    {
-        return controller;
-    }
-
-    public KeyframeSequence getKeyframeSequence()
-    {
-        return sequence;
-    }
-
-    public int getTargetProperty()
-    {
-        return _getTargetProperty(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private native static int _ctor(int hInterface,
-                                    int hSequence,
-                                    int property);
-    private native static int _getController(int handle);
-    private native static int _getSequence(int handle);
-    private native static int _getTargetProperty(int handle);
-    private native static void _setController(int handle, int hController);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Appearance.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Appearance extends Object3D
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private CompositingMode compositingMode;
-    private Fog             fog;
-    private Material        material;
-    private PolygonMode     polygonMode;
-    private Texture2D[]     textures;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public Appearance()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Appearance(int handle)
-    {
-        super(handle);
-
-        compositingMode = (CompositingMode) getInstance(_getCompositingMode(handle));
-        fog             = (Fog) getInstance(_getFog(handle));
-        material        = (Material) getInstance(_getMaterial(handle));
-        polygonMode     = (PolygonMode) getInstance(_getPolygonMode(handle));
-
-        textures = new Texture2D[Defs.NUM_TEXTURE_UNITS];
-
-        for (int i = 0; i < Defs.NUM_TEXTURE_UNITS; ++i)
-        {
-            textures[i] = (Texture2D) getInstance(_getTexture(handle, i));
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setCompositingMode(CompositingMode compositingMode)
-    {
-        _setCompositingMode(handle,
-                            compositingMode != null
-                            ? compositingMode.handle
-                            : 0);
-        this.compositingMode = compositingMode;
-    }
-
-    public CompositingMode getCompositingMode()
-    {
-        return compositingMode;
-    }
-
-    public void setFog(Fog fog)
-    {
-        _setFog(handle, fog != null ? fog.handle : 0);
-        this.fog = fog;
-    }
-
-    public Fog getFog()
-    {
-        return fog;
-    }
-
-    public void setPolygonMode(PolygonMode polygonMode)
-    {
-        _setPolygonMode(handle, polygonMode != null ? polygonMode.handle : 0);
-        this.polygonMode = polygonMode;
-    }
-
-    public PolygonMode getPolygonMode()
-    {
-        return polygonMode;
-    }
-
-    public void setLayer(int index)
-    {
-        _setLayer(handle, index);
-    }
-
-    public int getLayer()
-    {
-        return _getLayer(handle);
-    }
-
-    public void setMaterial(Material material)
-    {
-        _setMaterial(handle, material != null ? material.handle : 0);
-        this.material = material;
-    }
-
-    public Material getMaterial()
-    {
-        return material;
-    }
-
-    public void setTexture(int unit, Texture2D texture)
-    {
-        _setTexture(handle, unit, texture != null ? texture.handle : 0);
-
-        if (textures == null)
-        {
-            textures = new Texture2D[Defs.NUM_TEXTURE_UNITS];
-        }
-        textures[unit] = texture;
-    }
-
-    public Texture2D getTexture(int unit)
-    {
-        return (Texture2D) getInstance(_getTexture(handle, unit));
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private static native int   _ctor(int hInterface);
-
-    private static native int   _getCompositingMode(int hApp);
-    private static native int   _getFog(int hApp);
-    private static native int   _getLayer(int hApp);
-    private static native int   _getMaterial(int hApp);
-    private static native int   _getPolygonMode(int hApp);
-    private static native int   _getTexture(int hApp, int unit);
-
-    private static native void  _setCompositingMode(int hApp, int hMode);
-    private static native void  _setFog(int hApp, int hFog);
-    private static native void  _setLayer(int hApp, int layer);
-    private static native void  _setMaterial(int hApp, int hMaterial);
-    private static native void  _setPolygonMode(int hApp, int hMode);
-    private static native void  _setTexture(int hApp,
-                                            int unit,
-                                            int hTexture);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Background.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Background extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int BORDER = 32;
-    public static final int REPEAT = 33;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private Image2D image;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public Background()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Background(int handle)
-    {
-        super(handle);
-        image = (Image2D) getInstance(_getImage(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setColor(int ARGB)
-    {
-        _setColor(handle, ARGB);
-    }
-
-    public int getColor()
-    {
-        return _getColor(handle);
-    }
-
-    public void setImage(Image2D image)
-    {
-        _setImage(handle, image != null ? image.handle : 0);
-        this.image = image;
-    }
-
-    public Image2D getImage()
-    {
-        return image;
-    }
-
-    public void setImageMode(int modeX, int modeY)
-    {
-        _setImageMode(handle, modeX, modeY);
-    }
-
-    public int getImageModeX()
-    {
-        return _getImageMode(handle, Defs.GET_MODEX);
-    }
-
-    public int getImageModeY()
-    {
-        return _getImageMode(handle, Defs.GET_MODEY);
-    }
-
-    public void setColorClearEnable(boolean enable)
-    {
-        _enable(handle, Defs.SETGET_COLORCLEAR, enable);
-    }
-
-    public void setDepthClearEnable(boolean enable)
-    {
-        _enable(handle, Defs.SETGET_DEPTHCLEAR, enable);
-    }
-
-    public boolean isColorClearEnabled()
-    {
-        return _isEnabled(handle, Defs.SETGET_COLORCLEAR);
-    }
-
-    public boolean isDepthClearEnabled()
-    {
-        return _isEnabled(handle, Defs.SETGET_DEPTHCLEAR);
-    }
-
-    public void setCrop(int cropX, int cropY, int width, int height)
-    {
-        _setCrop(handle, cropX, cropY, width, height);
-    }
-
-    public int getCropX()
-    {
-        return _getCrop(handle, Defs.GET_CROPX);
-    }
-
-    public int getCropY()
-    {
-        return _getCrop(handle, Defs.GET_CROPY);
-    }
-
-    public int getCropWidth()
-    {
-        return _getCrop(handle, Defs.GET_CROPWIDTH);
-    }
-
-    public int getCropHeight()
-    {
-        return _getCrop(handle, Defs.GET_CROPHEIGHT);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native functions
-    private static native int _ctor(int hInterface);
-    private static native void _setColor(int handle, int ARGB);
-    private static native int _getColor(int handle);
-    private static native void _setImage(int handle, int hImage);
-    private static native int  _getImage(int handle);
-    private static native void _setImageMode(int handle, int modeX, int modeY);
-    private static native int _getImageMode(int handle, int which);
-    private static native void _enable(int handle, int which, boolean enable);
-    private static native boolean _isEnabled(int handle, int which);
-    private static native void _setCrop(int handle, int cropX, int cropY, int width, int height);
-    private static native int _getCrop(int handle, int which);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Camera.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Camera extends Node
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int GENERIC = 48;
-    public static final int PARALLEL = 49;
-    public static final int PERSPECTIVE = 50;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public Camera()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Camera(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setParallel(float height, float aspectRatio, float near, float far)
-    {
-        _setParallel(handle, height, aspectRatio, near, far);
-    }
-
-    public void setPerspective(float fovy, float aspectRatio, float near, float far)
-    {
-        _setPerspective(handle, fovy, aspectRatio, near, far);
-    }
-
-    public void setGeneric(Transform transform)
-    {
-        _setGeneric(handle, transform.matrix);
-    }
-
-    public int getProjection(Transform transform)
-    {
-        return _getProjectionAsTransform(handle, transform != null ? transform.matrix : null);
-    }
-
-    public int getProjection(float[] params)
-    {
-        return _getProjectionAsParams(handle, params);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native methods
-    private static native int _ctor(int hInterface);
-    private static native void _setParallel(int handle, float height, float aspectRatio, float near, float far);
-    private static native void _setPerspective(int handle, float fovy, float aspectRatio, float near, float far);
-    private static native void _setGeneric(int handle, byte[] transform);
-    private static native int _getProjectionAsTransform(int handle, byte[] transform);
-    private static native int _getProjectionAsParams(int handle, float[] params);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/CompositingMode.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class CompositingMode extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int ALPHA       = 64;
-    public static final int ALPHA_ADD   = 65;
-    public static final int MODULATE    = 66;
-    public static final int MODULATE_X2 = 67;
-    public static final int REPLACE     = 68;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public CompositingMode()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    CompositingMode(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setBlending(int mode)
-    {
-        _setBlending(handle, mode);
-    }
-
-    public int getBlending()
-    {
-        return _getBlending(handle);
-    }
-
-    public void setAlphaThreshold(float threshold)
-    {
-        _setAlphaThreshold(handle, threshold);
-    }
-
-    public float getAlphaThreshold()
-    {
-        return _getAlphaThreshold(handle);
-    }
-
-    public void setAlphaWriteEnable(boolean enable)
-    {
-        _setAlphaWriteEnable(handle, enable);
-    }
-
-    public boolean isAlphaWriteEnabled()
-    {
-        return _isAlphaWriteEnabled(handle);
-    }
-
-    public void setColorWriteEnable(boolean enable)
-    {
-        _enableColorWrite(handle, enable);
-    }
-
-    public boolean isColorWriteEnabled()
-    {
-        return _isColorWriteEnabled(handle);
-    }
-
-    public void setDepthWriteEnable(boolean enable)
-    {
-        _enableDepthWrite(handle, enable);
-    }
-
-    public boolean isDepthWriteEnabled()
-    {
-        return _isDepthWriteEnabled(handle);
-    }
-
-    public void setDepthTestEnable(boolean enable)
-    {
-        _enableDepthTest(handle, enable);
-    }
-
-    public boolean isDepthTestEnabled()
-    {
-        return _isDepthTestEnabled(handle);
-    }
-
-    public void setDepthOffset(float factor, float units)
-    {
-        _setDepthOffset(handle, factor, units);
-    }
-
-    public float getDepthOffsetFactor()
-    {
-        return _getDepthOffsetFactor(handle);
-    }
-
-    public float getDepthOffsetUnits()
-    {
-        return _getDepthOffsetUnits(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private native static int _ctor(int hInterface);
-    private native static void _setBlending(int handle, int mode);
-    private native static int _getBlending(int handle);
-    private native static void _setAlphaThreshold(int handle, float threshold);
-    private native static float _getAlphaThreshold(int handle);
-    private native static void _setAlphaWriteEnable(int handle, boolean enable);
-    private native static boolean _isAlphaWriteEnabled(int handle);
-    private native static void _enableDepthTest(int handle, boolean enable);
-    private native static boolean _isDepthTestEnabled(int handle);
-    private native static void _enableDepthWrite(int handle, boolean enable);
-    private native static boolean _isDepthWriteEnabled(int handle);
-    private native static void _enableColorWrite(int handle, boolean enable);
-    private native static boolean _isColorWriteEnabled(int handle);
-    private native static void _setDepthOffset(int handle, float factor, float units);
-    private native static float _getDepthOffsetFactor(int handle);
-    private native static float _getDepthOffsetUnits(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Defs.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-class Defs
-{
-    static boolean supportDithering = false;
-    static boolean supportTrueColor = false;
-    static boolean supportAntialiasing = true;
-    static boolean supportMipmapping = true;
-    static boolean supportPerspectiveCorrection = true;
-    static boolean supportLocalCameraLighting = false;
-
-    static int MAX_LIGHTS = 8;
-    static int MAX_TEXTURE_DIMENSION = 1024;
-    static int MAX_TRANSFORMS_PER_VERTEX = 4;
-    static int MAX_VIEWPORT_WIDTH = 1024;
-    static int MAX_VIEWPORT_HEIGHT = 1024;
-    static int MAX_VIEWPORT_DIMENSION = 1024;
-    static int NUM_TEXTURE_UNITS = 2;
-
-    /* Constants used in various setters/getters */
-
-    /* VertexBuffer */
-    static final int GET_POSITIONS     = 0;
-    static final int GET_NORMALS       = 1;
-    static final int GET_COLORS        = 2;
-    static final int GET_TEXCOORDS0    = 3;
-    /*               GET_TEXCOORDS1    = 4 */
-    /* Sprite and Background */
-    static final int GET_CROPX         = 0;
-    static final int GET_CROPY         = 1;
-    static final int GET_CROPWIDTH     = 2;
-    static final int GET_CROPHEIGHT    = 3;
-    /* Background */
-    static final int GET_MODEX         = 0;
-    static final int GET_MODEY         = 1;
-    static final int SETGET_COLORCLEAR = 0;
-    static final int SETGET_DEPTHCLEAR = 1;
-    /* Fog */
-    static final int GET_NEAR          = 0;
-    static final int GET_FAR           = 1;
-    /* Node */
-    static final int SETGET_RENDERING  = 0;
-    static final int SETGET_PICKING    = 1;
-    /* Light */
-    static final int GET_CONSTANT      = 0;
-    static final int GET_LINEAR        = 1;
-    static final int GET_QUADRATIC     = 2;
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Fog.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Fog extends Object3D
-{
-    public static final int EXPONENTIAL = 80;
-    public static final int LINEAR = 81;
-
-    public Fog()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Fog(int handle)
-    {
-        super(handle);
-    }
-
-    public void setMode(int mode)
-    {
-        _setMode(handle, mode);
-    }
-
-    public int getMode()
-    {
-        return _getMode(handle);
-    }
-
-    public void setLinear(float near, float far)
-    {
-        _setLinear(handle, near, far);
-    }
-
-    public float getNearDistance()
-    {
-        return _getDistance(handle, Defs.GET_NEAR);
-    }
-
-    public float getFarDistance()
-    {
-        return _getDistance(handle, Defs.GET_FAR);
-    }
-
-    public void setDensity(float density)
-    {
-        _setDensity(handle, density);
-    }
-
-    public float getDensity()
-    {
-        return _getDensity(handle);
-    }
-
-    public void setColor(int RGB)
-    {
-        _setColor(handle, RGB);
-    }
-
-    public int getColor()
-    {
-        return _getColor(handle);
-    }
-
-    // Native methods
-    private static native int _ctor(int hInterface);
-    private static native void _setMode(int handle, int mode);
-    private static native int _getMode(int handle);
-    private static native void _setLinear(int handle, float near, float far);
-    private static native float _getDistance(int handle, int which);
-    private static native void _setDensity(int handle, float density);
-    private static native float _getDensity(int handle);
-    private static native void _setColor(int handle, int RGB);
-    private static native int _getColor(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Graphics3D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,739 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import javax.microedition.lcdui.Graphics;
-import java.util.Hashtable;
-import java.util.Vector;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.qt.graphics.*;
-import com.nokia.mj.impl.rt.support.ShutdownListener;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-
-
-public class Graphics3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int ANTIALIAS   = 2;
-    public static final int DITHER      = 4;
-    public static final int TRUE_COLOR  = 8;
-
-    // M3G 1.1
-    public static final int OVERWRITE   = 16;
-
-    // Singleton instances
-    static Graphics3D s_instance = null;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    int handle;
-    int iSurfaceHandle;
-
-    private Camera camera = null;
-    private Vector lights = new Vector();
-
-    private java.lang.Object currentTarget = null;
-    private int offsetX, offsetY, hints = 0;
-    private boolean depthEnabled = true;
-    private Destroyer destroyer;
-    private Interface iInterface;
-
-    // this flag is for identification of image target types
-    // - True for mutable off-screen images
-    // - False for canvas/GameCanvas framebuffer
-    private boolean iIsImageTarget;
-
-    // this flag is for identification if MBX HW accelerator is present
-    // - True - MBX is NOT present
-    // - False - MBX is present
-    private boolean iIsProperRenderer;
-
-    private boolean iNativeInitialized = false;
-
-    // Shutdown listener
-    private class Destroyer implements ShutdownListener
-    {
-        Graphics3D target;
-
-        Destroyer(Graphics3D g3d)
-        {
-            target = g3d;
-            ApplicationUtils appUtils = ApplicationUtils.getInstance();
-            appUtils.addShutdownListener(this);
-        }
-
-        // This method gets called when application is shuttingdown
-        public void shuttingDown()
-        {
-
-            // Finalize native peer
-            Platform.finalizeObject(target.handle, target.iInterface);
-
-            // signal shutdown (set shutdown flag)
-            // and remove references
-            target.iInterface.signalShutdown();
-            target.iInterface = null;
-            target.camera = null;
-            //target.s_instance = null;
-
-            // All done, Call gc() and finalization to collect
-            // remaining objects, thus zeroying liveObjects count
-            // in interface instance
-
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-    public static final Graphics3D getInstance()
-    {
-
-        if (s_instance == null)
-        {
-            s_instance = new Graphics3D();
-        }
-        return s_instance;
-    }
-
-    private Graphics3D()
-    {
-        iInterface = Interface.getInstance();
-        initNativePeer();
-
-        // setup listener for singleton teardown
-        destroyer = new Destroyer(this);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    /**
-     */
-    public void bindTarget(java.lang.Object target)
-    {
-        bindTarget(target, true, 0);
-    }
-
-    /**
-     *
-     */
-    public void bindTarget(java.lang.Object target, boolean depth, int flags)
-    {
-        integrityCheck();
-        if (currentTarget != null)
-        {
-            throw new IllegalStateException();
-        }
-
-        if (target == null)
-        {
-            throw new NullPointerException();
-        }
-
-        final int finalFlags = flags;
-        final boolean finalDepth = depth;
-
-        if (target instanceof org.eclipse.swt.graphics.GC)
-        {
-            Rectangle clip = ((org.eclipse.swt.graphics.GC)target).getClipping();
-            final int clipW = clip.width;
-            final int clipH = clip.height;
-            final int clipX = clip.x;
-            final int clipY = clip.y;
-
-            if (clipW > Defs.MAX_VIEWPORT_WIDTH ||
-                    clipH > Defs.MAX_VIEWPORT_HEIGHT)
-            {
-                throw new IllegalArgumentException();
-            }
-
-            final Object finalTarget = target;
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    GCData gcData = ((org.eclipse.swt.graphics.GC)finalTarget).getGCData();
-                    iSurfaceHandle = gcData.internalGc.getWindowSurface().getHandle();
-                    iIsImageTarget = _bindGraphics(
-                                         handle,
-                                         iSurfaceHandle,
-                                         clipX, clipY,
-                                         clipW, clipH,
-                                         finalDepth, finalFlags,
-                                         iIsProperRenderer);
-                }
-            });
-            currentTarget = target;
-        }
-
-        else if (target instanceof Graphics)
-        {
-
-            Graphics g = (Graphics) target;
-            //Platform.sync(g);
-
-            if (g.getClipWidth() > Defs.MAX_VIEWPORT_WIDTH ||
-                    g.getClipHeight() > Defs.MAX_VIEWPORT_HEIGHT)
-            {
-                throw new IllegalArgumentException();
-            }
-
-            offsetX = g.getTranslateX();
-            offsetY = g.getTranslateY();
-
-            final Graphics finalG = g;
-
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    iSurfaceHandle = (LCDUIInvoker.getGc(finalG)).getWindowSurface().getHandle();
-                    iIsImageTarget = _bindGraphics(
-                                         handle,
-                                         iSurfaceHandle,
-                                         finalG.getClipX() + offsetX, finalG.getClipY() + offsetY,
-                                         finalG.getClipWidth(), finalG.getClipHeight(),
-                                         finalDepth, finalFlags,
-                                         iIsProperRenderer);
-                }
-            });
-            currentTarget = g;
-        }
-        else if (target instanceof Image2D)
-        {
-            Image2D img = (Image2D) target;
-
-            offsetX = offsetY = 0;
-            final int imageHandle = img.handle;
-
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    _bindImage(handle, imageHandle, finalDepth, finalFlags);
-                }
-            });
-            currentTarget = img;
-        }
-        else
-        {
-            throw new IllegalArgumentException();
-        }
-
-        hints = flags;
-        depthEnabled = depth;
-    }
-
-    /**
-     *
-     */
-    public void releaseTarget()
-    {
-        integrityCheck();
-        if (currentTarget == null)
-        {
-            return;
-        }
-
-        if (currentTarget instanceof org.eclipse.swt.graphics.GC)
-        {
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    _releaseGraphics(handle,
-                                     iSurfaceHandle, iIsImageTarget, iIsProperRenderer);
-                }
-            });
-        }
-        else if (currentTarget instanceof Graphics)
-        {
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    _releaseGraphics(handle,
-                                     iSurfaceHandle, iIsImageTarget, iIsProperRenderer);
-                }
-            });
-            /*
-            Graphics g = (Graphics) currentTarget;
-
-            //ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-
-            Platform.getUIThread().syncExec(
-                    new Runnable() {
-                        public void run() {
-                                        _releaseGraphics( handle,
-                                        invoker.graphicsGetHandle(g), iIsImageTarget, iIsProperRenderer );
-                                }
-                        });
-                        */
-        }
-        else if (currentTarget instanceof Image2D)
-        {
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    _releaseImage(handle);
-                }
-            });
-        }
-        else
-        {
-            throw new Error();
-        }
-        currentTarget = null;
-        iSurfaceHandle = 0;
-    }
-
-    /**
-     *
-     */
-    public void setViewport(int x, int y, int width, int height)
-    {
-        integrityCheck();
-        if (width <= 0 || height <= 0
-                || width  > Defs.MAX_VIEWPORT_DIMENSION
-                || height > Defs.MAX_VIEWPORT_DIMENSION)
-        {
-            throw new IllegalArgumentException();
-        }
-        _setViewport(handle, x + offsetX, y + offsetY, width, height);
-    }
-
-    /**
-     *
-     */
-    public void clear(Background background)
-    {
-        integrityCheck();
-        final Background finalBackground = background;
-        Platform.executeInUIThread(
-            new M3gRunnable()
-        {
-            public void doRun()
-            {
-                _clear(handle, finalBackground != null ? finalBackground.handle : 0);
-            }
-        });
-    }
-
-    /**
-     *
-     */
-    public void render(World world)
-    {
-        integrityCheck();
-        final World finalWorld = world;
-        Platform.executeInUIThread(
-            new M3gRunnable()
-        {
-            public void doRun()
-            {
-                _renderWorld(handle, finalWorld.handle);
-            }
-        });
-    }
-
-    /**
-     *
-     */
-    public void render(VertexBuffer vertices,
-                       IndexBuffer primitives,
-                       Appearance appearance,
-                       Transform transform)
-    {
-        // Call rendering method with default visibility
-        integrityCheck();
-        render(vertices, primitives, appearance, transform, -1);
-    }
-
-    /**
-     *
-     */
-    public void render(VertexBuffer vertices,
-                       IndexBuffer primitives,
-                       Appearance appearance,
-                       Transform transform,
-                       int scope)
-    {
-
-        // null pointer exceptions thrown automatically below
-        integrityCheck();
-
-        final VertexBuffer finalVertices = vertices;
-        final IndexBuffer finalPrimitives = primitives;
-        final Appearance finalAppearance = appearance;
-        final Transform finalTransform = transform;
-        final int finalScope = scope;
-
-        Platform.executeInUIThread(
-            new M3gRunnable()
-        {
-            public void doRun()
-            {
-                _render(handle,
-                        finalVertices.handle,
-                        finalPrimitives.handle,
-                        finalAppearance.handle,
-                        finalTransform != null ? finalTransform.matrix : null,
-                        finalScope);
-            }
-        });
-    }
-
-    /**
-     *
-     */
-    public void render(Node node, Transform transform)
-    {
-        if (!(node instanceof Mesh
-                || node instanceof Sprite3D
-                || node instanceof Group)
-                && node != null)
-        {
-            throw new IllegalArgumentException();
-        }
-        integrityCheck();
-
-        final Node finalNode = node;
-        final Transform finalTransform = transform;
-
-        Platform.executeInUIThread(
-            new M3gRunnable()
-        {
-            public void doRun()
-            {
-                _renderNode(handle,
-                            finalNode.handle,
-                            finalTransform != null ? finalTransform.matrix : null);
-            }
-        });
-    }
-
-
-    public void setCamera(Camera camera, Transform transform)
-    {
-        integrityCheck();
-        _setCamera(handle,
-                   camera != null ? camera.handle : 0,
-                   transform != null ? transform.matrix : null);
-
-        this.camera = camera;
-    }
-
-    /**
-     */
-    public int addLight(Light light, Transform transform)
-    {
-        integrityCheck();
-        int index = _addLight(handle,
-                              light.handle,
-                              transform != null ? transform.matrix : null);
-        if (lights.size() < index + 1)
-        {
-            lights.setSize(index + 1);
-        }
-        lights.setElementAt(light, index);
-        return index;
-    }
-
-    /**
-     *
-     */
-    public void setLight(int index, Light light, Transform transform)
-    {
-        integrityCheck();
-        _setLight(handle,
-                  index,
-                  light != null ? light.handle : 0,
-                  transform != null ? transform.matrix : null);
-        lights.setElementAt(light, index);
-    }
-
-    /**
-     */
-    public void resetLights()
-    {
-        integrityCheck();
-        _resetLights(handle);
-        lights.removeAllElements();
-    }
-
-    /**
-     *
-     */
-    public static final Hashtable getProperties()
-    {
-        Hashtable props = new Hashtable();
-
-        props.put("supportAntialiasing",          new java.lang.Boolean(
-                      _isAASupported(Interface.getHandle())));
-        props.put("supportTrueColor",             new java.lang.Boolean(Defs.supportTrueColor));
-        props.put("supportDithering",             new java.lang.Boolean(Defs.supportDithering));
-        props.put("supportMipmapping",            new java.lang.Boolean(Defs.supportMipmapping));
-        props.put("supportPerspectiveCorrection", new java.lang.Boolean(Defs.supportPerspectiveCorrection));
-        props.put("supportLocalCameraLighting",   new java.lang.Boolean(Defs.supportLocalCameraLighting));
-        props.put("maxLights",                    new java.lang.Integer(Defs.MAX_LIGHTS));
-        props.put("maxViewportWidth",             new java.lang.Integer(Defs.MAX_VIEWPORT_WIDTH));
-        props.put("maxViewportHeight",            new java.lang.Integer(Defs.MAX_VIEWPORT_HEIGHT));
-        props.put("maxViewportDimension",         new java.lang.Integer(Defs.MAX_VIEWPORT_DIMENSION));
-        props.put("maxTextureDimension",          new java.lang.Integer(Defs.MAX_TEXTURE_DIMENSION));
-        props.put("maxSpriteCropDimension",       new java.lang.Integer(Defs.MAX_TEXTURE_DIMENSION));
-        props.put("numTextureUnits",              new java.lang.Integer(Defs.NUM_TEXTURE_UNITS));
-        props.put("maxTransformsPerVertex",       new java.lang.Integer(Defs.MAX_TRANSFORMS_PER_VERTEX));
-
-        // Extra properties
-        props.put("m3gRelease",                   new java.lang.String("04_wk49"));
-
-        return props;
-    }
-
-    /**
-     *
-     */
-    public void setDepthRange(float near, float far)
-    {
-        integrityCheck();
-        _setDepthRange(handle, near, far);
-    }
-
-    // M3G 1.1
-
-    public Camera getCamera(Transform transform)
-    {
-        integrityCheck();
-        if (transform != null)
-        {
-            _getViewTransform(handle, transform.matrix);
-        }
-
-        return (Camera) Object3D.getInstance(_getCamera(handle));
-    }
-
-    public float getDepthRangeFar()
-    {
-        integrityCheck();
-        return _getDepthRangeFar(handle);
-    }
-
-    public float getDepthRangeNear()
-    {
-        integrityCheck();
-        return _getDepthRangeNear(handle);
-    }
-
-    public Light getLight(int index, Transform transform)
-    {
-        integrityCheck();
-        if (index < 0 || index >= _getLightCount(handle))
-        {
-            throw new IndexOutOfBoundsException();
-        }
-
-        return (Light) Object3D.getInstance(_getLightTransform(handle,
-                                            index,
-                                            transform != null ? transform.matrix : null));
-    }
-
-    public int getLightCount()
-    {
-        integrityCheck();
-        return _getLightCount(handle);
-    }
-
-    public java.lang.Object getTarget()
-    {
-        return currentTarget;
-    }
-
-    public int getViewportHeight()
-    {
-        integrityCheck();
-        return _getViewportHeight(handle);
-    }
-
-    public int getViewportWidth()
-    {
-        integrityCheck();
-        return _getViewportWidth(handle);
-    }
-
-    public int getViewportX()
-    {
-        integrityCheck();
-        return _getViewportX(handle) - offsetX;
-    }
-
-    public int getViewportY()
-    {
-        integrityCheck();
-        return _getViewportY(handle) - offsetY;
-    }
-
-    public int getHints()
-    {
-        return hints;
-    }
-
-    public boolean isDepthBufferEnabled()
-    {
-        return depthEnabled;
-    }
-
-    // M3G 1.1 getters END
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private void integrityCheck()
-    {
-        if (iInterface == null)
-        {
-            throw new RuntimeException("Graphics3D closed");
-        }
-        if (!iNativeInitialized)
-        {
-            // If native interface cannot be initialized we cannot recover from it
-            if (!initNativePeer())
-            {
-                throw new Error("UI thread not available");
-            }
-        }
-    }
-
-    /**
-     * Initializes native peer
-     * @return true if native interface was succesfully inialized otherwise false
-     */
-    private boolean initNativePeer()
-    {
-        if (iNativeInitialized)
-        {
-            return true;
-        }
-        if (iInterface.isFullyInitialized() && Platform.uiThreadAvailable())
-        {
-            handle = _ctor(iInterface.getHandle());
-            _addRef(handle);
-
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    iIsProperRenderer = _isProperRenderer();
-                }
-            });
-            iNativeInitialized = true;
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Native implementation methods
-    //------------------------------------------------------------------
-    private native static int _ctor(int hInterface);
-    private native static void _addRef(int hObject);
-    private native static int _addLight(int handle,
-                                        int hLight,
-                                        byte[] transform);
-    private native static boolean _bindGraphics(int handle,
-            int surfaceHandle,
-            int clipX, int clipY,
-            int clipW, int clipH,
-            boolean depth,
-            int hintBits,
-            boolean aIsProperRenderer);
-    private native static void _bindImage(int handle, int imgHandle, boolean depth, int hintBits);
-    private native static void _releaseGraphics(int handle,
-            int surfaceHandle,
-            boolean aIsImageTarget,
-            boolean aIsProperRenderer);
-    private native static void _releaseImage(int handle);
-    private native static void _resetLights(int handle);
-    private native static void _clear(int handle, int hBackground);
-    private native static void _render(int handle,
-                                       int hVtxBuffer,
-                                       int hIdxBuffer,
-                                       int hAppearance,
-                                       byte[] transform,
-                                       int scope);
-    private native static void _renderNode(int handle, int hNode, byte[] transform);
-    private native static void _renderWorld(int handle, int hWorld);
-    private native static void _setCamera(int handle,
-                                          int hCamera,
-                                          byte[] transform);
-    private native static void _setViewport(int handle,
-                                            int x, int y,
-                                            int width, int height);
-    private native static void _setLight(int handle,
-                                         int index,
-                                         int hLight,
-                                         byte[] transform);
-    private native static void _setDepthRange(int handle,
-            float near,
-            float far);
-
-    // M3G 1.1
-    // Maintenance release getters
-
-    private native static void _getViewTransform(int handle,
-            byte[] transform);
-    private native static int _getCamera(int handle);
-    private native static int _getLightTransform(int handle,
-            int index,
-            byte[] transform);
-    private native static int _getLightCount(int handle);
-    private native static float _getDepthRangeNear(int handle);
-    private native static float _getDepthRangeFar(int handle);
-    private native static int _getViewportX(int handle);
-    private native static int _getViewportY(int handle);
-    private native static int _getViewportWidth(int handle);
-    private native static int _getViewportHeight(int handle);
-
-    /* Statistics support, MUST be disabled in official releases! */
-    /*
-        public native static int getStatistics(int[] statistics);
-    */
-    private native static boolean _isAASupported(int handle);
-    private native static boolean _isProperRenderer();
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Group.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import java.util.Vector;
-
-public class Group extends Node
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    // The child links are duplicated on the Java side for the same
-    // reason as the other node->node references; see Node.java
-
-    Vector children;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public Group()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    Group(int handle)
-    {
-        super(handle);
-        int n = _getChildCount(handle);
-        while (n-- > 0)
-        {
-            linkChild((Node) getInstance(_getChild(handle, n)));
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void addChild(Node child)
-    {
-        _addChild(handle, child != null ? child.handle : 0);
-        if (child != null)
-        {
-            linkChild(child);
-        }
-    }
-
-    public void removeChild(Node child)
-    {
-        if (child != null)
-        {
-            _removeChild(handle, child.handle);
-            detachChild(child);
-        }
-    }
-
-    public int getChildCount()
-    {
-        return _getChildCount(handle);
-    }
-
-    public Node getChild(int index)
-    {
-
-        /* Instead of trying to match the indexing of children on the
-         * native side, we just call the native getter. This may have
-         * some performance penalty, but likely not enough to make it
-         * worth the extra maintenance burden of duplicating the
-         * native ordering here. */
-
-        return (Node) getInstance(_getChild(handle, index));
-    }
-
-    public boolean pick(int mask,
-                        float ox, float oy, float oz,
-                        float dx, float dy, float dz,
-                        RayIntersection ri)
-    {
-        float[] result = RayIntersection.createResult();
-        float[] ray = {ox, oy, oz, dx, dy, dz};
-        int hIntersected;
-
-        hIntersected = _pick3D(handle, mask, ray, result);
-
-        if (hIntersected != 0)
-        {
-            if (ri != null)
-            {
-                ri.fill(hIntersected, result);
-            }
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public boolean pick(int mask, float x, float y, Camera camera, RayIntersection ri)
-    {
-        float[] result = RayIntersection.createResult();
-        int hIntersected;
-
-        hIntersected = _pick2D(handle, mask, x, y, camera != null ? camera.handle : 0, result);
-
-        if (hIntersected != 0)
-        {
-            if (ri != null)
-            {
-                ri.fill(hIntersected, result);
-            }
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    /**
-     * Adds a Java-side child link in this Group.
-     */
-    private void linkChild(Node child)
-    {
-        if (child == null)
-        {
-            throw new Error(); // DEBUG
-        }
-        if (children == null)
-        {
-            children = new Vector();
-        }
-        children.addElement(child);
-        child.setParent(this);
-    }
-
-    /**
-     * Removes a Java-side child link from this Group.
-     */
-    private void detachChild(Node child)
-    {
-        if (children != null)
-        {
-            if (children.removeElement(child))
-            {
-                /* If no children remain, we delete the array to free some
-                 * memory. If a Group is frequently cleared and
-                 * re-populated, this should be covered by the free list
-                 * used by most VM implementations without causing
-                 * significant performance degradation. */
-                if (children.isEmpty())
-                {
-                    children = null;
-                }
-
-                child.setParent(null);
-            }
-        }
-    }
-
-    // Native methods
-    private static native int _ctor(int hInterface);
-    private static native void _addChild(int handle, int hNode);
-    private static native void _removeChild(int handle, int hNode);
-    private static native int _getChildCount(int handle);
-    private static native int _getChild(int handle, int index);
-    private static native int _pick3D(int handle, int mask, float[] ray, float[] result);
-    private static native int _pick2D(int handle, int mask, float x, float y, int hCamera, float[] result);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Image2D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import javax.microedition.lcdui.Image;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.qt.graphics.*;
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-
-public class Image2D extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int ALPHA               = 96;
-    public static final int LUMINANCE           = 97;
-    public static final int LUMINANCE_ALPHA     = 98;
-    public static final int RGB                 = 99;
-    public static final int RGBA                = 100;
-
-    static int tempHandle;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public Image2D(int format, Object image)
-    {
-        // If image is instance of lcdui.Image then checkAndCreate
-        // builds the image and returns the handle to native image,
-        // otherwise throws exception Done this way because class of
-        // image cannot be checked befor calling super()
-        super(Image2D.checkAndCreate(format, image));
-    }
-
-    public Image2D(int format, int width, int height, byte[] image)
-    {
-        super(createHandle(format, width, height, image));
-    }
-
-    public Image2D(int format,
-                   int width, int height,
-                   byte[] image,
-                   byte[] palette)
-    {
-        super(createHandle(format, width, height, image, palette));
-    }
-
-    public Image2D(int format, int width, int height)
-    {
-        super(createHandle(format, width, height));
-    }
-
-    Image2D(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void set(int x, int y, int width, int height, byte[] image)
-    {
-        if (image == null)
-        {
-            throw new NullPointerException();
-        }
-        _set(handle, x, y, width, height, image);
-    }
-
-    public boolean isMutable()
-    {
-        return _isMutable(handle);
-    }
-
-    public int getFormat()
-    {
-        return _getFormat(handle);
-    }
-
-    public int getWidth()
-    {
-        return _getWidth(handle);
-    }
-
-    public int getHeight()
-    {
-        return _getHeight(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private static int checkAndCreate(int format, Object image)
-    {
-        if (image == null)
-        {
-            throw new NullPointerException();
-        }
-        if (!(image instanceof javax.microedition.lcdui.Image) &&
-                !(image instanceof org.eclipse.swt.graphics.Image))
-        {
-            throw new IllegalArgumentException();
-        }
-
-        final int finalFormat = format;
-        tempHandle = 0;
-
-        if (image instanceof org.eclipse.swt.graphics.Image)
-        {
-            // get internal image
-            final org.eclipse.swt.internal.qt.graphics.Image cgfxImage = ((org.eclipse.swt.graphics.Image)image).internal_getImage();
-
-            // excute in UI thread
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                void doRun()
-                {
-                    tempHandle = _ctorImage(Interface.getHandle(), finalFormat, cgfxImage.getHandle());
-                }
-            });
-        }
-        else if (image instanceof javax.microedition.lcdui.Image)
-        {
-            final org.eclipse.swt.internal.qt.graphics.Image cgfxImage = LCDUIInvoker.getEswtImage((javax.microedition.lcdui.Image)image).internal_getImage();
-
-            // excute in UI thread
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                void doRun()
-                {
-                    tempHandle = _ctorImage(Interface.getHandle(), finalFormat, cgfxImage.getHandle());
-                }
-            });
-        }
-        return tempHandle;
-    }
-
-    //Platform.heuristicGC();
-    //ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-
-    // Decide if trueAlpha
-    //Image i = (Image)image;
-    //boolean trueAlpha = !(i.isMutable() && format == ALPHA);
-
-    //Platform.sync((Image) image);
-
-//        Platform.getUIThread().syncExec(
-//                    new Runnable() {
-//                        public void run() {
-//                                               tempHandle = _ctorImage(/*Interface.getEventSourceHandle(),*/ Interface.getHandle(), finalFormat, /*invoker.imageGetHandle(image)*/ 5);
-//                                          }
-//                                  });
-//          return tempHandle;
-
-
-    private static int createHandle(int format, int width, int height, byte[] image)
-    {
-        Platform.heuristicGC();
-        return _ctorSizePixels(Interface.getHandle(),
-                               format,
-                               width, height,
-                               image);
-    }
-
-    private static int createHandle(int format,
-                                    int width, int height,
-                                    byte[] image,
-                                    byte[] palette)
-    {
-        Platform.heuristicGC();
-        return _ctorSizePixelsPalette(Interface.getHandle(),
-                                      format,
-                                      width, height,
-                                      image, palette);
-    }
-
-    private static int createHandle(int format, int width, int height)
-    {
-        Platform.heuristicGC();
-        return _ctorSize(Interface.getHandle(), format, width, height);
-    }
-
-    // Native methods
-    private native static int _ctorImage(/*int eventSourceHandle,*/
-        int hInterface,
-        int format,
-        int imageHandle);
-    private native static int _ctorSizePixels(int hInterface,
-            int format,
-            int width, int height,
-            byte[] image);
-    private native static int _ctorSizePixelsPalette(int hInterface,
-            int format,
-            int width, int height,
-            byte[] image,
-            byte[] palette);
-    private native static int _ctorSize(int hInterface,
-                                        int format,
-                                        int width, int height);
-
-    private native static void _set(int handle, int x, int y, int width,
-                                    int height, byte[] image);
-    private native static boolean _isMutable(int handle);
-    private native static int _getFormat(int handle);
-    private native static int _getWidth(int handle);
-    private native static int _getHeight(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/IndexBuffer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public abstract class IndexBuffer extends Object3D
-{
-    /**
-     * Only a package private constructor exists for this class.
-     */
-    IndexBuffer(int handle)
-    {
-        super(handle);
-    }
-
-    public abstract int getIndexCount();
-    public abstract void getIndices(int[] indices);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Interface.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,403 +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:
-*
-*/
-
-package javax.microedition.m3g;
-
-import java.lang.ref.WeakReference;
-import java.util.Hashtable;
-import org.eclipse.swt.widgets.Display;
-#ifdef RD_JAVA_OMJ
-import com.nokia.mj.impl.rt.support.Finalizer;
-#endif // RD_JAVA_OMJ
-
-/**
- * M3G interface object. An interface is automatically created for
- * each MIDlet using the 3D API to keep track of Java-side object
- * lifetimes etc.
- */
-class Interface
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    // Common class enumeration for Java and native code
-
-    private static final int ANIMATION_CONTROLLER = 0x01;
-    private static final int ANIMATION_TRACK      = 0x02;
-    private static final int APPEARANCE           = 0x03;
-    private static final int BACKGROUND           = 0x04;
-    private static final int CAMERA               = 0x05;
-    private static final int COMPOSITING_MODE     = 0x06;
-    private static final int FOG                  = 0x07;
-    private static final int GROUP                = 0x08;
-    private static final int IMAGE_2D             = 0x09;
-    private static final int INDEX_BUFFER         = 0x0A;
-    private static final int KEYFRAME_SEQUENCE    = 0x0B;
-    private static final int LIGHT                = 0x0C;
-    private static final int LOADER               = 0x0D;
-    private static final int MATERIAL             = 0x0E;
-    private static final int MESH                 = 0x0F;
-    private static final int MORPHING_MESH        = 0x10;
-    private static final int POLYGON_MODE         = 0x11;
-    private static final int RENDER_CONTEXT       = 0x12;
-    private static final int SKINNED_MESH         = 0x13;
-    private static final int SPRITE_3D            = 0x14;
-    private static final int TEXTURE_2D           = 0x15;
-    private static final int VERTEX_ARRAY         = 0x16;
-    private static final int VERTEX_BUFFER        = 0x17;
-    private static final int WORLD                = 0x18;
-
-    // Once created, the interface singleton currently remains in
-    // memory until VM exit.  By using a WeakReference here, with hard
-    // references stored in each object, it could be GC'd when no more
-    // objects exist, but that probably isn't worth the extra memory
-    // overhead.
-
-    //private static Hashtable s_instances = new Hashtable();
-    private static Interface instance = null;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    /**
-     * Handle of the native interface object.
-     */
-    private int handle;
-
-    /**
-     * Global handle-to-Object3D map used to both find the Java
-     * counterparts of objects returned from the native methods, and
-     * keep certain objects from being garbage collected.
-     */
-    private final Hashtable liveObjects = new Hashtable();
-
-    /**
-     * Flag for shutdown signal
-     */
-    private boolean iShutdown = false;
-
-    /**
-     * Flag for native peer init state
-     */
-    private boolean iNativeInitialized = false;
-
-
-#ifdef RD_JAVA_OMJ
-    private Finalizer mFinalizer;
-#endif // RD_JAVA_OMJ
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    private Interface()
-    {
-
-        // Contruct native peer
-        initNativePeer();
-
-#ifdef RD_JAVA_OMJ
-        mFinalizer = new Finalizer()
-        {
-            public void finalizeImpl()
-            {
-                doFinalize();
-            }
-        };
-#else // RD_JAVA_OMJ
-        Platform.registerFinalizer(this);
-#endif // RD_JAVA_OMJ
-    }
-
-    //------------------------------------------------------------------
-    // Package methods
-    //------------------------------------------------------------------
-
-    /**
-     * Returns the M3G interface instance for the current MIDlet.
-     */
-    static final Interface getInstance()
-    {
-        if (instance == null)
-        {
-            instance = new Interface();
-        }
-        return instance;
-    }
-
-    /**
-     * Returns the native handle of the current Interface instance.
-     */
-    static final int getHandle()
-    {
-        getInstance().integrityCheck();
-        return getInstance().handle;
-    }
-
-    /**
-     * Registers an Object3D with this interface. The object is added
-     * to the global handle-to-object map, and the native finalization
-     * callback is set up. The handle of the object must already be
-     * set at this point!
-     */
-    static final void register(Object3D obj)
-    {
-        Platform.registerFinalizer(obj);
-        getInstance().liveObjects.put(new Integer(obj.handle),
-                                      new WeakReference(obj));
-    }
-
-    static final void register(Loader obj)
-    {
-        Platform.registerFinalizer(obj);
-        getInstance().liveObjects.put(new Integer(obj.handle),
-                                      new WeakReference(obj));
-    }
-
-    /**
-     * Finds an Object3D in the global handle-to-object map. Also
-     * removes dead objects (that is, null references) from the map
-     * upon encountering them.
-     */
-    static final Object3D findObject(int handle)
-    {
-        Interface self = getInstance();
-        Integer iHandle = new Integer(handle);
-        Object ref = self.liveObjects.get(iHandle);
-
-        if (ref != null)
-        {
-            Object3D obj = (Object3D)((WeakReference)ref).get();
-            if (obj == null)
-            {
-                self.liveObjects.remove(iHandle);
-            }
-            return obj;
-        }
-        else
-        {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the Java object representing a native object, or
-     * creates a new proxy/peer if one doesn't exist yet.
-     */
-    static final Object3D getObjectInstance(int handle)
-    {
-
-        // A zero handle equals null
-
-        if (handle == 0)
-        {
-            return null;
-        }
-
-        // Then try to find an existing Java representative for the
-        // object
-
-        Object3D obj = findObject(handle);
-        if (obj != null)
-        {
-            return obj;
-        }
-
-        // Not found, create a new Java object. Note that only
-        // non-abstract classes can possibly be returned.
-
-        switch (_getClassID(handle))
-        {
-        case ANIMATION_CONTROLLER:
-            return new AnimationController(handle);
-        case ANIMATION_TRACK:
-            return new AnimationTrack(handle);
-        case APPEARANCE:
-            return new Appearance(handle);
-        case BACKGROUND:
-            return new Background(handle);
-        case CAMERA:
-            return new Camera(handle);
-        case COMPOSITING_MODE:
-            return new CompositingMode(handle);
-        case FOG:
-            return new Fog(handle);
-        case GROUP:
-            return new Group(handle);
-        case IMAGE_2D:
-            return new Image2D(handle);
-        case INDEX_BUFFER:
-            return new TriangleStripArray(handle);
-        case KEYFRAME_SEQUENCE:
-            return new KeyframeSequence(handle);
-        case LIGHT:
-            return new Light(handle);
-            //case LOADER:
-        case MATERIAL:
-            return new Material(handle);
-        case MESH:
-            return new Mesh(handle);
-        case MORPHING_MESH:
-            return new MorphingMesh(handle);
-        case POLYGON_MODE:
-            return new PolygonMode(handle);
-            //case RENDER_CONTEXT:
-        case SKINNED_MESH:
-            return new SkinnedMesh(handle);
-        case SPRITE_3D:
-            return new Sprite3D(handle);
-        case TEXTURE_2D:
-            return new Texture2D(handle);
-        case VERTEX_ARRAY:
-            return new VertexArray(handle);
-        case VERTEX_BUFFER:
-            return new VertexBuffer(handle);
-        case WORLD:
-            return new World(handle);
-        default:
-            throw new Error();
-        }
-    }
-
-    /**
-     * Forces removal of an object from the handle-to-object map.
-     */
-    static final void deregister(Object3D obj, Interface self)
-    {
-        self.liveObjects.remove(new Integer(obj.handle));
-        if (self.liveObjects.isEmpty() && self.iShutdown)
-        {
-            self.registeredFinalize();
-        }
-    }
-
-    /**
-     * Forces removal of an object from the handle-to-object map.
-     */
-    static final void deregister(Loader obj, Interface self)
-    {
-        self.liveObjects.remove(new Integer(obj.handle));
-        if (self.liveObjects.isEmpty() && self.iShutdown)
-        {
-            self.registeredFinalize();
-        }
-    }
-
-    /**
-     *  Sets shutdown indication flag. Actual native
-     *  cleanup occurs when liveObjects count is zero
-     */
-    void signalShutdown()
-    {
-        iShutdown = true;
-    }
-
-    /**
-     * Gets the state of this interface
-     * @return true if interface is fully constructed, otherwise false
-     */
-    boolean isFullyInitialized()
-    {
-        return iNativeInitialized;
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    /**
-     * Checks the status of the native interface
-     */
-    private void integrityCheck()
-    {
-        if (!iNativeInitialized)
-        {
-            // If native interface cannot be initialized we cannot recover from it
-            if (!initNativePeer())
-            {
-                throw new Error("UI thread not available");
-            }
-        }
-    }
-
-    /**
-     * Initializes native peer
-     * @return true if native interface was succesfully inialized otherwise false
-     */
-    private boolean initNativePeer()
-    {
-        if (iNativeInitialized)
-        {
-            return true;
-        }
-        if (Platform.uiThreadAvailable())
-        {
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    handle = _ctor();
-                }
-            });
-            iNativeInitialized = true;
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-
-#ifdef RD_JAVA_OMJ
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            registeredFinalize();
-            mFinalizer = null;
-        }
-    }
-#endif // RD_JAVA_OMJ
-
-    // Native finalization hook, for Symbian only
-    final private void registeredFinalize()
-    {
-        if (Interface.instance != null)
-        {
-            // Finalize M3G interface
-            Platform.executeInUIThread(
-                new M3gRunnable()
-            {
-                public void doRun()
-                {
-                    Platform.finalizeInterface(handle);
-                }
-            });
-            Interface.instance = null;
-        }
-    }
-
-    // Native constructor
-    private static native int _ctor();
-
-    // Native class ID resolver
-    private static native int _getClassID(int hObject);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/KeyframeSequence.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class KeyframeSequence extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int LINEAR = 176;
-    public static final int SLERP = 177;
-    public static final int SPLINE = 178;
-    public static final int SQUAD = 179;
-    public static final int STEP = 180;
-
-    public static final int CONSTANT = 192;
-    public static final int LOOP = 193;
-
-    //------------------------------------------------------------------
-    // Constructor
-    //------------------------------------------------------------------
-
-    public KeyframeSequence(int numKeyframes,
-                            int numComponents,
-                            int interpolation)
-    {
-        super(_ctor(Interface.getHandle(),
-                    numKeyframes,
-                    numComponents,
-                    interpolation));
-    }
-
-    /**
-     */
-    KeyframeSequence(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setKeyframe(int index, int time, float[] value)
-    {
-        _setKeyframe(handle, index, time, value);
-    }
-
-    public void setValidRange(int first, int last)
-    {
-        _setValidRange(handle, first, last);
-    }
-
-    public void setDuration(int duration)
-    {
-        _setDuration(handle, duration);
-    }
-
-    public int getDuration()
-    {
-        return _getDuration(handle);
-    }
-
-    /**
-     */
-    public void setRepeatMode(int mode)
-    {
-        _setRepeatMode(handle, mode);
-    }
-
-    /**
-     */
-    public int getRepeatMode()
-    {
-        return _getRepeatMode(handle);
-    }
-
-    // M3G 1.1 Maintenance release getters
-
-    public int getComponentCount()
-    {
-        return _getComponentCount(handle);
-    }
-
-    public int getInterpolationType()
-    {
-        return _getInterpolationType(handle);
-    }
-
-    public int getKeyframe(int index, float[] value)
-    {
-        return _getKeyframe(handle, index, value);
-    }
-
-    public int getKeyframeCount()
-    {
-        return _getKeyframeCount(handle);
-    }
-
-    public int getValidRangeFirst()
-    {
-        return _getValidRangeFirst(handle);
-    }
-
-    public int getValidRangeLast()
-    {
-        return _getValidRangeLast(handle);
-    }
-
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private native static int _ctor(int hInterface,
-                                    int numKeyframes,
-                                    int numComponents,
-                                    int interpolation);
-    private native static void _setValidRange(int handle, int first, int last);
-    private native static void _setKeyframe(int handle, int index, int time, float[] value);
-    private native static void _setDuration(int handle, int duration);
-    private native static int _getDuration(int handle);
-    private native static void _setRepeatMode(int handle, int mode);
-    private native static int _getRepeatMode(int handle);
-
-    // M3G 1.1 Maintenance release getters
-    private native static int _getComponentCount(int handle);
-    private native static int _getInterpolationType(int handle);
-    private native static int _getKeyframe(int handle, int index, float[] value);
-    private native static int _getKeyframeCount(int handle);
-    private native static int _getValidRangeFirst(int handle);
-    private native static int _getValidRangeLast(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Light.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Light extends Node
-{
-    public static final int AMBIENT     = 128;
-    public static final int DIRECTIONAL = 129;
-    public static final int OMNI        = 130;
-    public static final int SPOT        = 131;
-
-    public Light()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Light(int handle)
-    {
-        super(handle);
-    }
-
-    public void setIntensity(float intensity)
-    {
-        _setIntensity(handle, intensity);
-    }
-
-    public float getIntensity()
-    {
-        return _getIntensity(handle);
-    }
-
-    public void setColor(int RGB)
-    {
-        _setColor(handle, RGB);
-    }
-
-    public int getColor()
-    {
-        return _getColor(handle);
-    }
-
-    public void setMode(int mode)
-    {
-        _setMode(handle, mode);
-    }
-
-    public int getMode()
-    {
-        return _getMode(handle);
-    }
-
-    public void setSpotAngle(float angle)
-    {
-        _setSpotAngle(handle, angle);
-    }
-
-    public float getSpotAngle()
-    {
-        return _getSpotAngle(handle);
-    }
-
-    public void setSpotExponent(float exponent)
-    {
-        _setSpotExponent(handle, exponent);
-    }
-
-    public float getSpotExponent()
-    {
-        return _getSpotExponent(handle);
-    }
-
-    public void setAttenuation(float constant, float linear, float quadratic)
-    {
-        _setAttenuation(handle, constant, linear, quadratic);
-    }
-
-    public float getConstantAttenuation()
-    {
-        return _getAttenuation(handle, Defs.GET_CONSTANT);
-    }
-
-    public float getLinearAttenuation()
-    {
-        return _getAttenuation(handle, Defs.GET_LINEAR);
-    }
-
-    public float getQuadraticAttenuation()
-    {
-        return _getAttenuation(handle, Defs.GET_QUADRATIC);
-    }
-
-    // Native methods
-    private static native int   _ctor(int hInterface);
-    private static native void  _setIntensity(int handle, float intensity);
-    private static native float _getIntensity(int handle);
-    private static native void  _setColor(int handle, int RGB);
-    private static native int   _getColor(int handle);
-    private static native void  _setMode(int handle, int mode);
-    private static native int   _getMode(int handle);
-    private static native void  _setSpotAngle(int handle, float angle);
-    private static native float _getSpotAngle(int handle);
-    private static native void  _setSpotExponent(int handle, float exponent);
-    private static native float _getSpotExponent(int handle);
-    private static native void  _setAttenuation(int handle, float constant, float linear, float quadratic);
-    private static native float _getAttenuation(int handle, int type);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Loader.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1123 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import java.io.*;
-import java.io.IOException;
-
-import java.util.Vector;
-import java.util.Hashtable;
-
-import javax.microedition.io.*;
-import javax.microedition.lcdui.Image;
-import javax.microedition.io.Connector;
-import javax.microedition.io.HttpConnection;
-#ifdef RD_JAVA_OMJ
-import com.nokia.mj.impl.rt.support.Finalizer;
-#endif // RD_JAVA_OMJ
-
-public class Loader
-{
-    // M3G
-    static final byte[] M3G_FILE_IDENTIFIER =
-    {
-        -85, 74, 83, 82, 49, 56, 52, -69, 13, 10, 26, 10
-    };
-    // PNG
-    static final byte[] PNG_FILE_IDENTIFIER =
-    {
-        -119, 80, 78, 71, 13, 10, 26, 10
-    };
-    static final int PNG_IHDR = ((73 << 24) + (72 << 16) + (68 << 8) + 82);
-    static final int PNG_tRNS = ((116 << 24) + (82 << 16) + (78 << 8) + 83);
-    static final int PNG_IDAT = ((73 << 24) + (68 << 16) + (65 << 8) + 84);
-
-    // JPEG
-    static final byte[] JPEG_FILE_IDENTIFIER =
-    {
-        -1, -40
-    };
-    static final int JPEG_JFIF = ((74 << 24) + (70 << 16) + (73 << 8) + 70);
-    // Bytes before colour info in a frame header 'SOFn':
-    // length (2 bytes), precision (1 byte), image height & width (4 bytes)
-    static final int JPEG_SOFn_DELTA = 7;
-    static final int JPEG_INVALID_COLOUR_FORMAT = -1;
-
-    // File identifier types
-    private static final int INVALID_HEADER_TYPE = -1;
-    private static final int M3G_TYPE = 0;
-    private static final int PNG_TYPE = 1;
-    private static final int JPEG_TYPE = 2;
-
-    // Misc.
-    private static final int MAX_IDENTIFIER_LENGTH  = M3G_FILE_IDENTIFIER.length;
-
-    // Initial buffer length for the header
-    private static final int AVG_HEADER_SEC_LENGTH  = 64;
-
-    // Initial buffer length for the xref section
-    private static final int AVG_XREF_SEC_LENGTH    = 128;
-
-    // Instance specific
-    int handle;
-
-    private Vector iLoadedObjects = new Vector();
-    private Vector iFileHistory = new Vector();
-    private String iResourceName = null;
-    private String iParentResourceName = null;
-
-    private int iTotalFileSize = 0;
-    private int iBytesRead = M3G_FILE_IDENTIFIER.length;
-
-    private byte[] iStreamData = null;
-    private int iStreamOffset = 0;
-
-    private Interface iInterface;
-
-#ifdef RD_JAVA_OMJ
-    private Finalizer mFinalizer = new Finalizer()
-    {
-        public void finalizeImpl()
-        {
-            doFinalize();
-        }
-    };
-#endif // RD_JAVA_OMJ
-
-    /**
-     * Default ctor
-     */
-    private Loader()
-    {
-        iInterface = Interface.getInstance();
-    }
-
-    /**
-     * Ctor
-     * @param aFileHistory File storage
-     * @param aParentResourceName Resource name
-     */
-    private Loader(Vector aFileHistory, String aParentResourceName)
-    {
-        iParentResourceName = aParentResourceName;
-        iFileHistory        = aFileHistory;
-        iInterface          = Interface.getInstance();
-    }
-
-    public static Object3D[] load(String name) throws IOException
-    {
-        if (name == null)
-        {
-            throw new NullPointerException();
-        }
-
-        try
-        {
-            return (new Loader()).loadFromStream(name);
-        }
-        catch (SecurityException e)
-        {
-            throw e;
-        }
-        catch (IOException e)
-        {
-            throw e;
-        }
-        catch (Exception e)
-        {
-            throw new IOException("Load error " + e);
-        }
-    }
-
-    public static Object3D[] load(byte[] data, int offset) throws IOException
-    {
-        if (data == null)
-        {
-            throw new NullPointerException();
-        }
-
-        if (offset < 0 || offset >= data.length)
-        {
-            throw new IndexOutOfBoundsException();
-        }
-        try
-        {
-            return (new Loader()).loadFromByteArray(data, offset);
-        }
-        catch (SecurityException e)
-        {
-            throw e;
-        }
-        catch (IOException e)
-        {
-            throw e;
-        }
-        catch (Exception e)
-        {
-            throw new IOException("Load error " + e);
-        }
-    }
-
-    /**
-     * @see javax.microedition.m3g.Loader#load(String)
-     */
-    private Object3D[] loadFromStream(String aName) throws IOException
-    {
-        if (aName == null)
-        {
-            throw new NullPointerException();
-        }
-
-        if (inFileHistory(aName))
-        {
-            throw new IOException("Reference loop detected.");
-        }
-        iResourceName = aName;
-        iFileHistory.addElement(aName);
-        PeekInputStream stream = new PeekInputStream(
-            getInputStream(aName), MAX_IDENTIFIER_LENGTH);
-        // png, jpeg or m3g
-        int type = getIdentifierType(stream);
-        stream.rewind();
-        iStreamData = null;
-        iStreamOffset = 0;
-
-        Object3D[] objects;
-        try
-        {
-            objects = doLoad(stream, type);
-        }
-        finally
-        {
-            try
-            {
-                stream.close();
-                stream = null;
-            }
-            catch (Exception e) {}
-        }
-        // Finally, remove file from history
-        iFileHistory.removeElement(aName);
-        return objects;
-    }
-
-    /**
-     * @see javax.microedition.m3g.Loader#load(byte[], int)
-     */
-    private Object3D[] loadFromByteArray(byte[] aData, int aOffset) throws IOException
-    {
-        if (aData == null)
-        {
-            throw new NullPointerException("Resource byte array is null.");
-        }
-        int type = getIdentifierType(aData, aOffset);
-        ByteArrayInputStream stream =
-            new ByteArrayInputStream(aData, aOffset, aData.length - aOffset);
-        iStreamData = aData;
-        iStreamOffset = aOffset;
-        iResourceName = "ByteArray";
-
-        Object3D[] objects;
-        try
-        {
-            objects = doLoad(stream, type);
-        }
-        finally
-        {
-            try
-            {
-                stream.close();
-                stream = null;
-            }
-            catch (Exception e) {}
-        }
-        return objects;
-    }
-
-    /**
-     * Dispatcher
-     * @param aStream Source stream
-     * @param aType Resource type
-     */
-    private Object3D[] doLoad(InputStream aStream, int aType) throws IOException
-    {
-        if (aType == M3G_TYPE)
-        {
-            return loadM3G(aStream);
-        }
-        else if (aType == PNG_TYPE)
-        {
-            return loadPNG(aStream);
-        }
-        else if (aType == JPEG_TYPE)
-        {
-            return loadJPEG(aStream);
-        }
-        throw new IOException("File not recognized.");
-    }
-
-    /**
-     * PNG resource loader
-     * @param aStream Resource stream
-     * @return An array of newly created Object3D instances
-     */
-    private Object3D[] loadPNG(InputStream aStream) throws IOException
-    {
-        int format = Image2D.RGB;
-        DataInputStream in = new DataInputStream(aStream);
-
-        // Scan chuncs that have effect on Image2D format
-        in.skip(PNG_FILE_IDENTIFIER.length);
-
-        try
-        {
-            while (true)
-            {
-                int length = in.readInt();
-                int type = in.readInt();
-                // IHDR
-                if (type == PNG_IHDR)
-                {
-                    in.skip(9);
-                    int colourType = in.readUnsignedByte();
-                    length -= 10;
-
-                    switch (colourType)
-                    {
-                    case 0:
-                        format = Image2D.LUMINANCE;
-                        break;
-                    case 2:
-                        format = Image2D.RGB;
-                        break;
-                    case 3:
-                        format = Image2D.RGB;
-                        break;
-                    case 4:
-                        format = Image2D.LUMINANCE_ALPHA;
-                        break;
-                    case 6:
-                        format = Image2D.RGBA;
-                        break;
-                    }
-                }
-                // tRNS
-                if (type == PNG_tRNS)
-                {
-                    switch (format)
-                    {
-                    case Image2D.LUMINANCE:
-                        format = Image2D.LUMINANCE_ALPHA;
-                        break;
-                    case Image2D.RGB:
-                        format = Image2D.RGBA;
-                        break;
-                    }
-                }
-                // IDAT
-                if (type == PNG_IDAT)
-                {
-                    break;
-                }
-
-                in.skip(length + 4);
-            }
-        }
-        // EOF
-        catch (Exception e)
-        {
-        }
-        // Close the data stream
-        try
-        {
-            in.close();
-            in = null;
-        }
-        catch (Exception e) {}
-        return buildImage2D(format);
-    }
-
-    /**
-     * JPEG (with the same detailed definitions about the JPEG image format as defined in the
-     * JSR 118 MIDP 2.1 specification for LCDUI) MUST be supported by compliant
-     * implementations as a 2D bitmap image format for the Image2D class using the
-     * javax.microedition.m3g.Loader class, and for M3G content files referencing bitmap images.
-     * For colour JPEG images, the pixel format of the returned Image2D object MUST be
-     * Image2D.RGB and for monochrome JPEG images, the pixel format MUST be
-     * Image2D.LUMINANCE.
-     *
-     * JPEG marker: A two-byte code in which the first byte is 0xFF and the second
-     * byte is a value between 1 and 0xFE.
-     *
-     * A JFIF file uses APP0 (0xe0) marker segments and constrains certain parameters in the frame.
-     *
-     * A frame header:
-     * - 0xff, 'SOFn'
-     * - length (2 bytes, Hi-Lo)
-     * - data precision (1 byte)
-     * - image height (2 bytes, Hi-Lo)
-     * - image width (2 bytes, Hi-Lo)
-     * - number of components (1 byte): 1 = grey scaled, 3 = color YCbCr or YIQ, 4 = color CMYK)
-     *
-     * @param aStream Resource stream
-     * @return An array of newly created Object3D instances
-     */
-    private Object3D[] loadJPEG(InputStream aStream) throws IOException
-    {
-        int format = JPEG_INVALID_COLOUR_FORMAT;
-        DataInputStream in = new DataInputStream(aStream);
-        // Skip file identifier
-        in.skip(JPEG_FILE_IDENTIFIER.length);
-        try
-        {
-            int marker;
-            do
-            {
-                // Find marker
-                while (in.readUnsignedByte() != 0xff);
-                do
-                {
-                    marker = in.readUnsignedByte();
-                }
-                while (marker == 0xff);
-
-                // Parse marker
-                switch (marker)
-                {
-                    // 'SOFn' (Start Of Frame n)
-                case 0xC0:
-                case 0xC1:
-                case 0xC2:
-                case 0xC3:
-                case 0xC5:
-                case 0xC6:
-                case 0xC7:
-                case 0xC9:
-                case 0xCA:
-                case 0xCB:
-                case 0xCD:
-                case 0xCE:
-                case 0xCF:
-                    // Skip length(2), precicion(1), width(2), height(2)
-                    in.skip(JPEG_SOFn_DELTA);
-                    switch (in.readUnsignedByte())
-                    {
-                    case 1:
-                        format = Image2D.LUMINANCE;
-                        break;
-                    case 3:
-                        format = Image2D.RGB;
-                        break;
-                    default:
-                        throw new IOException("Unknown JPG format.");
-                    }
-                    break;
-                    // APP0 (0xe0) marker segments and constrains certain parameters in the frame.
-                case 0xe0:
-                    int length = in.readUnsignedShort();
-                    if (JPEG_JFIF != in.readInt())
-                    {
-                        throw new IOException("Not a valid JPG file.");
-                    }
-                    in.skip(length - 4 - 2);
-                    break;
-                default:
-                    // Skip variable data
-                    in.skip(in.readUnsignedShort() - 2);
-                    break;
-                }
-            }
-            while (format == JPEG_INVALID_COLOUR_FORMAT);
-        }
-        catch (Exception e) {}
-        // Close the data stream
-        try
-        {
-            in.close();
-            in = null;
-        }
-        catch (Exception e) {}
-        return buildImage2D(format);
-    }
-
-    /**
-     * Image2D builder
-     * @param aColourFormat Colour format
-     * @return An array of newly created Object3D instances
-     */
-    private Object3D[] buildImage2D(int aColourFormat) throws IOException
-    {
-        InputStream stream;
-        if (iStreamData == null)
-        {
-            stream = getInputStream(iResourceName);
-        }
-        else
-        {
-            stream = (InputStream) new ByteArrayInputStream(
-                         iStreamData, iStreamOffset, iStreamData.length - iStreamOffset);
-        }
-        // Create an image object
-        Image2D i2d;
-        try
-        {
-            i2d = new Image2D(aColourFormat, Image.createImage(stream));
-        }
-        finally
-        {
-            try
-            {
-                stream.close();
-            }
-            catch (Exception e) {}
-        }
-        return new Object3D[] { i2d };
-    }
-
-
-    /**
-     * M3G resource loader
-     * @param aStream Resource stream
-     * @return An array of newly created Object3D instances
-     */
-    private Object3D[] loadM3G(InputStream aStream) throws IOException
-    {
-        aStream.skip(M3G_FILE_IDENTIFIER.length);
-        if (aStream instanceof PeekInputStream)
-            ((PeekInputStream)aStream).increasePeekBuffer(AVG_HEADER_SEC_LENGTH);
-
-        // Read header
-        int compressionScheme = readByte(aStream);
-        int totalSectionLength = readUInt32(aStream);
-        if (aStream instanceof PeekInputStream && totalSectionLength > AVG_HEADER_SEC_LENGTH)
-            ((PeekInputStream)aStream).increasePeekBuffer(totalSectionLength - AVG_HEADER_SEC_LENGTH);
-        int uncompressedLength = readUInt32(aStream);
-
-        int objectType = readByte(aStream);
-        int length    = readUInt32(aStream);
-
-        byte vMajor = (byte) readByte(aStream);
-        byte vMinor = (byte) readByte(aStream);
-        boolean externalLinks = readBoolean(aStream);
-        iTotalFileSize = readUInt32(aStream);
-        int approximateContentSize = readUInt32(aStream);
-        String authoringField = readString(aStream);
-
-        int checksum = readUInt32(aStream);
-
-        /* Create and register a new native Loader */
-        handle = _ctor(Interface.getHandle());
-        Interface.register(this);
-
-        if (externalLinks)
-        {
-            if (aStream instanceof PeekInputStream)
-                ((PeekInputStream)aStream).increasePeekBuffer(AVG_XREF_SEC_LENGTH);
-            loadExternalRefs(aStream);
-            if (iLoadedObjects.size() > 0)   // Load and set external references
-            {
-                int[] xRef = new int[iLoadedObjects.size()];
-                for (int i = 0; i < xRef.length; i++)
-                    xRef[i] = ((Object3D)iLoadedObjects.elementAt(i)).handle;
-                _setExternalReferences(handle, xRef);
-            }
-            else
-            {
-                throw new IOException("No external sections [" + iResourceName + "].");
-            }
-        }
-
-        // Reset stream
-        if (aStream instanceof PeekInputStream)
-            ((PeekInputStream)aStream).rewind();
-        else if (aStream.markSupported())
-            aStream.reset(); // Reset is supported in ByteArrayInputStreams
-
-        int read = 0;
-        int size = aStream.available();
-
-        if (size == 0)
-        {
-            size = 2048;    // start with some size
-        }
-
-        while (read < iTotalFileSize)
-        {
-            if (read + size > iTotalFileSize)
-            {
-                size = iTotalFileSize - read;
-            }
-            // Use native loader to load objects
-            byte[] data = new byte[size];
-            if (aStream.read(data) == -1)
-            {
-                break;
-            }
-            read += size;
-
-            size = _decodeData(handle, 0, data);
-            if (size > 0 && aStream.available() > size)
-            {
-                size = aStream.available();
-            }
-        }
-        if (size != 0 || read != iTotalFileSize)
-        {
-            throw new IOException("Invalid file length [" + iResourceName + "].");
-        }
-
-        Object3D[] objects = null;
-        int num = _getLoadedObjects(handle, null);
-        if (num > 0)
-        {
-            int[] obj = new int[num];
-            _getLoadedObjects(handle, obj);
-            objects = new Object3D[num];
-            for (int i = 0; i < objects.length; i++)
-            {
-                objects[i] = Interface.getObjectInstance(obj[i]);
-            }
-            setUserObjects();
-        }
-        return objects;
-    }
-
-    /**
-     *
-     */
-    private void setUserObjects() throws IOException
-    {
-        int numObjects = _getObjectsWithUserParameters(handle, null);
-        int[] obj = null;
-        if (numObjects > 0)
-        {
-            obj = new int[numObjects];
-            _getObjectsWithUserParameters(handle, obj);
-        }
-        for (int i = 0; i < numObjects; i++)
-        {
-            int num = _getNumUserParameters(handle, i);
-            if (num > 0)
-            {
-                Hashtable hash = new Hashtable();
-                for (int j = 0; j < num; j++)
-                {
-                    int len = _getUserParameter(handle, i, j, null);
-                    byte[] data = new byte[len];
-                    int id = _getUserParameter(handle, i, j, data);
-                    if (hash.put(new Integer(id), data) != null)
-                        throw new IOException("Duplicate id in user data [" + iResourceName + "].");;
-                }
-                Object3D object = Interface.getObjectInstance(obj[i]);
-                object.setUserObject(hash);
-            }
-        }
-    }
-
-    /**
-     * Load external resources
-     */
-    private void loadExternalRefs(InputStream aStream) throws IOException
-    {
-        // Check for the end of the aStream or file
-        int firstByte = readByte(aStream);
-        if (firstByte == -1 || (iTotalFileSize != 0 && iBytesRead >= iTotalFileSize))
-        {
-            return;
-        }
-
-        int compressionScheme = firstByte;
-
-        int totalSectionLength = readUInt32(aStream);
-        iBytesRead += totalSectionLength;
-        if (aStream instanceof PeekInputStream && totalSectionLength > AVG_XREF_SEC_LENGTH)
-            ((PeekInputStream)aStream).increasePeekBuffer(totalSectionLength - AVG_XREF_SEC_LENGTH);
-        int uncompressedLength = readUInt32(aStream);
-        int expectedCount = totalSectionLength;
-
-        // Decompress data if necessary
-        CountedInputStream uncompressedStream = null;
-        if (compressionScheme == 0)
-        {
-            uncompressedStream = new CountedInputStream(aStream);
-            if (uncompressedLength != totalSectionLength - 13)
-            {
-                throw new IOException("Section length mismatch [" + iResourceName + "].");
-            }
-        }
-        else if (compressionScheme == 1)
-        {
-            if (uncompressedLength == 0 && totalSectionLength - 13 == 0)
-            {
-                uncompressedStream = new CountedInputStream(null);
-            }
-            else
-            {
-                if (uncompressedLength <= 0 || totalSectionLength - 13 <= 0)
-                {
-                    throw new IOException("Section length mismatch [" + iResourceName + "].");
-                }
-                byte[] compressed = new byte[(int) totalSectionLength - 13];
-                aStream.read(compressed);
-
-                byte[] uncompressed = new byte[(int) uncompressedLength];
-
-                // zlib decompression
-                if (!_inflate(compressed, uncompressed))
-                {
-                    throw new IOException("Decompression error.");
-                }
-                uncompressedStream = new CountedInputStream(
-                    new ByteArrayInputStream(uncompressed));
-            }
-        }
-        else
-        {
-            throw new IOException("Unrecognized compression scheme [" + iResourceName + "].");
-        }
-
-        // load all objects in this section
-        uncompressedStream.resetCounter();
-
-        while (uncompressedStream.getCounter() < uncompressedLength)
-        {
-            iLoadedObjects.addElement(loadObject(uncompressedStream));
-        }
-
-        if (uncompressedStream.getCounter() != uncompressedLength)
-        {
-            throw new IOException("Section length mismatch [" + iResourceName + "].");
-        }
-
-        // read checksum
-        int checksum = readUInt32(aStream);
-    }
-
-    private Object3D loadObject(CountedInputStream aStream) throws IOException
-    {
-        int objectType = readByte(aStream);
-        int length    = readUInt32(aStream);
-
-        int expectedCount = aStream.getCounter() + length;
-        Object3D newObject = null;
-
-        if (objectType == 255)
-        {
-            String xref = readString(aStream);
-            newObject = (new Loader(iFileHistory, iResourceName)).loadFromStream(xref)[0];
-        }
-        else
-        {
-            throw new IOException("Invalid external section [" + iResourceName + "].");
-        }
-
-        if (expectedCount != aStream.getCounter())
-        {
-            throw new IOException("Object length mismatch [" + iResourceName + "].");
-        }
-
-        return newObject;
-    }
-
-    /**
-     * Read a byte integer from a stream
-     */
-    private static final int readByte(InputStream aStream) throws IOException
-    {
-        return aStream.read();
-    }
-
-    /**
-     * Read a boolean from a stream
-     */
-    private static boolean readBoolean(InputStream aStream) throws IOException
-    {
-        int b = aStream.read();
-        if (b == 0)
-        {
-            return false;
-        }
-        if (b != 1)
-        {
-            throw new IOException("Malformed boolean.");
-        }
-        return true;
-    }
-
-    /**
-     * Read a unsigned integer from a stream
-     */
-    private static final int readUInt32(InputStream aStream) throws IOException
-    {
-        return aStream.read()
-               + (aStream.read() << 8)
-               + (aStream.read() << 16)
-               + (aStream.read() << 24);
-    }
-
-    /**
-     * Read a string from a stream
-     */
-    private static String readString(InputStream aStream) throws IOException
-    {
-        StringBuffer result = new StringBuffer();
-        int i = 0;
-        for (int c = aStream.read(); c != 0; c = aStream.read())
-        {
-            if ((c & 0x80) == 0)   // 0xxxxxxx => 1 byte
-            {
-                result.append((char)(c & 0x00FF));
-            }
-            else if ((c & 0xE0) == 0xC0)   // 110xxxxx => 2 bytes
-            {
-                int c2 = aStream.read();
-                if ((c2 & 0xC0) != 0x80)   // second byte is not 10yyyyyy
-                {
-                    throw new IOException("Invalid UTF-8 string.");
-                }
-                else   // 110xxxxx 10yyyyyy
-                {
-                    result.append((char)(((c & 0x1F) << 6) | (c2 & 0x3F)));
-                }
-            }
-            else if ((c & 0xF0) == 0xE0)   // 1110 xxxx => 3 bytes
-            {
-                int c2 = aStream.read();
-                int c3 = aStream.read();
-                if (((c2 & 0xC0) != 0x80) || // second byte is not 10yyyyyy
-                        ((c3 & 0xC0) != 0x80))   // third byte is not 10zzzzzz
-                {
-                    throw new IOException("Invalid UTF-8 string.");
-                }
-                else   // 1110xxxx 10yyyyyy 10zzzzzz
-                {
-                    result.append((char)(((c & 0x0F) << 12) |
-                                         ((c2 & 0x3F) <<6) |
-                                         (c3 & 0x3F)));
-                }
-            }
-            else   // none of above
-            {
-                throw new IOException("Invalid UTF-8 string.");
-            }
-        }
-
-        return result.toString();
-    }
-
-    /**
-     * Solve an identifier of the given data
-     * @param aStream Stream
-     * @return solved identifier.
-     */
-    private int getIdentifierType(InputStream aStream) throws IOException
-    {
-        byte[] data = new byte[MAX_IDENTIFIER_LENGTH];
-        aStream.read(data);
-        return getIdentifierType(data, 0);
-    }
-
-    /**
-     * Solve an identifier of the given data
-     * @param aData Data
-     * @param aOffset Data offset
-     * @return solved identifier.
-     */
-    private static int getIdentifierType(byte[] aData, int aOffset)
-    {
-        // Try the JPEG/JFIF identifier
-        if (parseIdentifier(aData, aOffset, JPEG_FILE_IDENTIFIER))
-        {
-            return JPEG_TYPE;
-        }
-        // Try the PNG identifier
-        else if (parseIdentifier(aData, aOffset, PNG_FILE_IDENTIFIER))
-        {
-            return PNG_TYPE;
-        }
-        // Try the M3G identifier
-        else if (parseIdentifier(aData, aOffset, M3G_FILE_IDENTIFIER))
-        {
-            return M3G_TYPE;
-        }
-        return INVALID_HEADER_TYPE;
-    }
-
-    /**
-     * Parse identifier from a data
-     * @param aData Source data
-     * @param aOffset Source data offset
-     * @param aIdentifier Identifier
-     * @return true if the data contains the given identifier
-     */
-    private static boolean parseIdentifier(byte[] aData, int aOffset, byte[] aIdentifier)
-    {
-        if ((aData.length - aOffset) < aIdentifier.length)
-        {
-            return false;
-        }
-        for (int index = 0; index < aIdentifier.length; index++)
-        {
-            if (aData[index + aOffset] != aIdentifier[index])
-            {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * File name storage for preventing multiple referencing
-     * @param name File name
-     * @return true if the storage contains the given file name
-     */
-    private boolean inFileHistory(String name)
-    {
-        for (int i = 0; i < iFileHistory.size(); i++)
-            if (((String)iFileHistory.elementAt(i)).equals(name))
-            {
-                return true;
-            }
-        return false;
-    }
-
-    /*
-     * InputStream-related helper functions
-     */
-
-    /**
-     * Open a HTTP stream and check its MIME type
-     * @param name Resource name
-     * @return a http stream and checks the MIME type
-     */
-    private InputStream getHttpInputStream(String name) throws IOException
-    {
-        InputConnection ic = (InputConnection)Connector.open(name);
-        // Content-Type is available for http and https connections
-        if (ic instanceof HttpConnection)
-        {
-            HttpConnection hc = (HttpConnection) ic;
-            // Check MIME type
-            String type = hc.getHeaderField("Content-Type");
-            if (type != null &&
-                    !type.equals("application/m3g") &&
-                    !type.equals("image/png") &&
-                    !type.equals("image/jpeg"))
-            {
-                throw new IOException("Wrong MIME type: " + type + ".");
-            }
-        }
-
-        InputStream is;
-        try
-        {
-            is = ic.openInputStream();
-        }
-        finally
-        {
-            try
-            {
-                ic.close();
-                ic = null;
-            }
-            catch (Exception e) {}
-        }
-        return is;
-    }
-
-    // returns a stream built from the specified file or URI
-    private InputStream getInputStream(String name) throws IOException
-    {
-        if (name.indexOf(':') != -1)   // absolute URI reference
-        {
-            return getHttpInputStream(name);
-        }
-
-        if (name.charAt(0) == '/')   // absolute file reference
-        {
-            return (new Object()).getClass().getResourceAsStream(name);
-        }
-
-        if (iParentResourceName == null)
-        {
-            throw new IOException("Relative URI.");
-        }
-
-        String uri = iParentResourceName.substring(0, iParentResourceName.lastIndexOf('/') + 1) + name;
-
-        if (uri.charAt(0) == '/')
-        {
-            return (new Object()).getClass().getResourceAsStream(uri);
-        }
-        else
-        {
-            return getHttpInputStream(uri);
-        }
-    }
-
-    class PeekInputStream extends InputStream
-    {
-        private int[] iPeekBuffer;
-        private InputStream iStream;
-        private int iBuffered;
-        private int iCounter;
-
-        PeekInputStream(InputStream aStream, int aLength)
-        {
-            iStream = aStream;
-            iPeekBuffer = new int[aLength];
-        }
-
-        public int read() throws IOException
-        {
-            if (iCounter < iBuffered)
-            {
-                return iPeekBuffer[iCounter++];
-            }
-
-            int nv = iStream.read();
-
-            if (iBuffered < iPeekBuffer.length)
-            {
-                iPeekBuffer[iBuffered] = nv;
-                iBuffered++;
-            }
-
-            iCounter++;
-            return nv;
-        }
-
-        public void increasePeekBuffer(int aLength)
-        {
-            int[] temp = new int[iPeekBuffer.length + aLength];
-            for (int i = 0; i < iBuffered; i++)
-                temp[i] = iPeekBuffer[i];
-            iPeekBuffer = temp;
-        }
-
-        public int available() throws IOException
-        {
-            if (iCounter < iBuffered)
-            {
-                return iBuffered - iCounter + iStream.available();
-            }
-            return iStream.available();
-        }
-
-        public void close()
-        {
-            try
-            {
-                iStream.close();
-            }
-            catch (IOException ioe)
-            {
-                // Intentionally left empty
-            }
-        }
-
-        public void rewind() throws IOException
-        {
-            if (iCounter > iBuffered)
-            {
-                throw new IOException("Peek buffer overrun.");
-            }
-            iCounter = 0;
-        }
-    }
-
-    class CountedInputStream extends InputStream
-    {
-        private InputStream iStream;
-        private int iCounter;
-
-        public CountedInputStream(InputStream aStream)
-        {
-            iStream = aStream;
-            resetCounter();
-        }
-
-        public int read() throws IOException
-        {
-            iCounter++;
-            return iStream.read();
-        }
-
-        public void resetCounter()
-        {
-            iCounter = 0;
-        }
-        public int getCounter()
-        {
-            return iCounter;
-        }
-
-        public void close()
-        {
-            try
-            {
-                iStream.close();
-            }
-            catch (IOException ioe)
-            {
-                // Intentionally left empty
-            }
-        }
-
-        public int available() throws IOException
-        {
-            return iStream.available();
-        }
-    }
-
-#ifdef RD_JAVA_OMJ
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            registeredFinalize();
-            mFinalizer = null;
-        }
-    }
-#endif // RD_JAVA_OMJ
-
-    // Finalization method for Symbian
-    final private void registeredFinalize()
-    {
-        if (handle != 0)
-        {
-            Platform.finalizeObject(handle, iInterface);
-            iInterface.deregister(this, iInterface);
-            iInterface = null;
-            handle = 0;
-        }
-    }
-
-    // zlib decompression
-    private native static boolean _inflate(byte[] data, byte[] buffer);
-
-    // native loader
-    private native static int _ctor(int handle);
-    private native static int _decodeData(int handle, int offset, byte[] data);
-    private native static void _setExternalReferences(int handle, int[] references);
-    private native static int _getLoadedObjects(int handle, int[] objects);
-    private native static int _getObjectsWithUserParameters(int handle, int[] objects);
-    private native static int _getNumUserParameters(int handle, int obj);
-    private native static int _getUserParameter(int handle, int obj, int index, byte[] data);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/M3gRunnable.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-/**
- * Class that wraps runnable in order to catch and forward
- * exceptions that occured when executing in UI thread.
- * This class is used only for running native methods in UI thread.
- */
-abstract class M3gRunnable implements Runnable
-{
-    private Throwable e = null;
-
-    /**
-     * From Runnable interface
-     */
-    public void run()
-    {
-        try
-        {
-            doRun();
-        }
-        catch (Throwable t)
-        {
-            e = t;
-        }
-    }
-
-    /**
-     * Checks for possible exceptions and errors and throws them forward.
-     * Only unchecked exceptions and errors are thrown as only checked
-     * exception that m3gcore may throw comes from loader which is not
-     * executed in UI thread
-     *
-     * @throws RuntimeException
-     * @throws Error
-     */
-    public void checkAndThrow()
-    {
-        if (e == null)
-        {
-            return;
-        }
-        if (e instanceof RuntimeException)
-        {
-            throw(RuntimeException)e;
-        }
-        else if (e instanceof Error)
-        {
-            throw(Error)e;
-        }
-    }
-
-    /**
-     * Method to be implemented for the UI thead execution
-     */
-    abstract void doRun();
-}
\ No newline at end of file
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Material.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Material extends Object3D
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int AMBIENT  = 1024;
-    public static final int DIFFUSE  = 2048;
-    public static final int EMISSIVE = 4096;
-    public static final int SPECULAR = 8192;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public Material()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    Material(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setColor(int target, int ARGB)
-    {
-        _setColor(handle, target, ARGB);
-    }
-
-    public int getColor(int target)
-    {
-        return _getColor(handle, target);
-    }
-
-    public void setShininess(float shininess)
-    {
-        _setShininess(handle, shininess);
-    }
-
-    public float getShininess()
-    {
-        return _getShininess(handle);
-    }
-
-    public void setVertexColorTrackingEnable(boolean enable)
-    {
-        _setVertexColorTrackingEnable(handle, enable);
-    }
-
-    public boolean isVertexColorTrackingEnabled()
-    {
-        return _isVertexColorTrackingEnabled(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private native static int _ctor(int hInstance);
-    private native static void _setColor(int handle, int target, int ARGB);
-    private native static int _getColor(int handle, int target);
-    private native static void _setShininess(int handle, float shininess);
-    private native static float _getShininess(int handle);
-    private native static void _setVertexColorTrackingEnable(int handle, boolean enable);
-    private native static boolean _isVertexColorTrackingEnabled(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Mesh.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Mesh extends Node
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private VertexBuffer vertices;
-    private Appearance[] appearances;
-    private IndexBuffer[] triangles;
-
-    static private IndexBuffer[] tempTrianglesArray;
-    static private Appearance[]  tempAppearanceArray;
-
-    static private IndexBuffer tempTriangles;
-    static private Appearance  tempAppearance;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    Mesh(int handle)
-    {
-        super(handle);
-        updateReferences();
-    }
-
-    public Mesh(VertexBuffer vertices,
-                IndexBuffer[] triangles,
-                Appearance[] appearances)
-    {
-        super(createHandle(vertices, triangles, appearances));
-        updateReferences();
-    }
-
-    public Mesh(VertexBuffer vertices,
-                IndexBuffer triangles,
-                Appearance appearance)
-    {
-        super(createHandle(vertices, triangles, appearance));
-        updateReferences();
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setAppearance(int index, Appearance appearance)
-    {
-        _setAppearance(handle, index, appearance != null ? appearance.handle : 0);
-        appearances[index] = appearance;
-    }
-
-    public Appearance getAppearance(int index)
-    {
-        return appearances[index];
-    }
-
-    public IndexBuffer getIndexBuffer(int index)
-    {
-        return triangles[index];
-    }
-
-    public VertexBuffer getVertexBuffer()
-    {
-        return vertices;
-    }
-
-    public int getSubmeshCount()
-    {
-        return _getSubmeshCount(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    static void verifyParams(VertexBuffer vertices,
-                             IndexBuffer[] triangles,
-                             Appearance[] appearances)
-    {
-        if (vertices == null || triangles == null)
-        {
-            throw new NullPointerException();
-        }
-        if (triangles.length == 0
-                || appearances != null && appearances.length < triangles.length)
-        {
-            throw new IllegalArgumentException();
-        }
-        if (triangles.length == 0)
-        {
-            throw new IllegalArgumentException();
-        }
-        for (int i = 0; i < triangles.length; ++i)
-        {
-            if (triangles[i] == null)
-            {
-                throw new NullPointerException();
-            }
-        }
-    }
-
-    static void verifyParams(VertexBuffer vertices,
-                             IndexBuffer triangles)
-    {
-        if (vertices == null || triangles == null)
-        {
-            throw new NullPointerException();
-        }
-    }
-
-    void updateReferences()
-    {
-        triangles = new IndexBuffer[_getSubmeshCount(handle)];
-        appearances = new Appearance[triangles.length];
-
-        vertices = (VertexBuffer)getInstance(_getVertexBuffer(handle));
-
-        for (int i = 0; i < triangles.length; i++)
-        {
-            triangles[i] = (IndexBuffer)getInstance(_getIndexBuffer(handle, i));
-            appearances[i] = (Appearance)getInstance(_getAppearance(handle, i));
-        }
-    }
-
-    static int createHandle(VertexBuffer vertices,
-                            IndexBuffer[] triangles,
-                            Appearance[] appearances)
-    {
-
-        tempTrianglesArray = triangles;
-        tempAppearanceArray = appearances;
-
-        // Verify parameters
-        verifyParams(vertices, triangles, appearances);
-
-        // Init the native side
-        int[] hTriangles = new int[triangles.length];
-        int[] hAppearances = null;
-
-        if (appearances != null)
-        {
-            hAppearances = new int[appearances.length];
-        }
-
-        for (int i = 0; i < triangles.length; i++)
-        {
-            hTriangles[i] = triangles[i].handle;
-
-            if (appearances != null)
-            {
-                hAppearances[i] = appearances[i] != null ? appearances[i].handle : 0;
-            }
-        }
-
-        int ret =  _ctor(Interface.getHandle(),
-                         vertices.handle,
-                         hTriangles,
-                         hAppearances);
-
-
-        tempTrianglesArray = null;
-        tempAppearanceArray = null;
-
-        return ret;
-
-    }
-
-    static int createHandle(VertexBuffer vertices,
-                            IndexBuffer triangles,
-                            Appearance appearance)
-    {
-
-        tempTriangles  = triangles;
-        tempAppearance = appearance;
-
-        verifyParams(vertices, triangles);
-
-        // Init the native side
-        int[] hTriangles = new int[1];
-        int[] hAppearances = null;
-
-        hTriangles[0] = triangles.handle;
-
-        if (appearance != null)
-        {
-            hAppearances = new int[1];
-            hAppearances[0] = appearance.handle;
-        }
-
-        int ret =  _ctor(Interface.getHandle(),
-                         vertices.handle,
-                         hTriangles,
-                         hAppearances);
-
-
-        tempTriangles  = null;
-        tempAppearance = null;
-
-
-        return ret;
-
-    }
-
-    // Native methods
-    private static native int _ctor(int hInstance,
-                                    int hVertices,
-                                    int[] hTriangles,
-                                    int[] hAppearances);
-    private static native void _setAppearance(int handle, int index, int hAppearance);
-    private static native int _getAppearance(int handle, int index);
-    private static native int _getIndexBuffer(int handle, int index);
-    private static native int _getVertexBuffer(int handle);
-    private static native int _getSubmeshCount(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/MorphingMesh.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class MorphingMesh extends Mesh
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private VertexBuffer[] targets;
-
-    static private IndexBuffer[] tempTrianglesArray;
-    static private Appearance[]  tempAppearanceArray;
-
-    static private IndexBuffer tempTriangles;
-    static private Appearance  tempAppearance;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public MorphingMesh(
-        VertexBuffer base,
-        VertexBuffer[] targets,
-        IndexBuffer triangles,
-        Appearance appearance)
-    {
-        super(createHandle(base, targets, triangles, appearance));
-        this.targets = new VertexBuffer[targets.length];
-        System.arraycopy(targets, 0, this.targets, 0, targets.length);
-    }
-
-    public MorphingMesh(
-        VertexBuffer base,
-        VertexBuffer[] targets,
-        IndexBuffer[] triangles,
-        Appearance[] appearances)
-    {
-        super(createHandle(base, targets, triangles, appearances));
-        this.targets = new VertexBuffer[targets.length];
-        System.arraycopy(targets, 0, this.targets, 0, targets.length);
-    }
-
-    /**
-     */
-    MorphingMesh(int handle)
-    {
-        super(handle);
-        targets = new VertexBuffer[_getMorphTargetCount(handle)];
-        for (int i = 0; i < targets.length; i++)
-        {
-            targets[i] = (VertexBuffer)getInstance(_getMorphTarget(handle, i));
-        }
-    }
-
-    public VertexBuffer getMorphTarget(int index)
-    {
-        return targets[index];
-    }
-
-    public int getMorphTargetCount()
-    {
-        return _getMorphTargetCount(handle);
-    }
-
-    public void setWeights(float[] weights)
-    {
-        _setWeights(handle, weights);
-    }
-
-    public void getWeights(float[] weights)
-    {
-        _getWeights(handle, weights);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    static int createHandle(VertexBuffer base,
-                            VertexBuffer[] targets,
-                            IndexBuffer triangles,
-                            Appearance appearance)
-    {
-
-        tempTriangles  = triangles;
-        tempAppearance = appearance;
-
-        verifyParams(base, triangles);
-
-        int[] hTargets = new int[targets.length];
-        int[] hTriangles = null;
-        int[] hAppearances = null;
-
-        for (int i = 0; i < targets.length; i++)
-        {
-            hTargets[i] = targets[i].handle;
-        }
-
-        hTriangles = new int[1];
-        hTriangles[0] = triangles.handle;
-
-        if (appearance != null)
-        {
-            hAppearances = new int[1];
-            hAppearances[0] = appearance.handle;
-        }
-
-        int ret =  _ctor(Interface.getHandle(),
-                         base.handle,
-                         hTargets,
-                         hTriangles,
-                         hAppearances);
-
-        tempTriangles  = null;
-        tempAppearance = null;
-
-        return ret;
-    }
-
-    static int createHandle(VertexBuffer base,
-                            VertexBuffer[] targets,
-                            IndexBuffer[] triangles,
-                            Appearance[] appearances)
-    {
-
-        tempTrianglesArray = triangles;
-        tempAppearanceArray = appearances;
-
-
-        verifyParams(base, triangles, appearances);
-
-        int[] hTargets = new int[targets.length];
-        int[] hTriangles = null;
-        int[] hAppearances = null;
-
-        for (int i = 0; i < targets.length; i++)
-        {
-            hTargets[i] = targets[i].handle;
-        }
-
-        hTriangles = new int[triangles.length];
-
-        if (appearances != null)
-        {
-            hAppearances = new int[appearances.length];
-        }
-
-        for (int i = 0; i < triangles.length; i++)
-        {
-            hTriangles[i] = triangles[i].handle;
-
-            if (hAppearances != null)
-            {
-                hAppearances[i] = appearances[i] != null ? appearances[i].handle : 0;
-            }
-        }
-
-        int ret =  _ctor(Interface.getHandle(),
-                         base.handle,
-                         hTargets,
-                         hTriangles,
-                         hAppearances);
-
-        tempTrianglesArray = null;
-        tempAppearanceArray = null;
-
-        return ret;
-
-    }
-
-    // Native methods
-    private static native int _ctor(int hInstance,
-                                    int handle,
-                                    int[] hTargets,
-                                    int[] hTriangles,
-                                    int[] hAppearances);
-    private static native void _setWeights(int handle, float[] weights);
-    private static native void _getWeights(int handle, float[] weights);
-    private static native int _getMorphTarget(int handle, int index);
-    private static native int _getMorphTargetCount(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Node.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public abstract class Node extends Transformable
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int NONE = 144;
-    public static final int ORIGIN = 145;
-    public static final int X_AXIS = 146;
-    public static final int Y_AXIS = 147;
-    public static final int Z_AXIS = 148;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    // The node references are kept on the Java side to avoid having
-    // to replicate garbage collection in the native implementation.
-    // Instead, we let Java manage Node reachability detection and
-    // deletion.
-
-    private Node parent;
-    private Node zRef, yRef;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    /**
-     * There is only a package private constructor. Applications can not extend
-     * this class directly.</p>
-     */
-    Node(int handle)
-    {
-        super(handle);
-        parent = (Node) getInstance(_getParent(handle));
-        zRef = (Node) getInstance(_getZRef(handle));
-        yRef = (Node) getInstance(_getYRef(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public Node getParent()
-    {
-        return parent;
-    }
-
-    public boolean getTransformTo(Node target, Transform transform)
-    {
-        return _getTransformTo(handle,
-                               target.handle,
-                               transform != null ? transform.matrix : null);
-    }
-
-    public void setAlignment(Node zReference, int zTarget,
-                             Node yReference, int yTarget)
-    {
-        _setAlignment(handle,
-                      zReference != null ? zReference.handle : 0, zTarget,
-                      yReference != null ? yReference.handle : 0, yTarget);
-        zRef = zReference;
-        yRef = yReference;
-    }
-
-    public void setAlphaFactor(float alphaFactor)
-    {
-        _setAlphaFactor(handle, alphaFactor);
-    }
-
-    public float getAlphaFactor()
-    {
-        return _getAlphaFactor(handle);
-    }
-
-    public void setRenderingEnable(boolean enable)
-    {
-        _enable(handle, Defs.SETGET_RENDERING, enable);
-    }
-
-    public boolean isRenderingEnabled()
-    {
-        return _isEnabled(handle, Defs.SETGET_RENDERING);
-    }
-
-    public void setPickingEnable(boolean enable)
-    {
-        _enable(handle, Defs.SETGET_PICKING, enable);
-    }
-
-    public boolean isPickingEnabled()
-    {
-        return _isEnabled(handle, Defs.SETGET_PICKING);
-    }
-
-    public void setScope(int id)
-    {
-        _setScope(handle, id);
-    }
-
-    public int getScope()
-    {
-        return _getScope(handle);
-    }
-
-    public final void align(Node reference)
-    {
-        _align(handle, reference != null ? reference.handle : 0);
-    }
-
-    // M3G 1.1 Maintenance release getters
-
-    public Node getAlignmentReference(int axis)
-    {
-        switch (axis)
-        {
-        case Y_AXIS:
-            return yRef;
-        case Z_AXIS:
-            return zRef;
-        default:
-            throw new IllegalArgumentException();
-        }
-    }
-
-    public int getAlignmentTarget(int axis)
-    {
-        return _getAlignmentTarget(handle, axis);
-    }
-
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    void setParent(Node parent)
-    {
-        this.parent = parent;
-    }
-
-    // Native methods
-    private static native boolean _getTransformTo(int handle,
-            int hTarget,
-            byte[] transform);
-
-    private static native void _align(int handle, int refHandle);
-    private static native void _setAlignment(int handle,
-            int hZReference, int zTarget,
-            int hYReference, int yTarget);
-
-    private static native void _setAlphaFactor(int handle, float alphaFactor);
-    private static native float _getAlphaFactor(int handle);
-
-    private static native void _enable(int handle, int which, boolean enable);
-    private static native boolean _isEnabled(int handle, int which);
-
-    private static native void _setScope(int handle, int id);
-    private static native int _getScope(int handle);
-
-    private static native int _getParent(int handle);
-    private static native int _getZRef(int handle);
-    private static native int _getYRef(int handle);
-    static native int _getSubtreeSize(int handle);
-
-    // M3G 1.1 Maintenance release getters
-    private static native int _getAlignmentTarget(int handle, int axis);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Object3D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import java.util.Enumeration;
-import java.util.Vector;
-import com.nokia.mj.impl.rt.support.Finalizer;
-
-/**
-*/
-public abstract class Object3D
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    int handle;
-
-    private Object userObject;
-    private Vector animTracks;
-    private Interface iInterface;
-
-    private Finalizer mFinalizer = new Finalizer()
-    {
-        public void finalizeImpl()
-        {
-            doFinalize();
-        }
-    };
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    /**
-     * <p>Only a package private constructor exists for this class.</p>
-     */
-    Object3D(int handle)
-    {
-        if (handle != 0)
-        {
-            this.handle = handle;
-            _addRef(handle);
-
-            // Get associated Interafece object and
-            // register this instance with that
-            iInterface = Interface.getInstance();
-            iInterface.register(this);
-
-            int n = _getAnimationTrackCount(handle);
-            while (n-- > 0)
-            {
-                linkAnimTrack((AnimationTrack) getInstance(_getAnimationTrack(handle, n)));
-            }
-        }
-        else
-        {
-            System.out.println("Warning: Object3D constructor called with zero handle");
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Public API
-    //------------------------------------------------------------------
-
-    public final Object3D duplicate()
-    {
-        int numRef = 1;
-        if (this instanceof Node)
-        {
-            numRef = ((Node)this)._getSubtreeSize(handle);
-        }
-        int[] handles = new int[numRef * 2];
-        Object3D obj = getInstance(_duplicate(handle, handles));
-        for (int i = 0; i < numRef; i++)
-        {
-            Object userObj = getInstance(handles[i * 2]).getUserObject();
-            Object3D duplicateObj = getInstance(handles[i * 2 + 1]);
-            if (userObj != null)
-            {
-                duplicateObj.setUserObject(userObj);
-            }
-        }
-        return obj;
-    }
-
-    public int getReferences(Object3D[] references)
-    {
-        int[] handles = null;
-        if (references != null)
-        {
-            handles = new int[references.length];
-        }
-        int num = _getReferences(handle, handles);
-        if (references != null)
-        {
-            for (int i = 0; i < num; i++)
-            {
-                references[i] = getInstance(handles[i]);
-            }
-        }
-        return num;
-    }
-
-    public void setUserID(int userID)
-    {
-        _setUserID(handle, userID);
-    }
-
-    public int getUserID()
-    {
-        return _getUserID(handle);
-    }
-
-    public Object3D find(int userID)
-    {
-        return getInstance(_find(handle, userID));
-    }
-
-    public void addAnimationTrack(AnimationTrack animationTrack)
-    {
-        _addAnimationTrack(handle, animationTrack.handle);
-        linkAnimTrack(animationTrack);
-    }
-
-    public AnimationTrack getAnimationTrack(int index)
-    {
-        /* Don't try to match the native indexing here -- just call
-         * the native getter */
-        return (AnimationTrack)getInstance(_getAnimationTrack(handle, index));
-    }
-
-    public void removeAnimationTrack(AnimationTrack animationTrack)
-    {
-        if (animationTrack != null)
-        {
-            _removeAnimationTrack(handle, animationTrack.handle);
-
-            if (animTracks != null)
-            {
-                animTracks.removeElement(animationTrack);
-                if (animTracks.isEmpty())
-                {
-                    animTracks = null;
-                }
-            }
-        }
-    }
-
-    public int getAnimationTrackCount()
-    {
-        return _getAnimationTrackCount(handle);
-    }
-
-    public final int animate(int time)
-    {
-        return _animate(handle, time);
-    }
-
-    public void setUserObject(Object obj)
-    {
-        userObject = obj;
-    }
-
-    public Object getUserObject()
-    {
-        return userObject;
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    static final Object3D getInstance(int handle)
-    {
-        return Interface.getObjectInstance(handle);
-    }
-
-    /**
-     * Adds a reference to an animation track.
-     */
-    private void linkAnimTrack(AnimationTrack track)
-    {
-        if (animTracks == null)
-        {
-            animTracks = new Vector();
-        }
-        animTracks.addElement(track);
-    }
-
-    /**
-     * Native peer finalization
-     */
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            if (handle != 0)
-            {
-                // finalize native peer
-                Platform.finalizeObject(handle, iInterface);
-                iInterface.deregister(this, iInterface);
-
-                // reset handles
-                iInterface = null;
-                handle= 0;
-            }
-            mFinalizer = null;
-        }
-    }
-
-    // Native methods
-    private static native int _addAnimationTrack(int hObject, int hAnimationTrack);
-    private static native void _removeAnimationTrack(int hObject, int hAnimationTrack);
-    private static native int _getAnimationTrackCount(int hObject);
-    private static native int _animate(int hObject, int time);
-    private static native void _setUserID(int hObject, int userID);
-    private static native int _getUserID(int hObject);
-
-    private static native void _addRef(int hObject);
-    private static native int _getAnimationTrack(int hObject, int index);
-    private static native int _duplicate(int hObject, int[] handles);
-    private static native int _getReferences(int hObject, int[] handles);
-    private static native int _find(int hObject, int userID);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Platform.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +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:
-*
-*/
-/**
- * \file
- * \brief Target platform dependent Java module for Symbian.
- *
- */
-
-package javax.microedition.m3g;
-import javax.microedition.lcdui.Graphics;
-import javax.microedition.lcdui.Image;
-import org.eclipse.swt.widgets.Display;
-
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-import org.eclipse.swt.internal.extension.DisplayExtension;
-
-/**
- * Implements platform-dependent functionality. At the moment, this
- * includes native finalization and some helper methods for
- * synchronizing 2D and 3D rendering.
- */
-class Platform
-{
-    /**
-     * eSWT display for ui thread access
-     */
-    private static Display display = null;
-    private static boolean libraryLoaded = false;
-
-    //------------------------------------------------------------------
-    // Package private methods
-    //------------------------------------------------------------------
-
-    /**
-     * Executes given runnable in UI thread if caller thread is not UI thread
-     */
-    static void executeInUIThread(M3gRunnable obj)
-    {
-        if (display == null)
-        {
-            if (!uiThreadAvailable())
-            {
-                throw new Error("Ui thread not available");
-            }
-        }
-        if (display.isDisposed())
-        {
-            throw new Error("Display already disposed");
-        }
-
-        if (obj != null)
-        {
-            // If we are not in UI thread use display
-            if (Thread.currentThread() != display.getThread())
-            {
-                display.syncExec(obj);
-            }
-            else
-            {
-                // In this case we are in UI thread so just execute directly
-                obj.run();
-            }
-            // Check if any exceptions occured in execution
-            // and throw forward in caller thread
-            obj.checkAndThrow();
-        }
-    }
-
-    /**
-     * Check the UI thread / toolkit init status and store display if it is available
-     * @return true if either lcdui or eswt toolkit is initialized and ui thread is accessible
-     *              otherwise false
-     */
-    static boolean uiThreadAvailable()
-    {
-        if (display != null)
-        {
-            return true;
-        }
-        else
-        {
-            display = DisplayExtension.getDisplayInstance();
-            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("javam3g");
-                    libraryLoaded = true;
-                }
-                return 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 m3g)
-    {
-    }
-
-    /**
-     * 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
-        {
-            final int finalHandle = handle;
-            executeInUIThread(
-                new M3gRunnable()
-            {
-                void doRun()
-                {
-                    _finalizeObject(finalHandle);
-                }
-            });
-        }
-        catch (Exception e)
-        {
-            // do nothing
-        }
-    }
-
-    /**
-     * 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 M3gRunnable()
-            {
-                public void doRun()
-                {
-                    _finalizeObject(finalHandle);
-                }
-            });
-        }
-        catch (Exception e)
-        {
-            // do nothing
-        }
-    }
-
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    /**
-     * Trigger GC if minimum free memory limit has been exceeded in the native side
-     */
-    static final void heuristicGC()
-    {
-    }
-    private static final native void _finalizeObject(int handle);
-}
-
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/PolygonMode.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class PolygonMode extends Object3D
-{
-
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int CULL_BACK = 0xA0;
-    public static final int CULL_FRONT = CULL_BACK + 1;
-    public static final int CULL_NONE = CULL_FRONT + 1;
-    public static final int SHADE_FLAT = 0xA4;
-    public static final int SHADE_SMOOTH = SHADE_FLAT + 1;
-    public static final int WINDING_CCW = 0xA8;
-    public static final int WINDING_CW = WINDING_CCW + 1;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public PolygonMode()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    PolygonMode(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setCulling(int mode)
-    {
-        _setCulling(handle, mode);
-    }
-
-    public int getCulling()
-    {
-        return _getCulling(handle);
-    }
-
-    public void setWinding(int mode)
-    {
-        _setWinding(handle, mode);
-    }
-
-    public int getWinding()
-    {
-        return _getWinding(handle);
-    }
-
-    public void setShading(int mode)
-    {
-        _setShading(handle, mode);
-    }
-
-    public int getShading()
-    {
-        return _getShading(handle);
-    }
-
-    public void setTwoSidedLightingEnable(boolean enable)
-    {
-        _setTwoSidedLightingEnable(handle, enable);
-    }
-
-    public boolean isTwoSidedLightingEnabled()
-    {
-        return _isTwoSidedLightingEnabled(handle);
-    }
-
-    public void setLocalCameraLightingEnable(boolean enable)
-    {
-        _setLocalCameraLightingEnable(handle, enable);
-    }
-
-    public void setPerspectiveCorrectionEnable(boolean enable)
-    {
-        _setPerspectiveCorrectionEnable(handle, enable);
-    }
-
-    // M3G 1.1 Maintenance release getters
-    public boolean isLocalCameraLightingEnabled()
-    {
-        return _isLocalCameraLightingEnabled(handle);
-    }
-
-    public boolean isPerspectiveCorrectionEnabled()
-    {
-        return _isPerspectiveCorrectionEnabled(handle);
-    }
-
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private native static int _ctor(int hInterface);
-    private native static void _setLocalCameraLightingEnable(int handle, boolean enable);
-    private native static void _setPerspectiveCorrectionEnable(int handle, boolean enable);
-    private native static void _setCulling(int handle, int mode);
-    private native static int _getCulling(int handle);
-    private native static void _setWinding(int handle, int mode);
-    private native static int _getWinding(int handle);
-    private native static void _setShading(int handle, int mode);
-    private native static int _getShading(int handle);
-    private native static void _setTwoSidedLightingEnable(int handle, boolean enable);
-    private native static boolean _isTwoSidedLightingEnabled(int handle);
-
-    // M3G 1.1 Maintenance release getters
-    private native static boolean _isLocalCameraLightingEnabled(int handle);
-    private native static boolean _isPerspectiveCorrectionEnabled(int handle);
-
-}
-
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/RayIntersection.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class RayIntersection
-{
-    private Node intersected = null;
-    private float distance = 0.f;
-    private int submeshIndex = 0;
-    private float[] textureS = new float[Defs.NUM_TEXTURE_UNITS];
-    private float[] textureT = new float[Defs.NUM_TEXTURE_UNITS];
-    private float[] normal = new float[3];
-    private float[] ray = new float[6];
-
-    public RayIntersection()
-    {
-        normal[0] = 0.f;
-        normal[1] = 0.f;
-        normal[2] = 1.f;
-
-        ray[0] = 0.f;
-        ray[1] = 0.f;
-        ray[2] = 0.f;
-        ray[3] = 0.f;
-        ray[4] = 0.f;
-        ray[5] = 1.f;
-    }
-
-    public Node getIntersected()
-    {
-        return intersected;
-    }
-
-    public float getDistance()
-    {
-        return distance;
-    }
-
-    public int getSubmeshIndex()
-    {
-        return submeshIndex;
-    }
-
-    public float getTextureS(int index)
-    {
-        if (index < 0 || index >= textureS.length)
-        {
-            throw new IndexOutOfBoundsException();
-        }
-
-        return textureS[index];
-    }
-
-    public float getTextureT(int index)
-    {
-        if (index < 0 || index >= textureT.length)
-        {
-            throw new IndexOutOfBoundsException();
-        }
-
-        return textureT[index];
-    }
-
-    public float getNormalX()
-    {
-        return normal[0];
-    }
-
-    public float getNormalY()
-    {
-        return normal[1];
-    }
-
-    public float getNormalZ()
-    {
-        return normal[2];
-    }
-
-    public void getRay(float[] ray)
-    {
-        if (ray.length < 6)
-        {
-            throw new IllegalArgumentException();
-        }
-
-        ray[0] = this.ray[0];
-        ray[1] = this.ray[1];
-        ray[2] = this.ray[2];
-        ray[3] = this.ray[3];
-        ray[4] = this.ray[4];
-        ray[5] = this.ray[5];
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    static float[] createResult()
-    {
-        return new float[1 + 1 + 2 * Defs.NUM_TEXTURE_UNITS + 3 + 6];
-    }
-
-    void fill(int hIntersected, float[] result)
-    {
-        intersected = (Node)Object3D.getInstance(hIntersected);
-        distance = result[0];
-        submeshIndex = (int)result[1];
-        textureS[0] = result[2];
-        textureS[1] = result[3];
-        textureT[0] = result[4];
-        textureT[1] = result[5];
-        normal[0] = result[6];
-        normal[1] = result[7];
-        normal[2] = result[8];
-        ray[0] = result[9];
-        ray[1] = result[10];
-        ray[2] = result[11];
-        ray[3] = result[12];
-        ray[4] = result[13];
-        ray[5] = result[14];
-    }
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/SkinnedMesh.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class SkinnedMesh extends Mesh
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private Group skeleton;
-
-    static private IndexBuffer[] tempTrianglesArray;
-    static private Appearance[]  tempAppearanceArray;
-
-    static private IndexBuffer tempTriangles;
-    static private Appearance  tempAppearance;
-
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public SkinnedMesh(VertexBuffer vertices,
-                       IndexBuffer[] triangles,
-                       Appearance[] appearances,
-                       Group skeleton)
-    {
-        super(createHandle(vertices, triangles, appearances, skeleton));
-        skeleton.setParent(this);
-        this.skeleton = skeleton;
-    }
-
-    public SkinnedMesh(VertexBuffer vertices,
-                       IndexBuffer triangles,
-                       Appearance appearance,
-                       Group skeleton)
-    {
-        super(createHandle(vertices, triangles, appearance, skeleton));
-        skeleton.setParent(this);
-        this.skeleton = skeleton;
-    }
-
-    /**
-     */
-    SkinnedMesh(int handle)
-    {
-        super(handle);
-        skeleton = (Group) getInstance(_getSkeleton(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void addTransform(Node bone,
-                             int weight,
-                             int firstVertex,
-                             int numVertices)
-    {
-        _addTransform(handle,
-                      bone != null ? bone.handle : 0,
-                      weight,
-                      firstVertex,
-                      numVertices);
-    }
-
-    public Group getSkeleton()
-    {
-        return skeleton;
-    }
-
-    // M3G 1.1 Maintenance release getters
-
-    public void getBoneTransform(Node bone, Transform transform)
-    {
-        _getBoneTransform(handle, bone.handle, transform.matrix);
-    }
-
-    public int getBoneVertices(Node bone, int[] indices, float[] weights)
-    {
-        return _getBoneVertices(handle, bone.handle, indices, weights);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    static int createHandle(VertexBuffer vertices,
-                            IndexBuffer[] triangles,
-                            Appearance[] appearances,
-                            Group skeleton)
-    {
-
-        tempTrianglesArray = triangles;
-        tempAppearanceArray = appearances;
-
-        verifyParams(vertices, triangles, appearances);
-
-        if (skeleton == null)
-        {
-            throw new NullPointerException();
-        }
-
-        if (skeleton.getParent() != null || skeleton instanceof World)
-        {
-            throw new IllegalArgumentException();
-        }
-
-        int[] hTri = new int[triangles.length];
-        int[] hApp = new int[triangles.length];
-        for (int i = 0; i < triangles.length; i++)
-        {
-            hTri[i] = triangles[i].handle;
-            if (appearances != null && i < appearances.length)
-            {
-                hApp[i] = appearances[i] != null ? appearances[i].handle : 0;
-            }
-        }
-        int ret=  _ctor(Interface.getHandle(),
-                        vertices.handle,
-                        hTri,
-                        hApp,
-                        skeleton.handle);
-
-        tempTrianglesArray = triangles;
-        tempAppearanceArray = appearances;
-
-        return ret;
-    }
-
-    static int createHandle(VertexBuffer vertices,
-                            IndexBuffer triangles,
-                            Appearance appearance,
-                            Group skeleton)
-    {
-
-        tempTriangles  = triangles;
-        tempAppearance = appearance;
-
-        verifyParams(vertices, triangles);
-
-        if (skeleton == null)
-        {
-            throw new NullPointerException();
-        }
-        if (skeleton.getParent() != null || skeleton instanceof World)
-        {
-            throw new IllegalArgumentException();
-        }
-        int[] hTri = {triangles.handle};
-        int[] hApp = {appearance != null ? appearance.handle : 0};
-        int ret = _ctor(Interface.getHandle(),
-                        vertices.handle,
-                        hTri,
-                        hApp,
-                        skeleton.handle);
-
-        tempTriangles  = null;
-        tempAppearance = null;
-
-        return ret;
-    }
-
-    // Native methods
-    private native static int _ctor(int hInstance,
-                                    int hVertices,
-                                    int[] hTriangles,
-                                    int[] hAppearances,
-                                    int hSkeleton);
-    private native static void _addTransform(int handle,
-            int hBone,
-            int weight,
-            int firstVertex,
-            int numVertices);
-    private native static int _getSkeleton(int handle);
-
-    // M3G 1.1 Maintenance release getters
-    private native static void _getBoneTransform(int handle,
-            int hBone,
-            byte[] transform);
-    private native static int _getBoneVertices(int handle,
-            int hBone,
-            int[] indices,
-            float[] weights);
-
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Sprite3D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Sprite3D extends Node
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private Image2D    image;
-    private Appearance appearance;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public Sprite3D(boolean scaled, Image2D image, Appearance appearance)
-    {
-        super(_ctor(Interface.getHandle(),
-                    scaled,
-                    image != null ? image.handle : 0,
-                    appearance != null ? appearance.handle : 0));
-        this.image = image;
-        this.appearance = appearance;
-    }
-
-    /**
-     */
-    Sprite3D(int handle)
-    {
-        super(handle);
-        image = (Image2D)getInstance(_getImage(handle));
-        appearance = (Appearance)getInstance(_getAppearance(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public boolean isScaled()
-    {
-        return _isScaled(handle);
-    }
-
-    public void setAppearance(Appearance appearance)
-    {
-        _setAppearance(handle, appearance != null ? appearance.handle : 0);
-        this.appearance = appearance;
-    }
-
-    public Appearance getAppearance()
-    {
-        return appearance;
-    }
-
-    public void setImage(Image2D image)
-    {
-        _setImage(handle, image != null ? image.handle : 0);
-        this.image = image;
-    }
-
-    public Image2D getImage()
-    {
-        return image;
-    }
-
-    public void setCrop(int cropX, int cropY, int width, int height)
-    {
-        _setCrop(handle, cropX, cropY, width, height);
-    }
-
-    public int getCropX()
-    {
-        return _getCrop(handle, Defs.GET_CROPX);
-    }
-
-    public int getCropY()
-    {
-        return _getCrop(handle, Defs.GET_CROPY);
-    }
-
-    public int getCropWidth()
-    {
-        return _getCrop(handle, Defs.GET_CROPWIDTH);
-    }
-
-    public int getCropHeight()
-    {
-        return _getCrop(handle, Defs.GET_CROPHEIGHT);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native methods
-
-    private static native int _ctor(int hInterface,
-                                    boolean scaled,
-                                    int hImage,
-                                    int hAppearance);
-    private static native boolean _isScaled(int handle);
-    private static native void _setAppearance(int handle, int hAppearance);
-    private static native void _setImage(int handle, int hImage);
-    private static native void _setCrop(int handle,
-                                        int cropX, int cropY,
-                                        int width, int height);
-    private static native int _getCrop(int handle, int which);
-    private static native int _getAppearance(int handle);
-    private static native int _getImage(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Texture2D.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-import javax.microedition.lcdui.Image;
-
-import java.io.*;
-
-public class Texture2D extends Transformable
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    public static final int FILTER_BASE_LEVEL = 208;
-    public static final int FILTER_LINEAR     = 209;
-    public static final int FILTER_NEAREST    = 210;
-    public static final int FUNC_ADD      = 224;
-    public static final int FUNC_BLEND    = 225;
-    public static final int FUNC_DECAL    = 226;
-    public static final int FUNC_MODULATE = 227;
-    public static final int FUNC_REPLACE  = 228;
-    public static final int WRAP_CLAMP  = 240;
-    public static final int WRAP_REPEAT = 241;
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private Image2D image;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public Texture2D(final Image2D image)
-    {
-        super(_ctor(Interface.getHandle(), image != null ? image.handle : 0));
-        this.image = image;
-    }
-
-    /**
-     */
-    Texture2D(int handle)
-    {
-        super(handle);
-        image = (Image2D) getInstance(_getImage(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setImage(final Image2D image)
-    {
-        _setImage(handle, image != null ? image.handle : 0);
-        this.image = image;
-    }
-
-    public Image2D getImage()
-    {
-        return image;
-    }
-
-    public void setFiltering(int levelFilter, int imageFilter)
-    {
-        _setFiltering(handle, levelFilter, imageFilter);
-    }
-
-    public void setWrapping(int wrapS, int wrapT)
-    {
-        _setWrapping(handle, wrapS, wrapT);
-    }
-
-    public int getWrappingS()
-    {
-        return _getWrappingS(handle);
-    }
-
-    public int getWrappingT()
-    {
-        return _getWrappingT(handle);
-    }
-
-    public void setBlending(int func)
-    {
-        _setBlending(handle, func);
-    }
-
-    public int getBlending()
-    {
-        return _getBlending(handle);
-    }
-
-    public void setBlendColor(int RGB)
-    {
-        _setBlendColor(handle, RGB);
-    }
-
-    public int getBlendColor()
-    {
-        return _getBlendColor(handle);
-    }
-
-    // M3G 1.1 Maintenance release getters
-
-    public int getImageFilter()
-    {
-        return _getImageFilter(handle);
-    }
-
-    public int getLevelFilter()
-    {
-        return _getLevelFilter(handle);
-    }
-
-    // Native methods
-    private native static int _ctor(int hInterface, int imageHandle);
-
-    private native static void _setImage(int handle, int imageHandle);
-    private native static int  _getImage(int handle);
-
-    private native static void _setFiltering(int handle, int levelFilter, int imageFilter);
-    private native static void _setWrapping(int handle, int wrapS, int wrapT);
-    private native static int _getWrappingS(int handle);
-    private native static int _getWrappingT(int handle);
-    private native static void _setBlending(int handle, int func);
-    private native static int _getBlending(int handle);
-    private native static void _setBlendColor(int handle, int RGB);
-    private native static int _getBlendColor(int handle);
-
-    // M3G 1.1 Maintenance release getters
-    private native static int _getImageFilter(int handle);
-    private native static int _getLevelFilter(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Transform.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class Transform
-{
-    //------------------------------------------------------------------
-    // Static data
-    //------------------------------------------------------------------
-
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    // Check size from m3g_math.h Matrix
-    byte[] matrix = new byte[72];
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public Transform()
-    {
-        if (!Platform.uiThreadAvailable())
-        {
-            throw new Error("UI thread not initialized");
-        }
-        setIdentity();
-    }
-
-    /**
-     */
-    public Transform(Transform other)
-    {
-        if (!Platform.uiThreadAvailable())
-        {
-            throw new Error("UI thread not initialized");
-        }
-        set(other);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setIdentity()
-    {
-        _setIdentity(matrix);
-    }
-
-    public void set(Transform transform)
-    {
-        System.arraycopy(transform.matrix, 0,
-                         this.matrix, 0,
-                         this.matrix.length);
-    }
-
-    public void set(float[] matrix)
-    {
-        _setMatrix(this.matrix, matrix);
-    }
-
-    public void get(float[] matrix)
-    {
-        _getMatrix(this.matrix, matrix);
-    }
-
-    public void invert()
-    {
-        _invert(matrix);
-    }
-
-    public void transpose()
-    {
-        _transpose(matrix);
-    }
-
-    public void postMultiply(Transform transform)
-    {
-        _mul(this.matrix, this.matrix, transform.matrix);
-    }
-
-    public void postScale(float sx, float sy, float sz)
-    {
-        _scale(matrix, sx, sy , sz);
-    }
-
-    /**
-     */
-    public void postRotate(float angle, float ax, float ay, float az)
-    {
-        _rotate(matrix, angle, ax, ay, az);
-    }
-
-    /**
-     */
-    public void postRotateQuat(float qx, float qy, float qz, float qw)
-    {
-        _rotateQuat(matrix, qx, qy, qz, qw);
-    }
-
-    /**
-     */
-    public void postTranslate(float tx, float ty, float tz)
-    {
-        _translate(matrix, tx, ty, tz);
-    }
-
-    /**
-     */
-    public void transform(float[] v)
-    {
-        if ((v.length % 4) != 0)
-        {
-            throw new IllegalArgumentException();
-        }
-
-        if (v.length != 0)
-        {
-            _transformTable(matrix, v);
-        }
-    }
-
-    /**
-     */
-    public void transform(VertexArray in, float[] out, boolean W)
-    {
-        if (in == null || out == null)
-        {
-            throw new NullPointerException();
-        }
-
-        _transformArray(matrix, in.handle, out, W);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native methods
-    private static native void _mul(byte[] prod, byte[] left, byte[] right);
-    private static native void _setIdentity(byte[] matrix);
-    private static native void _setMatrix(byte[] matrix, float[] srcMatrix);
-    private static native void _getMatrix(byte[] matrix, float[] dstMatrix);
-    private static native void _invert(byte[] matrix);
-    private static native void _transpose(byte[] matrix);
-    private static native void _rotate(byte[] matrix, float angle, float ax, float ay, float az);
-    private static native void _rotateQuat(byte[] matrix, float qx, float qy, float qz, float qw);
-    private static native void _scale(byte[] matrix, float sx, float sy, float sz);
-    private static native void _translate(byte[] matrix, float tx, float ty, float tz);
-    private static native void _transformTable(byte[] matrix, float[] v);
-    private static native void _transformArray(byte[] matrix, int handle, float[] out, boolean W);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/Transformable.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-/**
- *
- */
-public abstract class Transformable extends Object3D
-{
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    Transformable(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-
-    public void setOrientation(float angle, float ax, float ay, float az)
-    {
-        _setOrientation(handle, angle, ax, ay, az, true);
-    }
-
-    public void postRotate(float angle, float ax, float ay, float az)
-    {
-        _setOrientation(handle, angle, ax, ay, az, false);
-    }
-
-    public void preRotate(float angle, float ax, float ay, float az)
-    {
-        _preRotate(handle, angle, ax, ay, az);
-    }
-
-    public void getOrientation(float[] angleAxis)
-    {
-        _getOrientation(handle, angleAxis);
-    }
-
-    public void setScale(float sx, float sy, float sz)
-    {
-        _setScale(handle, sx, sy, sz, true);
-    }
-
-    public void scale(float sx, float sy, float sz)
-    {
-        _setScale(handle, sx, sy, sz, false);
-    }
-
-    public void getScale(float[] xyz)
-    {
-        _getScale(handle, xyz);
-    }
-
-    public void setTranslation(float tx, float ty, float tz)
-    {
-        _setTranslation(handle, tx, ty, tz, true);
-    }
-
-    public void translate(float tx, float ty, float tz)
-    {
-        _setTranslation(handle, tx, ty, tz, false);
-    }
-
-    public void getTranslation(float[] xyz)
-    {
-        _getTranslation(handle, xyz);
-    }
-
-    public void setTransform(Transform transform)
-    {
-        _setTransform(handle, (transform != null) ? transform.matrix : null);
-    }
-
-    public void getTransform(Transform transform)
-    {
-        _getTransform(handle, transform.matrix);
-    }
-
-    public void getCompositeTransform(Transform transform)
-    {
-        _getComposite(handle, transform.matrix);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private static native void _setOrientation(int handle,
-            float angle,
-            float ax, float ay, float az,
-            boolean absolute);
-    private static native void _preRotate(int handle,
-                                          float angle,
-                                          float ax, float ay, float az);
-    private static native void _getOrientation(int handle, float[] angleAxis);
-
-    private static native void _setScale(int handle,
-                                         float sx, float sy, float sz,
-                                         boolean absolute);
-    private static native void _getScale(int handle, float[] scale);
-
-    private static native void _setTranslation(int handle,
-            float tx, float ty, float tz,
-            boolean absolute);
-    private static native void _getTranslation(int handle, float[] translation);
-
-    private static native void _setTransform(int handle, byte[] transform);
-    private static native void _getTransform(int handle, byte[] transform);
-
-    private static native void _getComposite(int handle, byte[] transform);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/TriangleStripArray.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class TriangleStripArray extends IndexBuffer
-{
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public TriangleStripArray(int firstIndex, final int[] stripLengths)
-    {
-        super(_createImplicit(Interface.getHandle(),
-                              firstIndex,
-                              stripLengths));
-    }
-
-    public TriangleStripArray(final int[] indices, final int[] stripLengths)
-    {
-        super(_createExplicit(Interface.getHandle(), indices, stripLengths));
-    }
-
-    TriangleStripArray(int handle)
-    {
-        super(handle);
-    }
-
-    // M3G 1.1 Maintenance release getters
-
-    public int getIndexCount()
-    {
-        return _getIndexCount(handle);
-    }
-
-    public void getIndices(int[] indices)
-    {
-        if (indices.length < _getIndexCount(handle))
-        {
-            throw new IllegalArgumentException();
-        }
-        _getIndices(handle, indices);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native methods
-    private native static int _createImplicit(int hInterface,
-            int first,
-            final int[] lengths);
-    private native static int _createExplicit(int hInterface,
-            final int[] indices,
-            final int[] lengths);
-
-    // M3G 1.1 Maintenance release getters
-    private native static int _getIndexCount(int handle);
-    private native static void _getIndices(int handle, int[] indices);
-
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/VertexArray.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class VertexArray extends Object3D
-{
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public VertexArray(int numVertices, int numComponents, int componentSize)
-    {
-        super(createHandle(numVertices,
-                           numComponents,
-                           componentSize));
-    }
-
-    /**
-     */
-    VertexArray(int handle)
-    {
-        super(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void set(int startIndex, int length, short[] values)
-    {
-        _setShort(handle, startIndex, length, values);
-    }
-
-    public void set(int startIndex, int length, byte[] values)
-    {
-        _setByte(handle, startIndex, length, values);
-    }
-
-    // M3G 1.1 Maintenance release getters
-    public void get(int firstVertex, int numVertices, byte[] values)
-    {
-        _getByte(handle, firstVertex, numVertices, values);
-    }
-
-    public void get(int firstVertex, int numVertices, short[] values)
-    {
-        _getShort(handle, firstVertex, numVertices, values);
-    }
-
-    public int getComponentCount()
-    {
-        return _getComponentCount(handle);
-    }
-
-    public int getComponentType()
-    {
-        return _getComponentType(handle);
-    }
-
-    public int getVertexCount()
-    {
-        return _getVertexCount(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    private static int createHandle(int numVertices, int numComponents, int componentSize)
-    {
-        Platform.heuristicGC();
-        return  _ctor(Interface.getHandle(),
-                      numVertices,
-                      numComponents,
-                      componentSize);
-    }
-
-    // Native methods
-    private native static int _ctor(int hInterface,
-                                    int numVertices,
-                                    int numComponents,
-                                    int componentSize);
-    private native static void _setByte(int handle,
-                                        int first,
-                                        int count,
-                                        byte[] src);
-    private native static void _setShort(int handle,
-                                         int first,
-                                         int count,
-                                         short[] src);
-
-    // M3G 1.1 Maintenance release getters
-    private native static void _getByte(int handle,
-                                        int firstVertex,
-                                        int numVertices,
-                                        byte[] values);
-    private native static void _getShort(int handle,
-                                         int firstVertex,
-                                         int numVertices,
-                                         short[] values);
-    private native static int _getComponentCount(int handle);
-    private native static int _getComponentType(int handle);
-    private native static int _getVertexCount(int handle);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/VertexBuffer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class VertexBuffer extends Object3D
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private VertexArray   positions;
-    private VertexArray   normals;
-    private VertexArray   colors;
-    private VertexArray[] texCoords;
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-
-    public VertexBuffer()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    VertexBuffer(int handle)
-    {
-        super(handle);
-
-        positions = (VertexArray) getInstance(_getArray(handle, Defs.GET_POSITIONS, null));
-        normals   = (VertexArray) getInstance(_getArray(handle, Defs.GET_NORMALS, null));
-        colors    = (VertexArray) getInstance(_getArray(handle, Defs.GET_COLORS, null));
-
-        texCoords = new VertexArray[Defs.NUM_TEXTURE_UNITS];
-        for (int i = 0; i < Defs.NUM_TEXTURE_UNITS; ++i)
-        {
-            texCoords[i] =
-                (VertexArray) getInstance(_getArray(handle, Defs.GET_TEXCOORDS0 + i, null));
-        }
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public int getVertexCount()
-    {
-        return _getVertexCount(handle);
-    }
-
-    public void setPositions(VertexArray positions, float scale, float[] bias)
-    {
-        _setVertices(handle,
-                     (positions != null) ? positions.handle : 0,
-                     scale,
-                     bias);
-        this.positions = positions;
-    }
-
-    public void setTexCoords(int index, VertexArray texCoords, float scale, float[] bias)
-    {
-        _setTexCoords(handle,
-                      index,
-                      texCoords != null ? texCoords.handle : 0,
-                      scale,
-                      bias);
-
-        if (this.texCoords == null)
-        {
-            this.texCoords = new VertexArray[Defs.NUM_TEXTURE_UNITS];
-        }
-        this.texCoords[index] = texCoords;
-    }
-
-    public void setNormals(VertexArray normals)
-    {
-        _setNormals(handle, normals != null ? normals.handle : 0);
-        this.normals = normals;
-    }
-
-    public void setColors(VertexArray colors)
-    {
-        _setColors(handle, colors != null ? colors.handle : 0);
-        this.colors = colors;
-    }
-
-    public VertexArray getPositions(float[] scaleBias)
-    {
-        /* Get scale and bias with native getter */
-        _getArray(handle, Defs.GET_POSITIONS, scaleBias);
-        return positions;
-    }
-
-    public VertexArray getTexCoords(int index, float[] scaleBias)
-    {
-        /* Index has to be checked here due to the native getter input params */
-        if (index < 0 || index >= Defs.NUM_TEXTURE_UNITS)
-        {
-            throw new IndexOutOfBoundsException();
-        }
-
-        /* Get scale and bias with native getter */
-        _getArray(handle, Defs.GET_TEXCOORDS0 + index, scaleBias);
-        return texCoords != null ? texCoords[index] : null;
-    }
-
-    public VertexArray getNormals()
-    {
-        return normals;
-    }
-
-    public VertexArray getColors()
-    {
-        return colors;
-    }
-
-    public void setDefaultColor(int ARGB)
-    {
-        _setDefaultColor(handle, ARGB);
-    }
-
-    public int getDefaultColor()
-    {
-        return _getDefaultColor(handle);
-    }
-
-    //------------------------------------------------------------------
-    // Private methods
-    //------------------------------------------------------------------
-
-    // Native methods
-    private static native int _ctor(int hInterface);
-    private static native void _setColors(int hBuffer, int hArray);
-    private static native void _setNormals(int hBuffer, int hArray);
-    private static native void _setTexCoords(int hBuffer, int unit, int hArray, float scale, float[] bias);
-    private static native void _setVertices(int hBuffer, int hArray, float scale, float[] bias);
-    private static native void _setDefaultColor(int hBuffer, int ARGB);
-    private static native int  _getDefaultColor(int hBuffer);
-    private static native int  _getArray(int hBuffer, int which, float[] scaleBias);
-    private static native int  _getVertexCount(int hBuffer);
-}
--- a/javauis/m3g_qt/javasrc/javax/microedition/m3g/World.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2003 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 javax.microedition.m3g;
-
-public class World extends Group
-{
-    //------------------------------------------------------------------
-    // Instance data
-    //------------------------------------------------------------------
-
-    private Camera     activeCamera;
-    private Background background;
-
-    //------------------------------------------------------------------
-    // Constructor(s)
-    //------------------------------------------------------------------
-
-    public World()
-    {
-        super(_ctor(Interface.getHandle()));
-    }
-
-    /**
-     */
-    World(int handle)
-    {
-        super(handle);
-        background   = (Background) getInstance(_getBackground(handle));
-        activeCamera = (Camera) getInstance(_getActiveCamera(handle));
-    }
-
-    //------------------------------------------------------------------
-    // Public methods
-    //------------------------------------------------------------------
-
-    public void setBackground(Background background)
-    {
-        _setBackground(handle, background != null ? background.handle : 0);
-        this.background = background;
-    }
-
-    public Background getBackground()
-    {
-        return background;
-    }
-
-    public void setActiveCamera(Camera camera)
-    {
-        _setActiveCamera(handle, camera != null ? camera.handle : 0);
-        this.activeCamera = camera;
-    }
-
-    public Camera getActiveCamera()
-    {
-        return activeCamera;
-    }
-
-    // Native methods
-    private static native int _ctor(int hInterface);
-    private static native void _setActiveCamera(int handle, int hCamera);
-    private static native void _setBackground(int handle, int hBackground);
-    private static native int _getActiveCamera(int handle);
-    private static native int _getBackground(int handle);
-}
--- a/javauis/m3g_qt/src/CSynchronization.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  M3GCore function call synchronization for J9
-*
-*/
-
-// INCLUDE FILES
-#include "CSynchronization.h"
-
-NONSHARABLE_CLASS(M3gGlobals)
-{
-public:
-    M3gGlobals() : mSync(0) {}
-
-public:
-    CSynchronization* mSync;
-};
-
-#if defined(__WINSCW__)
-
-#include <pls.h>
-M3gGlobals* getM3gGlobals()
-{
-    // Access the PLS of this process.
-    return Pls<M3gGlobals>(TUid::Uid(0x200211E2));
-}
-
-#else
-
-static M3gGlobals* sGlobals = 0;
-
-M3gGlobals* getM3gGlobals()
-{
-    if (sGlobals == 0)
-    {
-        sGlobals = new M3gGlobals();
-    }
-    return sGlobals;
-}
-#endif
-
-
-// STATIC MEMBERS
-/*static*/ //CSynchronization* CSynchronization::iSelf = NULL;
-
-// -----------------------------------------------------------------------------
-// CSynchronization::InstanceL
-// -----------------------------------------------------------------------------
-/*static*/ CSynchronization* CSynchronization::InstanceL()
-{
-    static M3gGlobals* globals = getM3gGlobals();
-    if (!globals->mSync)
-    {
-        globals->mSync = CSynchronization::NewL();
-    }
-    return globals->mSync;
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::NewL
-// -----------------------------------------------------------------------------
-/*static*/ CSynchronization* CSynchronization::NewL()
-{
-    CSynchronization* self = new(ELeave) CSynchronization();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::ConstructL
-// -----------------------------------------------------------------------------
-void CSynchronization::ConstructL()
-{
-    User::LeaveIfError(iGuard.CreateLocal());
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::CSynchronization
-// -----------------------------------------------------------------------------
-CSynchronization::CSynchronization() : iErrorCode(0)
-{
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::~CSynchronization
-// -----------------------------------------------------------------------------
-CSynchronization::~CSynchronization()
-{
-    iGuard.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::Lock
-// -----------------------------------------------------------------------------
-void CSynchronization::Lock()
-{
-    iGuard.Wait();
-    iErrorCode = 0;
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::Unlock
-// -----------------------------------------------------------------------------
-void CSynchronization::Unlock()
-{
-    iErrorCode = 0;
-    iGuard.Signal();
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::SetErrorCode
-// -----------------------------------------------------------------------------
-void CSynchronization::SetErrorCode(TInt aCode)
-{
-    iErrorCode = aCode;
-}
-
-// -----------------------------------------------------------------------------
-// CSynchronization::GetErrorCode
-// -----------------------------------------------------------------------------
-TInt CSynchronization::GetErrorCode()
-{
-    return iErrorCode;
-}
--- a/javauis/m3g_qt/src/jni/animationController.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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:
-*
-*/
-#include "javax_microedition_m3g_AnimationController.h"
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_AnimationController__1getPosition
-(JNIEnv* aEnv, jclass, jint aHController, jint aWorldTime)
-{
-    M3G_DO_LOCK
-    jfloat position = (jfloat)m3gGetPosition((M3GAnimationController)aHController, aWorldTime);
-    M3G_DO_UNLOCK(aEnv)
-    return position;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_AnimationController__1setWeight
-(JNIEnv* aEnv, jclass, jint aHController, jfloat aWeight)
-{
-    M3G_DO_LOCK
-    m3gSetWeight((M3GAnimationController)aHController, aWeight);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_AnimationController__1setActiveInterval
-(JNIEnv* aEnv, jclass, jint aHController, jint aWorldTimeMin, jint aWorldTimeMax)
-{
-    M3G_DO_LOCK
-    m3gSetActiveInterval((M3GAnimationController)aHController, aWorldTimeMin, aWorldTimeMax);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationController__1getActiveIntervalStart
-(JNIEnv* aEnv, jclass, jint aHController)
-{
-    M3G_DO_LOCK
-    jint start = (jint)m3gGetActiveIntervalStart((M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-    return start;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationController__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateAnimationController((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_AnimationController__1setPosition
-(JNIEnv* aEnv, jclass, jint aHController, jfloat aTime, jint aWorldTime)
-{
-    M3G_DO_LOCK
-    m3gSetPosition((M3GAnimationController)aHController, aTime, aWorldTime);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_AnimationController__1setSpeed
-(JNIEnv* aEnv, jclass, jint aHController, jfloat aFactor, jint aWorldTime)
-{
-    M3G_DO_LOCK
-    m3gSetSpeed((M3GAnimationController)aHController, aFactor, aWorldTime);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_AnimationController__1getSpeed
-(JNIEnv* aEnv, jclass, jint aHController)
-{
-    M3G_DO_LOCK
-    jfloat speed = (jfloat)m3gGetSpeed((M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-    return speed;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationController__1getActiveIntervalEnd
-(JNIEnv* aEnv, jclass, jint aHController)
-{
-    M3G_DO_LOCK
-    jint end = (jint)m3gGetActiveIntervalEnd((M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-    return end;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_AnimationController__1getWeight
-(JNIEnv* aEnv, jclass, jint aHController)
-{
-    M3G_DO_LOCK
-    jfloat weight = (jfloat)m3gGetWeight((M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-    return weight;
-}
-
-/* M3G 1.1 JNI Calls*/
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationController__1getRefWorldTime
-(JNIEnv* aEnv, jclass, jint aHController)
-{
-    M3G_DO_LOCK
-    jint time = (jint)m3gGetRefWorldTime((M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-    return time;
-}
--- a/javauis/m3g_qt/src/jni/animationTrack.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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:
-*
-*/
-
-#include "javax_microedition_m3g_AnimationTrack.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationTrack__1getTargetProperty
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint props = (jint)m3gGetTargetProperty((M3GAnimationTrack)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return props;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationTrack__1getSequence
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint sequence = (jint)m3gGetSequence((M3GAnimationTrack)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return sequence;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationTrack__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aHSequence, jint aProperty)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateAnimationTrack((M3GInterface)aM3g, (M3GKeyframeSequence)aHSequence, (M3Gint)aProperty);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_AnimationTrack__1getController
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint controller = (jint)m3gGetController((M3GAnimationTrack)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return controller;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_AnimationTrack__1setController
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHController)
-{
-    M3G_DO_LOCK
-    m3gSetController((M3GAnimationTrack)aHandle, (M3GAnimationController)aHController);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/jni/appearance.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Appearance.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setLayer
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aLayer)
-{
-    M3G_DO_LOCK
-    m3gSetLayer((M3GAppearance)aHApp, (M3Gint)aLayer);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getCompositingMode
-(JNIEnv* aEnv,   jclass, jint aHApp)
-{
-    M3G_DO_LOCK
-    jint compMode = (jint)m3gGetCompositingMode((M3GAppearance)aHApp);
-    M3G_DO_UNLOCK(aEnv)
-    return compMode;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getFog
-(JNIEnv* aEnv,   jclass, jint aHApp)
-{
-    M3G_DO_LOCK
-    jint fog = (jint)m3gGetFog((M3GAppearance)aHApp);
-    M3G_DO_UNLOCK(aEnv)
-    return fog;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getLayer
-(JNIEnv* aEnv,   jclass, jint aHApp)
-{
-    M3G_DO_LOCK
-    jint layer = (jint)m3gGetLayer((M3GAppearance)aHApp);
-    M3G_DO_UNLOCK(aEnv)
-    return layer;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setCompositingMode
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aHMode)
-{
-    M3G_DO_LOCK
-    m3gSetCompositingMode((M3GAppearance)aHApp, (M3GCompositingMode)aHMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setPolygonMode
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aHMode)
-{
-    M3G_DO_LOCK
-    m3gSetPolygonMode((M3GAppearance)aHApp, (M3GPolygonMode)aHMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getPolygonMode
-(JNIEnv* aEnv,   jclass, jint aHApp)
-{
-    M3G_DO_LOCK
-    jint polyMode = (jint)m3gGetPolygonMode((M3GAppearance)aHApp);
-    M3G_DO_UNLOCK(aEnv)
-    return polyMode;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setTexture
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aUnit, jint aHTex)
-{
-    M3G_DO_LOCK
-    m3gSetTexture((M3GAppearance)aHApp, (M3Gint)aUnit, (M3GTexture)aHTex);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1ctor
-(JNIEnv* aEnv,   jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateAppearance((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getTexture
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aUnit)
-{
-    M3G_DO_LOCK
-    jint texture = (jint)m3gGetTexture((M3GAppearance)aHApp, (M3Gint)aUnit);
-    M3G_DO_UNLOCK(aEnv)
-    return texture;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setFog
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aHFog)
-{
-    M3G_DO_LOCK
-    m3gSetFog((M3GAppearance)aHApp, (M3GFog)aHFog);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Appearance__1setMaterial
-(JNIEnv* aEnv,   jclass, jint aHApp, jint aHMaterial)
-{
-    M3G_DO_LOCK
-    m3gSetMaterial((M3GAppearance)aHApp, (M3GMaterial)aHMaterial);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Appearance__1getMaterial
-(JNIEnv* aEnv,   jclass, jint aHApp)
-{
-    M3G_DO_LOCK
-    jint material = (jint)m3gGetMaterial((M3GAppearance)aHApp);
-    M3G_DO_UNLOCK(aEnv)
-    return material;
-}
--- a/javauis/m3g_qt/src/jni/background.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Background.h"
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Background__1isEnabled
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsBgEnabled((M3GBackground)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Background__1setCrop
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aCropX, jint aCropY, jint aWidth, jint aHeight)
-{
-    M3G_DO_LOCK
-    m3gSetBgCrop((M3GBackground)aHandle, (M3Gint)aCropX, (M3Gint)aCropY, (M3Gint)aWidth, (M3Gint)aHeight);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Background__1setImageMode
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aModeX, jint aModeY)
-{
-    M3G_DO_LOCK
-    m3gSetBgMode((M3GBackground)aHandle, aModeX, aModeY);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Background__1ctor
-(JNIEnv* aEnv,   jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateBackground((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Background__1getCrop
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jint crop = (jint)m3gGetBgCrop((M3GBackground)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return crop;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Background__1getImageMode
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jint mode = (jint)m3gGetBgMode((M3GBackground)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return mode;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Background__1setImage
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aHImage)
-{
-    M3G_DO_LOCK
-    m3gSetBgImage((M3GBackground)aHandle, (M3GImage)aHImage);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Background__1setColor
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aARGB)
-{
-    M3G_DO_LOCK
-    m3gSetBgColor((M3GBackground)aHandle, aARGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Background__1enable
-(JNIEnv* aEnv,   jclass, jint aHandle, jint aWhich, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetBgEnable((M3GBackground)aHandle, aWhich, aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Background__1getImage
-(JNIEnv* aEnv,   jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint image = (jint)m3gGetBgImage((M3GBackground)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return image;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Background__1getColor
-(JNIEnv* aEnv,   jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint color = (jint)m3gGetBgColor((M3GBackground)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
--- a/javauis/m3g_qt/src/jni/camera.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Camera.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Camera__1setPerspective
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aFovy, jfloat aAspectRatio, jfloat aNear, jfloat aFar)
-{
-    M3G_DO_LOCK
-    m3gSetPerspective((M3GCamera)aHandle, aFovy, aAspectRatio, aNear, aFar);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Camera__1setGeneric
-(JNIEnv* aEnv, jclass, jint aHandle, jbyteArray aTransform)
-{
-    jbyte* elems = NULL;
-    if (aTransform)
-    {
-        elems = aEnv->GetByteArrayElements(aTransform, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-    M3G_DO_LOCK
-    m3gSetProjectionMatrix((M3GCamera)aHandle,
-                           (const M3GMatrix *)elems);
-    M3G_DO_UNLOCK(aEnv)
-    if (elems)
-        aEnv->ReleaseByteArrayElements(aTransform, elems, 0);
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Camera__1getProjectionAsParams
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aParams)
-{
-    jfloat* elems = NULL;
-
-    if (aParams && aEnv->GetArrayLength(aParams) < 4)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return 0;
-    }
-    elems = NULL;
-    if (aParams)
-    {
-        elems = aEnv->GetFloatArrayElements(aParams, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_DO_LOCK
-    jint ret = m3gGetProjectionAsParams((M3GCamera)aHandle, (jfloat*)elems);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (elems)
-    {
-        aEnv->ReleaseFloatArrayElements(aParams, elems, 0);
-    }
-
-    return ret;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Camera__1setParallel
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aHeight, jfloat aAspectRatio, jfloat aNear, jfloat aFar)
-{
-    M3G_DO_LOCK
-    m3gSetParallel((M3GCamera)aHandle, aHeight, aAspectRatio, aNear, aFar);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Camera__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateCamera((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Camera__1getProjectionAsTransform
-(JNIEnv* aEnv, jclass, jint aHandle, jbyteArray aTransform)
-{
-    jbyte* elems = NULL;
-    if (aTransform)
-    {
-        elems = aEnv->GetByteArrayElements(aTransform, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_DO_LOCK
-    jint ret = m3gGetProjectionAsMatrix((M3GCamera)aHandle,
-                                        (M3GMatrix *)elems);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (elems)
-        aEnv->ReleaseByteArrayElements(aTransform, elems, 0);
-    return ret;
-}
--- a/javauis/m3g_qt/src/jni/compositingMode.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +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:
-*
-*/
-
-#include "javax_microedition_m3g_CompositingMode.h"
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_CompositingMode__1isDepthTestEnabled
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsDepthTestEnabled((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_CompositingMode__1getBlending
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jint blending = (jint)m3gGetBlending((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return blending;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_CompositingMode__1isAlphaWriteEnabled
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsAlphaWriteEnabled((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1enableDepthWrite
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gEnableDepthWrite((M3GCompositingMode)aHCompositingMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1setAlphaThreshold
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jfloat aThreshold)
-{
-    M3G_DO_LOCK
-    m3gSetAlphaThreshold((M3GCompositingMode)aHCompositingMode, (M3Gfloat)aThreshold);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1enableColorWrite
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gEnableColorWrite((M3GCompositingMode)aHCompositingMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1setDepthOffset
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jfloat aFactor, jfloat aUnits)
-{
-    M3G_DO_LOCK
-    m3gSetDepthOffset((M3GCompositingMode)aHCompositingMode, (M3Gfloat)aFactor, (M3Gfloat)aUnits);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1enableDepthTest
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gEnableDepthTest((M3GCompositingMode)aHCompositingMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_CompositingMode__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateCompositingMode((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_CompositingMode__1isColorWriteEnabled
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsColorWriteEnabled((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1setAlphaWriteEnable
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetAlphaWriteEnable((M3GCompositingMode)aHCompositingMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_CompositingMode__1isDepthWriteEnabled
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsDepthWriteEnabled((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_CompositingMode__1getDepthOffsetFactor
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jfloat factor = (jfloat)m3gGetDepthOffsetFactor((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return factor;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_CompositingMode__1getDepthOffsetUnits
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jfloat offset = (jfloat)m3gGetDepthOffsetUnits((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return offset;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_CompositingMode__1setBlending
-(JNIEnv* aEnv, jclass, jint aHCompositingMode, jint aMode)
-{
-    M3G_DO_LOCK
-    m3gSetBlending((M3GCompositingMode)aHCompositingMode, (int)aMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_CompositingMode__1getAlphaThreshold
-(JNIEnv* aEnv, jclass, jint aHCompositingMode)
-{
-    M3G_DO_LOCK
-    jfloat treshold = (jfloat)m3gGetAlphaThreshold((M3GCompositingMode)aHCompositingMode);
-    M3G_DO_UNLOCK(aEnv)
-    return treshold;
-}
--- a/javauis/m3g_qt/src/jni/fog.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Fog.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Fog__1setMode
-(JNIEnv* aEnv, jclass, jint aHandle, jint aMode)
-{
-    M3G_DO_LOCK
-    m3gSetFogMode((M3GFog)aHandle, aMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Fog__1setLinear
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aNear, jfloat aFar)
-{
-    M3G_DO_LOCK
-    m3gSetFogLinear((M3GFog)aHandle, aNear, aFar);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Fog__1getDistance
-(JNIEnv* aEnv, jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jfloat distance = (jfloat)m3gGetFogDistance((M3GFog)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return distance;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Fog__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateFog((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Fog__1getMode
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint mode = (jint)m3gGetFogMode((M3GFog)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return mode;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Fog__1setDensity
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aDensity)
-{
-    M3G_DO_LOCK
-    m3gSetFogDensity((M3GFog)aHandle, aDensity);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Fog__1getDensity
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jfloat density = (jfloat)m3gGetFogDensity((M3GFog)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return density;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Fog__1setColor
-(JNIEnv* aEnv, jclass, jint aHandle, jint aRGB)
-{
-    M3G_DO_LOCK
-    m3gSetFogColor((M3GFog)aHandle, aRGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Fog__1getColor
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint color = (jint)m3gGetFogColor((M3GFog)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
--- a/javauis/m3g_qt/src/jni/graphics3d.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,725 +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:
-*
-*/
-#include "javax_microedition_m3g_Graphics3D.h"
-
-/*
- * Must be executed in UI thread
- */
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Graphics3D__1isProperRenderer
-(JNIEnv* aEnv, jclass)
-{
-    EGLContext ctx;
-    EGLConfig config;
-    EGLSurface surf;
-    EGLint attrib[5];
-    EGLint numConfigs;
-    bool isProperRenderer;
-
-    // initialize EGL and create a temporary surface & context for reading
-    // the renderer string
-    eglInitialize(eglGetDisplay(EGL_DEFAULT_DISPLAY), NULL, NULL);
-
-    attrib[0] = EGL_SURFACE_TYPE;
-    attrib[1] = EGL_PBUFFER_BIT;
-    attrib[2] = EGL_NONE;
-
-    eglChooseConfig(eglGetDisplay(0), attrib, &config, 1, &numConfigs);
-
-    ctx = eglCreateContext(eglGetDisplay(0), config, NULL, NULL);
-
-    attrib[0] = EGL_WIDTH;
-    attrib[1] = 2;
-    attrib[2] = EGL_HEIGHT;
-    attrib[3] = 2;
-    attrib[4] = EGL_NONE;
-
-    surf = eglCreatePbufferSurface(eglGetDisplay(0), config, attrib);
-    eglMakeCurrent(eglGetDisplay(0), surf, surf, ctx);
-
-    // We check if proper renderer is used and return value which is stored
-    // on java side and passed to fuctions where is decided if m3g renders
-    // into mutable off-screen image or into framebuffer (see
-    // Java_javax_microedition_m3g_Graphics3D__1bindGraphics and
-    // releaseGraphicsTarget).
-    const GLubyte *info;
-    info = glGetString(GL_RENDERER);   // get the renderer string
-
-    // check if "MBX" substring is found
-    if (strstr((const char *)info, "MBX"))
-    {
-        // HW renderer detected.
-        // If "MBX" HW is detected we must reset alpha for mutable off-screen
-        // images by hand (see releaseGraphicsTarget).
-        isProperRenderer = false;
-    }
-    else
-    {
-        // Other renderers can use m3g core API m3gSetAlphaWrite without
-        // performance drop.
-        isProperRenderer = true;
-    }
-
-    // destroy the temporary surface & context
-    eglMakeCurrent(eglGetDisplay(0), NULL, NULL, NULL);
-    eglDestroySurface(eglGetDisplay(0), surf);
-    eglDestroyContext(eglGetDisplay(0), ctx);
-
-    return isProperRenderer;
-}
-
-/*
- * Must be executed in UI thread
- */
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Graphics3D__1bindGraphics
-(JNIEnv* aEnv, jclass, jint aCtx,
- jint aSurfaceHandle, jint aClipX, jint aClipY, jint aClipW, jint aClipH,
- jboolean aDepth, jint aHintBits, jboolean aIsProperRenderer)
-{
-    M3GRenderContext ctx = (M3GRenderContext)aCtx;
-
-    // Fetch the native peer of our target object
-    Java::GFX::WindowSurface* wsurf = reinterpret_cast<Java::GFX::WindowSurface*>(aSurfaceHandle);
-
-    int caps = Java::GFX::SwImage | Java::GFX::PBuffer;
-    QPaintDevice* surface = wsurf->bind(caps);
-
-    jboolean isImageTarget = false; /*cmidGraphics->IsImageTarget();*/
-
-    M3G_DO_LOCK
-
-    /*
-    * Get the physical screen size and pass it to m3gcore. This affects (improves) the performance
-    * as the canvas frambuffer (rendering target) is larger than the physical screen size in
-    * devices that have more than one screen orientation, causing extra copying operations.
-    *
-    * This will improve m3g performance and suppresses extra bitmap copying.
-    */
-
-    //TRect screenRect = CCoeEnv::Static()->ScreenDevice()->SizeInPixels();
-
-    eglWaitNative(EGL_CORE_NATIVE_ENGINE);
-
-    if (m3gSetRenderBuffers((M3GRenderContext)aCtx, aDepth ?
-                            M3G_COLOR_BUFFER_BIT|M3G_DEPTH_BUFFER_BIT :
-                            M3G_COLOR_BUFFER_BIT) && m3gSetRenderHints((M3GRenderContext)aCtx, aHintBits))
-    {
-
-        switch (wsurf->getType())
-        {
-        case Java::GFX::SwImage:
-        {
-            QImage* bitmap = static_cast<QImage*>(surface);
-            M3GPixelFormat format  = mapQtPixelformat(bitmap->format());
-            m3gBindMemoryTarget((M3GRenderContext)aCtx, bitmap->bits(), (M3Guint)bitmap->width(), (M3Guint)bitmap->height(), format, (M3Guint)(bitmap->width() * 4), NULL);
-            break;
-        }
-        default:
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-            break;
-        }
-
-        // Pass the physical screen size to m3gcore
-        //m3gSetDisplayArea(aCtx, screenRect.Width(), screenRect.Height());
-
-        m3gSetClipRect((M3GRenderContext)aCtx, aClipX, aClipY, aClipW, aClipH);
-        m3gSetViewport((M3GRenderContext)aCtx, aClipX, aClipY, aClipW, aClipH);
-    }
-
-    M3G_DO_UNLOCK(aEnv)
-
-    if (isImageTarget && aIsProperRenderer)
-    {
-        m3gSetAlphaWrite(ctx, M3G_FALSE);
-    }
-
-    return isImageTarget;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1setViewport
-(JNIEnv* aEnv, jclass, jint aHContext, jint aX, jint aY,
- jint aWidth, jint aHeight)
-{
-    M3G_DO_LOCK
-    m3gSetViewport((M3GRenderContext)aHContext, aX, aY, aWidth, aHeight);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-
-static void releaseTarget(M3GRenderContext aCtx)
-{
-    eglWaitGL();
-    m3gReleaseTarget(aCtx);
-}
-
-
-/*
-static void releaseGraphicsTarget(M3GRenderContext aCtx, CMIDGraphics *aGraphics,
-    TBool aIsImageTarget, TBool aIsProperRenderer )
-    {
-    releaseTarget(aCtx);
-
-    // clear alpha for only mutable off-screen images (not for canvas/GameCanvas
-    // framebuffer) those images are indetified by aIsImageTarget argument
-    if (aIsImageTarget)
-        {
-        if ( aIsProperRenderer )
-            {
-            m3gSetAlphaWrite(aCtx, M3G_TRUE);
-            }
-        else
-            {
-            CFbsBitmap *bitmap = aGraphics->Bitmap();
-
-            const TInt width = bitmap->SizeInPixels().iWidth;
-            const TInt height = bitmap->SizeInPixels().iHeight;
-            TInt stride = bitmap->ScanLineLength(width, bitmap->DisplayMode());
-
-            bitmap->LockHeap();
-
-            for (TInt i = 0; i < height; i++)
-                {
-                const void *srcAddr =
-                    ((const char *) bitmap->DataAddress()) + i * stride;
-                unsigned char *src = (unsigned char *) srcAddr;
-                TInt count = width;
-                while (count--)
-                    {
-                    src += 3; //jump to last byte - alpha channel
-                    //setting FF to alpha channel for non-canvas image targets
-                    *src |= 0xff;
-                    src++;
-                    }
-                }
-
-            bitmap->UnlockHeap();
-            }
-        }
-    }
-*/
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1releaseGraphics
-(JNIEnv* aEnv, jclass, jint aHandle,
- jint aSurfaceHandle, jboolean aIsImageTarget, jboolean aIsProperRenderer)
-{
-    M3G_DO_LOCK
-
-    releaseTarget((M3GRenderContext)aHandle);
-
-    // Release used target surface
-    Java::GFX::WindowSurface* surf = reinterpret_cast<Java::GFX::WindowSurface*>(aSurfaceHandle);
-    surf->release();
-
-    /*
-    CMIDGraphics *cmidGraphics = MIDUnhandObject<CMIDGraphics>(aGraphicsHandle);
-
-    CJavaM3GEventSource* eventSource =
-        JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    eventSource->ExecuteV(&releaseGraphicsTarget, ((M3GRenderContext) aHandle),
-        cmidGraphics, ((TBool) aIsImageTarget), ((TBool) aIsProperRenderer) );
-        */
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1setCamera
-(JNIEnv* aEnv, jclass, jint aHContext, jint aHCamera, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (Matrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    M3G_DO_LOCK
-    m3gSetCamera((M3GRenderContext) aHContext, (M3GCamera) aHCamera, transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, JNI_ABORT);
-    }
-}
-
-/*
-static void renderWorld(M3GRenderContext aHContext,
-                        M3GWorld aHWorld)
-{
-    m3gRenderWorld(aHContext, aHWorld);
-}
-*/
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1renderWorld
-(JNIEnv* aEnv, jclass, jint aHContext, jint aHWorld)
-{
-    M3G_DO_LOCK
-
-    m3gRenderWorld((M3GRenderContext) aHContext, (M3GWorld) aHWorld);
-
-    /*
-    CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    eventSource->ExecuteV(&renderWorld,
-                       (M3GRenderContext) aHContext,
-                       (M3GWorld) aHWorld);
-    */
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    M3GRenderContext ctx = m3gCreateContext((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jint)ctx;
-}
-
-struct RenderStruct
-{
-    M3GVertexBuffer hVertices;
-    M3GIndexBuffer hIndices;
-    M3GAppearance hAppearance;
-    const M3GMatrix *transform;
-};
-
-/*
-static void renderImmediate(M3GRenderContext aHContext, RenderStruct *aR, jint aScope)
-{
-    m3gRender(aHContext,
-              aR->hVertices,
-              aR->hIndices,
-              aR->hAppearance,
-              aR->transform, 1.0f, aScope);
-}
-*/
-
-/*
- * Must be executed in UI thread
- */
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1render
-(JNIEnv* aEnv, jclass, jint aHContext,
- jint aHVertices, jint aHIndices, jint aHAppearance, jbyteArray aTransform, jint aScope)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)aEnv->GetByteArrayElements(aTransform, NULL);
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    /*
-    RenderStruct r;
-    r.hVertices = (M3GVertexBuffer) aHVertices;
-    r.hIndices = (M3GIndexBuffer) aHIndices;
-    r.hAppearance = (M3GAppearance) aHAppearance;
-    r.transform = transform;
-    */
-
-
-    M3G_DO_LOCK
-
-    m3gRender((M3GRenderContext) aHContext, (M3GVertexBuffer) aHVertices, (M3GIndexBuffer) aHIndices, (M3GAppearance) aHAppearance,
-              transform, 1.0f, aScope);
-
-    /*
-      CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    eventSource->ExecuteV(&renderImmediate, ((M3GRenderContext) aHContext), &r, aScope);
-    */
-    M3G_DO_UNLOCK(aEnv)
-
-
-    if (transform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, JNI_ABORT);
-    }
-}
-
-/*
-static void clear(M3GRenderContext aHContext, M3GBackground aHBackground)
-{
-    m3gClear(aHContext, aHBackground);
-}
-*/
-
-/*
- * Must be executed in UI thread
- */
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1clear
-(JNIEnv* aEnv, jclass, jint aCtx, jint aBg)
-{
-    M3G_DO_LOCK
-    m3gClear((M3GRenderContext)aCtx, (M3GBackground)aBg);
-
-    /*
-    CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    eventSource->ExecuteV(&clear, (M3GRenderContext)aCtx, (M3GBackground)aBg);
-    */
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1releaseImage
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    M3G_DO_LOCK
-
-    releaseTarget((M3GRenderContext)aHCtx);
-
-    /*
-    CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    eventSource->ExecuteV(&releaseTarget, (M3GRenderContext)aHCtx);
-    */
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1addRef
-(JNIEnv* aEnv, jclass, jint aObject)
-{
-    M3G_DO_LOCK
-    m3gAddRef((M3GObject) aObject);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1addLight
-(JNIEnv* aEnv, jclass, jint aHContext, jint aHLight, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    M3G_DO_LOCK
-    int idx = m3gAddLight((M3GRenderContext) aHContext, (M3GLight) aHLight, transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, JNI_ABORT);
-    }
-
-    return idx;
-}
-
-/*
-static void bindImage(M3GRenderContext hCtx, M3GImage hImg, M3Gbool depth, M3Gbitmask hintBits)
-{
-    if (m3gSetRenderBuffers(hCtx, depth ? M3G_COLOR_BUFFER_BIT|M3G_DEPTH_BUFFER_BIT : M3G_COLOR_BUFFER_BIT) && m3gSetRenderHints(hCtx, hintBits)) {
-        m3gBindImageTarget(hCtx, hImg);
-    }
-}
-*/
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1bindImage
-(JNIEnv* aEnv, jclass, jint aHCtx, jint aImageHandle, jboolean aDepth, jint aHintBits)
-{
-    M3G_DO_LOCK
-
-    if (m3gSetRenderBuffers((M3GRenderContext)aHCtx, (M3Gbool)aDepth ? M3G_COLOR_BUFFER_BIT|M3G_DEPTH_BUFFER_BIT : M3G_COLOR_BUFFER_BIT) && m3gSetRenderHints((M3GRenderContext)aHCtx, (M3Gbitmask)aHintBits))
-    {
-        m3gBindImageTarget((M3GRenderContext)aHCtx, (M3GImage)aImageHandle);
-    }
-
-    //CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    //eventSource->ExecuteV(&bindImage, (M3GRenderContext)aHCtx, (M3GImage)aImageHandle, (M3Gbool)aDepth, (M3Gbitmask)aHintBits);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1resetLights
-(JNIEnv* aEnv, jclass, jint aHContext)
-{
-    M3G_DO_LOCK
-    m3gClearLights((M3GRenderContext) aHContext);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1setDepthRange
-(JNIEnv* aEnv, jclass, jint aHContext, jfloat aDepthNear, jfloat aDepthFar)
-{
-    M3G_DO_LOCK
-    m3gSetDepthRange((M3GRenderContext) aHContext, aDepthNear, aDepthFar);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1setLight
-(JNIEnv* aEnv, jclass, jint aHContext, jint aLightIndex, jint aHLight, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    M3G_DO_LOCK
-    m3gSetLight((M3GRenderContext) aHContext, aLightIndex, (M3GLight) aHLight, transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, JNI_ABORT);
-    }
-}
-
-/*
-static void renderNode(M3GRenderContext aHCtx,
-                       M3GNode aHNode,
-                       const M3GMatrix *aMtx)
-{
-    m3gRenderNode(aHCtx, aHNode, aMtx);
-}
-*/
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1renderNode
-(JNIEnv* aEnv, jclass, jint aHCtx, jint aHNode, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    M3G_DO_LOCK
-
-    m3gRenderNode((M3GRenderContext)aHCtx, (M3GNode)aHNode, (const M3GMatrix *)transform);
-
-    //CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    //eventSource->ExecuteV(&renderNode, (M3GRenderContext)aHCtx, (M3GNode)aHNode, (const M3GMatrix *)transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aTransform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, JNI_ABORT);
-    }
-}
-
-#if defined(M3G_ENABLE_PROFILING)
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getStatistics
-(JNIEnv* aEnv, jclass, jintArray aStatArray)
-{
-    const M3Gint *statArray = (M3Gint *)(aStatArray != NULL ? aEnv->GetIntArrayElements(aStatArray, NULL) : NULL);
-    jint statArrayLength = aStatArray ? aEnv->GetArrayLength(aStatArray) : 0;
-
-    if (statArray != NULL && statArrayLength >= sizeof(m3gs_statistic))
-    {
-        m3gCopy((void*)statArray, m3gs_statistic, sizeof(m3gs_statistic));
-    }
-
-    M3G_DO_LOCK
-    m3gZero(m3gs_statistic, sizeof(m3gs_statistic));
-    M3G_DO_UNLOCK(aEnv)
-
-    if (statArray)
-    {
-        aEnv->ReleaseIntArrayElements(aStatArray, (jint*)statArray, 0);
-    }
-
-    return sizeof(m3gs_statistic);
-}
-
-#endif /* M3G_ENABLE_PROFILING */
-
-
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1getViewTransform
-(JNIEnv* aEnv, jclass, jint aHCtx, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    M3G_DO_LOCK
-    m3gGetViewTransform((M3GRenderContext) aHCtx, transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        /* copy array to Java side and release arrays */
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, 0);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getCamera
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    M3G_DO_LOCK
-    jint camera = (jint)m3gGetCamera((M3GRenderContext)aHCtx);
-    M3G_DO_UNLOCK(aEnv)
-
-    return camera;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getLightTransform
-(JNIEnv* aEnv, jclass, jint aHCtx, jint aLightIndex, jbyteArray aTransform)
-{
-    M3GMatrix *transform = NULL;
-    if (aTransform)
-    {
-        transform = (M3GMatrix *)(aEnv->GetByteArrayElements(aTransform, NULL));
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    M3G_DO_LOCK
-    int lightTransform = (M3Guint)m3gGetLightTransform((M3GRenderContext)aHCtx, aLightIndex, transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        aEnv->ReleaseByteArrayElements(aTransform, (jbyte*)transform, 0);
-    }
-
-    return (jint)lightTransform;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getLightCount
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    M3G_DO_LOCK
-    jint lightCount = (jint)m3gGetLightCount((M3GRenderContext)aHCtx);
-    M3G_DO_UNLOCK(aEnv)
-
-    return lightCount;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Graphics3D__1getDepthRangeNear
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    float depthNear = 0;
-    float depthFar = 0;
-
-    M3G_DO_LOCK
-    m3gGetDepthRange((M3GRenderContext) aHCtx, &depthNear, &depthFar);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jfloat)depthNear;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Graphics3D__1getDepthRangeFar
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    float depthNear = 0;
-    float depthFar = 0;
-
-    M3G_DO_LOCK
-    m3gGetDepthRange((M3GRenderContext) aHCtx, &depthNear, &depthFar);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jfloat)depthFar;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getViewportX
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    int viewport[4];
-
-    M3G_DO_LOCK
-    m3gGetViewport((M3GRenderContext)aHCtx, &viewport[0],
-                   &viewport[1],
-                   &viewport[2],
-                   &viewport[3]);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jint)viewport[0];
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getViewportY
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    int viewport[4];
-
-    M3G_DO_LOCK
-    m3gGetViewport((M3GRenderContext)aHCtx, &viewport[0],
-                   &viewport[1],
-                   &viewport[2],
-                   &viewport[3]);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jint)viewport[1];
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getViewportWidth
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    int viewport[4];
-
-    M3G_DO_LOCK
-    m3gGetViewport((M3GRenderContext)aHCtx, &viewport[0],
-                   &viewport[1],
-                   &viewport[2],
-                   &viewport[3]);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jint)viewport[2];
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getViewportHeight
-(JNIEnv* aEnv, jclass, jint aHCtx)
-{
-    int viewport[4];
-
-    M3G_DO_LOCK
-    m3gGetViewport((M3GRenderContext)aHCtx, &viewport[0],
-                   &viewport[1],
-                   &viewport[2],
-                   &viewport[3]);
-    M3G_DO_UNLOCK(aEnv)
-
-    return (jint)viewport[3];
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Graphics3D__1isAASupported
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3Gbool aaSupport = M3G_FALSE;
-
-    aaSupport = m3gIsAntialiasingSupported((M3GInterface)aM3g);
-
-    return (jboolean)aaSupport;
-}
--- a/javauis/m3g_qt/src/jni/group.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Group.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Group__1addChild
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHNode)
-{
-    M3G_DO_LOCK
-    m3gAddChild((M3GGroup)aHandle, (M3GNode)aHNode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Group__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateGroup((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Group__1pick2D
-(JNIEnv* aEnv, jclass, jint aHandle, jint aMask, jfloat aX, jfloat aY, jint aHCamera, jfloatArray aResult)
-{
-    jfloat* elems = NULL;
-    if (aResult)
-    {
-        elems = aEnv->GetFloatArrayElements(aResult, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_BEGIN_PROFILE(M3G_PROFILE_PICK);
-    M3G_DO_LOCK
-    jint ret = (jint)m3gPick2D((M3GGroup)aHandle, aMask, aX, aY, (M3GCamera)aHCamera, (jfloat*)elems);
-    M3G_DO_UNLOCK(aEnv)
-    M3G_END_PROFILE(M3G_PROFILE_PICK);
-
-    if (aResult)
-        aEnv->ReleaseFloatArrayElements(aResult, elems, 0);
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Group__1getChild
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex)
-{
-    M3G_DO_LOCK
-    jint child = (jint)m3gGetChild((M3GGroup)aHandle, aIndex);
-    M3G_DO_UNLOCK(aEnv)
-    return child;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Group__1pick3D
-(JNIEnv* aEnv, jclass, jint aHandle, jint aMask, jfloatArray aRay, jfloatArray aResult)
-{
-    jfloat* rayElems = NULL;
-    if (aRay)
-    {
-        rayElems = aEnv->GetFloatArrayElements(aRay, NULL);
-        if (rayElems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    jfloat* resultElems = NULL;
-    if (aResult)
-    {
-        resultElems = aEnv->GetFloatArrayElements(aResult, NULL);
-        if (resultElems == NULL)
-        {
-            if (rayElems)
-                aEnv->ReleaseFloatArrayElements(aRay, rayElems, JNI_ABORT);
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_BEGIN_PROFILE(M3G_PROFILE_PICK);
-    M3G_DO_LOCK
-    jint ret = (jint)m3gPick3D((M3GGroup)aHandle, aMask, (jfloat*)rayElems, (jfloat*)resultElems);
-    M3G_DO_UNLOCK(aEnv)
-    M3G_END_PROFILE(M3G_PROFILE_PICK);
-
-    if (resultElems)
-        aEnv->ReleaseFloatArrayElements(aResult, resultElems, 0);
-    if (rayElems)
-        aEnv->ReleaseFloatArrayElements(aRay, rayElems, 0);
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Group__1getChildCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint count =(jint)m3gGetChildCount((M3GGroup)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Group__1removeChild
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHNode)
-{
-    M3G_DO_LOCK
-    m3gRemoveChild((M3GGroup)aHandle, (M3GNode)aHNode);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/jni/image2d.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +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:
-*
-*/
-#include "javax_microedition_m3g_Image2D.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Image2D__1set
-(JNIEnv* aEnv, jclass, jint aHImage2D, jint aX, jint aY, jint aWidth, jint aHeight, jbyteArray aImageArray)
-{
-    jbyte* imageArray = NULL;
-    if (aImageArray)
-    {
-        imageArray = aEnv->GetByteArrayElements(aImageArray, NULL);
-        if (imageArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-    M3G_DO_LOCK
-    m3gSetSubImage((M3GImage)aHImage2D, aX, aY, aWidth, aHeight, aImageArray ? aEnv->GetArrayLength(aImageArray) : NULL, imageArray);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (imageArray)
-    {
-        aEnv->ReleaseByteArrayElements(aImageArray, imageArray, JNI_ABORT);
-    }
-}
-
-static void getImageScanline(const QImage* qtImage,
-                             M3Gint line,
-                             M3Gint bpl,
-                             M3Guint *pixels,
-                             M3Gbool *trueAlpha)
-{
-
-    // Get pointer to start of requested line
-    const unsigned char* srcAddr = qtImage->bits() + line * bpl;
-
-    // As input and output are in the same, i.e. #AARRGGBB format,
-    // just run mem copy from source to destination to copy one line
-    memcpy(pixels, srcAddr, bpl);
-    *trueAlpha = false;
-}
-
-/*
- * Must be excuted in UI thread
- */
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1ctorImage
-(JNIEnv* aEnv, jclass, jint aHM3g, jint aFormat, jint aImageHandle)
-{
-
-    if (aImageHandle != 0)
-    {
-        Java::GFX::Image* cgfxImage = reinterpret_cast<Java::GFX::Image*>(aImageHandle);
-        QImage qtImage;
-
-        if (!cgfxImage)
-        {
-            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
-        if ((qtImage.format() != QImage::Format_ARGB32) || (qtImage.format() != QImage::Format_RGB32))
-        {
-            qtImage = qtImage.convertToFormat(QImage::Format_ARGB32);
-            if (qtImage.isNull())
-            {
-                return 0;
-            }
-        }
-
-        // Create Image2D
-        M3GImage image;
-        M3Gint width = qtImage.width();
-        M3Gint height = qtImage.height();
-        M3Gint bpl = qtImage.bytesPerLine();
-
-        M3G_DO_LOCK
-
-        image = m3gCreateImage((M3GInterface)aHM3g, (M3GImageFormat)aFormat, width, height, 0);
-        if (image == NULL)
-        {
-            return 0;    // exception automatically raised
-        }
-
-        M3Guint *tempPixels = (M3Guint *) malloc(width * 4);
-        if (tempPixels == NULL)
-        {
-            m3gDeleteObject((M3GObject) image);
-            return 0;
-        }
-
-        // read and write scanline by scanline
-        for (M3Gint y = 0; y < height; ++y)
-        {
-            M3Gbool trueAlpha;
-            getImageScanline(&qtImage, y, bpl, tempPixels, &trueAlpha);
-            m3gSetImageScanline(image, y, trueAlpha, tempPixels);
-        }
-
-        // finally commit image
-        m3gCommitImage(image);
-
-        M3G_DO_UNLOCK(aEnv)
-
-        // free memory
-        free(tempPixels);
-
-        cgfxImage = NULL;
-        return reinterpret_cast<jint>(image);
-    }
-    return 0;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1getFormat
-(JNIEnv* aEnv, jclass, jint aHImage2D)
-{
-    M3G_DO_LOCK
-    jint format = (jint)m3gGetFormat((M3GImage)aHImage2D);
-    M3G_DO_UNLOCK(aEnv)
-    return format;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1ctorSizePixelsPalette
-(JNIEnv* aEnv, jclass, jint aM3g, jint aFormat, jint aWidth, jint aHeight, jbyteArray aImage, jbyteArray aPalette)
-{
-    M3GImageFormat format = (M3GImageFormat)aFormat;
-
-    int bpp = jsr184BytesPerPixel(format);
-
-    if (validateArray(aEnv, aImage, aWidth * aHeight))
-    {
-        if (aPalette == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-            return 0;
-        }
-        int paletteLen = aEnv->GetArrayLength(aPalette);
-        if ((paletteLen < 256 *(unsigned)bpp) &&
-                (paletteLen % (unsigned)bpp != 0))
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-            return 0;
-        }
-        else
-        {
-            M3G_DO_LOCK
-
-            M3GImage hImg = m3gCreateImage((M3GInterface)aM3g,
-                                           format,
-                                           aWidth, aHeight,
-                                           M3G_PALETTED);
-            if (hImg != NULL)
-            {
-                jbyte* palette = NULL;
-
-                int numEntries = paletteLen / bpp;
-                if (numEntries > 256)
-                {
-                    numEntries = 256;
-                }
-
-                jbyte* image = aEnv->GetByteArrayElements(aImage, NULL);
-                if (image == NULL)
-                {
-                    M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-                    return 0;
-                }
-
-                m3gSetImage(hImg, image);
-
-                palette = aEnv->GetByteArrayElements(aPalette, NULL);
-                if (palette == NULL)
-                {
-                    if (image)
-                    {
-                        aEnv->ReleaseByteArrayElements(aImage, image, JNI_ABORT);
-                    }
-                    M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-                    return 0;
-                }
-
-                m3gSetImagePalette(hImg, numEntries, palette);
-                m3gCommitImage(hImg);
-
-                if (image)
-                {
-                    aEnv->ReleaseByteArrayElements(aImage, image, JNI_ABORT);
-                }
-                if (palette)
-                {
-                    aEnv->ReleaseByteArrayElements(aPalette, palette, JNI_ABORT);
-                }
-            }
-            M3G_DO_UNLOCK(aEnv)
-            return ((unsigned) hImg);
-        }
-    }
-    return 0;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Image2D__1isMutable
-(JNIEnv* aEnv, jclass, jint aHImage2D)
-{
-    M3G_DO_LOCK
-    jboolean isMutable = (jboolean)m3gIsMutable((M3GImage)aHImage2D);
-    M3G_DO_UNLOCK(aEnv)
-    return isMutable;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1getHeight
-(JNIEnv* aEnv, jclass, jint aHImage2D)
-{
-    M3G_DO_LOCK
-    jint height = (jint)m3gGetHeight((M3GImage)aHImage2D);
-    M3G_DO_UNLOCK(aEnv)
-    return height;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1ctorSize
-(JNIEnv* aEnv, jclass, jint aM3g, jint aFormat, jint aWidth, jint aHeight)
-{
-    M3G_DO_LOCK
-    jint handle = (M3Guint) m3gCreateImage((M3GInterface)aM3g,
-                                           (M3GImageFormat)aFormat,
-                                           aWidth, aHeight,
-                                           M3G_DYNAMIC|M3G_RENDERING_TARGET);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1getWidth
-(JNIEnv* aEnv, jclass, jint aHImage2D)
-{
-    M3G_DO_LOCK
-    jint width = (jint)m3gGetWidth((M3GImage)aHImage2D);
-    M3G_DO_UNLOCK(aEnv)
-    return width;
-}
-
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Image2D__1ctorSizePixels
-(JNIEnv* aEnv, jclass, jint aM3g, jint aFormat, jint aWidth, jint aHeight, jbyteArray aImage)
-{
-    M3GImageFormat format = (M3GImageFormat)aFormat;
-
-    if (validateArray(aEnv, aImage, jsr184BytesPerPixel(format) * aWidth * aHeight))
-    {
-        M3G_DO_LOCK
-
-        M3GImage hImg = m3gCreateImage((M3GInterface)aM3g, format, aWidth, aHeight, 0);
-        if (hImg != NULL)
-        {
-            M3GImageFormat format = (M3GImageFormat)aFormat;
-
-            int bpp = jsr184BytesPerPixel(format);
-            jbyte* imageScanline = (jbyte*)malloc(aWidth * bpp);
-            for (int i=0; i < aHeight; i++)
-            {
-                aEnv->GetByteArrayRegion(aImage, aWidth * i * bpp, aWidth * bpp, imageScanline);
-                m3gSetSubImage(hImg, 0, i, aWidth, 1, aWidth * bpp, imageScanline);
-            }
-            m3gCommitImage(hImg);
-
-            free(imageScanline);
-        }
-        M3G_DO_UNLOCK(aEnv)
-        return (unsigned) hImg;
-    }
-    return 0;
-}
--- a/javauis/m3g_qt/src/jni/interface.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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:
-*
-*/
-#include "javax_microedition_m3g_Interface.h"
-
-
-/*!
- * \brief Error handler for the Java interface
- *
- * Converts M3G errors to exceptions and throws them automatically.
- */
-static void errorHandler(M3Genum errorCode, M3GInterface m3g)
-{
-    CSynchronization::InstanceL()->SetErrorCode(errorCode);
-}
-
-/*
-static int createInterface(M3Gparams* aCs)
-{
-    return ((unsigned) m3gCreateInterface(aCs));
-}
-*/
-
-/*
- * Must be executed in UI thread
- */
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Interface__1ctor(JNIEnv* aEnv, jclass)
-{
-    M3Gparams cs;
-    memset(&cs, 0, sizeof(cs));
-    cs.mallocFunc = malloc;
-    cs.freeFunc   = free;
-    cs.errorFunc = errorHandler;
-
-    M3G_DO_LOCK
-    /* Call to the Eventserver side */
-    //CJavaM3GEventSource* eventSource = JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
-    //jint handle = eventSource->Execute(&createInterface, &cs);
-    jint handle = (unsigned)m3gCreateInterface(&cs);
-    M3G_DO_UNLOCK(aEnv);
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Interface__1getClassID
-(JNIEnv* aEnv, jclass, jint aHObject)
-{
-    M3G_DO_LOCK
-    jint handle = m3gGetClass((M3GObject)aHObject);
-    M3G_DO_UNLOCK(aEnv);
-    return handle;
-}
--- a/javauis/m3g_qt/src/jni/keyframeSequence.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +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:
-*
-*/
-#include "javax_microedition_m3g_KeyframeSequence.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getRepeatMode
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint mode = (jint)m3gGetRepeatMode((M3GKeyframeSequence)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return mode;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_KeyframeSequence__1setKeyframe
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex, jint aTime, jfloatArray aValue)
-{
-    jfloat* elems = NULL;
-    if (aValue)
-    {
-        elems = aEnv->GetFloatArrayElements(aValue, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    jsize length = aValue ? aEnv->GetArrayLength(aValue) : 0;
-
-    M3G_DO_LOCK
-    m3gSetKeyframe((M3GKeyframeSequence)aHandle,
-                   aIndex,
-                   aTime,
-                   length,
-                   (const M3Gfloat *)elems);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (elems)
-        aEnv->ReleaseFloatArrayElements(aValue, elems, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_KeyframeSequence__1setRepeatMode
-(JNIEnv* aEnv, jclass, jint aHandle, jint aMode)
-{
-    M3G_DO_LOCK
-    m3gSetRepeatMode((M3GKeyframeSequence)aHandle, (M3Genum)aMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_KeyframeSequence__1setDuration
-(JNIEnv* aEnv, jclass, jint aHandle, jint aDuration)
-{
-    M3G_DO_LOCK
-    m3gSetDuration((M3GKeyframeSequence)aHandle, (int)aDuration);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aNumKeyframes, jint aNumComponents, jint aInterpolation)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateKeyframeSequence((M3GInterface)aM3g, aNumKeyframes,
-                  aNumComponents, aInterpolation);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_KeyframeSequence__1setValidRange
-(JNIEnv* aEnv, jclass, jint aHandle, jint aFirst, jint aLast)
-{
-    M3G_DO_LOCK
-    m3gSetValidRange((M3GKeyframeSequence)aHandle, aFirst, aLast);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getDuration
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint duration = (jint)m3gGetDuration((M3GKeyframeSequence)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return duration;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getComponentCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint count = (jint)m3gGetComponentCount((M3GKeyframeSequence)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getInterpolationType
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint type = (jint)m3gGetInterpolationType((M3GKeyframeSequence)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return type;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getKeyframe
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex, jfloatArray aValue)
-{
-    jfloat* elems = NULL;
-    if (aValue)
-    {
-        elems = aEnv->GetFloatArrayElements(aValue, NULL);
-        if (elems == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    jsize length = aValue ? aEnv->GetArrayLength(aValue) : 0;
-
-    if ((length < m3gGetComponentCount((M3GKeyframeSequence)aHandle)) &&
-            (aValue != NULL))
-    {
-        if (elems)
-        {
-            aEnv->ReleaseFloatArrayElements(aValue, elems, JNI_ABORT);
-        }
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return 0;
-    }
-
-    M3G_DO_LOCK
-    jint keyFrame = m3gGetKeyframe((M3GKeyframeSequence)aHandle, aIndex, elems);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (elems)
-    {
-        /* copy array to java side and release arrays */
-        aEnv->ReleaseFloatArrayElements(aValue, elems, 0);
-    }
-    return keyFrame;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getKeyframeCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint count = (jint)m3gGetKeyframeCount((M3GKeyframeSequence)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getValidRangeFirst
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    int first = 0;
-    int last = 0;
-    M3G_DO_LOCK
-    m3gGetValidRange((M3GKeyframeSequence)aHandle, &first, &last);
-    M3G_DO_UNLOCK(aEnv)
-    return first;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_KeyframeSequence__1getValidRangeLast
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    int first = 0;
-    int last = 0;
-    M3G_DO_LOCK
-    m3gGetValidRange((M3GKeyframeSequence)aHandle, &first, &last);
-    M3G_DO_UNLOCK(aEnv)
-    return last;
-}
--- a/javauis/m3g_qt/src/jni/light.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Light.h"
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Light__1getSpotAngle
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jfloat angle = (jfloat)m3gGetSpotAngle((M3GLight)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return angle;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setSpotExponent
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aExponent)
-{
-    M3G_DO_LOCK
-    m3gSetSpotExponent((M3GLight)aHandle, aExponent);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setMode
-(JNIEnv* aEnv, jclass, jint aHandle, jint aMode)
-{
-    M3G_DO_LOCK
-    m3gSetLightMode((M3GLight)aHandle, (int)aMode);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setAttenuation
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aConstant, jfloat aLinear, jfloat aQuadratic)
-{
-    M3G_DO_LOCK
-    m3gSetAttenuation((M3GLight)aHandle, aConstant, aLinear, aQuadratic);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setIntensity
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aIntensity)
-{
-    M3G_DO_LOCK
-    m3gSetIntensity((M3GLight)aHandle, aIntensity);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Light__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (jint)m3gCreateLight((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Light__1getMode
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint mode = (jint)m3gGetLightMode((M3GLight)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return mode;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Light__1getAttenuation
-(JNIEnv* aEnv, jclass, jint aHandle, jint aType)
-{
-    M3G_DO_LOCK
-    jfloat att = (jfloat)m3gGetAttenuation((M3GLight)aHandle, aType);
-    M3G_DO_UNLOCK(aEnv)
-    return att;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Light__1getSpotExponent
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jfloat spotExp = (jfloat)m3gGetSpotExponent((M3GLight)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return spotExp;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setSpotAngle
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aAngle)
-{
-    M3G_DO_LOCK
-    m3gSetSpotAngle((M3GLight)aHandle, aAngle);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Light__1getIntensity
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jfloat intensity = (jfloat)m3gGetIntensity((M3GLight)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return intensity;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Light__1setColor
-(JNIEnv* aEnv, jclass, jint aHandle, jint aRGB)
-{
-    M3G_DO_LOCK
-    m3gSetLightColor((M3GLight)aHandle, aRGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Light__1getColor
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint color = (jint)m3gGetLightColor((M3GLight)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
--- a/javauis/m3g_qt/src/jni/loader.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +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:
-*
-*/
-#include "javax_microedition_m3g_Loader.h"
-
-#include <ezlib.h>
-
-/*!
- * \brief Symbian implementation of the block inflation function for
- * the Loader class
- */
-static M3Gsizei m3gSymbianInflateBlock1(M3Gsizei srcLength,
-                                        const M3Gubyte *src,
-                                        M3Gsizei dstLength,
-                                        M3Gubyte *dst)
-{
-    unsigned long len = (unsigned long) dstLength;
-    if (uncompress((Bytef *) dst, &len,
-                   (const Bytef *) src, (uLong) srcLength) != Z_OK)
-    {
-        return 0;
-    }
-    return (M3Gsizei) len;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Loader__1inflate
-(JNIEnv* aEnv, jclass, jbyteArray aCompressed, jbyteArray aInflated)
-{
-    M3Guint result;
-
-    M3Gubyte *compressedData = (M3Gubyte *)aEnv->GetByteArrayElements(aCompressed, NULL);
-    if (compressedData == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-    M3Gint compressedLength = aEnv->GetArrayLength(aCompressed);
-    M3Gubyte *inflatedData = (M3Gubyte *)aEnv->GetByteArrayElements(aInflated, NULL);
-    if (inflatedData == NULL)
-    {
-        if (compressedData)
-            aEnv->ReleaseByteArrayElements(aCompressed, (jbyte*)compressedData, JNI_ABORT);
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-    M3Gint inflatedLength = aEnv->GetArrayLength(aInflated);
-
-    M3G_DO_LOCK
-    if (m3gSymbianInflateBlock1(compressedLength, compressedData,
-                                inflatedLength, inflatedData))
-    {
-        result = TRUE;
-    }
-    else
-    {
-        result = FALSE;
-    }
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aCompressed)
-    {
-        aEnv->ReleaseByteArrayElements(aCompressed, (jbyte*)compressedData, JNI_ABORT);
-    }
-
-    if (aInflated)
-    {
-        aEnv->ReleaseByteArrayElements(aInflated, (jbyte*)inflatedData, 0);
-    }
-
-    return result;
-}
-
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    M3GLoader loader = (M3GLoader)m3gCreateLoader((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return (M3Guint)loader;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1decodeData
-(JNIEnv* aEnv, jclass, jint aLoader, jint aOffset, jbyteArray aDataArray)
-{
-    /* null array is never passed */
-    M3Gubyte *data = (M3Gubyte *)aEnv->GetByteArrayElements(aDataArray, NULL);
-    if (data == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-
-    M3Gint bytes = aEnv->GetArrayLength(aDataArray);
-    M3GLoader loader = (M3GLoader)aLoader;
-
-    M3G_DO_LOCK
-    jint retVal = m3gDecodeData(loader, bytes, data + aOffset);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aDataArray)
-    {
-        aEnv->ReleaseByteArrayElements(aDataArray, (jbyte*)data, JNI_ABORT);
-    }
-
-    return retVal;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1getLoadedObjects
-(JNIEnv* aEnv, jclass, jint aLoader, jintArray aObjectArray)
-{
-    M3GObject *objects = NULL;
-    if (aObjectArray)
-    {
-        objects = (M3GObject *)aEnv->GetIntArrayElements(aObjectArray, NULL);
-        if (objects == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3GLoader loader = (M3GLoader)aLoader;
-
-    M3G_DO_LOCK
-    jint retVal = m3gGetLoadedObjects(loader, objects);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aObjectArray)
-    {
-        aEnv->ReleaseIntArrayElements(aObjectArray, (jint*)objects, 0);
-    }
-
-    return retVal;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Loader__1setExternalReferences
-(JNIEnv* aEnv, jclass, jint aLoader, jintArray aObjectArray)
-{
-    /* null array is never passed */
-    M3GObject *xRefs = (M3GObject *)aEnv->GetIntArrayElements(aObjectArray, NULL);
-    if (xRefs == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3Gint numXRefs = aEnv->GetArrayLength(aObjectArray);
-    M3GLoader loader = (M3GLoader)aLoader;
-
-    M3G_DO_LOCK
-    m3gImportObjects(loader, numXRefs, xRefs);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseIntArrayElements(aObjectArray, (jint*)xRefs, JNI_ABORT);
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1getObjectsWithUserParameters
-(JNIEnv* aEnv, jclass, jint aLoader, jintArray aObjectArray)
-{
-    M3GObject *objects = NULL;
-    if (aObjectArray)
-    {
-        objects = (M3GObject *)aEnv->GetIntArrayElements(aObjectArray, NULL);
-        if (objects == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3GLoader loader = (M3GLoader)aLoader;
-
-    M3G_DO_LOCK
-    jint retVal = m3gGetObjectsWithUserParameters(loader, objects);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (objects)
-    {
-        aEnv->ReleaseIntArrayElements(aObjectArray, (jint*)objects, 0);
-    }
-
-    return retVal;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1getNumUserParameters
-(JNIEnv* aEnv, jclass, jint aLoader, jint aObj)
-{
-    M3GLoader loader = (M3GLoader)aLoader;
-    M3G_DO_LOCK
-    jint numParams = (jint)m3gGetNumUserParameters(loader, aObj);
-    M3G_DO_UNLOCK(aEnv)
-    return numParams;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Loader__1getUserParameter
-(JNIEnv* aEnv, jclass, jint aLoader, jint aObj, jint aIndex, jbyteArray aDataArray)
-{
-    M3Gbyte *data = NULL;
-    if (aDataArray)
-    {
-        data = (M3Gbyte *)aEnv->GetByteArrayElements(aDataArray, NULL);
-        if (data == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3GLoader loader = (M3GLoader)aLoader;
-    M3G_DO_LOCK
-    jint retVal = m3gGetUserParameter(loader, aObj, aIndex, data);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (data)
-    {
-        aEnv->ReleaseByteArrayElements(aDataArray, (jbyte*)data, 0);
-    }
-
-    return retVal;
-}
--- a/javauis/m3g_qt/src/jni/material.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Material.h"
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Material__1isVertexColorTrackingEnabled
-(JNIEnv* aEnv, jclass, jint aHMaterial)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsVertexColorTrackingEnabled((M3GMaterial)aHMaterial);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Material__1getShininess
-(JNIEnv* aEnv, jclass, jint aHMaterial)
-{
-    M3G_DO_LOCK
-    jfloat shininess = (jfloat)m3gGetShininess((M3GMaterial)aHMaterial);
-    M3G_DO_UNLOCK(aEnv)
-    return shininess;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Material__1setVertexColorTrackingEnable
-(JNIEnv* aEnv, jclass, jint aHMaterial, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetVertexColorTrackingEnable((M3GMaterial)aHMaterial, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Material__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    M3GMaterial material = (M3GMaterial)m3gCreateMaterial((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return (M3Guint)material;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Material__1setColor
-(JNIEnv* aEnv, jclass, jint aHMaterial, jint aTarget, jint aARGB)
-{
-    M3G_DO_LOCK
-    m3gSetColor((M3GMaterial)aHMaterial, aTarget, aARGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Material__1setShininess
-(JNIEnv* aEnv, jclass, jint aHMaterial, jfloat aShininess)
-{
-    M3G_DO_LOCK
-    m3gSetShininess((M3GMaterial)aHMaterial, (M3Gfloat)aShininess);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Material__1getColor
-(JNIEnv* aEnv, jclass, jint aHMaterial, jint aTarget)
-{
-    M3G_DO_LOCK
-    jint color = (jint)m3gGetColor((M3GMaterial)aHMaterial, aTarget);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
--- a/javauis/m3g_qt/src/jni/mesh.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Mesh.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Mesh__1getIndexBuffer
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex)
-{
-    M3G_DO_LOCK
-    jint buffer = (M3Guint)m3gGetIndexBuffer((M3GMesh)aHandle, aIndex);
-    M3G_DO_UNLOCK(aEnv)
-    return buffer;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Mesh__1getSubmeshCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint count = (M3Guint)m3gGetSubmeshCount((M3GMesh)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Mesh__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aHVertices, jintArray aHTriangles, jintArray aHAppearances)
-{
-    if (aHVertices == 0 || aHTriangles == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return 0;
-    }
-
-    int trianglesLen = aEnv->GetArrayLength(aHTriangles);
-    int appearancesLen = aHAppearances ? aEnv->GetArrayLength(aHAppearances) : 0;
-    if (trianglesLen == 0 || (aHAppearances != NULL && appearancesLen < trianglesLen))
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return 0;
-    }
-
-    jint* triangle = aEnv->GetIntArrayElements(aHTriangles, NULL);
-    if (triangle == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-
-    jint* appearance = NULL;
-    if (aHAppearances)
-    {
-        appearance = aEnv->GetIntArrayElements(aHAppearances, NULL);
-        if (appearance == NULL)
-        {
-            aEnv->ReleaseIntArrayElements(aHTriangles, triangle, JNI_ABORT);
-
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    M3G_DO_LOCK
-    M3Guint ret = (M3Guint)m3gCreateMesh((M3GInterface)aM3g,
-                                         (M3GVertexBuffer)aHVertices,
-                                         (M3GIndexBuffer*)triangle,
-                                         (M3GAppearance*)appearance,
-                                         trianglesLen);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (triangle)
-    {
-        aEnv->ReleaseIntArrayElements(aHTriangles, triangle, JNI_ABORT);
-    }
-    if (appearance)
-    {
-        aEnv->ReleaseIntArrayElements(aHAppearances, appearance, JNI_ABORT);
-    }
-
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Mesh__1getVertexBuffer
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint vBuffer = (M3Guint)m3gGetVertexBuffer((M3GMesh)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return vBuffer;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Mesh__1getAppearance
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex)
-{
-    M3G_DO_LOCK
-    jint appearence = (M3Guint)m3gGetAppearance((M3GMesh)aHandle, aIndex);
-    M3G_DO_UNLOCK(aEnv)
-    return appearence;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Mesh__1setAppearance
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex, jint aHAppearance)
-{
-    M3G_DO_LOCK
-    m3gSetAppearance((M3GMesh)aHandle, aIndex, (M3GAppearance)aHAppearance);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/jni/morphingMesh.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +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:
-*
-*/
-
-#include "javax_microedition_m3g_MorphingMesh.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_MorphingMesh__1setWeights
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aWeightArray)
-{
-    if (aWeightArray != NULL)
-    {
-        jfloat* weightArray = aEnv->GetFloatArrayElements(aWeightArray, NULL);
-        if (weightArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        M3G_DO_LOCK
-        m3gSetWeights((M3GMorphingMesh)aHandle, (M3Gfloat *)weightArray, aEnv->GetArrayLength(aWeightArray));
-        M3G_DO_UNLOCK(aEnv)
-
-        if (weightArray)
-        {
-            aEnv->ReleaseFloatArrayElements(aWeightArray, weightArray, JNI_ABORT);
-        }
-    }
-    else
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_MorphingMesh__1getMorphTargetCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint count = (M3Guint)m3gGetMorphTargetCount((M3GMorphingMesh)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_MorphingMesh__1getWeights
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aWeightArray)
-{
-    if (aWeightArray != NULL)
-    {
-        jfloat* weightArray = aEnv->GetFloatArrayElements(aWeightArray, NULL);
-        if (weightArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        M3G_DO_LOCK
-        m3gGetWeights((M3GMorphingMesh)aHandle, (M3Gfloat *)weightArray, aEnv->GetArrayLength(aWeightArray));
-        M3G_DO_UNLOCK(aEnv)
-
-        if (weightArray)
-        {
-            aEnv->ReleaseFloatArrayElements(aWeightArray, weightArray, 0);
-        }
-    }
-    else
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_MorphingMesh__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aHVertices, jintArray aHTargets, jintArray aHTriangles, jintArray aHAppearances)
-{
-    if (aHVertices == 0 || aHTargets == NULL || aHTriangles == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return 0;
-    }
-
-    int trianglesLen = aEnv->GetArrayLength(aHTriangles);
-    int targetsLen = aEnv->GetArrayLength(aHTargets);
-
-    if (trianglesLen == 0 || targetsLen == 0)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return 0;
-    }
-
-    if (aHAppearances != NULL)
-    {
-        int appearancesLen = aEnv->GetArrayLength(aHAppearances);
-        if (appearancesLen < trianglesLen)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-            return 0;
-        }
-    }
-
-    jint* targets = aEnv->GetIntArrayElements(aHTargets, NULL);
-    if (targets == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-
-    jint* triangles = aEnv->GetIntArrayElements(aHTriangles, NULL);
-    if (triangles == NULL)
-    {
-        aEnv->ReleaseIntArrayElements(aHTargets, targets, JNI_ABORT);
-
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return 0;
-    }
-
-    jint* appearances = NULL;
-    if (aHAppearances)
-    {
-        appearances = aEnv->GetIntArrayElements(aHAppearances, NULL);
-        if (appearances == NULL)
-        {
-            aEnv->ReleaseIntArrayElements(aHTargets, targets, JNI_ABORT);
-            aEnv->ReleaseIntArrayElements(aHTriangles, triangles, JNI_ABORT);
-
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_DO_LOCK
-    M3Guint ret = (M3Guint)m3gCreateMorphingMesh((M3GInterface)aM3g,
-                  (M3GVertexBuffer)aHVertices,
-                  (M3GVertexBuffer*)targets,
-                  (M3GIndexBuffer*)triangles,
-                  (M3GAppearance*)appearances,
-                  trianglesLen,
-                  targetsLen);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseIntArrayElements(aHTargets, targets, JNI_ABORT);
-    aEnv->ReleaseIntArrayElements(aHTriangles, triangles, JNI_ABORT);
-    if (appearances)
-    {
-        aEnv->ReleaseIntArrayElements(aHAppearances, appearances, JNI_ABORT);
-    }
-
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_MorphingMesh__1getMorphTarget
-(JNIEnv* aEnv, jclass, jint aHandle, jint aIndex)
-{
-    M3G_DO_LOCK
-    jint target = (M3Guint)m3gGetMorphTarget((M3GMorphingMesh)aHandle, aIndex);
-    M3G_DO_UNLOCK(aEnv)
-    return target;
-}
--- a/javauis/m3g_qt/src/jni/node.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +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:
-*
-*/
-#include "javax_microedition_m3g_Node.h"
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Node__1isEnabled
-(JNIEnv* aEnv, jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsEnabled((M3GNode)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT jfloat JNICALL Java_javax_microedition_m3g_Node__1getAlphaFactor
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jfloat alpha = (jfloat)m3gGetAlphaFactor((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return alpha;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getParent
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint parent = (M3Guint)m3gGetParent((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return parent;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Node__1setScope
-(JNIEnv* aEnv, jclass, jint aHandle, jint aId)
-{
-    M3G_DO_LOCK
-    m3gSetScope((M3GNode)aHandle, aId);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getScope
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint scope = (jint)m3gGetScope((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return scope;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Node__1getTransformTo
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHTarget, jbyteArray aDstArray)
-{
-    jboolean ret = 0;
-    if (aDstArray != NULL && aHTarget != 0)
-    {
-        jbyte* dstArray = aEnv->GetByteArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-
-        M3G_DO_LOCK
-        ret = m3gGetTransformTo((M3GNode)aHandle, (M3GNode)aHTarget, (M3GMatrix *)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-
-        aEnv->ReleaseByteArrayElements(aDstArray, dstArray, 0);
-    }
-    else
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-    }
-
-    return ret;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Node__1align
-(JNIEnv* aEnv, jclass, jint aHNode, jint aHRef)
-{
-    M3G_BEGIN_PROFILE(M3G_PROFILE_ALIGN);
-    M3G_DO_LOCK
-    m3gAlignNode((M3GNode)aHNode, (M3GNode)aHRef);
-    M3G_DO_UNLOCK(aEnv)
-    M3G_END_PROFILE(M3G_PROFILE_ALIGN);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Node__1setAlphaFactor
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aAlphaFactor)
-{
-    M3G_DO_LOCK
-    m3gSetAlphaFactor((M3GNode)aHandle, aAlphaFactor);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Node__1enable
-(JNIEnv* aEnv, jclass, jint aHandle, jint aWhich, jboolean aEnabled)
-{
-    M3G_DO_LOCK
-    m3gEnable((M3GNode)aHandle, aWhich, (jint)aEnabled);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Node__1setAlignment
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHZReference, jint aZTarget, jint aHYReference, jint aYTarget)
-{
-    M3G_DO_LOCK
-    m3gSetAlignment((M3GNode)aHandle, (M3GNode)aHZReference, aZTarget, (M3GNode)aHYReference, aYTarget);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getZRef
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint zRef = (M3Guint)m3gGetZRef((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return zRef;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getYRef
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint yRef = (M3Guint)m3gGetYRef((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return yRef;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getSubtreeSize
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint size = (M3Guint)m3gGetSubtreeSize((M3GNode)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return size;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Node__1getAlignmentTarget
-(JNIEnv* aEnv, jclass, jint aHandle, jint aAxis)
-{
-    M3G_DO_LOCK
-    jint target = (jint)m3gGetAlignmentTarget((M3GNode)aHandle, aAxis);
-    M3G_DO_UNLOCK(aEnv)
-    return target;
-}
--- a/javauis/m3g_qt/src/jni/object3d.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Object3D.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1animate
-(JNIEnv* aEnv, jclass, jint aHObject, jint aTime)
-{
-    M3G_DO_LOCK
-    jint anim = (jint)m3gAnimate((M3GObject)aHObject, aTime);
-    M3G_DO_UNLOCK(aEnv)
-    return anim;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1getAnimationTrack
-(JNIEnv* aEnv, jclass, jint aHObject, jint aIndex)
-{
-    M3G_DO_LOCK
-    jint handle = (M3Guint)m3gGetAnimationTrack((M3GObject)aHObject, aIndex);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1find
-(JNIEnv* aEnv, jclass, jint aHObject, jint aUserID)
-{
-    M3G_DO_LOCK
-    jint target = (M3Guint)m3gFind((M3GObject)aHObject, aUserID);
-    M3G_DO_UNLOCK(aEnv)
-    return target;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1getUserID
-(JNIEnv* aEnv, jclass, jint aHObject)
-{
-    M3G_DO_LOCK
-    jint id = (jint)m3gGetUserID((M3GObject)aHObject);
-    M3G_DO_UNLOCK(aEnv)
-    return id;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1addAnimationTrack
-(JNIEnv* aEnv, jclass, jint aHObject, jint aHTrack)
-{
-    M3G_DO_LOCK
-    jint ret = (jint)m3gAddAnimationTrack((M3GObject)aHObject, (M3GAnimationTrack)aHTrack);
-    M3G_DO_UNLOCK(aEnv)
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1getAnimationTrackCount
-(JNIEnv* aEnv, jclass, jint aHObject)
-{
-    M3G_DO_LOCK
-    jint count = (jint)m3gGetAnimationTrackCount((M3GObject)aHObject);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Object3D__1removeAnimationTrack
-(JNIEnv* aEnv, jclass, jint aHObject, jint aHTrack)
-{
-    M3G_DO_LOCK
-    m3gRemoveAnimationTrack((M3GObject)aHObject, (M3GAnimationTrack)aHTrack);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Object3D__1setUserID
-(JNIEnv* aEnv, jclass, jint aHObject, jint aUserID)
-{
-    M3G_DO_LOCK
-    m3gSetUserID((M3GObject)aHObject, aUserID);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Object3D__1addRef
-(JNIEnv* aEnv, jclass, jint aObject)
-{
-    M3G_DO_LOCK
-    m3gAddRef((M3GObject) aObject);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1duplicate
-(JNIEnv* aEnv, jclass, jint aHObject, jintArray aHReferences)
-{
-    jint* references = NULL;
-    if (aHReferences)
-    {
-        references = aEnv->GetIntArrayElements(aHReferences, NULL);
-        if (references == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_DO_LOCK
-    M3Guint ret = (M3Guint)m3gDuplicate((M3GObject)aHObject, (M3GObject *)references);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (references)
-    {
-        aEnv->ReleaseIntArrayElements(aHReferences, references, 0);
-    }
-
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Object3D__1getReferences
-(JNIEnv* aEnv, jclass, jint aHObject, jintArray aHReferences)
-{
-    jint* references = NULL;
-    if (aHReferences)
-    {
-        references = aEnv->GetIntArrayElements(aHReferences, NULL);
-        if (references == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    jint numReferences = aHReferences ? aEnv->GetArrayLength(aHReferences) : 0;
-
-    M3G_DO_LOCK
-    jint ret = m3gGetReferences((M3GObject)aHObject, (M3GObject *)references, numReferences);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (references)
-    {
-        aEnv->ReleaseIntArrayElements(aHReferences, references, 0);
-    }
-
-    return ret;
-}
--- a/javauis/m3g_qt/src/jni/platform.inl	Tue May 11 16:07:20 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:
-*
-*/
-#include "javax_microedition_m3g_Platform.h"
-
-/*
- * Must be excuted in UI thread
- */
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Platform_finalizeInterface
-(JNIEnv* aEnv, jclass, jint aHObj)
-{
-    M3G_DO_LOCK
-    m3gDeleteInterface((M3GInterface)aHObj);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-/*
- * Must be excuted in UI thread
- */
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Platform__1finalizeObject
-(JNIEnv* aEnv, jclass, jint aHObj)
-{
-    M3G_DO_LOCK
-    m3gDeleteObject((M3GObject)aHObj);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/jni/polygonMode.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +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:
-*
-*/
-#include "javax_microedition_m3g_PolygonMode.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setCulling
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jint aModeBits)
-{
-    M3G_DO_LOCK
-    m3gSetCulling((M3GPolygonMode)aHPolygonMode, aModeBits);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_PolygonMode__1getCulling
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jint culling = (jint)m3gGetCulling((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return culling;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setWinding
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jint aModeBits)
-{
-    M3G_DO_LOCK
-    m3gSetWinding((M3GPolygonMode)aHPolygonMode, aModeBits);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_PolygonMode__1getWinding
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jint winding = (jint)m3gGetWinding((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return winding;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_PolygonMode__1isTwoSidedLightingEnabled
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsTwoSidedLightingEnabled((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setTwoSidedLightingEnable
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetTwoSidedLightingEnable((M3GPolygonMode)aHPolygonMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setPerspectiveCorrectionEnable
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetPerspectiveCorrectionEnable((M3GPolygonMode)aHPolygonMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_PolygonMode__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    M3GPolygonMode gm = m3gCreatePolygonMode((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return (M3Guint)gm;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setLocalCameraLightingEnable
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jboolean aEnable)
-{
-    M3G_DO_LOCK
-    m3gSetLocalCameraLightingEnable((M3GPolygonMode)aHPolygonMode, (M3Gbool)aEnable);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_PolygonMode__1setShading
-(JNIEnv* aEnv, jclass, jint aHPolygonMode, jint aModeBits)
-{
-    M3G_DO_LOCK
-    m3gSetShading((M3GPolygonMode)aHPolygonMode, aModeBits);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_PolygonMode__1getShading
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jint shading = (jint)m3gGetShading((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return shading;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_PolygonMode__1isLocalCameraLightingEnabled
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsLocalCameraLightingEnabled((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_PolygonMode__1isPerspectiveCorrectionEnabled
-(JNIEnv* aEnv, jclass, jint aHPolygonMode)
-{
-    M3G_DO_LOCK
-    jboolean enabled = (jboolean)m3gIsPerspectiveCorrectionEnabled((M3GPolygonMode)aHPolygonMode);
-    M3G_DO_UNLOCK(aEnv)
-    return enabled;
-}
--- a/javauis/m3g_qt/src/jni/skinnedMesh.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +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:
-*
-*/
-#include "javax_microedition_m3g_SkinnedMesh.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_SkinnedMesh__1addTransform
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHBone, jint aWeight, jint aFirstVertex, jint aNumVertices)
-{
-    M3G_DO_LOCK
-    m3gAddTransform((M3GSkinnedMesh)aHandle, (M3GNode)aHBone, aWeight, aFirstVertex, aNumVertices);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_SkinnedMesh__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aHVertices, jintArray aHTriangles, jintArray aHAppearances, jint aHSkeleton)
-{
-    jint* appearances = NULL;
-    if (aHAppearances)
-    {
-        appearances = aEnv->GetIntArrayElements(aHAppearances, NULL);
-        if (appearances == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    jint* triangles = NULL;
-    if (aHTriangles)
-    {
-        triangles = aEnv->GetIntArrayElements(aHTriangles, NULL);
-        if (triangles == NULL)
-        {
-            if (appearances)
-            {
-                aEnv->ReleaseIntArrayElements(aHAppearances, appearances, JNI_ABORT);
-            }
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    jint numTriangles = aEnv->GetArrayLength(aHTriangles);
-    M3GInterface m3g = (M3GInterface) aM3g;
-
-    M3G_DO_LOCK
-    M3Guint ret = (M3Guint)m3gCreateSkinnedMesh(m3g,
-                  (M3GVertexBuffer)aHVertices,
-                  (M3GIndexBuffer*)triangles,
-                  (M3GAppearance *)appearances,
-                  numTriangles,
-                  (M3GGroup)aHSkeleton);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (appearances)
-    {
-        aEnv->ReleaseIntArrayElements(aHAppearances, appearances, JNI_ABORT);
-    }
-    if (triangles)
-    {
-        aEnv->ReleaseIntArrayElements(aHTriangles, triangles, JNI_ABORT);
-    }
-
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_SkinnedMesh__1getSkeleton
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint skeleton = (M3Guint)m3gGetSkeleton((M3GSkinnedMesh)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return skeleton;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_SkinnedMesh__1getBoneTransform
-(JNIEnv* aEnv, jclass, jint aHandle, jint aBone, jbyteArray aTransform)
-{
-    jbyte *transform = NULL;
-    if (aTransform)
-    {
-        transform = aEnv->GetByteArrayElements(aTransform, NULL);
-        if (transform == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    M3G_DO_LOCK
-    m3gGetBoneTransform((M3GSkinnedMesh)aHandle, (M3GNode)aBone, (M3GMatrix *)transform);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (transform)
-    {
-        /* Update array to java side and release arrays */
-        aEnv->ReleaseByteArrayElements(aTransform, transform, 0);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_SkinnedMesh__1getBoneVertices
-(JNIEnv* aEnv, jclass, jint aHandle, jint aBone, jintArray aIndices, jfloatArray aWeights)
-{
-    int *indices = NULL;
-    float *weights = NULL;
-    jint vertices = 0;
-
-    /* get indices int array */
-    if (aIndices != NULL)
-    {
-        indices = aEnv->GetIntArrayElements(aIndices, NULL);
-        if (indices == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    /* get weights float array */
-    if (aWeights != NULL)
-    {
-        weights = aEnv->GetFloatArrayElements(aWeights, NULL);
-        if (weights == NULL)
-        {
-            if (indices)
-            {
-                /* Release indices int array*/
-                aEnv->ReleaseIntArrayElements(aIndices, indices, JNI_ABORT);
-            }
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    M3G_DO_LOCK
-    /* Get number of vertices */
-    int requiredLength = m3gGetBoneVertices((M3GSkinnedMesh)aHandle, (M3GNode)aBone, NULL, NULL);
-    M3G_DO_UNLOCK(aEnv)
-
-    /* If return value is 0, an error has occured so we leave here */
-    if (requiredLength == 0)
-    {
-
-        /* release arrays before exiting */
-        if (indices)
-        {
-            /* Release indices int array */
-            aEnv->ReleaseIntArrayElements(aIndices, indices, JNI_ABORT);
-        }
-        if (weights)
-        {
-            /* Release indices int array */
-            aEnv->ReleaseFloatArrayElements(aWeights, weights, JNI_ABORT);
-        }
-        return 0;
-    }
-    /*
-    *  If either of arrays is null, lengths are not checked.
-    *  If length validation fails, exception is automatically raised.
-    */
-    if (indices != NULL && weights != NULL &&
-            (!validateArray(aEnv, (jbyteArray)aIndices, requiredLength) ||
-             !validateArray(aEnv, (jbyteArray)aWeights, requiredLength)))
-    {
-
-        /* release arrays here */
-        if (indices)
-        {
-            /* Release indices int array */
-            aEnv->ReleaseIntArrayElements(aIndices, indices, JNI_ABORT);
-        }
-        if (weights)
-        {
-            /* Release indices int array */
-            aEnv->ReleaseFloatArrayElements(aWeights, weights, JNI_ABORT);
-        }
-
-        return 0;
-    }
-    else
-    {
-        M3G_DO_LOCK
-        vertices = m3gGetBoneVertices((M3GSkinnedMesh)aHandle, (M3GNode)aBone, indices, weights);
-        M3G_DO_UNLOCK(aEnv)
-    }
-
-    if (indices)
-    {
-        /* Update array to java side and release arrays */
-        aEnv->ReleaseIntArrayElements(aIndices, indices, 0);
-    }
-    if (weights)
-    {
-        /* Update array to java side and release arrays */
-        aEnv->ReleaseFloatArrayElements(aWeights, weights, 0);
-    }
-    return vertices;
-}
-
--- a/javauis/m3g_qt/src/jni/sprite3d.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Sprite3D.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Sprite3D__1setImage
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHImage)
-{
-    M3G_DO_LOCK
-    m3gSetSpriteImage((M3GSprite)aHandle, (M3GImage)aHImage);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jboolean JNICALL Java_javax_microedition_m3g_Sprite3D__1isScaled
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jboolean scaled = (jboolean)m3gIsScaledSprite((M3GSprite)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return scaled;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Sprite3D__1getImage
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint image = (M3Guint)m3gGetSpriteImage((M3GSprite)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return image;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Sprite3D__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jboolean aScaled, jint aHImage, jint aHAppearance)
-{
-    M3G_DO_LOCK
-    jint handle = (M3Guint)m3gCreateSprite((M3GInterface)aM3g, aScaled, (M3GImage)aHImage, (M3GAppearance)aHAppearance);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Sprite3D__1getAppearance
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint appearence = (M3Guint)m3gGetSpriteAppearance((M3GSprite)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return appearence;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Sprite3D__1getCrop
-(JNIEnv* aEnv, jclass, jint aHandle, jint aWhich)
-{
-    M3G_DO_LOCK
-    jint crop = (jint)m3gGetCrop((M3GSprite)aHandle, aWhich);
-    M3G_DO_UNLOCK(aEnv)
-    return crop;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Sprite3D__1setCrop
-(JNIEnv* aEnv, jclass, jint aHandle, jint aCropX, jint aCropY, jint aWidth, jint aHeight)
-{
-    M3G_DO_LOCK
-    m3gSetCrop((M3GSprite)aHandle, aCropX, aCropY, aWidth, aHeight);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Sprite3D__1setAppearance
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHAppearance)
-{
-    M3G_DO_LOCK
-    m3gSetSpriteAppearance((M3GSprite)aHandle, (M3GAppearance)aHAppearance);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/jni/texture2d.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +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:
-*
-*/
-#include "javax_microedition_m3g_Texture2D.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getBlending
-(JNIEnv* aEnv, jclass, jint aHTexture2D)
-{
-    M3G_DO_LOCK
-    jint blending = (jint)m3gTextureGetBlending((M3GTexture)aHTexture2D);
-    M3G_DO_UNLOCK(aEnv)
-    return blending;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getWrappingT
-(JNIEnv* aEnv, jclass, jint aHTexture2D)
-{
-    M3G_DO_LOCK
-    jint wrapping = (jint)m3gGetWrappingT((M3GTexture)aHTexture2D);
-    M3G_DO_UNLOCK(aEnv)
-    return wrapping;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getWrappingS
-(JNIEnv* aEnv, jclass, jint aHTexture2D)
-{
-    M3G_DO_LOCK
-    jint wrapping = (jint)m3gGetWrappingS((M3GTexture)aHTexture2D);
-    M3G_DO_UNLOCK(aEnv)
-    return wrapping;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Texture2D__1setFiltering
-(JNIEnv* aEnv, jclass, jint aHTexture2D, jint aLevelFilter, jint aImageFilter)
-{
-    M3G_DO_LOCK
-    m3gSetFiltering((M3GTexture)aHTexture2D, aLevelFilter, aImageFilter);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getBlendColor
-(JNIEnv* aEnv, jclass, jint aHTexture2D)
-{
-    M3G_DO_LOCK
-    jint color = (jint)m3gGetBlendColor((M3GTexture)aHTexture2D);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Texture2D__1setBlendColor
-(JNIEnv* aEnv, jclass, jint aHTexture2D, jint aRGB)
-{
-    M3G_DO_LOCK
-    m3gSetBlendColor((M3GTexture)aHTexture2D, aRGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aHImage)
-{
-    M3G_DO_LOCK
-    jint handle = (M3Guint)m3gCreateTexture((M3GInterface)aM3g, (M3GImage)aHImage);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Texture2D__1setWrapping
-(JNIEnv* aEnv, jclass, jint aHTexture2D, jint aWrapS, jint aWrapT)
-{
-    M3G_DO_LOCK
-    m3gSetWrapping((M3GTexture)aHTexture2D, aWrapS, aWrapT);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Texture2D__1setImage
-(JNIEnv* aEnv, jclass, jint aHTex, jint aHImg)
-{
-    M3G_DO_LOCK
-    m3gSetTextureImage((M3GTexture)aHTex, (M3GImage)aHImg);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Texture2D__1setBlending
-(JNIEnv* aEnv, jclass, jint aHTexture2D, jint aFunc)
-{
-    M3G_DO_LOCK
-    m3gTextureSetBlending((M3GTexture)aHTexture2D, aFunc);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getImage
-(JNIEnv* aEnv, jclass, jint aHTex)
-{
-    M3G_DO_LOCK
-    jint image = (M3Guint) m3gGetTextureImage((M3GTexture)aHTex);
-    M3G_DO_UNLOCK(aEnv)
-    return image;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getImageFilter
-(JNIEnv* aEnv, jclass, jint aHTex)
-{
-    M3Gint levelFilter = 0;
-    M3Gint imageFilter = 0;
-    M3G_DO_LOCK
-    m3gGetFiltering((M3GTexture)aHTex, &levelFilter, &imageFilter);
-    M3G_DO_UNLOCK(aEnv)
-    return (jint)imageFilter;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Texture2D__1getLevelFilter
-(JNIEnv* aEnv, jclass, jint aHTex)
-{
-    M3Gint levelFilter = 0;
-    M3Gint imageFilter = 0;
-    M3G_DO_LOCK
-    m3gGetFiltering((M3GTexture)aHTex, &levelFilter, &imageFilter);
-    M3G_DO_UNLOCK(aEnv)
-    return (jint)levelFilter;
-}
--- a/javauis/m3g_qt/src/jni/transform.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,367 +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:
-*
-*/
-#include "javax_microedition_m3g_Transform.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1transformArray
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jint aHArray, jfloatArray aOutArray, jboolean aW)
-{
-    // null pointers are never passed
-    Matrix* matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    jfloat* outArray = aEnv->GetFloatArrayElements(aOutArray, NULL);
-    if (outArray == NULL)
-    {
-        aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    int outArrayLen = aEnv->GetArrayLength(aOutArray);
-
-    M3G_DO_LOCK
-    m3gTransformArray((M3GVertexArray)aHArray, matrix, (M3Gfloat *)outArray, outArrayLen, (M3Gbool)aW);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-    aEnv->ReleaseFloatArrayElements(aOutArray, outArray, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1rotateQuat
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloat aQx, jfloat aQy, jfloat aQz, jfloat aQw)
-{
-    M3GQuat quat;
-    Matrix* matrix = NULL;
-
-    if (aQx == 0 && aQy == 0 && aQz == 0 && aQw == 0)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return;
-    }
-
-    matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    quat.x = aQx;
-    quat.y = aQy;
-    quat.z = aQz;
-    quat.w = aQw;
-
-    M3G_DO_LOCK
-    m3gNormalizeQuat(&quat);
-    m3gPostRotateMatrixQuat(matrix, (const Quat *)&quat);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1setIdentity
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix)
-{
-    Matrix* matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-    M3G_DO_LOCK
-    m3gIdentityMatrix(matrix);
-    M3G_DO_UNLOCK(aEnv)
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1translate
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloat aTx, jfloat aTy, jfloat aTz)
-{
-    Matrix* matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-    M3G_DO_LOCK
-    m3gPostTranslateMatrix(matrix, aTx, aTy, aTz);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1getMatrix
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloatArray aDstArray)
-{
-    Matrix *matrix = NULL;
-
-    if (aDstArray == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return;
-    }
-
-    if (aEnv->GetArrayLength(aDstArray) < 16)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return;
-    }
-
-    matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    float* dstArray = (float*)(aEnv->GetFloatArrayElements(aDstArray, NULL));
-    if (dstArray == NULL)
-    {
-        aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3G_DO_LOCK
-    m3gGetMatrixRows(matrix, dstArray);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-    aEnv->ReleaseFloatArrayElements(aDstArray, dstArray, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1transformTable
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloatArray aTableArray)
-{
-    // null pointers are never passed
-    M3Gfloat *v = (M3Gfloat *)(aEnv->GetFloatArrayElements(aTableArray, NULL));
-    if (v == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-    int tabelArrayLen = aEnv->GetArrayLength(aTableArray);
-    Matrix* matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        aEnv->ReleaseFloatArrayElements(aTableArray, v, JNI_ABORT);
-
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    {
-        M3Gint i;
-        M3GVec4 vec;
-
-        M3G_DO_LOCK
-        for (i = 0; i < tabelArrayLen; i += 4)
-        {
-            m3gSetVec4(&vec, v[i + 0], v[i + 1], v[i + 2], v[i + 3]);
-            m3gTransformVec4(matrix, &vec);
-            v[i + 0] = vec.x;
-            v[i + 1] = vec.y;
-            v[i + 2] = vec.z;
-            v[i + 3] = vec.w;
-        }
-        M3G_DO_UNLOCK(aEnv)
-    }
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-    aEnv->ReleaseFloatArrayElements(aTableArray, v, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1scale
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloat aSx, jfloat aSy, jfloat aSz)
-{
-    Matrix* matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3G_DO_LOCK
-    m3gPostScaleMatrix(matrix, aSx, aSy, aSz);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1mul
-(JNIEnv* aEnv, jclass, jbyteArray aProdArray, jbyteArray aLeftArray, jbyteArray aRightArray)
-{
-
-    if (aRightArray == NULL || aLeftArray == NULL || aProdArray == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return;
-    }
-
-    {
-        const Matrix *right = (const Matrix *)(aEnv->GetByteArrayElements(aRightArray, NULL));
-        if (right == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        const Matrix *left = (const Matrix *)(aEnv->GetByteArrayElements(aLeftArray, NULL));
-        if (left == NULL)
-        {
-            aEnv->ReleaseByteArrayElements(aRightArray, (jbyte*)right, JNI_ABORT);
-
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        Matrix *prod = (Matrix *)(aEnv->GetByteArrayElements(aProdArray, NULL));
-        if (prod == NULL)
-        {
-            aEnv->ReleaseByteArrayElements(aRightArray, (jbyte*)right, JNI_ABORT);
-            aEnv->ReleaseByteArrayElements(aLeftArray, (jbyte*)left, JNI_ABORT);
-
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        Matrix temp;
-        M3G_DO_LOCK
-        m3gMatrixProduct(&temp, left, right);
-        M3G_DO_UNLOCK(aEnv)
-
-        *prod = temp;
-
-        aEnv->ReleaseByteArrayElements(aRightArray, (jbyte*)right, JNI_ABORT);
-        aEnv->ReleaseByteArrayElements(aLeftArray, (jbyte*)left, JNI_ABORT);
-        aEnv->ReleaseByteArrayElements(aProdArray, (jbyte*)prod, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1setMatrix
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloatArray aSrcArray)
-{
-    Matrix *matrix = NULL;
-
-    if (aSrcArray == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return;
-    }
-    if (aEnv->GetArrayLength(aSrcArray) < 16)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return;
-    }
-
-    matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    float* srcArray = aEnv->GetFloatArrayElements(aSrcArray, NULL);
-    if (srcArray == NULL)
-    {
-        aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3G_DO_LOCK
-    m3gSetMatrixRows(matrix, (const float *)srcArray);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseFloatArrayElements(aSrcArray, srcArray, JNI_ABORT);
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1transpose
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix)
-{
-    Matrix tpos;
-    Matrix *matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-    M3G_DO_LOCK
-    m3gMatrixTranspose(&tpos, matrix);
-    m3gCopyMatrix(matrix, &tpos);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1invert
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix)
-{
-    Matrix *matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3G_BEGIN_PROFILE(M3G_PROFILE_TRANSFORM_INVERT);
-    M3G_DO_LOCK
-    if (!m3gInvertMatrix(matrix))
-    {
-        aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, JNI_ABORT);
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/ArithmeticException");
-        M3G_DO_UNLOCK(aEnv)
-        return;
-    }
-    M3G_DO_UNLOCK(aEnv)
-    M3G_END_PROFILE(M3G_PROFILE_TRANSFORM_INVERT);
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transform__1rotate
-(JNIEnv* aEnv, jclass, jbyteArray aMatrix, jfloat aAngle, jfloat aAx, jfloat aAy, jfloat aAz)
-{
-    Matrix *matrix = NULL;
-
-    if (aAx == 0 && aAy == 0 && aAz == 0 && aAngle != 0)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return;
-    }
-
-    matrix = (Matrix *)(aEnv->GetByteArrayElements(aMatrix, NULL));
-    if (matrix == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-        return;
-    }
-
-    M3G_DO_LOCK
-    m3gPostRotateMatrix(matrix, aAngle, aAx, aAy, aAz);
-    M3G_DO_UNLOCK(aEnv)
-
-    aEnv->ReleaseByteArrayElements(aMatrix, (jbyte*)matrix, 0);
-}
--- a/javauis/m3g_qt/src/jni/transformable.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +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:
-*
-*/
-
-#include "javax_microedition_m3g_Transformable.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1preRotate
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aAngle, jfloat aAx, jfloat aAy, jfloat aAz)
-{
-    M3G_DO_LOCK
-    m3gPreRotate((M3GTransformable)aHandle, aAngle, aAx, aAy, aAz);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1getComposite
-(JNIEnv* aEnv, jclass, jint aHandle, jbyteArray aDstArray)
-{
-    if (validateArray(aEnv, aDstArray, sizeof(M3GMatrix)))
-    {
-        jbyte* dstArray = aEnv->GetByteArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-
-        M3G_DO_LOCK
-        m3gGetCompositeTransform((M3GTransformable)aHandle, (M3GMatrix *)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseByteArrayElements(aDstArray, dstArray, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1setTransform
-(JNIEnv* aEnv, jclass, jint aHandle, jbyteArray aSrcArray)
-{
-    if (aSrcArray != NULL)
-    {
-        jbyte* srcArray = aEnv->GetByteArrayElements(aSrcArray, NULL);
-        if (srcArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-        M3G_DO_LOCK
-        m3gSetTransform((M3GTransformable)aHandle, (const M3GMatrix *)srcArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseByteArrayElements(aSrcArray, srcArray, JNI_ABORT);
-    }
-    else
-    {
-        M3G_DO_LOCK
-        m3gSetTransform((M3GTransformable)aHandle, NULL);
-        M3G_DO_UNLOCK(aEnv)
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1setTranslation
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aTx, jfloat aTy, jfloat aTz, jboolean aAbsolute)
-{
-
-    if (aAbsolute)
-    {
-        M3G_DO_LOCK
-        m3gSetTranslation((M3GTransformable)aHandle, aTx, aTy, aTz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-    else
-    {
-        M3G_DO_LOCK
-        m3gTranslate((M3GTransformable)aHandle, aTx, aTy, aTz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1setOrientation
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aAngle, jfloat aAx, jfloat aAy, jfloat aAz, jboolean aAbsolute)
-{
-
-    if (aAbsolute)
-    {
-        M3G_DO_LOCK
-        m3gSetOrientation((M3GTransformable)aHandle, aAngle, aAx, aAy, aAz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-    else
-    {
-        M3G_DO_LOCK
-        m3gPostRotate((M3GTransformable)aHandle, aAngle, aAx, aAy, aAz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1getTransform
-(JNIEnv* aEnv, jclass, jint aHandle, jbyteArray aDstArray)
-{
-    if (validateArray(aEnv, aDstArray, sizeof(M3GMatrix)))
-    {
-        jbyte* dstArray = aEnv->GetByteArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-        M3G_DO_LOCK
-        m3gGetTransform((M3GTransformable)aHandle, (M3GMatrix *)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseByteArrayElements(aDstArray, dstArray, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1setScale
-(JNIEnv* aEnv, jclass, jint aHandle, jfloat aSx, jfloat aSy, jfloat aSz, jboolean aAbsolute)
-{
-
-    if (aAbsolute)
-    {
-        M3G_DO_LOCK
-        m3gSetScale((M3GTransformable)aHandle, aSx, aSy, aSz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-    else
-    {
-        M3G_DO_LOCK
-        m3gScale((M3GTransformable)aHandle, aSx, aSy, aSz);
-        M3G_DO_UNLOCK(aEnv)
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1getTranslation
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aDstArray)
-{
-    if (validateArray(aEnv, (jbyteArray)aDstArray, 3))
-    {
-        jfloat* dstArray = aEnv->GetFloatArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-        M3G_DO_LOCK
-        m3gGetTranslation((M3GTransformable)aHandle, (M3Gfloat*)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseFloatArrayElements(aDstArray, dstArray, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1getScale
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aDstArray)
-{
-    if (validateArray(aEnv, (jbyteArray)aDstArray, 3))
-    {
-        jfloat* dstArray = aEnv->GetFloatArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-        M3G_DO_LOCK
-        m3gGetScale((M3GTransformable)aHandle, (M3Gfloat*)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseFloatArrayElements(aDstArray, dstArray, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_Transformable__1getOrientation
-(JNIEnv* aEnv, jclass, jint aHandle, jfloatArray aDstArray)
-{
-    if (validateArray(aEnv, (jbyteArray)aDstArray, 4))
-    {
-        jfloat* dstArray = aEnv->GetFloatArrayElements(aDstArray, NULL);
-        if (dstArray == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-        M3G_DO_LOCK
-        m3gGetOrientation((M3GTransformable)aHandle, (M3Gfloat*)dstArray);
-        M3G_DO_UNLOCK(aEnv)
-        aEnv->ReleaseFloatArrayElements(aDstArray, dstArray, 0);
-    }
-}
--- a/javauis/m3g_qt/src/jni/triangleStripArray.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +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:
-*
-*/
-#include "javax_microedition_m3g_TriangleStripArray.h"
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_TriangleStripArray__1createImplicit
-(JNIEnv* aEnv, jclass, jint aM3g, jint first, jintArray aLengthArray)
-{
-    M3GIndexBuffer buffer;
-
-    int *lengths = NULL;
-    if (aLengthArray)
-    {
-        lengths = (int *)(aEnv->GetIntArrayElements(aLengthArray, NULL));
-        if (lengths == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    int count = aLengthArray != NULL ? aEnv->GetArrayLength(aLengthArray) : 0;
-
-    M3G_DO_LOCK
-    buffer = m3gCreateImplicitStripBuffer((M3GInterface)aM3g,
-                                          count,
-                                          lengths,
-                                          first);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (lengths)
-    {
-        aEnv->ReleaseIntArrayElements(aLengthArray, lengths, JNI_ABORT);
-    }
-
-    return (M3Guint) buffer;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_TriangleStripArray__1createExplicit
-(JNIEnv* aEnv, jclass, jint aM3g, jintArray aIndices, jintArray aLengths)
-{
-    M3GIndexBuffer buffer;
-
-
-    jint* lengths = NULL;
-    jint* indices = NULL;
-    if (aLengths)
-    {
-        lengths = aEnv->GetIntArrayElements(aLengths, NULL);
-        if (lengths == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    if (aIndices)
-    {
-        indices = aEnv->GetIntArrayElements(aIndices, NULL);
-        if (indices == NULL)
-        {
-            if (lengths)
-            {
-                aEnv->ReleaseIntArrayElements(aLengths, lengths, JNI_ABORT);
-            }
-
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-    M3G_DO_LOCK
-    buffer = m3gCreateStripBuffer((M3GInterface)aM3g,
-                                  M3G_TRIANGLE_STRIPS,
-                                  aLengths != NULL ? aEnv->GetArrayLength(aLengths) : 0,
-                                  (M3Gsizei *)lengths,
-                                  M3G_INT,
-                                  aIndices != NULL ? aEnv->GetArrayLength(aIndices) : 0,
-                                  (void *)indices);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (indices)
-    {
-        aEnv->ReleaseIntArrayElements(aIndices, indices, JNI_ABORT);
-    }
-    if (lengths)
-    {
-        aEnv->ReleaseIntArrayElements(aLengths, lengths, JNI_ABORT);
-    }
-
-    return (M3Guint) buffer;
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_TriangleStripArray__1getIndexCount
-(JNIEnv* aEnv, jclass, jint aHTsa)
-{
-    M3G_DO_LOCK
-    jint size = (jint)m3gGetBatchSize((M3GIndexBuffer)aHTsa, 0);
-    M3G_DO_UNLOCK(aEnv)
-    return size;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_TriangleStripArray__1getIndices
-(JNIEnv* aEnv, jclass, jint aHTsa, jintArray aIndices)
-{
-    jint* indices = NULL;
-
-    if (aIndices)
-    {
-        indices = aEnv->GetIntArrayElements(aIndices, NULL);
-        if (indices == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-    M3G_DO_LOCK
-    m3gGetBatchIndices((M3GIndexBuffer)aHTsa, 0, indices);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (indices)
-    {
-        aEnv->ReleaseIntArrayElements(aIndices, indices, 0);
-    }
-}
--- a/javauis/m3g_qt/src/jni/vertexArray.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +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:
-*
-*/
-#include "javax_microedition_m3g_VertexArray.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexArray__1setShort
-(JNIEnv* aEnv, jclass, jint aHandle, jint aFirst, jint aCount, jshortArray aSrcArray)
-{
-    int srcLength = 0;
-    unsigned short *srcData = NULL;
-    if (aSrcArray)
-    {
-        srcData = (unsigned short *)aEnv->GetShortArrayElements(aSrcArray, NULL);
-        if (srcData == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    srcLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    M3G_DO_LOCK
-    m3gSetVertexArrayElements(
-        (M3GVertexArray) aHandle, aFirst, aCount, srcLength, M3G_SHORT, srcData);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aSrcArray)
-    {
-        aEnv->ReleaseShortArrayElements(aSrcArray, (jshort*)srcData, JNI_ABORT);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexArray__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g, jint aNumVertices, jint aNumComponents, jint aComponentSize)
-{
-    M3G_DO_LOCK
-    M3GVertexArray va = m3gCreateVertexArray((M3GInterface)aM3g,
-                        aNumVertices,
-                        aNumComponents,
-                        (aComponentSize == 1) ? M3G_BYTE :
-                        (aComponentSize == 2) ? M3G_SHORT :
-                        M3G_INT);
-    M3G_DO_UNLOCK(aEnv)
-    return (M3Guint) va;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexArray__1setByte
-(JNIEnv* aEnv, jclass, jint aHandle, jint aFirst, jint aCount, jbyteArray aSrcArray)
-{
-    int srcLength = 0;
-    unsigned char *srcData = NULL;
-    if (aSrcArray)
-    {
-        srcData = (unsigned char *)aEnv->GetByteArrayElements(aSrcArray, NULL);
-        if (srcData == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    srcLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    if (validateArray(aEnv, aSrcArray, aCount))
-    {
-        M3G_DO_LOCK
-        m3gSetVertexArrayElements(
-            (M3GVertexArray) aHandle, aFirst, aCount, srcLength, M3G_BYTE, srcData);
-        M3G_DO_UNLOCK(aEnv)
-    }
-
-    if (aSrcArray)
-    {
-        aEnv->ReleaseByteArrayElements(aSrcArray, (jbyte*)srcData, JNI_ABORT);
-    }
-}
-
-/* M3G 1.1 JNI Calls */
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexArray__1getByte
-(JNIEnv* aEnv, jclass, jint aHandle, jint aFirstVertex, jint aNumVertices, jbyteArray aSrcArray)
-{
-    int dstLength = 0;
-    unsigned char *dstData = NULL;
-    if (aSrcArray)
-    {
-        dstData = (unsigned char *)aEnv->GetByteArrayElements(aSrcArray, NULL);
-        if (dstData == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    dstLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    /*
-    * Parameter checking and exception throwing is handled in engine side, thus no
-    * checking / validation is done here.
-    */
-    M3G_DO_LOCK
-    m3gGetVertexArrayElements((M3GVertexArray) aHandle, aFirstVertex, aNumVertices, dstLength, M3G_BYTE, dstData);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aSrcArray)
-    {
-        /* copy dstData array to java side and release both arrays */
-        aEnv->ReleaseByteArrayElements(aSrcArray, (jbyte*)dstData, 0);
-    }
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexArray__1getShort
-(JNIEnv* aEnv, jclass, jint aHandle, jint aFirstVertex, jint aNumVertices, jshortArray aSrcArray)
-{
-    int dstLength = 0;
-    unsigned short *dstData = NULL;
-    if (aSrcArray)
-    {
-        dstData = (unsigned short *)aEnv->GetShortArrayElements(aSrcArray, NULL);
-        if (dstData == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    dstLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    /*
-    * Parameter checking and exception throwing is handled in engine side, thus no
-    * checking / validation is done here.
-    */
-    M3G_DO_LOCK
-    m3gGetVertexArrayElements((M3GVertexArray) aHandle, aFirstVertex, aNumVertices, dstLength, M3G_SHORT, dstData);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aSrcArray)
-    {
-        /* copy dstData array to java side and release both arrays */
-        aEnv->ReleaseShortArrayElements(aSrcArray, (jshort*)dstData, 0);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexArray__1getComponentCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3Gsizei size;
-    M3G_DO_LOCK
-    m3gGetVertexArrayParams((M3GVertexArray)aHandle, NULL, &size, NULL, NULL);
-    M3G_DO_UNLOCK(aEnv)
-    return (jint)size;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexArray__1getComponentType
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3Gdatatype type;
-    M3G_DO_LOCK
-    m3gGetVertexArrayParams((M3GVertexArray)aHandle, NULL, NULL, &type, NULL);
-    M3G_DO_UNLOCK(aEnv)
-    type = (type == M3G_BYTE) ? (M3Gdatatype) 1 : (M3Gdatatype) 2;
-    return (jint)type;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexArray__1getVertexCount
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3Gsizei count;
-    M3G_DO_LOCK
-    m3gGetVertexArrayParams((M3GVertexArray)aHandle, &count, NULL, NULL, NULL);
-    M3G_DO_UNLOCK(aEnv)
-    return (jint)count;
-}
--- a/javauis/m3g_qt/src/jni/vertexBuffer.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +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:
-*
-*/
-
-#include "javax_microedition_m3g_VertexBuffer.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexBuffer__1setTexCoords
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aTexUnit, jint aHArray, jfloat aScale, jfloatArray aSrcArray)
-{
-    int biasLength = 0;
-    float *bias = NULL;
-    if (aSrcArray)
-    {
-        bias = (float *)aEnv->GetFloatArrayElements(aSrcArray, NULL);
-        if (bias == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    biasLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    M3G_DO_LOCK
-    m3gSetTexCoordArray((M3GVertexBuffer)aHBuffer, aTexUnit, (M3GVertexArray)aHArray, aScale, bias, biasLength);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aSrcArray)
-    {
-        aEnv->ReleaseFloatArrayElements(aSrcArray, bias, JNI_ABORT);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexBuffer__1getArray
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aWhich, jfloatArray aDstArray)
-{
-    int dstLength = 0;
-    float *dstData = NULL;
-    if (aDstArray)
-    {
-        dstData = (float *)aEnv->GetFloatArrayElements(aDstArray, NULL);
-        if (dstData == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return 0;
-        }
-    }
-
-    dstLength = aDstArray ? aEnv->GetArrayLength(aDstArray) : 0;
-
-    M3G_DO_LOCK
-    M3Guint ret = (M3Guint)m3gGetVertexArray((M3GVertexBuffer)aHBuffer, aWhich, dstData, dstLength);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aDstArray)
-    {
-        aEnv->ReleaseFloatArrayElements(aDstArray, dstData, 0);
-    }
-
-    return ret;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexBuffer__1getDefaultColor
-(JNIEnv* aEnv, jclass, jint aHBuffer)
-{
-    M3G_DO_LOCK
-    jint color = (M3Guint)m3gGetVertexDefaultColor((M3GVertexBuffer)aHBuffer);
-    M3G_DO_UNLOCK(aEnv)
-    return color;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexBuffer__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    M3GVertexBuffer vb = m3gCreateVertexBuffer((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return (M3Guint) vb;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexBuffer__1setNormals
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aHArray)
-{
-    M3G_DO_LOCK
-    m3gSetNormalArray((M3GVertexBuffer) aHBuffer, (M3GVertexArray) aHArray);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexBuffer__1setDefaultColor
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aARGB)
-{
-    M3G_DO_LOCK
-    m3gSetVertexDefaultColor((M3GVertexBuffer)aHBuffer, aARGB);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexBuffer__1setColors
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aHArray)
-{
-    M3G_DO_LOCK
-    m3gSetColorArray((M3GVertexBuffer) aHBuffer, (M3GVertexArray) aHArray);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_VertexBuffer__1setVertices
-(JNIEnv* aEnv, jclass, jint aHBuffer, jint aHArray, jfloat aScale, jfloatArray aSrcArray)
-{
-    int biasLength = 0;
-    float *bias = NULL;
-    if (aSrcArray)
-    {
-        bias = (float *)aEnv->GetFloatArrayElements(aSrcArray, NULL);
-        if (bias == NULL)
-        {
-            M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
-            return;
-        }
-    }
-
-    biasLength = aSrcArray ? aEnv->GetArrayLength(aSrcArray) : 0;
-
-    M3G_DO_LOCK
-    m3gSetVertexArray((M3GVertexBuffer)aHBuffer, (M3GVertexArray)aHArray, aScale, bias, biasLength);
-    M3G_DO_UNLOCK(aEnv)
-
-    if (aSrcArray)
-    {
-        aEnv->ReleaseFloatArrayElements(aSrcArray, bias, JNI_ABORT);
-    }
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_VertexBuffer__1getVertexCount
-(JNIEnv* aEnv, jclass, jint aHBuffer)
-{
-    M3G_DO_LOCK
-    jint count = (M3Guint)m3gGetVertexCount((M3GVertexBuffer)aHBuffer);
-    M3G_DO_UNLOCK(aEnv)
-    return count;
-}
--- a/javauis/m3g_qt/src/jni/world.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +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:
-*
-*/
-
-#include "javax_microedition_m3g_World.h"
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_World__1setBackground
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHBackground)
-{
-    M3G_DO_LOCK
-    m3gSetBackground((M3GWorld)aHandle, (M3GBackground)aHBackground);
-    M3G_DO_UNLOCK(aEnv)
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1ctor
-(JNIEnv* aEnv, jclass, jint aM3g)
-{
-    M3G_DO_LOCK
-    jint handle = (M3Guint)m3gCreateWorld((M3GInterface)aM3g);
-    M3G_DO_UNLOCK(aEnv)
-    return handle;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1getBackground
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint bg = (M3Guint)m3gGetBackground((M3GWorld)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return bg;
-}
-
-JNIEXPORT jint JNICALL Java_javax_microedition_m3g_World__1getActiveCamera
-(JNIEnv* aEnv, jclass, jint aHandle)
-{
-    M3G_DO_LOCK
-    jint camera = (M3Guint)m3gGetActiveCamera((M3GWorld)aHandle);
-    M3G_DO_UNLOCK(aEnv)
-    return camera;
-}
-
-JNIEXPORT void JNICALL Java_javax_microedition_m3g_World__1setActiveCamera
-(JNIEnv* aEnv, jclass, jint aHandle, jint aHCamera)
-{
-    M3G_DO_LOCK
-    m3gSetActiveCamera((M3GWorld)aHandle, (M3GCamera)aHCamera);
-    M3G_DO_UNLOCK(aEnv)
-}
--- a/javauis/m3g_qt/src/m3g_jsr184.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2003 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:
-*
-*/
-
-
-/*!
- * \file \brief Global methods for JSR-184
- *
- * This file is <em>included</em>, not linked, by specific VM bindings.
- *
- */
-
-#ifndef M3G_JAVA_INCLUDE
-#   error included by m3g_<platform>_java_api.c; do not compile separately.
-#endif
-
-#include <m3g/m3g_core.h>
-#include "m3g_jsr184.h"
-
-/*----------------------------------------------------------------------
- * Internal functions
- *--------------------------------------------------------------------*/
-
-/*!
- * \brief Returns the number of bytes per pixel for a JSR-184 pixel
- * format
- *
- * \note Dependent on constants in Image2D.java
- */
-static M3Guint jsr184BytesPerPixel(int jsrFormat)
-{
-    switch (jsrFormat)
-    {
-    case M3G_ALPHA:
-        return 1;
-    case M3G_LUMINANCE:
-        return 1;
-    case M3G_LUMINANCE_ALPHA:
-        return 2;
-    case M3G_RGB:
-        return 3;
-    case M3G_RGBA:
-        return 4;
-    default:
-        return 0;
-    }
-}
-
-/*!
- * \brief Returns m3g core pixel format for qiven Qt based pixel format
- *
- */
-static M3GPixelFormat mapQtPixelformat(int qtFormat)
-{
-    switch (qtFormat)
-    {
-    case QImage::Format_RGB32:
-    case QImage::Format_ARGB32:
-        return M3G_ARGB8;
-    case QImage::Format_RGB888:
-        return M3G_RGB8;
-    case QImage::Format_RGB444:
-        return M3G_RGB4;
-    case QImage::Format_RGB16:
-        return M3G_RGB565;
-    default:
-        return M3G_NO_FORMAT;
-    }
-}
-
-
-/*!
- * \brief Return a MIDP exception string corresponding to an M3G error
- */
-static const char *jsr184Exception(M3Genum errorCode)
-{
-    switch (errorCode)
-    {
-    case M3G_NO_ERROR:
-        return NULL;
-    case M3G_OUT_OF_MEMORY:
-        return "java/lang/OutOfMemoryError";
-    case M3G_INVALID_OPERATION:
-        return "java/lang/IllegalStateException";
-    case M3G_INVALID_INDEX:
-        return "java/lang/IndexOutOfBoundsException";
-    case M3G_NULL_POINTER:
-        return "java/lang/NullPointerException";
-    case M3G_ARITHMETIC_ERROR:
-        return "java/lang/ArithmeticException";
-    case M3G_IO_ERROR:
-        return "java/io/IOException";
-    default:
-        return "java/lang/IllegalArgumentException";
-    }
-}
--- a/javauis/m3g_qt/src/m3g_kvm_api.inl	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2003 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:
-*
-*/
-
-
-/*!
- * \file \brief Java bindings for the K Virtual Machine native API
- *
- */
-
-
-
-#ifndef M3G_JAVA_INCLUDE
-#   error included by m3g_<platform>_java_api.c; do not compile separately.
-#endif
-
-/*!
- * \brief Macros for dispatching exceptions to vm.
- *
- */
-#include <jni.h>
-#define M3G_RAISE_EXCEPTION(aEnv, aException){\
-                 if (aEnv != NULL){\
-                jclass jException = aEnv->FindClass(aException);\
-                if (jException != NULL){\
-                    aEnv->ThrowNew(jException, NULL);\
-         }}}\
- 
-
-/*!
- * \brief Macros for serializing m3gcore function calls 
- * in native threading environment.
- */
-#include "CSynchronization.h"
-#define M3G_DO_LOCK CSynchronization::InstanceL()->Lock();
-#define M3G_DO_UNLOCK(aEnv) {\
-                    TInt errorCode = CSynchronization::InstanceL()->GetErrorCode();\
-                    if ( errorCode != 0){\
-                            M3G_RAISE_EXCEPTION(aEnv, jsr184Exception(errorCode));\
-                    }\
-                    CSynchronization::InstanceL()->Unlock();\
-                    }\
- 
-
-/*----------------------------------------------------------------------
- * Internal data types
- *--------------------------------------------------------------------*/
-
-
-
-/*----------------------------------------------------------------------
- * Internal utility functions
- *--------------------------------------------------------------------*/
-
-/*!
- * \brief Checks that a Java array is non-null and meets a minimum
- * length requirement
- *
- * Throws NullPointerException or IllegalArgumentException if
- * constraints violated.
- */
-static M3Gbool validateArray(JNIEnv* aEnv, const jbyteArray aArray, M3Gsizei aMinLength)
-{
-    if (aArray == NULL)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/NullPointerException");
-        return M3G_FALSE;
-    }
-
-    if (aEnv->GetArrayLength(aArray) < aMinLength)
-    {
-        M3G_RAISE_EXCEPTION(aEnv, "java/lang/IllegalArgumentException");
-        return M3G_FALSE;
-    }
-
-    return M3G_TRUE;
-}
-
-#include "m3g_jsr184.inl"
-#include "jni/triangleStripArray.inl"
-#include "jni/vertexBuffer.inl"
-#include "jni/fog.inl"
-#include "jni/polygonMode.inl"
-#include "jni/object3d.inl"
-#include "jni/node.inl"
-#include "jni/group.inl"
-#include "jni/skinnedMesh.inl"
-#include "jni/camera.inl"
-#include "jni/vertexArray.inl"
-#include "jni/transform.inl"
-#include "jni/graphics3d.inl"
-#include "jni/platform.inl"
-#include "jni/compositingMode.inl"
-#include "jni/world.inl"
-#include "jni/material.inl"
-#include "jni/keyframeSequence.inl"
-#include "jni/sprite3d.inl"
-#include "jni/mesh.inl"
-#include "jni/animationTrack.inl"
-#include "jni/texture2d.inl"
-#include "jni/morphingMesh.inl"
-#include "jni/transformable.inl"
-#include "jni/background.inl"
-#include "jni/image2d.inl"
-#include "jni/appearance.inl"
-#include "jni/light.inl"
-#include "jni/animationController.inl"
-#include "jni/interface.inl"
-#include "jni/loader.inl"
-
--- a/javauis/m3g_qt/src/m3g_symbian_java_api.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2003 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:
-*
-*/
-
-
-/*!
- * \file \brief Symbian Java bindings
- *
- */
-
-#include <M3G/m3g_core.h> // Please check if this header is needed
-
-#include <jni.h>
-
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include "graphics.h"
-#include <QDebug>
-//#include "gdi.h" // CFbsBitmap
-#include "fbs.h"
-
-#include <GLES/egl.h>
-
-struct ImageStruct
-{
-    CFbsBitmap* color;
-    CFbsBitmap* mask;
-};
-
-
-
-#define M3G_ASSERT(a)           ((void)(a))
-#define M3G_BEGIN_PROFILE(a)    ((void)(a))
-#define M3G_END_PROFILE(a)      ((void)(a))
-
-#define Matrix  M3GMatrix
-#define Quat    M3GQuat
-#define Vec4    M3GVec4
-
-#define M3G_JAVA_INCLUDE
-extern "C"
-{
-#include "m3g_kvm_api.inl"
-}
-#undef M3G_JAVA_INCLUDE
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_akn/baseline/inc.dsa/cmmacamerawindow.h	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,356 @@
+/*
+* 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:  This class implements MMMADisplayWindow functionality
+*                for Camera viewfinder usage.
+*
+*/
+
+
+#ifndef CMMACAMERAWINDOW_H
+#define CMMACAMERAWINDOW_H
+
+//  INCLUDES
+#include <ecam.h>
+#include <reflcdui.h>
+#include <w32std.h>
+#include "mmmadisplaywindow.h"
+#include "mmmadisplay.h"
+//  CONSTANTS
+
+//  FORWARD DECLARATIONS
+class CFbsBitmap;
+class RWsSession;
+class CWsScreenDevice;
+class RWindowBase;
+class MMMADisplay;
+
+//  CLASS DECLARATION
+/**
+* This class implements MMMADisplayWindow functionality
+* to use with CMMACameraPlayer.
+* It duplicates its camera instance within the UI thread
+* and displays the viewfinder using the UI
+* DirectScreenAccess resources.
+*
+* @since S60 v5.0
+*/
+
+
+NONSHARABLE_CLASS(CMMACameraWindow): public CBase,
+        public MMMADisplayWindow,
+        public MCameraObserver,
+        public MUiEventConsumer,
+        public MDirectScreenAccess
+{
+public:
+    enum TUiCallbackType
+    {
+        EDeleteViewFinder = 1,
+        EHideViewFinder,
+        EShowViewFinder,
+        EResetViewFinder,
+        EDestroyWindow
+    };
+
+    /**
+     * Two-phased constructor.
+     *
+     * @param  aCameraHandle A handle to existing CCamera instance.
+     */
+    static CMMACameraWindow* NewL(TInt aCameraHandle);
+
+
+    /**
+     * Destructor.
+     */
+    ~CMMACameraWindow();
+
+    /**
+     * Gets an information if the DirectViewFinder is started
+     *
+     * @since  S60 v5.0
+     * @return ETrue if DirectViewFinder is active
+     */
+    TBool ViewFinderActive();
+
+    /**
+     * Notifies window about Started state change
+     *
+     * @since S60 v5.0
+     * @param aStarted Indicates that camera player is in started state
+     */
+    void SetStarted(TBool aStarted);
+
+    /**
+     * Sets iDisplay
+     * Used to invoke callbacks in UI thread
+     *
+     * @since  S60 v5.0
+     * @param "aDisplay" A Display to be used for callbacks.
+     *         When set, the duplicated CCamera is created in UI thread
+     *         and the necessary DSA resources are got.
+     *         When replacing an old Display (set earlier)
+     *         all the old resources are deleted.
+     *         NULL deletes all allocated UI resources.
+     */
+    void SetDisplay(MMMADisplay *aDisplay);
+
+
+// from base class MMMADisplayWindow
+    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
+    void DrawFrameL(const CFbsBitmap* aBitmap);
+    void SetDrawRect(const TRect& aRect);
+    void SetDrawRectThread(const TRect& aRect);
+    const TRect& DrawRect();
+    TSize WindowSize();
+    void SetPosition(const TPoint& aPosition);
+    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
+    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
+    const TRect& WindowRect();
+    TDisplayWindowType GetDisplayWindowType() const;
+    TBool IsVisible() const;
+    void ContainerSet();
+    void ContainerDestroyed();
+
+
+// from base class MCameraObserver
+    void ReserveComplete(TInt aError);
+    void PowerOnComplete(TInt aError);
+    void ViewFinderFrameReady(CFbsBitmap& aFrame);
+
+    void ImageReady(CFbsBitmap* aBitmap,
+                    HBufC8* aData,
+                    TInt aError);
+
+    void FrameBufferReady(MFrameBuffer* aFrameBuffer,
+                          TInt aError);
+
+
+// from base class MUiEventConsumer
+    void MdcDSAResourcesCallback(
+        RWsSession &aWs,
+        CWsScreenDevice &aScreenDevice,
+        RWindowBase &aWindow);
+    void MdcUICallback(TInt aCallbackId);
+
+
+// from base class MDirectScreenAccess
+    void AbortNow(RDirectScreenAccess::TTerminationReasons aReasons);
+    void Restart(RDirectScreenAccess::TTerminationReasons aReasons);
+
+
+private:
+    /**
+     * Constructor.
+     * @see CMMACameraWindow::NewL()
+     */
+    CMMACameraWindow(TInt aCameraIndex);
+
+    /**
+     * Creates UI Camera -
+     * a new CCamera instance (duplicated from handle
+     * given to the constructor)
+     * Have to be called from the thread which UI Camera
+     * will be controlled from
+     *
+     * @since  S60 v5.0
+     * @param "aWs" WS session from the last MdcDSAResourcesCallback
+     * @param "aScreenDevice" Screen from the last MdcDSAResourcesCallback
+     * @param "aWindow" Window from the last MdcDSAResourcesCallback
+     */
+    void UIStartViewFinder(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow);
+
+    /**
+     * If UI Camera have been created
+     * it starts/hides the DirectViewFinder
+     * Have to be called from UI thread in which UI Camera
+     * have been created!
+     *
+     * @since  S60 v5.0
+     * @param "aVisible" If true DirectViewFinder is started, else stopped
+     */
+    void SetViewFinderVisibility(TBool aVisible);
+
+    /**
+     * Stops the DirectViewFinder and deletes UI Camera instance
+     * Have to be called from UI thread in which UI Camera
+     * have been created before the CMMACameraWindow instance
+     * is deleted!
+     *
+     * @since  S60 v5.0
+     */
+    void ReleaseUiResources();
+
+    /**
+     * The callback method invoked by starter timer
+     *
+     * @since  S60 v5.0
+     * @param  aThis An instance of CMMACameraWindow
+     * @return Always returns EFalse
+     */
+    static TInt StarterTimerCallback(TAny* aThis);
+
+    /**
+     * Starts viewfinder.
+     *
+     * @since  S60 v5.0
+     */
+    void StartViewFinder();
+
+    /**
+     * Resets (stops and starts) viewfinder
+     *
+     * @since  S60 v5.0
+     */
+    void ResetViewFinder();
+
+    /**
+     * Draws the underlayer of viewfinder.
+     * Used to clear the alpha value.
+     * Uses Direct Screen Access.
+     *
+     * @since  S60 v5.0
+     * @return EFalse if DSA start failed, but may work in the next attempt.
+               ETrue if DSA start passed.
+     */
+    TBool DrawUnderlayer();
+
+    /**
+     * Draws the error message to specified area.
+     * Used in cases when viewfinder is unable to start
+     *
+     * @since  S60 v5.0
+     * @param aError Viewfinder error id
+     * @param aDrawRect Area to draw to
+     */
+    void DrawViewFinderErrorL(const TInt aError, const TRect& aDrawRect);
+
+    /**
+     * Deletes this object.
+     *
+     * @since  S60 v5.0
+     */
+    void Destroy();
+
+private:  // data
+    /**
+     * Indicates the window visibility.
+     */
+    TBool iVisible;
+
+    /**
+     * Indicated that owning player is in Started state.
+     */
+    TBool iStarted;
+
+    /**
+     * Indicates that Direct viewfinder is displayed on screen.
+     */
+    TBool iViewFinderVisible;
+
+    /**
+     * Indicates that duplicated camera (iUICamera) is powered on.
+     */
+    TBool iCameraPowerOn;
+
+    /**
+     * Rectangle to display viewfinder on (Window coordinates).
+     */
+    TRect iDrawRect;
+
+    /**
+     * The area of the window.
+     */
+    TRect iClientRect;
+
+    /**
+     * The handle of original camera instance.
+     */
+    TInt iCameraHandle;
+
+    /**
+     * UI Camera instance
+     * Duplicated from iCameraHandle.
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CCamera* iUICamera;
+
+    /**
+     * Display instance used to invoke UI callbacks.
+     * Not owned.
+     */
+    MMMADisplay* iDisplay;
+
+    /**
+     * Window server session used by UI thread.
+     * Adjustable and usable from UI thread only.
+     * Not owned.
+     */
+    RWsSession* iWs;
+
+    /**
+     * Screen device used by UI thread.
+     * Adjustable and usable from UI thread only.
+     * Not owned.
+     */
+    CWsScreenDevice* iScreenDevice;
+
+    /**
+     * Window to draw viewfinder on.
+     * Adjustable and usable from UI thread only.
+     * From UI thread.
+     * Not owned.
+     */
+    RWindowBase* iWindow;
+
+    /**
+     * The timer to delay viewfinder start
+     * to avoid many showing/hidding request
+     * (for instance when scrolling the viewfinder)
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CPeriodic* iStarterTimer;
+
+    /**
+     * Direct screen access used to draw the underlayer.
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CDirectScreenAccess* iDirectAccess;
+
+    /**
+     * Count of remaining allowed DSA restarts.
+     * In some cases (like screen orientation change)
+     * the DSA fails to start for some time.
+     * Therefore the start is tried more times.
+     */
+    TUint iRemainingDSAStartAttempts;
+
+    /**
+     * An icon used to display instead of viewfinder.
+     * in case that viewfinder start fails.
+     * Own.
+     */
+    CFbsBitmap* iErrorIconBitmap;
+
+    /**
+     * Bitmap mask of iErrorIconBitmap.
+     * Own.
+     */
+    CFbsBitmap* iErrorIconMaskBitmap;
+};
+
+#endif // CMMACAMERAWINDOW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_akn/baseline/inc.nga/cmmacamerawindow.h	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,351 @@
+/*
+* 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:  This class implements MMMADisplayWindow functionality
+*                for Camera viewfinder usage.
+*
+*/
+
+
+#ifndef CMMACAMERAWINDOW_H
+#define CMMACAMERAWINDOW_H
+
+//  INCLUDES
+#include <ecam.h>
+#include <reflcdui.h>
+#include <w32std.h>
+#include "mmmadisplaywindow.h"
+#include "mmmadisplay.h"
+//  CONSTANTS
+
+//  FORWARD DECLARATIONS
+class CFbsBitmap;
+class RWsSession;
+class CWsScreenDevice;
+class RWindowBase;
+class MMMADisplay;
+
+//  CLASS DECLARATION
+/**
+* This class implements MMMADisplayWindow functionality
+* to use with CMMACameraPlayer.
+* It duplicates its camera instance within the UI thread
+* and displays the viewfinder using the UI
+* DirectScreenAccess resources.
+*
+* @since S60 v5.0
+*/
+
+
+NONSHARABLE_CLASS(CMMACameraWindow): public CBase,
+        public MMMADisplayWindow,
+        public MCameraObserver,
+        public MUiEventConsumer,
+        public MDirectScreenAccess
+{
+public:
+    enum TUiCallbackType
+    {
+        EDeleteViewFinder = 1,
+        EHideViewFinder,
+        EShowViewFinder,
+        EResetViewFinder,
+        EDestroyWindow
+    };
+
+    /**
+     * Two-phased constructor.
+     *
+     * @param  aCameraHandle A handle to existing CCamera instance.
+     */
+    static CMMACameraWindow* NewL(TInt aCameraHandle);
+
+
+    /**
+     * Destructor.
+     */
+    ~CMMACameraWindow();
+
+    /**
+     * Gets an information if the DirectViewFinder is started
+     *
+     * @since  S60 v5.0
+     * @return ETrue if DirectViewFinder is active
+     */
+    TBool ViewFinderActive();
+
+    /**
+     * Notifies window about Started state change
+     *
+     * @since S60 v5.0
+     * @param aStarted Indicates that camera player is in started state
+     */
+    void SetStarted(TBool aStarted);
+
+    /**
+     * Sets iDisplay
+     * Used to invoke callbacks in UI thread
+     *
+     * @since  S60 v5.0
+     * @param "aDisplay" A Display to be used for callbacks.
+     *         When set, the duplicated CCamera is created in UI thread
+     *         and the necessary DSA resources are got.
+     *         When replacing an old Display (set earlier)
+     *         all the old resources are deleted.
+     *         NULL deletes all allocated UI resources.
+     */
+    void SetDisplay(MMMADisplay *aDisplay);
+
+
+// from base class MMMADisplayWindow
+    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
+    void DrawFrameL(const CFbsBitmap* aBitmap);
+    void SetDrawRect(const TRect& aRect);
+    void SetDrawRectThread(const TRect& aRect);
+    const TRect& DrawRect();
+    TSize WindowSize();
+    void SetPosition(const TPoint& aPosition);
+    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
+    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
+    void SetRWindowRect(const TRect& aRect, MMMADisplay::TThreadType aThreadType);
+    const TRect& WindowRect();
+    TDisplayWindowType GetDisplayWindowType() const;
+    TBool IsVisible() const;
+    void ContainerSet();
+    void ContainerDestroyed();
+
+
+// from base class MCameraObserver
+    void ReserveComplete(TInt aError);
+    void PowerOnComplete(TInt aError);
+    void ViewFinderFrameReady(CFbsBitmap& aFrame);
+
+    void ImageReady(CFbsBitmap* aBitmap,
+                    HBufC8* aData,
+                    TInt aError);
+
+    void FrameBufferReady(MFrameBuffer* aFrameBuffer,
+                          TInt aError);
+
+
+// from base class MUiEventConsumer
+    void MdcDSAResourcesCallback(
+        RWsSession &aWs,
+        CWsScreenDevice &aScreenDevice,
+        RWindowBase &aWindow);
+    void MdcUICallback(TInt aCallbackId);
+
+
+// from base class MDirectScreenAccess
+    void AbortNow(RDirectScreenAccess::TTerminationReasons aReasons);
+    void Restart(RDirectScreenAccess::TTerminationReasons aReasons);
+
+
+private:
+    /**
+     * Constructor.
+     * @see CMMACameraWindow::NewL()
+     */
+    CMMACameraWindow(TInt aCameraIndex);
+
+    /**
+     * Creates UI Camera -
+     * a new CCamera instance (duplicated from handle
+     * given to the constructor)
+     * Have to be called from the thread which UI Camera
+     * will be controlled from
+     *
+     * @since  S60 v5.0
+     * @param "aWs" WS session from the last MdcDSAResourcesCallback
+     * @param "aScreenDevice" Screen from the last MdcDSAResourcesCallback
+     * @param "aWindow" Window from the last MdcDSAResourcesCallback
+     */
+    void UIStartViewFinder(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow);
+
+    /**
+     * If UI Camera have been created
+     * it starts/hides the DirectViewFinder
+     * Have to be called from UI thread in which UI Camera
+     * have been created!
+     *
+     * @since  S60 v5.0
+     * @param "aVisible" If true DirectViewFinder is started, else stopped
+     */
+    void SetViewFinderVisibility(TBool aVisible);
+
+    /**
+     * Stops the DirectViewFinder and deletes UI Camera instance
+     * Have to be called from UI thread in which UI Camera
+     * have been created before the CMMACameraWindow instance
+     * is deleted!
+     *
+     * @since  S60 v5.0
+     */
+    void ReleaseUiResources();
+
+    /**
+     * The callback method invoked by starter timer
+     *
+     * @since  S60 v5.0
+     * @param  aThis An instance of CMMACameraWindow
+     * @return Always returns EFalse
+     */
+    static TInt StarterTimerCallback(TAny* aThis);
+
+    /**
+     * Starts viewfinder.
+     *
+     * @since  S60 v5.0
+     */
+    void StartViewFinder();
+
+    /**
+     * Resets (stops and starts) viewfinder
+     *
+     * @since  S60 v5.0
+     */
+    void ResetViewFinder();
+
+    /**
+     * Draws the error message to specified area.
+     * Used in cases when viewfinder is unable to start
+     *
+     * @since  S60 v5.0
+     * @param aError Viewfinder error id
+     * @param aDrawRect Area to draw to
+     */
+    void DrawViewFinderErrorL(const TInt aError, const TRect& aDrawRect);
+
+    /**
+     * Deletes this object.
+     *
+     * @since  S60 v5.0
+     */
+    void Destroy();
+
+private:  // data
+    /**
+     * Indicates the window visibility.
+     */
+    TBool iVisible;
+
+    /**
+     * Indicated that owning player is in Started state.
+     */
+    TBool iStarted;
+
+    /**
+     * Indicates that Direct viewfinder is displayed on screen.
+     */
+    TBool iViewFinderVisible;
+
+    /**
+     * Indicates that duplicated camera (iUICamera) is powered on.
+     */
+    TBool iCameraPowerOn;
+
+    /**
+     * Rectangle to display viewfinder on (Window coordinates).
+     */
+    TRect iDrawRect;
+
+    /**
+     * The area of the window.
+     */
+    TRect iClientRect;
+
+    /**
+     * The handle of original camera instance.
+     */
+    TInt iCameraHandle;
+
+    /**
+     * UI Camera instance
+     * Duplicated from iCameraHandle.
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CCamera* iUICamera;
+
+    /**
+     * Display instance used to invoke UI callbacks.
+     * Not owned.
+     */
+    MMMADisplay* iDisplay;
+
+    /**
+     * Window server session used by UI thread.
+     * Adjustable and usable from UI thread only.
+     * Not owned.
+     */
+    RWsSession* iWs;
+
+    /**
+     * Screen device used by UI thread.
+     * Adjustable and usable from UI thread only.
+     * Not owned.
+     */
+    CWsScreenDevice* iScreenDevice;
+
+    /**
+     * Window to draw viewfinder on.
+     * Adjustable and usable from UI thread only.
+     * From UI thread.
+     * Not owned.
+     */
+    RWindowBase* iWindow;
+
+    /**
+     * The timer to delay viewfinder start
+     * to avoid many showing/hidding request
+     * (for instance when scrolling the viewfinder)
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CPeriodic* iStarterTimer;
+
+    /**
+     * Direct screen access used to draw the error message.
+     * Adjustable and usable from UI thread only.
+     * Own.
+     */
+    CDirectScreenAccess* iDirectAccess;
+
+    /**
+     * Count of remaining allowed DSA restarts.
+     * In some cases (like screen orientation change)
+     * the DSA fails to start for some time.
+     * Therefore the start is tried more times.
+     */
+    TUint iRemainingDSAStartAttempts;
+
+    /**
+     * An icon used to display instead of viewfinder.
+     * in case that viewfinder start fails.
+     * Own.
+     */
+    CFbsBitmap* iErrorIconBitmap;
+
+    /**
+     * Bitmap mask of iErrorIconBitmap.
+     * Own.
+     */
+    CFbsBitmap* iErrorIconMaskBitmap;
+
+    /**
+     * Symbian RWindow rect
+     */
+    TRect iRWindowRect;
+};
+
+#endif // CMMACAMERAWINDOW_H
--- a/javauis/mmapi_akn/baseline/inc/cmmacamerawindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,351 +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:  This class implements MMMADisplayWindow functionality
-*                for Camera viewfinder usage.
-*
-*/
-
-
-#ifndef CMMACAMERAWINDOW_H
-#define CMMACAMERAWINDOW_H
-
-//  INCLUDES
-#include <ecam.h>
-#include <reflcdui.h>
-#include <w32std.h>
-#include "mmmadisplaywindow.h"
-#include "mmmadisplay.h"
-//  CONSTANTS
-
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class RWsSession;
-class CWsScreenDevice;
-class RWindowBase;
-class MMMADisplay;
-
-//  CLASS DECLARATION
-/**
-* This class implements MMMADisplayWindow functionality
-* to use with CMMACameraPlayer.
-* It duplicates its camera instance within the UI thread
-* and displays the viewfinder using the UI
-* DirectScreenAccess resources.
-*
-* @since S60 v5.0
-*/
-
-
-NONSHARABLE_CLASS(CMMACameraWindow): public CBase,
-        public MMMADisplayWindow,
-        public MCameraObserver,
-        public MUiEventConsumer,
-        public MDirectScreenAccess
-{
-public:
-    enum TUiCallbackType
-    {
-        EDeleteViewFinder = 1,
-        EHideViewFinder,
-        EShowViewFinder,
-        EResetViewFinder,
-        EDestroyWindow
-    };
-
-    /**
-     * Two-phased constructor.
-     *
-     * @param  aCameraHandle A handle to existing CCamera instance.
-     */
-    static CMMACameraWindow* NewL(TInt aCameraHandle);
-
-
-    /**
-     * Destructor.
-     */
-    ~CMMACameraWindow();
-
-    /**
-     * Gets an information if the DirectViewFinder is started
-     *
-     * @since  S60 v5.0
-     * @return ETrue if DirectViewFinder is active
-     */
-    TBool ViewFinderActive();
-
-    /**
-     * Notifies window about Started state change
-     *
-     * @since S60 v5.0
-     * @param aStarted Indicates that camera player is in started state
-     */
-    void SetStarted(TBool aStarted);
-
-    /**
-     * Sets iDisplay
-     * Used to invoke callbacks in UI thread
-     *
-     * @since  S60 v5.0
-     * @param "aDisplay" A Display to be used for callbacks.
-     *         When set, the duplicated CCamera is created in UI thread
-     *         and the necessary DSA resources are got.
-     *         When replacing an old Display (set earlier)
-     *         all the old resources are deleted.
-     *         NULL deletes all allocated UI resources.
-     */
-    void SetDisplay(MMMADisplay *aDisplay);
-
-
-// from base class MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-    const TRect& DrawRect();
-    TSize WindowSize();
-    void SetPosition(const TPoint& aPosition);
-    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
-    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
-    void SetRWindowRect(const TRect& aRect, MMMADisplay::TThreadType aThreadType);
-    const TRect& WindowRect();
-    TDisplayWindowType GetDisplayWindowType() const;
-    TBool IsVisible() const;
-    void ContainerSet();
-    void ContainerDestroyed();
-
-
-// from base class MCameraObserver
-    void ReserveComplete(TInt aError);
-    void PowerOnComplete(TInt aError);
-    void ViewFinderFrameReady(CFbsBitmap& aFrame);
-
-    void ImageReady(CFbsBitmap* aBitmap,
-                    HBufC8* aData,
-                    TInt aError);
-
-    void FrameBufferReady(MFrameBuffer* aFrameBuffer,
-                          TInt aError);
-
-
-// from base class MUiEventConsumer
-    void MdcDSAResourcesCallback(
-        RWsSession &aWs,
-        CWsScreenDevice &aScreenDevice,
-        RWindowBase &aWindow);
-    void MdcUICallback(TInt aCallbackId);
-
-
-// from base class MDirectScreenAccess
-    void AbortNow(RDirectScreenAccess::TTerminationReasons aReasons);
-    void Restart(RDirectScreenAccess::TTerminationReasons aReasons);
-
-
-private:
-    /**
-     * Constructor.
-     * @see CMMACameraWindow::NewL()
-     */
-    CMMACameraWindow(TInt aCameraIndex);
-
-    /**
-     * Creates UI Camera -
-     * a new CCamera instance (duplicated from handle
-     * given to the constructor)
-     * Have to be called from the thread which UI Camera
-     * will be controlled from
-     *
-     * @since  S60 v5.0
-     * @param "aWs" WS session from the last MdcDSAResourcesCallback
-     * @param "aScreenDevice" Screen from the last MdcDSAResourcesCallback
-     * @param "aWindow" Window from the last MdcDSAResourcesCallback
-     */
-    void UIStartViewFinder(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow);
-
-    /**
-     * If UI Camera have been created
-     * it starts/hides the DirectViewFinder
-     * Have to be called from UI thread in which UI Camera
-     * have been created!
-     *
-     * @since  S60 v5.0
-     * @param "aVisible" If true DirectViewFinder is started, else stopped
-     */
-    void SetViewFinderVisibility(TBool aVisible);
-
-    /**
-     * Stops the DirectViewFinder and deletes UI Camera instance
-     * Have to be called from UI thread in which UI Camera
-     * have been created before the CMMACameraWindow instance
-     * is deleted!
-     *
-     * @since  S60 v5.0
-     */
-    void ReleaseUiResources();
-
-    /**
-     * The callback method invoked by starter timer
-     *
-     * @since  S60 v5.0
-     * @param  aThis An instance of CMMACameraWindow
-     * @return Always returns EFalse
-     */
-    static TInt StarterTimerCallback(TAny* aThis);
-
-    /**
-     * Starts viewfinder.
-     *
-     * @since  S60 v5.0
-     */
-    void StartViewFinder();
-
-    /**
-     * Resets (stops and starts) viewfinder
-     *
-     * @since  S60 v5.0
-     */
-    void ResetViewFinder();
-
-    /**
-     * Draws the error message to specified area.
-     * Used in cases when viewfinder is unable to start
-     *
-     * @since  S60 v5.0
-     * @param aError Viewfinder error id
-     * @param aDrawRect Area to draw to
-     */
-    void DrawViewFinderErrorL(const TInt aError, const TRect& aDrawRect);
-
-    /**
-     * Deletes this object.
-     *
-     * @since  S60 v5.0
-     */
-    void Destroy();
-
-private:  // data
-    /**
-     * Indicates the window visibility.
-     */
-    TBool iVisible;
-
-    /**
-     * Indicated that owning player is in Started state.
-     */
-    TBool iStarted;
-
-    /**
-     * Indicates that Direct viewfinder is displayed on screen.
-     */
-    TBool iViewFinderVisible;
-
-    /**
-     * Indicates that duplicated camera (iUICamera) is powered on.
-     */
-    TBool iCameraPowerOn;
-
-    /**
-     * Rectangle to display viewfinder on (Window coordinates).
-     */
-    TRect iDrawRect;
-
-    /**
-     * The area of the window.
-     */
-    TRect iClientRect;
-
-    /**
-     * The handle of original camera instance.
-     */
-    TInt iCameraHandle;
-
-    /**
-     * UI Camera instance
-     * Duplicated from iCameraHandle.
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CCamera* iUICamera;
-
-    /**
-     * Display instance used to invoke UI callbacks.
-     * Not owned.
-     */
-    MMMADisplay* iDisplay;
-
-    /**
-     * Window server session used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    RWsSession* iWs;
-
-    /**
-     * Screen device used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    CWsScreenDevice* iScreenDevice;
-
-    /**
-     * Window to draw viewfinder on.
-     * Adjustable and usable from UI thread only.
-     * From UI thread.
-     * Not owned.
-     */
-    RWindowBase* iWindow;
-
-    /**
-     * The timer to delay viewfinder start
-     * to avoid many showing/hidding request
-     * (for instance when scrolling the viewfinder)
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CPeriodic* iStarterTimer;
-
-    /**
-     * Direct screen access used to draw the error message.
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CDirectScreenAccess* iDirectAccess;
-
-    /**
-     * Count of remaining allowed DSA restarts.
-     * In some cases (like screen orientation change)
-     * the DSA fails to start for some time.
-     * Therefore the start is tried more times.
-     */
-    TUint iRemainingDSAStartAttempts;
-
-    /**
-     * An icon used to display instead of viewfinder.
-     * in case that viewfinder start fails.
-     * Own.
-     */
-    CFbsBitmap* iErrorIconBitmap;
-
-    /**
-     * Bitmap mask of iErrorIconBitmap.
-     * Own.
-     */
-    CFbsBitmap* iErrorIconMaskBitmap;
-
-    /**
-     * Symbian RWindow rect
-     */
-    TRect iRWindowRect;
-};
-
-#endif // CMMACAMERAWINDOW_H
--- a/javauis/mmapi_akn/baseline/inc/cmmaoutputstreamevent.h	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/baseline/inc/cmmaoutputstreamevent.h	Tue May 25 12:34:19 2010 +0300
@@ -19,6 +19,7 @@
 #ifndef CMMAOUTPUTSTREAMEVENT_H
 #define CMMAOUTPUTSTREAMEVENT_H
 
+#include <e32std.h>
 #include "cmmaevent.h"
 
 
@@ -41,7 +42,7 @@
 public:
     CMMAOutputStreamEvent(jmethodID aHandleEventMethod,
                           jobject aNotifyObject);
-
+		~CMMAOutputStreamEvent();
     // status of the source stream
     void SetStatus(TInt aStatus);
 
@@ -68,6 +69,8 @@
      * State of this event.
      */
     TMMAOutputStreamState iState;
+    
+    RMutex iMutex;
 };
 
 #endif // CMMAOUTPUTSTREAMEVENT_H
--- a/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java	Tue May 25 12:34:19 2010 +0300
@@ -424,7 +424,7 @@
      * must be called.
      *
      */
-    public void commit() throws IOException
+    synchronized public void commit() throws IOException
     {
         checkState();
         // If commit has been called and setRecordLocation or setRecordStream
@@ -463,6 +463,7 @@
         {
             throw new IOException("commit() failed, Symbian OS error: " + rval);
         }
+        iIgnoreCommitState = true;
     }
 
     /**
@@ -487,7 +488,7 @@
 
             Logger.ELOG(Logger.EJavaMMAPI, "MMA::RecordControl::run failed: ", e);
         }
-        iIgnoreCommitState = true;
+        //iIgnoreCommitState = true;
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_akn/baseline/src.dsa/cmmacamerawindow.cpp	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,949 @@
+/*
+* 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:  This class implements MMMADisplayWindow functionality
+*                for Camera viewfinder usage.
+*
+*/
+
+
+//  Include Files
+#include <eikenv.h>
+#include <gdi.h>
+#include <jdebug.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+
+#include <cameraapp.mbg>
+
+// Used for iDisplay member
+
+#include "cmmacamerawindow.h"
+
+// Camera viewfinder start delay
+const TInt KStarterTimeout = 100000; //100 msecs
+
+// Margin of icon displayed instead of viewfinder in case of error
+const TInt KErrorIconMargin = 5; //5 pixels
+
+
+_LIT(KCameraAppBitmapFile, "z:\\resource\\apps\\cameraapp.mif");
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::NewL
+// Two-phased constructor.
+// Use this method to create a CMMACameraWindow instance.
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow* CMMACameraWindow::NewL(TInt aCameraHandle)
+{
+    CMMACameraWindow* self = new(ELeave)CMMACameraWindow(aCameraHandle);
+    return self;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::~CMMACameraWindow
+// Destructor.
+// NOTE: iUICamera have to be deleted by ReleaseUiResources() called
+//       from UI thread
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow::~CMMACameraWindow()
+{
+    // It's not allowed to delete any nonsharable object here.
+    // This must be done in Destroy().
+    // If the iDisplay is set,
+    // instance should be deleted by sending
+    // event from UI to be received by MUiEventConsumer.
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ViewFinderActive
+// Gets an information if the viewfinder is started.
+// ---------------------------------------------------------------------------
+//
+TBool CMMACameraWindow::ViewFinderActive()
+{
+    return iUICamera && iViewFinderVisible;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetStarted
+// Notifies window about Started state change.
+// If started, tries to start viewfinder.
+// If not started, stops viewfinder.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetStarted(TBool aStarted)
+{
+    iStarted = aStarted;
+    if (iDisplay)
+    {
+        if (iStarted)
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EShowViewFinder);
+        }
+        else
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EHideViewFinder);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetDisplay
+// Sets iDisplay used to invoke callbacks from UI thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDisplay(MMMADisplay *aDisplay)
+{
+    if (iDisplay != aDisplay)
+    {
+        if (iDisplay)
+        {
+            // Clear the resources created within the old Display
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EDeleteViewFinder);
+        }
+
+        // Set the new Display
+        iDisplay = aDisplay;
+
+        if (iDisplay)
+        {
+            // Get a DSA resources for the new Display
+            iDisplay->UIGetDSAResources(*this, MMMADisplay::EMmaThread);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDestinationBitmapL
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
+{
+    // Ignored, this window will not be used for actual drawing
+    DEBUG("CMMACameraWindow::SetDestinationBitmapL");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::DrawFrameL
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
+{
+    // Ignored, this window will not be used for actual drawing
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDrawRect
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDrawRect(const TRect& aRect)
+{
+    // MMAPI thread
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    iDrawRect = aRect;
+
+    if (iDisplay)
+    {
+        iDisplay->UIGetCallback(*this, CMMACameraWindow::EResetViewFinder);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDrawRectThread
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDrawRectThread(const TRect& aRect)
+{
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    // Note: Runs in UI thread only
+
+    // Bitmap window's rect can be set in any thread.
+    if (iDrawRect != aRect)
+    {
+        iDrawRect = aRect;
+
+        // Stop and start ViewFinder to update position
+        ResetViewFinder();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::DrawRect
+//
+// ---------------------------------------------------------------------------
+//
+const TRect& CMMACameraWindow::DrawRect()
+{
+    return iDrawRect;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::WindowSize
+//
+// ---------------------------------------------------------------------------
+//
+TSize CMMACameraWindow::WindowSize()
+{
+    return iDrawRect.Size();
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetPosition
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetPosition(const TPoint& aPosition)
+{
+    // Note: Runs in UI thread only
+    SetDrawRectThread(TRect(aPosition, iDrawRect.Size()));
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetVisible
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
+{
+    iVisible = aVisible;
+
+    if (aUseEventServer)
+    {
+        // We are in UI thread now.
+        SetViewFinderVisibility(aVisible);
+    }
+    else
+    {
+        // MMAPI thread
+        if (iDisplay)
+        {
+            if (aVisible)
+            {
+                iDisplay->UIGetCallback(
+                    *this, CMMACameraWindow::EShowViewFinder);
+            }
+            else
+            {
+                iDisplay->UIGetCallback(
+                    *this, CMMACameraWindow::EHideViewFinder);
+            }
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetWindowRect
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetWindowRect(
+    const TRect& aRect,
+    MMMADisplay::TThreadType aThreadType)
+{
+    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    if (iClientRect != aRect)
+    {
+        iClientRect = aRect;
+
+        if (aThreadType == MMMADisplay::EUiThread)
+        {
+            ResetViewFinder();
+        }
+        else
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EResetViewFinder);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::WindowRect
+//
+// ---------------------------------------------------------------------------
+//
+const TRect& CMMACameraWindow::WindowRect()
+{
+    return iClientRect;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::GetDisplayWindowType
+//
+// ---------------------------------------------------------------------------
+//
+MMMADisplayWindow::TDisplayWindowType
+CMMACameraWindow::GetDisplayWindowType() const
+{
+    return EDisplayWindowTypeIsCamera;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::IsVisible
+//
+// ---------------------------------------------------------------------------
+//
+TBool CMMACameraWindow::IsVisible() const
+{
+    return iVisible;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::ContainerSet
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ContainerSet()
+{
+    // We are in UI thread now
+
+    // Container was probably not set when
+    // iDisplay was set,
+    // we can now try get the DSA stuff again
+    if (!iUICamera && iDisplay)
+    {
+        // Get a DSA stuff for the new Display
+        iDisplay->UIGetDSAResources(*this, MMMADisplay::EUiThread);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::ContainerDestroyed
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ContainerDestroyed()
+{
+    // We are in UI thread now
+    ReleaseUiResources();
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ReserveComplete
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ReserveComplete(TInt aError)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::ReserveComplete %d", aError);
+
+    if (aError == KErrNone)
+    {
+        // camera will notify completion with PowerOnComplete method.
+        iUICamera->PowerOn();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::PowerOnComplete
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::PowerOnComplete(TInt aError)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::PowerOnComplete %d", aError);
+
+    if (aError == KErrNone)
+    {
+        iCameraPowerOn = ETrue;
+        SetViewFinderVisibility(ETrue);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ViewFinderFrameReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::ViewFinderFrameReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ImageReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ImageReady(CFbsBitmap* /*aBitmap*/,
+                                  HBufC8* /*aData*/,
+                                  TInt /*aError*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::ImageReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::FrameBufferReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/,
+                                        TInt /*aError*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::FrameBufferReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MDirectScreenAccess.
+// CMMACameraWindow::AbortNow
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::AbortNow(
+    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
+{
+    SetViewFinderVisibility(EFalse);
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MDirectScreenAccess.
+// CMMACameraWindow::Restart
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::Restart(
+    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
+{
+    SetViewFinderVisibility(ETrue);
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::CMMACameraWindow
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow::CMMACameraWindow(TInt aCameraHandle):
+        iVisible(EFalse),
+        iStarted(EFalse),
+        iViewFinderVisible(EFalse),
+        iCameraPowerOn(EFalse),
+        iDrawRect(0, 0, 0, 0),
+        iClientRect(0, 0, 0, 0),
+        iCameraHandle(aCameraHandle),
+        iUICamera(NULL),
+        iDisplay(NULL),
+        iStarterTimer(NULL),
+        iDirectAccess(NULL),
+        iErrorIconBitmap(NULL),
+        iErrorIconMaskBitmap(NULL)
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::UIStartViewFinder
+// Creates UI Camera.
+// This CCamera instance is duplicated from handle given to the constructor.
+// Have to be called from the thread which UI Camera will be controlled from.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::UIStartViewFinder(
+    RWsSession &aWs,
+    CWsScreenDevice &aScreenDevice,
+    RWindowBase &aWindow)
+{
+    DEBUG("MMA::CMMACameraWindow::UIStartViewFinder");
+
+    iWs = &aWs;
+    iScreenDevice = &aScreenDevice;
+    iWindow = &aWindow;
+
+    if (!iUICamera)
+    {
+        TRAPD(error, iUICamera =
+                  CCamera::NewDuplicateL(*this, iCameraHandle));
+
+        DEBUG_INT(
+            "MMA::CMMACameraWindow::UIStartViewFinder - NewDuplicateL %d",
+            error);
+
+        if (error == KErrNone)
+        {
+            iUICamera->Reserve();
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetViewFinderVisibility
+// If UI Camera have been created, it starts/hides the DirectViewFinder.
+// Have to be called from UI thread in which iUICamera instance was created.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetViewFinderVisibility(TBool aVisible)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::SetViewFinderVisibility - %d",
+              aVisible);
+
+    if (!iUICamera || !iCameraPowerOn || iViewFinderVisible == aVisible)
+    {
+        return;
+    }
+
+    if (aVisible)
+    {
+        // Viewfinder is going to start
+        if (!iVisible || !iStarted)
+        {
+            return;
+        }
+
+        iViewFinderVisible = ETrue;
+
+        if (!iStarterTimer)
+        {
+            // If starter timer haven't been created yet, create an instance
+            TRAPD(
+                timerErr,
+                iStarterTimer = CPeriodic::NewL(CActive::EPriorityIdle));
+
+            if (timerErr != KErrNone)
+            {
+                DEBUG_INT(
+                    "MMA::CMMACameraWindow::SetViewFinderVisibility - timer error = %d", 
+                    timerErr);
+                __ASSERT_DEBUG(EFalse, User::Invariant());
+            }
+        }
+
+        if (!iStarterTimer->IsActive())
+        {
+            iStarterTimer->Start(
+                KStarterTimeout,
+                0,
+                TCallBack(StarterTimerCallback, this));
+        }
+    }
+    else
+    {
+        // Viewfinder is going to be cancelled
+        DEBUG(
+            "MMA::CMMACameraWindow::SetViewFinderVisibility - Stopping VF");
+
+        if (iStarterTimer && iStarterTimer->IsActive())
+        {
+            // Cancel the running starter timer
+            iStarterTimer->Cancel();
+        }
+
+        if (iUICamera->ViewFinderActive())
+        {
+            iUICamera->StopViewFinder();
+        }
+        if (iDirectAccess->IsActive())
+        {
+            iDirectAccess->Cancel();
+        }
+
+        iViewFinderVisible = EFalse;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::StarterTimerCallback
+// Executed at the expiry of the iStartedTimer.
+// ---------------------------------------------------------------------------
+//
+TInt CMMACameraWindow::StarterTimerCallback(TAny* aThis)
+{
+    CMMACameraWindow* self = static_cast<CMMACameraWindow*>(aThis);
+    ASSERT(self);
+
+    self->StartViewFinder();
+
+    // We don't want to run the callback again
+    return EFalse;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::StartViewFinder
+// Starts viewfinder.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::StartViewFinder()
+{
+    DEBUG(" < StartViewFinder");
+
+    ASSERT(iUICamera);
+    ASSERT(iCameraPowerOn);
+    ASSERT(iStarted);
+
+    iStarterTimer->Cancel();
+
+    DrawUnderlayer();
+
+
+    // Set the drawing area
+    TRect drawRect(iDrawRect);
+    drawRect.Move(iClientRect.iTl);
+
+    DEBUG_INT2(
+        "MMA::CMMACameraWindow::StartViewFinder - Starting VF TL:%d,%d",
+        drawRect.iTl.iX,
+        drawRect.iTl.iY);
+    DEBUG_INT2(
+        "MMA::CMMACameraWindow::StartViewFinder - Starting VF BR:%d,%d",
+        drawRect.iBr.iX,
+        drawRect.iBr.iY);
+
+    TRAPD(vfError, iUICamera->StartViewFinderDirectL(
+              *iWs, *iScreenDevice, *iWindow, drawRect));
+
+    if (vfError == KErrNone)
+    {
+        DEBUG("MMA::CMMACameraWindow::StartViewFinder - Start OK");
+    }
+    else
+    {
+        DEBUG_INT(
+            "MMA::CMMACameraWindow::StartViewFinder()  - \
+            StartViewFinderDirectL error=%d", vfError);
+
+        TRAP_IGNORE(DrawViewFinderErrorL(vfError, drawRect));
+    }
+
+    DEBUG(" > StartViewFinder");
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::DrawViewFinderError()
+// Draws the error message to specified area.
+// Used in cases when viewfinder is unable to start.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::DrawViewFinderErrorL(
+    const TInt /*aError*/,
+    const TRect& aDrawRect)
+{
+
+    ASSERT(iDirectAccess);
+    TInt dcError = KErrNone;
+    if (!iDirectAccess->IsActive())
+    {
+        TRAP(dcError, iDirectAccess->StartL());
+    }
+
+    TRect drawRect(aDrawRect);
+
+    if (dcError == KErrNone)
+    {
+        drawRect.Intersection(iClientRect);
+        drawRect.Move(-iWindow->AbsPosition());
+
+        CFbsBitGc* directGc = iDirectAccess->Gc();
+        directGc->SetClippingRect(drawRect);
+        directGc->SetBrushColor(TRgb(128,128,128));
+        directGc->SetPenColor(TRgb(128,0,0));
+        directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
+        directGc->SetPenStyle(CGraphicsContext::ESolidPen);
+        directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+        directGc->DrawRect(drawRect);
+
+        if (!iErrorIconBitmap || !iErrorIconMaskBitmap)
+        {
+            if (iErrorIconBitmap)
+            {
+                delete iErrorIconBitmap;
+                iErrorIconBitmap = NULL;
+            }
+
+            if (iErrorIconMaskBitmap)
+            {
+                delete iErrorIconMaskBitmap;
+                iErrorIconMaskBitmap = NULL;
+            }
+
+            AknsUtils::CreateIconL(
+                AknsUtils::SkinInstance(),
+                KAknsIIDQgnIndiCam4Camera,
+                iErrorIconBitmap,
+                iErrorIconMaskBitmap,
+                KCameraAppBitmapFile,
+                EMbmCameraappQgn_indi_cam4_camera,
+                EMbmCameraappQgn_indi_cam4_camera_mask
+            );
+        }
+
+        //TRect iconRect
+        drawRect.iTl.iX += KErrorIconMargin;
+        drawRect.iTl.iY += KErrorIconMargin;
+        drawRect.iBr.iX -= KErrorIconMargin;
+        drawRect.iBr.iY -= KErrorIconMargin;
+
+        if (iErrorIconBitmap->SizeInPixels() != drawRect.Size())
+        {
+            AknIconUtils::SetSize(iErrorIconBitmap, drawRect.Size());
+            AknIconUtils::SetSize(iErrorIconMaskBitmap, drawRect.Size());
+        }
+
+        directGc->BitBltMasked(
+            drawRect.iTl, iErrorIconBitmap,
+            TRect(iErrorIconBitmap->SizeInPixels()),
+            iErrorIconMaskBitmap, EFalse);
+
+        iDirectAccess->ScreenDevice()->Update();
+    }
+
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ReleaseUiResources()
+// Stops the DirectViewFinder and deletes UI Camera instance
+// Have to be called from UI thread in which UI Camera
+// have been created before the CMMACameraWindow instance
+// is deleted.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ReleaseUiResources()
+{
+    if (iUICamera)
+    {
+        SetViewFinderVisibility(EFalse);
+        // iStarterTimer is cancelled by previous call
+        // it can be deleted now
+        delete iStarterTimer;
+        iStarterTimer = NULL;
+        iUICamera->Release();
+        delete iUICamera;
+        iUICamera = NULL;
+        iCameraPowerOn = EFalse;
+        iDirectAccess->Cancel();
+        delete iDirectAccess;
+        iDirectAccess = NULL;
+        delete iErrorIconBitmap;
+        iErrorIconBitmap = NULL;
+        delete iErrorIconMaskBitmap;
+        iErrorIconMaskBitmap = NULL;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ResetViewFinder
+// Resets (stops and starts) viewfinder
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ResetViewFinder()
+{
+
+    if (iStarterTimer && !iStarterTimer->IsActive() && iStarted)
+    {
+        SetViewFinderVisibility(EFalse);
+        SetViewFinderVisibility(ETrue);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::DrawUnderlayer
+// Draws the underlayer of viewfinder.
+// Used to clear the alpha value.
+// Uses Direct Screen Access.
+// ---------------------------------------------------------------------------
+//
+TBool CMMACameraWindow::DrawUnderlayer()
+{
+    ASSERT(iDirectAccess);
+
+
+    DEBUG("Draw under layer");
+    TInt error = KErrNone;
+    if (!iDirectAccess->IsActive())
+    {
+        TRAP(error, iDirectAccess->StartL());
+    }
+    if (error == KErrNone)
+    {
+        DEBUG("Drawing alpha pixels to zero");
+        CFbsBitGc* directGc = iDirectAccess->Gc();
+        TInt count = iDirectAccess->DrawingRegion()->Count();
+        if (count > 0)
+        {
+            TRect drawRect(iDrawRect);
+            drawRect.Move(iClientRect.iTl);
+            drawRect.Intersection(iClientRect);
+            drawRect.Move(-iWindow->AbsPosition());
+
+            directGc->SetClippingRect(drawRect);
+            directGc->SetBrushColor(TRgb(0,0,0,0));
+            directGc->SetPenColor(TRgb(0,0,0,0));
+            directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
+            directGc->SetPenStyle(CGraphicsContext::ESolidPen);
+            directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+            directGc->DrawRect(drawRect);
+            iDirectAccess->ScreenDevice()->Update();
+        }
+
+        if (count <= 0)
+        {
+            // DSA may work in the next attempt
+            return EFalse;
+        }
+    }
+    else
+    {
+        // DSA may work in the next attempt
+        return EFalse;
+    }
+
+    // Success, no more attempt is needed
+    return ETrue;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::Destroy
+// Deletes this object.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::Destroy()
+{
+    // Delete itself
+    delete this;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MUiEventConsumer.
+// CMMACameraWindow::MdcDSAResourcesCallback
+// Callback to iDisplay->UIGetDSAResources().
+// Invoked asynchronously from UI Event Server thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::MdcDSAResourcesCallback(
+    RWsSession &aWs,
+    CWsScreenDevice &aScreenDevice,
+    RWindowBase &aWindow)
+{
+    TRAPD(error, iDirectAccess = CDirectScreenAccess::NewL(aWs,
+                                 aScreenDevice,
+                                 aWindow,
+                                 *this));
+    DEBUG_INT("MMA::CMMACameraWindow::MdcDSAResourcesCallback, error = %d", error);
+    if (KErrNone != error)
+    {
+        return;
+    }
+    this->UIStartViewFinder(aWs, aScreenDevice, aWindow);
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MUiEventConsumer.
+// CMMACameraWindow::MdcUICallback
+// Callback to iDisplay->UIGetCallback().
+// Invoked asynchronously from UI Event Server thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::MdcUICallback(TInt aCallbackId)
+{
+    DEBUG("MMA::CMMACameraWindow::MdcUICallback");
+
+    switch (aCallbackId)
+    {
+    case EDeleteViewFinder:
+        ReleaseUiResources();
+        break;
+    case EHideViewFinder:
+        SetViewFinderVisibility(EFalse);
+        break;
+    case EShowViewFinder:
+        SetViewFinderVisibility(ETrue);
+        break;
+    case EResetViewFinder:
+        ResetViewFinder();
+        break;
+    case EDestroyWindow:
+        Destroy();
+        break;
+    }
+}
+
+
+//  END OF FILE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_akn/baseline/src.nga/cmmacamerawindow.cpp	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,931 @@
+/*
+* 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:  This class implements MMMADisplayWindow functionality
+*                for Camera viewfinder usage.
+*
+*/
+
+
+//  Include Files
+#include <eikenv.h>
+#include <gdi.h>
+#include <jdebug.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+
+#include <cameraapp.mbg>
+
+// Used for iDisplay member
+
+#include "cmmacamerawindow.h"
+
+// Camera viewfinder start delay
+const TInt KStarterTimeout = 100000; //100 msecs
+
+// Margin of icon displayed instead of viewfinder in case of error
+const TInt KErrorIconMargin = 5; //5 pixels
+
+
+_LIT(KCameraAppBitmapFile, "z:\\resource\\apps\\cameraapp.mif");
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::NewL
+// Two-phased constructor.
+// Use this method to create a CMMACameraWindow instance.
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow* CMMACameraWindow::NewL(TInt aCameraHandle)
+{
+    CMMACameraWindow* self = new(ELeave)CMMACameraWindow(aCameraHandle);
+    return self;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::~CMMACameraWindow
+// Destructor.
+// NOTE: iUICamera have to be deleted by ReleaseUiResources() called
+//       from UI thread
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow::~CMMACameraWindow()
+{
+    // It's not allowed to delete any nonsharable object here.
+    // This must be done in Destroy().
+    // If the iDisplay is set,
+    // instance should be deleted by sending
+    // event from UI to be received by MUiEventConsumer.
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ViewFinderActive
+// Gets an information if the viewfinder is started.
+// ---------------------------------------------------------------------------
+//
+TBool CMMACameraWindow::ViewFinderActive()
+{
+    return iUICamera && iViewFinderVisible;
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetStarted
+// Notifies window about Started state change.
+// If started, tries to start viewfinder.
+// If not started, stops viewfinder.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetStarted(TBool aStarted)
+{
+    iStarted = aStarted;
+    if (iDisplay)
+    {
+        if (iStarted)
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EShowViewFinder);
+        }
+        else
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EHideViewFinder);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetDisplay
+// Sets iDisplay used to invoke callbacks from UI thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDisplay(MMMADisplay *aDisplay)
+{
+    if (iDisplay != aDisplay)
+    {
+        if (iDisplay)
+        {
+            // Clear the resources created within the old Display
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EDeleteViewFinder);
+        }
+
+        // Set the new Display
+        iDisplay = aDisplay;
+
+        if (iDisplay)
+        {
+            // Get a DSA resources for the new Display
+            iDisplay->UIGetDSAResources(*this, MMMADisplay::EMmaThread);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDestinationBitmapL
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
+{
+    // Ignored, this window will not be used for actual drawing
+    DEBUG("CMMACameraWindow::SetDestinationBitmapL");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::DrawFrameL
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
+{
+    // Ignored, this window will not be used for actual drawing
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDrawRect
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDrawRect(const TRect& aRect)
+{
+    // MMAPI thread
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    iDrawRect = aRect;
+
+    if (iDisplay)
+    {
+        iDisplay->UIGetCallback(*this, CMMACameraWindow::EResetViewFinder);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetDrawRectThread
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetDrawRectThread(const TRect& aRect)
+{
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    // Note: Runs in UI thread only
+
+    // Bitmap window's rect can be set in any thread.
+    if (iDrawRect != aRect)
+    {
+        iDrawRect = aRect;
+
+        // Stop and start ViewFinder to update position
+        ResetViewFinder();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::DrawRect
+//
+// ---------------------------------------------------------------------------
+//
+const TRect& CMMACameraWindow::DrawRect()
+{
+    return iDrawRect;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::WindowSize
+//
+// ---------------------------------------------------------------------------
+//
+TSize CMMACameraWindow::WindowSize()
+{
+    return iDrawRect.Size();
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetPosition
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetPosition(const TPoint& aPosition)
+{
+    // Note: Runs in UI thread only
+    SetDrawRectThread(TRect(aPosition, iDrawRect.Size()));
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetVisible
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
+{
+    iVisible = aVisible;
+
+    if (aUseEventServer)
+    {
+        // We are in UI thread now.
+        SetViewFinderVisibility(aVisible);
+    }
+    else
+    {
+        // MMAPI thread
+        if (iDisplay)
+        {
+            if (aVisible)
+            {
+                iDisplay->UIGetCallback(
+                    *this, CMMACameraWindow::EShowViewFinder);
+            }
+            else
+            {
+                iDisplay->UIGetCallback(
+                    *this, CMMACameraWindow::EHideViewFinder);
+            }
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetWindowRect
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetWindowRect(
+    const TRect& aRect,
+    MMMADisplay::TThreadType aThreadType)
+{
+    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect TL:%d,%d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect BR:%d,%d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    if (iClientRect != aRect)
+    {
+        iClientRect = aRect;
+
+        if (aThreadType == MMMADisplay::EUiThread)
+        {
+            ResetViewFinder();
+        }
+        else
+        {
+            iDisplay->UIGetCallback(
+                *this, CMMACameraWindow::EResetViewFinder);
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::WindowRect
+//
+// ---------------------------------------------------------------------------
+//
+const TRect& CMMACameraWindow::WindowRect()
+{
+    return iClientRect;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::GetDisplayWindowType
+//
+// ---------------------------------------------------------------------------
+//
+MMMADisplayWindow::TDisplayWindowType
+CMMACameraWindow::GetDisplayWindowType() const
+{
+    return EDisplayWindowTypeIsCamera;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::IsVisible
+//
+// ---------------------------------------------------------------------------
+//
+TBool CMMACameraWindow::IsVisible() const
+{
+    return iVisible;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::ContainerSet
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ContainerSet()
+{
+    // We are in UI thread now
+
+    // Container was probably not set when
+    // iDisplay was set,
+    // we can now try get the DSA stuff again
+    if (!iUICamera && iDisplay)
+    {
+        // Get a DSA stuff for the new Display
+        iDisplay->UIGetDSAResources(*this, MMMADisplay::EUiThread);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::ContainerDestroyed
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ContainerDestroyed()
+{
+    // We are in UI thread now
+    ReleaseUiResources();
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ReserveComplete
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ReserveComplete(TInt aError)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::ReserveComplete %d", aError);
+
+    if (aError == KErrNone)
+    {
+        // camera will notify completion with PowerOnComplete method.
+        iUICamera->PowerOn();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::PowerOnComplete
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::PowerOnComplete(TInt aError)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::PowerOnComplete %d", aError);
+
+    if (aError == KErrNone)
+    {
+        iCameraPowerOn = ETrue;
+        SetViewFinderVisibility(ETrue);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ViewFinderFrameReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::ViewFinderFrameReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::ImageReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ImageReady(CFbsBitmap* /*aBitmap*/,
+                                  HBufC8* /*aData*/,
+                                  TInt /*aError*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::ImageReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MCameraObserver
+// CMMACameraWindow::FrameBufferReady
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/,
+                                        TInt /*aError*/)
+{
+    // Empty implementation of the interface method
+    DEBUG("MMA::CMMACameraWindow::FrameBufferReady");
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MDirectScreenAccess.
+// CMMACameraWindow::AbortNow
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::AbortNow(
+    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
+{
+    SetViewFinderVisibility(EFalse);
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MDirectScreenAccess.
+// CMMACameraWindow::Restart
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::Restart(
+    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
+{
+    SetViewFinderVisibility(ETrue);
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::CMMACameraWindow
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CMMACameraWindow::CMMACameraWindow(TInt aCameraHandle):
+        iVisible(EFalse),
+        iStarted(EFalse),
+        iViewFinderVisible(EFalse),
+        iCameraPowerOn(EFalse),
+        iDrawRect(0, 0, 0, 0),
+        iClientRect(0, 0, 0, 0),
+        iCameraHandle(aCameraHandle),
+        iUICamera(NULL),
+        iDisplay(NULL),
+        iStarterTimer(NULL),
+        iDirectAccess(NULL),
+        iErrorIconBitmap(NULL),
+        iErrorIconMaskBitmap(NULL),
+        iRWindowRect(0, 0, 0, 0)
+{
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::UIStartViewFinder
+// Creates UI Camera.
+// This CCamera instance is duplicated from handle given to the constructor.
+// Have to be called from the thread which UI Camera will be controlled from.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::UIStartViewFinder(
+    RWsSession &aWs,
+    CWsScreenDevice &aScreenDevice,
+    RWindowBase &aWindow)
+{
+    DEBUG("MMA::CMMACameraWindow::UIStartViewFinder");
+
+    iWs = &aWs;
+    iScreenDevice = &aScreenDevice;
+    iWindow = &aWindow;
+
+    if (!iUICamera)
+    {
+        TRAPD(error, iUICamera =
+                  CCamera::NewDuplicateL(*this, iCameraHandle));
+
+        DEBUG_INT(
+            "MMA::CMMACameraWindow::UIStartViewFinder - NewDuplicateL %d",
+            error);
+
+        if (error == KErrNone)
+        {
+            iUICamera->Reserve();
+        }
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::SetViewFinderVisibility
+// If UI Camera have been created, it starts/hides the DirectViewFinder.
+// Have to be called from UI thread in which iUICamera instance was created.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetViewFinderVisibility(TBool aVisible)
+{
+    DEBUG_INT("MMA::CMMACameraWindow::SetViewFinderVisibility - %d",
+              aVisible);
+
+    if (!iUICamera || !iCameraPowerOn || iViewFinderVisible == aVisible)
+    {
+        return;
+    }
+
+    if (aVisible)
+    {
+        // Viewfinder is going to start
+        if (!iVisible || !iStarted)
+        {
+            return;
+        }
+
+        iViewFinderVisible = ETrue;
+
+        if (!iStarterTimer)
+        {
+            // If starter timer haven't been created yet, create an instance
+            TRAPD(
+                timerErr,
+                iStarterTimer = CPeriodic::NewL(CActive::EPriorityIdle));
+
+            if (timerErr != KErrNone)
+            {
+                DEBUG_INT(
+                    "MMA::CMMACameraWindow::SetViewFinderVisibility - timer error = %d",
+                    timerErr);
+                __ASSERT_DEBUG(EFalse, User::Invariant());
+            }
+        }
+
+        if (!iStarterTimer->IsActive())
+        {
+            iStarterTimer->Start(
+                KStarterTimeout,
+                0,
+                TCallBack(StarterTimerCallback, this));
+        }
+    }
+    else
+    {
+        // Viewfinder is going to be cancelled
+        DEBUG(
+            "MMA::CMMACameraWindow::SetViewFinderVisibility - Stopping VF");
+
+        if (iStarterTimer && iStarterTimer->IsActive())
+        {
+            // Cancel the running starter timer
+            iStarterTimer->Cancel();
+        }
+
+        if (iUICamera->ViewFinderActive())
+        {
+            iUICamera->StopViewFinder();
+        }
+
+        iViewFinderVisible = EFalse;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::StarterTimerCallback
+// Executed at the expiry of the iStartedTimer.
+// ---------------------------------------------------------------------------
+//
+TInt CMMACameraWindow::StarterTimerCallback(TAny* aThis)
+{
+    CMMACameraWindow* self = static_cast<CMMACameraWindow*>(aThis);
+    ASSERT(self);
+
+    self->StartViewFinder();
+
+    // We don't want to run the callback again
+    return EFalse;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MMMADisplayWindow
+// CMMACameraWindow::SetRWindowRect
+//
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::SetRWindowRect(const TRect& aRect,
+                                      MMMADisplay::TThreadType aThreadType)
+{
+    DEBUG_INT2("MID::CMMACameraWindow::SetRWindowRect TL %d %d",
+               aRect.iTl.iX, aRect.iTl.iY);
+    DEBUG_INT2("MID::CMMACameraWindow::SetRWindowRect BR %d %d",
+               aRect.iBr.iX, aRect.iBr.iY);
+
+    iRWindowRect = aRect;
+
+    if (MMMADisplay::EMmaThread == aThreadType)
+    {
+        if (iDisplay)
+        {
+            iDisplay->UIGetCallback(*this,
+                                    CMMACameraWindow::EResetViewFinder);
+        }
+    }
+    else if (MMMADisplay::EUiThread == aThreadType)
+    {
+        ResetViewFinder();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::StartViewFinder
+// Starts viewfinder.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::StartViewFinder()
+{
+    DEBUG(" < StartViewFinder");
+
+    ASSERT(iUICamera);
+    ASSERT(iCameraPowerOn);
+    ASSERT(iStarted);
+
+    iStarterTimer->Cancel();
+
+    // align client rect to RWindow, viewfinder
+    // display co-ordinates is w.r.t to RWindow
+    TRect relativeClientRect;
+    relativeClientRect = iClientRect;
+    relativeClientRect.Move(-iRWindowRect.iTl);
+
+    // Set the drawing area
+    TRect drawRect(iDrawRect);
+    drawRect.Move(relativeClientRect.iTl);
+
+    DEBUG_INT2(
+        "MMA::CMMACameraWindow::StartViewFinder - Starting VF TL:%d,%d",
+        drawRect.iTl.iX,
+        drawRect.iTl.iY);
+    DEBUG_INT2(
+        "MMA::CMMACameraWindow::StartViewFinder - Starting VF BR:%d,%d",
+        drawRect.iBr.iX,
+        drawRect.iBr.iY);
+
+    TRAPD(vfError, iUICamera->StartViewFinderDirectL(
+              *iWs, *iScreenDevice, *iWindow, drawRect));
+
+    if (vfError == KErrNone)
+    {
+        DEBUG("MMA::CMMACameraWindow::StartViewFinder - Start OK");
+    }
+    else
+    {
+        DEBUG_INT("MMA::CMMACameraWindow::StartViewFinder()  - \
+            StartViewFinderDirectL error=%d", vfError);
+
+        TRAPD(error, DrawViewFinderErrorL(vfError, drawRect));
+        if (KErrNone != error)
+        {
+            DEBUG_INT("MMA::CMMACameraWindow::StartViewFinder, \
+                DrawViewFinderErrorL error = %d", error);
+        }
+    }
+
+    DEBUG(" > StartViewFinder");
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::DrawViewFinderError()
+// Draws the error message to specified area.
+// Used in cases when viewfinder is unable to start.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::DrawViewFinderErrorL(
+    const TInt /*aError*/,
+    const TRect& aDrawRect)
+{
+    if (!iDirectAccess)
+    {
+        if (!iWs || !iScreenDevice || !iWindow) return;
+
+        DEBUG("MMA::CMMACameraWindow::DrawViewFinderErrorL - \
+            Instantiating CDirectScreenAccess");
+        iDirectAccess = CDirectScreenAccess::NewL(*iWs,
+                                     *iScreenDevice,
+                                     *iWindow,
+                                     *this);
+    }
+
+    TInt dcError = KErrNone;
+    if (!iDirectAccess->IsActive())
+    {
+        TRAP(dcError, iDirectAccess->StartL());
+    }
+
+    TRect drawRect(aDrawRect);
+
+    if (dcError == KErrNone)
+    {
+        drawRect.Intersection(iClientRect);
+        drawRect.Move(-iWindow->AbsPosition());
+
+        CFbsBitGc* directGc = iDirectAccess->Gc();
+        directGc->SetClippingRect(drawRect);
+        directGc->SetBrushColor(TRgb(128,128,128));
+        directGc->SetPenColor(TRgb(128,0,0));
+        directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
+        directGc->SetPenStyle(CGraphicsContext::ESolidPen);
+        directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+        directGc->DrawRect(drawRect);
+
+        if (!iErrorIconBitmap || !iErrorIconMaskBitmap)
+        {
+            if (iErrorIconBitmap)
+            {
+                delete iErrorIconBitmap;
+                iErrorIconBitmap = NULL;
+            }
+
+            if (iErrorIconMaskBitmap)
+            {
+                delete iErrorIconMaskBitmap;
+                iErrorIconMaskBitmap = NULL;
+            }
+
+            AknsUtils::CreateIconL(
+                AknsUtils::SkinInstance(),
+                KAknsIIDQgnIndiCam4Camera,
+                iErrorIconBitmap,
+                iErrorIconMaskBitmap,
+                KCameraAppBitmapFile,
+                EMbmCameraappQgn_indi_cam4_camera,
+                EMbmCameraappQgn_indi_cam4_camera_mask
+            );
+        }
+
+        //TRect iconRect
+        drawRect.iTl.iX += KErrorIconMargin;
+        drawRect.iTl.iY += KErrorIconMargin;
+        drawRect.iBr.iX -= KErrorIconMargin;
+        drawRect.iBr.iY -= KErrorIconMargin;
+
+        if (iErrorIconBitmap->SizeInPixels() != drawRect.Size())
+        {
+            AknIconUtils::SetSize(iErrorIconBitmap, drawRect.Size());
+            AknIconUtils::SetSize(iErrorIconMaskBitmap, drawRect.Size());
+        }
+
+        directGc->BitBltMasked(
+            drawRect.iTl, iErrorIconBitmap,
+            TRect(iErrorIconBitmap->SizeInPixels()),
+            iErrorIconMaskBitmap, EFalse);
+
+        iDirectAccess->ScreenDevice()->Update();
+    }
+
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ReleaseUiResources()
+// Stops the DirectViewFinder and deletes UI Camera instance
+// Have to be called from UI thread in which UI Camera
+// have been created before the CMMACameraWindow instance
+// is deleted.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ReleaseUiResources()
+{
+    if (iUICamera)
+    {
+        SetViewFinderVisibility(EFalse);
+        // iStarterTimer is cancelled by previous call
+        // it can be deleted now
+        delete iStarterTimer;
+        iStarterTimer = NULL;
+        iUICamera->Release();
+        delete iUICamera;
+        iUICamera = NULL;
+        iCameraPowerOn = EFalse;
+        if (iDirectAccess)
+        {
+            iDirectAccess->Cancel();
+            delete iDirectAccess;
+            iDirectAccess = NULL;
+        }
+        delete iErrorIconBitmap;
+        iErrorIconBitmap = NULL;
+        delete iErrorIconMaskBitmap;
+        iErrorIconMaskBitmap = NULL;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::ResetViewFinder
+// Resets (stops and starts) viewfinder
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::ResetViewFinder()
+{
+
+    if (iStarterTimer && !iStarterTimer->IsActive() && iStarted)
+    {
+        SetViewFinderVisibility(EFalse);
+        SetViewFinderVisibility(ETrue);
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// CMMACameraWindow::Destroy
+// Deletes this object.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::Destroy()
+{
+    // Delete itself
+    delete this;
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MUiEventConsumer.
+// CMMACameraWindow::MdcDSAResourcesCallback
+// Callback to iDisplay->UIGetDSAResources().
+// Invoked asynchronously from UI Event Server thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::MdcDSAResourcesCallback(
+    RWsSession &aWs,
+    CWsScreenDevice &aScreenDevice,
+    RWindowBase &aWindow)
+{
+    this->UIStartViewFinder(aWs, aScreenDevice, aWindow);
+}
+
+
+// ---------------------------------------------------------------------------
+// From class MUiEventConsumer.
+// CMMACameraWindow::MdcUICallback
+// Callback to iDisplay->UIGetCallback().
+// Invoked asynchronously from UI Event Server thread.
+// ---------------------------------------------------------------------------
+//
+void CMMACameraWindow::MdcUICallback(TInt aCallbackId)
+{
+    DEBUG("MMA::CMMACameraWindow::MdcUICallback");
+
+    switch (aCallbackId)
+    {
+    case EDeleteViewFinder:
+        ReleaseUiResources();
+        break;
+    case EHideViewFinder:
+        SetViewFinderVisibility(EFalse);
+        break;
+    case EShowViewFinder:
+        SetViewFinderVisibility(ETrue);
+        break;
+    case EResetViewFinder:
+        ResetViewFinder();
+        break;
+    case EDestroyWindow:
+        Destroy();
+        break;
+    }
+}
+
+
+//  END OF FILE
--- a/javauis/mmapi_akn/baseline/src.nga/cmmasurfacewindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/baseline/src.nga/cmmasurfacewindow.cpp	Tue May 25 12:34:19 2010 +0300
@@ -154,8 +154,8 @@
                 0.0f, // ignore
                 EVideoRotationNone,
                 EAutoScaleBestFit,
-                EHorizontalAlignLeft,
-                EVerticalAlignTop,
+                EHorizontalAlignCenter,
+                EVerticalAlignCenter,
                 (RWindow*)iWindow));
 
         return error;
@@ -629,8 +629,8 @@
             0.0f, // ignore
             EVideoRotationNone,
             EAutoScaleBestFit,
-            EHorizontalAlignLeft,
-            EVerticalAlignTop,
+            EHorizontalAlignCenter,
+            EVerticalAlignCenter,
             (RWindow*)iWindow);
 
     DEBUG("MID::CMMASurfaceWindow::InitVideoDisplayL -");
--- a/javauis/mmapi_akn/baseline/src/cmmacamerawindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,928 +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:  This class implements MMMADisplayWindow functionality
-*                for Camera viewfinder usage.
-*
-*/
-
-
-//  Include Files
-#include <eikenv.h>
-#include <gdi.h>
-#include <jdebug.h>
-#include <AknsUtils.h>
-#include <AknsDrawUtils.h>
-
-#include <cameraapp.mbg>
-
-// Used for iDisplay member
-
-#include "cmmacamerawindow.h"
-
-// Camera viewfinder start delay
-const TInt KStarterTimeout = 100000; //100 msecs
-
-// Margin of icon displayed instead of viewfinder in case of error
-const TInt KErrorIconMargin = 5; //5 pixels
-
-
-_LIT(KCameraAppBitmapFile, "z:\\resource\\apps\\cameraapp.mif");
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::NewL
-// Two-phased constructor.
-// Use this method to create a CMMACameraWindow instance.
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow* CMMACameraWindow::NewL(TInt aCameraHandle)
-{
-    CMMACameraWindow* self = new(ELeave)CMMACameraWindow(aCameraHandle);
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::~CMMACameraWindow
-// Destructor.
-// NOTE: iUICamera have to be deleted by ReleaseUiResources() called
-//       from UI thread
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow::~CMMACameraWindow()
-{
-    // It's not allowed to delete any nonsharable object here.
-    // This must be done in Destroy().
-    // If the iDisplay is set,
-    // instance should be deleted by sending
-    // event from UI to be received by MUiEventConsumer.
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ViewFinderActive
-// Gets an information if the viewfinder is started.
-// ---------------------------------------------------------------------------
-//
-TBool CMMACameraWindow::ViewFinderActive()
-{
-    return iUICamera && iViewFinderVisible;
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetStarted
-// Notifies window about Started state change.
-// If started, tries to start viewfinder.
-// If not started, stops viewfinder.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetStarted(TBool aStarted)
-{
-    iStarted = aStarted;
-    if (iDisplay)
-    {
-        if (iStarted)
-        {
-            iDisplay->UIGetCallback(
-                *this, CMMACameraWindow::EShowViewFinder);
-        }
-        else
-        {
-            iDisplay->UIGetCallback(
-                *this, CMMACameraWindow::EHideViewFinder);
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetDisplay
-// Sets iDisplay used to invoke callbacks from UI thread.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDisplay(MMMADisplay *aDisplay)
-{
-    if (iDisplay != aDisplay)
-    {
-        if (iDisplay)
-        {
-            // Clear the resources created within the old Display
-            iDisplay->UIGetCallback(
-                *this, CMMACameraWindow::EDeleteViewFinder);
-        }
-
-        // Set the new Display
-        iDisplay = aDisplay;
-
-        if (iDisplay)
-        {
-            // Get a DSA resources for the new Display
-            iDisplay->UIGetDSAResources(*this, MMMADisplay::EMmaThread);
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDestinationBitmapL
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-    DEBUG("CMMACameraWindow::SetDestinationBitmapL");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::DrawFrameL
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDrawRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDrawRect(const TRect& aRect)
-{
-    // MMAPI thread
-    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRect BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iDrawRect = aRect;
-
-    if (iDisplay)
-    {
-        iDisplay->UIGetCallback(*this, CMMACameraWindow::EResetViewFinder);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDrawRectThread
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDrawRectThread(const TRect& aRect)
-{
-    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    DEBUG_INT2("MMA::CMMACameraWindow::SetDrawRectThread BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    // Note: Runs in UI thread only
-
-    // Bitmap window's rect can be set in any thread.
-    if (iDrawRect != aRect)
-    {
-        iDrawRect = aRect;
-
-        // Stop and start ViewFinder to update position
-        ResetViewFinder();
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::DrawRect
-//
-// ---------------------------------------------------------------------------
-//
-const TRect& CMMACameraWindow::DrawRect()
-{
-    return iDrawRect;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::WindowSize
-//
-// ---------------------------------------------------------------------------
-//
-TSize CMMACameraWindow::WindowSize()
-{
-    return iDrawRect.Size();
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetPosition
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetPosition(const TPoint& aPosition)
-{
-    // Note: Runs in UI thread only
-    SetDrawRectThread(TRect(aPosition, iDrawRect.Size()));
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetVisible
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
-{
-    iVisible = aVisible;
-
-    if (aUseEventServer)
-    {
-        // We are in UI thread now.
-        SetViewFinderVisibility(aVisible);
-    }
-    else
-    {
-        // MMAPI thread
-        if (iDisplay)
-        {
-            if (aVisible)
-            {
-                iDisplay->UIGetCallback(
-                    *this, CMMACameraWindow::EShowViewFinder);
-            }
-            else
-            {
-                iDisplay->UIGetCallback(
-                    *this, CMMACameraWindow::EHideViewFinder);
-            }
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetWindowRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetWindowRect(
-    const TRect& aRect,
-    MMMADisplay::TThreadType aThreadType)
-{
-    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    DEBUG_INT2("MMA::CMMACameraWindow::SetWindowRect BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    if (iClientRect != aRect)
-    {
-        iClientRect = aRect;
-
-        if (aThreadType == MMMADisplay::EUiThread)
-        {
-            ResetViewFinder();
-        }
-        else
-        {
-            iDisplay->UIGetCallback(
-                *this, CMMACameraWindow::EResetViewFinder);
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::WindowRect
-//
-// ---------------------------------------------------------------------------
-//
-const TRect& CMMACameraWindow::WindowRect()
-{
-    return iClientRect;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::GetDisplayWindowType
-//
-// ---------------------------------------------------------------------------
-//
-MMMADisplayWindow::TDisplayWindowType
-CMMACameraWindow::GetDisplayWindowType() const
-{
-    return EDisplayWindowTypeIsCamera;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::IsVisible
-//
-// ---------------------------------------------------------------------------
-//
-TBool CMMACameraWindow::IsVisible() const
-{
-    return iVisible;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::ContainerSet
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ContainerSet()
-{
-    // We are in UI thread now
-
-    // Container was probably not set when
-    // iDisplay was set,
-    // we can now try get the DSA stuff again
-    if (!iUICamera && iDisplay)
-    {
-        // Get a DSA stuff for the new Display
-        iDisplay->UIGetDSAResources(*this, MMMADisplay::EUiThread);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::ContainerDestroyed
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ContainerDestroyed()
-{
-    // We are in UI thread now
-    ReleaseUiResources();
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ReserveComplete
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ReserveComplete(TInt aError)
-{
-    DEBUG_INT("MMA::CMMACameraWindow::ReserveComplete %d", aError);
-
-    if (aError == KErrNone)
-    {
-        // camera will notify completion with PowerOnComplete method.
-        iUICamera->PowerOn();
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::PowerOnComplete
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::PowerOnComplete(TInt aError)
-{
-    DEBUG_INT("MMA::CMMACameraWindow::PowerOnComplete %d", aError);
-
-    if (aError == KErrNone)
-    {
-        iCameraPowerOn = ETrue;
-        SetViewFinderVisibility(ETrue);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ViewFinderFrameReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
-{
-    // Empty implementation of the interface method
-    DEBUG("MMA::CMMACameraWindow::ViewFinderFrameReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ImageReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ImageReady(CFbsBitmap* /*aBitmap*/,
-                                  HBufC8* /*aData*/,
-                                  TInt /*aError*/)
-{
-    // Empty implementation of the interface method
-    DEBUG("MMA::CMMACameraWindow::ImageReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::FrameBufferReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/,
-                                        TInt /*aError*/)
-{
-    // Empty implementation of the interface method
-    DEBUG("MMA::CMMACameraWindow::FrameBufferReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MDirectScreenAccess.
-// CMMACameraWindow::AbortNow
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::AbortNow(
-    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
-{
-    SetViewFinderVisibility(EFalse);
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MDirectScreenAccess.
-// CMMACameraWindow::Restart
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::Restart(
-    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
-{
-    SetViewFinderVisibility(ETrue);
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::CMMACameraWindow
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow::CMMACameraWindow(TInt aCameraHandle):
-        iVisible(EFalse),
-        iStarted(EFalse),
-        iViewFinderVisible(EFalse),
-        iCameraPowerOn(EFalse),
-        iDrawRect(0, 0, 0, 0),
-        iClientRect(0, 0, 0, 0),
-        iCameraHandle(aCameraHandle),
-        iUICamera(NULL),
-        iDisplay(NULL),
-        iStarterTimer(NULL),
-        iDirectAccess(NULL),
-        iErrorIconBitmap(NULL),
-        iErrorIconMaskBitmap(NULL),
-        iRWindowRect(0, 0, 0, 0)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::UIStartViewFinder
-// Creates UI Camera.
-// This CCamera instance is duplicated from handle given to the constructor.
-// Have to be called from the thread which UI Camera will be controlled from.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::UIStartViewFinder(
-    RWsSession &aWs,
-    CWsScreenDevice &aScreenDevice,
-    RWindowBase &aWindow)
-{
-    DEBUG("MMA::CMMACameraWindow::UIStartViewFinder");
-
-    iWs = &aWs;
-    iScreenDevice = &aScreenDevice;
-    iWindow = &aWindow;
-
-    if (!iUICamera)
-    {
-        TRAPD(error, iUICamera =
-                  CCamera::NewDuplicateL(*this, iCameraHandle));
-
-        DEBUG_INT(
-            "MMA::CMMACameraWindow::UIStartViewFinder - NewDuplicateL %d",
-            error);
-
-        if (error == KErrNone)
-        {
-            iUICamera->Reserve();
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetViewFinderVisibility
-// If UI Camera have been created, it starts/hides the DirectViewFinder.
-// Have to be called from UI thread in which iUICamera instance was created.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetViewFinderVisibility(TBool aVisible)
-{
-    DEBUG_INT("MMA::CMMACameraWindow::SetViewFinderVisibility - %d",
-              aVisible);
-
-    if (!iUICamera || !iCameraPowerOn || iViewFinderVisible == aVisible)
-    {
-        return;
-    }
-
-    if (aVisible)
-    {
-        // Viewfinder is going to start
-        if (!iVisible || !iStarted)
-        {
-            return;
-        }
-
-        iViewFinderVisible = ETrue;
-
-        if (!iStarterTimer)
-        {
-            // If starter timer haven't been created yet, create an instance
-            TRAPD(
-                timerErr,
-                iStarterTimer = CPeriodic::NewL(CActive::EPriorityIdle));
-
-            if (timerErr != KErrNone)
-            {
-                DEBUG_INT(
-                    "MMA::CMMACameraWindow::SetViewFinderVisibility - timer error = %d",
-                    timerErr);
-                __ASSERT_DEBUG(EFalse, User::Invariant());
-            }
-        }
-
-        if (!iStarterTimer->IsActive())
-        {
-            iStarterTimer->Start(
-                KStarterTimeout,
-                0,
-                TCallBack(StarterTimerCallback, this));
-        }
-    }
-    else
-    {
-        // Viewfinder is going to be cancelled
-        DEBUG(
-            "MMA::CMMACameraWindow::SetViewFinderVisibility - Stopping VF");
-
-        if (iStarterTimer && iStarterTimer->IsActive())
-        {
-            // Cancel the running starter timer
-            iStarterTimer->Cancel();
-        }
-
-        if (iUICamera->ViewFinderActive())
-        {
-            iUICamera->StopViewFinder();
-        }
-
-        iViewFinderVisible = EFalse;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::StarterTimerCallback
-// Executed at the expiry of the iStartedTimer.
-// ---------------------------------------------------------------------------
-//
-TInt CMMACameraWindow::StarterTimerCallback(TAny* aThis)
-{
-    CMMACameraWindow* self = static_cast<CMMACameraWindow*>(aThis);
-    ASSERT(self);
-
-    self->StartViewFinder();
-
-    // We don't want to run the callback again
-    return EFalse;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetRWindowRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetRWindowRect(const TRect& aRect,
-                                      MMMADisplay::TThreadType aThreadType)
-{
-    DEBUG_INT2("MID::CMMACameraWindow::SetRWindowRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    DEBUG_INT2("MID::CMMACameraWindow::SetRWindowRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iRWindowRect = aRect;
-
-    if (MMMADisplay::EMmaThread == aThreadType)
-    {
-        if (iDisplay)
-        {
-            iDisplay->UIGetCallback(*this,
-                                    CMMACameraWindow::EResetViewFinder);
-        }
-    }
-    else if (MMMADisplay::EUiThread == aThreadType)
-    {
-        ResetViewFinder();
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::StartViewFinder
-// Starts viewfinder.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::StartViewFinder()
-{
-    DEBUG(" < StartViewFinder");
-
-    ASSERT(iUICamera);
-    ASSERT(iCameraPowerOn);
-    ASSERT(iStarted);
-
-    iStarterTimer->Cancel();
-
-    // align client rect to RWindow, viewfinder
-    // display co-ordinates is w.r.t to RWindow
-    TRect relativeClientRect;
-    relativeClientRect = iClientRect;
-    relativeClientRect.Move(-iRWindowRect.iTl);
-
-    // Set the drawing area
-    TRect drawRect(iDrawRect);
-    drawRect.Move(relativeClientRect.iTl);
-
-    DEBUG_INT2(
-        "MMA::CMMACameraWindow::StartViewFinder - Starting VF TL:%d,%d",
-        drawRect.iTl.iX,
-        drawRect.iTl.iY);
-    DEBUG_INT2(
-        "MMA::CMMACameraWindow::StartViewFinder - Starting VF BR:%d,%d",
-        drawRect.iBr.iX,
-        drawRect.iBr.iY);
-
-    TRAPD(vfError, iUICamera->StartViewFinderDirectL(
-              *iWs, *iScreenDevice, *iWindow, drawRect));
-
-    if (vfError == KErrNone)
-    {
-        DEBUG("MMA::CMMACameraWindow::StartViewFinder - Start OK");
-    }
-    else
-    {
-        DEBUG_INT("MMA::CMMACameraWindow::StartViewFinder()  - \
-            StartViewFinderDirectL error=%d", vfError);
-
-        TRAPD(error, DrawViewFinderErrorL(vfError, drawRect));
-        DEBUG_INT("MMA::CMMACameraWindow::StartViewFinder, \
-            DrawViewFinderErrorL error = %d", error);
-    }
-
-    DEBUG(" > StartViewFinder");
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::DrawViewFinderError()
-// Draws the error message to specified area.
-// Used in cases when viewfinder is unable to start.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::DrawViewFinderErrorL(
-    const TInt /*aError*/,
-    const TRect& aDrawRect)
-{
-    if (!iDirectAccess)
-    {
-        if (!iWs || !iScreenDevice || !iWindow) return;
-
-        DEBUG("MMA::CMMACameraWindow::DrawViewFinderErrorL - \
-            Instantiating CDirectScreenAccess");
-        iDirectAccess = CDirectScreenAccess::NewL(*iWs,
-                                     *iScreenDevice,
-                                     *iWindow,
-                                     *this);
-    }
-
-    TInt dcError = KErrNone;
-    if (!iDirectAccess->IsActive())
-    {
-        TRAP(dcError, iDirectAccess->StartL());
-    }
-
-    TRect drawRect(aDrawRect);
-
-    if (dcError == KErrNone)
-    {
-        drawRect.Intersection(iClientRect);
-        drawRect.Move(-iWindow->AbsPosition());
-
-        CFbsBitGc* directGc = iDirectAccess->Gc();
-        directGc->SetClippingRect(drawRect);
-        directGc->SetBrushColor(TRgb(128,128,128));
-        directGc->SetPenColor(TRgb(128,0,0));
-        directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
-        directGc->SetPenStyle(CGraphicsContext::ESolidPen);
-        directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
-        directGc->DrawRect(drawRect);
-
-        if (!iErrorIconBitmap || !iErrorIconMaskBitmap)
-        {
-            if (iErrorIconBitmap)
-            {
-                delete iErrorIconBitmap;
-                iErrorIconBitmap = NULL;
-            }
-
-            if (iErrorIconMaskBitmap)
-            {
-                delete iErrorIconMaskBitmap;
-                iErrorIconMaskBitmap = NULL;
-            }
-
-            AknsUtils::CreateIconL(
-                AknsUtils::SkinInstance(),
-                KAknsIIDQgnIndiCam4Camera,
-                iErrorIconBitmap,
-                iErrorIconMaskBitmap,
-                KCameraAppBitmapFile,
-                EMbmCameraappQgn_indi_cam4_camera,
-                EMbmCameraappQgn_indi_cam4_camera_mask
-            );
-        }
-
-        //TRect iconRect
-        drawRect.iTl.iX += KErrorIconMargin;
-        drawRect.iTl.iY += KErrorIconMargin;
-        drawRect.iBr.iX -= KErrorIconMargin;
-        drawRect.iBr.iY -= KErrorIconMargin;
-
-        if (iErrorIconBitmap->SizeInPixels() != drawRect.Size())
-        {
-            AknIconUtils::SetSize(iErrorIconBitmap, drawRect.Size());
-            AknIconUtils::SetSize(iErrorIconMaskBitmap, drawRect.Size());
-        }
-
-        directGc->BitBltMasked(
-            drawRect.iTl, iErrorIconBitmap,
-            TRect(iErrorIconBitmap->SizeInPixels()),
-            iErrorIconMaskBitmap, EFalse);
-
-        iDirectAccess->ScreenDevice()->Update();
-    }
-
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ReleaseUiResources()
-// Stops the DirectViewFinder and deletes UI Camera instance
-// Have to be called from UI thread in which UI Camera
-// have been created before the CMMACameraWindow instance
-// is deleted.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ReleaseUiResources()
-{
-    if (iUICamera)
-    {
-        SetViewFinderVisibility(EFalse);
-        // iStarterTimer is cancelled by previous call
-        // it can be deleted now
-        delete iStarterTimer;
-        iStarterTimer = NULL;
-        iUICamera->Release();
-        delete iUICamera;
-        iUICamera = NULL;
-        iCameraPowerOn = EFalse;
-        if (iDirectAccess)
-        {
-            iDirectAccess->Cancel();
-            delete iDirectAccess;
-            iDirectAccess = NULL;
-        }
-        delete iErrorIconBitmap;
-        iErrorIconBitmap = NULL;
-        delete iErrorIconMaskBitmap;
-        iErrorIconMaskBitmap = NULL;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ResetViewFinder
-// Resets (stops and starts) viewfinder
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ResetViewFinder()
-{
-
-    if (iStarterTimer && !iStarterTimer->IsActive() && iStarted)
-    {
-        SetViewFinderVisibility(EFalse);
-        SetViewFinderVisibility(ETrue);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::Destroy
-// Deletes this object.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::Destroy()
-{
-    // Delete itself
-    delete this;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MUiEventConsumer.
-// CMMACameraWindow::MdcDSAResourcesCallback
-// Callback to iDisplay->UIGetDSAResources().
-// Invoked asynchronously from UI Event Server thread.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::MdcDSAResourcesCallback(
-    RWsSession &aWs,
-    CWsScreenDevice &aScreenDevice,
-    RWindowBase &aWindow)
-{
-    this->UIStartViewFinder(aWs, aScreenDevice, aWindow);
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MUiEventConsumer.
-// CMMACameraWindow::MdcUICallback
-// Callback to iDisplay->UIGetCallback().
-// Invoked asynchronously from UI Event Server thread.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::MdcUICallback(TInt aCallbackId)
-{
-    DEBUG("MMA::CMMACameraWindow::MdcUICallback");
-
-    switch (aCallbackId)
-    {
-    case EDeleteViewFinder:
-        ReleaseUiResources();
-        break;
-    case EHideViewFinder:
-        SetViewFinderVisibility(EFalse);
-        break;
-    case EShowViewFinder:
-        SetViewFinderVisibility(ETrue);
-        break;
-    case EResetViewFinder:
-        ResetViewFinder();
-        break;
-    case EDestroyWindow:
-        Destroy();
-        break;
-    }
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_akn/baseline/src/cmmaoutputstreamevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/baseline/src/cmmaoutputstreamevent.cpp	Tue May 25 12:34:19 2010 +0300
@@ -20,7 +20,11 @@
 
 #include "cmmaoutputstreamevent.h"
 
-
+CMMAOutputStreamEvent::~CMMAOutputStreamEvent()
+	{
+		iMutex.Close();
+	}
+	
 CMMAOutputStreamEvent::CMMAOutputStreamEvent(jmethodID aHandleEventMethod,
         jobject aNotifyObject)
         : CMMAEvent(EReusableEvent),
@@ -28,24 +32,31 @@
         iListenerObject(aNotifyObject)
 {
     iState = EMMAEventNotActive;
+    iMutex.CreateLocal();
 }
 
 void CMMAOutputStreamEvent::SetLength(TInt aLength)
 {
+		iMutex.Wait();
     iLength = aLength;
     iState = EMMAEventActive;
+    iMutex.Signal();
 }
 
 
 void CMMAOutputStreamEvent::SetStatus(TInt aStatus)
 {
+		iMutex.Wait();
     iStatus = aStatus;
     iState = EMMAEventActive;
+    iMutex.Signal();
 }
 
 void CMMAOutputStreamEvent::SetState(CMMAOutputStreamEvent::TMMAOutputStreamState aState)
 {
+		iMutex.Wait();
     iState = aState;
+    iMutex.Signal();
 }
 
 CMMAOutputStreamEvent::TMMAOutputStreamState CMMAOutputStreamEvent::State()
@@ -57,7 +68,7 @@
 {
     DEBUG_INT2("CMMAOutputStreamEvent::Dispatch, len=%d status=%d-",
                iLength, iStatus);
-
+		iMutex.Wait();
     if (iState == EMMAEventActive)
     {
         aJni.CallVoidMethod(iListenerObject,
@@ -74,6 +85,7 @@
 
         delete this;
     }
+    iMutex.Signal();
     // else event is not active
 }
 
--- a/javauis/mmapi_akn/baseline/src/outputstreamwriter.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/baseline/src/outputstreamwriter.cpp	Tue May 25 12:34:19 2010 +0300
@@ -77,8 +77,8 @@
                                         outputBufferSize, // returns readed size
                                         &readStatus);
 
-    aJni->ReleaseByteArrayElements(aOutputBuffer, outputBuffer, JNI_COMMIT);
-    aJni->ReleaseIntArrayElements(aOutputBufferSize, outputBufferSize, JNI_COMMIT);
+    aJni->ReleaseByteArrayElements(aOutputBuffer, outputBuffer, 0);
+    aJni->ReleaseIntArrayElements(aOutputBufferSize, outputBufferSize, 0);
 
     if (err != KErrNone)
     {
--- a/javauis/mmapi_akn/build/javamobilemedia_0x2002DCC2.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/mmapi_akn/build/javamobilemedia_0x2002DCC2.mmp	Tue May 25 12:34:19 2010 +0300
@@ -114,7 +114,6 @@
 SOURCE		cmmabitmapwindow.cpp
 SOURCE		cmmacameraplayer.cpp
 SOURCE		cmmacameraplayerfactory.cpp
-SOURCE		cmmacamerawindow.cpp
 SOURCE		cmmacanvasdisplay.cpp
 SOURCE		cmmacontrol.cpp
 SOURCE		cmmadeleterefevent.cpp
@@ -189,6 +188,7 @@
 SOURCE		emcsourceinfo.cpp
 
 SOURCEPATH 	../baseline/src.nga
+SOURCE		cmmacamerawindow.cpp
 SOURCE		cmmasurfacewindow.cpp
 SOURCE		cmmavideoplayer.cpp
 
@@ -262,6 +262,13 @@
 LIBRARY		libc.lib
 LIBRARY		libm.lib
 LIBRARY		libdl.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		charconv.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
 
 CAPABILITY		all -tcb 
 
@@ -282,10 +289,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationframepositioningcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements FramePositioningControl for animation
-*
-*/
-
-
-#ifndef CMMAANIMATIONFRAMEPOSITIONINGCONTROL_H
-#define CMMAANIMATIONFRAMEPOSITIONINGCONTROL_H
-
-//  INTERNAL INCLUDES
-#include "cmmaanimationplayer.h"
-#include "cmmaframepositioningcontrol.h" // base class
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class MIHLImageViewer;
-
-//  CLASS DECLARATION
-/**
-*   This class implements FramePositioningControl for video player
-*/
-NONSHARABLE_CLASS(CMMAAnimationFramePositioningControl) :
-        public CMMAFramePositioningControl
-{
-public:
-    static CMMAAnimationFramePositioningControl* NewL(CMMAAnimationPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAAnimationFramePositioningControl();
-
-protected:
-    /**
-     * Constructor.
-     */
-    CMMAAnimationFramePositioningControl(CMMAAnimationPlayer* aPlayer);
-
-    void ConstructL(CMMAAnimationPlayer* aPlayer);
-
-public: // From CMMAFramePositioningControl
-    TInt SeekL(TInt aFrameNumber);
-    TInt SkipL(TInt aFramesToSkip);
-    void MapFrameToTimeL(TInt aFrameNumber, TInt64* aMediaTime);
-    TInt MapTimeToFrameL(TInt64* aMediaTime);
-
-private: // New methods
-    TInt FindFrame(MIHLImageViewer* aViewer, TInt aFrameNumber);
-
-private: // Data
-    CMMAAnimationPlayer* iPlayer;
-
-};
-
-
-#endif // CMMAANIMATIONFRAMEPOSITIONINGCONTROL_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing animated images.
-*
-*/
-
-
-#ifndef CMMAANIMATIONPLAYER_H
-#define CMMAANIMATIONPLAYER_H
-
-//  INCLUDES
-#include <w32std.h>
-#include "cmmaplayer.h"
-#include "mmmaguiplayer.h"
-#include "mmmasnapshot.h"
-#include "rmmatempfile.h"
-#include "MIHLViewerObserver.h"
-#include "MIHLImageViewer.h"
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-class CMMAAnimationWindow;
-class MIHLFileImage;
-class MIHLBitmap;
-class CFbsBitmap;
-
-// CONSTANTS
-_LIT(KMMAVideoPlayer, "VideoPlayer");
-
-NONSHARABLE_CLASS(MMMAAnimationObserver)
-{
-public: // new methods
-    /**
-     * Listener for animation advancing
-     * @param aFrame current frame
-     * @param aMediaTime current media time
-     */
-    virtual void AnimationAdvancedL(TInt aFrame, TInt64 aMediaTime) = 0;
-};
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing animated images.
-*
-*/
-NONSHARABLE_CLASS(CMMAAnimationPlayer): public CMMAPlayer,
-        public MMMAGuiPlayer,
-        public MMMASnapshot,
-        public MIHLViewerObserver
-{
-public: // Construction
-    static CMMAAnimationPlayer* NewLC();
-    static CMMAAnimationPlayer* NewLC(const TDesC& aFileName);
-
-    //   Destructor
-    ~CMMAAnimationPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAAnimationPlayer();
-    void ConstructL();
-
-public: // from CMMAPlayer
-    void SetPlayerListenerObjectL(jobject aListenerObject,
-                                  JNIEnv* aJni,
-                                  MMMAEventPoster* aEventPoster);
-    void RealizeL();
-    void PrefetchL();
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void DeallocateL();
-    void GetDuration(TInt64* aDuration);
-    const TDesC& Type();
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-
-public: // from CMMAPlayer/MMMASourceStreamListener
-    void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-
-public: // new methods
-    void PrefetchFileL();
-    void PrefetchDataL(const TDesC8& aData);
-
-    /**
-     * Check whether this player is playing from a file locator
-     * @return ETrue if is a file player, EFalse otherwise
-     */
-    TBool IsFilePlayer();
-
-    // Finds current frame for given media time
-    TInt FindFrame(TInt64 aTime);
-
-    // Calculates media time for specified frame
-    TInt64 MediaTimeForFrame(TInt aFrameIndex);
-
-    // Frame duration of specified frame
-    TTimeIntervalMicroSeconds32 FrameDuration(TInt aFrameIndex);
-
-    MIHLImageViewer* Viewer();
-
-    // Setter for frame listener, used for stop time control
-    void SetAnimationObserver(MMMAAnimationObserver* aAnimationObserver);
-
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    TInt RateL();
-
-private: // new methods
-    void PrepareViewerL();
-    void ProcessCurrentFrameL();
-
-public: // From MMMAGuiPlayer
-    void SetDisplayL(MMMADisplay* aDisplay);
-    TSize SourceSize();
-    void NotifyWithStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                               const TDesC& aStringEventData);
-
-    MMMASnapshot* SnapshoterL();
-
-public: // From MMMASnapshot
-    MMMASnapshot::TEncoding TakeSnapshotL(TRequestStatus* aStatus,
-                                          const TSize& aSize,
-                                          const CMMAImageSettings& aSettings);
-    CFbsBitmap* SnapshotBitmap();
-    HBufC8* SnapshotEncoded();
-
-public: // From MIHLViewerObserver
-    virtual void ViewerBitmapChangedL();
-    virtual void ViewerError(TInt aError);
-
-    private: // Data
-
-    /**
-     * Display to draw animation.
-     */
-    MMMADisplay* iDisplay;
-
-    /**
-     * Window to draw animation.
-     */
-    CMMAAnimationWindow* iWindow;
-
-    /**
-     * Dimensions of animation.
-     */
-    TSize iSourceSize;
-
-    /**
-     * Animated image to play. Owned.
-     */
-    MIHLFileImage* iImage;
-
-    /**
-     * Destination bitmap for animation. Owned.
-     */
-    MIHLBitmap* iBitmap;
-
-    /**
-     * Animation viewer. Owned.
-     */
-    MIHLImageViewer* iViewer;
-
-    /**
-     * Bitmap for snapshot. Ownership is transferred for
-     * snapshot requester, but owned if not null.
-     */
-    CFbsBitmap* iSnapshotBitmap;
-
-    /**
-     * File system session for IHL interfacing
-     */
-    RFs iFSession;
-
-    /**
-     * Animation frame count. Held locally for optimization.
-     */
-    TInt iFrameCount;
-
-    /**
-     * Possible file name, owned
-     */
-    HBufC* iFileName;
-
-    /**
-     * Current Media Time
-     */
-    TInt64 iMediaTime;
-
-    /**
-     * Animation listener
-     */
-    MMMAAnimationObserver* iAnimationObserver;
-
-    /**
-     * Current rate
-     */
-    TInt iCurrentRate;
-
-    /**
-     * Hold the information whether playback should be started
-     * from beginning on next start or from current position
-     */
-    TBool iEndReached;
-
-    /**
-     * EndOfMedia will be delivered when next frame arrives if
-     * iSendEndOfMediaOnNextFrame is true
-     */
-    TBool iSendEndOfMediaOnNextFrame;
-};
-
-#endif // CMMAANIMATIONPLAYER_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating animation player
-*
-*/
-
-
-#ifndef CMMAANIMATIONPLAYERFACTORY_H
-#define CMMAANIMATIONPLAYERFACTORY_H
-
-//  INCLUDES
-#include "mmmaplayerfactory.h"
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CMMAAnimationPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating animation player.
-*
-*/
-NONSHARABLE_CLASS(CMMAAnimationPlayerFactory): public MMMAPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAAnimationPlayerFactory* NewLC();
-    ~CMMAAnimationPlayerFactory();
-
-private: // Constructor
-    CMMAAnimationPlayerFactory();
-
-public: // From MMMAPlayerFactory
-
-    // Creates new player according to a content type.
-    virtual CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    // Creates new player according to a locator
-    virtual CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                                      const TDesC& aMiddlePart,
-                                      const TDesC& aParameters);
-
-    // Creates new player according to a header data
-    virtual CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    // Gets player's supported content types.
-    virtual void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                           CDesC16Array& aMimeTypeArray);
-
-    // Gets player's supported protocols for the content type.
-    virtual void GetSupportedProtocolsL(const TDesC& aContentType,
-                                        CDesC16Array& aProtocolArray);
-
-private:
-    // Create instance of animation player with sufficient controls
-    CMMAAnimationPlayer* CreateAnimationPlayerL();
-
-    // Create instance of animation player with sufficient controls, with specified file
-    CMMAAnimationPlayer* CreateAnimationPlayerL(const TDesC& aFileName);
-
-    // Add animation controls to player
-    void AddControlsL(CMMAAnimationPlayer* aPlayer);
-
-};
-
-#endif // CMMAANIMATIONPLAYERFACTORY_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationratecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements AnimationRateControl functionality.
-*
-*/
-
-
-#ifndef CMMAANIMATIONRATECONTROL_H
-#define CMMAANIMATIONRATECONTROL_H
-
-// EXTERNAL INCLUDES
-
-//  INTERNAL INCLUDES
-#include "cmmaratecontrol.h" // base class
-
-// CONSTANTS
-
-class CMMAAnimationPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class implements AnimationRateControl interface.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAAnimationRateControl): public CMMARateControl
-{
-public:
-    /**
-     * Creates new CMMAAnimationRateControl.
-     *
-     * @param aPlayer Player that plays the content.
-     */
-    static CMMAAnimationRateControl* NewL(CMMAAnimationPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAAnimationRateControl();
-protected:
-    /**
-     * Constructor.
-     * @param aPlayer Player that plays the content.
-     */
-    CMMAAnimationRateControl(CMMAAnimationPlayer* aPlayer);
-
-    /**
-     * Initializes this control.
-     */
-    void ConstructL();
-
-public: // From CMMARateControl
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    TInt RateL();
-
-private: // Data
-    /**
-     * Used to control animation.
-     */
-    CMMAAnimationPlayer* iPlayer;
-
-};
-
-
-#endif // CMMAANIMATIONRATECONTROL_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationstoptimecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling for animation player
-*
-*/
-
-
-#ifndef CMMAANIMATIONSTOPTIMECONTROL_H
-#define CMMAANIMATIONSTOPTIMECONTROL_H
-
-//  INCLUDES
-#include "cmmaanimationplayer.h"
-#include "cmmastoptimecontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for stoptime controlling for animation
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAnimationStopTimeControl): public CMMAStopTimeControl,
-        public MMMAAnimationObserver
-{
-public:
-    static CMMAAnimationStopTimeControl* NewL(CMMAAnimationPlayer* aPlayer);
-    ~CMMAAnimationStopTimeControl();
-
-protected:
-    CMMAAnimationStopTimeControl(CMMAAnimationPlayer* aPlayer);
-
-public: // from CMMAStopTimeControl
-    void SetStopTimeL(const TInt64& aTime);
-
-public: // from MMMAAnimationObserver
-    void AnimationAdvancedL(TInt aFrame, TInt64 aMediaTime);
-};
-
-#endif // CMMAANIMATIONSTOPTIMECONTROL_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/inc/cmmaanimationwindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* 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"
-* 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 abstract class implements MMMADisplayWindow functionality
-*                in CFbsBitmap based displays.
-*
-*/
-
-
-#ifndef CMMAANIMATIONWINDOW_H
-#define CMMAANIMATIONWINDOW_H
-
-//  INCLUDES
-#include <MIHLImageViewer.h>
-//#include "MMMADisplayWindow.h"
-#include "cmmabitmapwindow.h"
-#include "mmafunctionserver.h"
-
-//  CONSTANTS
-
-//  FORWARD DECLARATIONS
-//class CFbsBitmap;
-
-
-//  CLASS DECLARATION
-/**
-*   This abstract class implements MMMADisplayWindow functionality in
-*   CFbsBitmap based displays.
-*
-*
-*/
-
-
-NONSHARABLE_CLASS(CMMAAnimationWindow): public CMMABitmapWindow
-{
-public:     // Constructors and destructors
-    ~CMMAAnimationWindow();   // Destructor ()
-
-    static CMMAAnimationWindow* NewL(MMAFunctionServer* aEventSource);
-
-protected:  // Constructors and destructors
-    // Default constructor, protected to allow derivation
-    CMMAAnimationWindow(MMAFunctionServer* aEventSource);
-
-public: // new methods
-    /**
-     * Setter for viewer, used for changing the size
-     */
-    void SetViewer(MIHLImageViewer* aViewer);
-
-public: // Methods derived from MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-
-    /*private:
-        static void StaticSetDrawRect(
-            CMMAAnimationWindow* aWindow,
-            TRect aRect,
-            MMAFunctionServer* aEventSource );*/
-
-protected:  // Data
-    /**
-     * not owned, used for switching from UI thread to MMA thread
-     */
-    MMAFunctionServer* iEventSource;
-
-    /**
-     * Pointer to bitmap context, used for BitBlt instead of
-     * slow DrawRect
-     */
-    CBitmapContext* iBitContext;
-
-    /**
-     * Viewer used for setting new size, not owned
-     */
-    MIHLImageViewer* iViewer;
-};
-
-#endif // CMMAANIMATIONWINDOW_H
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationframepositioningcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements FramePositioningControl for animation
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "MIHLImageViewer.h"
-#include "cmmaanimationframepositioningcontrol.h"
-
-CMMAAnimationFramePositioningControl*
-CMMAAnimationFramePositioningControl::NewL(CMMAAnimationPlayer* aPlayer)
-{
-    CMMAAnimationFramePositioningControl* self =
-        new(ELeave) CMMAAnimationFramePositioningControl(aPlayer);
-    return self;
-}
-
-CMMAAnimationFramePositioningControl::
-CMMAAnimationFramePositioningControl(CMMAAnimationPlayer* aPlayer)
-        : CMMAFramePositioningControl(aPlayer), iPlayer(aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationFramePositioningControl::CMMAAnimationFramePositioningControl");
-}
-
-CMMAAnimationFramePositioningControl::~CMMAAnimationFramePositioningControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationFramePositioningControl::~CMMAAnimationFramePositioningControl");
-}
-
-TInt CMMAAnimationFramePositioningControl::SeekL(TInt aFrameNumber)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAnimationFramePositioningControl::SeekL");
-    MIHLImageViewer* viewer = iPlayer->Viewer();
-    if (!viewer)
-    {
-        return KErrNotFound;
-    }
-    TInt frameNumber = FindFrame(viewer, aFrameNumber);
-    TInt64 mediaTime = iPlayer->MediaTimeForFrame(frameNumber);
-    // adjust wanted media time to get right frame (equal value returns one too small)
-    mediaTime++;
-    iPlayer->SetMediaTimeL(&mediaTime);
-    frameNumber = viewer->AnimationFrame();
-    return frameNumber;
-}
-
-TInt CMMAAnimationFramePositioningControl::SkipL(TInt aFramesToSkip)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAnimationFramePositioningControl::SkipL");
-    MIHLImageViewer* viewer = iPlayer->Viewer();
-    if (!viewer)
-    {
-        return KErrNotFound;
-    }
-
-    TInt frameNumber = viewer->AnimationFrame();
-
-    SeekL(frameNumber + aFramesToSkip);
-
-    // Calculate number of frames skipped
-    return viewer->AnimationFrame() - frameNumber;
-}
-
-void CMMAAnimationFramePositioningControl::MapFrameToTimeL(
-    TInt aFrameNumber,
-    TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAnimationFramePositioningControl::MapFrameToTimeL");
-    MIHLImageViewer* viewer = iPlayer->Viewer();
-    if (!viewer || (aFrameNumber < 0) ||
-            (aFrameNumber >= viewer->AnimationFrameCount()))
-    {
-        *aMediaTime = KErrNotFound;
-    }
-    else
-    {
-        *aMediaTime = iPlayer->MediaTimeForFrame(aFrameNumber);
-    }
-}
-TInt CMMAAnimationFramePositioningControl::MapTimeToFrameL(
-    TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAnimationFramePositioningControl::MapTimeToFrameL");
-    MIHLImageViewer* viewer = iPlayer->Viewer();
-    TInt64 duration;
-    iPlayer->GetDuration(&duration);
-    if (!viewer || (*aMediaTime < 0) ||
-            (duration == KErrNotFound))
-    {
-        return KErrNotFound;
-    }
-    return iPlayer->FindFrame(*aMediaTime);
-}
-
-TInt CMMAAnimationFramePositioningControl::FindFrame(MIHLImageViewer* aViewer, TInt aFrameNumber)
-{
-    TInt frame = 0;
-    TInt count = aViewer->AnimationFrameCount();
-    if (aFrameNumber >= count)
-    {
-        frame = count - 1;
-    }
-    else if (aFrameNumber > 0)
-    {
-        frame = aFrameNumber;
-    }
-    return frame;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,621 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing animated images.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-// For Image Handling Library (IHL)
-#include "IHLImageFactory.h"
-#include "MIHLFileImage.h"
-#include "IHLViewerFactory.h"
-#include "MIHLImageViewer.h"
-#include "MIHLBitmap.h"
-#include "IHLBitmapUtil.h"
-
-// MMAPI includes
-#include "mmmadisplay.h"
-
-// Class header
-#include "cmmaanimationplayer.h"
-#include "cmmaanimationwindow.h"
-
-namespace
-{
-const TInt64 KMMATimeUnknown = -1;
-_LIT(KMMAAnimationContentType, "image/gif");
-
-// Approximated minimum showing time of each frame is 0.12s
-// this value basically depends on how fast device can load frames
-// it is not quaranteed anyway that the media time is equal to
-// clock time, so this needed to be only somewhat close
-
-_LIT(KVideoControlName, "VideoControl");
-}
-
-CMMAAnimationPlayer* CMMAAnimationPlayer::NewLC()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::NewLC");
-    CMMAAnimationPlayer* self = new(ELeave) CMMAAnimationPlayer();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAAnimationPlayer* CMMAAnimationPlayer::NewLC(const TDesC& aFileName)
-{
-    CMMAAnimationPlayer* self = NewLC();
-    self->iFileName = aFileName.AllocL();
-    return self;
-}
-
-CMMAAnimationPlayer::~CMMAAnimationPlayer()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::~CMMAAnimationPlayer +");
-    if (iViewer && iViewer->IsPlaying())
-    {
-        iViewer->Stop();
-    }
-    delete iWindow;
-    delete iSnapshotBitmap;
-    delete iViewer;
-    // viewer has reference to iImage,
-    // thus deletion order is important.
-    delete iBitmap;
-    delete iImage;
-
-    delete iFileName;
-
-    iFSession.Close();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::~CMMAAnimationPlayer -");
-}
-
-CMMAAnimationPlayer::CMMAAnimationPlayer()
-        : iFrameCount(0), iMediaTime(KMMATimeUnknown), iEndReached(EFalse),
-        iSendEndOfMediaOnNextFrame(EFalse)
-{
-}
-
-void CMMAAnimationPlayer::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::ConstructL +");
-    CMMAPlayer::ConstructL();
-    HBufC* contentType = KMMAAnimationContentType().AllocL();
-    SetContentType(contentType);
-
-    // Connect to file session, needed also when playing from data
-    User::LeaveIfError(iFSession.Connect());
-
-    // File session must be share protected for IHL
-    User::LeaveIfError(iFSession.ShareProtected());
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::ConstructL -");
-}
-
-void CMMAAnimationPlayer::SetPlayerListenerObjectL(
-    jobject aListenerObject,
-    JNIEnv* aJni,
-    MMMAEventPoster* aEventPoster)
-{
-    CMMAPlayer::SetPlayerListenerObjectL(aListenerObject,
-                                         aJni,
-                                         aEventPoster);
-
-    // this method must be called only ones
-    __ASSERT_DEBUG(!iWindow, User::Invariant());
-
-    // create window for animationplayer
-    // event poster is always MMAFunctionServer type.
-    iWindow = CMMAAnimationWindow::NewL(
-                  static_cast< MMAFunctionServer* >(iEventPoster));
-}
-
-void CMMAAnimationPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::RealizeL");
-    // For file locator file must be prefetched here because
-    // FramePositioningControl must know duration of media
-    // in realized state
-    if (iFileName)
-    {
-        TRAPD(err, PrefetchFileL());
-        if (err != KErrNone)
-        {
-            User::Leave(err);
-        }
-    }
-    CMMAPlayer::RealizeL();
-}
-
-void CMMAAnimationPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::PrefetchL +");
-    __ASSERT_DEBUG((iSourceStreams.Count() > 0) || iFileName, User::Invariant());
-
-    if (iFileName)
-    {
-        // file data is already fetched in when realizing
-
-        // If initDisplayMode was called before prefetch,
-        // then the display must notified about source size.
-        if (iDisplay)
-        {
-            iDisplay->SourceSizeChanged(iSourceSize);
-            NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-        }
-
-       // ChangeState(EPrefetched);
-       // PostActionCompleted(KErrNone);
-        // we can go to prefetched state immediately
-        PostActionCompletedFile();
-        ChangeState(EPrefetched);       
-    }
-    else
-    {
-        // Using TDes -- load the whole animation
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-
-    // CMMASourceStream will notify with ReadCompleted
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::PrefetchL -");
-}
-
-void CMMAAnimationPlayer::StartL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::StartL +");
-
-    // If end of media has been reached, then
-    // start from beginning
-    if (iEndReached)
-    {
-        iEndReached = EFalse;
-        iViewer->SetAnimationFrame(0);
-        iMediaTime = 0;
-    }
-    PostLongEvent(CMMAPlayerEvent::EStarted, iMediaTime);
-
-    // process current frame
-    ProcessCurrentFrameL();
-
-    // progress to next frame (start playback) only if rate is not zero
-    if (iCurrentRate > 0)
-    {
-        iViewer->Play();
-    }
-    ChangeState(EStarted);
-    PostActionCompletedStart();
-   // PostActionCompleted(KErrNone);   // java start return
-    
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::StartL -");
-}
-
-void CMMAAnimationPlayer::ProcessCurrentFrameL()
-{
-    if (iSendEndOfMediaOnNextFrame)
-    {
-        iSendEndOfMediaOnNextFrame = EFalse;
-        // we are reached the end
-        if (!iRepeatForever)
-        {
-            iRepeatCount++;
-            if (iRepeatCount >= iRepeatNumberOfTimes)
-            {
-                LOG( EJavaMMAPI, EInfo, "CMMAAnimationPlayer:ProcessCurrentFrameL: Reached repeat count, Stopping");
-                // end looping, do not send stopped event
-                StopL(EFalse);
-                iViewer->SetAnimationFrame(iFrameCount - 1);
-                SetLoopCount(iRepeatNumberOfTimes);   // reset loop count
-
-                // Signal that end of media has been reached so on next
-                // start playback will be started from beginning. This is needed
-                // because if user sets media time to end of media, then start
-                // should not start from beginning but just deliver end of media.
-                // After that, the next start should start from beginning.
-                iEndReached = ETrue;
-            }
-        }
-        PostLongEvent(CMMAPlayerEvent::EEndOfMedia, iMediaTime);
-        LOG( EJavaMMAPI, EInfo, "CMMAAnimationPlayer:ProcessCurrentFrameL: sent END_OF_MEDIA");
-
-        // Prevents this frame from being viewed if playback has terminated
-        // (e.g. not looping)
-        if (iEndReached)
-        {
-            return;
-        }
-    }
-
-    // draw current frame to display if we have it
-    if (iDisplay)
-    {
-        const CFbsBitmap& bitmap = iBitmap->Bitmap();
-        iDisplay->DrawFrameL(&bitmap);
-    }
-
-    TInt currentFrame = iViewer->AnimationFrame();
-    if (currentFrame == 0)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAAnimationPlayer:ProcessCurrentFrameL: Reset mediatime");
-        // reset media time when looping
-        iMediaTime = 0;
-    }
-    iMediaTime += FrameDuration(currentFrame).Int();
-
-    // Media time has gone over duration if user has
-    // set media time explicitely to duration.
-    if (iMediaTime > iDuration)
-    {
-        iMediaTime = iDuration;
-    }
-
-    if (currentFrame == (iFrameCount - 1))
-    {
-        // End has been reached, so EndOfMedia is sent when
-        // duration of last frame has passed
-        iSendEndOfMediaOnNextFrame = ETrue;
-    }
-
-    // inform observer
-    if (iAnimationObserver)
-    {
-        iAnimationObserver->AnimationAdvancedL(iViewer->AnimationFrame(), iMediaTime);
-    }
-}
-
-void CMMAAnimationPlayer::StopL(TBool aPostEvent)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::StopL +");
-    iViewer->Stop();
-    // adjust mediatime
-    if (aPostEvent)
-    {
-        PostLongEvent(CMMAPlayerEvent::EStopped, iMediaTime);
-    }
-    ChangeState(EPrefetched);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::StopL -");
-}
-
-void CMMAAnimationPlayer::DeallocateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::DeallocateL +");
-    // If player is in starte state when deallocate is called,
-    // player is stopped from java side -> state is changed to
-    // prefetched.
-    if (iViewer)
-    {
-        if (iViewer->IsPlaying())
-            iViewer->Stop();
-
-        delete iViewer;
-        iViewer = NULL;
-    }
-
-    if (iState == EPrefetched)
-    {
-        ResetSourceStreams();
-        iEndReached = EFalse;
-        iSendEndOfMediaOnNextFrame = EFalse;
-        ChangeState(ERealized);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::DeallocateL -");
-}
-
-void CMMAAnimationPlayer::GetDuration(TInt64* aDuration)
-{
-    *aDuration = iDuration;
-}
-
-TInt CMMAAnimationPlayer::FindFrame(TInt64 aTime)
-{
-    __ASSERT_DEBUG(iImage, User::Invariant());
-
-    // if we are out of bounds
-    if (aTime > iDuration)
-    {
-        return KErrNotFound;
-    }
-
-    TInt64 time = 0;
-    TInt fIndex = 0;
-    while ((time < aTime) && (fIndex < iFrameCount))
-    {
-        time += FrameDuration(fIndex++).Int();
-    }
-
-    // adjust to previous frame
-    if (fIndex > 0)
-    {
-        fIndex--;
-    }
-
-    return fIndex;
-}
-
-TInt64 CMMAAnimationPlayer::MediaTimeForFrame(TInt aFrameIndex)
-{
-    __ASSERT_DEBUG((aFrameIndex <= iFrameCount) && (aFrameIndex >= 0),
-                   User::Invariant());
-
-    TInt64 time = 0;
-    for (TInt fIndex = 0; fIndex < aFrameIndex; fIndex++)
-    {
-        time += FrameDuration(fIndex).Int();
-    }
-    return time;
-}
-
-TTimeIntervalMicroSeconds32 CMMAAnimationPlayer::FrameDuration(TInt aFrameIndex)
-{
-    __ASSERT_DEBUG(iImage, User::Invariant());
-    TTimeIntervalMicroSeconds32 fDur = iImage->AnimationFrameDelay(aFrameIndex);
-    const TTimeIntervalMicroSeconds32 KMMAMinimumFrameTime = 120000;
-
-    if (fDur < KMMAMinimumFrameTime)
-    {
-        fDur = KMMAMinimumFrameTime;
-    }
-    return fDur;
-}
-
-void CMMAAnimationPlayer::SetMediaTimeL(TInt64* aTime)
-{
-    if (!iImage && !iViewer)
-    {
-        // not yet prefetched
-        *aTime = KErrNotSupported;
-    }
-    else
-    {
-        // Media time of last frame is not the same as duration of
-        // media, so if media time of duration is requested, then it must
-        // be given out altough media time of last frame is lower than that.
-        if (*aTime >= iDuration)
-        {
-            User::LeaveIfError(iViewer->SetAnimationFrame(iFrameCount - 1));
-            iMediaTime = iDuration;
-        }
-        else
-        {
-            TInt frame = FindFrame(*aTime);
-            User::LeaveIfError(iViewer->SetAnimationFrame(frame));
-            iMediaTime = MediaTimeForFrame(frame);
-        }
-        *aTime = iMediaTime;
-        iEndReached = EFalse;
-        iSendEndOfMediaOnNextFrame = EFalse;
-    }
-
-}
-
-void CMMAAnimationPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    *aMediaTime = iMediaTime;
-}
-
-const TDesC& CMMAAnimationPlayer::Type()
-{
-    return KMMAVideoPlayer;
-}
-
-void CMMAAnimationPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        TRAPD(err, PrefetchDataL(aData));
-        if (err == KErrNone)
-        {
-            ChangeState(EPrefetched);
-        }
-        PostActionCompleted(err);
-    }
-}
-
-void CMMAAnimationPlayer::PrefetchFileL()
-{
-    iImage = IHLImageFactory::OpenFileImageL(iFSession, *iFileName);
-    PrepareViewerL();
-}
-
-void CMMAAnimationPlayer::PrefetchDataL(const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAAnimationPlayer::PrefetchDataL aData size %d",
-              aData.Size());
-
-    // Create source image from data
-    iImage = IHLImageFactory::OpenBufferedFileImageL(iFSession, aData);
-    PrepareViewerL();
-}
-
-TBool CMMAAnimationPlayer::IsFilePlayer()
-{
-    if (iFileName != NULL)
-    {
-        return ETrue;
-    }
-    return EFalse;
-}
-
-void CMMAAnimationPlayer::PrepareViewerL()
-{
-    // Non-animated gifs are not supported
-    if (!(iImage->IsAnimation()))
-    {
-        User::Leave(KErrNotSupported);
-    }
-
-    // Store image dimensions
-    iSourceSize = iImage->Size();
-
-    // Create destination bitmap
-    iBitmap = IHLBitmap::CreateL();
-    User::LeaveIfError(iBitmap->Create(iSourceSize, iImage->DisplayMode()));
-
-    // Create image viewer
-    iViewer = IHLViewerFactory::CreateImageViewerL(
-                  iSourceSize,
-                  *iImage, // source
-                  *iBitmap, // destination
-                  *this);  // reference to MIHLViewerObserver
-
-    // Set viewer for window
-    iWindow->SetViewer(iViewer);
-
-    // Store animation frame count locally
-    iFrameCount = iViewer->AnimationFrameCount();
-
-    // calculate duration
-    iDuration = MediaTimeForFrame(iFrameCount);
-
-    // set media time to begin
-    iMediaTime = 0;
-
-    // If init has been already done
-    if (iDisplay)
-    {
-        iDisplay->SourceSizeChanged(iSourceSize);
-        NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-    }
-}
-
-MIHLImageViewer* CMMAAnimationPlayer::Viewer()
-{
-    return iViewer;
-}
-
-void CMMAAnimationPlayer::SetAnimationObserver(MMMAAnimationObserver* aAnimationObserver)
-{
-    iAnimationObserver = aAnimationObserver;
-}
-
-TInt CMMAAnimationPlayer::SetRateL(TInt aRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationPlayer::SetRateL");
-    if ((iState == EStarted) && (iCurrentRate != aRate))
-    {
-        if (aRate <= 0)
-        {
-            iViewer->Stop();
-        }
-        else
-        {
-            iViewer->Play();
-        }
-    }
-    iCurrentRate = aRate;
-    return iCurrentRate;
-}
-
-TInt CMMAAnimationPlayer::RateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationPlayer::RateL");
-    return iCurrentRate;
-}
-
-void CMMAAnimationPlayer::SetDisplayL(MMMADisplay* aDisplay)
-{
-    // now it is ready to draw
-    iDisplay = aDisplay;
-    iDisplay->SetWindowL(iWindow);
-
-    // if state < prefeteched then we dont know actual source size yet
-    // and it will be set after prefetch
-    if (iState >= EPrefetched ||
-            (iFileName && iState == ERealized))
-    {
-        iDisplay->SourceSizeChanged(iSourceSize);
-        NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-    }
-}
-
-TSize CMMAAnimationPlayer::SourceSize()
-{
-    return iSourceSize;
-}
-
-void CMMAAnimationPlayer::NotifyWithStringEvent(
-    CMMAPlayerEvent::TEventType aEventType,
-    const TDesC& aStringEventData)
-{
-    PostStringEvent(aEventType, aStringEventData);
-}
-
-MMMASnapshot* CMMAAnimationPlayer::SnapshoterL()
-{
-    return this;
-}
-
-MMMASnapshot::TEncoding CMMAAnimationPlayer::TakeSnapshotL(TRequestStatus* aStatus,
-        const TSize& /*aSize*/,
-        const CMMAImageSettings& /*aSettings*/)
-{
-    if (iBitmap)
-    {
-        // Bitmap has to be copied to get ownership of the bitmap instance.
-        iSnapshotBitmap = IHLBitmapUtil::CopyBitmapL(iBitmap->Bitmap());
-    }
-    else
-    {
-        // When content comes from a stream, iBitmap is not available
-        // until prefetched state is entered. In this case an empty bitmap
-        // is returned instead.
-        iSnapshotBitmap = new(ELeave) CFbsBitmap();
-    }
-    // notify the caller, error code or KErrNone
-    User::RequestComplete(aStatus, KErrNone);
-
-    // Return raw bitmap encoding and thus SnapshotEncoded() should not
-    // get called later on.
-    return EBitmap;
-}
-
-CFbsBitmap* CMMAAnimationPlayer::SnapshotBitmap()
-{
-    CFbsBitmap* bitmap = iSnapshotBitmap;
-    // ownership is transferred to caller
-    iSnapshotBitmap = NULL;
-    return bitmap;
-}
-
-HBufC8* CMMAAnimationPlayer::SnapshotEncoded()
-{
-    // This method should never be called.
-    // Asserted in debug build to be sure.
-    __ASSERT_DEBUG(EFalse, User::Invariant());
-
-    return NULL;
-}
-
-void CMMAAnimationPlayer::ViewerBitmapChangedL()
-{
-    if (iState == EStarted)
-    {
-        ProcessCurrentFrameL();
-    }
-}
-
-void CMMAAnimationPlayer::ViewerError(TInt /*aError*/)
-{
-    // Not implemented currently because
-    // not implemented by IHL either.
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating animation player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideocontrol.h"
-#include "cmmaanimationratecontrol.h"
-#include "cmmaanimationstoptimecontrol.h"
-#include "cmmaanimationframepositioningcontrol.h"
-#include "cmmaanimationplayer.h"
-#include "cmmaanimationplayerfactory.h"
-
-// Animation type info
-_LIT(KMMAAnimationMimeTypeGIF, "image/gif");
-_LIT(KMMAAnimationSuffixGIF, "gif");
-
-// header data and length
-_LIT8(KMMAAnimationGIFVersion, "GIF89a");
-const TUint8 KMMAGifVersionLength = 6;
-
-CMMAAnimationPlayerFactory* CMMAAnimationPlayerFactory::NewLC()
-{
-    CMMAAnimationPlayerFactory* pFactory =
-        new(ELeave) CMMAAnimationPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAAnimationPlayerFactory::CMMAAnimationPlayerFactory()
-{
-}
-
-
-CMMAAnimationPlayerFactory::~CMMAAnimationPlayerFactory()
-{
-}
-
-// Creates new player according to a content type.
-CMMAPlayer* CMMAAnimationPlayerFactory::CreatePlayerL(
-    const TDesC& aContentType)
-{
-    CMMAPlayer* player = NULL;
-    if (aContentType == KMMAAnimationMimeTypeGIF)
-    {
-        player = CreateAnimationPlayerL();
-    }
-    return player;
-}
-
-// Creates new player according to a locator
-CMMAPlayer* CMMAAnimationPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& /*aParameters*/)
-{
-    CMMAPlayer* player = NULL;
-    if (aProtocol == KMMAFileProtocol)
-    {
-        // filename ends to gif suffix
-        if (aMiddlePart.Right(KMMAAnimationSuffixGIF().Length()) ==
-                KMMAAnimationSuffixGIF())
-        {
-            player = CreateAnimationPlayerL(aMiddlePart);
-        }
-        else
-        {
-            // try to recognize from headerdata
-            RFs fs;
-            CleanupClose< RFs >::PushL(fs);
-            User::LeaveIfError(fs.Connect());
-
-            RFile file;
-            CleanupClose< RFile >::PushL(file);
-
-            User::LeaveIfError(file.Open(fs, aMiddlePart, EFileRead));
-
-            TBuf8< KMMAGifVersionLength > header;
-            User::LeaveIfError(file.Read(header));
-
-            CleanupStack::PopAndDestroy(2);   // fs, file
-
-            if (header == KMMAAnimationGIFVersion())
-            {
-                player = CreateAnimationPlayerL(aMiddlePart);
-            }
-        }
-    }
-
-    return (CMMAPlayer*) player;
-}
-
-// Creates new player according to a header data
-CMMAPlayer* CMMAAnimationPlayerFactory::CreatePlayerL(
-    const TDesC8& aHeaderData)
-{
-    CMMAPlayer* player = NULL;
-    TPtrC8 header = aHeaderData.Left(KMMAAnimationGIFVersion().Length());
-    if (header == KMMAAnimationGIFVersion())
-    {
-        player = CreateAnimationPlayerL();
-    }
-    return player;
-}
-
-// Gets player's supported content types.
-void CMMAAnimationPlayerFactory::GetSupportedContentTypesL(
-    const TDesC& aProtocol,
-    CDesC16Array& aMimeTypeArray)
-{
-    if (aProtocol == KNullDesC ||
-            aProtocol == KMMAHttpProtocol ||
-            aProtocol == KMMAHttpsProtocol ||
-            aProtocol == KMMAFileProtocol)
-    {
-        aMimeTypeArray.AppendL(KMMAAnimationMimeTypeGIF);
-    }
-}
-
-// Gets player's supported protocols for the content type.
-void CMMAAnimationPlayerFactory::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aProtocolArray)
-{
-    if (aContentType == KNullDesC ||
-            aContentType == KMMAAnimationMimeTypeGIF)
-    {
-        aProtocolArray.AppendL(KMMAHttpProtocol);
-        aProtocolArray.AppendL(KMMAHttpsProtocol);
-        aProtocolArray.AppendL(KMMAFileProtocol);
-    }
-}
-
-CMMAAnimationPlayer* CMMAAnimationPlayerFactory::CreateAnimationPlayerL(const TDesC& aFileName)
-{
-    CMMAAnimationPlayer* player = CMMAAnimationPlayer::NewLC(aFileName);
-    AddControlsL(player);
-    CleanupStack::Pop(); // player
-    return player;
-}
-
-CMMAAnimationPlayer* CMMAAnimationPlayerFactory::CreateAnimationPlayerL()
-{
-    CMMAAnimationPlayer* player = CMMAAnimationPlayer::NewLC();
-    AddControlsL(player);
-    CleanupStack::Pop(); // player
-    return player;
-}
-
-void CMMAAnimationPlayerFactory::AddControlsL(CMMAAnimationPlayer* aPlayer)
-{
-    CMMAVideoControl* videoControl = new(ELeave) CMMAVideoControl(aPlayer);
-    CleanupStack::PushL(videoControl);
-    aPlayer->AddControlL(videoControl);
-    CleanupStack::Pop(videoControl);
-
-    CMMAAnimationStopTimeControl* stopTimeControl =
-        CMMAAnimationStopTimeControl::NewL(aPlayer);
-    CleanupStack::PushL(stopTimeControl);
-    aPlayer->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    // Own RateControl
-    CMMAAnimationRateControl* rateControl =
-        CMMAAnimationRateControl::NewL(aPlayer);
-    CleanupStack::PushL(rateControl);
-    aPlayer->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-
-    // FramePositioningControl is only supported for file locator
-    if (aPlayer->IsFilePlayer())
-    {
-        CMMAAnimationFramePositioningControl* animationFramePositioningControl =
-            CMMAAnimationFramePositioningControl::NewL(aPlayer);
-        CleanupStack::PushL(animationFramePositioningControl);
-        aPlayer->AddControlL(animationFramePositioningControl);
-        CleanupStack::Pop(animationFramePositioningControl);
-    }
-
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmaanimationratecontrol.h"
-#include "cmmaanimationplayer.h"
-
-
-// -----------------------------------------------------------------------------
-// CMMAAnimationRateControl::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CMMAAnimationRateControl* CMMAAnimationRateControl::NewL(CMMAAnimationPlayer* aPlayer)
-{
-    CMMAAnimationRateControl* self = new(ELeave) CMMAAnimationRateControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-// -----------------------------------------------------------------------------
-// CMMAAnimationRateControl::CMMAAnimationRateControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CMMAAnimationRateControl::CMMAAnimationRateControl(CMMAAnimationPlayer* aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationRateControl::CMMAAnimationRateControl");
-    iPlayer = aPlayer;
-}
-
-// Destructor
-CMMAAnimationRateControl::~CMMAAnimationRateControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationRateControl::~CMMAAnimationRateControl");
-}
-
-// -----------------------------------------------------------------------------
-// CMMAAnimationRateControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CMMAAnimationRateControl::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationRateControl::ConstructL");
-    iPlayer->SetRateL(KMMADefaultRate);
-}
-
-// -----------------------------------------------------------------------------
-// CMMAAnimationRateControl::SetRateL
-// Set rate to minimum or default rate depending on parameter. Informs player
-// that rate has changed. Returns set rate.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CMMAAnimationRateControl::SetRateL(TInt aRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationRateControl::SetRateL");
-    TInt rate = aRate;
-
-    if (rate <= KMMAMinRate)
-    {
-        rate = KMMAMinRate;
-    }
-    else
-    {
-        rate = KMMADefaultRate;
-    }
-    return iPlayer->SetRateL(rate);
-}
-
-// -----------------------------------------------------------------------------
-// CMMAAnimationRateControl::RateL
-// Returns current rate.
-//
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CMMAAnimationRateControl::RateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationRateControl::RateL");
-    return iPlayer->RateL();
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationstoptimecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32std.h>
-
-#include "cmmaanimationstoptimecontrol.h"
-#include "cmmaplayer.h"
-
-CMMAAnimationStopTimeControl* CMMAAnimationStopTimeControl::NewL(CMMAAnimationPlayer* aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationStopTimeControl::NewL");
-    CMMAAnimationStopTimeControl* control =
-        new(ELeave) CMMAAnimationStopTimeControl(aPlayer);
-    aPlayer->SetAnimationObserver(control);
-    return control;
-}
-
-
-CMMAAnimationStopTimeControl::~CMMAAnimationStopTimeControl()
-{
-}
-
-
-CMMAAnimationStopTimeControl::CMMAAnimationStopTimeControl(CMMAAnimationPlayer* aPlayer)
-        : CMMAStopTimeControl(aPlayer)
-{
-}
-
-void CMMAAnimationStopTimeControl::SetStopTimeL(const TInt64& aTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationStopTimeControl::SetStopTimeL");
-    iStopTime = aTime;
-}
-
-void CMMAAnimationStopTimeControl::AnimationAdvancedL(TInt /*aFrame*/, TInt64 aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAnimationStopTimeControl::AnimationAdvancedL");
-    if (aMediaTime > iStopTime)
-    {
-        iPlayer->StopL(EFalse);
-        iPlayer->PostLongEvent(CMMAPlayerEvent::EStoppedAtTime, aMediaTime);
-        iStopTime = iNoTimer;
-    }
-}
-
-
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/animated_gif_notUsed/src/cmmaanimationwindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* 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"
-* 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 abstract class implements MMMADisplayWindow functionality
-*                in CFbsBitmap based displays.
-*
-*/
-
-
-//  Include Files
-#include <logger.h>
-#include <bitdev.h>
-#include "cmmaanimationwindow.h"
-
-// Destructor (virtual by CBase)
-CMMAAnimationWindow::~CMMAAnimationWindow()
-{
-    delete iBitContext;
-}
-
-CMMAAnimationWindow* CMMAAnimationWindow::NewL(
-    MMAFunctionServer* aEventSource)
-{
-    CMMAAnimationWindow* self =
-        new(ELeave)CMMAAnimationWindow(aEventSource);
-    return self;
-}
-
-CMMAAnimationWindow::CMMAAnimationWindow(MMAFunctionServer* aEventSource):
-        iEventSource(aEventSource)
-{
-}
-
-void CMMAAnimationWindow::SetViewer(MIHLImageViewer* aViewer)
-{
-    iViewer = aViewer;
-}
-
-void CMMAAnimationWindow::SetDestinationBitmapL(CFbsBitmap* aBitmap)
-{
-    CMMABitmapWindow::SetDestinationBitmapL(aBitmap);
-    User::LeaveIfError(iBitmapDevice->CreateBitmapContext(iBitContext));
-}
-
-void CMMAAnimationWindow::DrawFrameL(const CFbsBitmap* aBitmap)
-{
-    if (iBitmap)
-    {
-        iBitContext->BitBlt(iDrawRect.iTl, aBitmap);
-    }
-}
-
-// Local wrapper function to SetDrawRect method
-LOCAL_C void StaticSetDrawRect(
-    CMMAAnimationWindow* aWindow,
-    const TRect* aRect)
-{
-    aWindow->SetDrawRect(*aRect);
-}
-
-void CMMAAnimationWindow::SetDrawRect(const TRect& aRect)
-{
-    iDrawRect = aRect;
-    if (iViewer)
-    {
-        TReal zoomRatio = 1.0;
-        if ((iViewer->SourceSize().iWidth - aRect.Width()) >
-                (iViewer->SourceSize().iHeight - aRect.Height()))
-        {
-            // calculate zoom ratio from width
-            zoomRatio = (TReal)aRect.Width() / (TReal)iViewer->SourceSize().iWidth;
-        }
-        else
-        {
-            // calculate zoom ratio from height
-            zoomRatio = (TReal)aRect.Height() / (TReal)iViewer->SourceSize().iHeight;
-        }
-
-        iViewer->SetViewerSize(iDrawRect.Size());
-        iViewer->SetZoomRatio(zoomRatio);
-    }
-}
-
-void CMMAAnimationWindow::SetDrawRectThread(const TRect& aRect)
-{
-    iEventSource->ExecuteV(&StaticSetDrawRect,
-                           this,
-                           &aRect);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreammetadatacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2002 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: CMMAAudioStreamMetaDataControl is a concrete class for getting
-*              metadata from an audio media.
-*
-*/
-
-#ifndef CMMAAUDIOSTREAMMETADATACONTROL_H
-#define CMMAAUDIOSTREAMMETADATACONTROL_H
-
-//  INCLUDES
-#include <mmfcontroller.h>
-#include <MetaDataUtility.h>
-#include <MetaDataFieldContainer.h>
-#include "cmmametadatacontrol.h"
-
-// Constants
-_LIT(KMetaDataSongTitle, "title");
-_LIT(KMetaDataArtist, "author");
-_LIT(KMetaDataAlbum, "album");
-_LIT(KMetaDataYear, "year of recording");
-_LIT(KMetaDataComment, "comment");
-_LIT(KMetaDataAlbumTrack, "album track");
-_LIT(KMetaDataGenre, "genre");
-_LIT(KMetaDataComposer, "composer");
-_LIT(KMetaDataCopyright, "copyright");
-_LIT(KMetaDataOriginalArtist, "original artist");
-_LIT(KMetaDataUrl, "url");
-_LIT(KMetaDataUserUrl, "user url");
-_LIT(KMetaDataJpeg, "front jpeg");
-_LIT(KMetaDataVendor, "vendor");
-_LIT(KMetaDataRating, "rating");
-_LIT(KMetaDataUniqueFileIdentifier, "unique file identifier");
-_LIT(KMetaDataDuration, "duration");
-_LIT(KMetaDataDate, "date");
-
-const TInt KKeyStringMaxLength = 60;
-
-
-//  CLASS DECLARATION
-/**
-*   This is a concrete class for getting metadata from an audio media.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioStreamMetaDataControl): public CMMAMetaDataControl
-{
-public:
-    CMMAAudioStreamMetaDataControl(CMetaDataUtility* aMetadaDataUtility);
-    ~CMMAAudioStreamMetaDataControl();
-
-protected: // from CMMAMetaDataControl
-
-    TInt KeyCountL();
-    HBufC* KeyL(TInt aIndex);
-
-    HBufC* KeyValueL(const TDesC& aKey);
-
-private: // new methods
-    HBufC* GetKeyL(TMetaDataFieldId aFieldId);
-    TMetaDataFieldId GetFieldId(const TDesC& aKey, TBool& aCompare);
-
-private: // data owned
-    CMetaDataUtility* iMetaDataUtility;
-
-};
-
-#endif // CMMAAUDIOSTREAMMETADATACONTROL_H
--- a/javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreamplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for streaming audio.
-*
-*/
-
-#ifndef CMMAAUDIOSTREAMPLAYER_H
-#define CMMAAUDIOSTREAMPLAYER_H
-
-//  INCLUDES
-#include "cmmaemcaudioplayer.h"
-#include "mmmastreamhandlerlistener.h"
-#include "cmmaemcresolver.h"
-#include <MetaDataUtility.h>
-
-class CMMADataSourceStream;
-class CMMAStreamHandler;
-
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing audio from stream source.
-*/
-NONSHARABLE_CLASS(CMMAAudioStreamPlayer): public CMMAEMCAudioPlayer,
-        public MMMAStreamHandlerListener
-{
-public: // Construction
-    /**
-     * Creates new player.
-     */
-    static CMMAAudioStreamPlayer* NewLC(
-        CMMAEMCResolver* aResolver);
-
-    //   Destructor
-    ~CMMAAudioStreamPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAAudioStreamPlayer(CMMAEMCResolver* aResolver);
-    void ConstructL();
-
-private: // New methods
-
-    /**
-     * Starts playback and posts started event.
-     */
-    void PrivateStartL();
-
-public: // New methods
-    /**
-     * Pause playback without sending stopped event or changing state
-     */
-    TInt Pause();
-
-public: // from CMMAPlayer
-    void DeallocateL();
-    void StartL();
-    void PrefetchL();
-    CMMASourceStream* AddSourceStreamL(JNIEnv* aJNIEnv,
-                                       MMAFunctionServer* aEventSource,
-                                       jobject aReader);
-
-    void GetDuration(TInt64* aDuration);
-    void StopL(TBool aPostEvent);
-
-protected: // From CMMAEMCAudioPlayer
-    void PlayCompleteL(TInt aError);
-
-public:
-    void AddDataSourceToStreamL();
-    void CreateStreamL();
-    CMetaDataUtility* MetaDataUtilityOwnership();
-
-public: // from MMMAStreamHandlerListener
-    void PrepareComplete(TInt aError);
-    void StartComplete(TInt aError);
-    void HandleError(TInt aError);
-
-public: // from MControlObserver
-    void Event(MControl* aControl,
-               TUint aEventType,
-               TAny* aEventObject);
-
-private: // data
-    // owned stream handler
-    CMMAStreamHandler* iStreamHandler;
-
-    // controller's state, prime panics if called twice
-    TBool iControllerPrimed;
-
-    // created here and ownership is transferred to
-    // CMMAAudioStreamMetaDataControl by call to
-    // MetaDataUtilityOwnership()
-    CMetaDataUtility* iMetaDataUtility;
-};
-
-#endif // CMMAAUDIOSTREAMPLAYER_H
--- a/javauis/mmapi_qt/audiostreaming/inc.emc/cmmaaudiostreamplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating stream player.
-*
-*/
-
-
-#ifndef CMMAAUDIOSTREAMPLAYERFACTORY_H
-#define CMMAAUDIOSTREAMPLAYERFACTORY_H
-
-//  INCLUDES
-#include "cmmaemcplayerfactory.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating stream player.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAAudioStreamPlayerFactory): public CMMAEMCPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAAudioStreamPlayerFactory* NewLC();
-    ~CMMAAudioStreamPlayerFactory();
-
-private: // Constructor
-    CMMAAudioStreamPlayerFactory();
-
-public: // From CMMAEMCPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& /*aContentType*/);
-    CMMAPlayer* CreatePlayerL(const TDesC8& /*aHeaderData*/);
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-    CMMAPlayer* CreatePlayerL(
-        CMMAEMCResolver* aResolver);
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-public: // new method
-    void SetSourceInfoL(const TUint8* aHeader, TInt aLength);
-
-private: // Data, owned
-    HBufC8* iHeaderData;
-    //
-
-
-};
-
-#endif // CMMAAUDIOSTREAMPLAYERFACTORY_H
--- a/javauis/mmapi_qt/audiostreaming/inc.emc/cmmastreamhandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Streams data from Java to controller
-*
-*/
-
-#ifndef CMMASTREAMHANDLER_H
-#define CMMASTREAMHANDLER_H
-
-//  INCLUDES
-#include "cmmastreamrequest.h"
-#include "mmmastreamrequestlistener.h"
-#include "mmmastreamhandlerlistener.h"
-#include <MDUChunkDataObserver.h>
-#include <MetaDataUtility.h>
-
-//EMC
-#include "StreamControl.h"
-#include "MMControlFactory.h"
-#include "DataBufferSource.h"
-#include "DataBuffer.h"
-#include "SinkControl.h"
-#include "StreamControlObserver.h"
-#include "SourceControlObserver.h"
-
-
-using namespace multimedia;
-using multimedia ::MStreamControl;
-using multimedia ::MDataBufferSource;
-using multimedia ::MDataBuffer;
-using multimedia ::CMultimediaFactory;
-using multimedia ::MSinkControl;
-using multimedia::MSourceControlObserver;
-using multimedia::MStreamControlObserver;
-using multimedia::MBufferProcessedEvent;
-
-//End EMC
-
-
-// CONSTANTS
-const TInt KMMAStreamHandlerBufferCount = 2;
-
-class CMMADataSourceStream;
-
-//  CLASS DECLARATION
-/**
-* This class read data from CMMADataSourceStream and writes it to
-* controller.
-*/
-NONSHARABLE_CLASS(CMMAStreamHandler): public CBase, public MControlObserver,
-        public MMMAStreamRequestListener, public MMDUChunkDataObserver
-{
-private:
-    // Streams internal state
-    enum TMMAStreamState
-    {
-        EMMAStreamPrepare = 0,
-        EMMAStreamPaused,
-        EMMAStreamStart,
-        EMMAStreamStarted,
-        EMMAStreamEof
-    };
-
-    // chunk data processed state
-    enum TMMAProcessedState
-    {
-        EMMANoneProcessed = 0,
-        EMMAMetaDataProcessed,
-        EMMABufferProcessed,
-        EMMABothProcessed
-    };
-
-public: // Construction
-    /**
-    * Creates new player.
-    */
-    static CMMAStreamHandler* NewL(
-        MMMAStreamHandlerListener& aListener,
-        MStreamControl& aMStreamControl,
-        MDataBufferSource& aMDataBufferSource,
-        CMultimediaFactory& aFactory,
-        CMetaDataUtility& aMetaDataUtility);
-
-    //   Destructor
-    ~CMMAStreamHandler();
-
-protected:
-    //   C++ constructor
-    CMMAStreamHandler(MMMAStreamHandlerListener& aResolver,
-                      MStreamControl& aMStreamControl,
-                      MDataBufferSource& aMDataBufferSource,
-                      CMultimediaFactory& aFactory,
-                      CMetaDataUtility& aMetaDataUtility);
-    void ConstructL();
-
-protected: // New methods
-
-public: // New methods
-    /**
-     * Prepares stream to play.
-     */
-    void Prepare(const TDesC8& aMimeType);
-
-    /**
-     * Stops handling requests. After this call data received from source
-     * stream will be buffered until StartL is called.
-     */
-    void Pause();
-
-    /**
-             * Stops handling requests and frees already read data
-             * without playing it.
-             */
-    void Stop();
-
-    /**
-     * Starts handling requests
-     */
-    void Start();
-
-    /**
-     * Sets source stream to read
-     */
-    void SetSourceStream(CMMADataSourceStream* aSourceStream);
-
-public: // From MMMAStreamRequestListener
-    void WriteComplete(CMMAStreamRequest* aRequest);
-    void ReadComplete(CMMAStreamRequest* aRequest);
-    void HandleError(CMMAStreamRequest* aRequest,
-                     TInt aError);
-
-public: // from MControlObserver
-    void Event(MControl* aControl,
-               TUint aEventType,
-               TAny* aEventObject);
-    TBool LastBufferWritten();
-
-public: // from MMDUChunkDataObserver
-    void HandleChunkDataProcessed(TInt aError);
-    void HandleChunkDataReadyToBeParsed();
-    void HandleChunkDataComplete(TInt aError);
-
-private:
-    /**
-     * Writes request to controller
-     */
-    void WriteRequest(CMMAStreamRequest* aRequest);
-
-private: // data
-    // Owned write requests
-    RPointerArray< CMMAStreamRequest > iRequests;
-
-    CMMAStreamRequest* iCurrentRequest;
-
-    // not owned source stream
-    CMMADataSourceStream* iSourceStream;
-
-    // EMC
-    // not owned
-    MStreamControl& iMStreamControl;
-    MDataBufferSource& iMDataBufferSource;
-    CMultimediaFactory& iFactory;
-
-    // owned
-    MDataBuffer *iBuffer;
-    TBool iLastBufferWritten;
-    //
-
-    // not owned listener
-    MMMAStreamHandlerListener& iListener;
-
-    // not owned
-    CMetaDataUtility& iMetaDataUtility;
-
-    // Stream's state
-    TMMAStreamState iState;
-
-    // Processed state of current chunk data
-    TMMAProcessedState iProcessedState;
-
-    // tells if metadata parsing can be started
-    TBool iMetaDataReadyToBeParsed;
-
-    // to be removed once MDU supports all the reqd formats
-    TBool iMimeTypeSupportedByMDU;
-};
-
-#endif // CMMASTREAMHANDLER_H
--- a/javauis/mmapi_qt/audiostreaming/inc.emc/cmmastreamrequest.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Request used to write or read data
-*
-*/
-
-#ifndef CMMASTREAMREQUEST_H
-#define CMMASTREAMREQUEST_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "mmmastreamrequestlistener.h"
-
-// CONSTANTS
-const TInt KMMAStreamRequestBufferSize = 5120;
-
-/**
- * - If IsActive returns ETrue, data is procedded in the server.
- * - If IsActive returns EFalse and DataPtr is empty request is
- *   ready for reuse
- * - If IsActive returns EFalse and DataPtr is not empty request
- *   is waiting to be written.
- */
-class CMMAStreamRequest: public CBase
-{
-public:// Constructor and destructor
-    /**
-     * @param aListener will be informed when request completes
-     */
-    static CMMAStreamRequest* NewLC(MMMAStreamRequestListener* aListener);
-
-    /**
-     * Destructor
-     */
-    ~CMMAStreamRequest();
-
-public: // new methods
-    /**
-     * @return TPtr to request's data
-     */
-    TPtr8& DataPtr();
-
-    /**
-     * Completes read request.
-     * @param aError system error code
-     */
-    void CompleteRead(TInt aError);
-
-    /**
-     * MMMAStreamRequestListener will be informed when request is ready.
-     */
-    void SetActive(TBool iActive);
-    TBool IsActive();
-
-    /**
-     * 1 if this is stream's last buffer
-     * @return reference to request buffer
-     */
-    TPckgBuf< TInt >& RequestBuffer();
-public:
-    void WriteRequestComplete(TInt Err);
-
-private: // Constructor
-    CMMAStreamRequest(MMMAStreamRequestListener* aListener);
-    void ConstructL();
-private: // Data
-    // will be informed when request is complete
-    MMMAStreamRequestListener* iListener;
-
-    // owned data
-    HBufC8* iData;
-
-    // ptr to iData or NULL if data is processed.
-    TPtr8 iDataPtr;
-
-    // Request buffer
-    TPckgBuf< TInt > iRequestBuffer;
-
-    // Status of the buffer
-    TBool iActive;
-};
-
-#endif // CMMASTREAMREQUEST_H
--- a/javauis/mmapi_qt/audiostreaming/inc.mmf/CMMAAudioStreamPlayerFactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating stream player.
-*
-*/
-
-
-#ifndef CMMAAUDIOSTREAMPLAYERFACTORY_H
-#define CMMAAUDIOSTREAMPLAYERFACTORY_H
-
-//  INCLUDES
-#include "CMMAMMFPlayerFactory.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating stream player.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAAudioStreamPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAAudioStreamPlayerFactory* NewLC();
-    ~CMMAAudioStreamPlayerFactory();
-
-private: // Constructor
-    CMMAAudioStreamPlayerFactory();
-
-public: // From CMMAMMFPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& /*aContentType*/);
-    CMMAPlayer* CreatePlayerL(const TDesC8& /*aHeaderData*/);
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-
-
-};
-
-#endif // CMMAAUDIOSTREAMPLAYERFACTORY_H
--- a/javauis/mmapi_qt/audiostreaming/inc.mmf/cmmaaudiostreamplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for streaming audio.
-*
-*/
-
-#ifndef CMMAAUDIOSTREAMPLAYER_H
-#define CMMAAUDIOSTREAMPLAYER_H
-
-//  INCLUDES
-#include "CMMAAudioPlayer.h"
-#include "MMMAStreamHandlerListener.h"
-
-class CMMADataSourceStream;
-class CMMAStreamHandler;
-
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing audio from stream source.
-*/
-NONSHARABLE_CLASS(CMMAAudioStreamPlayer): public CMMAAudioPlayer,
-        public MMMAStreamHandlerListener
-{
-public: // Construction
-    /**
-     * Creates new player.
-     */
-    static CMMAAudioStreamPlayer* NewLC(
-        CMMAMMFResolver* aResolver);
-
-    //   Destructor
-    ~CMMAAudioStreamPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAAudioStreamPlayer(CMMAMMFResolver* aResolver);
-    void ConstructL();
-
-private: // New methods
-    /**
-     * Loops through iControllerInfos and tries to open those
-     * @param aSourceUid Data source uid
-     * @param aSourceData Data for source
-     * @param aSinkUid Data sink uid
-     * @param aSinkData Data for sink.
-     * @param aPrioritySettings Controller's priority.
-     * @return KErrNone if controller was opened
-     */
-    TInt DoOpen(TUid aSourceUid,
-                const TDesC8& aSourceData,
-                TUid aSinkUid,
-                const TDesC8& aSinkData,
-                TMMFPrioritySettings aPrioritySettings);
-
-    /**
-     * Starts playback and posts started event.
-     */
-    void PrivateStartL();
-
-public: // New methods
-    /**
-     * Pause playback without sending stopped event or changing state
-     */
-    TInt Pause();
-
-public: // from CMMAPlayer
-    void StartL();
-    void PrefetchL();
-    CMMASourceStream* AddSourceStreamL(JNIEnv* aJNIEnv,
-                                       MMAFunctionServer* aEventSource,
-                                       jobject aReader);
-    void GetDuration(TInt64* aDuration);
-    void StopL(TBool aPostEvent);
-
-protected: // From CMMAAudioPlayer
-    void PlayCompleteL(TInt aError);
-
-public: // from MMMAStreamHandlerListener
-    void PrepareComplete(TInt aError);
-    void StartComplete(TInt aError);
-    void HandleError(TInt aError);
-
-private: // data
-    // owned stream handler
-    CMMAStreamHandler* iStreamHandler;
-
-    // controller's state, prime panics if called twice
-    TBool iControllerPrimed;
-};
-
-#endif // CMMAAUDIOSTREAMPLAYER_H
--- a/javauis/mmapi_qt/audiostreaming/inc.mmf/cmmastreamhandler.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Streams data from Java to controller
-*
-*/
-
-#ifndef CMMASTREAMHANDLER_H
-#define CMMASTREAMHANDLER_H
-
-//  INCLUDES
-#include <mmf/common/mmfcontroller.h>
-#include "CMMAStreamRequest.h"
-#include "MMMAStreamRequestListener.h"
-#include "MMMAStreamHandlerListener.h"
-
-
-// CONSTANTS
-const TInt KMMAStreamHandlerBufferCount = 2;
-
-class CMMADataSourceStream;
-
-//  CLASS DECLARATION
-/**
-* This class read data from CMMADataSourceStream and writes it to
-* controller.
-*/
-NONSHARABLE_CLASS(CMMAStreamHandler): public CBase,
-        public MMMAStreamRequestListener
-{
-private:
-    // Streams internal state
-    enum TMMAStreamState
-    {
-        EMMAStreamPrepare = 0,
-        EMMAStreamPaused,
-        EMMAStreamStart,
-        EMMAStreamStarted,
-        EMMAStreamEof
-    };
-
-public: // Construction
-    /**
-     * Creates new player.
-     */
-    static CMMAStreamHandler* NewL(
-        MMMAStreamHandlerListener& aListener,
-        RMMFController& aController);
-
-    //   Destructor
-    ~CMMAStreamHandler();
-
-protected:
-    //   C++ constructor
-    CMMAStreamHandler(MMMAStreamHandlerListener& aResolver,
-                      RMMFController& aController);
-    void ConstructL();
-
-protected: // New methods
-
-public: // New methods
-    /**
-     * Prepares stream to play.
-     */
-    void PrepareL();
-
-    /**
-     * Stops handling requests. After this call data received from source
-     * stream will be buffered until StartL is called.
-     */
-    void Pause();
-
-    /**
-     * Starts handling requests
-     */
-    void StartL();
-
-    /**
-     * Data sink destination must be written to this reference
-     * before stream can be started.
-     * @return data sink destination reference
-     */
-    TMMFMessageDestination& MessageDestination();
-
-    /**
-     * Sets source stream to read
-     */
-    void SetSourceStream(CMMADataSourceStream* aSourceStream);
-
-public: // From MMMAStreamRequestListener
-    void WriteComplete(CMMAStreamRequest* aRequest);
-    void ReadComplete(CMMAStreamRequest* aRequest);
-    void HandleError(CMMAStreamRequest* aRequest,
-                     TInt aError);
-private:
-    /**
-     * Writes request to controller
-     */
-    void WriteRequest(CMMAStreamRequest* aRequest);
-
-private: // data
-    // Owned write requests
-    RPointerArray< CMMAStreamRequest > iRequests;
-
-    // not owned source stream
-    CMMADataSourceStream* iSourceStream;
-
-    // Controller to write stream
-    RMMFController& iController;
-
-    // added data source
-    TMMFMessageDestination iDataSourceHandle;
-
-    // not owned listener
-    MMMAStreamHandlerListener& iListener;
-
-    // Stream's state
-    TMMAStreamState iState;
-};
-
-#endif // CMMASTREAMHANDLER_H
--- a/javauis/mmapi_qt/audiostreaming/inc.mmf/cmmastreamrequest.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Request used to write or read data
-*
-*/
-
-#ifndef CMMASTREAMREQUEST_H
-#define CMMASTREAMREQUEST_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "MMMAStreamRequestListener.h"
-
-// CONSTANTS
-const TInt KMMAStreamRequestBufferSize = 5120;
-
-/**
- * - If CActive::IsActive returns ETrue, data is procedded in the server.
- * - If CActive::IsActive returns EFalse and DataPtr is empty request is
- *   ready for reuse
- * - If CActive::IsActive returns EFalse and DataPtr is not empty request
- *   is waiting to be written.
- */
-class CMMAStreamRequest: public CActive
-{
-public:// Constructor and destructor
-    /**
-     * @param aListener will be informed when request completes
-     */
-    static CMMAStreamRequest* NewLC(MMMAStreamRequestListener* aListener);
-
-    /**
-     * Destructor
-     */
-    ~CMMAStreamRequest();
-
-public: // new methods
-    /**
-     * @return TPtr to request's data
-     */
-    TPtr8& DataPtr();
-
-    /**
-     * Completes read request.
-     * @param aError system error code
-     */
-    void CompleteRead(TInt aError);
-
-    /**
-     * MMMAStreamRequestListener will be informed when request is ready.
-     */
-    void SetActive();
-
-    /**
-     * 1 if this is stream's last buffer
-     * @return reference to request buffer
-     */
-    TPckgBuf< TInt >& RequestBuffer();
-public: // From CActive
-    void RunL();
-    TInt RunError(TInt aError);
-    void DoCancel();
-
-private: // Constructor
-    CMMAStreamRequest(MMMAStreamRequestListener* aListener);
-    void ConstructL();
-private: // Data
-    // will be informed when request is complete
-    MMMAStreamRequestListener* iListener;
-
-    // owned data
-    HBufC8* iData;
-
-    // ptr to iData or NULL if data is processed.
-    TPtr8 iDataPtr;
-
-    // Request buffer
-    TPckgBuf< TInt > iRequestBuffer;
-};
-
-#endif // CMMASTREAMREQUEST_H
--- a/javauis/mmapi_qt/audiostreaming/inc/cmmaaudiostreamratecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements RateControl for HTTP stream audio player.
-*
-*/
-
-
-#ifndef CMMAAUDIOSTREAMRATECONTROL_H
-#define CMMAAUDIOSTREAMRATECONTROL_H
-
-//  INTERNAL INCLUDES
-#include "cmmaratecontrol.h" // base class
-#include "cmmaaudiostreamplayer.h"
-
-//  CLASS DECLARATION
-/**
-*   This class implements RateControl for http stream audio player.
-*
-*/
-NONSHARABLE_CLASS(CMMAAudioStreamRateControl): public CMMARateControl,
-        public MMMAPlayerStateListener
-{
-public:
-
-    static CMMAAudioStreamRateControl* NewL(
-        CMMAAudioStreamPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAAudioStreamRateControl();
-
-protected:
-
-    /**
-     * Constructor.
-     */
-    CMMAAudioStreamRateControl(CMMAAudioStreamPlayer* aPlayer);
-
-    void ConstructL();
-
-public: // from MMMAPlayerStateListener
-    virtual void StateChanged(TInt aState);
-
-public: // New methods
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    virtual TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    virtual TInt RateL();
-
-
-private: // Member data
-
-    /**
-     * Used to obtain RMMFController reference to stop/start
-     * playback.
-     */
-    CMMAAudioStreamPlayer* iPlayer;
-
-    /**
-     * Hold current rate value.
-     */
-    TInt iCurrentRate;
-
-};
-
-#endif // CMMAAUDIOSTREAMRATECONTROL_H
--- a/javauis/mmapi_qt/audiostreaming/inc/cmmadatasourcestream.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for reading data from Java SourceStream to native side
-*
-*/
-
-
-#ifndef CMMADATASOURCESTREAM_H
-#define CMMADATASOURCESTREAM_H
-
-#include "cmmasourcestream.h"
-
-class CMMADataSourceStreamEvent;
-class MMMASourceStreamListener;
-class MMMAEventPoster;
-class CMMAStreamRequest;
-
-// CONSTANTS
-
-//  CLASS DECLARATION
-/**
-*   Class for reading data from Java SourceStream to native side
-*
-*/
-NONSHARABLE_CLASS(CMMADataSourceStream): public CMMASourceStream
-{
-public:     // Constructors and destructors
-    /**
-     * Object creation. Static method.
-     *
-     * @param aJNIEnv           handle to used jni environment
-     * @param aEventPoster      handle to event poster
-     * @param aJavaSourceStream handle to java SourceStream object
-     * @param aListener         Handle to source stream listener
-     *
-     * @return CMMADataSourceStream object
-     */
-    static CMMADataSourceStream* NewLC(JNIEnv* aJNIEnv,
-    MMMAEventPoster* aEventPoster,
-    jobject aJavaSourceStream,
-    MMMASourceStreamListener* aListener,
-    MMAFunctionServer* aEventSource);
-
-    /**
-     * Deletes owned objects
-     */
-    ~CMMADataSourceStream(); // Destructor
-
-public: // New methods
-    /**
-     * Reads data from Java
-     */
-    void Read(CMMAStreamRequest* aRequest);
-
-    /**
-     * @return readed request
-     */
-    CMMAStreamRequest* Request();
-
-public: // From CMMASourceStream
-
-    /**
-     * Overwrites CMMASourceStream's ResetData
-     * so iData will not be NULL, does nothing
-     */
-    void ResetData();
-
-protected:  // Constructors and destructors
-
-    /**
-     * Set variables
-     * @param aEventPoster handle to event poster
-     * @param aListener    handle to source stream listener
-     */
-    CMMADataSourceStream(MMMAEventPoster* aEventPoster,
-                         MMMASourceStreamListener* aListener);
-
-    /**
-     * 2nd phase constructor
-     *
-     * @param aJNIEnv           used jni environment
-     * @param aJavaSourceStream handle to java source stream object
-     */
-    void ConstructL(JNIEnv* aJNIEnv, MMAFunctionServer* aEventSource,jobject aJavaSourceStream);
-
-
-protected:  // From CMMASourceStream
-
-    void WriteL(const TUint8* aData,
-                TInt aLength, TInt aState);
-
-protected:
-    // not owned request
-    CMMAStreamRequest* iRequest;
-};
-
-#endif // CMMADATASOURCESTREAM_H
--- a/javauis/mmapi_qt/audiostreaming/inc/mmmastreamhandlerlistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Listener for CMMAStreamHandler
-*
-*/
-
-#ifndef MMMASTREAMHANDLERLISTENER_H
-#define MMMASTREAMHANDLERLISTENER_H
-
-/**
- * Listener for CMMAStreamHandler.
- */
-NONSHARABLE_CLASS(MMMAStreamHandlerListener)
-{
-public:
-    /**
-     * Called when stream is prepared.
-     * @param aError system error code
-     */
-    virtual void PrepareComplete(TInt aError) = 0;
-
-    /**
-     * Called when stream is started.
-     * @param aError system error code
-     */
-    virtual void StartComplete(TInt aError) = 0;
-
-    /**
-     * Called when error need to be handled.
-     * If stream is starting or preparing PrepareComplete or
-     * StartComplete will be called instead of this method.
-     * @param aError system error code
-     */
-    virtual void HandleError(TInt aError) = 0;
-};
-
-
-#endif // MMMASTREAMHANDLERLISTENER_H
--- a/javauis/mmapi_qt/audiostreaming/inc/mmmastreamrequestlistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Used to inform when CMMAStreamRequest completes
-*
-*/
-
-#ifndef MMMASTREAMREQUESTLISTENER_H
-#define MMMASTREAMREQUESTLISTENER_H
-
-
-//  INCLUDES
-class CMMAStreamRequest;
-
-/**
- * MMMAStreamRequestListener will be informed when CMMAStreamRequest is
- * completed.
- */
-NONSHARABLE_CLASS(MMMAStreamRequestListener)
-{
-public:
-    /**
-     * Called when when stream write request is completed.
-     * @param aRequest request completed
-     */
-    virtual void WriteComplete(CMMAStreamRequest* aRequest) = 0;
-
-    /**
-     * Called when when stream read request is completed.
-     * @param aRequest request completed
-     */
-    virtual void ReadComplete(CMMAStreamRequest* aRequest) = 0;
-
-    /**
-     * Called when when stream request is completed.
-     * @param aError system error code
-     */
-    virtual void HandleError(CMMAStreamRequest* aRequest,
-                             TInt aError) = 0;
-
-};
-
-#endif // MMMASTREAMREQUESTLISTENER_H
--- a/javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreammetadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMAAudioStreamMetaDataControl is a concrete class for getting
-*                metadata from an audio media.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaaudiostreammetadatacontrol.h"
-
-CMMAAudioStreamMetaDataControl::CMMAAudioStreamMetaDataControl(
-    CMetaDataUtility* aMetadaDataUtility)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioStreamMetaDataControl constructor called.");
-    // this class gets the ownership of MetaDataUtility
-    iMetaDataUtility = aMetadaDataUtility;
-}
-
-CMMAAudioStreamMetaDataControl::~CMMAAudioStreamMetaDataControl()
-{
-    LOG( EJavaMMAPI, EInfo, "~CMMAAudioStreamMetaDataControl called.");
-    delete iMetaDataUtility;
-}
-
-TInt CMMAAudioStreamMetaDataControl::KeyCountL()
-{
-    TInt entries = iMetaDataUtility->MetaDataCount();
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamMetaDataControl::KeyCountL, count = %d", entries);
-
-    return entries;
-}
-
-HBufC* CMMAAudioStreamMetaDataControl::KeyL(TInt aIndex)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::KeyL +");
-    HBufC* key = NULL;
-
-    if (KeyCountL() > 0)
-    {
-        TMetaDataFieldId fieldId;
-        const CMetaDataFieldContainer& fieldcontainer =
-            iMetaDataUtility->MetaDataFieldsL();
-        fieldcontainer.FieldIdAt(aIndex, fieldId);
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamMetaDataControl::KeyL, fieldId = %d", fieldId);
-        key = GetKeyL(fieldId);
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::KeyL -");
-    return key;
-}
-
-/*
- * Get the value of given audio metadata key. The ownership of the created value
- * (descriptor) is passed to the caller.
- */
-HBufC* CMMAAudioStreamMetaDataControl::KeyValueL(const TDesC& aKey)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::KeyValueL +");
-    HBufC* retVal = NULL;
-
-    if (KeyCountL() > 0)
-    {
-        TBool found;
-        TMetaDataFieldId fieldId = GetFieldId(aKey, found);
-        if (found)
-        {
-            const CMetaDataFieldContainer& fieldcontainer =
-                iMetaDataUtility->MetaDataFieldsL();
-            retVal = (fieldcontainer.Field(fieldId)).AllocL();
-        }
-    }
-
-    User::LeaveIfNull(retVal);
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamMetaDataControl::KeyValueL, retVal = %S", retVal->Des().PtrZ());
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::KeyValueL -");
-    return retVal;
-}
-
-/*
-* Get key string for the given fieldId
-*/
-HBufC* CMMAAudioStreamMetaDataControl::GetKeyL(TMetaDataFieldId aFieldId)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::GetKeyL +");
-    HBufC* keyString = NULL;
-    TBuf<KKeyStringMaxLength> tempBuf;
-
-    switch (aFieldId)
-    {
-    case EMetaDataSongTitle:
-        tempBuf.Copy(KMetaDataSongTitle);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataArtist:
-        tempBuf.Copy(KMetaDataArtist);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataAlbum:
-        tempBuf.Copy(KMetaDataAlbum);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataYear:
-        tempBuf.Copy(KMetaDataYear);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataAlbumTrack:
-        tempBuf.Copy(KMetaDataAlbumTrack);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataGenre:
-        tempBuf.Copy(KMetaDataGenre);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataComposer:
-        tempBuf.Copy(KMetaDataComposer);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataCopyright:
-        tempBuf.Copy(KMetaDataCopyright);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataOriginalArtist:
-        tempBuf.Copy(KMetaDataOriginalArtist);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataUrl:
-        tempBuf.Copy(KMetaDataUrl);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataUserUrl:
-        tempBuf.Copy(KMetaDataUserUrl);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataJpeg:
-        tempBuf.Copy(KMetaDataJpeg);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataVendor:
-        tempBuf.Copy(KMetaDataVendor);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataRating:
-        tempBuf.Copy(KMetaDataRating);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataUniqueFileIdentifier:
-        tempBuf.Copy(KMetaDataUniqueFileIdentifier);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataDuration:
-        tempBuf.Copy(KMetaDataDuration);
-        keyString = tempBuf.AllocL();
-        break;
-    case EMetaDataDate:
-        tempBuf.Copy(KMetaDataDate);
-        keyString = tempBuf.AllocL();
-        break;
-    default:
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::GetKeyL, default case should not occur");
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::GetKeyL -");
-    return keyString;
-}
-
-/*
-* Get fieldId for the given key string
-*/
-TMetaDataFieldId CMMAAudioStreamMetaDataControl::GetFieldId(const TDesC& aKey, TBool& aCompare)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::GetFieldId +");
-    TMetaDataFieldId fieldId = EUnknownMetaDataField;
-    aCompare = true; // found
-
-    if (0 == aKey.Compare(KMetaDataSongTitle()))
-    {
-        fieldId = EMetaDataSongTitle;
-    }
-    else if (0 == aKey.Compare(KMetaDataArtist()))
-    {
-        fieldId = EMetaDataArtist;
-    }
-    else if (0 == aKey.Compare(KMetaDataAlbum()))
-    {
-        fieldId = EMetaDataAlbum;
-    }
-    else if (0 == aKey.Compare(KMetaDataArtist()))
-    {
-        fieldId = EMetaDataArtist;
-    }
-    else if (0 == aKey.Compare(KMetaDataYear()))
-    {
-        fieldId = EMetaDataYear;
-    }
-    else if (0 == aKey.Compare(KMetaDataComment()))
-    {
-        fieldId = EMetaDataComment;
-    }
-    else if (0 == aKey.Compare(KMetaDataAlbumTrack()))
-    {
-        fieldId = EMetaDataAlbumTrack;
-    }
-    else if (0 == aKey.Compare(KMetaDataGenre()))
-    {
-        fieldId = EMetaDataGenre;
-    }
-    else if (0 == aKey.Compare(KMetaDataComposer()))
-    {
-        fieldId = EMetaDataComposer;
-    }
-    else if (0 == aKey.Compare(KMetaDataCopyright()))
-    {
-        fieldId = EMetaDataCopyright;
-    }
-    else if (0 == aKey.Compare(KMetaDataOriginalArtist()))
-    {
-        fieldId = EMetaDataOriginalArtist;
-    }
-    else if (0 == aKey.Compare(KMetaDataUrl()))
-    {
-        fieldId = EMetaDataUrl;
-    }
-    else if (0 == aKey.Compare(KMetaDataUserUrl()))
-    {
-        fieldId = EMetaDataUserUrl;
-    }
-    else if (0 == aKey.Compare(KMetaDataJpeg()))
-    {
-        fieldId = EMetaDataJpeg;
-    }
-    else if (0 == aKey.Compare(KMetaDataVendor()))
-    {
-        fieldId = EMetaDataVendor;
-    }
-    else if (0 == aKey.Compare(KMetaDataRating()))
-    {
-        fieldId = EMetaDataRating;
-    }
-    else if (0 == aKey.Compare(KMetaDataUniqueFileIdentifier()))
-    {
-        fieldId = EMetaDataUniqueFileIdentifier;
-    }
-    else if (0 == aKey.Compare(KMetaDataDuration()))
-    {
-        fieldId = EMetaDataDuration;
-    }
-    else if (0 == aKey.Compare(KMetaDataDate()))
-    {
-        fieldId = EMetaDataDate;
-    }
-    else
-    {
-        aCompare = false; // not found
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamMetaDataControl::GetFieldId -");
-    return fieldId;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreamplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,469 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for streaming audio.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <AudioPreference.h>
-#include <logger.h>
-
-#include "cmmaaudiostreamplayer.h"
-#include "cmmadatasourcestream.h"
-#include "mmafunctionserver.h"
-#include "cmmastreamhandler.h"
-
-_LIT(KMMAStreamErrorMessage, "Internal error: %d");
-
-
-CMMAAudioStreamPlayer* CMMAAudioStreamPlayer::NewLC(
-    CMMAEMCResolver* aResolver)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::NewLC +");
-    CMMAAudioStreamPlayer* self = new(ELeave) CMMAAudioStreamPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::NewLC -");
-    return self;
-}
-
-CMMAAudioStreamPlayer::~CMMAAudioStreamPlayer()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::~CMMAAudioStreamPlayer +");
-
-    if (iMStreamControl->GetState() > MStreamControl::CLOSED)
-    {
-        iMStreamControl->Close();
-    }
-
-    delete iStreamHandler;
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::~CMMAAudioStreamPlayer -");
-}
-
-
-CMMAAudioStreamPlayer::CMMAAudioStreamPlayer(
-    CMMAEMCResolver* aResolver):
-        CMMAEMCAudioPlayer(aResolver)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::CMMAAudioStreamPlayer");
-}
-
-void CMMAAudioStreamPlayer::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::ConstructL +");
-    iControllerPrimed = EFalse;
-    CMMAEMCAudioPlayer::ConstructL();
-    iMetaDataUtility = CMetaDataUtility::NewL();
-    iStreamHandler = CMMAStreamHandler::NewL(*this,
-                     *iMStreamControl,
-                     *iMDataBufferSource,
-                     *iFactory,
-                     *iMetaDataUtility);
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::ConstructL -");
-}
-
-CMMASourceStream* CMMAAudioStreamPlayer::AddSourceStreamL(JNIEnv* aJNIEnv,
-        MMAFunctionServer* aEventSource,
-        jobject aReader)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::AddSourceStreamL +");
-    CMMADataSourceStream* sourceStream = CMMADataSourceStream::NewLC(aJNIEnv,
-                                         aEventSource,
-                                         aReader,
-                                         this,
-                                         aEventSource);
-    User::LeaveIfError(iSourceStreams.Append(sourceStream));
-    CleanupStack::Pop(sourceStream);
-    iStreamHandler->SetSourceStream(sourceStream);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::AddSourceStreamL -");
-    return sourceStream;
-}
-
-CMetaDataUtility* CMMAAudioStreamPlayer::MetaDataUtilityOwnership()
-{
-    CMetaDataUtility* temp = iMetaDataUtility;
-    iMetaDataUtility = NULL;
-    return temp;
-}
-
-void CMMAAudioStreamPlayer::DeallocateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::DeallocateL +");
-    iStreamHandler->Stop();
-    iControllerPrimed = EFalse;
-    CMMAEMCPlayerBase::DeallocateL();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::DeallocateL -");
-}
-
-void CMMAAudioStreamPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::PrefetchL +");
-    __ASSERT_DEBUG(iSourceStreams.Count() > 0, User::Invariant());
-    iStreamHandler->Prepare(*iMimeType);
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::PrefetchL -");
-}
-
-void CMMAAudioStreamPlayer::StartL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL +");
-    if (iStreamHandler->LastBufferWritten() &&
-            (iMStreamControl ->GetState() == MStreamControl::PAUSED))
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL If outer+");
-        TInt64 time;
-        GetMediaTime(&time);
-        TInt err = iMStreamControl->Start();
-        if (err == KErrNone && iState != EStarted)
-        {   LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL If inner+");
-            // move to started state and post started event            
-            ChangeState(EStarted);
-            PostLongEvent(CMMAPlayerEvent::EStarted, time);
-        }
-        else
-        {   LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL else inner+");
-            HandleError(err);
-        }
-    }
-    else
-    {   LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL else outer+");
-        iStreamHandler->Start();
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartL -");
-}
-
-void CMMAAudioStreamPlayer::StopL(TBool aPostEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::Stop state %d", iState);
-    if (iState == EStarted)
-    {
-        User::LeaveIfError(Pause());
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-        if (aPostEvent)
-        {
-            TInt64 time;
-            GetMediaTime(&time);
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::Stop OK");
-}
-
-TInt CMMAAudioStreamPlayer::Pause()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Pause +");
-    iStreamHandler->Pause();
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer:: iStreamControl State = %d",iMStreamControl->GetState());
-
-    TInt err = KErrNone;
-    if (iMStreamControl->GetState() != MStreamControl::PAUSED)
-    {
-        err = iMStreamControl->Pause();
-        ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer:: iStreamControl Pause error = %d", err);
-        if ((!iActiveSchedulerWait->IsStarted()) && (err == KErrNone))
-        {
-            iActiveSchedulerWait->Start();
-        }
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Pause -");
-    return err;
-}
-
-void CMMAAudioStreamPlayer::PlayCompleteL(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::PlayCompleteL error %d",
-              aError);
-
-    // Before controller is started it must be primed
-    iControllerPrimed = EFalse;
-
-    TInt64 time;
-    GetDuration(&time);
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, time);
-
-    ChangeState(EPrefetched);   // ready to play again
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-}
-
-void CMMAAudioStreamPlayer::GetDuration(TInt64* aDuration)
-{
-    CMMAPlayer::GetDuration(aDuration);
-}
-
-void CMMAAudioStreamPlayer::PrepareComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::PrepareComplete error %d",
-              aError);
-
-    if (aError == KErrNone)
-    {
-        ChangeState(EPrefetched);
-    }
-    PostActionCompleted(aError);   // java prefetch return
-}
-
-void CMMAAudioStreamPlayer::StartComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete error %d",
-              aError);
-
-    // do not start if player is deallocated or closed
-    // RateControl start can start controller in started state
-    if ((iState != EStarted) &&
-            (iState != EPrefetched))
-    {
-        PostActionCompleted(KErrNone);   // java start return
-        return;
-    }
-
-    TInt err = aError;
-    if (!iControllerPrimed)
-    {
-        // Prime must be called when player is started first time or restarted
-        err = iMStreamControl->Prime();
-
-        ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete prime error %d",
-                  err);
-    }
-    else
-    {
-        err = KErrNone;
-    }
-
-    if (iControllerPrimed && (iState == EPrefetched))
-    {
-
-        TInt64 time;
-        if (err == KErrNone)
-        {
-            // must be primed before media time can be get
-            GetMediaTime(&time);
-            err = iMStreamControl->Start();
-            ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete play error %d",
-                      err);
-
-        }
-
-        // RateControl can start controller in started state, then Java event is
-        // not sent
-        if (err == KErrNone && iState != EStarted)
-        { // move to started state and post started event
-            PostLongEvent(CMMAPlayerEvent::EStarted, time);
-            ChangeState(EStarted);
-        }
-        else
-        { // post error event
-            HandleError(aError);
-            PostActionCompleted(aError);   // java start return
-        }
-    }
-
-}
-
-void CMMAAudioStreamPlayer::HandleError(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::HandleError error %d",
-              aError);
-
-    TName errorMessage;
-    errorMessage.Format(KMMAStreamErrorMessage, aError);
-    PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-}
-
-void CMMAAudioStreamPlayer::Event(MControl* aControl, TUint aEventType, TAny* aEventObject)
-{
-
-    switch (aEventType)
-    {
-
-    case MStreamControlObserver::KStateChangedEvent:
-    {
-        MStateChangedEvent* evt = (MStateChangedEvent*)aEventObject;
-        MStreamControl* control1 = (MStreamControl*)(aControl);
-        switch (control1->GetState())
-        {
-        case MStreamControl::CLOSED:
-        {
-            iPrevStreamControlState = MStreamControl::CLOSED;
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :CLOSED");
-        }
-        break;
-
-        case MStreamControl::INITIALIZED:
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :INITIALIZED");
-            switch (iPrevStreamControlState)
-            {
-            case MStreamControl::CLOSED:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                if (iActiveSchedulerWait->IsStarted())
-                {
-                    iActiveSchedulerWait->AsyncStop();
-                }
-            }
-            break;
-
-            case MStreamControl::INITIALIZED:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                LOG( EJavaMMAPI, EInfo, "inner Switch case: MStreamControl::INITIALIZED ");
-                ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent:ErrorCode = %d ",evt->GetErrorCode());
-                // error occured during prime operation
-                // move player back to prefetched state
-                if (iState == EStarted)
-                {
-                    ChangeState(EPrefetched);
-                }
-                PostActionCompleted(evt->GetErrorCode());   // java start return
-            }
-            break;
-
-            case MStreamControl::PRIMED:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                LOG( EJavaMMAPI, EInfo, "inner Switch case: MStreamControl::PRIMED ");
-
-            }
-            break;
-
-            case MStreamControl::EXECUTING:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                LOG( EJavaMMAPI, EInfo, "inner Switch case: MStreamControl::EXECUTING ");
-                ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent:ErrorCode = %d ",evt->GetErrorCode());
-                if (KErrEof == evt->GetErrorCode())
-                {
-                    TRAPD(error, PlayCompleteL(KErrNone));
-                    if (KErrNone != error)
-                    {
-                        ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::Event:PlayCompleteL Error = %d", error);
-                    }
-                }
-            }
-            break;
-
-            case MStreamControl::BUFFERING:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                LOG( EJavaMMAPI, EInfo, "inner Switch case: MStreamControl::BUFFERING ");
-            }
-            break;
-
-            case MStreamControl::PAUSED:
-            {
-                iPrevStreamControlState = MStreamControl::INITIALIZED;
-                LOG( EJavaMMAPI, EInfo, "inner Switch case: MStreamControl::PAUSED ");
-            }
-            break;
-            }
-        }
-        break;
-
-        case MStreamControl::PRIMED:
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :PRIMED");
-            iPrevStreamControlState = MStreamControl::PRIMED;
-            iControllerPrimed = ETrue;
-            TInt64 time;
-            // must be primed before media time can be get
-            GetMediaTime(&time);
-            TInt err = iMStreamControl->Start();
-            ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::Event play error %d",
-                      err);
-
-            // RateControl can start controller in started state, then Java event is
-            // not sent
-            if (err == KErrNone && iState != EStarted)
-            { // move to started state and post started event
-                PostLongEvent(CMMAPlayerEvent::EStarted, time);
-                ChangeState(EStarted);
-            }
-            else
-            {
-                PostLongEvent(CMMAPlayerEvent::EStarted, time);
-            }
-        }
-        break;
-
-        case MStreamControl::EXECUTING:
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :EXECUTING");
-            iPrevStreamControlState = MStreamControl::EXECUTING;
-            PostActionCompleted(KErrNone);   // java start return
-        }
-        break;
-
-        case MStreamControl::BUFFERING:
-        {
-            iPrevStreamControlState = MStreamControl::BUFFERING;
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :BUFFERING");
-        }
-        break;
-
-        case MStreamControl::PAUSED:
-        {
-            iPrevStreamControlState = MStreamControl::PAUSED;
-            if (iActiveSchedulerWait->IsStarted())
-            {
-                iActiveSchedulerWait->AsyncStop();
-            }
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :PAUSED");
-        }
-        break;
-
-        default:
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::Event:KStateChangedEvent :DEFAULT");
-            break;
-        }
-    }
-    break;
-
-    case MControlObserver::KErrorEvent:
-    {
-        MErrorCode* evt = (MErrorCode*)aEventObject;
-        if (KErrNone != evt->GetErrorCode())
-        {
-            ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::Event:KErrorEvent, err = %d", evt->GetErrorCode());
-        }
-    }
-    break;
-    }
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.emc/cmmaaudiostreamplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating streaming audio player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "cmmaaudiostreamplayerfactory.h"
-#include "cmmaaudiostreamplayer.h"
-#include "cmmaemcaudiovolumecontrol.h"
-#include "cmmastoptimecontrol.h"
-#include <MetaDataUtility.h>
-
-#include "cmmaaudiostreammetadatacontrol.h"
-#include "cmmaemcresolver.h"
-
-#ifdef __MMA_GENERIC_RATE_CONTROL__
-#include "cmmaaudiostreamratecontrol.h"
-#endif // __MMA_GENERIC_RATE_CONTROL__
-
-// CONSTANTS
-_LIT(KMimetypeAMR,"audio/amr");
-_LIT(KMimetypeAMRWB,"audio/amr-wb");
-_LIT(KMimetypeAAC, "audio/aac");
-_LIT(KMimetype3GPP, "audio/3gpp");
-_LIT(KMimetype3GPP2, "audio/3gpp2");
-_LIT(KMimetypeMPEG, "audio/mpeg");
-_LIT(KMimetypeMP4, "audio/mp4");
-_LIT(KMimetypeXMSWMA, "audio/x-ms-wma");
-_LIT(KMimetypeRM, "audio/x-pn-realaudio");
-
-CMMAAudioStreamPlayerFactory* CMMAAudioStreamPlayerFactory::NewLC()
-{
-    CMMAAudioStreamPlayerFactory* pFactory =
-        new(ELeave) CMMAAudioStreamPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAAudioStreamPlayerFactory::CMMAAudioStreamPlayerFactory()
-{
-    iHeaderData = NULL;
-}
-
-
-CMMAAudioStreamPlayerFactory::~CMMAAudioStreamPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC& /*aContentType*/)
-{
-    // only http/https protocol is supported
-    return NULL;
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& aParameters)
-{
-    // only http and https protocols are supported
-    if ((aProtocol != KMMAHttpProtocol) && (aProtocol != KMMAHttpsProtocol))
-    {
-        return NULL;
-    }
-
-    return CMMAEMCPlayerFactory::CreatePlayerL(aProtocol,
-            aMiddlePart,
-            aParameters);
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC8& /*aHeaderData*/)
-{
-    // only http/https protocol is supported
-    return NULL;
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    CMMAEMCResolver* aResolver)
-{
-    aResolver->SetSourceInfoL(iHeaderData);
-
-    HBufC* contentType = aResolver->ContentType();
-    if (!contentType ||
-            ((contentType->Des() != KMimetypeAMR) &&
-             (contentType->Des() != KMimetypeAMRWB) &&
-             (contentType->Des() != KMimetypeAAC) &&
-             (contentType->Des() != KMimetypeXMSWMA) &&
-             (contentType->Des() != KMimetypeRM) &&
-             (contentType->Des() != KMimetypeMPEG) &&
-             (contentType->Des() != KMimetype3GPP2) &&
-             (contentType->Des() != KMimetype3GPP) &&
-             (contentType->Des() != KMimetypeMP4)))
-    {
-        return NULL;
-    }
-
-    CMMAAudioStreamPlayer* player = CMMAAudioStreamPlayer::NewLC(aResolver);
-
-    CMMAEMCAudioVolumeControl* volumeControl = CMMAEMCAudioVolumeControl::NewL(*player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-    CMMAStopTimeControl* stopTimeControl = CMMAStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-#ifdef __MMA_GENERIC_RATE_CONTROL__
-    CMMAAudioStreamRateControl* rateControl = CMMAAudioStreamRateControl::NewL(player);
-    CleanupStack::PushL(rateControl);
-    player->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-#endif // __MMA_GENERIC_RATE_CONTROL__
-
-    CMMAAudioStreamMetaDataControl* metadatacontrol =
-        new(ELeave) CMMAAudioStreamMetaDataControl(player->MetaDataUtilityOwnership());
-    CleanupStack::PushL(metadatacontrol);
-    player->AddControlL(metadatacontrol);
-    CleanupStack::Pop(metadatacontrol);
-
-    // delete isourceinfo;
-    // no longer required, can be destroyed here
-    if (iHeaderData)
-    {
-        delete iHeaderData;
-        iHeaderData = NULL;
-    }
-
-    CleanupStack::Pop(player);
-
-    return player;
-}
-
-void CMMAAudioStreamPlayerFactory::GetSupportedContentTypesL(const TDesC& /*aProtocol*/,
-        CDesC16Array& /*aMimeTypeArray*/)
-{
-    // streaming player does not add new content types
-}
-
-void CMMAAudioStreamPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeAudio));
-}
-
-void CMMAAudioStreamPlayerFactory::SetSourceInfoL(const TUint8* aHeader, TInt aLength)
-{
-    iHeaderData = HBufC8::NewL(aLength);
-    iHeaderData->Des().Copy(aHeader, aLength);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.emc/cmmastreamhandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,416 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Streams data from Java to controller
-*
-*/
-
-
-//  INCLUDE FILES
-#include <AudioPreference.h>
-#include <logger.h>
-
-#include "cmmastreamhandler.h"
-#include "cmmadatasourcestream.h"
-#include "mmafunctionserver.h"
-
-
-CMMAStreamHandler* CMMAStreamHandler::NewL(
-    MMMAStreamHandlerListener& aListener,
-    MStreamControl& aMStreamControl,
-    MDataBufferSource& aMDataBufferSource,
-    CMultimediaFactory& aFactory,
-    CMetaDataUtility& aMetaDataUtility)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::NewL +");
-    CMMAStreamHandler* self = new(ELeave) CMMAStreamHandler(aListener,
-            aMStreamControl,
-            aMDataBufferSource,
-            aFactory,
-            aMetaDataUtility);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::NewL -");
-    return self;
-}
-
-CMMAStreamHandler::~CMMAStreamHandler()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::~CMMAStreamHandler() +");
-    iMDataBufferSource.RemoveObserver(*this);
-    if (iBuffer != NULL)
-    {
-        iFactory.DeleteDataBuffer(iBuffer);
-        iBuffer = NULL;
-    }
-    iRequests.ResetAndDestroy();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::~CMMAStreamHandler() -");
-}
-
-CMMAStreamHandler::CMMAStreamHandler(MMMAStreamHandlerListener& aListener,
-                                     MStreamControl& aMStreamControl,
-                                     MDataBufferSource& aMDataBufferSource,
-                                     CMultimediaFactory& aFactory,
-                                     CMetaDataUtility& aMetaDataUtility)
-        :iMStreamControl(aMStreamControl),
-        iMDataBufferSource(aMDataBufferSource),
-        iFactory(aFactory),
-        iListener(aListener),
-        iMetaDataUtility(aMetaDataUtility),
-        // to be removed once MDU supports all the reqd formats
-        iMimeTypeSupportedByMDU(ETrue)
-{
-    // ignore read/write completed before stream is prepared
-    iState = EMMAStreamPaused;
-    iMetaDataReadyToBeParsed = EFalse;
-}
-
-void CMMAStreamHandler::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::ConstructL +");
-    //Register source control to control observer to get the event
-    iMDataBufferSource.AddObserver(*this);
-    iLastBufferWritten = EFalse;
-    iBuffer = NULL; // initialize MDataBuffer type pointer
-    // create requests
-    for (TInt i = 0; i < KMMAStreamHandlerBufferCount; i++)
-    {
-        CMMAStreamRequest* requestToAppend = CMMAStreamRequest::NewLC(this);
-        iRequests.AppendL(requestToAppend);
-        CleanupStack::Pop(requestToAppend);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::ConstructL -");
-}
-
-void CMMAStreamHandler::Prepare(const TDesC8& aMimeType)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Prepare +");
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Prepare state %d", iState);
-    iState = EMMAStreamPrepare;
-    // initialize MetaDataUtility
-    TInt error = iMetaDataUtility.InitChunkData(aMimeType, *this);
-    ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::Prepare, error = %d", error);
-    if (error != KErrNone)
-    {
-        if (error == KErrArgument)
-        {
-            // MDU doesn't support aMimeType
-            // can be removed once MDU supports all the reqd formats
-            iMimeTypeSupportedByMDU = EFalse;
-        }
-        else
-        {
-            // MDU supports but some other error occured
-            iListener.PrepareComplete(error);
-            return;
-        }
-    }
-    else
-    {
-        // to be removed once MDU supports all the reqd formats
-        iMimeTypeSupportedByMDU = ETrue;
-    }
-    //reset request data for reading again from beginning
-    iRequests[0]->DataPtr().SetLength(0);
-
-    // when read completes iListerner.PrepareComplete will be called
-    iSourceStream->Read(iRequests[ 0 ]);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Prepare -");
-}
-
-void CMMAStreamHandler::Start()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start +");
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start state %d", iState);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start data source request=%d",(TInt)iSourceStream->Request());
-    iState = EMMAStreamStart;
-    if (iSourceStream->Request())
-    { // when read request is completed it will be written to server
-        iState = EMMAStreamStarted;
-        iListener.StartComplete(KErrNone);
-        return;
-    }
-
-    TInt count = iRequests.Count();
-    TBool started = EFalse;
-    for (TInt i = 0; i < count && !started; i++)
-    {
-        CMMAStreamRequest* r = iRequests[ i ];
-        if (!r->IsActive() && r->DataPtr().Length() > 0)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start write request to server");
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start request length=%d",
-                      r->DataPtr().Length());
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start last buffer %d",
-                      r->RequestBuffer()());
-
-            // data was not yet written to server
-            WriteRequest(r);
-            started = ETrue;
-        }
-        else if (r->IsActive())  // data is in server
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start data is in server");
-            // atleast one request is not processed
-            started = ETrue;
-        }
-    }
-    if (started)  // If allready started complete start
-    {
-        iListener.StartComplete(KErrNone);
-        iState = EMMAStreamStarted;
-    }
-    else
-    {
-        // Need to read data before start
-        iSourceStream->Read(iRequests[ 0 ]);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Start -");
-}
-
-void CMMAStreamHandler::Pause()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Pause +");
-    // ignore read/write completes
-    iState = EMMAStreamPaused;
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Pause -");
-}
-
-void CMMAStreamHandler::SetSourceStream(CMMADataSourceStream* aSourceStream)
-{
-    iSourceStream = aSourceStream;
-}
-
-void CMMAStreamHandler::WriteComplete(CMMAStreamRequest* aRequest)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete +");
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete state=%d", iState);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete request length=%d",
-              aRequest->DataPtr().Length());
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete last buffer %d",
-              aRequest->RequestBuffer()());
-    if (iState == EMMAStreamStarted)
-    {
-        if (aRequest->RequestBuffer()() == 1)
-        {
-            iState = EMMAStreamEof;
-        }
-        else
-        {
-            iSourceStream->Read(aRequest);
-        }
-    }
-    // else, all other states ignore write complete
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete -");
-}
-
-void CMMAStreamHandler::ReadComplete(CMMAStreamRequest* aRequest)
-{
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::ReadComplete +");
-
-    if (iState == EMMAStreamPrepare)
-    {
-
-        WriteRequest(aRequest);
-        iListener.PrepareComplete(KErrNone);
-        iState = EMMAStreamPaused;
-    }
-    else if (iState == EMMAStreamStart)
-    {
-        iState = EMMAStreamStarted;
-        // write first request to server
-        WriteRequest(aRequest);
-        iListener.StartComplete(KErrNone);
-    }
-    else if (iState == EMMAStreamStarted)
-    {
-        WriteRequest(aRequest);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::ReadComplete -");
-    // else, all other states ignore read complete
-}
-
-void CMMAStreamHandler::HandleError(CMMAStreamRequest* /*aRequest*/,
-                                    TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleError +");
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleError state=%d", iState);
-    if (iState == EMMAStreamPrepare)
-    {
-        iListener.PrepareComplete(aError);
-        iState = EMMAStreamPaused;
-    }
-    else if (iState == EMMAStreamStart)
-    {
-        iListener.StartComplete(aError);
-        iState = EMMAStreamStarted;
-    }
-    else
-    {
-        iListener.HandleError(aError);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleError -");
-}
-
-void CMMAStreamHandler::WriteRequest(CMMAStreamRequest* aRequest)
-{
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteRequest +");
-    iCurrentRequest = aRequest; //initialize the current StreamRequest for use in callback function
-    iProcessedState = EMMANoneProcessed;
-
-    TInt state = iMStreamControl.GetState();
-    if (!aRequest->IsActive())
-    {
-        aRequest->SetActive(ETrue);
-    }
-
-    //Create MDataBuffer and then pass it as a parameter of WriteData
-    if (iBuffer != NULL)
-    {
-        iFactory.DeleteDataBuffer(iBuffer);
-        iBuffer= NULL;
-    }
-    iFactory.CreateDataBuffer(KDataBufferSourceControl, KMMAStreamRequestBufferSize, iBuffer);
-    iBuffer->GetBufferPtr().Set(aRequest->DataPtr());
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteRequest: Size of the Data to be written is %d ",aRequest->DataPtr().Length());
-    if (aRequest->RequestBuffer()() == 1)  //set that it is the last buffer
-    {
-        iState = EMMAStreamEof;
-        iBuffer->SetLastBuffer(ETrue);
-        iLastBufferWritten = ETrue;
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteRequest: LastBuffer");
-    }
-    else
-    {
-        iBuffer->SetLastBuffer(EFalse);
-        iLastBufferWritten = EFalse;
-    }
-
-    // When the buffer is processed by framework KBufferProcessedEvent
-    // will be delivered to registered observers
-    TInt err = iMDataBufferSource.WriteData(*iBuffer);
-    // to be removed once MDU supports all the reqd formats
-    if (iMimeTypeSupportedByMDU && !iMetaDataReadyToBeParsed)
-    {
-        err = iMetaDataUtility.ProcessChunkData(aRequest->DataPtr(), iLastBufferWritten);
-    }
-    ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::WriteRequest, err = %d", err);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteRequest -");
-}
-
-void CMMAStreamHandler::Event(MControl* /*aControl*/, TUint aEventType, TAny* aEventObject)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Event ");
-    switch (aEventType)
-    {
-
-    case MSourceControlObserver::KBufferProcessedEvent:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Event:KBufferProcessedEvent");
-        MBufferProcessedEvent* evt = (MBufferProcessedEvent*)aEventObject;
-        ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::Event:KBufferProcessedEvent:ErrorCode = %d ",evt->GetErrorCode());
-        // can be removed once MDU supports all the reqd formats
-        if (!iMimeTypeSupportedByMDU ||
-                (iProcessedState == EMMAMetaDataProcessed || iMetaDataReadyToBeParsed))
-        {
-            iCurrentRequest->WriteRequestComplete(evt->GetErrorCode());
-            iCurrentRequest->SetActive(EFalse);
-            iProcessedState = EMMABothProcessed;
-        }
-        else
-        {
-            iProcessedState = EMMABufferProcessed;
-        }
-    }
-    break;
-
-    case MSourceControlObserver::KBitRateChangedEvent:
-    {
-    }
-    break;
-
-    case MStreamControlObserver::KDurationChangedEvent:
-    {
-    }
-    break;
-
-    default:
-        break;
-
-    };
-}
-
-void CMMAStreamHandler::HandleChunkDataProcessed(TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleChunkDataProcessed + ");
-    ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::HandleChunkDataProcessed, aError = %d", aError);
-    if (iProcessedState == EMMABufferProcessed)
-    {
-        iCurrentRequest->WriteRequestComplete(aError);
-        iCurrentRequest->SetActive(EFalse);
-        iProcessedState = EMMABothProcessed;
-    }
-    else
-    {
-        iProcessedState = EMMAMetaDataProcessed;
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleChunkDataProcessed - ");
-}
-
-void CMMAStreamHandler::HandleChunkDataReadyToBeParsed()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleChunkDataReadyToBeParsed + ");
-    iMetaDataReadyToBeParsed = ETrue;
-    TInt error = iMetaDataUtility.ParseChunkData();
-    ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::HandleChunkDataReadyToBeParsed, error = %d ", error);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleChunkDataReadyToBeParsed - ");
-}
-
-void CMMAStreamHandler::HandleChunkDataComplete(TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleChunkDataComplete");
-    if (KErrNone != aError)
-    {
-        ELOG1( EJavaMMAPI, "MMA::CMMAStreamHandler::HandleChunkDataComplete, aError = %d ", aError);
-        iListener.HandleError(aError);
-    }
-
-}
-
-TBool CMMAStreamHandler::LastBufferWritten()
-{
-    return iLastBufferWritten;
-}
-
-void CMMAStreamHandler::Stop()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Stop + ");
-    // forcefully complete all requests
-    // and release already read data.
-    Pause();
-    iMetaDataUtility.CloseChunkData();
-    TInt count = iRequests.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        CMMAStreamRequest* r = iRequests[ i ];
-        r->WriteRequestComplete(KErrNone);
-        r->SetActive(EFalse);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::Stop - ");
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.emc/cmmastreamrequest.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Request used to write or read data
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "cmmastreamrequest.h"
-#include "mmmastreamrequestlistener.h"
-
-CMMAStreamRequest* CMMAStreamRequest::NewLC(MMMAStreamRequestListener* aListener)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::NewLC +");
-    CMMAStreamRequest* self = new(ELeave)CMMAStreamRequest(aListener);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::NewLC -");
-    return self;
-}
-
-CMMAStreamRequest::~CMMAStreamRequest()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::~CMMAStreamRequest +");
-    delete iData;
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::~CMMAStreamRequest -");
-}
-
-TPtr8& CMMAStreamRequest::DataPtr()
-{
-    return iDataPtr;
-}
-
-void CMMAStreamRequest::CompleteRead(TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::CompleteRead +");
-    if (aError < KErrNone)
-    {
-        iListener->HandleError(this, aError);
-    }
-    else // OK
-    {
-        iListener->ReadComplete(this);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::CompleteRead -");
-}
-
-void CMMAStreamRequest::SetActive(TBool aActive)
-{
-    iActive = aActive;
-}
-
-TBool CMMAStreamRequest::IsActive()
-{
-    return iActive;
-}
-
-TPckgBuf< TInt >& CMMAStreamRequest::RequestBuffer()
-{
-    return iRequestBuffer;
-}
-
-void CMMAStreamRequest::WriteRequestComplete(TInt Err)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::WriteRequestComplete +");
-    if (Err == KErrNone)
-    {
-        // data is processed, set ready for reuse
-        iDataPtr.SetLength(0);
-        iListener->WriteComplete(this);
-    }
-    else // error
-    {
-        iListener->HandleError(this, Err);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::WriteRequestComplete -");
-}
-
-CMMAStreamRequest::CMMAStreamRequest(MMMAStreamRequestListener* aListener):
-        iListener(aListener),
-        iDataPtr(NULL, 0),iActive(EFalse)
-{
-    //Do Nothing
-}
-
-void CMMAStreamRequest::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::ConstructL +");
-    iData = HBufC8::NewL(KMMAStreamRequestBufferSize);
-    iDataPtr.Set(iData->Des());
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamRequest::ConstructL -");
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for streaming audio.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmfdes.h>
-#include <audiopreference.h>
-#include <logger.h>
-
-#include "CMMAAudioStreamPlayer.h"
-#include "CMMADataSourceStream.h"
-#include "MMAFunctionServer.h"
-#include "CMMAStreamHandler.h"
-
-const TInt KPlayerPriority = KAudioPriorityRecording;
-_LIT(KMMAStreamErrorMessage, "Internal error: %d");
-
-// Uid must be same as in S60StreamingSourceUIDs.hrh which is not exported from
-// EnhancedAudioPlayerUtility/AudioStreaming/AudioStreamingSource.
-const TUid KMMAMmfS60StreamingSourceUid = { 0x10207AF3 };
-
-
-CMMAAudioStreamPlayer* CMMAAudioStreamPlayer::NewLC(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAAudioStreamPlayer* self = new(ELeave) CMMAAudioStreamPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAAudioStreamPlayer::~CMMAAudioStreamPlayer()
-{
-    delete iStreamHandler;
-}
-
-CMMAAudioStreamPlayer::CMMAAudioStreamPlayer(
-    CMMAMMFResolver* aResolver):
-        CMMAAudioPlayer(aResolver)
-{
-}
-
-void CMMAAudioStreamPlayer::ConstructL()
-{
-    CMMAAudioPlayer::ConstructL();
-    iStreamHandler = CMMAStreamHandler::NewL(*this, iController);
-}
-
-TInt CMMAAudioStreamPlayer::DoOpen(TUid aSourceUid,
-                                   const TDesC8& aSourceData,
-                                   TUid aSinkUid,
-                                   const TDesC8& aSinkData,
-                                   TMMFPrioritySettings aPrioritySettings)
-{
-    // Make sure any existing controller is closed.
-    iEventMonitor->Cancel();
-    iController.Close();
-
-    // Try opening and configuring each controller in turn
-    TInt error = KErrNotSupported;
-    TInt index = 0;
-
-    // Try controllers until found a good controller or out of list
-    while ((error != KErrNone) &&
-            (index < iControllerInfos->Count()))
-    {
-        // Open the controller
-        error = iController.Open((*iControllerInfos)[ index ]->Uid(),
-                                 aPrioritySettings);
-
-        // If the controller was opened without error, start receiving events from it.
-        if (!error)
-        {
-            iEventMonitor->Start();
-
-            // Add the data source to the controller.
-            error = iController.AddDataSource(aSourceUid,
-                                              aSourceData,
-                                              iStreamHandler->MessageDestination());
-        }
-
-        // Add the data sink
-        if (!error)
-        {
-            error = iController.AddDataSink(aSinkUid, aSinkData);
-        }
-
-        // If an error occurred in any of the above, close the controller.
-        if (error)
-        {
-            iEventMonitor->Cancel();
-            iController.Close();
-        }
-
-        index++;
-    }
-
-    return error;
-}
-
-CMMASourceStream* CMMAAudioStreamPlayer::AddSourceStreamL(JNIEnv* aJNIEnv,
-        MMAFunctionServer* aEventSource,
-        jobject aReader)
-{
-    CMMADataSourceStream* sourceStream = CMMADataSourceStream::NewLC(aJNIEnv,
-                                         aEventSource,
-                                         aReader,
-                                         this);
-    User::LeaveIfError(iSourceStreams.Append(sourceStream));
-    CleanupStack::Pop(sourceStream);
-    iStreamHandler->SetSourceStream(sourceStream);
-    return sourceStream;
-}
-
-void CMMAAudioStreamPlayer::PrefetchL()
-{
-    __ASSERT_DEBUG(iSourceStreams.Count() > 0, User::Invariant());
-
-    // player priority settings
-    TMMFPrioritySettings prioritySettings;
-    prioritySettings.iPriority = KPlayerPriority;
-    prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
-    prioritySettings.iState = EMMFStatePlaying;
-
-    User::LeaveIfError(DoOpen(KMMAMmfS60StreamingSourceUid,
-                              KNullDesC8,
-                              KUidMmfAudioOutput,
-                              KNullDesC8,
-                              prioritySettings));
-    iStreamHandler->PrepareL();
-}
-
-void CMMAAudioStreamPlayer::StartL()
-{
-    // If the player is in Prefetched state then it is implied that it has read "KMMAStreamRequestBufferSize"
-    // and it can be played
-    LOG1(EJavaMMAPI,EInfo,"CMMAAudioStreamPlayer::StartL() , state = %d",iState);
-    if (iState == EPrefetched)
-    {
-
-        TInt64 time;
-        GetMediaTime(&time);
-
-        // inform java side
-        PostLongEvent(CMMAPlayerEvent::EStarted, time);
-
-        // go to started state
-        ChangeState(EStarted);
-
-        PostActionCompleted(KErrNone);   // java start return
-    }
-    iStreamHandler->StartL();
-}
-
-void CMMAAudioStreamPlayer::StopL(TBool aPostEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::Stop state %d", iState);
-    if (iState == EStarted)
-    {
-        User::LeaveIfError(Pause());
-
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-        if (aPostEvent)
-        {
-            TInt64 time;
-            GetMediaTime(&time);
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioStreamPlayer::Stop OK");
-}
-
-TInt CMMAAudioStreamPlayer::Pause()
-{
-    iStreamHandler->Pause();
-    return iController.Pause();
-}
-
-void CMMAAudioStreamPlayer::PlayCompleteL(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::PlayCompleteL error %d",
-              aError);
-
-    // Before controller is started it must be primed
-    iControllerPrimed = EFalse;
-
-    TInt64 time;
-    GetDuration(&time);
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, time);
-
-    ChangeState(EPrefetched);   // ready to play again
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-}
-
-void CMMAAudioStreamPlayer::GetDuration(TInt64* aDuration)
-{
-    CMMAPlayer::GetDuration(aDuration);
-}
-
-void CMMAAudioStreamPlayer::PrepareComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::PrepareComplete error %d",
-              aError);
-    if (aError == KErrNone)
-    {
-        ChangeState(EPrefetched);
-    }
-    PostActionCompleted(aError);   // java prefetch return
-}
-
-void CMMAAudioStreamPlayer::StartComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete error %d",
-              aError);
-
-    // do not start if player is deallocated or closed
-    // RateControl start can start controller in started state
-    if ((iState != EStarted) &&
-            (iState != EPrefetched))
-    {
-        return;
-    }
-
-    TInt err = aError;
-    if (!iControllerPrimed)
-    {
-        // Prime must be called when player is started first time or restarted
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioStreamPlayer::StartComplete PRIME");
-        err = iController.Prime();
-        iControllerPrimed = ETrue;
-        ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete prime error %d",
-                  err);
-    }
-    else
-    {
-        err = KErrNone;
-    }
-
-    TInt64 time;
-    if (err == KErrNone)
-    {
-        // must be primed before media time can be get
-        GetMediaTime(&time);
-        err = iController.Play();
-        ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::StartComplete play error %d",
-                  err);
-    }
-
-    // RateControl can start controller in started state, then Java event is
-    // not sent
-    if (err == KErrNone && iState != EStarted)
-    { // move to started state and post started event
-        PostLongEvent(CMMAPlayerEvent::EStarted, time);
-        ChangeState(EStarted);
-    }
-    else
-    { // post error event
-        HandleError(aError);
-    }
-}
-
-void CMMAAudioStreamPlayer::HandleError(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMAAudioStreamPlayer::HandleError error %d",
-              aError);
-
-    TName errorMessage;
-    errorMessage.Format(KMMAStreamErrorMessage, aError);
-    PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating streaming audio player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "CMMAAudioStreamPlayerFactory.h"
-#include "CMMAAudioStreamPlayer.h"
-#include "CMMAAudioVolumeControl.h"
-#include "CMMAStopTimeControl.h"
-#include "CMMAMMFResolver.h"
-#include "CMMAAudioMetaDataControl.h"
-#include "CMMAAudioStreamRateControl.h"
-
-// CONSTANTS
-_LIT(KMMAAMRMimetype, "audio/amr");
-_LIT(KMMAAMRWBMimetype, "audio/amr-wb");
-
-CMMAAudioStreamPlayerFactory* CMMAAudioStreamPlayerFactory::NewLC()
-{
-    CMMAAudioStreamPlayerFactory* pFactory =
-        new(ELeave) CMMAAudioStreamPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAAudioStreamPlayerFactory::CMMAAudioStreamPlayerFactory()
-{
-}
-
-
-CMMAAudioStreamPlayerFactory::~CMMAAudioStreamPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC& /*aContentType*/)
-{
-    // only http protocol is supported
-    return NULL;
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& aParameters)
-{
-    // only http protocol is supported
-    if (aProtocol != KMMAHttpProtocol)
-    {
-        return NULL;
-    }
-
-    return CMMAMMFPlayerFactory::CreatePlayerL(aProtocol,
-            aMiddlePart,
-            aParameters);
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    const TDesC8& /*aHeaderData*/)
-{
-    // only http protocol is supported
-    return NULL;
-}
-
-CMMAPlayer* CMMAAudioStreamPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    // only amr streaming is supported
-    HBufC* contentType = aResolver->ContentType();
-    if (!contentType ||
-            ((contentType->Des() != KMMAAMRMimetype) &&
-             (contentType->Des() != KMMAAMRWBMimetype)))
-    {
-        return NULL;
-    }
-
-    CMMAAudioStreamPlayer* player = CMMAAudioStreamPlayer::NewLC(aResolver);
-
-    CMMAAudioVolumeControl* volumeControl = CMMAAudioVolumeControl::NewL(player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-// Amr stream player should support METADATACONTROL so adding this control to the player
-    CMMAAudioMetaDataControl* metaDataControl =
-        new(ELeave) CMMAAudioMetaDataControl(player->Controller());
-    CleanupStack::PushL(metaDataControl);
-    player->AddControlL(metaDataControl);
-    CleanupStack::Pop(metaDataControl);   
-
-    CMMAStopTimeControl* stopTimeControl = CMMAStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    CMMAAudioStreamRateControl* rateControl = CMMAAudioStreamRateControl::NewL(player);
-    CleanupStack::PushL(rateControl);
-    player->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-
-    CleanupStack::Pop(player);
-
-    return player;
-}
-
-void CMMAAudioStreamPlayerFactory::GetSupportedContentTypesL(const TDesC& /*aProtocol*/,
-        CDesC16Array& /*aMimeTypeArray*/)
-{
-    // streaming player does not add new content types
-}
-
-void CMMAAudioStreamPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeAudio));
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamhandler.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Streams data from Java to controller
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmfdes.h>
-#include <audiopreference.h>
-#include <logger.h>
-
-#include "CMMAStreamHandler.h"
-#include "CMMADataSourceStream.h"
-#include "MMAFunctionServer.h"
-
-CMMAStreamHandler* CMMAStreamHandler::NewL(
-    MMMAStreamHandlerListener& aListener,
-    RMMFController& aController)
-{
-    CMMAStreamHandler* self = new(ELeave) CMMAStreamHandler(aListener,
-            aController);
-    self->ConstructL();
-    return self;
-}
-
-CMMAStreamHandler::~CMMAStreamHandler()
-{
-    iRequests.ResetAndDestroy();
-}
-
-CMMAStreamHandler::CMMAStreamHandler(MMMAStreamHandlerListener& aListener,
-                                     RMMFController& aController):
-        iController(aController),
-        iListener(aListener)
-{
-    // ignore read/write completed before stream is prepared
-    iState = EMMAStreamPaused;
-}
-
-void CMMAStreamHandler::ConstructL()
-{
-    // create requests
-    for (TInt i = 0; i < KMMAStreamHandlerBufferCount; i++)
-    {
-        CMMAStreamRequest* requestToAppend = CMMAStreamRequest::NewLC(this);
-        iRequests.AppendL(requestToAppend);
-        CleanupStack::Pop(requestToAppend);
-    }
-}
-
-void CMMAStreamHandler::PrepareL()
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::PrepareL state %d", iState);
-    iState = EMMAStreamPrepare;
-
-    //reset request data for reading again from beginning
-    iRequests[0]->DataPtr().SetLength(0);
-
-    // when read completes iListerner.PrepareComplete will be called
-    iSourceStream->Read(iRequests[ 0 ]);
-}
-
-void CMMAStreamHandler::StartL()
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL state %d", iState);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL data source request=%d",
-              (TInt)iSourceStream->Request());
-
-    iState = EMMAStreamStart;
-    if (iSourceStream->Request())
-    { // when read request is completed it will be written to server
-        iState = EMMAStreamStarted;
-        iListener.StartComplete(KErrNone);
-        return;
-    }
-
-    TInt count = iRequests.Count();
-    TBool started = EFalse;
-    for (TInt i = 0; i < count && !started; i++)
-    {
-        CMMAStreamRequest* r = iRequests[ i ];
-        if (!r->IsActive() && r->DataPtr().Length() > 0)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL write request to server");
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL request length=%d",
-                      r->DataPtr().Length());
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL last buffer %d",
-                      r->RequestBuffer()());
-
-            // data was not yet written to server
-            WriteRequest(r);
-            started = ETrue;
-        }
-        else if (r->IsActive())  // data is in server
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::StartL data is in server");
-            // atleast one request is not processed
-            started = ETrue;
-        }
-    }
-    if (started)  // If allready started complete start
-    {
-        iListener.StartComplete(KErrNone);
-        iState = EMMAStreamStarted;
-    }
-    else
-    {
-        // Need to read data before start
-        iSourceStream->Read(iRequests[ 0 ]);
-    }
-}
-
-void CMMAStreamHandler::Pause()
-{
-    // ignore read/write completes
-    iState = EMMAStreamPaused;
-}
-
-TMMFMessageDestination& CMMAStreamHandler::MessageDestination()
-{
-    return iDataSourceHandle;
-}
-
-void CMMAStreamHandler::SetSourceStream(CMMADataSourceStream* aSourceStream)
-{
-    iSourceStream = aSourceStream;
-}
-
-void CMMAStreamHandler::WriteComplete(CMMAStreamRequest* aRequest)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete state=%d", iState);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete request length=%d",
-              aRequest->DataPtr().Length());
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::WriteComplete last buffer %d",
-              aRequest->RequestBuffer()());
-    if (iState == EMMAStreamStarted)
-    {
-        if (aRequest->RequestBuffer()() == 1)
-        {
-            iState = EMMAStreamEof;
-        }
-        else
-        {
-            iSourceStream->Read(aRequest);
-        }
-    }
-    // else, all other states ignore write complete
-}
-
-void CMMAStreamHandler::ReadComplete(CMMAStreamRequest* aRequest)
-{
-    if (iState == EMMAStreamPrepare)
-    {
-        WriteRequest(aRequest);
-        iListener.PrepareComplete(KErrNone);
-        iState = EMMAStreamPaused;
-    }
-    else if (iState == EMMAStreamStart)
-    {
-        iState = EMMAStreamStarted;
-        // write first request to server
-        WriteRequest(aRequest);
-        iListener.StartComplete(KErrNone);
-    }
-    else if (iState == EMMAStreamStarted)
-    {
-        WriteRequest(aRequest);
-    }
-    // else, all other states ignore read complete
-}
-
-void CMMAStreamHandler::HandleError(CMMAStreamRequest* /*aRequest*/,
-                                    TInt aError)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAStreamHandler::HandleError state=%d", iState);
-    if (iState == EMMAStreamPrepare)
-    {
-        iListener.PrepareComplete(aError);
-        iState = EMMAStreamPaused;
-    }
-    else if (iState == EMMAStreamStart)
-    {
-        iListener.StartComplete(aError);
-        iState = EMMAStreamStarted;
-    }
-    else
-    {
-        iListener.HandleError(aError);
-    }
-}
-
-void CMMAStreamHandler::WriteRequest(CMMAStreamRequest* aRequest)
-{
-    if (aRequest->RequestBuffer()() == 1)
-    {
-        iState = EMMAStreamEof;
-    }
-
-    if (!aRequest->IsActive())
-    {
-        aRequest->SetActive();
-    }
-
-    // Send write request to server, HandleRequestCompleteL is called when finished
-    iController.CustomCommandAsync(iDataSourceHandle,
-                                   1, /*EProcessBuffer*/
-                                   aRequest->DataPtr(),
-                                   aRequest->RequestBuffer(),
-                                   aRequest->iStatus);
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamrequest.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Request used to write or read data
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "CMMAStreamRequest.h"
-#include "MMMAStreamRequestListener.h"
-
-CMMAStreamRequest* CMMAStreamRequest::NewLC(MMMAStreamRequestListener* aListener)
-{
-    CMMAStreamRequest* self = new(ELeave)CMMAStreamRequest(aListener);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAStreamRequest::~CMMAStreamRequest()
-{
-    Cancel();
-    delete iData;
-}
-
-TPtr8& CMMAStreamRequest::DataPtr()
-{
-    return iDataPtr;
-}
-
-void CMMAStreamRequest::CompleteRead(TInt aError)
-{
-    if (aError < KErrNone)
-    {
-        iListener->HandleError(this, aError);
-    }
-    else // OK
-    {
-        iListener->ReadComplete(this);
-    }
-}
-
-void CMMAStreamRequest::SetActive()
-{
-    CActive::SetActive();
-}
-
-TPckgBuf< TInt >& CMMAStreamRequest::RequestBuffer()
-{
-    return iRequestBuffer;
-}
-
-void CMMAStreamRequest::RunL()
-{
-    if (iStatus.Int() == KErrNone)
-    {
-        // data is processed, set ready for reuse
-        iDataPtr.SetLength(0);
-        iListener->WriteComplete(this);
-    }
-    else // error
-    {
-        iListener->HandleError(this, iStatus.Int());
-    }
-}
-
-TInt CMMAStreamRequest::RunError(TInt aError)
-{
-    iListener->HandleError(this, aError);
-    return KErrNone;
-}
-
-void CMMAStreamRequest::DoCancel()
-{
-    // Complete this request
-    TRequestStatus* s = &iStatus;
-    User::RequestComplete(s, KErrCancel);
-}
-
-CMMAStreamRequest::CMMAStreamRequest(MMMAStreamRequestListener* aListener):
-        CActive(EPriorityStandard),
-        iListener(aListener),
-        iDataPtr(NULL, 0)
-{
-    CActiveScheduler::Add(this);
-}
-
-void CMMAStreamRequest::ConstructL()
-{
-    iData = HBufC8::NewL(KMMAStreamRequestBufferSize);
-    iDataPtr.Set(iData->Des());
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src/cmmaaudiostreamratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements RateControl for HTTP stream audio player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmaaudiostreamratecontrol.h"
-
-namespace
-{
-const TInt KErrorMessageSize = 32;
-_LIT(KErrDefaultError, "Symbian OS Error: %d");
-}
-
-CMMAAudioStreamRateControl* CMMAAudioStreamRateControl::NewL(CMMAAudioStreamPlayer* aPlayer)
-{
-    CMMAAudioStreamRateControl* self = new(ELeave) CMMAAudioStreamRateControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CMMAAudioStreamRateControl::~CMMAAudioStreamRateControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamRateControl::~CMMAAudioStreamRateControl");
-    if (iPlayer)
-    {
-        iPlayer->RemoveStateListener(this);
-    }
-}
-
-CMMAAudioStreamRateControl::CMMAAudioStreamRateControl(CMMAAudioStreamPlayer* aPlayer) :
-        iPlayer(aPlayer), iCurrentRate(KMMADefaultRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamRateControl::CMMAAudioStreamRateControl");
-}
-
-void CMMAAudioStreamRateControl::ConstructL()
-{
-    iPlayer->AddStateListenerL(this);
-}
-
-void CMMAAudioStreamRateControl::StateChanged(TInt aState)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamRateControl::StateChanged");
-    if (aState == CMMAPlayer::EStarted && iCurrentRate == KMMAMinRate)
-    {
-        // do not post event to Java or change player state
-        TInt err = iPlayer->Pause();
-        if (err != KErrNone)
-        {
-            ELOG1( EJavaMMAPI, "CMMAAudioStreamRateControl::StateChanged: Pause error %d", err);
-            TBuf<KErrorMessageSize> errorMessage;
-            errorMessage.Format(KErrDefaultError, err);
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        }
-    }
-}
-
-TInt CMMAAudioStreamRateControl::SetRateL(TInt aRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAAudioStreamRateControl::SetRateL");
-    TInt newRate;
-    if (aRate <= KMMAMinRate)
-    {
-        newRate = KMMAMinRate;
-    }
-    else
-    {
-        newRate = KMMADefaultRate;
-    }
-
-    if ((iPlayer->State() == CMMAPlayer::EStarted) &&
-            (newRate != iCurrentRate))
-    {
-        if (newRate == KMMAMinRate)
-        {
-            // do not post event to Java or change player state
-            User::LeaveIfError(iPlayer->Pause());
-        }
-        else
-        {
-            // do not post event to Java or change player state
-            iPlayer->StartL();
-        }
-    }
-    iCurrentRate = newRate;
-    return iCurrentRate;
-}
-
-TInt CMMAAudioStreamRateControl::RateL()
-{
-    return iCurrentRate;
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/audiostreaming/src/cmmadatasourcestream.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for reading data from Java SourceStream to native side
-*
-*/
-
-#include <logger.h>
-#include "mmafunctionserver.h"
-#include "cmmadatasourcestream.h"
-#include "mmmasourcestreamlistener.h"
-#include "cmmastreamrequest.h"
-#include "cmmasourcestreamevent.h"
-
-
-// CONSTRUCTION
-CMMADataSourceStream* CMMADataSourceStream::NewLC(JNIEnv* aJNIEnv,
-        MMMAEventPoster* aEventPoster,
-        jobject aJavaSourceStream,
-        MMMASourceStreamListener* aListener,
-        MMAFunctionServer* aEventSource
-		                                         )
-{
-    CMMADataSourceStream* self = new(ELeave) CMMADataSourceStream(aEventPoster,
-            aListener);
-    CleanupStack::PushL(self);
-    self->ConstructL(aJNIEnv, aEventSource, aJavaSourceStream);
-    return self;
-}
-
-
-CMMADataSourceStream::~CMMADataSourceStream()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADataSourceStream::~");
-}
-
-
-// Default constructor
-CMMADataSourceStream::CMMADataSourceStream(MMMAEventPoster* aEventPoster,
-        MMMASourceStreamListener* aListener):
-        CMMASourceStream(aEventPoster, aListener)
-{
-}
-
-
-inline void CMMADataSourceStream::ConstructL(JNIEnv* aJNIEnv,MMAFunctionServer* /*aEventSource*/,
-        jobject aJavaSourceStream)
-{
-    CMMASourceStream::ConstructL(aJNIEnv, aJavaSourceStream);
-    CreateDataBufferL(KMMAStreamRequestBufferSize);
-}
-
-void CMMADataSourceStream::WriteL(const TUint8* aData,
-                                  TInt aLength,
-                                  TInt aState)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMADataSourceStream::WriteL data length %d", aLength);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMADataSourceStream::WriteL state %d", aState);
-
-    if (!iRequest)
-    {
-        // there is no request to write
-        return;
-    }
-
-    if (aState >= KErrNone)
-    {
-        if ((aState == CMMASourceStream::ECompleted) &&
-                aLength == -1)
-        {
-            // Stream ended
-            iRequest->RequestBuffer() = 1;
-        }
-        else if ((iData->Length() == 0) &&
-                 (iRequest->DataPtr().Length() == 0))
-        {
-            iRequest->DataPtr().Append(aData, aLength);
-            // read next
-            iEventPoster->PostEvent(iReadEvent,
-                                    CMMAEvent::ENotifyPriority);
-            return;
-        }
-        else if (iData->Length() == 0)
-        {
-            iData->Des().Append(aData, aLength);
-        }
-    }
-
-    // complete read operation
-    CMMAStreamRequest* r = iRequest;
-    iRequest = NULL;
-    r->CompleteRead(aState);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADataSourceStream::WriteL completed");
-}
-
-void CMMADataSourceStream::ResetData()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADataSourceStream::ResetData");
-}
-
-CMMAStreamRequest* CMMADataSourceStream::Request()
-{
-    return iRequest;
-}
-
-void CMMADataSourceStream::Read(CMMAStreamRequest* aRequest)
-{
-    // Setting NULL, means that all read completes are ignored
-    if (!aRequest)
-    {
-        iRequest = NULL;
-        return;
-    }
-
-    if (!iRequest)
-    {
-        iRequest = aRequest;
-        iRequest->RequestBuffer() = 0;
-        iReadEvent->SetLength(aRequest->DataPtr().MaxLength());
-
-        if (iData->Length() > 0)
-        {
-            // Previous read buffered data
-            iRequest->DataPtr().Append(*iData);
-
-            // re-use buffer
-            iData->Des().SetLength(0);
-        }
-
-        // data has been requested, note will be sent
-        iEventPoster->PostEvent(iReadEvent, CMMAEvent::ENotifyPriority);
-    }
-    // else java is already reading
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/inc.dsa/cmmadsawindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplayWindow functionality
-*                in Direct Screen Access based displays for Helix engine.
-*
-*/
-
-
-#ifndef CMMADSAWINDOW_H
-#define CMMADSAWINDOW_H
-
-
-//  INCLUDES
-#include <w32std.h>
-#include <e32std.h>
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "mmmadisplaywindow.h"
-#include "mmafunctionserver.h"
-#include "cmmaplayer.h"
-
-//  CONSTANTS
-const TInt KMMAVideoMinDimension = 32; // minimum video width and height
-
-//  CLASS DECLARATION
-/**
-* This class implements MMMADisplayWindow functionality
-* in Direct Screen Access based displays for Helix engine.
-*/
-NONSHARABLE_CLASS(CMMADSAWindow): public CBase,
-        public MMMADisplayWindow
-{
-public:     // Constructors and destructors
-    static CMMADSAWindow* NewL(
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer,
-        RMMFVideoPlayControllerCustomCommands* aVPCustomCommand);
-
-    virtual ~CMMADSAWindow();
-
-private:  // Constructors and destructors
-    CMMADSAWindow(
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer,
-        RMMFVideoPlayControllerCustomCommands* aVPCustomCommand);
-
-    void ConstructL();
-
-public: // New methods
-    TBool IsVisible() const;
-
-public: // Methods derived from MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-    const TRect& DrawRect();
-    TSize WindowSize();
-    void SetPosition(const TPoint& aPosition);
-    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
-    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
-    const TRect& WindowRect();
-    void ContainerDestroyed();
-    /**
-     * Notifies window that any drawing
-     * via direct screen access must be aborted
-     */
-    void AbortDSA();
-
-    /**
-     * Allows window to draw
-     * via direct screen access after MdcAbortDSA
-     */
-    void ResumeDSA();
-
-private:
-    static void StaticSetWindowPosition(
-        CMMADSAWindow* aWindow,
-        TPoint aPosition,
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-
-    static void SetWindowVisible(
-        CMMADSAWindow* aWindow,
-        TBool aVisible,
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-
-    static void StaticAbortDSA(
-        CMMADSAWindow* aWindow,
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-
-    static void StaticResumeDSA(
-        CMMADSAWindow* aWindow,
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-private:  // Data
-    TRect iDrawRect;
-    TRect iClientRect;
-
-    /**
-     * not owned, used for switching from UI thread to MMA thread
-     */
-    MMAFunctionServer* iEventSource;
-
-    /**
-     * We must depend on player's state because direct screen access may
-     * not be resumed before player is started.
-     */
-    CMMAPlayer* iPlayer;
-
-    /**
-     * not owned, used for controlling video position and visibility
-     */
-    RMMFVideoPlayControllerCustomCommands* iVideoPlayControllerCustomCommands;
-
-    /**
-     * Indicates if content need to be drawn.
-     */
-    TBool iVisible;
-
-    /**
-     * Indicates if DSA is aborted.
-     */
-    TBool iDSAAborted;
-};
-
-#endif // CMMADSAWINDOW_H
--- a/javauis/mmapi_qt/baseline/inc.dsa/cmmavideoplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing video.
-*
-*/
-
-
-#ifndef CMMAVIDEOPLAYER_H
-#define CMMAVIDEOPLAYER_H
-
-//  INCLUDES
-#include "cmmaaudioplayer.h"
-#include "mmmaguiplayer.h"
-#include "mmmasnapshot.h"
-#include "cmmadsawindow.h"
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-
-// CONSTANTS
-// Error code from MMF meaning that video is missing sound,
-// but still can be played.
-const TInt KNotCompleteVideoError = -12017;
-_LIT(KMMAVideoPlayer, "VideoPlayer");
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing video.
-*
-*/
-
-NONSHARABLE_CLASS(CMMAVideoPlayer): public CMMAAudioPlayer,
-        public MMMAGuiPlayer,
-        public MMMASnapshot
-{
-public: // Construction
-    static CMMAVideoPlayer* NewLC(
-        CMMAMMFResolver* aResolver);
-
-    //   Destructor
-    ~CMMAVideoPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAVideoPlayer(CMMAMMFResolver* aResolver);
-
-    void ConstructL();
-
-public: // from CMMAPlayer
-    IMPORT_C void SetPlayerListenerObjectL(jobject aListenerObject,
-                                           JNIEnv* aJni,
-                                           MMMAEventPoster* aEventPoster);
-    void RealizeL();
-    void PrefetchL();
-
-protected: // from CMMAudioPlayer
-    IMPORT_C void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-    void HandleEvent(const TMMFEvent& aEvent);
-    IMPORT_C const TDesC& Type();
-
-public: // From MMMAGuiPlayer
-    IMPORT_C void SetDisplayL(MMMADisplay* aDisplay);
-    IMPORT_C TSize SourceSize();
-    IMPORT_C void NotifyWithStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                                        const TDesC& aStringEventData);
-
-    IMPORT_C MMMASnapshot* SnapshoterL();
-
-public: // From MMMASnapshot
-    IMPORT_C MMMASnapshot::TEncoding TakeSnapshotL(TRequestStatus* aStatus,
-            const TSize& aSize,
-            const CMMAImageSettings& aSettings);
-    IMPORT_C CFbsBitmap* SnapshotBitmap();
-    IMPORT_C HBufC8* SnapshotEncoded();
-
-protected: // New methods
-    void CompletePrefetch(TInt aError);
-    void PrepareDisplay();
-    void SourceSizeChanged();
-
-protected: // Data
-    CMMADSAWindow* iDSAWindow;
-    RMMFVideoControllerCustomCommands iVideoControllerCustomCommands;
-    RMMFVideoPlayControllerCustomCommands iVideoPlayControllerCustomCommands;
-
-private: // Data
-    MMMADisplay* iDisplay;
-
-    TSize iSourceSize;
-
-    TFileName iFileExtension;
-    CFbsBitmap* iEmptySnapshotImage;
-
-    CActiveSchedulerWait* iActiveSchedulerWait;
-};
-
-#endif // CMMAVIDEOPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmaemcaudioplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-#ifndef CMMAEMCAUDIOPLAYER_H
-#define CMMAEMCAUDIOPLAYER_H
-
-//  INCLUDES
-#include "cmmaemcplayerbase.h"
-#include "mmfbase.h"
-
-// CONSTANTS
-
-const TMdaPriorityPreference KMMAEMCPriorityPreference =
-    EMdaPriorityPreferenceTimeAndQuality;
-
-_LIT(KMMAEMCAudioPlayer, "EMCAudioPlayer");
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing sounds
-*
-*/
-
-NONSHARABLE_CLASS(CMMAEMCAudioPlayer): public CMMAEMCPlayerBase
-{
-public: // Construction
-    /**
-     * Creates new player.
-     */
-    static CMMAEMCAudioPlayer* NewLC(
-        CMMAEMCResolver* aResolver);
-
-    //   Destructor
-    IMPORT_C ~CMMAEMCAudioPlayer();
-
-protected:
-    //   C++ constructor
-    IMPORT_C CMMAEMCAudioPlayer(CMMAEMCResolver* aResolver);
-    IMPORT_C void ConstructL();
-
-protected: // New methods
-    IMPORT_C virtual void PrefetchDataL(const TDesC8& aData);
-    IMPORT_C virtual void PrefetchFileL();
-    IMPORT_C virtual void PlayCompleteL(TInt aError);
-
-public: // from CMMAPlayer
-    IMPORT_C void RealizeL();
-    IMPORT_C void PrefetchL();
-
-    IMPORT_C const TDesC& Type();
-
-public: // from CMMAPlayer/MMMASourceStreamListener
-    IMPORT_C void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-};
-
-#endif // CMMAEMCAUDIOPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmaemcaudiovolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#ifndef CMMAEMCAUDIOVOLUMECONTROL_H
-#define CMMAEMCAUDIOVOLUMECONTROL_H
-
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "VolumeControl.h"
-#include "cmmavolumecontrol.h"
-
-using multimedia::MVolumeControl;
-
-class CMMAEMCAudioPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-    This class is used for setting volume to audio player
-
------------------------------------------------------------------------------
-*/
-
-NONSHARABLE_CLASS(CMMAEMCAudioVolumeControl): public CMMAVolumeControl
-{
-public: // constructors and destructors
-    IMPORT_C static CMMAEMCAudioVolumeControl* NewL(CMMAEMCAudioPlayer& aPlayer);
-
-protected:
-    IMPORT_C CMMAEMCAudioVolumeControl(CMMAEMCAudioPlayer& aPlayer);
-    void ConstructL();
-
-    ~CMMAEMCAudioVolumeControl();
-
-public: // from CMMAVolumeControl
-    IMPORT_C void DoSetLevelL(TInt aLevel);
-    IMPORT_C TInt DoGetLevelL();
-
-private: // data
-    MVolumeControl* iVolCntrl;
-
-    // not owned
-    CMMAEMCAudioPlayer& iPlayer;
-};
-
-#endif // CMMAEMCAUDIOVOLUMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmaemcplayerbase.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-#ifndef CMMAEMCPLAYERBASE_H
-#define CMMAEMCPLAYERBASE_H
-
-//  INCLUDES
-#include <mmf/common/mmfbase.h>
-#include "cmmaplayer.h"
-#include "e32base.h"
-#include "f32file.h"
-#include "StreamControl.h"
-#include "Events.h"
-#include "ProgDLSource.h"
-#include "MMControlFactory.h"
-#include "ControlObserver.h"
-#include "DataBufferSource.h"
-#include "FileSource.h"
-#include "DescriptorSource.h"
-#include "DataBuffer.h"
-#include "SinkControl.h"
-#include "badesca.h"
-#include "MimeTypes.h"
-#include "StreamControlObserver.h"
-#include "SourceControlObserver.h"
-
-
-using multimedia ::MStreamControl;
-using multimedia ::MControlObserver;
-using multimedia ::MProgDLSource;
-using multimedia ::MDataBufferSource;
-using multimedia ::MDescriptorSource;
-using multimedia ::MDataBuffer;
-using multimedia ::MControl;
-using multimedia ::CMultimediaFactory;
-using multimedia ::MSinkControl;
-using multimedia ::MFileSource;
-using multimedia::MSourceControlObserver;
-using multimedia::MStreamControlObserver;
-
-class CMMAEMCResolver;
-//  CLASS DECLARATION
-/**
-*   This is base class for players those use EMC
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAEMCPlayerBase): public CMMAPlayer,
-        public MControlObserver
-{
-protected:
-    //   C++ constructor
-    CMMAEMCPlayerBase(CMMAEMCResolver* aResolver);
-    void ConstructL();
-
-    ~CMMAEMCPlayerBase();
-public: // new methods
-    /**
-     * Getter for StreamControl
-     */
-    IMPORT_C MStreamControl * StreamControl();
-
-    /**
-    * Multimedia Factory getter
-    */
-    IMPORT_C CMultimediaFactory* MMFactory();
-
-    /**
-     * Check whether this player is playing from a file locator
-     * @return ETrue if is a file player, EFalse otherwise
-     */
-    TBool IsFilePlayer();
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void DeallocateL();
-    void GetDuration(TInt64* aDuration);
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-    void CloseL();
-
-private: //New methods
-    void CreateStreamL();
-    void DetermineMimeTypeL(const TDesC& aFileName, TDes8& aMimeType);
-    void CleanupSource();
-    void AddDataSourceToStreamL();
-
-public: // from MControlObserver
-    void Event(MControl* aControl,
-               TUint aEventType,
-               TAny* aEventObject);
-
-protected:
-
-    CActiveSchedulerWait* iActiveSchedulerWait;
-
-    /**
-     * StreamControl infos, owned
-     */
-    MStreamControl* iMStreamControl;
-    MDataBufferSource* iMDataBufferSource;
-    MDescriptorSource* iMDescriptorSource;
-    MFileSource* iMFileSource;
-    MSinkControl* iMAudioSink;
-    MStreamControl::TStreamState iPrevStreamControlState;
-    enum TSourceType
-    {
-        EFILESOURCE,
-        EDATABUFFERSOURCE,
-        EDESCRIPTORSOURCE
-    };
-    TSourceType iSourceType;
-    RPointerArray<MDataBuffer> iBuffers;
-    RArray<TInt> iAvailable;
-    TBool iIsEOFReached;
-    TBool iAutoWriteBuffer;
-    TInt iBytesReadFromFile;
-    TInt iFileSizeInBytes;
-    CMultimediaFactory* iFactory;
-
-    HBufC8* iMimeType;
-    HBufC8* iDescData;
-
-    /**
-     * Filename used for playing directly from file, owned
-     */
-    HBufC* iFileName;
-
-    /**
-    * Cached media time
-    */
-    TInt64 iMediaTime;
-
-    /**
-    * The time that will be sent with CMMAPlayerEvent::EStarted
-    * (may be different from iMediaTime).
-    */
-    TInt64 iStartedEventTime;
-};
-
-#endif // CMMAEMCPLAYERBASE_H
-
-// End of file
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmaemcplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating EMC-based players.
-*
-*/
-
-
-#ifndef CMMAEMCPLAYERFACTORY_H
-#define CMMAEMCPLAYERFACTORY_H
-
-//  INCLUDES
-// #include <mmf/common/mmfcontrollerpluginresolver.h>        Remove and replace with proper header file
-#include "mmmaplayerfactory.h"
-
-class CMMAEMCResolver;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating EMC-based players.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAEMCPlayerFactory): public CBase, public MMMAPlayerFactory
-{
-public: // Constructor and destructor
-    CMMAEMCPlayerFactory();
-    ~CMMAEMCPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-protected:
-    /**
-      * Creates new CMMAPlayer instance with given resolver.
-      * @param aResolver Resolver that contains needed infos
-      * for creating player.
-      */
-    virtual CMMAPlayer* CreatePlayerL(CMMAEMCResolver* aResolver) = 0;
-
-    /**
-     * Returns list of allowed media IDs
-     */
-    virtual void MediaIdsL(RArray<TUid>& aMediaIds) = 0;
-
-    /**
-     * Checks that is this protocol supported by this factory
-     */
-    TBool IsSupportedProtocolL(const TDesC& aProtocol);
-
-    /**
-     * Checks that is this content-type supported by this factory
-     */
-    TBool IsSupportedContentTypeL(const TDesC& aContentType);
-private:
-    /**
-     * File version of creating player from content type
-     */
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType,
-                              const TDesC* aFileName);
-#ifndef RD_JAVA_OMA_DRM_V2
-    /**
-     * Tries to open DRM file
-     */
-    CMMAPlayer* TryOpenDRMFileL(const TDesC& aFileName);
-#endif // RD_JAVA_OMA_DRM_V2
-
-};
-
-#endif // CMMAEMCPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmaemcresolver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CMMAEMCRESOLVER_H
-#define CMMAEMCRESOLVER_H
-
-#include <MimeTypes.h>
-#include "cmmaplayer.h"
-
-//Supported file extensions
-
-_LIT(K3g2FileExtension, ".3g2");
-_LIT(K3gpFileExtension, ".3gp");
-_LIT(KAacFileExtension, ".aac");
-_LIT(KAmrFileExtension, ".amr");
-_LIT(KAwbFileExtension, ".awb");
-_LIT(KM4aFileExtension, ".m4a");
-_LIT(KMp3FileExtension, ".mp3");
-_LIT(KMp4FileExtension, ".mp4");
-_LIT(KWmaFileExtension, ".wma");
-_LIT(KRmFileExtension, ".rm");
-_LIT(KRaFileExtension, ".ra");
-
-const TInt KContentTypeMaxLength = 30;
-
-
-//  CLASS DECLARATION
-
-NONSHARABLE_CLASS(CMMAEMCResolver): public CBase
-
-{
-public: // Construction
-    /**
-     * Constructs a new mmf resolver object.
-     * @return The new object created.  Note that the new object will be
-     * left on the cleanup stack.
-     */
-    static CMMAEMCResolver* NewLC();
-
-public: // New methods.
-
-    HBufC* ContentTypeOwnership();
-
-    HBufC8* MimeTypeOwnership();
-
-    /**
-     * Returns content type
-     */
-    HBufC* ContentType();
-
-    /**
-     * Sets filename
-     * @param aFileName File name to be set or NULL
-     */
-
-    void SetFileNameL(const TDesC* aFileName);
-
-    /**
-     * Sets Mime Type
-     * @param aFileName File name to be set or NULL
-     */
-
-    void SetMimeTypeL(const TDesC* aFileName);
-
-    /**
-     * Returns possible filename or NULL if not set
-     * Ownership is transfered.
-     * @return Content type or NULL if type is not available.
-     */
-    HBufC* FileNameOwnership();
-
-    /**
-     * Get all supported content types.
-     * @param aMimeTypeArray Will contain supported mime types.
-     */
-    void GetSupportedContentTypesL(CDesC16Array& aMimeTypeArray);
-
-
-private:
-
-    /** Finds content type from given File name.
-    */
-    void ResolveContentTypeL(const TDesC& aFileName, TDes8& aMimeType);
-
-    void ResolveContentTypeL();
-
-private:
-    ~CMMAEMCResolver();
-
-private:
-
-    // Owned. Ownership can be transferred with ContentType method.
-    HBufC* iContentType;
-
-    // Owned. Ownership can be transferred with MimeType method.
-    HBufC8* iMimeType;
-
-    // Owned. Ownership can be transferred with FileName method.
-    HBufC* iFileName;
-
-public: // new method
-    void SetSourceInfoL(const HBufC8* aHeaderData);
-
-private:
-    TBool IsRealVideoTypeL(const TDesC8& aHeader);
-
-    TBool IsRealMimeTypeSupported(const TDesC& aMimeType);
-
-private: // Data
-    const HBufC8* iHeaderData; // not owned
-};
-
-#endif // CMMAEMCRESOLVER_H
--- a/javauis/mmapi_qt/baseline/inc.emc/cmmamanager.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class uses player factories to generate different players
-*
-*/
-
-
-#ifndef CMMAMANAGER_H
-#define CMMAMANAGER_H
-
-//  EXTERNAL INCLUDES
-#include <badesca.h>
-
-//  INTERNAL INCLUDES
-#include "mmafunctionserver.h"
-#include "mmmaplayerfactory.h"
-//#include <jutils.h>
-
-//  FORWARD DECLARATIONS
-class CMMAPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class uses player factories to generate different types of players.
-*/
-
-NONSHARABLE_CLASS(CMMAManager): public CBase, public MMMAPlayerFactory
-{
-public: // Constructors and destructors
-    /**
-     * Deletes all owned members.
-     */
-    virtual ~CMMAManager();
-
-    /**
-     * Static constructor
-     */
-    static void StaticCreateManagerL(CMMAManager** aManager,
-                                     TInt aMIDletSuiteID);
-
-protected:
-    /**
-     * Initializes member variables to defaults.
-     */
-    CMMAManager();
-
-    /**
-     * Second phase construct.
-     */
-    void ConstructL(TInt aMIDletSuiteID);
-
-public: // From MMMAPlayerFactory
-
-    /**
-     * @see MMAPlayerFactory
-     */
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-public: // new methods
-
-    void SetSourceInfoL(const TUint8* header, TInt aLength);
-
-    /**
-     * Adds player factory to manager
-     *
-     * @param aPlayerFactory handle to player factory
-     */
-    IMPORT_C void AddPlayerFactoryL(MMMAPlayerFactory* aPlayerFactory);
-
-private:
-    /**
-     * Array of player factories. Owned.
-     */
-    RPointerArray< MMMAPlayerFactory > iPlayerFactories;
-};
-
-#endif // CMMAMANAGER_H
--- a/javauis/mmapi_qt/baseline/inc.mmf/cmmamanager.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class uses player factories to generate different players
-*
-*/
-
-
-#ifndef CMMAMANAGER_H
-#define CMMAMANAGER_H
-
-//  EXTERNAL INCLUDES
-#include <badesca.h>
-
-//  INTERNAL INCLUDES
-#include "MMAFunctionServer.h"
-#include "MMMAPlayerFactory.h"
-
-
-//  FORWARD DECLARATIONS
-class CMMAPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class uses player factories to generate different types of players.
-*/
-
-NONSHARABLE_CLASS(CMMAManager): public CBase, public MMMAPlayerFactory
-{
-public: // Constructors and destructors
-    /**
-     * Deletes all owned members.
-     */
-    virtual ~CMMAManager();
-
-    /**
-     * Static constructor
-     */
-    static void StaticCreateManagerL(CMMAManager** aManager,
-                                     TInt aMIDletSuiteID);
-
-protected:
-    /**
-     * Initializes member variables to defaults.
-     */
-    CMMAManager();
-
-    /**
-     * Second phase construct.
-     */
-    void ConstructL(TInt aMIDletSuiteID);
-
-public: // From MMMAPlayerFactory
-
-    /**
-     * @see MMAPlayerFactory
-     */
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-public: // new methods
-
-    /**
-     * Adds player factory to manager
-     *
-     * @param aPlayerFactory handle to player factory
-     */
-    IMPORT_C void AddPlayerFactoryL(MMMAPlayerFactory* aPlayerFactory);
-
-private:
-    /**
-     * Array of player factories. Owned.
-     */
-    RPointerArray< MMMAPlayerFactory > iPlayerFactories;
-};
-
-#endif // CMMAMANAGER_H
--- a/javauis/mmapi_qt/baseline/inc.nga/cmmasurfacewindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,364 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplayWindow functionality
-*               in graphics surface based displays for Helix engine.
-*
-*/
-
-#ifndef CMMASURFACEWINDOW_H
-#define CMMASURFACEWINDOW_H
-
-
-//  INCLUDES
-#include <w32std.h>
-//#include <reflcdui.h>
-#include <graphics/surface.h>
-#include <mmf/common/mmfvideosurfacecustomcommands.h>
-#include <mediaclientvideodisplay.h>
-
-#include <e32std.h>
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "mmmadisplaywindow.h"
-#include "mmafunctionserver.h"
-#include "cmmaplayer.h"
-#include "cmmacanvasdisplay.h"
-
-//  FORWARD DECLARATIONS
-class RWsSession;
-class CWsScreenDevice;
-class RWindowBase;
-class MMMADisplay;
-
-//  CONSTANTS
-const TInt KMMAVideoMinDimension = 32; // minimum video width and height
-
-//  CLASS DECLARATION
-/**
-* This class implements MMMADisplayWindow functionality
-* in video display to graphics surface based displays for Helix engine.
-*/
-NONSHARABLE_CLASS(CMMASurfaceWindow): public CBase,
-        public MMMADisplayWindow/*,
-        public MUiEventConsumer*/
-{
-public:
-    /**
-     * indicates what method needs to be called in UI thread context.
-     */
-    enum TUiCallbackType
-    {
-        ERemoveSurface = 1,
-        ESetDrawRect,
-        EInitVideoDisplay,
-        EResetSurfaceParameters,
-        ESetChangedSurfaceParameters,
-        ECleanVideoDisplay,
-        EDestroyWindow
-    };
-
-private:
-    /**
-     * indicates different video display initialization states
-     *
-     * video display state transition can happen in following order:
-     * 1. when MIDlet code is:
-     * Player player = Manager.createPlayer(..);
-     * player.realize();
-     * VideoControl vc = (VideoControl)player.getControl("VideoControl");
-     * vc.initDisplayMode(..);
-     * player.start();
-     *
-     * EUIResourcesAndSurfaceParametersNotSet
-     * EUIResourcesSetAndSurfaceParametersNotSet
-     * EUIResourcesAndSurfaceParametersSet
-     *
-     *          OR
-     *
-     * 2. when MIDlet code is:
-     * Player player = Manager.createPlayer(..);
-     * player.start();
-     * VideoControl vc = (VideoControl)player.getControl("VideoControl");
-     * vc.initDisplayMode(..);
-     *
-     * EUIResourcesAndSurfaceParametersNotSet
-     * ESurfaceParametersSetAndUIResourcesNotSet
-     * EUIResourcesAndSurfaceParametersSet
-     *
-     * InitVideoDisplayL() should be called only after EUIResourcesAndSurfaceParametersSet
-     * state is reached. ie both UI resources and surface parameters becomes available.
-     *
-     * 3. for below mentioned MIDlet code case:
-     * Player player = Manager.createPlayer(..);
-     * player.start(); // state transition is
-     *
-     * EUIResourcesAndSurfaceParametersNotSet
-     * ESurfaceParametersSetAndUIResourcesNotSet
-     * note that InitVideoDisplayL() is not called and video is not displayed in this case.
-     */
-    enum TVideoDisplayInitState
-    {
-        /**
-         * indicates ui resources and surface parameters are not yet set.
-         * UI resources are RWindowBase, CWsScreenDevice and RWsSession.
-         * Surface parameters are TSurfaceId, TRect and TVideoAspectRatio.
-         */
-        EUIResourcesAndSurfaceParametersNotSet = 1,
-        /**
-         * indicates UI resources are set and surface parameters not yet set.
-         * UI resources are set when initDisplayMode() is called and RWindow becomes available.
-         */
-        EUIResourcesSetAndSurfaceParametersNotSet,
-        /**
-         * indicates UI resources are not yet set and surface parameters are set.
-         * Surface parameters are set when player.start() is called.
-         */
-        ESurfaceParametersSetAndUIResourcesNotSet,
-        /**
-         * indicates UI resources and surface parameters are set.
-         */
-        EUIResourcesAndSurfaceParametersSet
-    };
-
-public:   // Constructors and destructors
-    static CMMASurfaceWindow* NewL(
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-
-    virtual ~CMMASurfaceWindow();
-
-private:  // Constructors and destructors
-    CMMASurfaceWindow(
-        MMAFunctionServer* aEventSource,
-        CMMAPlayer* aPlayer);
-
-public: // Methods derived from MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-    const TRect& DrawRect();
-    TSize WindowSize();
-    void SetPosition(const TPoint& aPosition);
-    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
-    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
-    void SetVideoCropRegion(const TRect& aRect);
-    void SetRWindowRect(const TRect& aRect, MMMADisplay::TThreadType aThreadType);
-    const TRect& WindowRect();
-    void ContainerDestroyed();
-    void ContainerSet();
-/*
-public: // from base class MUiEventConsumer
-    void MdcDSAResourcesCallback(RWsSession &aWs,
-                                 CWsScreenDevice &aScreenDevice,
-                                 RWindowBase &aWindow);
-								 
-*/								 
-    void UICallback(TInt aCallbackId);
- public: 
-    	 virtual void ProcureWindowResourcesFromQWidget(RWsSession * aWs,
-    																										CWsScreenDevice* aScreenDevice,
-  																													  RWindowBase* aWindow);	
-  																													  
-    virtual CMMAPlayer* UiPlayer();
-
-public: // New methods
-    TBool IsVisible() const;
-    void SetDisplay(MMMADisplay *aDisplay);
-
-    /**
-     * copies surface paramaters and intializes video display if
-     * RWindow is already set, ie if intDisplayMode already called in midlet.
-     * invokes InitVideoDisplayL() in UI thread context.
-     *
-     * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters.
-     */
-    void SetSurfaceParameters(const TSurfaceId& aSurfaceId,
-                              const TRect& aCropRect,
-                              const TVideoAspectRatio& aPixelAspectRatio);
-                              
-    /**
-     * invokes DoRemoveSurface() in UI thread context.
-     */
-    void RemoveSurface();
-
-    /**
-     * updates members variables with new surface parameters and invokes
-     * DoSetChangedSurfaceParameters() in UI thread context.
-     *
-     * @params aSurfaceId, aCropRect, aPixelAspectRatio surface paramaters.
-     */
-    void SetChangedSurfaceParameters(const TSurfaceId& aSurfaceId,
-                                     const TRect& aCropRect,
-                                     const TVideoAspectRatio& aPixelAspectRatio);
-
-private: // New methods
-    /**
-     * scales video to the required size.
-     * This method must always be executed in UI-Thread context.
-     *
-     * @param aRect rectangular size to which the video has to be scaled.
-     */
-    void ScaleVideoL(const TRect& aRect);
-
-    /**
-     * starts video rendering to a graphics surface.
-     * restarts video rendering to a graphics surafce with changed parameters.
-     * This method must always be executed in UI-Thread context.
-     */
-    void RedrawVideoL();
-
-    /**
-     * utility function to invoke RedrawVideoL() function with in a TRAP harness.
-     *
-     * @param aSurfaceWindow reference to CMMASurfaceWindow instance on which RedrawVideoL()
-     * has to be invoked
-     * @return TInt Symbian OS error code, KErrNone if no error
-     */
-    static TInt StaticRedrawVideo(CMMASurfaceWindow& aSurfaceWindow);
-
-    /**
-     * creates new instance of CMediaClientVideoDisplay and intializes it with
-     * surfaces and windows.
-     * This method must always be executed in UI-Thread context.
-     */
-    void InitVideoDisplayL();
-
-    /**
-     * updates CMediaClientVideoDisplay instance with new surface parameters.
-     * This method must always be executed in UI-Thread context.
-     */
-    void DoSetChangedSurfaceParameters();
-
-    /**
-     * resets CMediaClientVideoDisplay instance with new surface parameters.
-     * This method must always be executed in UI-Thread context.
-     */
-    void DoResetSurfaceParameters();
-    
-    /**
-     * Removes Surface from RWindow
-     * This method must always be executed in UI-Thread context.
-     */
-    void DoRemoveSurface();
-
-    /**
-     * removes surfaces and windows from CMediaClientVideoDisplay instance
-     * and deletes the instance.
-     * This method must always be executed in UI-Thread context.
-     */
-    void CleanVideoDisplay();
-
-    /**
-     * Deletes this object.
-     *
-     * @since  S60 v5.2
-     */
-    void Destroy();
-
-private:  // Data
-    /**
-     * drawing area where video is rendered.
-     */
-    TRect iContentRect;
-
-    /**
-         * parent rectangle used for positioning contentRect.
-         */
-    TRect iParentRect;
-
-    /**
-     * Symbian RWindow rect
-     */
-    TRect iRWindowRect;
-
-    /**
-     * not owned, used for switching from UI thread to MMA thread
-     */
-    MMAFunctionServer* iEventSource;
-
-    /**
-     * We must depend on player's state because direct screen access may
-     * not be resumed before player is started.
-     * not owned.
-     */
-    CMMAPlayer* iPlayer;
-
-    /**
-     * crop rectangle of video
-     */
-    TRect iVideoCropRegion;
-
-    /**
-     * owned, used for video display on surface
-     * this instance is created & accessed in UI thread only.
-     */
-    CMediaClientVideoDisplay* iMediaClientVideoDisplay;
-
-    /**
-         * Display instance used to invoke UI callbacks.
-         * Not owned.
-         */
-    MMMADisplay* iDisplay;
-
-    /**
-     * Window server session used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    RWsSession* iWs;
-
-    /**
-     * Screen device used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    CWsScreenDevice* iScreenDevice;
-
-    /**
-     * Window where video is displayed.
-     * Adjustable and usable from UI thread only.
-     * From UI thread.
-     * Not owned.
-     */
-    RWindowBase* iWindow;
-
-    /**
-     * The surface to be created for composition.
-     */
-    TSurfaceId iSurfaceId;
-
-    /**
-         * The dimensions of the crop rectangle, relative to the video image.
-         */
-    TRect iCropRect;
-
-    /**
-         * The pixel aspect ratio to display video picture.
-         */
-    TVideoAspectRatio iPixelAspectRatio;
-
-    /**
-     * indicates the video display initialization state.
-     *
-     */
-    TVideoDisplayInitState iVideoDisplayInitState;
-
-    /**
-     * Indicates if content need to be drawn.
-     */
-    TBool iVisible;
-
-};
-
-#endif // CMMASURFACEWINDOW_H
--- a/javauis/mmapi_qt/baseline/inc.nga/cmmavideoplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing video.
-*
-*/
-
-#ifndef CMMAVIDEOPLAYER_H
-#define CMMAVIDEOPLAYER_H
-
-//  INCLUDES
-#include "cmmaaudioplayer.h"
-#include "mmmaguiplayer.h"
-#include "mmmasnapshot.h"
-#include "cmmasurfacewindow.h"
-//#include <jutils.h>
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-
-// CONSTANTS
-// Error code from MMF meaning that video is missing sound,
-// but still can be played.
-const TInt KNotCompleteVideoError = -12017;
-_LIT(KMMAVideoPlayer, "VideoPlayer");
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing video.
-*
-*/
-NONSHARABLE_CLASS(CMMAVideoPlayer): public CMMAAudioPlayer,
-        public MMMAGuiPlayer,
-        public MMMASnapshot
-{
-public: // Construction
-    static CMMAVideoPlayer* NewLC(
-        CMMAMMFResolver* aResolver);
-
-    //   Destructor
-    ~CMMAVideoPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAVideoPlayer(CMMAMMFResolver* aResolver);
-
-    void ConstructL();
-
-public: // from CMMAPlayer
-    IMPORT_C void SetPlayerListenerObjectL(jobject aListenerObject,
-                                           JNIEnv* aJni,
-                                           MMMAEventPoster* aEventPoster);
-    void RealizeL();
-    void PrefetchL();
-
-protected: // from CMMAudioPlayer
-    IMPORT_C void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-    void HandleEvent(const TMMFEvent& aEvent);
-    IMPORT_C const TDesC& Type();
-
-public: // From MMMAGuiPlayer
-    IMPORT_C void SetDisplayL(MMMADisplay* aDisplay);
-    IMPORT_C TSize SourceSize();
-    IMPORT_C void NotifyWithStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                                        const TDesC& aStringEventData);
-
-    IMPORT_C MMMASnapshot* SnapshoterL();
-
-public: // From MMMASnapshot
-    IMPORT_C MMMASnapshot::TEncoding TakeSnapshotL(TRequestStatus* aStatus,
-            const TSize& aSize,
-            const CMMAImageSettings& aSettings);
-    IMPORT_C CFbsBitmap* SnapshotBitmap();
-    IMPORT_C HBufC8* SnapshotEncoded();
-
-    protected: // New methods
-        void CompletePrefetch( TInt aError );
-        void PrepareDisplay();
-    public:
-        void SourceSizeChanged();
-
-protected: // Data
-    CMMASurfaceWindow* iSurfaceWindow;
-    RMMFVideoControllerCustomCommands iVideoControllerCustomCommands;
-    RMMFVideoPlayControllerCustomCommands iVideoPlayControllerCustomCommands;
-    RMMFVideoPlaySurfaceSupportCustomCommands iVideoPlaySurfaceSupportCustomCommands;
-
-private: // Data
-    // not owned
-    MMMADisplay* iDisplay;
-
-    TSize iSourceSize;
-
-    TFileName iFileExtension;
-
-    /**
-     * struct to keep track of Surface
-     */
-    struct MMASurface
-    {
-     // owned, should be freed using
-     // RMMFVideoPlaySurfaceSupportCustomCommands::SurfaceRemoved().
-     TSurfaceId iPrevSurfaceId;
-     TBool iPrevSurfaceAvailable;
-    } iMMASurface;
-
-    // owned
-    CFbsBitmap* iEmptySnapshotImage;
-
-    // owned
-    CActiveSchedulerWait* iActiveSchedulerWait;
-};
-
-#endif // CMMAVIDEOPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudiometadatacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMAAudioMetaDataControl is a concrete class for getting
-*                metadata from an audio media.
-*
-*/
-
-
-#ifndef CMMAAUDIOMETADATACONTROL_H
-#define CMMAAUDIOMETADATACONTROL_H
-
-//  INCLUDES
-#include <mmfcontroller.h>
-
-#include "cmmametadatacontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This is a concrete class for getting metadata from an audio media.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioMetaDataControl): public CMMAMetaDataControl
-{
-public:
-    CMMAAudioMetaDataControl(RMMFController& aController);
-
-protected: // from CMMAMetaDataControl
-
-    TInt KeyCountL();
-    HBufC* KeyL(TInt aIndex);
-
-    HBufC* KeyValueL(const TDesC& aKey);
-
-private:
-    RMMFController& iController;
-};
-
-#endif // CMMAAUDIOMETADATACONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudioplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-#ifndef CMMAAUDIOPLAYER_H
-#define CMMAAUDIOPLAYER_H
-
-//  INCLUDES
-#include "cmmammfplayerbase.h"
-//#include <jutils.h>
-
-
-_LIT(KMMAAudioPlayer, "AudioPlayer");
-
-/**
-Mixin class for playback complete notifications.
-*/
-class MPlaybackCompletedCallback
-{
-public:
-    virtual void HandlePlaybackCompleteL() = 0;
-    virtual void ErrorPlaybackComplete(TInt aError) = 0;
-};
-
-/**
-Active object used for give MMF server time to complete its playback
-*/
-class CPlaybackCompletedCallback : public CTimer
-{
-public:// Constructor and destructor
-    static CPlaybackCompletedCallback* NewL(MPlaybackCompletedCallback& aObs);
-    ~CPlaybackCompletedCallback();
-
-public: // new methods
-    void Callback();
-
-public: // From CTimer
-    void RunL();
-    TInt RunError(TInt aError);
-
-private: // Constructor
-    CPlaybackCompletedCallback(MPlaybackCompletedCallback& aObs);
-
-private: // Data
-    MPlaybackCompletedCallback& iObs;
-};
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing sounds
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioPlayer): public CMMAMMFPlayerBase,
-        public MPlaybackCompletedCallback
-
-{
-public: // Construction
-    /**
-     * Creates new player.
-     */
-    static CMMAAudioPlayer* NewLC(
-        CMMAMMFResolver* aResolver);
-
-    //   Destructor
-    ~CMMAAudioPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAAudioPlayer(CMMAMMFResolver* aResolver);
-    void ConstructL();
-
-protected: // New methods
-    IMPORT_C virtual void PrefetchDataL(const TDesC8& aData);
-    IMPORT_C virtual void PrefetchFileL();
-    IMPORT_C virtual void PlayCompleteL(TInt aError);
-
-public: // from CMMAPlayer
-    void RealizeL();
-    void PrefetchL();
-
-    const TDesC& Type();
-
-public: // from CMMAPlayer/MMMASourceStreamListener
-    void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-
-public: // from MMMFControllerEventMonitorObserver
-    void HandleEvent(const class TMMFEvent& aEvent);
-
-public: // from MPlaybackCompletedCallback
-    IMPORT_C void HandlePlaybackCompleteL();
-    IMPORT_C void ErrorPlaybackComplete(TInt aError);
-
-private: // data
-    // Owned playback callback active object
-    CPlaybackCompletedCallback* iPlaybackCompleted;
-};
-
-#endif // CMMAAUDIOPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudioplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating wav player.
-*
-*/
-
-
-#ifndef CMMAAUDIOPLAYERFACTORY_H
-#define CMMAAUDIOPLAYERFACTORY_H
-
-//  INCLUDES
-#include "cmmammfplayerfactory.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating wav player.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAAudioPlayerFactory* NewLC();
-    ~CMMAAudioPlayerFactory();
-
-private: // Constructor
-    CMMAAudioPlayerFactory();
-
-public: // From CMMAMMFPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-};
-
-#endif // CMMAAUDIOPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudiorecordcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2002 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:  RecordControl for AudioRecorder
-*
-*/
-
-
-#ifndef CMMAAUDIORECORDCONTROL_H
-#define CMMAAUDIORECORDCONTROL_H
-
-//  INCLUDES
-#include "cmmarecordcontrol.h"
-#include "cmmaaudiorecorder.h"
-
-//  CLASS DECLARATION
-/**
-*   RecordControl for AudioRecorder
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioRecordControl): public CMMARecordControl,
-        public MMMFControllerEventMonitorObserver
-{
-public:
-    static CMMAAudioRecordControl* NewL(CMMAAudioRecorder* aRecorder);
-    ~CMMAAudioRecordControl();
-
-protected:
-    CMMAAudioRecordControl(CMMAAudioRecorder* aRecorder);
-
-public: // From CMMARecordControl
-    void InitializeL();
-    void DoStartRecordL();
-    void DoStopRecordL();
-    void DoResetL();
-    TInt SetRecordSizeLimitL(TInt aSize);
-
-public: // From MMMFControllerEventMonitorObserver
-    void HandleEvent(const TMMFEvent& aEvent);
-
-private: // data
-    CMMAAudioRecorder* iRecorder; // not owned
-};
-
-
-#endif // CMMAAUDIORECORDCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudiorecorder.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for recording Audio
-*
-*/
-
-
-#ifndef CMMAAUDIORECORDER_H
-#define CMMAAUDIORECORDER_H
-
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "cmmammfplayerbase.h"
-#include "cmmaplayerproperties.h"
-#include "tmmaparametervalidator.h"
-#include "rmmatempfile.h"
-
-class CMMAOutputStream;
-
-_LIT(KMMAAudioRecorder, "AudioRecorder");
-
-//  CLASS DECLARATION
-/**
-*   This class is used for recording Audio
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAAudioRecorder): public CMMAMMFPlayerBase
-{
-public: // Construction
-    static CMMAAudioRecorder* NewLC(
-        CMMAMMFResolver* aResolver,
-        CMMAAudioSettings* aAudioSettings,
-        TInt aMIDletSuiteID);
-
-    //   Destructor
-    ~CMMAAudioRecorder();
-
-protected:
-    //   C++ constructor
-    CMMAAudioRecorder(
-        CMMAMMFResolver* aResolver, TInt aMIDletSuiteID);
-
-protected: // new methods
-    void DoOpenL();
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent = ETrue);
-    void PrefetchL();
-    void GetDuration(TInt64* aDuration);
-    const TDesC& Type();
-    void DeallocateL();
-
-public: // new methods, for CMMAAudioRecordControl
-    void InitializeL(RFile* aFile,
-                     MMMFControllerEventMonitorObserver* aObserver);
-    void Deinitialize();
-
-    void StartRecordL();
-    void StopRecordL();
-    void ResetL();
-    TInt SetRecordSizeLimitL(TInt aSize);
-
-public: // from MMMFControllerEventMonitorObserver
-    void HandleEvent(const class TMMFEvent& aEvent);
-
-private:
-    // owned
-    CMMAAudioSettings* iSettings;
-
-    RMMFAudioRecordControllerCustomCommands iAudioRecordControllerCustomCommands;
-    RMMFAudioControllerCustomCommands iAudioControllerRecCustomCommands;
-
-    CMMAOutputStream* iOutputStream;
-
-    TInt iRecordSizeLimit;
-
-    // error code returned from RMMFController::Pause method. Used check if
-    // setting position is needed before recording.
-    TInt iPauseError;
-
-    // Data sink info
-    TMMFMessageDestination iSinkInfo;
-
-    // File to record
-    RFile iFile;
-
-    // Pass events ahead
-    MMMFControllerEventMonitorObserver* iObserver;
-
-    // Supplier of current controller
-    TPtrC iSupplier;
-
-    // Wait for native events
-    CActiveSchedulerWait* iWait;
-    TInt iError;
-
-    TBool iResetController;
-    
-    // flag to hold EOF status
-    TBool iEOFReached;
-};
-
-#endif // CMMAAUDIORECORDER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudiorecorderfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating audio recorder
-*
-*/
-
-
-#ifndef CMMAAUDIORECORDERFACTORY_H
-#define CMMAAUDIORECORDERFACTORY_H
-
-//  INCLUDES
-#include "cmmammfplayerfactory.h"
-#include "tmmaparametervalidator.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating audio recorder
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAAudioRecorderFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructors and destructor
-    static CMMAAudioRecorderFactory* NewLC(TInt aMIDletSuiteID);
-    ~CMMAAudioRecorderFactory();
-
-private: // Constructor
-    CMMAAudioRecorderFactory(TInt aMIDletSuiteID);
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-public: // From CMMAMMFPlayerFactory
-
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-
-
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-
-    void PreparePluginSelectionParametersL(
-        CMMAMMFResolver* aResolver,
-        CMMFFormatSelectionParameters* aFormatSelection);
-
-private: // Data
-    CMMAAudioSettings* iSettings; // Owned settings
-    TInt iMIDletSuiteID;
-
-};
-
-#endif // CMMAAUDIORECORDERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaaudiovolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#ifndef CMMAAUDIOVOLUMECONTROL_H
-#define CMMAAUDIOVOLUMECONTROL_H
-
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "cmmavolumecontrol.h"
-//#include <jutils.h>
-class CMMAAudioPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-    This class is used for setting volume to audio player
-
------------------------------------------------------------------------------
-*/
-
-NONSHARABLE_CLASS(CMMAAudioVolumeControl): public CMMAVolumeControl
-{
-public:
-    IMPORT_C static CMMAAudioVolumeControl* NewL(CMMAAudioPlayer* aPlayer);
-
-protected:
-    CMMAAudioVolumeControl(CMMAAudioPlayer* aPlayer);
-    void ConstructL();
-
-public: // from CMMAVolumeControl
-    void DoSetLevelL(TInt aLevel);
-    TInt DoGetLevelL();
-
-private:
-    RMMFAudioPlayDeviceCustomCommands iAudioPlayDeviceCommands;
-};
-
-#endif // CMMAAUDIOVOLUMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmabitmapwindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2002 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 abstract class implements MMMADisplayWindow functionality
-*                in CFbsBitmap based displays.
-*
-*/
-
-
-#ifndef CMMABITMAPWINDOW_H
-#define CMMABITMAPWINDOW_H
-
-//  INCLUDES
-#include "mmmadisplaywindow.h"
-
-//  CONSTANTS
-
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class CFbsBitmapDevice;
-class CGraphicsContext;
-
-//  CLASS DECLARATION
-/**
-*   This abstract class implements MMMADisplayWindow functionality in
-*   CFbsBitmap based displays.
-*
-*
-*/
-
-
-NONSHARABLE_CLASS(CMMABitmapWindow): public CBase,
-        public MMMADisplayWindow
-{
-public:     // Constructors and destructors
-    ~CMMABitmapWindow();   // Destructor ()
-
-    static CMMABitmapWindow* NewL();
-
-protected:  // Constructors and destructors
-    // Default constructor, protected to allow derivation
-    CMMABitmapWindow();
-
-public: // Methods derived from MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-    const TRect& DrawRect();
-    TSize WindowSize();
-    void SetPosition(const TPoint& aPosition);
-    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
-    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
-    const TRect& WindowRect();
-
-protected:  // Data
-    /**
-     * Pointer to the bitmap that is used for drawing.
-     * iBitmap is owned by this class.
-     */
-    CFbsBitmap* iBitmap;
-
-    /**
-     * Owned bitmap device
-     */
-    CFbsBitmapDevice* iBitmapDevice;
-
-    /**
-     * Owned bitmap context
-     */
-    CGraphicsContext* iBitmapContext;
-
-    /**
-     * Actual area used for drawing. Set by SetDrawRect method.
-     */
-    TRect iDrawRect;
-    TRect iClientRect;
-
-    inline TDisplayWindowType GetDisplayWindowType() const
-    {
-        return EDisplayWindowTypeIsBitmap;
-    }
-};
-
-#endif // CMMABITMAPWINDOW_H
--- a/javauis/mmapi_qt/baseline/inc/cmmacameraplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing camera.
-*
-*/
-
-
-#ifndef CMMACAMERAPLAYER_H
-#define CMMACAMERAPLAYER_H
-
-//  INCLUDES
-#include <ecam.h>
-#include "cmmaplayer.h"
-#include "mmmaguiplayer.h"
-#include "mmmasnapshot.h"
-#include "cmmacamerawindow.h"
-
-// CONSTANTS
-_LIT(KMMACameraPlayer, "CameraPlayer");
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing camera.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMACameraPlayer): public CMMAPlayer,
-        public MMMAGuiPlayer,
-        public MMMASnapshot,
-        public MCameraObserver
-{
-public: // Construction
-    /**
-     * Creates new CMMACameraPlayer for the camera at certain index.
-     * Index must be smaller CCamera::CamerasAvailable().
-     * @param aCameraIndex Index of the camera.
-     */
-    static CMMACameraPlayer* NewLC(TInt aCameraIndex);
-
-    //   Destructor
-    ~CMMACameraPlayer();
-
-protected:
-    //   C++ constructor
-    CMMACameraPlayer();
-    void ConstructL(TInt aCameraIndex);
-
-private: // new methods
-    TInt64 CurrentTime();
-    void ResolveViewFinderSizeL(TSize& aSize);
-    void ResolveScreenSizeL(TSize& aSize);
-    void ResolveCaptureSizes(const CCamera::TFormat aFormat,
-                             const TInt aNumImageSizesSupported,
-                             const TSize& aRequestSize,
-                             TSize& aSourceSize,
-                             TInt& aSourceIndex,
-                             TInt& aLargestIndex);
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void DeallocateL();
-    void RealizeL();
-    void PrefetchL();
-    void GetDuration(TInt64* aDuration);
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-    void CloseL();
-    const TDesC& Type();
-public: // From MCameraObserver
-    void ReserveComplete(TInt aError);
-    void PowerOnComplete(TInt aError);
-    void ViewFinderFrameReady(CFbsBitmap& aFrame);
-
-    void ImageReady(CFbsBitmap* aBitmap,
-                    HBufC8* aData,
-                    TInt aError);
-
-    void FrameBufferReady(MFrameBuffer* aFrameBuffer,
-                          TInt aError);
-
-public: // From MMMAGuiPlayer
-    void SetDisplayL(MMMADisplay* aDisplay);
-    TSize SourceSize();
-    void NotifyWithStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                               const TDesC& aStringEventData);
-    MMMASnapshot* SnapshoterL();
-
-public: // From MMMASnapshot
-    MMMASnapshot::TEncoding TakeSnapshotL(TRequestStatus* aStatus,
-                                          const TSize& aSize,
-                                          const CMMAImageSettings& aSettings);
-    CFbsBitmap* SnapshotBitmap();
-    HBufC8* SnapshotEncoded();
-
-public: // New methods
-    TInt CameraHandle();
-    /**
-     * Disables or enables viewfinder stopping.
-     * Needed when using recording.
-     *
-     * @param aStopViewFinder If true viewfinder will be really stopped.
-     */
-    void SetViewFinderMode(TBool aStopViewFinder);
-
-private: // Data
-    /**
-      * Window used to render viewfinder.
-      * Owned.
-      */
-    CMMACameraWindow* iWindow;
-
-    /**
-     * Camera instance used for taking snapshots and recording.
-     * iWindow uses this to create duplicated camera instance.
-     * Owned.
-     */
-    CCamera* iCamera;
-    MMMADisplay* iDisplay;
-
-    // index to be used for size enumeration
-    TInt iSourceSizeIndex;
-
-    TInt64 iMediaTime;
-    TInt64 iStartTime;
-
-    TRequestStatus* iSnapshotStatus;
-
-    // Owned.
-    CFbsBitmap* iSnapshotBitmap;
-    HBufC8* iSnapshotEncoded;
-
-    TSize iSize;
-    TBool iStopViewFinder;
-
-    // inner class for waiting realize, owned
-    class CRealizeWait : public CActiveSchedulerWait
-    {
-    public:
-        TInt iError;
-    };
-    CRealizeWait* iRealizeWait;
-};
-
-#endif // CMMACAMERAPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmacameraplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating camera players.
-*
-*/
-
-
-#ifndef CMMACAMERAPLAYERFACTORY_H
-#define CMMACAMERAPLAYERFACTORY_H
-
-//  INCLUDES
-#include <e32base.h>
-#include "cmmammfplayerfactory.h"
-#include "tmmaparametervalidator.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating camera players.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMACameraPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Construction
-    static CMMACameraPlayerFactory* NewLC();
-    ~CMMACameraPlayerFactory();
-
-private:
-    CMMACameraPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-public: // From CMMAMMFPlayerFactory
-
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-
-
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-    void PreparePluginSelectionParametersL(
-        CMMAMMFResolver* aResolver,
-        CMMFFormatSelectionParameters* aFormatSelection);
-
-private: // Data
-    CMMAAudioSettings* iAudioSettings; // Owned audio settings
-    TMMAVideoSettings iVideoSettings; // Video settings
-    TInt iCameraIndex;
-};
-
-#endif // CMMACAMERAPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmacamerawindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,368 +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:  This class implements MMMADisplayWindow functionality
-*                for Camera viewfinder usage.
-*
-*/
-
-
-#ifndef CMMACAMERAWINDOW_H
-#define CMMACAMERAWINDOW_H
-
-//  INCLUDES
-#include <ecam.h>
-//#include <reflcdui.h>             
-#include <w32std.h>
-#include "mmmadisplaywindow.h"
-#include "mmmadisplay.h"
-#include "jni.h"
-#include "cmmacanvasdisplay.h"
-//  CONSTANTS
-
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class RWsSession;
-class CWsScreenDevice;
-class RWindowBase;
-class MMMADisplay;
-class CMMACanvasDisplay;
-
-//  CLASS DECLARATION
-/**
-* This class implements MMMADisplayWindow functionality
-* to use with CMMACameraPlayer.
-* It duplicates its camera instance within the UI thread
-* and displays the viewfinder using the UI
-* DirectScreenAccess resources.
-*
-* @since S60 v5.0
-*/
-
-
-NONSHARABLE_CLASS(CMMACameraWindow): public CBase,
-        public MMMADisplayWindow,
-        public MCameraObserver,
-       // public MUiEventConsumer,
-        public MDirectScreenAccess
-{
-public:
-    enum TUiCallbackType
-    {
-        EDeleteViewFinder = 1,
-        EHideViewFinder,
-        EShowViewFinder,
-        EResetViewFinder,
-        EDestroyWindow
-    };
-
-    /**
-     * Two-phased constructor.
-     *
-     * @param  aCameraHandle A handle to existing CCamera instance.
-     */
-    static CMMACameraWindow* NewL(TInt aCameraHandle);
-
-
-    /**
-     * Destructor.
-     */
-    ~CMMACameraWindow();
-
-    /**
-     * Gets an information if the DirectViewFinder is started
-     *
-     * @since  S60 v5.0
-     * @return ETrue if DirectViewFinder is active
-     */
-    TBool ViewFinderActive();
-
-    /**
-     * Notifies window about Started state change
-     *
-     * @since S60 v5.0
-     * @param aStarted Indicates that camera player is in started state
-     */
-    void SetStarted(TBool aStarted);
-
-    /**
-     * Sets iDisplay
-     * Used to invoke callbacks in UI thread
-     *
-     * @since  S60 v5.0
-     * @param "aDisplay" A Display to be used for callbacks.
-     *         When set, the duplicated CCamera is created in UI thread
-     *         and the necessary DSA resources are got.
-     *         When replacing an old Display (set earlier)
-     *         all the old resources are deleted.
-     *         NULL deletes all allocated UI resources.
-     */
-    void SetDisplay(MMMADisplay *aDisplay);
-
-
-// from base class MMMADisplayWindow
-    void SetDestinationBitmapL(CFbsBitmap* aBitmap);
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDrawRect(const TRect& aRect);
-    void SetDrawRectThread(const TRect& aRect);
-    const TRect& DrawRect();
-    TSize WindowSize();
-    void SetPosition(const TPoint& aPosition);
-    void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue);
-    void SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType aThreadType);
-    void SetRWindowRect(const TRect& aRect, MMMADisplay::TThreadType aThreadType);
-    const TRect& WindowRect();
-    TDisplayWindowType GetDisplayWindowType() const;
-    TBool IsVisible() const;
-    void ContainerSet();
-    void ContainerDestroyed();
-
-
-// from base class MCameraObserver
-    void ReserveComplete(TInt aError);
-    void PowerOnComplete(TInt aError);
-    void ViewFinderFrameReady(CFbsBitmap& aFrame);
-
-    void ImageReady(CFbsBitmap* aBitmap,
-                    HBufC8* aData,
-                    TInt aError);
-
-    void FrameBufferReady(MFrameBuffer* aFrameBuffer,
-                          TInt aError);
-
-
-// from base class MUiEventConsumer
-   /* void MdcDSAResourcesCallback(
-        RWsSession &aWs,
-        CWsScreenDevice &aScreenDevice,
-        RWindowBase &aWindow);
-    */
-    void UICallback(TInt aCallbackId);
-
-
-// from base class MDirectScreenAccess
-    void AbortNow(RDirectScreenAccess::TTerminationReasons aReasons);
-    void Restart(RDirectScreenAccess::TTerminationReasons aReasons);
-
-
-private:
-    /**
-     * Constructor.
-     * @see CMMACameraWindow::NewL()
-     */
-    CMMACameraWindow(TInt aCameraIndex);
-
-    /**
-     * Creates UI Camera -
-     * a new CCamera instance (duplicated from handle
-     * given to the constructor)
-     * Have to be called from the thread which UI Camera
-     * will be controlled from
-     *
-     * @since  S60 v5.0
-     * @param "aWs" WS session from the last MdcDSAResourcesCallback
-     * @param "aScreenDevice" Screen from the last MdcDSAResourcesCallback
-     * @param "aWindow" Window from the last MdcDSAResourcesCallback
-     */
-    void UIStartViewFinder(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow);
-
-    /**
-     * If UI Camera have been created
-     * it starts/hides the DirectViewFinder
-     * Have to be called from UI thread in which UI Camera
-     * have been created!
-     *
-     * @since  S60 v5.0
-     * @param "aVisible" If true DirectViewFinder is started, else stopped
-     */
-    void SetViewFinderVisibility(TBool aVisible);
-
-    /**
-     * Stops the DirectViewFinder and deletes UI Camera instance
-     * Have to be called from UI thread in which UI Camera
-     * have been created before the CMMACameraWindow instance
-     * is deleted!
-     *
-     * @since  S60 v5.0
-     */
-    void ReleaseUiResources();
-
-    /**
-     * The callback method invoked by starter timer
-     *
-     * @since  S60 v5.0
-     * @param  aThis An instance of CMMACameraWindow
-     * @return Always returns EFalse
-     */
-    static TInt StarterTimerCallback(TAny* aThis);
-
-    /**
-     * Starts viewfinder.
-     *
-     * @since  S60 v5.0
-     */
-    void StartViewFinder();
-
-    /**
-     * Resets (stops and starts) viewfinder
-     *
-     * @since  S60 v5.0
-     */
-    void ResetViewFinder();
-
-    /**
-     * Draws the error message to specified area.
-     * Used in cases when viewfinder is unable to start
-     *
-     * @since  S60 v5.0
-     * @param aError Viewfinder error id
-     * @param aDrawRect Area to draw to
-     */
-    void DrawViewFinderErrorL(const TInt aError, const TRect& aDrawRect);
-
-    /**
-     * Deletes this object.
-     *
-     * @since  S60 v5.0
-     */
-    void Destroy();
-
-private:  // data
-    /**
-     * Indicates the window visibility.
-     */
-    TBool iVisible;
-
-    /**
-     * Indicated that owning player is in Started state.
-     */
-    TBool iStarted;
-
-    /**
-     * Indicates that Direct viewfinder is displayed on screen.
-     */
-    TBool iViewFinderVisible;
-
-    /**
-     * Indicates that duplicated camera (iUICamera) is powered on.
-     */
-    TBool iCameraPowerOn;
-
-    /**
-     * Rectangle to display viewfinder on (Window coordinates).
-     */
-    TRect iDrawRect;
-
-    /**
-     * The area of the window.
-     */
-    TRect iClientRect;
-
-    /**
-     * The handle of original camera instance.
-     */
-    TInt iCameraHandle;
-
-    /**
-     * UI Camera instance
-     * Duplicated from iCameraHandle.
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CCamera* iUICamera;
-
-    /**
-     * Display instance used to invoke UI callbacks.
-     * Not owned.
-     */
-    MMMADisplay* iDisplay;
-
-    /**
-     * Window server session used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    RWsSession* iWs;
-
-    /**
-     * Screen device used by UI thread.
-     * Adjustable and usable from UI thread only.
-     * Not owned.
-     */
-    CWsScreenDevice* iScreenDevice;
-
-    /**
-     * Window to draw viewfinder on.
-     * Adjustable and usable from UI thread only.
-     * From UI thread.
-     * Not owned.
-     */
-    RWindowBase* iWindow;
-
-    /**
-     * The timer to delay viewfinder start
-     * to avoid many showing/hidding request
-     * (for instance when scrolling the viewfinder)
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CPeriodic* iStarterTimer;
-
-    /**
-     * Direct screen access used to draw the error message.
-     * Adjustable and usable from UI thread only.
-     * Own.
-     */
-    CDirectScreenAccess* iDirectAccess;
-
-    /**
-     * Count of remaining allowed DSA restarts.
-     * In some cases (like screen orientation change)
-     * the DSA fails to start for some time.
-     * Therefore the start is tried more times.
-     */
-    TUint iRemainingDSAStartAttempts;
-
-    /**
-     * An icon used to display instead of viewfinder.
-     * in case that viewfinder start fails.
-     * Own.
-     */
-    CFbsBitmap* iErrorIconBitmap;
-
-    /**
-     * Bitmap mask of iErrorIconBitmap.
-     * Own.
-     */
-    CFbsBitmap* iErrorIconMaskBitmap;
-
-
-    /**
-     * Symbian RWindow rect
-     */
-    TRect iRWindowRect;
-
-  /**
-    * jobject to MMACanvasDisplay java class
-    */
-    jobject iJavaDisplayObject;
-    
-    /*
-    * class name of MMACanvasDisplay java class
-    */
-    jclass iJavaDisplayClass;
-    
-    JNIEnv * iJni;
-};
-
-#endif // CMMACAMERAWINDOW_H
--- a/javauis/mmapi_qt/baseline/inc/cmmacanvasdisplay.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Draws to Canvas.
-*
-*/
-
-
-#ifndef CMMACANVASDISPLAY_H
-#define CMMACANVASDISPLAY_H
-
-//  INCLUDES
-#include "cmmadisplay.h"
-#include "jni.h"
-
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class CMMABitmapWindow;
-//class MMAFunctionServer;
-//class MMIDCanvas;
-
-//  CLASS DECLARATION
-/**
-*   Display for MMIDCanvas objects.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMACanvasDisplay): public CMMADisplay
-{
-public:     // Constructors and destructors
-    static CMMACanvasDisplay* NewLC(MMAFunctionServer* aEventSource , jobject obj/*MMIDCanvas* aCanvas*/);
-
-    ~CMMACanvasDisplay();  // Destructor ()
-
-
-public: // From MMMADisplay
-    //void SourceSizeChanged(const TSize& aSourceSize);
-    void SetFullScreenL(TBool aFullScreen);
-    void SetDisplayLocationL(const TPoint& aPosition);
-    TPoint DisplayLocation();
-    void SetWindowL(MMMADisplayWindow* aWindow);
-
-private:
-    /** ask java side peer about the bound
-	Returns a rectangle describing the receiver's size
-	and location relative to its parent (or its display if its parent is null),
-	unless the receiver is a shell. In this case, the location is relative to the display
-	*/
-   TRect& CMMACanvasDisplay::BoundRect();
-   TRect& CMMACanvasDisplay::ContainerWindowRect();
-
-//public:
-//    void MdcContentBoundsChanged(const TRect& aRect);
-protected:  // Constructors and destructors
-
-    // Default constructor, protected to allow derivation
-    CMMACanvasDisplay(MMAFunctionServer* aEventSource , jobject aJavaDisplayRef/*MMIDCanvas* aCanvas*/);
-
-private:    // Data
-//    MMIDCanvas* iCanvas;
-
-//MMAFunctionServer* iEventSource; // not owned
-
-};
-
-#endif // CMMACANVASDISPLAY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2002 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 is base interface for all controls.
-*
-*/
-
-
-#ifndef CMMACONTROL_H
-#define CMMACONTROL_H
-
-// INCLUDES
-// #include <mevents.h>
-// #include <jutils.h>
-#include "mmapiutils.h"
-//  CLASS DECLARATION
-/**
-*   This is base interface for all controls.
-*
-*
-*/
-class CMMAControl : public CBase
-{
-public:
-    /**
-     * Static getter for Java class name. Java object will be created
-     * according to this name. Derived classes defines the class names.
-     *
-     * @see ClassName
-     * @param aControl Control to use.
-     * @return Java control class name.
-     */
-    static const TDesC* ClassNameJni(CMMAControl* aControl);
-
-    /**
-     * Sets associated Java object.
-     *
-     * @param aControl Control to use.
-     * @param aControlObject Java side control object.
-     */
-    static void StaticSetHandle(CMMAControl* aControl,
-                                jobject aControlObject);
-public:
-    /**
-     * @see ClassNameJni
-     * @return Java control class name.
-     */
-    virtual const TDesC& ClassName() const = 0;
-
-    /**
-     * Return public class name.
-     */
-    IMPORT_C virtual const TDesC& PublicClassName() const;
-
-    /**
-     * Refresh this control.
-     */
-    virtual void RefreshControl()
-    {
-        // do nothing
-    }
-
-private:
-    /**
-     * @see StaticSetHandle
-     * @param aControlObject Java side control object.
-     */
-    void SetHandle(jobject aControlObject);
-
-protected:
-    /**
-     * Java side control object.
-     */
-    jobject iControlObject;
-};
-
-#endif // CMMACONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmadeleterefevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMADELETEREFEVENT_H
-#define CMMADELETEREFEVENT_H
-
-//#include <mevents.h>
-#include "cmmaevent.h"
-
-class MMAFunctionServer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used to delete references created with JNIEnv.
-*   Reference deletion needs JNI environvent, which can't be stored
-*   as an member variable. JNI environment is delivered to Dispatch
-*   method that deletes the reference.
-*
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMADeleteRefEvent): public CMMAEvent
-{
-public:
-    /**
-     * Default constructor. This event is always disposable.
-     * @param aDeleteRefObject Object which reference will be deleted.
-     */
-    CMMADeleteRefEvent(jobject aDeleteRefObject);
-
-private: // from CJavaEvent
-    /**
-     * This method deletes iDeleteRefObject reference with JNIEnv::DeleteGlobalRef method.
-     * @param aJni JNI environment which is used to delete reference.
-     */
-    void Dispatch(JNIEnv& aJni);
-
-protected:
-    // Object reference which will be deleted.
-    jobject iDeleteRefObject;
-};
-
-#endif // CMMADELETEREFEVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmadisplay.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplay
-*
-*/
-
-
-#ifndef CMMADISPLAY_H
-#define CMMADISPLAY_H
-
-//  INCLUDES
-//#include <reflcdui.h>
-#include "mmmadisplay.h"
-#include "mmafunctionserver.h"
-#include "qwidget.h"
-#include "jni.h"
-#include "jutils.h"
-#include "mmmaguiplayer.h"
-
-//  FORWARD DECLARATIONS
-class MMMADisplayWindow;
-
-//  CLASS DECLARATION
-/**
-*   This class implements MMMADisplay
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMADisplay): public CBase,public MMMADisplay
-        /*,
-        public MDirectContent*/
-{
-public:
-    // Constructors and destructors
-    ~CMMADisplay();    // Destructor ()
-
-protected:  // Constructors and destructors
-    // Default constructor, protected to allow derivation
-    CMMADisplay();
-
-    void Construct(MMAFunctionServer* eventSource ,jobject javadisplayref);
-
-public: // Methods derived from MMMADisplay
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    TSize DisplaySize();
-    void SetDisplaySizeL(const TSize& aSize);
-    void SetVisible(TBool aValue);
-    void SetWindowL(MMMADisplayWindow* aWindow);
-    MMMADisplayWindow* Window();
-    TBool IsVisible();
-    TBool IsFullScreen();
-    virtual void SetForeground(TBool aIsForeground, TBool aUseEventServer);
-    void SourceSizeChanged(const TSize& aSourceSize);      
-    void SetUIPlayer(MMMAGuiPlayer* player);
-    TSize SourceSize();
-    
-    /**
-     * Gets notification that there is container to draw assigned
-     *
-     * @return ETrue if container have been set
-     *         EFalse if container is not set
-     */
-    virtual TBool HasContainer();
-
-    /**
-     * Gets resources necessary to start DirectScreenAccess
-     * Doesn't run in mmapi event server thread!
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aThreadType" Indicates the thread type (UI or MMAPI)
-     */
-   // void UIGetDSAResources(
-   //     MUiEventConsumer& aConsumer,
-    //    MMMADisplay::TThreadType aThreadType);
-
-    /**
-     * Invokes a callback in UI thread
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aCallbackId" A number identifying the callback
-     */
-    //virtual void UIGetCallback(
-    //    MUiEventConsumer& aConsumer,
-    //    TInt aCallbackId);
-public: // Methods derived from MDirectContent
-    /**
-     * Not used method.
-     */
-   // virtual void MdcContainerWindowChangedL(RWindow* aWindow);
-
-    /**
-     * Same functionality is shared in canvas and item displays.
-     */
-   // virtual void MdcContainerVisibilityChanged(TBool aVisible);
-
-    /**
-     * Default implementation, panics in debug build. Must be written in
-     * derived classes if needed.
-     */
-   // virtual void MdcItemContentRectChanged(const TRect& aContentRect,
-//                                           const TRect& aScreenRect);
-
-    /**
-     * Notify content that container is about to be destoryed.
-     */
-   // virtual void MdcContainerDestroyed();
-    /**
-     * Notify player's window that any drawing
-     * via direct screen access must be aborted
-     */
-   // void MdcAbortDSA();
-
-    /**
-     * Allow player's window to draw
-     * via direct screen access after MdcAbortDSA
-     */
-   // void MdcResumeDSA();
-
-protected:// New Methods
-    /**
-     * Scales drawarea to full screen. Aspect ratio of the source size
-     * will be maintained.
-     */
-    TRect ScaleToFullScreen(const TSize& aFullScreenSize,
-                            const TSize& aSourceSize);
-
-    /**
-     * Set clipping region to LCDUI UI component according
-     * to current window drawrect so that the LCDUI component
-     * does not paint over the area that is occupied by video.
-     * Based on current visibility of video image, this method
-     * either sets or removes the clipping region.
-     * LCDUI component is then redrawn.
-     */
-    void SetClippingRegion();
-    /**
-     * MMAPI_UI 3.x req
-     * set content bound to eSWT control
-     */
-    void SetContentBoundToJavaControl(const TRect& aRect);
-	  /**
-     * Remove currently set clip region and refresh canvas
-     */
-    void RemoveClippingRegion();
-    
-    /**
-     * MMAPI_UI 3.x req
-     * removes content bound from eSWT control
-     */
-		void RemoveContentBoundFromJavaControl(const TRect& aRect);
-    /**
-     * Add clip region
-     */
-    void AddClippingRegion();
-    /**
-     * MMAPI_UI 3.x req
-     * Redraw the java side eSWT control
-     */
-    void RefreshJavaControl(const TRect& aRect);
-    
-    /** 
-     * MMAPI_UI 3.x req
-     * Reset the rectangle dimension in eSWT control
-     */
-    void ResetJavaRectObject(const TRect& aRect);
-    
-    /**
-    * Handling the change in container visibility
-    */
-    void HandleContainerVisibilityChanged( TBool aVisible );
-
-public:
-    /**
-    * called from java when shell visibility gets change
-    */
-    void SetContainerVisibility(TBool aValue);
-    /**
-    * called from java to set the window resources
-    */
-    void SetWindowResources(QWidget* qtWidget);
-   
-		/**
-    * Trigger a function call CalledBackInUiThread() from java in UI thread
-    * arg 'placeholder' is used to identify the function, to be called back from UI Thread
-    */    
-    void GetCallbackInUiThread(TInt placeholder);
-    
-    /**
-    * Called from java in UI thread context
-    * arg 'placeholder' is used to identify the function, to be called back from UI Thread
-    */ 
-    void CalledBackInUiThread(TInt placeholder);
-    
-    void SourceSizeChanged(TInt aJavaControlWidth, TInt aJavaControlHeight);
-    void SetSourceSizeToDisplay(const TSize& aSourceSize);
-    void SetDisplayPosition(TInt uiControlLocationX,TInt uiControlLocationY,TInt	videoControlLocationX,TInt videoControlLocationY);
-
-protected:  // Data
-
-    /**
-     * Not owned.
-     * Actual drawing place of the content.
-     */
-    MMMADisplayWindow* iWindow;
-
-    /**
-     * Source contents size.
-     */
-    TSize iSourceSize;
-
-    /**
-     * Indicates visibility set from from Java.
-     */
-    TBool iVisible;
-
-    /**
-     * Screenmode set from Java.
-     */
-    TBool iFullScreen;
-
-    /**
-     * Is native container visible.
-     */
-    TBool iContainerVisible;
-
-    /**
-     * Draw rect set from java.
-     */
-    TRect iUserRect;
-
-    /**
-     * Not owned, obtained from lcdui components.
-     */
-    //MDirectContainer* iDirectContainer;
-
-    /**
-     * Clip rectangle currently set to LCDUI.
-     * NOTE: need to be removed at last during destruction phase!
-     */
-    TRect iClipRect;
-    /**
-     * Is midlet is in foreground ?
-     */
-    TBool iIsForeground;
-
-    /**
-     * Indicates that iUserRect has been changed
-     * during container invisibility
-     */
-    TBool iResetDrawRect;
-    // not owned
-    MMAFunctionServer* iEventSource; 
-    JNIEnv* iJni;
-    jobject iJavaDisplayObject;
-		jclass iJavaDisplayClass;
-		TSize fullScreenSize;
-		MMMAGuiPlayer* iUiPlayer;
-};
-
-#endif // CMMADISPLAY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmadurationupdater.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Send update duration event if needed when player state changes
-*
-*/
-
-
-#ifndef CMMADURATIONUPDATER_H
-#define CMMADURATIONUPDATER_H
-
-//  INCLUDES
-#include "mmmaplayerstatelistener.h"
-#include "cmmaplayer.h"
-
-//  CLASS DECLARATION
-/**
-*   Checks if media duration has changed when player state changes and sends
-*   DURATION_UPDATED event to Java.
-*
-*/
-NONSHARABLE_CLASS(CMMADurationUpdater):
-        public CBase, public MMMAPlayerStateListener
-{
-public: // Construction
-    static CMMADurationUpdater* NewL(CMMAPlayer& aPlayer);
-    ~CMMADurationUpdater();
-
-private: // Construction
-    CMMADurationUpdater(CMMAPlayer& aPlayer);
-    void ConstructL();
-
-public: // from MMMAPlayerStateListener
-    virtual void StateChanged(TInt aState);
-
-private: // Data
-
-    /* The player which is monitored for duration changes */
-    CMMAPlayer& iPlayer;
-
-    /* Last obtained duration value */
-    TInt iDuration;
-
-    // to avoid event posting with streamable medias after first start
-    TBool iSecondStart;
-};
-
-#endif // CMMADURATIONUPDATER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMAEVENT_H
-#define CMMAEVENT_H
-
-// #include <mevents.h>
-#include "mmapiutils.h"
-
-class MMAFunctionServer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAEvent) // public CJavaEvent< MMAFunctionServer >
-{
-public:
-
-    enum {EEventPriority = 0, ENotifyPriority = 1, ELastPriority = 1};
-    enum TDisposability { EDisposableEvent, EReusableEvent };
-
-    CMMAEvent(jobject aNotifyObject,
-    jmethodID aHandleEventMethod,
-    TDisposability aDisposable = EDisposableEvent);
-
-protected:
-    CMMAEvent(TDisposability aDisposable);
-
-public:
-    void SetEventData(TInt aEventData);
-
-
-public: // from CJavaEvent
-    virtual void Dispatch(JNIEnv& aJni);
-
-protected:
-    jobject iListenerObject;
-    jmethodID iHandleEventMethod;
-    TInt iEventData;
-};
-
-#endif // CMMAEVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaframepositioningcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Abstract base class for FramePositioningControl
-*
-*/
-
-
-#ifndef CMMAFRAMEPOSITIONINGCONTROL_H
-#define CMMAFRAMEPOSITIONINGCONTROL_H
-
-// EXTERNAL INCLUDES
-#include "mmfcontroller.h"
-#include "mmfstandardcustomcommands.h"
-
-//  INTERNAL INCLUDES
-#include "cmmacontrol.h" // base class
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-
-// CONSTANTS
-
-
-// Constant for control name. Name is used in Java side to instantiate
-// Java Class which uses CMMAFramePositioningControl.
-_LIT(KMMAFramePositioningControlName, "FramePositioningControl");
-
-//  CLASS DECLARATION
-/**
-*   Abstract base class for FramePositioningControls
-*/
-NONSHARABLE_CLASS(CMMAFramePositioningControl): public CMMAControl
-{
-public:
-    /**
-     * Destructor.
-     */
-    ~CMMAFramePositioningControl();
-
-protected:
-    /**
-     * Constructor.
-     */
-    CMMAFramePositioningControl(CMMAPlayer* aPlayer);
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-public: // New methods
-    virtual TInt SeekL(TInt aFrameNumber) = 0;
-    virtual TInt SkipL(TInt aFramesToSkip) = 0;
-    virtual void MapFrameToTimeL(TInt aValue, TInt64* aMediaTime) = 0;
-    virtual TInt MapTimeToFrameL(TInt64* aMediaTime) = 0;
-
-protected: // New methods
-
-    /**
-     * Clamp media time between 0 and duration of media
-     * @param aMediaTime media time value to clamp
-     * @return KErrNotFound if duration of media is not known,
-     *         otherwise KErrNone.
-     */
-    virtual TInt ClampMediaTime(TInt64& aMediaTime);
-
-private: // Data
-
-    // To be used by this class and not by children.
-    CMMAPlayer* iPlayer;
-
-};
-
-#endif // CMMAFRAMEPOSITIONINGCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaitemdisplay.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Bitmap display that draws to the Java CustomItem's bitmap.
-*
-*/
-
-
-#ifndef CMMAITEMDISPLAY_H
-#define CMMAITEMDISPLAY_H
-
-//  INCLUDES
-#include "cmmadisplay.h" // base class
-
-//class MMIDCustomItem;
-
-//  CLASS DECLARATION
-/**
-*   Display that uses MMIDCustomItem.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAItemDisplay): public CMMADisplay
-{
-public:     // Constructors and destructors
-    static CMMAItemDisplay* NewLC(/*MMIDCustomItem* aCustomItem*/);
-
-    ~CMMAItemDisplay();    // Destructor ()
-
-protected:  // Constructors and destructors
-    // Default constructor, protected to allow derivation
-    CMMAItemDisplay(/*MMIDCustomItem* aCustomItem*/);
-
-public:     // New methods
-    /**
-     * To be called when java display's size is changed.
-     * This method also informs when context for the item is
-     * created for the first time.
-     */
-    static void SizeChangedL(CMMAItemDisplay* aDisplay,
-                             TInt aWidth,
-                             TInt aHeight);
-
-    /**
-     * Sets source size to aSize.
-     */
-    static void StaticSourceSize(CMMAItemDisplay* aDisplay,
-                                 TSize* aSize);
-
-public: // Methods derived from MMMADisplay
-    void SourceSizeChanged(const TSize& aSourceSize);
-    void SetFullScreenL(TBool aFullScreen);
-    void SetDisplayLocationL(const TPoint& aPosition);
-    TPoint DisplayLocation();
-    void SetWindowL(MMMADisplayWindow* aWindow);
-/*
-public: // From MDirectContent
-    void MdcContentBoundsChanged(const TRect& aRect);
-    void MdcItemContentRectChanged(const TRect& aContentRect,
-                                   const TRect& aScreenRect);
-private:    // Data
-    MMIDCustomItem* iItem;
-    */
-};
-
-#endif // CMMAITEMDISPLAY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmametadatacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2002 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 interface is for getting metadata from a media.
-*
-*/
-
-
-#ifndef CMMAMETADATACONTROL_H
-#define CMMAMETADATACONTROL_H
-
-//  INCLUDES
-#include "cmmacontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is an abstract interface for getting metadata from a media.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAMetaDataControl): public CMMAControl
-{
-protected:
-    CMMAMetaDataControl();
-
-public:
-    /**
-    * Get the number of all metadata keys from given metadata control.
-    *
-    * @param aMetaDataControl Metadata control.
-    * @param aCount Address of an integer to store the metadata keys count
-    */
-    static void StaticKeysCountL(CMMAMetaDataControl* aMetaDataControl, TInt *aCount);
-
-    /**
-    * Get one metadata key from given metadata control.
-    *
-    * @param aMetaDataControl Metadata control.
-    * @param aValue Address of a pointer to a descriptor to which the
-    *        value is put. Ownership of the descriptor is transferred to
-    *        the caller.
-    * @param aIndex The index of the key to be fetched.
-    */
-    static void StaticKeyL(CMMAMetaDataControl* aMetaDataControl, HBufC** aKey, TInt aIndex);
-
-    /**
-    * Get the value associated with a single metadata key.
-    *
-    * @param aMetaDataControl Metadata control.
-    * @param aValue Address of a pointer to a descriptor to which the
-    *        value is put. Ownership of the descriptor is transferred to
-    *        the caller.
-    * @param aKey The key for which the value is to be fetched.
-    */
-    static void StaticKeyValueL(CMMAMetaDataControl* aMetaDataControl,
-                                HBufC** aValue,
-                                TDesC* aKey);
-
-protected:
-    virtual TInt KeyCountL() = 0;
-    virtual HBufC* KeyL(TInt aIndex) = 0;
-
-    virtual HBufC* KeyValueL(const TDesC& aKey) = 0;
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-};
-
-#endif // CMMAMETADATACONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidicontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a MIDIControl.
-*
-*/
-
-
-#ifndef CMMAMIDICONTROL_H
-#define CMMAMIDICONTROL_H
-
-// EXTERNAL INCLUDES
-
-//  INTERNAL INCLUDES
-#include "cmmacontrol.h" // base class
-#include "mmmaplayerstatelistener.h"
-#include <midiclientutility.h> // MMidiClientUtilityObserver
-#include <TimeOutTimer.h>
-
-// CONSTANTS
-
-// Constant for control name. Name is used in Java side to instantiate
-// Java Class which uses CMMAMIDIControl.
-_LIT(KMIDIControlName, "MIDIControl");
-
-class CMMAMIDIPlayer;
-
-// Maximum volume defined in the Java API.
-// It is used to convert volume values between native and java values.
-static const TInt KMAXVolume = 127;
-
-
-
-//  CLASS DECLARATION
-/**
-*   This class implements MIDIControl interface.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAMIDIControl): public CMMAControl,
-        public MMidiClientUtilityObserver
-{
-private:
-
-    class CChannelVolumeEventWait : public CBase,
-            public MTimeOutNotify
-    {
-    public:  // Constructor and destructor
-
-        static CChannelVolumeEventWait* NewL();
-
-        ~CChannelVolumeEventWait();
-
-    public:  // Methods from base classes
-
-        /**
-        * From MTimeOutNotify Timer expiration call back method
-        */
-        void TimerExpired();
-
-    public:  // New methods
-
-        void StartWait(TInt aChannel);
-
-        void StopWait();
-
-        void HandleVolumeChangedEvent(TInt aChannel);
-
-    private: // Constructor
-
-        CChannelVolumeEventWait();
-
-        void ConstructL();
-
-    private: // Data
-
-        // Own. For waiting the correct volume changed event
-        CActiveSchedulerWait* iWait;
-
-        // Own. Time-out for waiting volume changed event
-        CTimeOutTimer* iTimer;
-
-        // Expected channel for volume event
-        TInt iChannel;
-
-    };
-
-public:
-    /**
-     * Creates new CMMAMIDIControl.
-     *
-     * @param aPlayer Player that plays the MIDI.
-     */
-    static CMMAMIDIControl* NewL(CMMAMIDIPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAMIDIControl();
-protected:
-    /**
-     * Constructor.
-     * @param aPlayer Player that plays the MIDI.
-     */
-    CMMAMIDIControl(CMMAMIDIPlayer* aPlayer);
-
-    /**
-     * Initializes this control.
-     */
-    void ConstructL();
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-public: // From MMMAPlayerStateListener
-    void StateChanged(TInt aState);
-
-public: // Static new methods
-
-    /**
-     * Get volume for the given channel. The return value is
-     * independent of the player's volume.
-     *
-     * @param aChannel 0-15
-     */
-    TInt ChannelVolumeL(TInt aChannel);
-
-    /**
-     * Set volume for given channel.
-     *
-     * @param aChannel 0-15
-     * @param aVolume 0-127
-     */
-    void SetChannelVolumeL(TInt aChannel, TInt aVolume);
-
-    /**
-     * Set program of a channel.
-     *
-     * @param aChannel 0-15
-     * @param aBank 0-16383, or -1 for default bank
-     * @param aProgram 0-127
-     */
-    void SetProgramL(TInt aChannel,
-                     TInt aBank,
-                     TInt aProgram);
-
-    /**
-     * Sends a long MIDI event to the device.
-     * This method passes the data directly to the receiving device.
-     * The data array's contents are not checked for validity.
-     *
-     * @param aData array of the bytes to send
-     * @return the number of bytes actually sent to the device
-     */
-    TInt SendMIDIEventL(const TDesC8* aData);
-
-    /**
-     * Reinitializes native midi engine with new sequence data.
-     * First closes midi engine and then opens it again with new
-     * data. The data array's contents are not checked for validity.
-     *
-     * @param aData midi sequence data for initialization
-     * @return KErrNone (return value is present only for
-     * method footprint)
-     */
-    TInt ReInitializeMidiL(const TDesC8* aData);
-
-public: // from MMidiClientUtilityObserver
-    void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
-    void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
-    void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
-    void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
-    void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
-    void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
-    void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aMessage);
-    void MmcuoPolyphonyChanged(TInt aNewPolyphony);
-    void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
-
-private: // Data
-    /**
-     * Used to control MIDI events.
-     */
-    CMMAMIDIPlayer* iPlayer;
-
-    /**
-    * Own. Utility for waiting for channel volume events
-    */
-    CChannelVolumeEventWait* iVolumeEventWait;
-
-};
-
-
-#endif // CMMAMIDICONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidimetadatacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMAMIDIMetaDataControl is a concrete class for getting
-*                metadata from midi engine.
-*
-*/
-
-
-#ifndef CMMAMIDIMETADATACONTROL_H
-#define CMMAMIDIMETADATACONTROL_H
-
-//  INCLUDES
-#include <mmfcontroller.h>
-
-#include "cmmamidiplayer.h"
-#include "cmmametadatacontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This is a concrete class for getting metadata from midi engine.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAMIDIMetaDataControl): public CMMAMetaDataControl
-{
-public:
-    CMMAMIDIMetaDataControl(CMMAMIDIPlayer* aPlayer);
-
-protected: // from CMMAMetaDataControl
-
-    TInt KeyCountL();
-    HBufC* KeyL(TInt aIndex);
-
-    HBufC* KeyValueL(const TDesC& aKey);
-
-private:
-    /**
-     * Used to query metadata
-     */
-    CMMAMIDIPlayer* iPlayer;
-};
-
-#endif // CMMAMIDIMETADATACONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidipitchcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements PitchControl functionality.
-*
-*/
-
-
-#ifndef CMMAMIDIPITCHCONTROL_H
-#define CMMAMIDIPITCHCONTROL_H
-
-// EXTERNAL INCLUDES
-
-//  INTERNAL INCLUDES
-#include "cmmacontrol.h" // base class
-
-// CONSTANTS
-
-// Constant for control name. Name is used in Java side to instantiate
-// Java Class which uses CMMAMIDIPitchControl.
-_LIT(KMIDIPitchControlName, "PitchControl");
-
-// Maximum and minimun pitch values
-const TInt KMIDIPitchControlMaxPitch = 2400;
-const TInt KMIDIPitchControlMinPitch = -2400;
-
-
-class CMMAMIDIPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class implements MIDIPitchControl interface.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAMIDIPitchControl): public CMMAControl
-{
-public:
-    /**
-     * Creates new CMMAMIDIPitchControl.
-     *
-     * @param aPlayer Player that plays the content.
-     */
-    static CMMAMIDIPitchControl* NewL(CMMAMIDIPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAMIDIPitchControl();
-protected:
-    /**
-     * Constructor.
-     * @param aPlayer Player that plays the content.
-     */
-    CMMAMIDIPitchControl(CMMAMIDIPlayer* aPlayer);
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-public: // New methods
-    /**
-     * @return Pitch, if not available the default.
-     */
-    TInt PitchL();
-
-    /**
-     * @param aPitch Pitch to set in milli-beats per minute.
-     * @return Actual Pitch set.
-     */
-    TInt SetPitchL(TInt aPitch);
-
-    /**
-     * @return The maximum rate supported.
-     */
-    TInt MaxPitchL();
-
-    /**
-     * @return The minimum rate supported.
-     */
-    TInt MinPitchL();
-
-private: // Data
-    /**
-     * Used to control MIDI playback.
-     */
-    CMMAMIDIPlayer* iPlayer;
-};
-
-
-#endif // CMMAMIDIPITCHCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidiplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing MIDI.
-*
-*/
-
-
-#ifndef CMMAMIDIPLAYER_H
-#define CMMAMIDIPLAYER_H
-
-
-//  INCLUDES
-#include "cmmaplayer.h"
-#include <midiclientutility.h>
-#include <e32base.h>
-
-// CONSTANTS
-_LIT(KMMAMIDIPlayer, "MIDIPlayer");
-
-const TMdaPriorityPreference KMMAMIDIPriorityPreference =
-    EMdaPriorityPreferenceTimeAndQuality;
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing MIDI.
-*
-*
-*/
-
-class CMMAMIDIPlayer : public CMMAPlayer, public MMidiClientUtilityObserver
-{
-public: // Construction
-    static CMMAMIDIPlayer* NewLC(const TDesC& aContentType,
-                                 TFileName aFileName);
-
-    //   Destructor
-    ~CMMAMIDIPlayer();
-
-protected:
-    //   C++ constructor
-    CMMAMIDIPlayer(TFileName aFileName);
-    void ConstructL(const TDesC& aContentType);
-
-public: // new methods
-    IMPORT_C CMidiClientUtility* MidiClient() const;
-    void ReInitializeMidiEngineL(const TDesC8* aMidiSequence);
-    void addObserverL(MMidiClientUtilityObserver* aObserver);
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void RealizeL();
-    void PrefetchL();
-    void DeallocateL();
-    void GetDuration(TInt64* aDuration);
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-    void CloseL();
-    const TDesC& Type();
-
-public: // from CMMAPlayer/MMMASourceStreamListener
-    void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-    void PlayCompleteL(TInt aError);
-
-public: // from MMidiClientUtilityObserver
-    void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
-    void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
-    void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
-    void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
-    void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
-    void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
-    void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aMessage);
-    void MmcuoPolyphonyChanged(TInt aNewPolyphony);
-    void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
-
-protected:
-    void CloseClientUtility();
-
-private: // Data
-    CMidiClientUtility* iMidi;
-
-    // CActiveShedulerWait object for reinitializing midi engine
-    CActiveSchedulerWait* iActiveSchedulerWait;
-
-    // Array for subsequent MMidiClientUtilityObservers
-    RPointerArray<MMidiClientUtilityObserver> iObservers;
-
-    TFileName iFileName;
-
-    /**
-    * Cached media time
-    */
-    TInt64 iMediaTime;
-
-    /**
-    * The time that will be sent with CMMAPlayerEvent::EStarted
-    * (may be different from iMediaTime).
-    */
-    TInt64 iStartedEventTime;
-};
-
-#endif // CMMAMIDIPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidiplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating MIDI player.
-*
-*/
-
-
-#ifndef CMMAMIDIPLAYERFACTORY_H
-#define CMMAMIDIPLAYERFACTORY_H
-
-//  INCLUDES
-#include "cmmammfplayerfactory.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating MIDI player.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAMIDIPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructor and destructot
-    static CMMAMIDIPlayerFactory* NewLC();
-    ~CMMAMIDIPlayerFactory();
-
-private: // constructor
-    CMMAMIDIPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-public: // From CMMAMMFPlayerFactory
-
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-
-private: // new methods
-    CMMAPlayer* CreateMidiFilePlayerL(const TDesC& aContentType, TFileName aFileName);
-    CMMAPlayer* CreateMidiSynthPlayerL(const TDesC& aContentType);
-};
-
-#endif // CMMAMIDIPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidistoptimecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling
-*
-*/
-
-
-#ifndef CMMAMIDISTOPTIMECONTROL_H
-#define CMMAMIDISTOPTIMECONTROL_H
-
-//  INCLUDES
-#include "cmmastoptimecontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used for stoptime controlling for MIDI
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAMIDIStopTimeControl): public CMMAStopTimeControl
-{
-public:
-    static CMMAMIDIStopTimeControl* NewL(CMMAPlayer* aPlayer);
-    ~CMMAMIDIStopTimeControl();
-
-protected:
-    CMMAMIDIStopTimeControl(CMMAPlayer* aPlayer);
-
-public: // from CMMAStopTimeControl
-    virtual void StopAtTimeL();
-};
-
-#endif // CMMAMIDISTOPTIMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamiditempocontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MIDITempoControl functionality.
-*
-*/
-
-
-#ifndef CMMAMIDITEMPOCONTROL_H
-#define CMMAMIDITEMPOCONTROL_H
-
-// EXTERNAL INCLUDES
-#include <midiclientutility.h> // MMidiClientUtilityObserver
-
-//  INTERNAL INCLUDES
-#include "cmmaratecontrol.h" // base class
-#include "mmmaplayerstatelistener.h"
-
-// CONSTANTS
-
-// Constant for control name. Name is used in Java side to instantiate
-// Java Class which uses CMMAMIDITempoControl.
-_LIT(KMIDITempoControlName, "TempoControl");
-
-class CMMAMIDIPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class implements MIDITempoControl interface.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAMIDITempoControl): public CMMARateControl,
-        public MMidiClientUtilityObserver, public MMMAPlayerStateListener
-{
-public:
-    /**
-     * Creates new CMMAMIDITempoControl.
-     *
-     * @param aPlayer Player that plays the content.
-     */
-    static CMMAMIDITempoControl* NewL(CMMAMIDIPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAMIDITempoControl();
-protected:
-    /**
-     * Constructor.
-     * @param aPlayer Player that plays the content.
-     */
-    CMMAMIDITempoControl(CMMAMIDIPlayer* aPlayer);
-
-    /**
-     * Initializes this control.
-     */
-    void ConstructL();
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-public: // From CMMARateControl
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    TInt RateL();
-
-    /**
-     * @return The maximum rate supported.
-     */
-    TInt MaxRateL();
-
-    /**
-     * @return The minimum rate supported.
-     */
-    TInt MinRateL();
-
-public: // New methods
-    /**
-     * @return Tempo, if not available the default.
-     */
-    TInt TempoL();
-
-    /**
-     * @param aTempo Tempo to set in milli-beats per minute.
-     * @return Actual Tempo set.
-     */
-    TInt SetTempoL(TInt aTempo);
-
-public:   // From MMMAPlayerStateListener
-    void StateChanged(TInt aState);
-
-public: // from MMidiClientUtilityObserver
-    void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
-    void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
-    void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
-    void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
-    void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
-    void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
-    void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aMessage);
-    void MmcuoPolyphonyChanged(TInt aNewPolyphony);
-    void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
-
-private: // Data
-    /**
-     * Used to control MIDI playback.
-     */
-    CMMAMIDIPlayer* iPlayer;
-
-    /**
-     * Current tempo. Unit of the variable is milli-beat.
-     * Tempo cannot be set to the midi client before the player is
-     * prefetched. Thus, when the player is in REALIZED state, tempo is
-     * saved to this variable and set to the client when the player is
-     * prefetched.
-     */
-    TInt iTempo;
-
-};
-
-
-#endif // CMMAMIDITEMPOCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmamidivolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to midi player
-*
-*/
-
-
-#ifndef CMMAMIDIVOLUMECONTROL_H
-#define CMMAMIDIVOLUMECONTROL_H
-
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "cmmavolumecontrol.h"
-
-class CMMAMIDIPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-    This class is used for setting volume to audio player
-
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(CMMAMIDIVolumeControl): public CMMAVolumeControl
-{
-public:
-    static CMMAMIDIVolumeControl* NewL(CMMAMIDIPlayer* aPlayer);
-
-protected:
-    CMMAMIDIVolumeControl(CMMAMIDIPlayer* aPlayer);
-    void ConstructL();
-
-
-public: // from CMMAVolumeControl
-    void DoSetLevelL(TInt aLevel);
-    TInt DoGetLevelL();
-
-private:
-    CMMAMIDIPlayer* iPlayer;
-};
-
-#endif // CMMAMIDIVOLUMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmammfplayerbase.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-#ifndef CMMAMMFPLAYERBASE_H
-#define CMMAMMFPLAYERBASE_H
-
-//  INCLUDES
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include "cmmaplayer.h"
-
-class CMMAMMFResolver;
-//  CLASS DECLARATION
-/**
-*   This is base class for players those use MMF
-*
-*
-*/
-
-class CMMAMMFPlayerBase : public CMMAPlayer,
-        public MMMFControllerEventMonitorObserver
-{
-protected:
-    //   C++ constructor
-    CMMAMMFPlayerBase(CMMAMMFResolver* aResolver);
-    void ConstructL();
-
-    ~CMMAMMFPlayerBase();
-public: // new methods
-    /**
-     * Getter for RMMFController
-     */
-    IMPORT_C RMMFController& Controller();
-
-    /**
-     * Check whether this player is playing from a file locator
-     * @return ETrue if is a file player, EFalse otherwise
-     */
-    TBool IsFilePlayer();
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void DeallocateL();
-    IMPORT_C void GetDuration(TInt64* aDuration);
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-    void CloseL();
-
-protected: // New methods
-
-    /**
-     * Loops through iControllerInfos and tries to open those
-     * @param aSourceUid Data source uid
-     * @param aSourceData Data for source
-     * @param aSinkUid Data sink uid
-     * @param aSinkData Data for sink.
-     * @param aPrioritySettings Controller's priority.
-     * @return KErrNone if controller was opened
-     */
-    IMPORT_C virtual TInt DoOpen(TUid aSourceUid,
-                                 const TDesC8& aSourceData,
-                                 TUid aSinkUid,
-                                 const TDesC8& aSinkData,
-                                 TMMFPrioritySettings aPrioritySettings);
-
-public: // from MMMFControllerEventMonitorObserver
-    void HandleEvent(const class TMMFEvent& aEvent);
-
-protected:
-
-    /**
-     * Controller infos, owned
-     */
-    RMMFControllerImplInfoArray* iControllerInfos;
-
-    /**
-     * Used to control mmf plugin.
-     */
-    RMMFController iController;
-
-    /**
-     * Owned member.
-     * Event monitor is used to monitor iController for events.
-     * If an event occurs, this class will be notified via the
-     * MMMFControllerEventMonitorObserver interface
-     */
-    CMMFControllerEventMonitor* iEventMonitor;
-
-    /**
-     * Filename used for playing directly from file, owned
-     */
-    HBufC* iFileName;
-
-    /**
-    * Cached media time
-    */
-    TInt64 iMediaTime;
-
-    /**
-    * The time that will be sent with CMMAPlayerEvent::EStarted
-    * (may be different from iMediaTime).
-    */
-    TInt64 iStartedEventTime;
-};
-
-#endif // CMMAMMFPLAYERBASE_H
--- a/javauis/mmapi_qt/baseline/inc/cmmammfplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating MMF-based players.
-*
-*/
-
-
-#ifndef CMMAMMFPLAYERFACTORY_H
-#define CMMAMMFPLAYERFACTORY_H
-
-//  INCLUDES
-#include <mmf/common/mmfcontrollerpluginresolver.h>
-#include "mmmaplayerfactory.h"
-
-class CMMAMMFResolver;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating MMF-based players.
-*
-*
-*/
-class CMMAMMFPlayerFactory: public CBase, public MMMAPlayerFactory
-{
-public: // Constructor and destructor
-    IMPORT_C CMMAMMFPlayerFactory();
-    IMPORT_C ~CMMAMMFPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-protected:
-
-    /**
-     * Creates new CMMAPlayer instance with given resolver.
-     * @param aResolver Resolver that contains needed mmf controller infos
-     * for creating player.
-     */
-    virtual CMMAPlayer* CreatePlayerL(CMMAMMFResolver* aResolver) = 0;
-
-    /**
-     * Returns list of allowed media IDs
-     */
-    virtual void MediaIdsL(RArray<TUid>& aMediaIds) = 0;
-
-    /**
-     * Returns Match type for media IDs.
-     * CMMFPluginSelectionParameters::EAllowOnlySuppliedMediaIds is the default.
-     */
-    virtual CMMFPluginSelectionParameters::TMediaIdMatchType
-    MediaIdMatchType();
-
-    /**
-     * This method is called before mmf controller implementation array
-     * is created. With this the actual factories can e.g. select either
-     * set required play or record format support. Play format support is
-     * the default.
-     */
-    IMPORT_C virtual void PreparePluginSelectionParametersL(
-        CMMAMMFResolver* aResolver,
-        CMMFFormatSelectionParameters* aFormatSelection);
-
-    /**
-     * Creates CMMAPlayer with given format selection parameters
-     */
-    IMPORT_C virtual CMMAPlayer* CreatePlayerL(CMMFFormatSelectionParameters* aFormatSelect,
-            const TDesC* aFileName = NULL);
-
-    /**
-     * Checks that is this protocol supported by this factory
-     */
-    TBool IsSupportedProtocolL(const TDesC& aProtocol);
-
-    /**
-     * Checks that is this content-type supported by this factory
-     */
-    TBool IsSupportedContentTypeL(const TDesC& aContentType);
-private:
-    /**
-     * File version of creating player from content type
-     */
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType,
-                              const TDesC* aFileName);
-#ifndef RD_JAVA_OMA_DRM_V2
-    /**
-     * Tries to open DRM file
-     */
-    CMMAPlayer* TryOpenDRMFileL(const TDesC& aFileName);
-#endif // RD_JAVA_OMA_DRM_V2
-
-};
-
-#endif // CMMAMMFPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmammfratecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements RateControl for MMF players.
-*
-*/
-
-
-#ifndef CMMAMMFRATECONTROL_H
-#define CMMAMMFRATECONTROL_H
-
-//  INTERNAL INCLUDES
-#include "cmmaratecontrol.h" // base class
-#include "cmmammfplayerbase.h"
-
-//  CLASS DECLARATION
-/**
-*   This class implements RateControl for MMF players.
-*
-*/
-NONSHARABLE_CLASS(CMMAMMFRateControl): public CMMARateControl,
-        public MMMAPlayerStateListener
-{
-public:
-
-    static CMMAMMFRateControl* NewL(CMMAMMFPlayerBase* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAMMFRateControl();
-
-protected:
-
-    /**
-     * Constructor.
-     */
-    CMMAMMFRateControl(CMMAMMFPlayerBase* aPlayer);
-
-    void ConstructL();
-
-public: // from MMMAPlayerStateListener
-    virtual void StateChanged(TInt aState);
-
-public: // New methods
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    virtual TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    virtual TInt RateL();
-
-
-private: // Member data
-
-    /**
-     * Used to obtain RMMFController reference to stop/start
-     * playback.
-     */
-    CMMAMMFPlayerBase* iPlayer;
-
-    /**
-     * Hold current rate value.
-     */
-    TInt iCurrentRate;
-
-};
-
-#endif // CMMAMMFRATECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmammfresolver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CMMAMMFRESOLVER_H
-#define CMMAMMFRESOLVER_H
-
-//  INCLUDES
-#include <mmf/common/mmfcontrollerpluginresolver.h>
-#include "cmmaplayer.h"
-
-
-_LIT(KRmFileExtension, ".rm");
-_LIT(KRaFileExtension, ".ra");
-
-//  CLASS DECLARATION
-/**
-* This class can be used to get RMMFControllerImplInfoArray and content
-* types from MMF.
-*/
-NONSHARABLE_CLASS(CMMAMMFResolver): public CBase
-
-{
-public: // Construction
-    /**
-     * Constructs a new mmf resolver object.
-     * @return The new object created.  Note that the new object will be
-     * left on the cleanup stack.
-     */
-    static CMMAMMFResolver* NewLC();
-
-public: // New methods.
-    /**
-     * Retrieves all controller plugins that support the requirements of
-     * the caller.
-     */
-    void ListImplementationsL();
-
-    /**
-     * Returns implementations.
-     * Array will not contain any implementation if ListImplementationsL()
-     * is not called.
-     * @return Found implementations.
-     */
-    RMMFControllerImplInfoArray* Implementations();
-
-    /**
-     * Returns implementations. Notice: Ownership is transferred to caller.
-     * Array will not contain any implementation if ListImplementationsL()
-     * is not called.
-     * @return Found implementations. Ownership is transferred.
-     */
-    RMMFControllerImplInfoArray* ImplementationsOwnership();
-
-    /**
-     * Returns content type that was found in ListImplementationsL method.
-     * Ownership is transfered.
-     * @return Content type or NULL if type is not available.
-     */
-    HBufC* ContentTypeOwnership();
-
-    /**
-     * Returns content type that was found in ListImplementationsL method.
-     * @return Content type or NULL if type is not available.
-     */
-    HBufC* ContentType();
-
-    /**
-     * Sets filename
-     * @param aFileName File name to be set or NULL
-     */
-
-    void SetFileNameL(const TDesC* aFileName);
-
-    /**
-     * Returns possible filename or NULL if not set
-     * Ownership is transfered.
-     * @return Content type or NULL if type is not available.
-     */
-    HBufC* FileNameOwnership();
-
-    /**
-     * Get all supported content types.
-     * @param aMimeTypeArray Will contain supported mime types.
-     */
-    void GetSupportedContentTypesL(CDesC16Array& aMimeTypeArray);
-
-    /**
-     * Return selection parameters.
-     */
-    CMMFControllerPluginSelectionParameters*
-    SelectionParameters();
-
-    /**
-     * Sets the play format support required.
-     * @param aRequiredSupport The play format support required.
-     */
-    void SetRequiredPlayFormatSupportL(
-        CMMFFormatSelectionParameters& aRequiredSupport);
-
-    /**
-     * Sets the record format support required.
-     * @param aRequiredSupport The record format support required.
-     */
-    void SetRequiredRecordFormatSupportL(
-        CMMFFormatSelectionParameters& aRequiredSupport);
-
-private:
-    /**
-     * Returns record or play formats according to the setup.
-     */
-    const RMMFFormatImplInfoArray* Formats(
-        CMMFControllerImplementationInformation* aImplementation);
-    /**
-     * Finds content type from iImplementations array.
-     */
-    void ResolveContentTypeL();
-
-private:
-    TBool IsRealVideoTypeL(const TDesC& aFileName);
-
-    TBool IsRealMimeTypeSupported(const TDesC& aMimeType);
-
-protected:
-    //   C++ constructor
-    CMMAMMFResolver();
-    void ConstructL();
-
-private:
-    ~CMMAMMFResolver();
-
-private:
-    // Owned. Ownership can be tranferred with ImplementationsOwnership
-    // method.
-    RMMFControllerImplInfoArray* iImplementations;
-
-    // Owned. Ownership can be transferred with ContentType method.
-    HBufC* iContentType;
-
-    // Owned. Ownership can be transferred with FileName method.
-    HBufC* iFileName;
-
-    // Owned.
-    CMMFControllerPluginSelectionParameters* iControllerSelection;
-
-    // The required play format support
-    CMMFFormatSelectionParameters* iRequiredPlayFormatSupport;
-
-    // The required record format support
-    CMMFFormatSelectionParameters* iRequiredRecordFormatSupport;
-};
-
-#endif // CMMAMMFRESOLVER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaoutputstream.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class to handle OutputStream operations.
-*
-*/
-
-
-#ifndef CMMAOUTPUTSTREAM_H
-#define CMMAOUTPUTSTREAM_H
-
-//  EXTERNAL INCLUDES
-//#include <jutils.h>
-#include <s32mem.h>
-#include "MMAFunctionServer.h"
-
-//  FORWARD DECLARATIONS
-class CMMAOutputStreamEvent;
-class MMMAEventPoster;
-
-//  CLASS DECLARATION
-/**
-*   Class to handle OutputStream operations.
-*   MMF writes to the stream and Java-class reads the stream.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAOutputStream): public CBase
-{
-private:
-    /**
-     * Status code to be delivered to Java
-     */
-    enum TStatus
-    {
-        EMoreData = 1,
-        ECompleted = 2
-    };
-
-public:     // Constructors and destructors
-    /**
-     * Object creation. Static method.
-     *
-     * @param aJNIEnv           handle to used jni environment
-     * @param aEventPoster      handle to event poster
-     * @param aJavaOutputStreamWriter handle to java Outputstream object
-     *
-     * @return CMMAOutputStream object
-     */
-    static CMMAOutputStream* NewL(JNIEnv* aJNIEnv,
-                                  MMMAEventPoster* aEventPoster,
-                                  jobject aJavaOutputStreamWriter);
-
-    /**
-     * The same as NewL with cleanup stack
-     * @see NewL
-     */
-    static CMMAOutputStream* NewLC(JNIEnv* aJNIEnv,
-                                   MMMAEventPoster* aEventPoster,
-                                   jobject aJavaOutputStreamWriter);
-
-
-    /**
-     * Object creation. Static method.
-     *
-     * @param aOutputStream handle to used output stream
-     * @param aJNIEnv       handle to used jni environment
-     * @param aEventPoster  handle to event poster
-     * @param aJavaOutputStreamWriter handle to java Outputstream object
-     */
-    static void CreateL(CMMAOutputStream** aOutputStream,
-    										MMAFunctionServer* aEventSource,
-                        JNIEnv* aJNIEnv,
-                        MMMAEventPoster* aEventPoster,
-                        jobject aJavaOutputStreamWriter);
-
-    /**
-     * Deletes owned objects
-     */
-    ~CMMAOutputStream();    // Destructor
-
-private:    // Constructors and destructors
-    /**
-     * Default constructor, initializes variables
-     */
-    CMMAOutputStream(MMMAEventPoster* aEventPoster);
-
-    /**
-     * Finishes construction
-     *
-     * @param aJNIEnv       handle to used jni environment
-     * @param aJavaOutputStreamWriter handle to java Outputstream object
-     */
-    void ConstructL(JNIEnv* aJNIEnv,
-                    jobject aJavaOutputStreamWriter);
-
-public: // New methods
-    /**
-     * Read data from c++ to aOutputData (passed from java side)
-     */
-    virtual void ReadDataL(TUint8* aOutputData,
-                           TInt* aBufferSize,
-                           TInt* aReadStatus);
-
-public: // New methods
-    /**
-     * Write data to a stream.
-     */
-    void WriteL(const TDesC8& aData);
-
-    /**
-     * Commit Java stream
-     */
-    void Commit();
-
-private: // Data
-    /**
-     * Owned.
-     * Event which notifies Java when data is available or read continues.
-     */
-    CMMAOutputStreamEvent* iWriteEvent;
-
-    /**
-     * Pointer to event source
-     */
-    MMMAEventPoster* iEventSource;
-
-    /**
-     * Ptr to iData member. Moved when data is read.
-     */
-    TPtr8 iPtr;
-
-    /**
-     * Owned.
-     * Pointer to data to be written to Java side.
-     */
-    HBufC8* iData;
-};
-
-
-#endif // CMMAOUTPUTSTREAM_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaoutputstreamevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMAOUTPUTSTREAMEVENT_H
-#define CMMAOUTPUTSTREAMEVENT_H
-
-#include "cmmaevent.h"
-
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAOutputStreamEvent): public CMMAEvent
-{
-public:
-    enum TMMAOutputStreamState
-    {
-        EMMAEventActive,    // event is waiting dispatching
-        EMMAEventNotActive, // not added to event server
-        EMMADeleteEvent     // dispatch deletes this event
-    };
-public:
-    CMMAOutputStreamEvent(jmethodID aHandleEventMethod,
-                          jobject aNotifyObject);
-
-    // status of the source stream
-    void SetStatus(TInt aStatus);
-
-    // length of the available output stream data
-    void SetLength(TInt aLength);
-
-    /**
-     * Sets new state.
-     * @param aState TMMAOutputStreamState.
-     */
-    void SetState(TMMAOutputStreamState aState);
-
-    TMMAOutputStreamState State();
-private: // from CJavaEvent
-    void Dispatch(JNIEnv& aJni);
-
-private:
-    jmethodID iHandleEventMethod;
-    jobject iListenerObject;
-    TInt iLength;
-    TInt iStatus;
-
-    /**
-     * State of this event.
-     */
-    TMMAOutputStreamState iState;
-};
-
-#endif // CMMAOUTPUTSTREAMEVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,475 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is base class for all players.
-*
-*/
-
-
-#ifndef CMMAPLAYER_H
-#define CMMAPLAYER_H
-
-//  INCLUDES
-#include "cmmacontrol.h"
-#include "cmmasourcestream.h"
-#include "cmmaplayerevent.h"
-#include "mmmasourcestreamlistener.h"
-#include "mmmaplayerstatelistener.h"
-
-//  FORWARD DECLARATIONS
-class CMMADurationUpdater;
-
-//  CONTANTS
-
-// Not enough stream to realize to player
-const TInt KErrNotEnoughStreams = -7002;
-
-/**
- * Used in set loop count to indicate forever loop.
- */
-const TInt KJavaRepeatForever = -1;
-
-/**
- * Returned to Java if duration or mediatime is unknown.
- */
-const TInt KTimeUnknown = -1;
-
-//  CLASS DECLARATION
-/**
-*   This class is base class for all players.
-*
-*
-*/
-
-class CMMAPlayer : public CBase,
-        public MMMASourceStreamListener
-
-{
-public:
-    /**
-     * Player state. Same that in Java side.
-     */
-    enum TPlayerState
-    {
-        EClosed = 0,
-        EUnrealized = 100,
-        ERealized = 200,
-        EPrefetched = 300,
-        EStarted = 400
-    };
-
-public:
-    /**
-     * Deletes all owned members.
-     */
-    virtual ~CMMAPlayer();
-protected:
-    /**
-     * Initializes member variables to defaults.
-     */
-    CMMAPlayer();
-
-    /**
-     * Second phase construct.
-     */
-    void ConstructL();
-
-public: // static methods
-    /**
-     * Creates and adds source stream to the player. New stream will be
-     * owned by this player.
-     *
-     * @param aJniEnv Used to create source stream.
-     * @param aPlayer Player to use.
-     * @param aEventSource Used to create source stream.
-     * @param aReader Java side stream object.
-     * @param aSourceStream New stream's pointer will be set to this.
-     */
-    static void StaticAddSourceStreamL(JNIEnv* aJniEnv,
-                                       CMMAPlayer* aPlayer,
-                                       MMAFunctionServer* aEventSource,
-                                       jobject aReader,
-                                       CMMASourceStream** aSourceStream);
-
-    /**
-     * Sets Java listener object that will be used to post player events
-     * and control specific events.
-     *
-     * @param aPlayer Player to use.
-     * @param aListenerObject Java side listener object.
-     * @param aJni Used to get method ids.
-     * @param aPoster Used to post events.
-     */
-    static void StaticSetPlayerListenerObjectL(CMMAPlayer* aPlayer,
-    				MMAFunctionServer* aEventsource,
-            jobject aListenerObject,
-            JNIEnv* aJni,
-            MMMAEventPoster* aPoster);
-
-    /**
-     * Initializes action completed callbacks.
-     *
-     * @param aPlayer Player to use.
-     * @param aPlayerObject Java side Player object.
-     * @param aJni Used to get method id.
-     */
-    static void StaticInitPlayerL(CMMAPlayer* aPlayer,
-    															MMAFunctionServer* aEventsource,
-                                  jobject aPlayerObject,
-                                  JNIEnv* aJni);
-
-    /**
-     * Static getter for control objects.
-     *
-     * @param aPlayer Player to use.
-     * @param aIndex Control's index.
-     */
-    IMPORT_C static CMMAControl* StaticControl(CMMAPlayer* aPlayer,
-            TInt aIndex);
-
-public: // New methods
-
-    /**
-     * Realizes the player. Implementations do not necessarily add
-     * functionality in this method. If successful player is in
-     * ERealized state.
-     */
-    virtual void RealizeL();
-
-    /**
-     * Prefetches data. Usually data from source stream will be read. When
-     * prefetch completes action completed event will be delivered. If
-     * successful player is in EPrefetched state.
-     */
-    virtual void PrefetchL() = 0;
-
-    /**
-     * Start playing. Started event will be posted. If there is no error
-     * player will be in EStarted state.
-     */
-    virtual void StartL() = 0;
-
-    /**
-     * Stops playing. After this player may be restarted with StartL method.
-     * After this player is in EPrefetched state.
-     *
-     * @param aPostEvent Indicates if java be informed.
-     */
-    virtual void StopL(TBool aPostEvent) = 0;
-
-    /**
-     * Releases resources. Player state can be changed.
-     */
-    virtual void DeallocateL() = 0;
-
-    /**
-     * Close the Player and release its resources. After this player is in
-     * EClosed state and cannot be used anymore.
-     */
-    virtual void CloseL();
-
-    /**
-     * Gets duration.
-     *
-     * @param aDuration Duration or KTimeUnknown if not specified.
-     */
-    virtual void GetDuration(TInt64* aDuration);
-
-    /**
-     * Sets media time.
-     *
-     * @param aTime Time to set. When method returns parameter contains
-     *              actual media time set.
-     */
-    virtual void SetMediaTimeL(TInt64* aTime);
-
-    /**
-     * Gets media time.
-     *
-     * @param aMediaTime When method returns parameter contains the media
-     * time.
-     */
-    virtual void GetMediaTime(TInt64* aMediaTime);
-
-    /**
-     * Sets loop count.
-     *
-     * @param aCount Indicates the number of times the content will be
-     *               played. KJavaRepeatForever indicates looping
-     *               indefintely.
-     */
-    IMPORT_C virtual void SetLoopCount(TInt aCount);
-
-    /**
-     * Get the content type of the media that's being played back by this
-     * Player.
-     * @return The content type being played back by this Player. NULL if
-     * content type is not available.
-     */
-    HBufC* ContentType() const;
-
-public: // new methods
-    /**
-     * Sets Java listener object that will be used to post player events
-     * and control specific events.
-     *
-     * @param aListenerObject Java side listener object.
-     * @param aJni Used to get method ids.
-     * @param aPoster Used to post events.
-     */
-    virtual void SetPlayerListenerObjectL(jobject aListenerObject,
-                                          JNIEnv* aJni,
-                                          MMMAEventPoster* aPoster);
-
-    /**
-     * Returns total count of the controls owned by this player.
-     *
-     * @return Count of the controls.
-     */
-    IMPORT_C TInt ControlCount();
-
-    /**
-     * Gets control. Ownership is not tranferred.
-     *
-     * @param aIndex Control index.
-     */
-    IMPORT_C CMMAControl* Control(TInt aIndex);
-
-    /**
-     * Adds new control. Ownership is transferred to this class.
-     *
-     * @param aControl New control.
-     */
-    IMPORT_C virtual void AddControlL(CMMAControl* aControl);
-
-    /**
-     * Adds listener. All listeners will informed when player state changes.
-     *
-     * @param aListener New listener.
-     */
-    IMPORT_C void AddStateListenerL(MMMAPlayerStateListener* aListener);
-
-    /**
-     * Removes a player state listener.
-     *
-     * @param aListener Listener to be removed.
-     */
-    IMPORT_C void RemoveStateListener(MMMAPlayerStateListener* aListener);
-
-    /**
-     * @return Player's state.
-     */
-    inline TInt State();
-
-    /**
-     * Returns player's type. Player types are defined in derived player
-     * headers.
-     * @return Player type.
-     */
-    virtual const TDesC& Type();
-
-    /**
-     * Sets player's content type, which can be queried with ContentType
-     * method. Ownership is transfered.
-     * @param aContentType Player's content type.
-     */
-    void SetContentType(HBufC* aContentType);
-
-    /**
-     * Reset all source streams.
-     */
-    void ResetSourceStreams();
-
-    /**
-     * Refresh all the controls.
-     */
-    void RefreshControls();
-    /**
-    * delete all the controls.
-    */
-    void DeleteControls();
-
-public: // methods for informing java player listeners
-
-    /**
-     * Post event which event data will be Long java object.
-     *
-     * @param aEventType Event's type specified in CMMAPlayerEvent.
-     * @param aLongEventData Event data context.
-     */
-    void PostLongEvent(CMMAPlayerEvent::TEventType aEventType,
-                       const TInt64& aLongEventData);
-
-    /**
-     * Post event which event data will be string.
-     *
-     * @param aEventType Event's type specified in CMMAPlayerEvent.
-     * @param aStringEventData Event data context.
-     */
-    IMPORT_C void PostStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                                  const TDesC& aStringEventData);
-
-    /**
-     * Post event which event data will be a java object.
-     *
-     * @param aEventType Event's type specified in CMMAPlayerEvent.
-     * @param aEventData Java object.
-     */
-    IMPORT_C void PostObjectEvent(CMMAPlayerEvent::TEventType aEventType,
-                                  const jobject aEventData);
-
-    /**
-     * Completes action and allows Java side to continue.
-     *
-     * @param aError of the action or KErrNone.
-     */
-    IMPORT_C void PostActionCompleted(TInt aError);
-    
-    IMPORT_C void PostActionCompletedFile();   //LC work for S60 3.2
-    
-    IMPORT_C void PostActionCompletedStart();
-protected: // new methods
-    /**
-     * @see StaticAddSourceStreamL
-     */
-    IMPORT_C virtual CMMASourceStream* AddSourceStreamL(JNIEnv* aJniEnv,
-            MMAFunctionServer* aEventSource,
-            jobject aReader);
-
-    /**
-     * Changes player's state and informs all MMMAPlayerStateListeners.
-     *
-     * @param aState New state.
-     */
-    void ChangeState(TPlayerState aState);
-
-public: // from MMMASourceStreamListener
-    virtual void ReadCompletedL(TInt aStatus, const TDesC8& aData);
-
-protected: // Memeber data
-    /**
-     * Array of controls. All controls are owned by this class.
-     */
-    RPointerArray< CMMAControl > iControls;
-
-    /**
-     * Array of streams. All streams are owned by this class.
-     */
-    RPointerArray< CMMASourceStream > iSourceStreams;
-
-
-    /**
-     * Array of listeners. Not owned.
-     */
-    RPointerArray< MMMAPlayerStateListener > iStateListeners;
-
-    /**
-     * Used to inform java side of completion.
-     * Owned.
-     */
-    CMMAEvent* iActionCompletedEvent;
-    
-    /**
-     * Used to inform java side of completion.
-     * Owned.
-     */
-    CMMAEvent* iActionCompletedFileEvent;    
-    
-    CMMAEvent* iActionCompletedStartEvent;      
-  
-    /**
-     * Player state listener object.
-     */
-    jobject iListenerObject;
-
-    /**
-     * java method postEvent(String,Object)
-     */
-    jmethodID iPostEvent;
-    /**
-     * java method postObjectEvent(int,Object)
-     */
-    jmethodID iPostObjectEvent;
-
-    /**
-     * java method postLongEvent(int,long)
-     */
-    jmethodID iPostLongEvent;
-
-    /**
-     * java method postStringEvent(int,String)
-     */
-    jmethodID iPostStringEvent;
-
-    /**
-     * java method postControlEvent(int,String)
-     */
-    jmethodID iPostControlEvent;
-
-    /**
-     * Not owned.
-     */
-    MMMAEventPoster* iEventPoster;
-
-    /**
-     * Total number of wanted loops.
-     */
-    TInt iRepeatNumberOfTimes;
-
-    /**
-     * Indicates if looping indefintely.
-     */
-    TBool iRepeatForever;
-
-    /**
-     * Current loop count.
-     */
-    TInt iRepeatCount;
-
-    /**
-     * Content duration in microseconds.
-     */
-    TInt64 iDuration;
-
-    /**
-     * Current state of the player.
-     */
-    TPlayerState iState;
-
-    /**
-     * Event for notificating Java that memory allocation has failed.
-     * Owned.
-     */
-    CMMAPlayerEvent* iOOMErrorEvent;
-
-    /**
-     * The content type being played back by this Player.
-     * Owned. May be NULL until type is available.
-     */
-    HBufC* iContentType;
-
-    /**
-     * Player state listener that sends duration update event to Java
-     * if duration has changed when player state changes.
-     */
-    CMMADurationUpdater* iDurationUpdater;
-
-};
-
-
-inline TInt CMMAPlayer::State()
-{
-    return iState;
-}
-
-#endif // CMMAPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaplayerevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMAPLAYEREVENT_H
-#define CMMAPLAYEREVENT_H
-
-//  INCLUDES
-#include "cmmaevent.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*/
-
-NONSHARABLE_CLASS(CMMAPlayerEvent): public CMMAEvent
-{
-public:
-    enum TEventType
-    {
-        EStarted = 0,
-        EStopped = 1,
-        EStoppedAtTime = 2,
-        EEndOfMedia = 3,
-        EDurationUpdated = 4,
-        EAudioDeviceUnavailable = 5,
-        EVolumeChanged = 6,
-        ESizeChanged = 7,
-        EError = 8,
-        EClosed = 9,
-        ERecordStarted = 10,
-        ERecordStopped = 11,
-        EPrivateDataAvailable = 12,
-        EPrivateDataOverwritten = 13,
-        EBufferingStarted = 14,
-        EBufferingEStopped = 15,
-        ERecordError = 16,
-        ENOKIA_EXTERNAL_VOLUME_EVENT = 17, // Event ID for Nokia volume key
-        EAudioOutputPreferenceChangeEvent =18 // Event ID for Audio Routing Preference Change
-    };
-
-private:
-    enum TEventParams
-    {
-        ENormal = 0,    // string and object
-        EString,        // int and string
-        ELong,          // int and long
-        EObject         // int and object
-    };
-
-public:
-    /**
-     * Constructor. One of set methods must be called before sending this
-     * event.
-     * @param aNotifyObject Java Objects.
-     * @param aHandleEventMethod Java method.
-     * @param aDisposable Defaults to disposable event.
-     */
-    CMMAPlayerEvent(jobject aNotifyObject,
-                    jmethodID aHandleEventMethod,
-                    TDisposability aDisposable = EDisposableEvent);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAPlayerEvent();
-
-    /**
-     * Sets event data.
-     * @param aEventType Type of the event.
-     * @param aEventData Data to be send to Java
-     */
-    void SetLongEvent(TEventType aEventType, const TInt64& aEventData);
-
-    /**
-     * Sets event data.
-     * @param aEventType Type of the event.
-     * @param aEventData Data to be send to Java
-     */
-    void SetStringEventL(TEventType aEventType, const TDesC& aEventData);
-
-    /**
-     * Sets event data.
-     * @param aEventType Type of the event.
-     * @param aEventData Data to be send to Java
-     */
-    void SetObjectEventL(TEventType aEventType, const jobject aEventData);
-private: // from CJavaEvent
-    void Dispatch(JNIEnv& aJni);
-
-private: // Data
-    TEventType iEventType;
-    TEventParams iEventParams;
-
-    // Used when sending ELong event.
-    TInt64 iLongEventData;
-
-    // Owned event data. Used when sending EString event.
-    HBufC* iStringEventData;
-    // Owned event type. Used when sending ENormal event.
-    HBufC* iStringEventType;
-
-    // Used when sending ENormal or EObject event.
-    jobject iObjectEventData;
-};
-
-#endif // CMMAPLAYEREVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaplayerproperties.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for storing and parsing properties
-*
-*/
-
-
-#ifndef CMMAPLAYERPROPERTIES_H
-#define CMMAPLAYERPROPERTIES_H
-
-//  INCLUDES
-#include <e32base.h>
-
-// STRUCTS
-
-/**
- * These structs are used for storing array of strings
- */
-NONSHARABLE_STRUCT(TMMAStaticStr)
-{
-    TInt iLength;
-    const TText* iStr;
-
-    inline const TPtrC operator()() const
-    {
-        return TPtrC(iStr, iLength);
-    }
-};
-
-NONSHARABLE_STRUCT(TMMAStaticStrArray)
-{
-    const TMMAStaticStr* iStr;
-    inline const TPtrC operator()() const
-    {
-        return TPtrC(iStr->iStr, iStr->iLength);
-    }
-};
-
-#define MMA_PARAMETER_ARRAY(name) const TMMAStaticStrArray name[] =
-#define MMA_PARAMETER_STR(name, s) static const TMMAStaticStr name = {sizeof(L##s)/sizeof(TText)-1, (TText*)L##s}
-#define MMA_PARAMETER_ARRAY_SIZE(name) (sizeof(name)/sizeof((name)[0]))
-
-//  CLASS DECLARATION
-/**
-*   This class is base class for storing and validating
-*/
-
-NONSHARABLE_CLASS(MMMAParameterRule)
-{
-public:
-    /**
-     * Validates key-value pair based on rule. If derived class is leaf with specified key
-     * then it must store value if it is valid.
-     */
-    virtual TBool ValidateAndStoreL(const TDesC& aKey, const TDesC& aValue) = 0;
-
-    /**
-     * Compares key-value pair based on rule and stored value.
-     */
-    virtual TBool Compare(const TDesC& aKey, const TDesC& aValue) = 0;
-    virtual TBool Compare(const TDesC& aKey, const TInt aValue) = 0;
-
-    /**
-     * Gets value for specified key, returns EFalse if specified key is not found
-     */
-    virtual TBool FindProperty(const TDesC& aKey, TPtrC& aValue) = 0;
-    virtual TBool FindProperty(const TDesC& aKey, TInt& aValue) = 0;
-};
-
-//  CLASS DECLARATION
-/**
-*   This class is used for storing and parsing properties
-*   The property string is in format "name=value&name=value&..."
-*
-*/
-
-NONSHARABLE_CLASS(CMMAPlayerProperties): public CBase
-{
-public:// Construction and destruction
-    /**
-    * Two-phased constructor.
-    */
-    static CMMAPlayerProperties* NewL(const TDesC& aProperties,
-    MMMAParameterRule& aRule);
-    /**
-    * Destructor.
-    */
-    ~CMMAPlayerProperties();
-
-protected: // default constructor and second phase construction
-    CMMAPlayerProperties(const TDesC& aProperties, MMMAParameterRule& aRule);
-
-public: // new methods
-    /**
-     * Gets property for given key. Returns EFalse if key cannot
-     * be found
-     */
-    TBool GetProperty(const TDesC& aKey, TInt& aValue) const;
-    TBool GetProperty(const TDesC& aKey, TPtrC& aValue) const;
-
-    /**
-     * Compares that given key and value pair can be found in
-     * given properties string. Notice that this returns EFalse also
-     * if given key is not found.
-     */
-    TBool Compare(const TDesC& aKey, const TInt& aValue) const;
-    TBool Compare(const TDesC& aKey, const TDesC& aValue) const;
-
-    /**
-     * Validates given properties with given rule(s), leaves with
-     * KErrArgument if properties was not valid.
-     */
-
-    void ValidateL() const;
-
-private: //data
-    // properties
-    const TDesC& iProperties;
-    // rule composition
-    MMMAParameterRule& iRule;
-};
-
-
-
-//  CLASS DECLARATION
-/**
-*   Composite class for storing rule set
-*/
-
-NONSHARABLE_CLASS(CMMAParameterRuleSet): public CBase, public MMMAParameterRule
-{
-public: // Construction and destruction
-    /**
-    * Two-phased constructor.
-    */
-    static CMMAParameterRuleSet* NewLC();
-
-    /**
-    * Destructor.
-    */
-    ~CMMAParameterRuleSet();
-
-protected: // default constructor and second phase construction
-    CMMAParameterRuleSet();
-    virtual void ConstructL();
-
-public: // From MMMAParameterRule
-    TBool ValidateAndStoreL(const TDesC& aKey, const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TInt aValue);
-    TBool FindProperty(const TDesC& aKey, TPtrC& aValue);
-    TBool FindProperty(const TDesC& aKey, TInt& aValue);
-
-public: // new methods
-    void AppendRuleL(MMMAParameterRule* aRule);
-
-private: // data
-    // list of rules in this composite, owned
-    CArrayPtrSeg< MMMAParameterRule >* iRules;
-};
-
-//  CLASS DECLARATION
-/**
-*   Base class for property rules
-*/
-NONSHARABLE_CLASS(TMMAParameterRuleBase): public MMMAParameterRule
-{
-public: // constructor
-    TMMAParameterRuleBase(const TDesC& aKey);
-
-public: // From MMMAParameterRule
-    TBool ValidateAndStoreL(const TDesC& aKey, const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TInt aValue);
-    TBool FindProperty(const TDesC& aKey, TPtrC& aValue);
-    TBool FindProperty(const TDesC& aKey, TInt& aValue);
-
-protected: // new methods
-    /**
-     * Returns EFalse if value is not valid for this rule
-     * Derived class must also store value if it is accepted
-     */
-    virtual TBool ValidateValueL(const TDesC& aValue) = 0;
-
-protected: //data
-    const TDesC& iKey;
-    TBool iAssigned;
-};
-
-//  CLASS DECLARATION
-/**
-*   Rule for TInt
-*/
-NONSHARABLE_CLASS(TMMAParameterRuleInt): public TMMAParameterRuleBase
-{
-public: // constructors
-    TMMAParameterRuleInt(const TDesC& aKey);
-
-    TMMAParameterRuleInt(const TDesC& aKey,
-                         const TInt aLowerLimit);
-
-    TMMAParameterRuleInt(const TDesC& aKey,
-                         const TInt aLowerLimit,
-                         const TInt aUpperLimit);
-
-public: // From MMMAParameterRule
-    TBool ValidateValueL(const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TInt aValue);
-    TBool FindProperty(const TDesC& aKey, TInt& aValue);
-
-
-
-private: // data
-    TInt iValue;
-    const TInt iUpperLimit;
-    const TInt iLowerLimit;
-};
-
-//  CLASS DECLARATION
-/**
-*   Rule for TDesC
-*/
-NONSHARABLE_CLASS(TMMAParameterRuleDes): public TMMAParameterRuleBase
-{
-public: // constructors
-    TMMAParameterRuleDes(const TDesC& aKey);
-
-    TMMAParameterRuleDes(const TDesC& aKey,
-                         const TMMAStaticStrArray* aValidValues,
-                         const TInt aArraySize);
-
-public: // From MMMAParameterRule
-    TBool ValidateValueL(const TDesC& aValue);
-    TBool Compare(const TDesC& aKey, const TDesC& aValue);
-    TBool FindProperty(const TDesC& aKey, TPtrC& aValue);
-
-
-private: // data
-    TPtrC iValue;
-    // not owned
-    const TMMAStaticStrArray* iValidValues;
-    const TInt iArraySize;
-};
-#endif // CMMAPLAYERPROPERTIES_H
--- a/javauis/mmapi_qt/baseline/inc/cmmaratecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Base class for RateControl implementations.
-*
-*/
-
-
-#ifndef CMMARATECONTROL_H
-#define CMMARATECONTROL_H
-
-// EXTERNAL INCLUDES
-
-//  INTERNAL INCLUDES
-#include "cmmacontrol.h" // base class
-
-// CONSTANTS
-
-static const TInt KMMADefaultRate = 100000;
-static const TInt KMMAMinRate = 0;
-
-// Constant for control name. Name is used in Java side to instantiate
-// Java Class which uses CMMARateControl.
-_LIT(KMMARateControlName, "RateControl");
-
-
-//  CLASS DECLARATION
-/**
-*   This class is the base class for RateControl implementations.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMARateControl): public CMMAControl
-{
-public:
-    /**
-     * Destructor.
-     */
-    ~CMMARateControl();
-
-protected:
-    /**
-     * Constructor.
-     */
-    CMMARateControl();
-
-public: // From CMMAControl
-    virtual const TDesC& ClassName() const;
-
-public: // New methods
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    virtual TInt SetRateL(TInt aRate) = 0;
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    virtual TInt RateL() = 0;
-
-    /**
-     * @return The maximum rate supported.
-     */
-    virtual TInt MaxRateL();
-
-    /**
-     * @return The minimum rate supported.
-     */
-    virtual TInt MinRateL();
-
-};
-
-
-#endif // CMMARATECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmarecordcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a RecordControl.
-*
-*/
-
-
-#ifndef CMMARECORDCONTROL_H
-#define CMMARECORDCONTROL_H
-
-//  INTERNAL INCLUDES
-#include <f32file.h>
-#include "cmmaoutputstream.h"
-#include "cmmacontrol.h"
-#include "mmmaplayerstatelistener.h"
-
-//  FORWARD DECLARATIONS
-class CMMAPlayer;
-
-// CONSTANTS
-
-// Too fast start and stop can cause problems,
-// 0.5s is enough to make pause work.
-const TInt KMinRecordPauseInterval = 500000;
-
-_LIT(KMMARecordTempDirectory, "d:\\");   // CSI: 25 dir for temporary recording file #
-_LIT(KMMARecordErrorMsg, "Recording error: %d");
-const TInt KRecordErrorMessageSize = 25;
-
-//  CLASS DECLARATION
-/**
-*   This class is the native side of the RecordControl Java class. This class
-*   delegates static method calls to virtual methods which are implemented in
-*   derived classes. This class only implements ClassName method.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMARecordControl):
-        public CMMAControl,
-        public MMMAPlayerStateListener
-{
-protected:
-    // Internal state of this class.
-    enum TRecordState
-    {
-        // recorder has not been initialized (startRecord has not been called)
-        ERecordUninitialized = 1,       //Recorder uninitialized
-        // recorder has been initialized (startRecord) however,
-        // recodring has been stopped after that (stopRecord)
-        ERecordInitialized,
-        // recorder has been initialized (startRecord) but player is not in
-        // STARTED state
-        ERecordStandBy,
-        // recorder has been initialized (startRecord) and player is in
-        // STARTED state. i.e. recording is ON
-        ERecordRecording
-    };
-
-protected: // proteced constructor and destructor for preventing direct use
-    CMMARecordControl(CMMAPlayer* aPlayer);
-    ~CMMARecordControl();
-    void ConstructL();
-
-    /**
-     * Waits until recording can be paused after start.
-     * @param aMediaTime Current media time.
-     */
-    void WaitForPauseL(const TInt64& aMediaTime);
-
-public: // new methods
-    /**
-     * Start recording.
-     */
-    virtual void StartRecordL();
-
-    /**
-     * Stops recording.
-     */
-    virtual void StopRecordL();
-
-    /**
-     * Completes current recording. The rest of the data will written
-     * to the output stream. This method may not be called when recording.
-     */
-    virtual void CommitL();
-
-    /**
-     * Erase current recording.
-     */
-    virtual void ResetL();
-
-    /**
-     * Set the output stream where the data will be recorded.
-     * Existing stream will be deleted.
-     * @param aStream New stream to use.
-     */
-    virtual void SetRecordStream(CMMAOutputStream* aStream);
-
-    /**
-     * Return the content type of the recorded media.
-     * @return Content type used for recording.
-     */
-    virtual HBufC* GetContentTypeL();
-
-public: // new pure virtual methods
-
-    /**
-     * Set the record size limit. This limits the size of the recorded
-     * media to the number of bytes specified.
-     *
-     * When recording is in progress, commit will be called implicitly
-     * in the following cases:
-     *  - Record size limit is reached
-     *  - If the requested size is less than the already recorded size
-     *  - No more space is available.
-     *
-     * Once a record size limit has been set,
-     * it will remain so for future recordings until it is
-     * changed by another setRecordSizeLimit call.
-     *
-     * @param aSize New size limit.
-     * @return Actual value set.
-     */
-    virtual TInt SetRecordSizeLimitL(TInt aSize) = 0;
-
-    /**
-     *  Start the recording in implementation
-     */
-    virtual void DoStartRecordL() = 0;
-
-    /**
-     *  Start the recording in implementation
-     */
-    virtual void DoStopRecordL() = 0;
-
-    /**
-     *  Initialize native recorder
-     */
-    virtual void InitializeL() = 0;
-
-    /**
-     *  Reset recorder
-     */
-    virtual void DoResetL() = 0;
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-
-public: // from MMMAPlayerListener
-    void StateChanged(TInt aState);
-
-protected: // new methods
-    /**
-     * Sends record error event to Java
-     */
-    void Error(TInt aErrorCode);
-
-    /**
-     * Handles situation when record size limit is reached
-     */
-    void HandleRecordSizeLimit();
-
-private: // new methods
-    void NextStateL(TInt aPlayerState);
-
-protected: // Members
-    // Current state of recording
-    TRecordState iState;
-
-    // Where to record
-    RFile iFile;
-    TFileName iFilename;
-
-    // Recording player
-    CMMAPlayer* iPlayer;
-
-    // Rfs used for creating temp file and deleting it
-    RFs iFs;
-private: // Members
-
-    // Stream to write data, owned
-    CMMAOutputStream* iOutputStream;
-
-    /**
-     * Start time of recording.
-     */
-    TInt64 iStartTime;
-
-    /**
-     * Owned. Used to wait before pause if it
-     * is called too fast after starting.
-     */
-    RTimer iRecordPauseTimer;
-};
-
-
-#endif // CMMARECORDCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmasnapshot.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class takes snapshot and resizes bitmap if needed.
-*
-*/
-
-#ifndef CMMASNAPSHOT_H
-#define CMMASNAPSHOT_H
-
-//  INCLUDES
-#include <bitmaptransforms.h>
-#include "tmmaparametervalidator.h"
-#include "mmmasnapshot.h"
-
-//  FORWARD DECLARATIONS
-class MMMAGuiPlayer;
-class MMMAEventPoster;
-class MMMASnapshotReadyCallback;
-
-
-//  CLASS DECLARATION
-/**
-*   This class takes snapshot from MMMAGuiPlayer and resizes bitmap
-*   if needed. Then bitmap is converted to wanted image format and posted
-*   to java side. This class is used only from CMMAVideoControl and
-*   this class is made to separate many asynchronous calls from control and
-*   resource releasing.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMASnapshot): public CActive
-{
-private: // private state
-    enum TMMASnapshotState
-    {
-        EIdle,
-        ETakingSnapshot,
-        EResizing,
-        EEncoding
-    };
-public:
-    /**
-     * Creates new CMMASnapshot which will be associated to gui player.
-     *
-     * @param aGuiPlayer Player used to take snapshot bitmap.
-     * @param aCallBack Will be informed when completed.
-     */
-    static CMMASnapshot* NewL(MMMAGuiPlayer* aGuiPlayer,
-                              MMMASnapshotReadyCallback& aCallBack);
-    /**
-     * Destructor.
-     */
-    virtual ~CMMASnapshot();
-
-private:
-    /**
-     * Creates required member variables.
-     */
-    void ConstructL();
-
-    /**
-     * Contructs new CMMASnapshot.
-     *
-     * @param aGuiPlayer Used to take snapshot bitmap.
-     * @param aCallBack Will be informed when completed.
-     */
-    CMMASnapshot(MMMAGuiPlayer* aGuiPlayer,
-                 MMMASnapshotReadyCallback& aCallBack);
-
-public: // new methods
-    /**
-     * Takes snapshot from player and converts it to according to
-     * the properties.
-     *
-     * @param aProperties Snapshot's properties.
-     */
-    void TakeSnapShotL(const TDesC& aProperties);
-
-    /**
-     * Caller takes the ownership of the buffer.
-     *
-     * @return Image buffer. Ownership is transferred.
-     */
-    HBufC8* ImageBuffer();
-
-
-private:// New methods
-    /**
-     * Resizing image to size of settings
-     */
-    void ResizeL();
-
-    /**
-     * Encodes bitmap to wanted mime-type
-     */
-    void EncodeL();
-
-    /**
-     * Called when snapshot is ready or error occures. This method will
-     * inform also the MMMASnapshotReadyCallback interface.
-     *
-     * @param aError Error code for the caller class.
-     */
-    void Completed(TInt aError);
-
-public: // CActive
-    void RunL();
-    TInt RunError(TInt aError);
-    void DoCancel();
-
-private:
-    /**
-     * Bitmap encoder, owned
-     */
-    CImageEncoder* iEncoder;
-
-    /**
-     * Bitmap will be got from gui player and ownership is
-     * transfers to this class, owned
-     */
-    CFbsBitmap* iBitmap;
-
-    /**
-     * Bitmap scaler, owned
-     */
-    CBitmapScaler* iScaler;
-
-    /**
-     * Buffer used for storing encoded data, owned
-     */
-    HBufC8* iBuffer;
-
-    /**
-     * Bitmap settings, owned
-     */
-    CMMAImageSettings* iSettings;
-
-    /**
-     * Snapshot encoding
-     */
-    MMMASnapshot::TEncoding iEncoding;
-
-    /**
-     * GUI player interface, used for taking snapshot, not owned
-     */
-    MMMAGuiPlayer* iGUIPlayer;
-
-    /**
-     * When snapshot is ready or error occures callback will be informed.
-     */
-    MMMASnapshotReadyCallback& iCallBack;
-
-    /**
-     * Internal state
-     */
-    TMMASnapshotState iState;
-};
-
-#endif // CMMASNAPSHOT_H
-
-
-
-
-
-
--- a/javauis/mmapi_qt/baseline/inc/cmmasnapshotevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMASNAPSHOTEVENT_H
-#define CMMASNAPSHOTEVENT_H
-
-//  INCLUDES
-#include "cmmaevent.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMASnapshotEvent): public CMMAEvent
-{
-public:
-    CMMASnapshotEvent(jobject aNotifyObject,
-    jmethodID aHandleEventMethod,
-    TInt aError,
-    HBufC8* aImage,
-    TDisposability aDisposable = EDisposableEvent);
-
-    ~CMMASnapshotEvent();
-
-private: // from CJavaEvent
-    void Dispatch(JNIEnv& aJni);
-
-private: // data
-    HBufC8* iImageBuffer;
-};
-
-#endif // CMMASNAPSHOTEVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmasourcestream.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for reading data from Java SourceStream to native side
-*
-*/
-
-
-#ifndef CMMASOURCESTREAM_H
-#define CMMASOURCESTREAM_H
-
-//#include <jutils.h>
-#include "MMAFunctionServer.h"
-
-class CMMASourceStreamEvent;
-class MMMASourceStreamListener;
-class MMMAEventPoster;
-
-// CONSTANTS
-const TInt KMMAReadAllData = -1;
-
-//  CLASS DECLARATION
-/**
-*   Class for reading data from Java SourceStream to native side
-*
-*
-*/
-NONSHARABLE_CLASS(CMMASourceStream): public CBase
-{
-public:
-    /**
-     * Status of the source stream reader
-     */
-    enum TStatus
-    {
-        EReadAll = 1,
-        ERead = 2,
-        EMoreData = 3,
-        ECompleted = 4,
-        EClosed = 5
-    };
-
-public:     // Constructors and destructors
-    /**
-     * Object creation. Static method.
-     *
-     * @param aJNIEnv           handle to used jni environment
-     * @param aEventPoster      handle to event poster
-     * @param aJavaSourceStream handle to java SourceStream object
-     * @param aListener         Handle to source stream listener
-     *
-     * @return CMMASourceStream object
-     */
-    static CMMASourceStream* NewL(JNIEnv* aJNIEnv,
-                                  MMMAEventPoster* aEventPoster,
-                                  jobject aJavaSourceStream,
-                                  MMMASourceStreamListener* aListener);
-
-    /**
-     * The same as NewL with cleanup stack
-     * @see NewL
-     */
-    static CMMASourceStream* NewLC(JNIEnv* aJNIEnv,
-                                   MMMAEventPoster* aEventPoster,
-                                   jobject aJavaSourceStream,
-                                   MMMASourceStreamListener* aListener);
-
-    /**
-     * Deletes owned objects
-     */
-    ~CMMASourceStream(); // Destructor
-
-protected:  // Constructors and destructors
-
-    /**
-     * Set variables
-     * @param aEventPoster handle to event poster
-     * @param aListener    handle to source stream listener
-     */
-    CMMASourceStream(MMMAEventPoster* aEventPoster,
-                     MMMASourceStreamListener* aListener);
-
-    /**
-     * 2nd phase constructor
-     *
-     * @param aJNIEnv           used jni environment
-     * @param aJavaSourceStream handle to java source stream object
-     */
-    void ConstructL(JNIEnv* aJNIEnv, jobject aJavaSourceStream);
-
-public:     // New methods
-    /**
-     * Writes data to from java buffer to native side
-     *
-     * @param aData   data passed by Java side
-     * @param aLength size of passed data
-     * @param state of this class
-     */
-    virtual void WriteL(const TUint8* aData,
-                        TInt aLength, TInt aState);
-    /**
-     * Read aLength bytes from Java source stream
-     *
-     * @param aLength size of read
-     */
-    void ReadL(TInt aLength);
-
-    /**
-     * Read all data from Java source stream, clears buffer
-     */
-    void ReadAllL();
-
-    /**
-     * Reset all data
-     */
-    virtual void ResetData();
-
-    /**
-     * Creates data buffer
-     *
-     * @param aBufferSize data buffer size
-     */
-    void CreateDataBufferL(TInt aBufferSize);
-
-
-protected:  // New methods
-
-    /**
-     * Prepare whatever is necessary for reading
-     */
-    virtual void PrepareReadL();
-
-protected:
-    CMMASourceStreamEvent* iReadEvent;
-    MMMAEventPoster* iEventPoster;
-    MMMASourceStreamListener* iListener;
-
-protected:
-    /**
-     * Buffer where data from java side will be read, Owned
-     */
-    HBufC8* iData;
-
-    /**
-     * number of bytes coming from java stream, KMMAReadAllData is whole stream
-     */
-    TInt iReadLength;
-
-    /**
-     * current position
-     */
-    TInt iBufferPosition;
-};
-
-#endif // CMMASOURCESTREAM_H
--- a/javauis/mmapi_qt/baseline/inc/cmmasourcestreamevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-#ifndef CMMASOURCESTREAMEVENT_H
-#define CMMASOURCESTREAMEVENT_H
-
-//  INCLUDES
-#include "cmmaevent.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMASourceStreamEvent): public CMMAEvent
-{
-public:
-    CMMASourceStreamEvent(jmethodID aHandleEventMethod,
-    jobject aNotifyObject);
-
-    // length of the requested source stream data
-    void SetLength(TInt aLength);
-
-private: // from CJavaEvent
-    void Dispatch(JNIEnv& aJni);
-
-private:
-    jmethodID iHandleEventMethod;
-    jobject iListenerObject;
-    TInt iLength;
-};
-
-#endif // CMMASOURCESTREAMEVENT_H
--- a/javauis/mmapi_qt/baseline/inc/cmmastoptimecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling
-*
-*/
-
-
-#ifndef CMMASTOPTIMECONTROL_H
-#define CMMASTOPTIMECONTROL_H
-
-//  INCLUDES
-#include "cmmacontrol.h"
-#include "mmmaplayerstatelistener.h"
-
-class CMMAPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for stoptime controlling
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAStopTimeControl): public CMMAControl, MMMAPlayerStateListener
-{
-protected:
-    /**
-     * Protected class for timing.
-     */
-    class CStopTimer : public CTimer
-    {
-    public:
-        static CStopTimer* NewL(CMMAStopTimeControl* aControl);
-
-    private:
-        CStopTimer(CMMAStopTimeControl* aControl);
-        void ConstructL();
-
-    public: // From CTimer
-        void RunL();
-
-    protected:
-        CMMAStopTimeControl* iControl;
-    };
-
-public:
-    static CMMAStopTimeControl* NewL(CMMAPlayer* aPlayer);
-    ~CMMAStopTimeControl();
-
-protected:
-    CMMAStopTimeControl(CMMAPlayer* aPlayer);
-    void ConstructL();
-
-public: // new methods
-    static void StaticGetStopTime(CMMAStopTimeControl* aControl,
-                                  TInt64* aTime);
-    static void StaticSetStopTimeL(CMMAStopTimeControl* aControl,
-                                   TInt64* aTime);
-    virtual void StopAtTimeL();
-
-protected:
-    virtual void GetStopTime(TInt64& aTime);
-    virtual void SetStopTimeL(const TInt64& aTime);
-    virtual void StartTimer(const TInt64& aTime);
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-public: // From MMMAPlayerStateListener
-    void StateChanged(TInt aState);
-
-protected:
-    CMMAPlayer* iPlayer;
-    TInt64 iStopTime;   // Stop time in microseconds
-    const TInt64 iNoTimer;
-
-private:
-    CStopTimer* iTimer;
-
-};
-
-#endif // CMMASTOPTIMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideocontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a VideoControl.
-*
-*/
-
-
-#ifndef CMMAVIDEOCONTROL_H
-#define CMMAVIDEOCONTROL_H
-
-//  INCLUDES
-#include "cmmacontrol.h"
-#include "mmmasnapshotreadycallback.h"
-
-// mobitv fix  // 3.x QT based UI
-//#include "CMIDToolkit.h"
-//#include "lcdui.h"
-// FORWARD DECLARATIONS
-class MMIDComponent;
-class MMMAEventPoster;
-class MMMAGuiPlayer;
-class MMMADisplay;
-class CMMASnapshot;
-class MMAFunctionServer;
-class CMMAEvent;
-
-//  CLASS DECLARATION
-/**
-*   This class is native side of the VideoControl java object.
-*
-*
-*/
-class CMMAVideoControl :
-        public CMMAControl,
-        public MMMASnapshotReadyCallback/*,    // 3.x QT based UI
-        public MMIDEnvObserver*/
-{
-public:
-    /**
-     * @param aGuiPlayer Player that will be used.
-     */
-    IMPORT_C CMMAVideoControl(MMMAGuiPlayer* aGuiPlayer);
-
-    /**
-     * Deletes owned objects and removes global reference to
-     * associated displayable object.
-     */
-    IMPORT_C ~CMMAVideoControl();
-
-    /**
-     * Finishes video control construction. This construction step
-     * must be called from JNI, because JNIEnv is needed to create
-     * callback methods to Java side.
-     *
-     * @param aVideoControl Used video control.
-     * @param aControlObject Corresponding Java object.
-     * @param aJni JNI environment used.
-     * @param aEventPoster Used to post repaint and
-     *                     snapshot ready events.
-     */
-    static void ConstructL(CMMAVideoControl* aVideoControl,
-                           jobject aControlObject,
-                           MMAFunctionServer* aEventSource,
-                           JNIEnv* aJni,
-                           MMMAEventPoster* aEventPoster/*,
-                           CMIDToolkit* aToolkit*/); // mobitv fix // 3.x QT based UI
-
-public: // New methods
-    /**
-     * Initializes display. Called when java display mode is initialized.
-     * Created MMMADisplay object and sets it to associated gui player.
-     *
-     * @param aVideoControl Used video control.
-     * @param aComponent Component that will be used to create display.
-     * @param aDisplayHandle Java handle to created display will be set to
-     *                       this variable. Still owned by video control.
-     * @param aDeleteRefEvent Event posted in the destructor.
-     */
-    static void StaticInitL(CMMAVideoControl* aVideoControl,
-                            jobject javaDisplayObject,
-                            MMAFunctionServer* aEventSource,
-                            TInt* aDisplayHandle,
-                            CMMAEvent* aDeleteRefEvent);
-
-    /**
-     * Dynamic display mode initialization.
-     * @see StaticInitL
-     * @param aVideoControl Used video control.
-     * @param aContentHandle Will contain handle to MMMADirectContent
-     * @param aDeleteRefEvent Event posted in the destructor.
-     */
-    static void StaticInitDynamicModeL(CMMAVideoControl* aVideoControl,
-                                       TInt* aContentHandle,
-                                       MMAFunctionServer* aEventSource,
-                                       jobject aGUIObject,
-                                       CMMAEvent* aDeleteRefEvent);
-
-
-    /**
-     * Gets property according to property type.
-     *
-     * @param aControl Used video control.
-     * @param aPropertyType Type defined in Java header.
-     * @param aReturnValue Property value will be set to this parameter.
-     */
-    static void StaticGetPropertyL(CMMAVideoControl* aControl,
-                                   TInt aPropertyType,
-                                   TInt* aReturnValue);
-
-    /**
-     * Sets property that is defined by type. Amount of propery
-     * parameters used depends on property type.
-     *
-     * @param aControl Used video control.
-     * @param aPropertyType Type defined in Java header.
-     * @param aPropertyA First value.
-     * @param aPropertyB Second value.
-     */
-    static void StaticSetPropertyL(CMMAVideoControl* aControl,
-                                   TInt aPropertyType,
-                                   TInt aPropertyA,
-                                   TInt aPropertyB);
-
-    /**
-     * Takes snapshot from the associated gui player. When ready
-     * Java side will be informed with iSnapshotReadyMethod.
-     *
-     * @param aControl Used video control.
-     * @param aProperties Properties used to create snapshot.
-     */
-    static void TakeSnapShotL(CMMAVideoControl* aControl,
-                              const TDesC* aProperties);
-    static void StaticSetForegroundL(CMMAVideoControl* aControl,
-                                     TInt aForeground) ;
-
-public: // From MMMASnapshotReadyCallback
-    IMPORT_C void SnapshotReady();
-
-public: // From CMMAControl
-    IMPORT_C const TDesC& ClassName() const;
-public:
-    TBool IsForeground();
-    void SetDisplayHandleToJavaPeer(MMAFunctionServer* eventSource ,jobject javaVideoControlPeer);
-
-protected:
-	// 3.x QT based UI
-  //  void RegisterForegroundListenerL(CMIDToolkit* aToolkit); // mobitv fix
-
-//public: // from MMIDEnvObserver
-
-   // void HandleSwitchOnL(TBool /*aSwitchOn*/);
-
-    //Handles the case when the MIDlet is brought to the foreground.
- //   void HandleForegroundL(TBool /*aForeground*/);
-
-    // Handles a change to resources which are shared accross the environment.
-//    void HandleResourceChangeL(TInt /*aType*/);
-
-private:
-
-    void SetForeground(TBool aForeground, TBool aUseEventServer);
-
-protected:
-    /**
-     * Not owned.
-     */
-    MMMAEventPoster* iEventPoster;
-
-    /**
-     * Not owned.
-     */
-    MMMAGuiPlayer* iGuiPlayer;
-
-    /**
-     * Not owned.
-     */
-    JNIEnv* iJni;
-
-    /**
-     * Owned object. Used to control displayable object.
-     */
-    MMMADisplay* iDisplay;
-
-    /**
-     * Owned object. Created when snapshot is taken and destroyed
-     * when snapshot is ready. Destroyed also in destuctor if control is
-     * destroyed when taking snapshot.
-     */
-    CMMASnapshot* iSnapshot;
-
-    /**
-     * Java video control object.
-     */
-    jobject iListenerObject;
-
-    /**
-     * Used inform Java side when snapshot is ready or error occures.
-     */
-    jmethodID iSnapshotReadyMethod;
-
-    /**
-     * Owned object. Not created by the class.
-     * Event is used to destroy reference to associated displayable object,
-     * when video control is destroyed.
-     */
-    CMMAEvent* iDeleteRefEvent;
-
-    /**
-     * When video display is set to full screen mode, old
-     * video position & size is stored to this member. When
-     * full screen mode is turned off, this member is used to
-     * find out if display size has been changed during full
-     * screen mode. This is needed to generate a SIZE_CHANGED
-     * event.
-     */
-    TSize iOldDisplaySize;
-    // mobitv fix
-    //CMIDToolkit* iToolkit;
-   // MMIDEnv* iMidEnv;
-    TBool iIsForeground;
-
-};
-
-#endif // CMMAVIDEOCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideoframepositioningcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements FramePositioningControl for video player
-*
-*/
-
-
-#ifndef CMMAVIDEOFRAMEPOSITIONINGCONTROL_H
-#define CMMAVIDEOFRAMEPOSITIONINGCONTROL_H
-
-//  INTERNAL INCLUDES
-#include "cmmavideoplayer.h"
-#include "cmmaframepositioningcontrol.h" // base class
-
-// CONSTANTS
-
-//  CLASS DECLARATION
-/**
-*   This class implements FramePositioningControl for video player
-*/
-NONSHARABLE_CLASS(CMMAVideoFramePositioningControl) :
-        public CMMAFramePositioningControl
-{
-public:
-    static CMMAVideoFramePositioningControl* NewL(CMMAVideoPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMAVideoFramePositioningControl();
-
-protected:
-    /**
-     * Constructor.
-     */
-    CMMAVideoFramePositioningControl(CMMAVideoPlayer* aPlayer);
-
-public: // From CMMAFramePositioningControl
-    TInt SeekL(TInt aFrameNumber);
-    TInt SkipL(TInt aFramesToSkip);
-    void MapFrameToTimeL(TInt aFrameNumber, TInt64* aMediaTime);
-    TInt MapTimeToFrameL(TInt64* aMediaTime);
-
-private: // New methods
-    /**
-     * Get framerate of video and check that it is > 0 .
-     */
-    void GetAndCheckFrameRateL(TReal32& aFrameRate);
-
-private:
-    CMMAVideoPlayer* iPlayer;
-
-};
-
-
-#endif // CMMAVIDEOFRAMEPOSITIONINGCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideoplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating video player.
-*
-*/
-
-
-#ifndef CMMAVIDEOPLAYERFACTORY_H
-#define CMMAVIDEOPLAYERFACTORY_H
-
-//  INCLUDES
-#include "cmmammfplayerfactory.h"
-// CONSTANTS
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating video player.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAVideoPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAVideoPlayerFactory* NewLC();
-    ~CMMAVideoPlayerFactory();
-
-private: // Constructor
-    CMMAVideoPlayerFactory();
-
-public: // New methods
-
-#ifdef RD_JAVA_OMA_DRM_V2
-    CMMAPlayer* CreatePlayerWithFileL(const TDesC& aContentType,
-                                      const TDesC* aFileName);
-#endif // RD_JAVA_OMA_DRM_V2
-
-public: // From CMMAMMFPlayerFactory
-
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-
-
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-private: //data
-#ifdef RD_JAVA_OMA_DRM_V2
-    const TDesC* iFileName;
-#endif // RD_JAVA_OMA_DRM_V2
-};
-
-#endif // CMMAVIDEOPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideorecordcontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a RecordControl.
-*
-*/
-
-
-#ifndef CMMAVIDEORECORDCONTROL_H
-#define CMMAVIDEORECORDCONTROL_H
-
-// EXTERNAL INCLUDES
-#include <videorecorder.h>
-
-//  INTERNAL INCLUDES
-#include "cmmarecordcontrol.h"
-#include "tmmaparametervalidator.h"
-
-// FORWARD DECLARATIONS
-class CMMAPlayer;
-class CMMAPlayerProperties;
-class CMMAMMFResolver;
-
-//  CLASS DECLARATION
-/**
-*   This class implements RecordControl interface for camera player.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMAVideoRecordControl): public CMMARecordControl,
-        public MVideoRecorderUtilityObserver
-{
-
-public:
-    /**
-     * Creates new CMMAVideoRecordControl.
-     *
-     * @param aPlayer Player that controls the camera.
-     * @param aProperties Properties given in java player creation.
-     * @param aCameraHandle Handle to a camera, which is used as a source.
-     */
-    static CMMAVideoRecordControl* NewL(CMMAPlayer* aPlayer,
-    CMMAMMFResolver* aResolver,
-    const TMMAVideoSettings& aVideoSettings,
-    CMMAAudioSettings* aAudioSettings,
-    TInt aCameraHandle);
-protected:
-    CMMAVideoRecordControl(CMMAPlayer* aPlayer,
-                           TInt aCameraHandle);
-    ~CMMAVideoRecordControl();
-
-    /**
-     * Initializes this control.
-     * @param aProperties Properties given in java player creation.
-     */
-    void ConstructL(RMMFControllerImplInfoArray& aRMMFControllerInfos,
-                    const TMMAVideoSettings& aVideoSettings,
-                    CMMAAudioSettings* aAudioSettings);
-
-public: // From CMMARecordControl
-    void InitializeL();
-    void DoStartRecordL();
-    void DoStopRecordL();
-    void DoResetL();
-    TInt SetRecordSizeLimitL(TInt aSize);
-
-public: // From MVideoRecorderUtilityObserver
-    /**
-     * Notification to the client that the opening of the video clip has completed,
-     * successfully, or otherwise
-     *
-     * @param   "aError"
-     *          The status of the video recorder after initialisation.
-     *          This is either KErrNone if the open has completed successfully,
-     *          or one of the system wide error codes
-     */
-    void MvruoOpenComplete(TInt aError);
-
-    /**
-     * Notification that video recorder is ready to begin recording. This callback
-     * is generated in response to a call to Prepare.
-     *
-     * @param   "aError"
-     *          This is either KErrNone if the video recorder has been prepared for
-     *          recording successfully, or one of the system wide error codes
-     */
-    void MvruoPrepareComplete(TInt aError);
-
-    /**
-     * Notification that video recording has completed. This is not called if
-     * recording is explicitly stopped by calling Stop.
-     *
-     * @param   "aError"
-     *          This is either KErrNone if recording was completed successfully,
-     *          or one of the system wide error codes
-     */
-    void MvruoRecordComplete(TInt aError);
-
-    /**
-     * General event notification from controller. These events are specified by
-     * the supplier of the controller
-     *
-     * @param   "aEvent"
-     *          The event sent by the controller
-     */
-    void MvruoEvent(const TMMFEvent& aEvent);
-
-private: // New methods
-
-    /**
-     * Actually sets record size limit
-     * Will set local member to KNoUserDefinedRecordSize (-1)
-     * @param aSize New record size limit
-     */
-    void DoSetRecordSizeLimitL(TInt aSize);
-
-private: // Data
-    TInt iCameraHandle; // camera that is used as an image source
-
-    // Actual recording utility, owned
-    CVideoRecorderUtility* iRecorder;
-
-    CActiveSchedulerWait* iActiveSchedulerWait;
-
-    /**
-     * Global error code, used for getting error codes from callbacks
-     */
-    TInt iError;
-
-    /**
-     * Record size limit, will be KNoUserDefinedRecordSize (-1) when
-     * user has not set limits
-     */
-    TInt iRecordSizeLimit;
-
-    TMMAVideoSettings iVideoSettings; // Video settings
-
-};
-
-
-#endif // CMMAVIDEORECORDCONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideourlplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing URL videos
-*
-*/
-
-
-#ifndef CMMAVIDEOURLPLAYER_H
-#define CMMAVIDEOURLPLAYER_H
-
-
-//  INCLUDES
-#include "cmmavideoplayer.h"
-#include "mmmaguiplayer.h"
-#include <es_sock.h>
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing video.
-*
-*
-*/
-
-class CMMAVideoUrlPlayer: public CMMAVideoPlayer
-{
-protected:
-    /**
-     * Protected abstract base class for url player delegates.
-     */
-    class CMMAVideoUrlPlayerDelegate : public CBase
-    {
-    public:
-        virtual ~CMMAVideoUrlPlayerDelegate();
-
-    protected:
-        /**
-         * C++ constructor
-         */
-        CMMAVideoUrlPlayerDelegate(CMMAVideoUrlPlayer& aPlayer);
-
-    public:
-        /**
-         * Handles StartL call for url player.
-         */
-        virtual void StartL() = 0;
-
-        /**
-         * Handles StopL call for url player.
-         *
-         * @param aPostEvent post event to Java side
-         */
-        virtual void StopL(TBool aPostEvent) = 0;
-
-        /**
-         * Gets media time for url player.
-         *
-         * @param aMediaTime When method returns parameter contains the media
-         * time.
-         */
-        virtual void GetMediaTime(TInt64* aMediaTime) = 0;
-
-        /**
-         * Handles events for url player.
-         *
-         * @param aEvent event type
-         */
-        virtual void HandleEvent(const TMMFEvent& aEvent) = 0;
-
-    protected: // data
-        CMMAVideoUrlPlayer& iPlayer;
-    };
-
-    /**
-     * Delegate class for non-live video streams
-     */
-    class CMMAVideoUrlPlayerClipStreamDelegate :
-            public CMMAVideoUrlPlayerDelegate
-    {
-    public:
-        CMMAVideoUrlPlayerClipStreamDelegate(CMMAVideoUrlPlayer& aPlayer);
-        virtual ~CMMAVideoUrlPlayerClipStreamDelegate();
-
-    public: // from CMMAVideoUrlPlayerDelegate
-        void StartL();
-        void StopL(TBool aPostEvent);
-        void GetMediaTime(TInt64* aMediaTime);
-        void HandleEvent(const TMMFEvent& aEvent);
-    };
-
-    /**
-     * Delegate class for live video streams
-     */
-    class CMMAVideoUrlPlayerLiveStreamDelegate :
-            public CMMAVideoUrlPlayerDelegate
-    {
-    public:
-        static CMMAVideoUrlPlayerLiveStreamDelegate*
-        NewL(CMMAVideoUrlPlayer& aPlayer);
-
-        virtual ~CMMAVideoUrlPlayerLiveStreamDelegate();
-
-    protected:
-        CMMAVideoUrlPlayerLiveStreamDelegate(CMMAVideoUrlPlayer& aPlayer);
-        void ConstructL();
-
-    public: // from CMMAVideoUrlPlayerDelegate
-        void StartL();
-        void StopL(TBool aPostEvent);
-        void GetMediaTime(TInt64* aMediaTime);
-        void HandleEvent(const TMMFEvent& aEvent);
-
-    private: // data
-        CActiveSchedulerWait* iActiveSchedulerWait;
-
-        /**
-         * RTSP live stream returns current media time
-         * from the server, but local media time must
-         * start from zero. Thus start media time is
-         * cached here.
-         */
-        TInt64 iMediaStartTime;
-
-        /**
-         * Hold player stop time value. It is otherwise
-         * forgotten when player is stopped.
-         */
-        TInt64 iStoppedAtTime;
-    };
-
-public: // Construction
-    static CMMAVideoUrlPlayer* NewLC(
-        CMMAMMFResolver* aResolver,
-        const TDesC& aUrl);
-
-    //   Destructor
-    IMPORT_C ~CMMAVideoUrlPlayer();
-
-protected:
-    //   C++ constructor
-    IMPORT_C CMMAVideoUrlPlayer(CMMAMMFResolver* aResolver);
-    IMPORT_C void ConstructL(const TDesC& aUrl);
-
-public: // from CMMAPlayer
-    IMPORT_C void RealizeL();
-    IMPORT_C void PrefetchL();
-    IMPORT_C void StartL();
-    IMPORT_C void StopL(TBool aPostEvent);
-    IMPORT_C void GetMediaTime(TInt64* aMediaTime);
-    IMPORT_C void DeallocateL();
-    IMPORT_C void CloseL();
-
-protected: // New Methods
-    void FindActiveIap(const TUint aConnectionCount, TUint& aActiveIap);
-    virtual TBool IsLiveStreamL();
-
-    /**
-     * Handles events from delegate classes to
-     * superclass HandleEvent.
-     *
-     * @param aEvent event data
-     */
-    void HandleEventToParent(const TMMFEvent& aEvent);
-
-protected: // From CMMAVideoPlayer
-    IMPORT_C void HandleEvent(const TMMFEvent& aEvent);
-
-protected: // Data
-    HBufC* iUrl; // Owned url
-    RConnection iConnection;
-    RSocketServ iSocketServ;
-    TThreadPriority iOrigPriority;
-    CMMAVideoUrlPlayerDelegate* iPlayerDelegate;
-};
-
-#endif // CMMAVIDEOURLPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavideourlplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating video player.
-*
-*/
-
-
-#ifndef CMMAVIDEOURLPLAYERFACTORY_H
-#define CMMAVIDEOURLPLAYERFACTORY_H
-
-//  INCLUDES
-#include "cmmammfplayerfactory.h"
-// CONSTANTS
-
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating URL video players
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAVideoUrlPlayerFactory): public CMMAMMFPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMAVideoUrlPlayerFactory* NewLC();
-    ~CMMAVideoUrlPlayerFactory();
-
-private: // Constructor
-    CMMAVideoUrlPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-public: // From CMMAMMFPlayerFactory
-    CMMAPlayer* CreatePlayerL(
-        CMMAMMFResolver* aResolver);
-
-
-    void MediaIdsL(RArray<TUid>& aMediaIds);
-
-    CMMFPluginSelectionParameters::TMediaIdMatchType
-    MediaIdMatchType();
-
-private: // Data
-    HBufC* iUrl; // owned url
-};
-
-#endif // CMMAVIDEOURLPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/cmmavolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for volume setting
-*
-*/
-
-
-#ifndef CMMAVOLUMECONTROL_H
-#define CMMAVOLUMECONTROL_H
-
-//  INCLUDES
-#include "cmmacontrol.h"
-#include "mmmaplayerstatelistener.h"
-
-// CONSTANS
-_LIT(KMMAVolumeControlName, "VolumeControl");
-const TInt KMMAVolumeMaxLevel = 100;
-
-class CMMAPlayer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for volume setting
-*
-*
-*/
-
-class CMMAVolumeControl : public CMMAControl,
-        public MMMAPlayerStateListener
-{
-public:
-    static void StaticSetLevelL(CMMAVolumeControl* aVolumeControl,
-                                TInt aLevel);
-    static void StaticGetLevelL(CMMAVolumeControl* aVolumeControl,
-                                TInt* aLevel);
-
-    ~CMMAVolumeControl();
-
-protected:
-    CMMAVolumeControl(CMMAPlayer* aPlayer);
-    void ConstructBaseL();
-
-    /**
-     * Sets the level to player.
-     * @param aLevel Sound level to set.
-     */
-    virtual void DoSetLevelL(TInt aLevel) = 0;
-
-    /**
-     * Get volume level from player.
-     * @return Current level.
-     */
-    virtual TInt DoGetLevelL() = 0;
-
-public: // From CMMAControl
-    const TDesC& ClassName() const;
-
-    /**
-     * Refresh volume control.
-     */
-    void RefreshControl();
-
-public: // From MMMAPlayerStateListener
-    void StateChanged(TInt aState);
-
-
-public: // New methods
-    /**
-     * Adds new volume level to volume control. Actual volume level will
-     * be calculated using all levels added to the control.
-     * @return Index for new level.
-     */
-    IMPORT_C TInt AddLevelL();
-
-    /**
-     * Sets new volume level for certain level index. After level is set
-     * new actual level is calculated and commited to player in derived
-     * class.
-     * @param aLevelIndex Level's index
-     * @param aVolumeLevel New volume level for level index. Level must be
-     * between 0 and 100.
-     */
-    IMPORT_C void SetVolumeLevelL(TInt aLevelIndex,
-                                  TInt aVolumeLevel);
-    void GetVolumeLevelL(TInt aLevelIndex,
-                         TInt* aVolumeLevel);
-
-
-
-private: // New methods
-
-    /**
-     * Refresh volume level, basically set the volume level again.
-     */
-    void RefreshVolume();
-
-    /**
-     * Sets level if player is started and sends java event level
-     * changed.
-     * @param aLevel Sound level to set.
-     */
-    void SetLevelL(TInt aLevel);
-
-    /**
-     * Calculates new overall level using all values in iLevels array.
-     * @return Current level.
-     */
-    TInt CalculateLevel();
-protected: // data
-    CMMAPlayer* iPlayer;
-
-    // Previous level setted to player. Used to check if level is changed.
-    TInt iLevel;
-
-    // Array containing all levels.
-    RArray< TInt > iLevels;
-
-};
-
-#endif // CMMAVOLUMECONTROL_H
--- a/javauis/mmapi_qt/baseline/inc/mmafunctionserver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class provides CJavaEventSource services
-*
-*/
-
-
-#ifndef CMMAEVENTSOURCE_H
-#define CMMAEVENTSOURCE_H
-
-//  INCLUDES
-#include "mmmaeventposter.h"
-//#include <jutils.h>
-#include "functionserver.h"
-#include "legacyeventserverwrapper.h"
-#include <logger.h>
-// FORWARD DECLARATIONS
-class CApaWindowGroupName;
-class CMMAPlayer;
-class MMMAPlayerInstanceObserver;
-#ifdef RD_JAVA_VOLUME_CONTROL
-class CMMAGlobalVolume;
-#endif // RD_JAVA_VOLUME_CONTROL
-
-//  CLASS DECLARATION
-/**
-*   This class provides CJavaEventSource services.
-*
-*
-*/
-
-class MMAFunctionServer : public java::util::FunctionServer,public LegacyEventServerWrapper,
-        public MMMAEventPoster
-{
-public:
-    /**
-     * Default constructor.
-     */
-    MMAFunctionServer(JNIEnv& aJni, jobject aPeer);
-
-    /**
-     * Destructor.
-     */
-    ~MMAFunctionServer();
-
-public: // From CJavaEventSource, construction
-    /**
-     * Normal construction, Invoked from base class.
-     * Method is defined in the base class.
-     */
-    void ConstructL(JNIEnv& aJni,
-                    jobject aPeer
-                    );
-
-    /**
-     * Server side construction.
-     */
-    void ConstructSvrL();
-    static TInt NewL(JNIEnv& aJni, jobject aPeer);
-    
-		void Dispose();
-    
-    TBool IsDisposed() const
-    {
-        return iDisposed;
-    }    
-
-public: // new methods
-    /**
-     * Adds object to cleanup. Added objects are deleted when event source
-     * is deleted.
-     *
-     * @param aEventSource Event source to use.
-     * @param aHandle Java handle to CBase object
-     */
-    IMPORT_C static void StaticAddObjectFromHandleL(MMAFunctionServer* aEventSource,
-            TInt aHandle);
-
-    /**
-     * Adds player object to cleanup. Added objects are deleted when event
-     * source is deleted. An object added to the event source must be
-     * deleted with DisposePlayer method.
-     *
-     * @param aEventSource Event source to use.
-     * @param aHandle Java handle to CBase object
-     */
-    void AddPlayerL(CMMAPlayer* aPlayer);
-
-    /**
-     * Removes player from array and deletes it.
-     *
-     * @param aPlayer Player to be deleted.
-     */
-    void DisposePlayer(CMMAPlayer* aPlayer);
-
-    /**
-     * Sets player instance observer.
-     * @param aObserver Will be informed when player is created or deleted.
-     */
-    IMPORT_C void SetPlayerInstanceObserver(MMMAPlayerInstanceObserver* aObserver);
-
-    /**
-     * Return reference to the array containing all players.
-     * @return All players
-     */
-    IMPORT_C RPointerArray< CMMAPlayer >& Players();
-
-    /**
-     * Realeases resources.
-     */
-    void Release();
-
-    /**
-     * Returns player pointer for java player handle if the native player
-     * peer exists. Otherwise returns null.
-     * @param aPlayerHandle Java side player handle integer
-     * @param CMMAPlayer* player pointer
-     */
-    CMMAPlayer* FindPlayer(TInt aPlayerHandle);
-
-    /**
-     * Sets MMA global volume handler
-     * @param aGlobalVolume Global volume handler. The onwership is
-     *        transferred to this class
-     */
-#ifdef RD_JAVA_VOLUME_CONTROL
-    void SetGlobalVolume(CMMAGlobalVolume* aGlobalVolume);
-#endif // RD_JAVA_VOLUME_CONTROL
-
-		 java::util::FunctionServer* getFunctionServer() const;
-		 
-		 JNIEnv* getValidJniEnv();
-    	 jobject getPeer();
-private:
-    /**
-     * @see StaticAddObjectFromHandleL
-     * @param aHandle Java handle to CBase object
-     */
-    void AddObjectFromHandleL(TInt aHandle);
-
-private: // from CJavaEventSource
-    void FinalizeSvr();
-
-public: // MMMAEventPoster
-    void PostEvent(CMMAEvent* aEvent, TInt aPriority);
-
-private:
-    bool mVmAttached;
-    java::util::FunctionServer* iServer;
-private:
-    /**
-     * Objects added with StaticAddObjectFromHandleL. Will be destroyed
-     * in server finalization.
-     */
-    RPointerArray< CBase > iObjects;
-
-    // Owned array of players.
-    RPointerArray< CMMAPlayer > iPlayers;
-
-    /**
-     * MMA needs ui framework. Window group must be hidden from the
-     * user.
-     */
-    CApaWindowGroupName*    iWgName;
-
-    /**
-     * Used to check if session was connected in the constructor.
-     */
-    TBool iFbsSessionConnected;
-    TBool iDisposed;
-
-    // Not owned. Will be informed if it is set.
-    MMMAPlayerInstanceObserver* iInstanceObserver;
-
-    JavaVM* iJavaVM;
-
-    // Global volume handler. Owned
-#ifdef RD_JAVA_VOLUME_CONTROL
-    CMMAGlobalVolume* iGlobalVolume;
-#endif // RD_JAVA_VOLUME_CONTROL
-};
-
-#endif // CMMAEVENTSOURCE_H
--- a/javauis/mmapi_qt/baseline/inc/mmmacontainer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MMMACONTAINER_H
-#define MMMACONTAINER_H
-
-class MMMADirectContent;
-class MUiEventConsumer;
-
-/**
-A container on which content can be displayed.
-Content can be drawn to container using direct screen access or frame buffer
-mode.
-*/
-class MMMAContainer
-{
-public:
-    /**
-    Remove the content. This will called when the Player is closed.
-    */
-    virtual void MdcRemoveContent() = 0;
-
-    /**
-    Get the visiblity of the container. The content must not be displayed
-    when it's container is invisible.
-    If this changes MdcContainerVisibilityChanged should be called.
-    @returns "aVisible" ETrue if the container is visible, EFalse if it is invisible.
-    */
-    virtual TBool MdcContainerVisibility() const = 0;
-
-    /**
-    Repaint frame buffer to screen.
-    */
-    virtual void MdcRepaint() const = 0;
-
-    /**
-    Get the bounds of the area that the content can occupy.
-    The content should be clipped to this area.
-    @param aContentRect Maximum area the content can occupy in screen co-ordinates.
-    @param aParentRect Visible part of the parent in screen co-ordinates.
-    */
-    virtual void MdcGetContentRect(TRect& aControlRect,
-                                   TRect& aParentRect) const = 0;
-
-    /**
-    This method is called when content knows its preferred size. This method
-    will be called for example when video content obtains its size. Container
-    must inform new content rect using content's MdcContentBoundsChanged method.
-    @param aPreferredSize preferred size for the content.
-    */
-    virtual void MdcInvalidate(const TSize& aPreferredSize) = 0;
-
-    /**
-    Set the size of the render region for the video clip to be fullscreen.
-    After this call MESWTDirectContent must be informed about new draw area.
-    @param aFullScreen Indicates whether or not to render in full screen mode
-    */
-    virtual void MdcSetDisplayFullScreen(TBool aFullScreen) = 0;
-
-    /**
-     * Invokes callback aConsumer->MdcDSAResourcesCallback in UI thread.
-     * Used in case when MMAPI needs to start DSA within UI thread.
-     *
-     * @since  S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aIsInUiThread" Notifies that the method runs in UI thread
-     */
-    virtual void MdcGetDSAResources(
-        MUiEventConsumer& aConsumer,
-        TBool aIsInUiThread) = 0;
-
-    /**
-     * Invokes callback aConsumer->MdcUICallback in UI thread.
-     * Used in case when MMAPI needs to run some operation within UI thread.
-     *
-     * @since  S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aCallbackId" A number identifying the callback
-     */
-    virtual void MdcGetUICallback(
-        MUiEventConsumer& aConsumer,
-        const TInt aCallbackId) = 0;
-
-    /**
-    * Get the bounds of the content window.
-    *
-    * @returns The rect of the content window in screen co-ordinates.
-    */
-    virtual TRect MdcContainerWindowRect() const = 0;
-};
-
-
-#endif // MMMACONTAINER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmadirectcontent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MMMADIRECTCONTENT_H
-#define MMMADIRECTCONTENT_H
-
-class MMMAContainer;
-
-/**
- * Content, such as a video clip or camera view finder, which is displayed on
- * a container.
- */
-class MMMADirectContent
-{
-public:
-    /**
-     * Notify content that container visiblity has changed. The content must not
-     * be displayed when it's container is invisible.
-     * @param "aVisible" ETrue if the container is visible, EFalse if it is invisible.
-     */
-    virtual void MdcContainerVisibilityChanged(TBool aVisible) = 0;
-
-    /**
-     * Notify content that content rect is changed.
-     * @param aContentRect Maximum area the content can occupy in screen
-     * co-ordinates.
-     * @param aParentRect area that can be used to draw content in screen
-     * co-ordinates.
-     */
-    virtual void MdcContentRectChanged(const TRect& aContentRect,
-                                       const TRect& aParentRect) = 0;
-
-    /**
-     * Notify content that container is about to be destoryed.
-     */
-    virtual void MdcContainerDestroyed() = 0;
-
-    /**
-     * Sets new container for content. Content may not support changing
-     * container.
-     * @parma aContainer New container for content
-     */
-    virtual void MdcSetContainer(MMMAContainer* aContainer) = 0;
-
-    /**
-     * This is used in bitmap mode. DSA mode content return allways NULL.
-     * @return Bitmap to draw or NULL if not available.
-     */
-    virtual CFbsBitmap* MdcFrameBuffer() const = 0;
-
-    /**
-     * This is used get preferred size when container need content size
-     * @return source size which preferred size for container
-     */
-    virtual TSize MdcSourceSize() = 0;
-
-    /**
-     * Notify content that the rect of a window has changed.
-     *
-     * @param aRect New rect of a window.
-     */
-    virtual void MdcContainerWindowRectChanged(const TRect& aRect) = 0;
-};
-
-#endif // MMMADIRECTCONTENT_H
--- a/javauis/mmapi_qt/baseline/inc/mmmadisplay.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* 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"
-* 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:  Interface for displays, which can show images.
-*
-*/
-
-
-#ifndef MMMADISPLAY_H
-#define MMMADISPLAY_H
-
-#include "jni.h"
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class MMMADisplayWindow;
-class MUiEventConsumer;
-class MMMAGuiPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-
-    Interface for displays, which can show images. Display properties
-    can be changed through this interface.
-
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(MMMADisplay)
-{
-public:
-    /**
-      * Describes the currently running thread type.
-      */
-    enum TThreadType
-    {
-        EMmaThread = 0, // MMAPI thread
-        EUiThread  = 1  // UI thread (LCDUI or ESWT)
-    };
-
-    /**
-     * Display can be deleted through this interface.
-     */
-    virtual ~MMMADisplay()
-    {
-    };
-
-    /**
-     * Draws bitmap. Implementation may ignore <code>aBitmap</code>
-     * parameter and implements own drawing procedure. This method must also redraw
-     * the display if needed.
-     *
-     * @param aBitmap Bitmap to be drawn.
-     */
-    virtual void DrawFrameL(const CFbsBitmap* aBitmap) = 0;
-
-    /**
-     * Getter for display's size.
-     *
-     * @return Display size.
-     */
-    virtual TSize DisplaySize() = 0;
-
-    /**
-     * Sets display size or leaves if not supported or
-     * size cannot be changed.
-     *
-     * @param aSize New size for the display.
-     */
-    virtual void SetDisplaySizeL(const TSize& aSize) = 0;
-
-    /**
-     * Sets display location.
-     *
-     * @param aPosition New position for the display.
-     */
-    virtual void SetDisplayLocationL(const TPoint& aPosition) = 0;
-
-    /**
-     * Returns position where display is drawn.
-     *
-     * @return Display location.
-     */
-    virtual TPoint DisplayLocation() = 0;
-
-    /**
-     * Sets display fullscreen mode on/off.
-     *
-     * @param aFullScreen Fullscreen mode.
-     */
-    virtual void SetFullScreenL(TBool aFullScreen) = 0;
-
-    /**
-     * Sets display visible or hides it.
-     *
-     * @param aVisible ETrue if display is visible,
-     *                 EFalse if display is invisible.
-     */
-    virtual void SetVisible(TBool aVisible) = 0;
-
-    /**
-     * Called when source size is changed. This is also called when
-     * source size is available for the first time.
-     *
-     * @param aSourceSize New content's size.
-     */
-    virtual void SourceSizeChanged(const TSize& aSourceSize) = 0;
-    
-    virtual TSize SourceSize() = 0;
-    
-		virtual void SetUIPlayer(MMMAGuiPlayer* player) = 0;
-    /**
-     * Sets display's window. Ownership is not transfered.
-     *
-     * @param aWindow New window used for drawing.
-     **/
-    virtual void SetWindowL(MMMADisplayWindow* aWindow) = 0;
-
-    /**
-     * Getter for window.
-     *
-     * @return Display's window or NULL if not set.
-     */
-    virtual MMMADisplayWindow* Window() = 0;
-
-    /**
-     * Returns visibility of the display.
-     *
-     * @return ETrue if display is visible,
-     *         EFalse if display is invisible.
-     */
-    virtual TBool IsVisible() = 0;
-
-    /**
-     * Returns fullscreen state of the display.
-     *
-     * @return ETrue if display is fullscreen,
-     *         EFalse if display is not fullscreen.
-     */
-    virtual TBool IsFullScreen() = 0;
-    /**
-     *Sets the foreground state of the midlet
-     *
-     * @param ETrue if midlet is in foreground,
-     *         EFalse if midlet is in background
-     */
-    virtual void SetForeground(TBool aForeground, TBool aUseEventServer) = 0;
-
-    /**
-     * Gets notification that there is container to draw assigned
-     *
-     * @return ETrue if container have been set
-     *         EFalse if container is not set
-     */
-    virtual TBool HasContainer() = 0;
-
-    /**
-     * Gets resources necessary to start DirectScreenAccess
-     * Doesn't run in mmapi event server thread!
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aThreadType" Indicates the thread type (UI or MMAPI)
-     */
-   /* virtual void UIGetDSAResources(
-        MUiEventConsumer& aConsumer,
-        TThreadType aThreadType) = 0;
-*/
-    /**
-     * Invokes a callback in UI thread
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aCallbackId" A number identifying the callback
-     */
- /*   virtual void UIGetCallback(
-        MUiEventConsumer& aConsumer,
-        TInt aCallbackId) = 0;
-        */
-        
-        /**
-    * Trigger a function call CalledBackInUiThread() from java in UI thread
-    * arg 'placeholder' is used to identify the function, to be called back from UI Thread
-    */    
-    virtual void GetCallbackInUiThread(TInt placeholder) = 0;
-    
-    /**
-    * Called from java in UI thread context
-    * arg 'placeholder' is used to identify the function, to be called back from UI Thread
-    */ 
-    virtual void CalledBackInUiThread(TInt placeholder) = 0;
-};
-
-#endif // MMMADISPLAY_H
--- a/javauis/mmapi_qt/baseline/inc/mmmadisplaywindow.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* 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"
-* 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:  Abstract base class for windows.
-*
-*/
-
-
-#ifndef MMMADISPLAYWINDOW_H
-#define MMMADISPLAYWINDOW_H
-
-
-#include "mmmadisplay.h"
-#include "qwidget.h"
-#include "COECNTRL.h"
-#include "COEMAIN.h"
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class CMMAPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-
-    Abstract base class for windows.
-
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(MMMADisplayWindow)
-{
-public:
-
-    enum TDisplayWindowType
-    {
-        EDisplayWindowTypeNotSet = -1,
-        EDisplayWindowTypeIsDSA,
-        EDisplayWindowTypeIsBitmap,
-        EDisplayWindowTypeIsCamera,
-    };
-
-    /**
-     * Can be deleted through this interface.
-     */
-    virtual ~MMMADisplayWindow()
-    {
-    };
-
-    /**
-     * Sets destination bitmap for <code>DrawFrameL</code> method
-     *
-     * @param aBitmap destination Bitmap where DrawFrameL draws.
-     */
-    virtual void SetDestinationBitmapL(CFbsBitmap* aBitmap) = 0;
-
-    /**
-     * Draws bitmap to the rect set with <code>SetDrawRectL</code>
-     * method. Bitmap may be scaled to fill whole rect. Implementation
-     * may ignore <code>aBitmap</code> parameter and implements own
-     * drawing procedure.
-     *
-     * @param aBitmap Bitmap to be drawn.
-     */
-    virtual void DrawFrameL(const CFbsBitmap* aBitmap) = 0;
-
-    /**
-     * Sets drawing area which is used in <code>DrawFrameL</code> method.
-     *
-     * THE CALL CANNOT ORIGINATE FROM UI THREAD.
-     * (including the call via MMA event server)
-     *
-     * use SetDrawRectThread when in UI thread
-     *
-     * @param aRect New drawing area.
-     */
-    virtual void SetDrawRect(const TRect& aRect) = 0;
-
-    /**
-     * Calls SetDrawRect method through event source. This method must
-     * be called instead of SetDrawRect if not executing in MMA
-     * thread.
-     *
-     * THE CALL CANNOT ORIGINATE FROM MMA THREAD.
-     * (including the call via UI event server)
-     *
-     * @param aRect New drawing area.
-     */
-    virtual void SetDrawRectThread(const TRect& aRect) = 0;
-
-    /**
-     * Sets drawing position which is used in <code>DrawFrameL</code> method.
-     *
-     * @param aPosition New drawing position.
-     */
-    virtual void SetPosition(const TPoint& aPosition) = 0;
-
-    /**
-     * Sets window visible or invisible. This method can be called from
-     * MMA event server thread or from other context. aUseEventServer
-     * must be set to EFalse if caller is already in MMA event server.
-     *
-     * @param aVisible visiblity
-     * @param aUseEventServer Indicates if method must called through event
-     *                        server.
-     */
-    virtual void SetVisible(TBool aVisible, TBool aUseEventServer = ETrue) = 0;
-
-    /**
-     * Returns rect which is used for drawing frames.
-     *
-     * @return Drawing area
-     */
-    virtual const TRect& DrawRect() = 0;
-
-    /**
-     * Returns whole window's size.
-     *
-     * @return Size of the window.
-     */
-    virtual TSize WindowSize() = 0;
-
-    /**
-     * Sets window size.
-     *
-     * @param aRect Windows size.
-     */
-    virtual void SetWindowRect(const TRect& aRect, MMMADisplay::TThreadType aThreadType) = 0;
-
-    /**
-     * Gets window rect.
-     *
-     * @returns Windows rect.
-     */
-    virtual const TRect& WindowRect() = 0;
-    
-    virtual CMMAPlayer* UiPlayer() 
-    {
-    }
-        
-    #ifdef RD_JAVA_NGA_ENABLED
-    /**
-     * Sets Crop region. used only in CMMASurfaceWindow
-     *
-     * @since S60 v5.2
-     */
-    virtual void SetVideoCropRegion(const TRect& /*aRect*/)
-    {
-        // Empty
-    }
-
-    /**
-     * Sets RWindow rect. used only in CMMASurfaceWindow.
-     * can be called from either MMA ES thread context or
-     * UI thread context.
-     *
-     * @since S60 v5.2
-     */
-    virtual void SetRWindowRect(const TRect& /*aRect*/,
-                                MMMADisplay::TThreadType /*aThreadType*/)
-    {
-        // Empty
-    }
-#endif
-
-    /**
-         *
-         */
-    virtual TDisplayWindowType GetDisplayWindowType() const
-    {
-        return EDisplayWindowTypeNotSet;
-    }
-
-    /**
-     * Gets window visible or invisible.
-     * @retrun ETrue if visible else EFalse. Default implementation always returns ETrue
-     */
-    virtual TBool IsVisible() const
-    {
-        return ETrue;
-    }
-
-    /**
-     * Informs window that container which is window drawn on
-     * is set from now. Implementation is now able to invoke
-     * any UI callbacks
-     *
-     * @since S60 v5.0
-     */
-    virtual void ContainerSet()
-    {
-        // Empty
-    }
-
-    /**
-     * Informs window that container which is window drawn on
-     * is going to be deleted. Implementation should abort any
-     * DirectScreenAccess and delete all the objects
-     * instantiated within UI thread.
-     * Called wihout mmapi event server directly from UI thread.
-     * By default it doesn't do anything.
-     *
-     * @since S60 v5.0
-     */
-    virtual void ContainerDestroyed()
-    {
-        // Empty
-    }
-
-    /**
-     * Notifies window that any drawing
-     * via direct screen access must be aborted
-     */
-    virtual void AbortDSA()
-    {
-        // default empty implementation
-    }
-
-    /**
-     * Allows window to draw
-     * via direct screen access after MdcAbortDSA
-     */
-    virtual void ResumeDSA()
-    {
-        // default empty implementation
-    }
-    
-    /**
-     * gets window resources from QT
-     */
-    virtual void ProcureWindowResourcesFromQWidget(RWsSession * aWs,
-    																										CWsScreenDevice* aScreenDevice,
-  																													  RWindowBase* aWindow)
-    {
-        // default empty implementation
-    }
-    
-    virtual void UICallback( TInt aCallbackId )
-    {
-    }
-};
-
-#endif // MMMADISPLAYWINDOW_H
--- a/javauis/mmapi_qt/baseline/inc/mmmaeventposter.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002 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 header is event poster
-*
-*/
-
-
-#ifndef MMMAEVENTPOSTER_H
-#define MMMAEVENTPOSTER_H
-
-//  INCLUDES
-#include "cmmaevent.h"
-#include <jni.h>
-
-NONSHARABLE_CLASS(MMMAEventPoster)
-{
-public:
-    /**
-     * Posts event to the Java side.
-     *
-     * @param aEvent Event to be sent.
-     * @param aPriority Priority used to send the event.
-     */
-    virtual void PostEvent(CMMAEvent* aEvent,
-                           TInt aPriority = CMMAEvent::EEventPriority) = 0;
-		virtual JNIEnv* getValidJniEnv() = 0;                           	
-};
-
-
-#endif // MMMAEVENTPOSTER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmaguiplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Interface for players which shows picture.
-*
-*/
-
-
-#ifndef MMMAGUIPLAYER_H
-#define MMMAGUIPLAYER_H
-
-#include "cmmaplayerevent.h"
-
-//  FORWARD DECLARATIONS
-class MMMADisplay;
-class CFbsBitmap;
-class MMMASnapshot;
-class MMAFunctionServer;
-class CMIDToolkit;
-
-//  CLASS DEFINITION
-/**
-    Interface for players which shows picture. Player will be notified
-    throw this interface when display state is changed.
-*/
-NONSHARABLE_CLASS(MMMAGuiPlayer)
-{
-protected:  // Constructors and destructors
-    /**
-     * Do not allow delete through this interface
-     */
-    virtual ~MMMAGuiPlayer() {};
-
-public:     // Abstract methods
-    /**
-     * Sets display to the player. Player must likely will create window
-     * for the display. Called when display is available for the player.
-     *
-     * @param aDisplay Display which can be used.
-     */
-    virtual void SetDisplayL(MMMADisplay* aDisplay) = 0;
-
-    /**
-     * Returns size of the content. Content size may not available
-     * before player is initialized.
-     *
-     * @return Size of the source content.
-     */
-    virtual TSize SourceSize() = 0;
-
-    /**
-     * Returns inferface that is used for taking snapshots from the player.
-     * Method can leave if player creates a snapshoter object when this
-     * method is called.
-     *
-     * @return Interface for taking snaphots.
-     */
-    virtual MMMASnapshot* SnapshoterL() = 0;
-
-    /**
-     * Method sends event to the Java. This can be used to notify errors
-     * to the Java side.
-     *
-     * @param aEventType Type of the event.
-     * @param aStringEventData Data of the event.
-     */
-    virtual void NotifyWithStringEvent(CMMAPlayerEvent::TEventType aEventType,
-                                       const TDesC& aStringEventData) = 0;
-
-    // No data in MClass!!
-
-};
-
-#endif // MMMAGUIPLAYER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmamuteobserver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Interface for mute observers
-*
-*/
-
-#ifndef MMMAMUTEOBSERVER_H
-#define MMMAMUTEOBSERVER_H
-
-//  CLASS DECLARATION
-/**
-*   Interface for receiving mute notification from CMMAMuteNotifier.
-*
-*
-*/
-
-class MMMAMuteObserver
-{
-public:
-
-    /**
-     * Handles mute notification according to received parameter.
-     * @param aMuted true if mute should be on, false if not
-     */
-    virtual void HandleMuteNotification(TBool aMuted) = 0;
-
-};
-
-#endif // MMMAMUTEOBSERVER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmaplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Interface for all player factories.
-*
-*/
-
-
-#ifndef MMMAPLAYERFACTORY_H
-#define MMMAPLAYERFACTORY_H
-
-//  INCLUDES
-#include <badesca.h> // CDesC16Array
-
-//  CONSTANTS
-_LIT(KMMAHttpProtocol, "http");
-_LIT(KMMAHttpsProtocol, "https");
-_LIT(KMMAFileProtocol, "file");
-_LIT(KMMACaptureProtocol, "capture");
-_LIT(KMMADeviceProtocol, "device");
-
-//  CLASS DEFINITION
-class CMMAPlayer;
-
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-    Interface for all player factories.
-
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(MMMAPlayerFactory)
-{
-public:
-
-    /**
-     * Allow delete through this interface.
-     */
-    virtual ~MMMAPlayerFactory() {};
-
-    /**
-     * Creates new player according to a content type.
-     *
-     * @param aContentType Player's content type.
-     * @return New instance of CMMAPlayer or null if factory cannot
-     *         create it
-     */
-    virtual CMMAPlayer* CreatePlayerL(const TDesC& aContentType) = 0;
-
-    /**
-     * Creates new player according to a locator
-     *
-     * @param aProtocol protocol part from the locator.
-     * @param aMiddlePart middle part from the locator.
-     * @param aParameters parameters part from the locator.
-     * @return New instance of CMMAPlayer or null if factory cannot
-     *         create it
-     */
-    virtual CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                                      const TDesC& aMiddlePart,
-                                      const TDesC& aParameters) = 0;
-
-    /**
-     * Creates new player according to a header data
-     *
-     * @param aHeaderData Header data from the content
-     * @return New instance of CMMAPlayer or null if factory cannot
-     *         create it
-     */
-    virtual CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData) = 0;
-
-    /**
-     * Gets player's supported content types.
-     *
-     * @param aProtocol The input protocol for the supported content types.
-     * @param aMimeTypeArray Will contain supported mime types for protocol.
-     */
-    virtual void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                           CDesC16Array& aMimeTypeArray) = 0;
-
-    /**
-     * Gets player's supported protocols for the content type.
-     *
-     * @param aContentType The content type for the supported protocols.
-     * @param aProtocolArray Will contain supported protocols for content type.
-     */
-    virtual void GetSupportedProtocolsL(const TDesC& aContentType,
-                                        CDesC16Array& aProtocolArray) = 0;
-};
-
-#endif // MMMAPLAYERFACTORY_H
--- a/javauis/mmapi_qt/baseline/inc/mmmaplayerinstanceobserver.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef MMMAPLAYERINSTANCEOBSERVER_H
-#define MMMAPLAYERINSTANCEOBSERVER_H
-
-//  FORWARD DECLARATIONS
-class CMMAPlayer;
-
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-
-    Interface used to inform external components about player instances.
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(MMMAPlayerInstanceObserver)
-{
-public:
-    /**
-     * Adds new player to observer.
-     *
-     * @param aPlayer Player instance to add.
-     */
-    virtual void AddPlayerNotifyL(CMMAPlayer* aPlayer) = 0;
-
-    /**
-     * Removes player from observer.
-     *
-     * @param aPlayer Player instance to remove.
-     */
-    virtual void RemovePlayerNotify(CMMAPlayer* aPlayer) = 0;
-
-protected:
-    /**
-     * Deletion through this interface is not allowed.
-     */
-    virtual ~MMMAPlayerInstanceObserver() {};
-};
-
-#endif // MMMAPLAYERINSTANCEOBSERVER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmaplayerstatelistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This interface is used for informing player state changes
-*
-*/
-
-
-#ifndef MMMAPLAYERSTATELISTENER_H
-#define MMMAPLAYERSTATELISTENER_H
-
-#include <e32def.h>
-
-//  CLASS DEFINITION
-/**
-
-  This interface is used for informing player state changes
-
-*/
-NONSHARABLE_CLASS(MMMAPlayerStateListener)
-{
-public:
-    /**
-     * Called when player state is changed. Used states are defined in
-     * the player header file. Enumeration is not used to provide
-     * expandability.
-     *
-     * @param aState New state of the player.
-     */
-    virtual void StateChanged(TInt aState) = 0;
-
-protected:  // Constructors and destructors
-    /**
-     * May not delete through this interface,
-     * because destructor is protected.
-     */
-    virtual ~MMMAPlayerStateListener()
-    {
-    };
-};
-
-
-#endif // MMMAPLAYERSTATELISTENER_H
--- a/javauis/mmapi_qt/baseline/inc/mmmasnapshot.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This header is for shapshots.
-*
-*/
-
-
-#ifndef MMMASNAPSHOT_H
-#define MMMASNAPSHOT_H
-
-//  FORWARD DECLARATIONS
-class CFbsBitmap;
-class CMMAImageSettings;
-
-//  CLASS DEFINITION
-/**
-
-*/
-
-NONSHARABLE_CLASS(MMMASnapshot)
-{
-public:     // Type definitions
-    enum TEncoding
-    {
-        EBitmap = 0,    // Raw image format
-        EEncoded        // Encoded image format
-    };
-
-protected:  // Constructors and destructors
-    virtual ~MMMASnapshot() {};     // Do not allow delete through this interface
-
-public:     // Abstract methods
-    /**
-     * Takes snapshot.
-     *
-     * @param aStatus Status will be informed when
-     *        bitmap is ready or error occures.
-     * @param aSize Snapshot size. If size is not specified (width=-1 or
-     *        height=-1) default size is used.
-     * @return Returns snapshot image's encoding type based on the requested MIME-type and
-     *         snapshot size. Returned encoding type may differ from the requested as
-     *         raw bitmap type is used if possibly requested encoding type is not found.
-     */
-    virtual TEncoding TakeSnapshotL(TRequestStatus* aStatus,
-                                    const TSize& aSize,
-                                    const CMMAImageSettings& aSettings) = 0;
-
-    /**
-     * Returns snapshot image.
-     *
-     * @returns Snapshot bitmap or NULL if TakeSnapshotL is not called or it failed.
-     *          Caller takes ownership of the bitmap.
-     */
-    virtual CFbsBitmap* SnapshotBitmap() = 0;
-
-    /**
-     * Returns encoded snapshot image
-     *
-     * @return Encoded snapshot image or NULL if TakeSnapshotL is not called or if it failed
-     *         Caller takes ownership of the pointer.
-     */
-    virtual HBufC8* SnapshotEncoded() = 0;
-
-    // No data in MClass!!
-
-};
-
-#endif // MMMASNAPSHOT_H
--- a/javauis/mmapi_qt/baseline/inc/mmmasnapshotreadycallback.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2002 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 header is snapshot callback
-*
-*/
-
-
-#ifndef MMMASNAPSHOTREADYCALLBACK_H
-#define MMMASNAPSHOTREADYCALLBACK_H
-
-NONSHARABLE_CLASS(MMMASnapshotReadyCallback)
-{
-public:
-    /**
-     * Called when snapshot is ready. Error situations
-     * must be checked separately.
-     */
-    virtual void SnapshotReady() = 0;
-
-protected:
-    virtual ~MMMASnapshotReadyCallback()
-    {
-    };
-};
-
-#endif // MMMASNAPSHOTREADYCALLBACK_H
--- a/javauis/mmapi_qt/baseline/inc/mmmasourcestreamlistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 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 interface is used for informing player that
-*                CMMASourceStream is ready
-*
-*/
-
-
-#ifndef MMMASOURCESTREAMLISTENER_H
-#define MMMASOURCESTREAMLISTENER_H
-
-//  CLASS DEFINITION
-/**
-
-    This interface is used for informing player that CMMASourceStream is ready
-
-*/
-NONSHARABLE_CLASS(MMMASourceStreamListener)   // usually not derived
-{
-public: // New methods
-    /**
-     * This method will be called when source stream read operation
-     * is ready or error occures.
-     *
-     * @param aStatus Status of the reading operation or one of the system
-     *                error codes.
-     * @param aData Reference to read data. If an error occured reference
-     *              to zero length descriptor.
-     */
-    virtual void ReadCompletedL(TInt aStatus, const TDesC8& aData) = 0;
-
-protected:  // Destructor
-    /**
-     * Do not allow delete trough this interface.
-     */
-    virtual ~MMMASourceStreamListener()
-    {
-    };
-};
-
-#endif // MMMASOURCESTREAMLISTENER_H
--- a/javauis/mmapi_qt/baseline/inc/rmmatempfile.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef RMMATEMPFILE_H
-#define RMMATEMPFILE_H
-
-// INCLUDES
-#include <f32file.h>
-#include <e32std.h>
-
-//  CLASS DECLARATION
-/**
-* This is used to create and delete temporary files.
-*/
-NONSHARABLE_CLASS(RMMATempFile): public RSessionBase
-{
-public:
-    /**
-     * Default constructor.
-     */
-    RMMATempFile();
-
-    /**
-     * Connects to systemams server. This method must be called before
-     * other methods may be used.
-     */
-    void ConnectL();
-
-    /**
-     * Creates temp file to server. After this call reference to file can
-     * be obtained with File() method.
-     */
-    void CreateL();
-
-    /**
-     * Return reference to created file.
-     * @return Reference to created file object.
-     */
-    RFile& File();
-
-    /**
-     * Sets midlet suite. Used to create temp file folder in systemams
-     * server.
-     * @param aMIDletSuiteID midlet suite id
-     */
-    void SetMIDletSuiteID(TInt aMIDletSuiteID);
-
-    /**
-     * Closes server session and deletes temp file.
-     */
-    void Close();
-
-private:
-    // temp file's path
-    TFileName iFileName;
-
-    // file created in CreateL method.
-    RFile iFile;
-
-    // Handle to file.
-    TInt iFileHandle;
-
-    // midlet suite id
-    TInt iMidletSuiteID;
-};
-
-#endif // RMMATEMPFILE_H
--- a/javauis/mmapi_qt/baseline/inc/tmmaparametervalidator.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for parsing and validating properties
-*
-*/
-
-
-#ifndef TMMAPARAMETERVALIDATOR_H
-#define TMMAPARAMETERVALIDATOR_H
-
-//  INCLUDES
-#include <e32base.h>
-#include <mmfutilities.h>
-#include <imageconversion.h>
-// STRUCTS
-
-/**
- * These structs are used for storing settings
- */
-
-// Default values for recorder
-const TInt KDefaultBits =     -1;
-const TInt KDefaultRate =     -1;
-const TInt KDefaultChannels = -1;
-
-
-NONSHARABLE_STRUCT(CMMAAudioSettings): public CBase
-{
-
-    ~CMMAAudioSettings();
-
-    TUid iController;
-    TUid iEncoding;
-    TFourCC iDataType;
-    TInt iRate;
-    TInt iChannels;
-    TBool iStreamableFormat;
-    HBufC *iContentType;
-};
-
-NONSHARABLE_STRUCT(TMMAVideoSettings)
-{
-    TPtrC iEncoding;
-    TReal32 iFps;
-    TInt iWidth;
-    TInt iHeight;
-    inline void operator=(const TMMAVideoSettings& aSettings)
-    {
-        iEncoding.Set(aSettings.iEncoding);
-        iFps = aSettings.iFps;
-        iHeight = aSettings.iHeight;
-        iWidth = aSettings.iWidth;
-    }
-};
-/**
- * Container for image settings
- */
-
-NONSHARABLE_CLASS(CMMAImageSettings): public CBase
-{
-public: // destructor
-    ~CMMAImageSettings();
-    // this is basicly struct owning some data
-    // so there is no point to make getters/setters
-public:
-    HBufC8* iMimeType; //owned
-    HBufC8* iType; // owned
-    TInt  iWidth;
-    TInt  iHeight;
-    CFrameImageData* iImageData; //owned
-};
-
-//  CLASS DECLARATION
-/**
-*   This class is used for parsing and validating properties
-*   The property string is in format "name=value&name=value&..."
-*
-*/
-
-NONSHARABLE_CLASS(TMMAParameterValidator)
-{
-public:// New methods
-    /**
-     * Validates audio properties. Accepted keys are:
-     * "encoding", "rate", "bits", "channels", "endian", "signed"
-     * Properties string must start with "encoding" parameter
-     * Leaves with KErrArgument if parameters are not valid.
-     */
-    static CMMAAudioSettings *ValidateAudioPropertiesL(const TDesC& aProperties);
-
-    /**
-     * Validates video properties. Accepted keys are:
-     * "encoding", "fps", "width", "height"
-     * Properties string must start with "encoding" parameter
-     * Leaves with KErrArgument if parameters are not valid.
-     */
-    static TMMAVideoSettings ValidateVideoPropertiesL(const TDesC& aProperties);
-
-    /**
-     * Validates image properties. Accepted keys are:
-     * "encoding", "width", "height", "quality", "progressive", "interlaced", "type", "colors"
-     * Properties string must start with "encoding" parameter
-     * Leaves with KErrArgument if parameters are not valid.
-     */
-    static CMMAImageSettings* ValidateImagePropertiesL(const TDesC& aProperties);
-
-private: // New methods
-    /**
-     * Every properties must start with "encoding="
-     */
-    static void CheckEncodingL(const TDesC& aProperties);
-
-    /**
-     * Creates new HBufC8 and copies data to it from aDes.
-     */
-    static HBufC8* CreateHBufC8FromUnicodeL(const TDesC& aDes);
-};
-
-#endif // TMMAPARAMETERVALIDATOR_H
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/BufferDataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Buffered DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.protocol.SourceStream;
-import java.io.IOException;
-
-/**
- * BufferDataSource is used to read header from DataSource's SourceStream.
- * This class delegates all method calls to DataSource given in constructor
- * except getStream method which returns buffered SourceStream.
- */
-public class BufferDataSource extends DataSource
-{
-    // delegated source
-    protected DataSource iDataSource;
-
-    // buffers DataSource's first stream.
-    protected BufferSourceStream iSourceStream;
-
-    /**
-     * Constructor.
-     * @param aDataSource delegated DataSource
-     */
-    public BufferDataSource(DataSource aDataSource) throws IOException
-    {
-        super(aDataSource.getLocator());
-        iDataSource = aDataSource;
-        SourceStream ss = aDataSource.getStreams()[ 0 ];
-        iSourceStream = new BufferSourceStream(ss);
-    }
-
-    /**
-     * Return header data.
-     * @return header data
-     */
-    public byte[] getHeader() throws IOException
-    {
-        return iSourceStream.getHeader();
-    }
-
-    public int readAndBuffer(byte[] aBuffer, int aOffset, int aLength) throws IOException
-    {
-        return iSourceStream.readAndBuffer(aBuffer, aOffset, aLength);
-    }
-
-    /**
-     * from DataSource
-     * @return Content Type
-     * @see DataSource
-     */
-    public String getContentType()
-    {
-        return iDataSource.getContentType();
-    }
-
-    /**
-     * from DataSource
-     * Connect to the stream
-     * @throws IOException
-     * @see DataSource
-     */
-    public void connect() throws IOException
-    {
-        iDataSource.connect();
-    }
-
-    /**
-     * from DataSource
-     * Disconnect from the stream
-     */
-    public void disconnect()
-    {
-        iDataSource.disconnect();
-    }
-
-    /**
-     * from DataSource
-     * Put DataSource to STARTED state
-     * @throws IOException Throw if DataSource is in wrong state
-     * @see DataSource
-     */
-    public void start() throws IOException
-    {
-        iDataSource.start();
-    }
-
-    /**
-     * from DataSource
-     * Stops DataSource
-     * @see DataSource
-     */
-    public void stop() throws IOException
-    {
-        iDataSource.stop();
-    }
-
-    /**
-     * from DataSource
-     * return sourceStreams of the DataSource
-     *
-     * @return set of source streams
-     * @see DataSource
-     */
-    public SourceStream[] getStreams()
-    {
-        // return all streams from delegated DataSource except first
-        // buffered stream.
-        SourceStream[] originalStreams = iDataSource.getStreams();
-        SourceStream[] streams = new SourceStream[ originalStreams.length ];
-        System.arraycopy(originalStreams, 0,
-                         streams, 0, originalStreams.length);
-        streams[ 0 ] = iSourceStream;
-        return streams;
-    }
-
-    /**
-     * from interface Controllable
-     * Method return controls of the DataSource
-     * @return Control
-     * @see Controllable
-     * @see DataSource
-     */
-    public Control[] getControls()
-    {
-        return iDataSource.getControls();
-    }
-
-    /**
-     * from interface Controllable
-     * Return a control by the Control Type, not supported
-     * @param controlType type of the control
-     * @return Control
-     */
-    public Control getControl(String aControlType)
-    {
-        return iDataSource.getControl(aControlType);
-    }
-    /**
-     * @author d35kumar
-     * @return
-     */
-    public DataSource getDataSource(){
-    	return iDataSource;
-    }
-    
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/BufferSourceStream.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
-* Copyright (c) 2002 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:  SourceStream that buffers data from another SourceStream.
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import javax.microedition.media.protocol.SourceStream;
-
-/**
- * SourceStream that buffers data from another SourceStream.
- *
- */
-public class BufferSourceStream extends InputStreamSourceStream
-{
-    // Deferred buffer size
-    private static final int BUFFER_SIZE = 5120;
-
-    // Stream to buffer
-    SourceStream iSourceStream;
-
-    byte[] iBuffer;
-
-    // stream read position
-    int iPos;
-
-    /**
-     * Constructor.
-     * @param aInputStream An InputStream
-     */
-    public BufferSourceStream(SourceStream aSourceStream)
-    {
-        iSourceStream = aSourceStream;
-    }
-
-    /**
-     * Return header data.
-     * @return header data
-     */
-    public byte[] getHeader() throws IOException
-    {
-        byte[] tmpBuffer = new byte[ BUFFER_SIZE ];
-        int bytesInBuffer = BUFFER_SIZE;
-
-        // Read into iBuffer first if iBuffer doesn't already contain
-        // first 256 bytes
-        if (iBuffer == null)
-        {
-            bytesInBuffer = readAndBuffer(tmpBuffer, 0, 256);
-
-            if (bytesInBuffer < 0)
-            {
-                throw new IOException();
-            }
-        }
-        else if (iBuffer.length < 256)
-        {
-            bytesInBuffer = readAndBuffer(tmpBuffer, iBuffer.length, (256 - iBuffer.length));
-
-            if (bytesInBuffer == -1)
-            {
-                bytesInBuffer = iBuffer.length;
-            }
-        }
-
-        // tmpBuffer will be overwritten here
-        System.arraycopy(iBuffer, 0,
-                         tmpBuffer, 0, bytesInBuffer);
-
-        return tmpBuffer;
-    }
-
-
-    public int readAndBuffer(byte[] aBuffer, int aOffset, int aLength) throws IOException
-    {
-        int bytesInBuffer = iSourceStream.read(aBuffer, aOffset, aLength);
-
-        if (iBuffer == null)
-        {
-            iBuffer = new byte[bytesInBuffer];
-
-            System.arraycopy(aBuffer, aOffset,
-                             iBuffer, 0, bytesInBuffer);
-        }
-        else if (bytesInBuffer >= 0)
-        {
-            byte[] tempBuffer = iBuffer;
-            iBuffer = new byte[iBuffer.length + bytesInBuffer];
-
-            System.arraycopy(tempBuffer, 0,
-                             iBuffer, 0, tempBuffer.length);
-            System.arraycopy(aBuffer, aOffset,
-                             iBuffer, tempBuffer.length, bytesInBuffer);
-            tempBuffer = null; // relese tempBuffer
-        }
-
-        return bytesInBuffer;
-    }
-
-    /**
-     * Read from Input Stream
-     * @param buffer Input Stream
-     * @param offset where reading starts
-     * @param length length of read data
-     * @return bytes read
-     * @throws IOException
-     */
-    public int read(byte[] aBuffer, int aOffset, int aLength) throws IOException
-    {
-        // bytes read from internal buffer
-        int bytesFromBuffer = 0;
-
-
-        if ((iBuffer != null) &&   // read from iBuffer if getHeader is called
-                (iPos < iBuffer.length))
-        {
-            // Need to read from buffer
-            if (aLength < iBuffer.length - iPos)
-            {
-                // aLength bytes can be read from buffer
-                bytesFromBuffer = aLength;
-            }
-            else
-            {
-                // aLength cannot be read from buffer
-                // read all there is available
-                bytesFromBuffer = iBuffer.length - iPos;
-            }
-
-            System.arraycopy(iBuffer, iPos,
-                             aBuffer, aOffset, bytesFromBuffer);
-
-            // move stream position
-            iPos += bytesFromBuffer;
-            return bytesFromBuffer;
-        }
-
-        // bytes read from iSourceStream
-        int bytesFromStream = 0;
-        // Check if bytes are needed from SourceStream
-        if (bytesFromBuffer < aLength)
-        {
-            bytesFromStream = iSourceStream.read(aBuffer,
-                                                 bytesFromBuffer,
-                                                 aLength - bytesFromBuffer);
-            if (bytesFromStream != -1)
-            {
-                // move stream position, if not end of stream
-                iPos += bytesFromStream;
-            }
-        }
-
-        return bytesFromStream;
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,668 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Vector;
-import java.util.Enumeration;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.TimeBase;
-import javax.microedition.media.Player;
-import javax.microedition.media.MediaException;
-//import com.symbian.lcdjava.lang.ObjectExtensions;
-//import com.symbian.epoc.events.MIDEventServer;
-//import com.symbian.midp.runtime.ToolkitInvoker;
-//import com.symbian.midp.runtime.ToolkitObserver;
-
-import com.nokia.microedition.media.animation.AnimationPlayerFactory;
-import com.nokia.microedition.media.protocol.ProtocolFactory;
-import com.nokia.microedition.media.tone.PlayToneImpl;
-
-import com.nokia.microedition.volumekeys.ForegroundListener;
-import com.nokia.mj.impl.rt.support.Finalizer;
-
-//To get the shutdown event from the midlet
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.rt.support.ShutdownListener;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * ManagerImpl implements the functionality specified in
- * javax.microedition.media.Manager class.
- * This class is a singleton and instance can be got with getInstance method.
- */
-public class ManagerImpl implements PlugIn
-{
-    // ManagerImpl native instance
-    private static int sManagerHandle;
-
-    // CMMAEventSource
-    private static int iFunctionSourceHandle;
-
-    // Static instance, can be got with getInstace method
-    private static ManagerImpl sManager;
-
-    private final TimeBase iSystemTimeBase = new SystemTimeBase();
-
-    private final Vector iPlugIns = new Vector();
-    private final ProtocolFactory iProtocolFactory = new ProtocolFactory();
-    private final ForegroundListener iForegroundListener;
-    private Finalizer iFinalizer;
-
-    Finalizer registerForFinalization()
-    {
-        return new Finalizer()
-        {
-        public void finalizeImpl()
-        {
-            doFinalize();
-        }
-    };
-    }
-
-    // Play tone implementation
-    private PlayToneImpl iPlayToneImpl = new PlayToneImpl();
-
-    static
-    {
-        // This is called when class is loaded for the first time
-        sManager = new ManagerImpl();
-
-        try
-        {
-            // Invoke external components
-            Setup.setup(iFunctionSourceHandle);
-        }
-        catch (OutOfMemoryError oome)
-        {
-            // External setup failed clean MMA native resources and throw oome
-            sManager.doFinalize();
-            throw oome;
-        }
-    }
-
-    /**
-     * This private constructor can be called only from staic block.
-     */
-    private ManagerImpl()
-    {
-        // Will cause registeredFinalize() to be called when ObjectExtensions
-        // is finalized.
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"ManagerImpl constructor before loading library");
-        com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javamobilemedia");
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"ManagerImpl constructor library loaded.. going to register for finalizer");
-        //ObjectExtensions.registerForFinalization(this);
-        iFinalizer = registerForFinalization();
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"ManagerImpl constructor ... after registering for finalizer");
-
-        // Event server contructor needs new String object,
-        // otherwise it don't work..
-
-        iFunctionSourceHandle = _createEventSource();
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"ManagerImpl.java : iFunctionSourceHandle is " + iFunctionSourceHandle);
-        if (iFunctionSourceHandle < NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError("SymbianOS error: " + iFunctionSourceHandle);
-        }
-
-        sManagerHandle = _createManager(iFunctionSourceHandle,
-                                        ApplicationInfo.getInstance().getSuiteUid().hashCode());
-        if (sManagerHandle < NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError();
-        }
-        //Use ShutdownListener to get notification of exit and release the resource
-		//MMAPI UI 3.x work
-
-		setShutdownListener();
-		// support for gif animation player
-		iPlugIns
-				.addElement(new com.nokia.microedition.media.animation.AnimationPlayerFactory());
-
-        // ManagerImpl is also a PlugIn that getAllSupportedContentTypes,
-        // getAllSupportedProtocols and createPlayer methods can be used
-        // through PlugIn interface.
-        iPlugIns.addElement(this);
-
-        // support for device://tone and jts
-        iPlugIns.addElement(
-            new com.nokia.microedition.media.protocol.device.tone.Protocol());
-
-        // Create foreground listener which listens the state of the midlet
-        // This feature is a part of the media keys feature so it is flagged
-         Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"before constructing ForegroundListener....");
-         iForegroundListener = new ForegroundListener(iFunctionSourceHandle);
-        iForegroundListener.init();
-    }
-    
-    
-    private void setShutdownListener()
-    {
-        // Get the insatnce of ApplicationUtils.
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-
-        // Get the name of the application.
-        appUtils.addShutdownListener(new ShutdownListener()
-        {
-            //The method that gets called when Application is shutting down
-            public void shuttingDown()
-            {
-               
-                doFinalize();
-              
-             
-            }
-        });
-        
-    }    
-
-    /**
-     * Returns MMA event source handle
-     */
-    public static int getEventSource()
-    {
-        return iFunctionSourceHandle;
-    }
-    /**
-     * Returns native handle to Manager
-     */
-    public static int getHandle()
-    {
-        return sManagerHandle;
-    }
-
-    /**
-     * Return ManagerImpl instance
-     */
-    public static ManagerImpl getInstance()
-    {
-        return sManager;
-    }
-
-    /**
-     * Adds new PlugIn to PlugIns array.
-     * @param aPlugIn New PlugIn.
-     */
-    public void addPlugIn(PlugIn aPlugIn)
-    {
-        iPlugIns.addElement(aPlugIn);
-    }
-
-
-
-
-    /**
-     * This will be called when ObjectExtensions is finalized.
-     */
-    synchronized final void doFinalize()
-    {
-	_dispose(iFunctionSourceHandle);
-	iFunctionSourceHandle = 0;
-    }
-
-    /**
-     * This method is called in Toolkit's destroyNotify call.
-     * This will release convenient native resources. All native resource
-     * will be deleted in registeredFinalize() method.
-     */
-    synchronized final void release()
-    {
-     //   _release(iFunctionSourceHandle);
-    }
-
-    /**
-     * Create String array from Vector and remove String duplicates.
-     * @param aVector Vector containing String objects.
-     */
-    private String[] createStringArray(Vector aVector)
-    {
-        // remove all duplicates from the vector
-        for (int i = 0; i < aVector.size(); i++)
-        {
-            String element = (String)aVector.elementAt(i);
-            for (int j = i + 1; j < aVector.size();)
-            {
-                if (element.equals((String)aVector.elementAt(j)))
-                {
-                    aVector.removeElementAt(j);
-                }
-                else
-                {
-                    j++;
-                }
-            }
-        }
-
-        // Create new array for vector elements and copy elements
-        String[] s = new String[ aVector.size()];
-        aVector.copyInto(s);
-        return s;
-    }
-
-    /**
-     * Return the list of supported content types for the given protocol.
-     * <p>
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content types returned.
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocol used.
-     * <p>
-     * For example, if the given <code>protocol</code>
-     * is <code>"http"</code>,
-     * then the supported content types that can be played back
-     * with the <code>http</code> protocol will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the <code>protocol</code>,
-     * all the supported content types for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>protocol</code> is an invalid or
-     * unsupported protocol, then an empty array will be returned.
-     *
-     * @param aProtocol The input protocol for the supported content types.
-     * @return The list of supported content types for the given protocol.
-     */
-    public String[] getAllSupportedContentTypes(String aProtocol)
-    {
-        if ((aProtocol != null) && (aProtocol.length() == 0))
-        {
-            // No supported types for 0 length string.
-            return new String[ 0 ];
-        }
-        Vector contentTypes = new Vector();
-
-        Enumeration plugIns = iPlugIns.elements();
-
-        // go through all plugins and get content types
-        while (plugIns.hasMoreElements())
-        {
-            PlugIn plugIn = (PlugIn)plugIns.nextElement();
-            String[] types = plugIn.getSupportedContentTypes(aProtocol);
-
-            // Add all types to vector
-            for (int i = 0; i < types.length; i++)
-            {
-                contentTypes.addElement(types[ i ]);
-            }
-        }
-        return createStringArray(contentTypes);
-    }
-
-    /**
-     * Return the list of supported protocols given the content
-     * type.  The protocols are returned
-     * as strings which identify what locators can be used for creating
-     * <code>Player</code>'s.
-     * <p>
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocols returned.
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content type used.
-     * <p>
-     * For example, if the given <code>content_type</code>
-     * is <code>"audio/x-wav"</code>, then the supported protocols
-     * that can be used to play back <code>audio/x-wav</code>
-     * will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the
-     * <code>content_type</code>,
-     * all the supported protocols for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>content_type</code> is an invalid or
-     * unsupported content type, then an empty array will be returned.
-     *
-     * @param aContentType The content type for the supported protocols.
-     * @return The list of supported protocols for the given content type.
-     */
-    public String[] getAllSupportedProtocols(String aContentType)
-    {
-        String contentType = aContentType;
-        if ((contentType != null) &&  contentType.equals(""))
-        {
-            return new String[ 0 ];
-        }
-
-        Vector protocols = new Vector();
-        Enumeration plugIns = iPlugIns.elements();
-        while (plugIns.hasMoreElements())
-        {
-            PlugIn plugIn = (PlugIn)plugIns.nextElement();
-            String[] types = plugIn.getSupportedProtocols(aContentType);
-            for (int i = 0; i < types.length; i++)
-            {
-                protocols.addElement(types[ i ]);
-            }
-        }
-        return createStringArray(protocols);
-    }
-
-    /**
-     * From PlugIn. Get MMA supported protocols.
-     */
-    public String[] getSupportedProtocols(String aContentType)
-    {
-        String[] protocols = _getSupportedProtocols(iFunctionSourceHandle,
-                             sManagerHandle,
-                             aContentType);
-        NativeError.checkOOM(protocols);
-        return protocols;
-    }
-
-    /**
-     * From PlugIn. Get MMA supported types.
-     */
-    public String[] getSupportedContentTypes(String aProtocol)
-    {
-        String[] types = _getSupportedContentTypes(iFunctionSourceHandle,
-                         sManagerHandle,
-                         aProtocol);
-        NativeError.checkOOM(types);
-        return types;
-    }
-
-    /**
-     * From PlugIn.
-     */
-    public InternalPlayer createPlayer(DataSource aSource)
-    throws MediaException, IOException
-    {
-        InternalPlayer player = null;
-        if (aSource.getContentType() != null)
-        {
-            // Create player from content type
-            if (isValidContentType(aSource.getContentType()))
-            {
-                player = NativePlayerFactory.createPlayer(aSource.getContentType(),
-                         aSource);
-            }
-            else
-            {
-                throw new MediaException(
-                    "Content type not supported: " + aSource.getContentType());
-            }
-        }
-
-        if ((player == null) &&
-                (aSource.getLocator() != null))
-        {
-            // Create player from locator
-            player = NativePlayerFactory.createPlayer(
-                         new Locator(aSource.getLocator()),
-                         aSource);
-        }
-
-        if (player == null)
-        {
-            // Could not create player from content-type or locator,
-            // try to create player from header data
-            player = NativePlayerFactory.createPlayer(
-                         ((BufferDataSource)aSource).getHeader(),
-                         aSource);
-        }
-
-        return player;
-    }
-
-    /**
-     * From PlugIn. Empty implemation.
-     */
-    public void preparePlayer(InternalPlayer aPlayer) throws MediaException
-    {
-    }
-
-    /**
-     * This method calls preparePlayer to all PlugIns.
-     */
-    private void pluginsPreparePlayer(InternalPlayer aPlayer)
-    throws MediaException
-    {
-    	
-    		
-        // Call preparePlayer to all plugins
-        Enumeration plugins = iPlugIns.elements();
-        while (plugins.hasMoreElements())
-        {
-            ((PlugIn)plugins.nextElement()).preparePlayer(aPlayer);
-        }
-    }
-
-    /**
-     * Create a <code>Player</code> from an input locator.
-     *
-     * @param aLocator A locator string in URI syntax that describes
-     * the media content.
-     * @return A new <code>Player</code>.
-     * @exception IllegalArgumentException Thrown if <code>locator</code>
-     * is <code>null</code>.
-     * @exception MediaException Thrown if a <code>Player</code> cannot
-     * be created for the given locator.
-     * @exception IOException Thrown if there was a problem connecting
-     * with the source pointed to by the <code>locator</code>.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to create the <code>Player</code>.
-     */
-    public Player createPlayer(String aLocator)
-    throws IOException, MediaException
-    {
-        if (aLocator == null)
-        {
-            throw new IllegalArgumentException("Locator is null.");
-        }
-        InternalPlayer player = iProtocolFactory.createPlayer(
-                                    new Locator(aLocator));
-        if (player == null)
-        {
-            throw new MediaException("Locator not supported: " +
-                                     aLocator);
-        }
-        pluginsPreparePlayer(player);
-        return player;
-    }
-
-    /**
-     * Create a <code>InternalPlayer</code> for a <code>DataSource</code>.
-     */
-    public InternalPlayer createInternalPlayer(DataSource aSource)
-    throws IOException, MediaException
-    {
-        // Throw IllegalArgumentException if source  is null.
-        if (aSource == null)
-        {
-            throw new IllegalArgumentException("DataSource is null.");
-        }
-        aSource.connect(); // Ensure that external source is connected.
-        if (aSource.getStreams() == null ||
-                aSource.getStreams().length == 0)
-        {
-            // There must be atleast one stream in the DataSource
-            throw new MediaException(
-                "There must be at least one stream in datasource");
-        }
-
-        BufferDataSource bdc = null;
-        if (aSource instanceof BufferDataSource)
-        {
-            bdc = (BufferDataSource)aSource;
-        }
-        else
-        {
-            bdc = new BufferDataSource(aSource);
-        }
-
-        InternalPlayer player = null;
-        Enumeration plugins = iPlugIns.elements();
-        // Loop through all plugins, stop if player was created
-        while (plugins.hasMoreElements() &&
-                (player == null))
-        {
-            PlugIn tmp = (PlugIn)plugins.nextElement();
-            player = tmp.createPlayer(bdc);
-        }
-
-        if (player == null)
-        {
-            // MMA or plugins could not create player
-            bdc.disconnect();
-
-            throw new MediaException("Could not create player.");
-        }
-
-        return player;
-    }
-
-    /**
-     * Create a <code>Player</code> to play back media from an
-     * <code>InputStream</code>.
-     * <p>
-     * The <code>type</code> argument
-     * specifies the content-type of the input media.  If
-     * <code>null</code> is given, <code>Manager</code> will
-     * attempt to determine the type.  However, since determining
-     * the media type is non-trivial for some media types, it
-     * may not be feasible in some cases.  The
-     * <code>Manager</code> may throw a <code>MediaException</code>
-     * to indicate that.
-     *
-     * @param aStream The <code>InputStream</code> that delivers the
-     * input media.
-     * @param aType The <code>ContentType</code> of the media.
-     * @return A new <code>Player</code>.
-     * @exception IllegalArgumentException Thrown if <code>stream</code>
-     * is <code>null</code>.
-     * @exception MediaException Thrown if a <code>Player</code> cannot
-     * be created for the given stream and type.
-     * @exception IOException Thrown if there was a problem reading data
-     * from the <code>InputStream</code>.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to create the <code>Player</code>.
-     */
-    public Player createPlayer(InputStream aStream, String aType)
-    throws IOException, MediaException
-    {
-        if (aStream == null)
-        {
-            throw new IllegalArgumentException("InputStream is null.");
-        }
-
-        InputStreamSourceStream sourceStream =
-            new InputStreamSourceStream(aStream);
-
-        // Create data source without locator.
-        DataSource dataSource = new InputStreamDataSource(sourceStream,
-                aType);
-        InternalPlayer player = createInternalPlayer(dataSource);
-
-        if (player != null)
-        {
-            // Call preparePlayer to all plugins
-            pluginsPreparePlayer(player);
-        }
-
-        return player;
-    }
-
-    /**
-     * Play back a tone as specified by a note and its duration.
-     * A note is given in the range of 0 to 127 inclusive.  The frequency
-     * of the note can be calculated from the following formula:
-     * <pre>
-     *     SEMITONE_CONST = 17.31234049066755 = 1/(ln(2^(1/12)))
-     *     note = ln(freq/8.176)*SEMITONE_CONST
-     *     The musical note A = MIDI note 69 (0x45) = 440 Hz.
-     * </pre>
-     * This call is a non-blocking call. Notice that this method may
-     * utilize CPU resources significantly on devices that don't
-     * have hardware support for tone generation.
-     *
-     * @param aNote Defines the tone of the note as specified by the
-     * above formula.
-     * @param aDuration The duration of the tone in milli-seconds.
-     * Duration must be positive.
-     * @param aVolume Audio volume range from 0 to 100.  100 represents
-     * the maximum
-     * volume at the current hardware level.  Setting the volume to a
-     * value less
-     * than 0 will set the volume to 0.  Setting the volume to greater than
-     * 100 will set the volume to 100.
-     *
-     * @exception IllegalArgumentException Thrown if the given note or
-     * duration is out of range.
-     * @exception MediaException Thrown if the tone cannot be played
-     * due to a device-related problem.
-     */
-    public void playTone(int aNote, int aDuration, int aVolume)
-    throws MediaException
-    {
-        iPlayToneImpl.playTone(aNote, aDuration, aVolume);
-    }
-
-    /**
-     * Get the time-base object for the system.
-     * @return The system time base.
-     */
-    public TimeBase getSystemTimeBase()
-    {
-        return iSystemTimeBase;
-    }
-
-    public boolean isValidContentType(String contentType)
-    {
-        for (int i=0; i < contentType.length(); i++)
-        {
-            if ((contentType.charAt(i) >= 0 && contentType.charAt(i) <= 31) || contentType.charAt(i) == 127)
-                return false;
-        }
-        return true;
-    }
-
-
-
-// MMAPI UI 3.x req
-/**
- * get midlet state
- */
-
-	public boolean isForground()
-	{
-		return iForegroundListener.isForeground();
-	}
-
-    private native int _createManager(int aEventSourceHandle,
-                                      int aMIDletSuiteID);
-    private native int _createEventSource();
-    private native void _dispose(int aEventSourceHandle);
-
-    /**
-     * Releases native resources.
-     * @param aEventSourceHandle Handle to native CMMAEventSource instance.
-     */
-    private native void _release(int aFunctionSourceHandle);
-
-    private static native String[] _getSupportedContentTypes(int aFunctionSourceHandle,
-            int aManagerHandle,
-            String aContentType);
-
-    private static native String[] _getSupportedProtocols(int aFunctionSourceHandle,
-            int aManagerHandle,
-            String aProtocol);
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/control/MetaDataControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements functionalities defined in the
-*                MetaDataControl interface (included in
-*                javax.microedition.media.control package).
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import java.util.Vector;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * The <code>MetaDataControl</code> class implements functionalities defined
- * in the <code>MetaDataControl</code> interface (included in
- * <code>javax.microedition.media.control</code> package).
- */
-
-public class MetaDataControl
-        extends ControlImpl
-        implements javax.microedition.media.control.MetaDataControl
-{
-
-    /**
-     * The metadata keys received from the native side. It is assumed that
-     * the keys will not change during the lifetime of a media clip or
-     * stream. Key data is used so frequently that we want to buffer it
-     * here at Java side.
-     */
-    private String[] iKeys = null;
-    private static final String[] DEFAULT_DATA = { MetaDataControl.AUTHOR_KEY,
-            MetaDataControl.COPYRIGHT_KEY,
-            MetaDataControl.DATE_KEY,
-            MetaDataControl.TITLE_KEY
-                                                 };
-    private static final String DEFAULT_DATA_VALUE = "unknown";
-
-    // Static initialization
-
-    /**
-     * Creates an instance of <code>MetaDataControl</code>.
-     */
-    public MetaDataControl()
-    {
-    }
-
-    /**
-     * Returns acceptable metadata keys.
-     *
-     * The keys can be used for getting specific metadata value associated to each key.
-     *
-     * @See <code>javax.microedition.media.control.MetaDataControl</code>
-     * interface documentation for details.
-     *
-     * @return Acceptable key values.
-     *
-     */
-    public String[] getKeys()
-    {
-        checkState();
-
-        int keyCount = _getKeysCount(iEventSource, iControlHandle);
-
-        if (keyCount < 0)    // can't read key count
-        {
-            iKeys = DEFAULT_DATA;
-            return iKeys;
-        }
-
-        Vector keys = new Vector(keyCount + 1);
-
-        for (int i = 0; i < keyCount; i++)
-        {
-            String currentKey = _getKey(iEventSource, iControlHandle, i);
-            if (currentKey == null)  // can't read key value
-            {
-                iKeys = DEFAULT_DATA;
-                return iKeys;
-            }
-            keys.addElement(currentKey);
-        }
-
-        // Check if the default keys are already in the key vector
-        // and if not, then add them
-
-        for (int i = 0; i < DEFAULT_DATA.length; i++)
-        {
-            checkAddKey(keys, DEFAULT_DATA[ i ]);
-        }
-
-        iKeys = new String[ keys.size()];
-        keys.copyInto(iKeys);
-
-        return iKeys;
-    }
-
-    /**
-     * Check if there is already a key in vector and if not, then
-     * add one.
-     * @param aKeys vector containing keys to be checked and which to add
-     * new key
-     * @param aKey key string to be added if not already present in aKeys
-     */
-    private void checkAddKey(Vector aKeys, String aKey)
-    {
-        for (Enumeration e = aKeys.elements(); e.hasMoreElements();)
-        {
-            String currentElement = (String)e.nextElement();
-            if (currentElement.equals(aKey))
-            {
-                return;
-            }
-        }
-        // Otherwise add the key
-        aKeys.addElement(new String(aKey));
-    }
-
-    /**
-     * Fetches a value of the given metadata key.
-     *
-     * See <code>javax.microedition.media.control.MetaDataControl</code>
-     * interface documentation for details.
-     *
-     * @param aKey Key of the metadata value to be returned.
-     *
-     * @return Value of the metadata.
-     *
-     * @exception IllegalArgumentException Thrown if the given key is
-     * <code>null</code> or invalid.
-     */
-    public String getKeyValue(String aKey)
-    {
-        checkState();
-        if (null == aKey)
-        {
-            throw new IllegalArgumentException("Key cannot be null");
-        }
-
-        getKeys();   // Buffer the keys if not present
-
-        int arrLen = iKeys.length;
-        int i = 0;
-
-        // Check if the given key is valid and return the value.
-        while (i < arrLen)
-        {
-            if (iKeys[ i ].equals(aKey))
-            {
-                String value =  _getKeyValue(iEventSource, iControlHandle, aKey);
-
-                // if key is ok but value is null then this key does not really
-                // exist and it must be checked whether it is one from DEFAULT_DATA
-                if (value == null)
-                {
-                    for (int j = 0; j < DEFAULT_DATA.length; j++)
-                    {
-                        if (aKey.equals(DEFAULT_DATA[ j ]))
-                        {
-                            return(DEFAULT_DATA_VALUE);
-                        }
-                    }
-                }
-                return value;
-            }
-            ++i;
-        }
-
-        // No match - invalid key.
-        throw new IllegalArgumentException("Invalid non-null key");
-    }
-
-    private native int _getKeysCount(int aEventSource,
-                                     int aControlHandle);
-    private native String _getKey(int aEventSource,
-                                  int aControlHandle,
-                                  int aIndex);
-    private native String _getKeyValue(int aEventSource,
-                                       int aControlHandle,
-                                       String aKey);
-}   //end of file
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/EMCSourceInfo.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.microedition.media.protocol;
-
-import javax.microedition.media.protocol.SourceStream;
-import com.nokia.microedition.media.HttpDataSource;
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.BufferDataSource;
-import java.io.IOException;
-
-public class EMCSourceInfo
-{
-
-    // media file header
-    byte[] header;
-
-    public EMCSourceInfo(BufferDataSource datasource) throws IOException, MediaException
-    {
-        // datasource.getLocator().getMiddlePart() check if it is 3gp/mp4/rm
-        Locator locator = new Locator(datasource.getLocator());
-        String extension = getExtension(locator.getMiddlePart());
-
-
-        if (extension.equals("rm"))
-        {
-
-            // read first 5120 bytes of data and pass to native side*/
-            header = new byte[ 5120 ];
-            int bytesRead = datasource.readAndBuffer(header, 0, 5120);
-            if (bytesRead != 5120)
-            {
-                throw new IOException("Reading from HTTP server failed");
-            }
-
-        }
-        else if (extension.equals("3gp") || extension.equals("mp4"))   // 3gp/mp4
-        {
-
-            byte[] moovbox = new byte[ 512 ];
-            int bytesRead = datasource.readAndBuffer(moovbox, 0, 512);
-            if (bytesRead != 512)
-            {
-                throw new IOException("Reading from HTTP server failed");
-            }
-            String str = new String(moovbox);
-            int pos = str.indexOf("moov");
-
-            if (pos == -1)
-            {
-
-                return; // moov box not in first 512 bytes, not a streaming profile
-
-            }
-            else
-            {
-
-                // **************   extract filetype length
-                int byte1 = moovbox[0]<0?(256 + moovbox[0]):moovbox[0];
-                int byte2 = moovbox[1]<0?(256 + moovbox[1]):moovbox[1];
-                int byte3 = moovbox[2]<0?(256 + moovbox[2]):moovbox[2];
-                int byte4 = moovbox[3]<0?(256 + moovbox[3]):moovbox[3];
-
-                byte1 = byte1 * 16777216;
-                byte2 = byte2 * 65536;
-                byte3 = byte3 * 256;
-                byte4 = byte4 * 1;
-
-                int filetype = byte1 + byte2 + byte3 + byte4;
-                if (filetype < 0)
-                {
-
-                    return;
-                }
-
-                // **************  extract moovbox length
-                byte1 = moovbox[pos-4]<0?(256 + moovbox[pos-4]):moovbox[pos-4];
-                byte2 = moovbox[pos-3]<0?(256 + moovbox[pos-3]):moovbox[pos-3];
-                byte3 = moovbox[pos-2]<0?(256 + moovbox[pos-2]):moovbox[pos-2];
-                byte4 = moovbox[pos-1]<0?(256 + moovbox[pos-1]):moovbox[pos-1];
-
-                byte1 = byte1 * 16777216;
-                byte2 = byte2 * 65536;
-                byte3 = byte3 * 256;
-                byte4 = byte4 * 1;
-
-                int moovboxlen = byte1 + byte2 + byte3 + byte4;
-                if (moovboxlen < 0)
-                {
-
-                    return;
-                }
-
-                // **************
-
-                // no. of bytes: total header length
-                int nob = filetype + moovboxlen;
-                if (nob < 0)
-                {
-
-                    return;
-                }
-
-                header = new byte[nob];
-                System.arraycopy(moovbox, 0, header, 0, 512);
-                moovbox = null;
-                bytesRead = datasource.readAndBuffer(header, 512, nob-512);
-                if (bytesRead != nob-512)
-                {
-                    throw new IOException();
-                }
-            }
-        }
-        else
-        {
-
-            return;
-        }
-    }
-
-    private String getExtension(String locator)
-    {
-        int index = locator.lastIndexOf('.');
-        if (index == -1) return "";
-
-        try
-        {
-
-            return locator.substring(index + 1);
-
-        }
-        catch (IndexOutOfBoundsException ex)
-        {
-            //ignore
-        }
-
-        return "";
-    }
-
-    public void writeInfo(int eventsourcehandle, int managerhandle) throws MediaException
-    {
-        int err = 0;
-
-        if (header != null)
-        {
-
-            err = _writeHeaderData(eventsourcehandle, managerhandle, header);
-
-        }
-
-        if (err != 0)
-        {
-
-            throw new MediaException(
-                "Could not create player, Symbian OS error: " + err);
-        }
-    }
-
-    private native int _writeHeaderData(int aEventsourcehandle, int aManagerHandle, byte[] header);
-
-}
-
-// END OF FILE
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/http/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements TimeBase
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.http;
-
-
-
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.protocol.ConnectorProtocol;
-import com.nokia.microedition.media.HttpDataSource;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.BufferDataSource;
-import com.nokia.microedition.media.protocol.EMCSourceInfo;
-
-public class Protocol extends ConnectorProtocol
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        HttpDataSource dataSource = new HttpDataSource(aLocator);
-        BufferDataSource bdc = new BufferDataSource(dataSource);
-        (new EMCSourceInfo(bdc)).writeInfo(ManagerImpl.getEventSource(), ManagerImpl.getHandle());
-        return ManagerImpl.getInstance().createInternalPlayer(bdc);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/protocol/https/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements TimeBase
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.https;
-
-
-
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.protocol.ConnectorProtocol;
-import com.nokia.microedition.media.HttpDataSource;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.BufferDataSource;
-import com.nokia.microedition.media.protocol.EMCSourceInfo;
-
-public class Protocol extends ConnectorProtocol
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        HttpDataSource dataSource = new HttpDataSource(aLocator);
-        BufferDataSource bdc = new BufferDataSource(dataSource);
-        (new EMCSourceInfo(bdc)).writeInfo(ManagerImpl.getEventSource(), ManagerImpl.getHandle());
-        return ManagerImpl.getInstance().createInternalPlayer(bdc);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/BufferDataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Buffered DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.protocol.SourceStream;
-import java.io.IOException;
-
-/**
- * BufferDataSource is used to read header from DataSource's SourceStream.
- * This class delegates all method calls to DataSource given in constructor
- * except getStream method which returns buffered SourceStream.
- */
-public class BufferDataSource extends DataSource
-{
-    // delegated source
-    protected DataSource iDataSource;
-
-    // buffers DataSource's first stream.
-    protected BufferSourceStream iSourceStream;
-
-    /**
-     * Constructor.
-     * @param aDataSource delegated DataSource
-     */
-    public BufferDataSource(DataSource aDataSource) throws IOException
-    {
-        super(aDataSource.getLocator());
-        iDataSource = aDataSource;
-        SourceStream ss = aDataSource.getStreams()[ 0 ];
-        iSourceStream = new BufferSourceStream(ss);
-    }
-
-    /**
-     * Return header data.
-     * @return header data
-     */
-    public byte[] getHeader() throws IOException
-    {
-        return iSourceStream.getHeader();
-    }
-
-    /**
-     * from DataSource
-     * @return Content Type
-     * @see DataSource
-     */
-    public String getContentType()
-    {
-        return iDataSource.getContentType();
-    }
-
-    /**
-     * from DataSource
-     * Connect to the stream
-     * @throws IOException
-     * @see DataSource
-     */
-    public void connect() throws IOException
-    {
-        iDataSource.connect();
-    }
-
-    /**
-     * from DataSource
-     * Disconnect from the stream
-     */
-    public void disconnect()
-    {
-        iDataSource.disconnect();
-    }
-
-    /**
-     * from DataSource
-     * Put DataSource to STARTED state
-     * @throws IOException Throw if DataSource is in wrong state
-     * @see DataSource
-     */
-    public void start() throws IOException
-    {
-        iDataSource.start();
-    }
-
-    /**
-     * from DataSource
-     * Stops DataSource
-     * @see DataSource
-     */
-    public void stop() throws IOException
-    {
-        iDataSource.stop();
-    }
-
-    /**
-     * from DataSource
-     * return sourceStreams of the DataSource
-     *
-     * @return set of source streams
-     * @see DataSource
-     */
-    public SourceStream[] getStreams()
-    {
-        // return all streams from delegated DataSource except first
-        // buffered stream.
-        SourceStream[] originalStreams = iDataSource.getStreams();
-        SourceStream[] streams = new SourceStream[ originalStreams.length ];
-        System.arraycopy(originalStreams, 0,
-                         streams, 0, originalStreams.length);
-        streams[ 0 ] = iSourceStream;
-        return streams;
-    }
-
-    /**
-     * from interface Controllable
-     * Method return controls of the DataSource
-     * @return Control
-     * @see Controllable
-     * @see DataSource
-     */
-    public Control[] getControls()
-    {
-        return iDataSource.getControls();
-    }
-
-    /**
-     * from interface Controllable
-     * Return a control by the Control Type, not supported
-     * @param controlType type of the control
-     * @return Control
-     */
-    public Control getControl(String aControlType)
-    {
-        return iDataSource.getControl(aControlType);
-    }
-
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/BufferSourceStream.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 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:  SourceStream that buffers data from another SourceStream.
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import javax.microedition.media.protocol.SourceStream;
-
-/**
- * SourceStream that buffers data from another SourceStream.
- *
- */
-public class BufferSourceStream extends InputStreamSourceStream
-{
-    // Deferred buffer size
-    private static final int BUFFER_SIZE = 5120;
-
-    // Stream to buffer
-    SourceStream iSourceStream;
-
-    byte[] iBuffer;
-
-    // stream read position
-    int iPos;
-
-    /**
-     * Constructor.
-     * @param aInputStream An InputStream
-     */
-    public BufferSourceStream(SourceStream aSourceStream)
-    {
-        iSourceStream = aSourceStream;
-    }
-
-    /**
-     * Return header data.
-     * @return header data
-     */
-    public byte[] getHeader() throws IOException
-    {
-        // Read header if this method is called for the first time
-        if (iBuffer == null)
-        {
-            byte[] tmpBuffer = new byte[ BUFFER_SIZE ];
-
-            int bytesInBuffer = iSourceStream.read(tmpBuffer, 0, BUFFER_SIZE);
-
-            // bytesInBuffer is the total number of bytes read into the buffer,
-            // or -1 if there is no more data because the end of the stream has
-            // been reached.
-            if (bytesInBuffer >= 0)
-            {
-                iBuffer = new byte[ bytesInBuffer ];
-
-                System.arraycopy(tmpBuffer, 0,
-                                 iBuffer, 0, bytesInBuffer);
-            }
-            else
-            {
-                throw new IOException();
-            }
-        }
-        return iBuffer;
-    }
-
-    /**
-     * Read from Input Stream
-     * @param buffer Input Stream
-     * @param offset where reading starts
-     * @param length length of read data
-     * @return bytes read
-     * @throws IOException
-     */
-    public int read(byte[] aBuffer, int aOffset, int aLength) throws IOException
-    {
-        // bytes read from internal buffer
-        int bytesFromBuffer = 0;
-
-
-        if ((iBuffer != null) &&   // read from iBuffer if getHeader is called
-                (iPos < iBuffer.length))
-        {
-            // Need to read from buffer
-            if (aLength < iBuffer.length - iPos)
-            {
-                // aLength bytes can be read from buffer
-                bytesFromBuffer = aLength;
-            }
-            else
-            {
-                // aLength cannot be read from buffer
-                // read all there is available
-                bytesFromBuffer = iBuffer.length - iPos;
-            }
-
-            System.arraycopy(iBuffer, iPos,
-                             aBuffer, aOffset, bytesFromBuffer);
-
-            // move stream position
-            iPos += bytesFromBuffer;
-            return bytesFromBuffer;
-        }
-
-        // bytes read from iSourceStream
-        int bytesFromStream = 0;
-        // Check if bytes are needed from SourceStream
-        if (bytesFromBuffer < aLength)
-        {
-            bytesFromStream = iSourceStream.read(aBuffer,
-                                                 bytesFromBuffer,
-                                                 aLength - bytesFromBuffer);
-            if (bytesFromStream != -1)
-            {
-                // move stream position, if not end of stream
-                iPos += bytesFromStream;
-            }
-        }
-
-        return bytesFromStream;
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/ManagerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,675 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Vector;
-import java.util.Enumeration;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.TimeBase;
-import javax.microedition.media.Player;
-import javax.microedition.media.MediaException;
-
-//import com.symbian.lcdjava.lang.ObjectExtensions;
-//import com.symbian.epoc.events.MIDEventServer;
-//import com.symbian.midp.runtime.ToolkitInvoker;
-//import com.symbian.midp.runtime.ToolkitObserver;
-
-import com.nokia.microedition.media.protocol.ProtocolFactory;
-import com.nokia.microedition.media.tone.PlayToneImpl;
-import com.nokia.microedition.volumekeys.ForegroundListener;
-import com.nokia.mj.impl.rt.support.Finalizer;
-
-//To get the shutdown event from the midlet
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-import com.nokia.mj.impl.rt.support.ApplicationInfo;
-import com.nokia.mj.impl.rt.support.ShutdownListener;
-
-/**
- * ManagerImpl implements the functionality specified in
- * javax.microedition.media.Manager class.
- * This class is a singleton and instance can be got with getInstance method.
- */
-public class ManagerImpl implements PlugIn
-{
-    // ManagerImpl native instance
-    private static int sManagerHandle;
-
-    // CMMAEventSource
-    private static int iFunctionSourceHandle;
-
-    // Static instance, can be got with getInstace method
-    private static ManagerImpl sManager;
-
-    private final TimeBase iSystemTimeBase = new SystemTimeBase();
-
-    private final Vector iPlugIns = new Vector();
-    private final ProtocolFactory iProtocolFactory = new ProtocolFactory();
-    private final ForegroundListener iForegroundListener;
-    private Finalizer iFinalizer;
-
-    Finalizer registerForFinalization()
-    {
-        return new Finalizer()
-        {
-        public void finalizeImpl()
-        {
-            doFinalize();
-        }
-    };
-    }
-
-    // Play tone implementation
-    private PlayToneImpl iPlayToneImpl = new PlayToneImpl();
-
-    static
-        {
-
-			try{
-				com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javalegacyutils");
-			}
-			catch(Exception e)
-			{
-				System.out.println("loading javalegacyutils failed.....");
-			}
-		System.out.println("inside static block of ManagerImpl.java");
-        // This is called when class is loaded for the first time
-        sManager = new ManagerImpl();
-        try
-        {
-            // Invoke external components
-            Setup.setup(iFunctionSourceHandle);
-        }
-        catch (OutOfMemoryError oome)
-        {
-            // External setup failed clean MMA native resources and throw oome
-            sManager.doFinalize();
-            throw oome;
-        }
-    }
-
-    /**
-     * This private constructor can be called only from staic block.
-     */
-    private ManagerImpl()
-    {
-        // Will cause registeredFinalize() to be called when ObjectExtensions
-        // is finalized.
-
-
-        com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javamobilemedia");
-        //ObjectExtensions.registerForFinalization(this);
-        iFinalizer = registerForFinalization();
-
-        // Event server contructor needs new String object,
-        // otherwise it don't work..
-
-        iFunctionSourceHandle = _createEventSource();
-        if (iFunctionSourceHandle < NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError("Symbian OS error: " + sEventSourceHandle);
-        }
-
-        sManagerHandle = _createManager(iFunctionSourceHandle,
-                                        ApplicationInfo.getInstance().getSuiteUid().hashCode());
-        if (sManagerHandle < NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError();
-        }
-        //Use ShutdownListener to get notification of exit and release the resource
-		//MMAPI UI 3.x work
-
-		 setShutdownListener();
-
-        // ManagerImpl is also a PlugIn that getAllSupportedContentTypes,
-        // getAllSupportedProtocols and createPlayer methods can be used
-        // through PlugIn interface.
-        iPlugIns.addElement(this);
-
-        // support for device://tone and jts
-        iPlugIns.addElement(
-            new com.nokia.microedition.media.protocol.device.tone.Protocol());
-
-        // Create foreground listener which listens the state of the midlet
-        // This feature is a part of the media keys feature so it is flagged
-         System.out.println("before constructing ForegroundListener....");
-         iForegroundListener = new ForegroundListener(iFunctionSourceHandle);
-        iForegroundListener.init();
-    }
-
-    /**
-     * Returns MMA event source handle
-     */
-    public static int getEventSource()
-    {
-        return iFunctionSourceHandle;
-    }
-    /**
-     * Returns native handle to Manager
-     */
-    public static int getHandle()
-    {
-        return sManagerHandle;
-    }
-
-    /**
-     * Return ManagerImpl instance
-     */
-    public static ManagerImpl getInstance()
-    {
-        return sManager;
-    }
-
-    /**
-     * Adds new PlugIn to PlugIns array.
-     * @param aPlugIn New PlugIn.
-     */
-    public void addPlugIn(PlugIn aPlugIn)
-    {
-        iPlugIns.addElement(aPlugIn);
-    }
-
-
-
-
-    /**
-     * This will be called when ObjectExtensions is finalized.
-     */
-    synchronized final void doFinalize()
-    {
-	_dispose(iFunctionSourceHandle);
-	iFunctionSourceHandle = 0;
-    }
-
-    /**
-     * This method is called in Toolkit's destroyNotify call.
-     * This will release convenient native resources. All native resource
-     * will be deleted in registeredFinalize() method.
-     */
-    synchronized final void release()
-    {
-        _release(iFunctionSourceHandle);
-    }
-
-    /**
-     * Create String array from Vector and remove String duplicates.
-     * @param aVector Vector containing String objects.
-     */
-    private String[] createStringArray(Vector aVector)
-    {
-        // remove all duplicates from the vector
-        for (int i = 0; i < aVector.size(); i++)
-        {
-            String element = (String)aVector.elementAt(i);
-            for (int j = i + 1; j < aVector.size();)
-            {
-                if (element.equals((String)aVector.elementAt(j)))
-                {
-                    aVector.removeElementAt(j);
-                }
-                else
-                {
-                    j++;
-                }
-            }
-        }
-
-        // Create new array for vector elements and copy elements
-        String[] s = new String[ aVector.size()];
-        aVector.copyInto(s);
-        return s;
-    }
-
-    /**
-     * Return the list of supported content types for the given protocol.
-     * <p>
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content types returned.
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocol used.
-     * <p>
-     * For example, if the given <code>protocol</code>
-     * is <code>"http"</code>,
-     * then the supported content types that can be played back
-     * with the <code>http</code> protocol will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the <code>protocol</code>,
-     * all the supported content types for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>protocol</code> is an invalid or
-     * unsupported protocol, then an empty array will be returned.
-     *
-     * @param aProtocol The input protocol for the supported content types.
-     * @return The list of supported content types for the given protocol.
-     */
-    public String[] getAllSupportedContentTypes(String aProtocol)
-    {
-        if ((aProtocol != null) && (aProtocol.length() == 0))
-        {
-            // No supported types for 0 length string.
-            return new String[ 0 ];
-        }
-        Vector contentTypes = new Vector();
-
-        Enumeration plugIns = iPlugIns.elements();
-
-        // go through all plugins and get content types
-        while (plugIns.hasMoreElements())
-        {
-            PlugIn plugIn = (PlugIn)plugIns.nextElement();
-            String[] types = plugIn.getSupportedContentTypes(aProtocol);
-
-            // Add all types to vector
-            for (int i = 0; i < types.length; i++)
-            {
-                contentTypes.addElement(types[ i ]);
-            }
-        }
-        return createStringArray(contentTypes);
-    }
-
-    /**
-     * Return the list of supported protocols given the content
-     * type.  The protocols are returned
-     * as strings which identify what locators can be used for creating
-     * <code>Player</code>'s.
-     * <p>
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocols returned.
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content type used.
-     * <p>
-     * For example, if the given <code>content_type</code>
-     * is <code>"audio/x-wav"</code>, then the supported protocols
-     * that can be used to play back <code>audio/x-wav</code>
-     * will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the
-     * <code>content_type</code>,
-     * all the supported protocols for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>content_type</code> is an invalid or
-     * unsupported content type, then an empty array will be returned.
-     *
-     * @param aContentType The content type for the supported protocols.
-     * @return The list of supported protocols for the given content type.
-     */
-    public String[] getAllSupportedProtocols(String aContentType)
-    {
-        String contentType = aContentType;
-        if ((contentType != null) &&  contentType.equals(""))
-        {
-            return new String[ 0 ];
-        }
-
-        Vector protocols = new Vector();
-        Enumeration plugIns = iPlugIns.elements();
-        while (plugIns.hasMoreElements())
-        {
-            PlugIn plugIn = (PlugIn)plugIns.nextElement();
-            String[] types = plugIn.getSupportedProtocols(aContentType);
-            for (int i = 0; i < types.length; i++)
-            {
-                protocols.addElement(types[ i ]);
-            }
-        }
-        return createStringArray(protocols);
-    }
-
-    /**
-     * From PlugIn. Get MMA supported protocols.
-     */
-    public String[] getSupportedProtocols(String aContentType)
-    {
-        String[] protocols = _getSupportedProtocols(iFunctionSourceHandle,
-                             sManagerHandle,
-                             aContentType);
-        NativeError.checkOOM(protocols);
-        return protocols;
-    }
-
-    /**
-     * From PlugIn. Get MMA supported types.
-     */
-    public String[] getSupportedContentTypes(String aProtocol)
-    {
-        String[] types = _getSupportedContentTypes(iFunctionSourceHandle,
-                         sManagerHandle,
-                         aProtocol);
-        NativeError.checkOOM(types);
-        return types;
-    }
-
-    /**
-     * From PlugIn.
-     */
-    public InternalPlayer createPlayer(DataSource aSource)
-    throws MediaException, IOException
-    {
-        InternalPlayer player = null;
-        if (aSource.getContentType() != null)
-        {
-            // Create player from content type
-            if (isValidContentType(aSource.getContentType()))
-            {
-                player = NativePlayerFactory.createPlayer(aSource.getContentType(),
-                         aSource);
-            }
-            else
-            {
-                throw new MediaException(
-                    "Content type not supported: " + aSource.getContentType());
-            }
-        }
-
-        if ((player == null) &&
-                (aSource.getLocator() != null))
-        {
-            // Create player from locator
-            player = NativePlayerFactory.createPlayer(
-                         new Locator(aSource.getLocator()),
-                         aSource);
-        }
-
-        if (player == null)
-        {
-            // Could not create player from content-type or locator,
-            // try to create player from header data
-            player = NativePlayerFactory.createPlayer(
-                         ((BufferDataSource)aSource).getHeader(),
-                         aSource);
-        }
-
-        return player;
-    }
-
-    /**
-     * From PlugIn. Empty implemation.
-     */
-    public void preparePlayer(InternalPlayer aPlayer) throws MediaException
-    {
-
-    }
-
-    /**
-     * This method calls preparePlayer to all PlugIns.
-     */
-    private void pluginsPreparePlayer(InternalPlayer aPlayer)
-    throws MediaException
-    {
-        // Call preparePlayer to all plugins
-        Enumeration plugins = iPlugIns.elements();
-        while (plugins.hasMoreElements())
-        {
-            ((PlugIn)plugins.nextElement()).preparePlayer(aPlayer);
-        }
-    }
-
-    /**
-     * Create a <code>Player</code> from an input locator.
-     *
-     * @param aLocator A locator string in URI syntax that describes
-     * the media content.
-     * @return A new <code>Player</code>.
-     * @exception IllegalArgumentException Thrown if <code>locator</code>
-     * is <code>null</code>.
-     * @exception MediaException Thrown if a <code>Player</code> cannot
-     * be created for the given locator.
-     * @exception IOException Thrown if there was a problem connecting
-     * with the source pointed to by the <code>locator</code>.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to create the <code>Player</code>.
-     */
-    public Player createPlayer(String aLocator)
-    throws IOException, MediaException
-    {
-        if (aLocator == null)
-        {
-            throw new IllegalArgumentException("Locator is null.");
-        }
-        InternalPlayer player = iProtocolFactory.createPlayer(
-                                    new Locator(aLocator));
-        if (player == null)
-        {
-            throw new MediaException("Locator not supported: " +
-                                     aLocator);
-        }
-        pluginsPreparePlayer(player);
-        return player;
-    }
-
-    /**
-     * Create a <code>InternalPlayer</code> for a <code>DataSource</code>.
-     */
-    public InternalPlayer createInternalPlayer(DataSource aSource)
-    throws IOException, MediaException
-    {
-        // Throw IllegalArgumentException if source  is null.
-        if (aSource == null)
-        {
-            throw new IllegalArgumentException("DataSource is null.");
-        }
-        aSource.connect(); // Ensure that external source is connected.
-        if (aSource.getStreams() == null ||
-                aSource.getStreams().length == 0)
-        {
-            // There must be atleast one stream in the DataSource
-            throw new MediaException(
-                "There must be at least one stream in datasource");
-        }
-
-        BufferDataSource bdc = new BufferDataSource(aSource);
-
-        InternalPlayer player = null;
-        Enumeration plugins = iPlugIns.elements();
-        // Loop through all plugins, stop if player was created
-        while (plugins.hasMoreElements() &&
-                (player == null))
-        {
-            PlugIn tmp = (PlugIn)plugins.nextElement();
-            player = tmp.createPlayer(bdc);
-        }
-
-        if (player == null)
-        {
-            // MMA or plugins could not create player
-            bdc.disconnect();
-
-            throw new MediaException("Could not create player.");
-        }
-
-        return player;
-    }
-
-    /**
-     * Create a <code>Player</code> to play back media from an
-     * <code>InputStream</code>.
-     * <p>
-     * The <code>type</code> argument
-     * specifies the content-type of the input media.  If
-     * <code>null</code> is given, <code>Manager</code> will
-     * attempt to determine the type.  However, since determining
-     * the media type is non-trivial for some media types, it
-     * may not be feasible in some cases.  The
-     * <code>Manager</code> may throw a <code>MediaException</code>
-     * to indicate that.
-     *
-     * @param aStream The <code>InputStream</code> that delivers the
-     * input media.
-     * @param aType The <code>ContentType</code> of the media.
-     * @return A new <code>Player</code>.
-     * @exception IllegalArgumentException Thrown if <code>stream</code>
-     * is <code>null</code>.
-     * @exception MediaException Thrown if a <code>Player</code> cannot
-     * be created for the given stream and type.
-     * @exception IOException Thrown if there was a problem reading data
-     * from the <code>InputStream</code>.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to create the <code>Player</code>.
-     */
-    public Player createPlayer(InputStream aStream, String aType)
-    throws IOException, MediaException
-    {
-        if (aStream == null)
-        {
-            throw new IllegalArgumentException("InputStream is null.");
-        }
-
-        InputStreamSourceStream sourceStream =
-            new InputStreamSourceStream(aStream);
-
-        // Create data source without locator.
-        DataSource dataSource = new InputStreamDataSource(sourceStream,
-                aType);
-        InternalPlayer player = createInternalPlayer(dataSource);
-
-        if (player != null)
-        {
-            // Call preparePlayer to all plugins
-            pluginsPreparePlayer(player);
-        }
-
-        return player;
-    }
-
-    /**
-     * Play back a tone as specified by a note and its duration.
-     * A note is given in the range of 0 to 127 inclusive.  The frequency
-     * of the note can be calculated from the following formula:
-     * <pre>
-     *     SEMITONE_CONST = 17.31234049066755 = 1/(ln(2^(1/12)))
-     *     note = ln(freq/8.176)*SEMITONE_CONST
-     *     The musical note A = MIDI note 69 (0x45) = 440 Hz.
-     * </pre>
-     * This call is a non-blocking call. Notice that this method may
-     * utilize CPU resources significantly on devices that don't
-     * have hardware support for tone generation.
-     *
-     * @param aNote Defines the tone of the note as specified by the
-     * above formula.
-     * @param aDuration The duration of the tone in milli-seconds.
-     * Duration must be positive.
-     * @param aVolume Audio volume range from 0 to 100.  100 represents
-     * the maximum
-     * volume at the current hardware level.  Setting the volume to a
-     * value less
-     * than 0 will set the volume to 0.  Setting the volume to greater than
-     * 100 will set the volume to 100.
-     *
-     * @exception IllegalArgumentException Thrown if the given note or
-     * duration is out of range.
-     * @exception MediaException Thrown if the tone cannot be played
-     * due to a device-related problem.
-     */
-    public void playTone(int aNote, int aDuration, int aVolume)
-    throws MediaException
-    {
-        iPlayToneImpl.playTone(aNote, aDuration, aVolume);
-    }
-
-    /**
-     * Get the time-base object for the system.
-     * @return The system time base.
-     */
-    public TimeBase getSystemTimeBase()
-    {
-        return iSystemTimeBase;
-    }
-
-    public boolean isValidContentType(String contentType)
-    {
-        for (int i=0; i < contentType.length(); i++)
-        {
-            if ((contentType.charAt(i) >= 0 && contentType.charAt(i) <= 31) || contentType.charAt(i) == 127)
-                return false;
-        }
-        return true;
-    }
-
-
-
-/**
- * Registers for shutdown listener
- */
-	    private void setShutdownListener()
-	    {
-	         // Get the instance of ApplicationUtils.
-	        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-
-	        // add the listener
-	        appUtils.addShutdownListener(new ShutdownListener()
-	        {
-	            public void shuttingDown()
-	            {
-	               try
-	                {
-						System.out.println("Shutting down..........");
-	                    // Do cleaning...
-	                    release();
-	                }
-	                catch (Exception ex)
-	                {
-	                    // catch the exception and call dispose
-	                }
-
-	                if (iFunctionSourceHandle != 0)
-	                {
-	                   _dispose(iFunctionSourceHandle);
-       				  iFunctionSourceHandle = 0;
-	                }
-	            }
-
-	        });
-	    } // end setShutdownListener()
-
-
-// MMAPI UI 3.x req
-/**
- * get midlet state
- */
-
-	public boolean isForground()
-	{
-		return iForegroundListener.isForeground();
-	}
-
-
-    private native int _createManager(int aEventSourceHandle,
-                                      int aMIDletSuiteID);
-    private native int _createEventSource();
-    private native void _dispose(int aEventSourceHandle);
-
-    /**
-     * Releases native resources.
-     * @param aEventSourceHandle Handle to native CMMAEventSource instance.
-     */
-    private native void _release(int aFunctionSourceHandle);
-
-    private static native String[] _getSupportedContentTypes(int aFunctionSourceHandle,
-            int aManagerHandle,
-            String aContentType);
-
-    private static native String[] _getSupportedProtocols(int aFunctionSourceHandle,
-            int aManagerHandle,
-            String aProtocol);
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/control/MetaDataControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements functionalities defined in the
-*                MetaDataControl interface (included in
-*                javax.microedition.media.control package).
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import java.util.Vector;
-import java.util.Enumeration;
-
-// CLASS DEFINITION
-/**
- * The <code>MetaDataControl</code> class implements functionalities defined
- * in the <code>MetaDataControl</code> interface (included in
- * <code>javax.microedition.media.control</code> package).
- */
-
-public class MetaDataControl
-        extends ControlImpl
-        implements javax.microedition.media.control.MetaDataControl
-{
-
-    /**
-     * The metadata keys received from the native side. It is assumed that
-     * the keys will not change during the lifetime of a media clip or
-     * stream. Key data is used so frequently that we want to buffer it
-     * here at Java side.
-     */
-    private String[] iKeys = null;
-    private static final String[] DEFAULT_DATA = { MetaDataControl.AUTHOR_KEY,
-            MetaDataControl.COPYRIGHT_KEY,
-            MetaDataControl.DATE_KEY,
-            MetaDataControl.TITLE_KEY
-                                                 };
-    private static final String DEFAULT_DATA_VALUE = "unknown";
-
-    // Static initialization
-
-    /**
-     * Creates an instance of <code>MetaDataControl</code>.
-     */
-    public MetaDataControl()
-    {
-    }
-
-    /**
-     * Returns acceptable metadata keys.
-     *
-     * The keys can be used for getting specific metadata value associated to each key.
-     *
-     * @See <code>javax.microedition.media.control.MetaDataControl</code>
-     * interface documentation for details.
-     *
-     * @return Acceptable key values.
-     *
-     */
-    public String[] getKeys()
-    {
-        checkState();
-        // Get the keys only if not yet buffered.
-        if (null == iKeys)
-        {
-            int keyCount = _getKeysCount(iEventSource, iControlHandle);
-
-            if (keyCount < 0)    // can't read key count
-            {
-                iKeys = DEFAULT_DATA;
-                return iKeys;
-            }
-
-            Vector keys = new Vector(keyCount + 1);
-
-            for (int i = 0; i < keyCount; i++)
-            {
-                String currentKey = _getKey(iEventSource, iControlHandle, i);
-                if (currentKey == null)  // can't read key value
-                {
-                    iKeys = DEFAULT_DATA;
-                    return iKeys;
-                }
-                keys.addElement(currentKey);
-            }
-
-            // Check if the default keys are already in the key vector
-            // and if not, then add them
-
-            for (int i = 0; i < DEFAULT_DATA.length; i++)
-            {
-                checkAddKey(keys, DEFAULT_DATA[ i ]);
-            }
-
-            iKeys = new String[ keys.size()];
-            keys.copyInto(iKeys);
-        }
-        return iKeys;
-    }
-
-    /**
-     * Check if there is already a key in vector and if not, then
-     * add one.
-     * @param aKeys vector containing keys to be checked and which to add
-     * new key
-     * @param aKey key string to be added if not already present in aKeys
-     */
-    private void checkAddKey(Vector aKeys, String aKey)
-    {
-        for (Enumeration e = aKeys.elements(); e.hasMoreElements();)
-        {
-            String currentElement = (String)e.nextElement();
-            if (currentElement.equals(aKey))
-            {
-                return;
-            }
-        }
-        // Otherwise add the key
-        aKeys.addElement(new String(aKey));
-    }
-
-    /**
-     * Fetches a value of the given metadata key.
-     *
-     * See <code>javax.microedition.media.control.MetaDataControl</code>
-     * interface documentation for details.
-     *
-     * @param aKey Key of the metadata value to be returned.
-     *
-     * @return Value of the metadata.
-     *
-     * @exception IllegalArgumentException Thrown if the given key is
-     * <code>null</code> or invalid.
-     */
-    public String getKeyValue(String aKey)
-    {
-        checkState();
-        if (null == aKey)
-        {
-            throw new IllegalArgumentException("Key cannot be null");
-        }
-
-        getKeys();   // Buffer the keys if not present
-
-        int arrLen = iKeys.length;
-        int i = 0;
-
-        // Check if the given key is valid and return the value.
-        while (i < arrLen)
-        {
-            if (iKeys[ i ].equals(aKey))
-            {
-                String value =  _getKeyValue(iEventSource, iControlHandle, aKey);
-
-                // if key is ok but value is null then this key does not really
-                // exist and it must be checked whether it is one from DEFAULT_DATA
-                if (value == null)
-                {
-                    for (int j = 0; j < DEFAULT_DATA.length; j++)
-                    {
-                        if (aKey.equals(DEFAULT_DATA[ j ]))
-                        {
-                            return(DEFAULT_DATA_VALUE);
-                        }
-                    }
-                }
-                return value;
-            }
-            ++i;
-        }
-
-        // No match - invalid key.
-        throw new IllegalArgumentException("Invalid non-null key");
-    }
-
-    private native int _getKeysCount(int aEventSource,
-                                     int aControlHandle);
-    private native String _getKey(int aEventSource,
-                                  int aControlHandle,
-                                  int aIndex);
-    private native String _getKeyValue(int aEventSource,
-                                       int aControlHandle,
-                                       String aKey);
-}   //end of file
-
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/protocol/http/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements TimeBase
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.http;
-
-
-
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.protocol.ConnectorProtocol;
-import com.nokia.microedition.media.HttpDataSource;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ManagerImpl;
-
-public class Protocol extends ConnectorProtocol
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        HttpDataSource dataSource = new HttpDataSource(aLocator);
-        return ManagerImpl.getInstance().createInternalPlayer(dataSource);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc.mmf/com/nokia/microedition/media/protocol/https/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements TimeBase
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.https;
-
-
-
-
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.protocol.ConnectorProtocol;
-import com.nokia.microedition.media.HttpDataSource;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ManagerImpl;
-
-public class Protocol extends ConnectorProtocol
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        HttpDataSource dataSource = new HttpDataSource(aLocator);
-        return ManagerImpl.getInstance().createInternalPlayer(dataSource);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/ConnectorDataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is an imlementation of DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.MediaException;
-import java.io.IOException;
-import javax.microedition.io.StreamConnection;
-import javax.microedition.io.Connection;
-import javax.microedition.io.Connector;
-import javax.microedition.io.ConnectionNotFoundException;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * DataSource that uses Connector to create connections and
- * InputStreams.
- */
-public class ConnectorDataSource extends InputStreamDataSource
-{
-    // Connection object.
-    StreamConnection iConnection;
-
-    /**
-     * Constructor.
-     * @param aLocator Locator to connect.
-     */
-    public ConnectorDataSource(Locator aLocator)
-    throws IOException, MediaException
-    {
-        super(aLocator.getLocatorString());
-        open(); // open iConnection
-        iSourceStream = new InputStreamSourceStream(
-            iConnection.openInputStream());
-    }
-
-    /**
-     * Open connection and initialize
-     */
-    protected void open() throws IOException, MediaException
-    {
-        try
-        {
-            Connection connection = Connector.open(getLocator(),
-                                                   Connector.READ);
-
-            // derived classes may do additional checks
-            checkConnection(connection);
-
-            // Only StreamConnection is supported
-            iConnection = (StreamConnection)connection;
-        }
-        catch (ConnectionNotFoundException cnfe)
-        {
-            // ConnectionNotFoundException extends IOException,
-            // we must throw MediaException in this case.
-            throw new MediaException(
-                "Connection could not be found, " + cnfe.getMessage());
-        }
-        catch (IllegalArgumentException iae)
-        {
-            // IllegalArgumentException can be thrown only if
-            // connector or stream is null.
-            throw new MediaException(
-                "Connector stream is null, " + iae.getMessage());
-        }
-        catch (ClassCastException cce)
-        {
-            // Returned connection object was not StreamConnection
-            // or connection was not supported in checkConnection method.
-            throw new MediaException(cce.getMessage());
-        }
-    }
-
-    /**
-     * from DataSource
-     * Connect to the stream
-     * @throws IOException
-     * @see DataSource
-     */
-    public void connect() throws IOException
-    {
-        // if connection is not null source is already connected.
-        if (iConnection == null)
-        {
-            try
-            {
-                open();
-                iSourceStream.setStream(iConnection.openInputStream());
-            }
-            catch (MediaException me)
-            {
-                // MediaException cannot be thrown from this method.
-                throw new IOException(
-                    "failed to connect to stream, " + me.getMessage());
-            }
-        }
-    }
-
-    /**
-     * from DataSource
-     * Disconnect from the stream
-     */
-    public void disconnect()
-    {
-        // If iConnection is null disconnect is already called.
-        if (iConnection != null)
-        {
-            try
-            {
-                iSourceStream.close();
-            }
-            catch (IOException ioe)
-            {
-                // disconnect cannot throw any exception and because source will
-                // be disconnected in Player's close or deallocate which can't
-                // throw exceptions we have to hide the exception.
-                Logger.WLOG(Logger.EJavaMMAPI,
-                            "MMA::ConnectorDataSource::disconnect failed ", ioe);
-            }
-            try
-            {
-                iConnection.close();
-                // source is disconnected and may be reconnected
-                iConnection = null;
-            }
-            catch (IOException ioe)
-            {
-                // disconnect cannot throw any exception and because source will
-                // be disconnected in Player's close or deallocate which can't
-                // throw exceptions we have to hide the exception.
-                Logger.WLOG(Logger.EJavaMMAPI,
-                            "MMA::ConnectorDataSource::disconnect failed ", ioe);
-            }
-        }
-    }
-
-    /**
-     * Protected method to connection object in derived classes.
-     * @param aConnection Connection to check
-     */
-    protected void checkConnection(Connection aConnection) throws IOException
-    {
-        // This class does not do additional checks.
-    }
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/ControlContainer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.Controllable;
-import com.nokia.microedition.media.control.ControlImpl;
-import javax.microedition.media.Player;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * ControlContainer class creates java control objects according to a classname
- * which is got from native control object. Created controls are accessible
- * through Controllable interface which is implemented in this class.
- */
-public class ControlContainer implements Controllable
-{
-    /**
-     * Default control package. Used when getting control with
-     * getControl method which appends default control package if package is
-     * not specified.
-     */
-    static final String CONTROL_DEFAULT_PACKAGE =
-        "javax.microedition.media.control.";
-
-
-    /**
-     * Default control package. Used when getting control with
-     * getControl method which appends default control package if package is
-     * not specified.
-     */
-    static final String CONTROL_IMPLEMENTATION_PACKAGE =
-        "com.nokia.microedition.media.control.";
-    /**
-     * Hashtable containing controls identified with a full package name.
-     * All control names starts with iDefaultPackage.
-     */
-    private final Hashtable iControls = new Hashtable();
-
-    /**
-     * Creates new ControlContainer.
-     */
-    private ControlContainer()
-    {
-    }
-
-    /**
-     * Create new ControlContainer and populates the controls.
-     *
-     * If native control name does not contain package name default
-     * com.nokia.microedition.media.control. package is used.
-     * If control name starts with . (.package.ClassName), Java control is not
-     * created. If control name contains valid package name and classname Java
-     *instance will be created.
-     *
-     *
-     * @param aPlayer Player which will contain the controls.
-     * @param aEventSourceHandle Handle to native event source.
-     * @param aNativeHandle Handle to native control source.
-     */
-    public static final ControlContainer populateControls(
-        Player aPlayer,
-        int aEventSourceHandle,
-        int aNativeHandle)
-    {
-        ControlContainer container = new ControlContainer();
-
-        // Get amount of controls in native object.
-        int controlCount = _getControlsCount(aNativeHandle);
-
-        // Create java object for each native objects.
-        for (int i = 0; i < controlCount; i++)
-        {
-            // Get handle to native object at index i
-            int controlHandle = _getControlHandle(aNativeHandle,
-                                                  i);
-
-            // Get public class name for the control.
-            String realClassName = _getPublicControlClassName(controlHandle);
-
-            // If null public control name was returned, Java control is not
-            // created. This allows extensions to use existing Player's
-            // native control array.
-            if (realClassName == null)
-            {
-                continue;
-            }
-
-            // Get the implementation class name for the control which will
-            // be used to create java object.
-            String className = _getControlClassName(controlHandle);
-
-            // Add package if it does not exists
-            if (className.indexOf('.') < 0)
-            {
-                className = CONTROL_IMPLEMENTATION_PACKAGE + className;
-                realClassName = CONTROL_DEFAULT_PACKAGE + className;
-            }
-
-            // create java instance
-            Control control = createControl(aPlayer,
-                                            className,
-                                            controlHandle,
-                                            aEventSourceHandle);
-            container.iControls.put(realClassName, control);
-        }
-
-        // population succeed, return created collection
-        return container;
-    }
-
-    /**
-     * Adds new control
-     */
-    public void addControl(Control aControl, String aControlName)
-    {
-        iControls.put(aControlName, aControl);
-    }
-
-    /**
-     * Disposes all the controls
-     */
-    public void dispose()
-    {
-        Enumeration controls = iControls.elements();
-        while (controls.hasMoreElements())
-        {
-            Object control = controls.nextElement();
-
-            // only ControlImpl derived classes need to be notified.
-            if (control instanceof ControlImpl)
-            {
-                ((ControlImpl)control).notifyDispose();
-            }
-        }
-    }
-
-    /**
-     * Implements method defined in javax.microedition.media.Controllable.
-     *
-     * @see javax.microedition.media.Controllable
-     * @param aControlType  the class name of the Control. The class name should
-     * be given either as the fully-qualified name of the class; or if the
-     * package of the class is not given, the package
-     * javax.microedition.media.control is assumed.
-     * @return the object that implements the control, or null.
-     */
-    public Control getControl(String aControlType)
-    {
-        if (aControlType == null)
-        {
-            throw new IllegalArgumentException("argument is null");
-        }
-
-        String controlType = aControlType;
-
-        // check if package name exists
-        if (controlType.indexOf(".") == -1)
-        {
-            // add package name
-            controlType = CONTROL_DEFAULT_PACKAGE + aControlType;
-        }
-        Control control = (Control)iControls.get(controlType);
-
-        // If control does not exists with default name, check if there is
-        // is a control with same type ( extends the given class name ).
-        if (control == null)
-        {
-            try
-            {
-                // try to create class for control
-                Class controlClass = Class.forName(controlType);
-
-                Enumeration elements = iControls.elements();
-
-                // search if any control is same type that requested control
-                while (elements.hasMoreElements() &&
-                        control == null)
-                {
-                    Control tmpControl = (Control)elements.nextElement();
-                    if (controlClass.isInstance(tmpControl))
-                    {
-                        // control is found
-                        control = tmpControl;
-                    }
-                }
-            }
-            catch (ClassNotFoundException cnfe)  // the class could not be found
-            {
-                // Exception is ignored and null is returned from this method
-                Logger.ELOG(Logger.EJavaMMAPI,
-                            "ControlContainer::getControl ", cnfe);
-            }
-            catch (Error e)  // the function failed for any other reason.
-            {
-                // Error is ignored and null is returned from this method
-                Logger.ELOG(Logger.EJavaMMAPI,
-                            "ControlContainer::getControl " , e);
-            }
-        }
-        return control;
-    }
-
-    /**
-     * Implements method defined in javax.microedition.media.Controllable.
-     *
-     * @see javax.microedition.media.Controllable
-     * @return the collection of Control objects.
-     */
-    public Control[] getControls()
-    {
-        Control[] controls = new Control[ iControls.size()];
-        Enumeration elements = iControls.elements();
-        int i = 0;
-        // Put all controls to array
-        while (elements.hasMoreElements())
-        {
-            controls[ i ] = (Control)elements.nextElement();
-            i++;
-        }
-        return controls;
-    }
-
-    /**
-     * Creates new Control instance.
-     * All control classes must be in iPrivatePackage package and
-     * extend the ControlImpl base class. Created control is initialized
-     * with native control handle and eventsource handle.
-     *
-     * @param aPlayer Player which will contain the controls.
-     * @param aClassName Control's class name without the package.
-     * @param aControlHandle Handle to native control.
-     * @param aEventSourceHandle Handle to native control source.
-     * @return created control
-     */
-    static private final Control createControl(Player aPlayer,
-            String aClassName,
-            int aControlHandle,
-            int aEventSourceHandle)
-    {
-        ControlImpl control = null;
-
-        // Try to make control instance. If instantion fails, it is an internal
-        // error and can only occur in development time.
-        try
-        {
-            Class controlClass =
-                Class.forName(aClassName);
-            control = (ControlImpl)controlClass.newInstance();
-            control.setHandles(aPlayer, aEventSourceHandle, aControlHandle);
-        }
-        catch (InstantiationException ie)
-        {
-            throw new OutOfMemoryError("Instantiation failed, " + ie.getMessage());
-        }
-        catch (IllegalAccessException iae)
-        {
-            throw new OutOfMemoryError("Illegal access, " + iae.getMessage());
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            throw new OutOfMemoryError("Class not found, " + cnfe.getMessage());
-        }
-        return control;
-    }
-
-    /**
-     * Return the amount of controls in native control source.
-     *
-     * @param aNativeHandle Handle to native control source object.
-     */
-    private static native int _getControlsCount(int aNativeHandle);
-
-    /**
-     * Return native handle to control at specified index.
-     *
-     * @param aNativeHandle Handle to native control source object.
-     * @param aControlIndex Control's index.
-     */
-    private static native int _getControlHandle(int aNativeHandle,
-            int aControlIndex);
-
-
-    /**
-     * Returns the control class name that can be used to instantiate Java
-     * object.
-     *
-     * @param aControlHandle Handle to native control.
-     */
-    private static native String _getControlClassName(int aControlHandle);
-
-    /**
-     * Returns the control class name that is the public name for the control.
-     *
-     * @param aControlHandle Handle to native control.
-     */
-    private static native String _getPublicControlClassName(int aControlHandle);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/HttpDataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is an imlementation of DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.MediaException;
-import java.io.IOException;
-import javax.microedition.io.Connection;
-import javax.microedition.io.HttpConnection;
-import javax.microedition.media.Control;
-
-/**
- * This class extends ConnectorDataSource and adds http connection
- * return value checking.
- */
-public class HttpDataSource extends ConnectorDataSource implements SeekControl
-{
-    private static final String SEEK_CONTROL = "SeekControl";
-
-    // true when closed
-    boolean iClosed = false;
-
-    /**
-     * Default constructor
-     */
-    public HttpDataSource(Locator aLocator)
-    throws IOException, MediaException
-    {
-        super(aLocator);
-    }
-
-    /**
-     * From ConnectorDataSource
-     * @see ConnectorDataSource
-     */
-    protected void checkConnection(Connection aConnection) throws IOException
-    {
-        // Must handle also HTTP response codes
-        HttpConnection httpConnection = (HttpConnection)aConnection;
-        if (httpConnection.getResponseCode() != HttpConnection.HTTP_OK)
-        {
-            throw new IOException(
-                "Could not connect to source, " + httpConnection.getResponseMessage());
-        }
-    }
-
-    /**
-     * From SeekControl
-     */
-    public void seek(int aWhere) throws IOException
-    {
-        // Only seek to start is supported.
-        if (aWhere == 0)
-        {
-            disconnect();
-
-            // do not connect if stream is closed
-            if (!iClosed)
-            {
-                connect();
-            }
-
-            if (iClosed)
-            {
-                // disconnect if stream was closed during connect operation
-                disconnect();
-            }
-        }
-        else
-        {
-            throw new IOException("Internal error, invalid position: " + aWhere);
-        }
-    }
-
-    /**
-     * From SeekControl
-     */
-    public void close()
-    {
-        iClosed = true;
-    }
-
-    /**
-     * From Controllable
-     */
-    public Control getControl(String aControlType)
-    {
-        Control control = null;
-        if (aControlType.equals(SEEK_CONTROL))
-        {
-            control = this;
-        }
-        // else return null
-        return control;
-    }
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamDataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is an imlementation of DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.protocol.SourceStream;
-import java.io.IOException;
-
-/**
- * DataSource which has InputStreamSourceStream.
- */
-public class InputStreamDataSource extends DataSource
-{
-    // DataSource's stream
-    protected InputStreamSourceStream iSourceStream;
-
-    // string that describes the content-type of the media that the source
-    // is providing.
-    protected String iContentType;
-
-    /**
-     * Constructor.
-     * @param aSourceStream SourceSteam
-     * @param aType Content type.
-     */
-    public InputStreamDataSource(InputStreamSourceStream aSourceStream,
-                                 String aType)
-    {
-        super(null);   // no locator
-        iSourceStream = aSourceStream;
-        iContentType = aType;
-    }
-
-    /**
-     * Constructor with Locator and stream
-     * @param aLocator Locator
-     * @param aSourceStream SourceSteam
-     * @param aType Content type.
-     */
-    public InputStreamDataSource(String aLocator,
-                                 InputStreamSourceStream aSourceStream,
-                                 String aType)
-    {
-        super(aLocator);
-        iSourceStream = aSourceStream;
-        iContentType = aType;
-    }
-
-
-    /**
-     * Constructor with locator
-     * @param aLocator Locator
-     */
-    public InputStreamDataSource(String aLocator)
-    {
-        super(aLocator);
-    }
-
-    /**
-     * from DataSource
-     * @return Content Type
-     * @see DataSource
-     */
-    public String getContentType()
-    {
-        return iContentType;
-    }
-
-    /**
-     * from DataSource
-     * Connect to the stream
-     * @throws IOException
-     * @see DataSource
-     */
-    public void connect() throws IOException
-    {
-    }
-
-    /**
-     * from DataSource
-     * Disconnect from the stream
-     */
-    public void disconnect()
-    {
-    }
-
-    /**
-     * from DataSource
-     * Put DataSource to STARTED state
-     * @throws IOException Throw if DataSource is in wrong state
-     * @see DataSource
-     */
-    public void start() throws IOException
-    {
-    }
-
-    /**
-     * from DataSource
-     * Stops DataSource
-     * @see DataSource
-     */
-    public void stop()
-    {
-    }
-
-    /**
-     * from DataSource
-     * return sourceStreams of the DataSource
-     *
-     * @exception IllegalStateException Thrown if the source is not connected.
-     * @return set of source streams
-     * @see DataSource
-     */
-    public SourceStream[] getStreams()
-    {
-        SourceStream[] streams = new SourceStream[ 1 ];
-        streams[ 0 ] = iSourceStream;
-        return streams;
-    }
-
-    /**
-     * from interface Controllable
-     * Method return controls of the DataSource
-     * @return Control
-     * @see Controllable
-     * @see DataSource
-     */
-    public Control[] getControls()
-    {
-        return new Control[ 0 ];
-    }
-
-    /**
-     * from interface Controllable
-     * Return a control by the Control Type, not supported
-     * @param aControlType type of the control
-     * @return Control
-     */
-    public Control getControl(String aControlType)
-    {
-        return iSourceStream.getControl("SeekControl");
-    }
-
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamSeekControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to mark and seek the inputstream. At present it is
-*                implemented to mark and seek to the front of the stream and not anywhere
-*                in the middle as the use case only demands such a beahaviour.
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Class InputStreamSeekControl used to mark and seek the inputstream
- */
-public class InputStreamSeekControl implements SeekControl
-{
-
-
-    private InputStream iInputStream;
-
-    /**
-     * Constructor
-     */
-    public InputStreamSeekControl()
-    {
-
-        iInputStream = null;
-    }
-
-    /*
-     * Constructor
-     * @param aInputStream - inputstream used by the InputStream class
-     *                       that needs to be marked and streamed
-     */
-    public InputStreamSeekControl(InputStream aInputStream)
-    {
-
-        iInputStream = aInputStream;
-
-        if (iInputStream.markSupported() == true)
-        {
-            iInputStream.mark(0);
-        }
-    }
-
-    /*
-     * Method seeks to the start of the inputstream.
-     * @param aWhere - is ignored as the seeking takes place to
-     *                 the begining always
-     */
-    public void seek(int aWhere) throws IOException
-    {
-
-
-        if (iInputStream.markSupported() == true)
-        {
-            iInputStream.reset();
-        }
-    }
-
-    public void close()
-    {
-
-        // intentionally left blank
-    }
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamSourceStream.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) 2002 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:  SourceStream that reads InputStream
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import com.nokia.microedition.media.InputStreamSeekControl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import javax.microedition.media.protocol.ContentDescriptor;
-import javax.microedition.media.protocol.SourceStream;
-import javax.microedition.media.Control;
-
-/**
- * This class implements SourceStream interface. From the interface
- * only read and getSeekType method will be used. This class is used
- * to read InputStream.
- */
-public class InputStreamSourceStream implements SourceStream
-{
-    // Stream used to read the content.
-    protected InputStream iInputStream = null;
-
-    private static final String SEEK_CONTROL = "SeekControl";
-
-    private InputStreamSeekControl iSeekControl;
-    /**
-     * Constructor.
-     * @param aInputStream An InputStream
-     */
-    public InputStreamSourceStream(InputStream aInputStream)
-    {
-        setStream(aInputStream);
-        iSeekControl = new InputStreamSeekControl(aInputStream);
-    }
-
-    /**
-     * Constructor.
-     */
-    public InputStreamSourceStream()
-    {
-    }
-
-    /**
-     * Sets new InputStream.
-     * @param aInputStream An InputStream
-     */
-    public final void setStream(InputStream aInputStream)
-    {
-        iInputStream = aInputStream;
-    }
-
-    /**
-     * Closes the InputStream. This method can only be called if MMA
-     * must close the stream.
-     *
-     * @throws NullPointerException if setStream is not called.
-     * @throws IOException If an I/O error occurs
-     */
-    public void close() throws IOException
-    {
-        iInputStream.close();
-    }
-
-    /**
-     * Read from Input Stream
-     * @param aBuffer Input Stream
-     * @param aOffset where reading starts
-     * @param aLength length of read data
-     * @return bytes read
-     * @throws IOException
-     */
-    public int read(byte[] aBuffer, int aOffset, int aLength) throws IOException
-    {
-        return iInputStream.read(aBuffer, aOffset, aLength);
-    }
-
-    /**
-     * Seek type of the stream
-     * @return seek type based on the inputstream's capability
-     */
-    public int getSeekType()
-    {
-        if (iInputStream != null && iInputStream.markSupported() == true)
-        {
-
-            return SEEKABLE_TO_START;
-        }
-        else
-        {
-            return NOT_SEEKABLE;
-        }
-    }
-
-    /**
-     * From interface SourceStream. Method not implemented.
-     * @see SourceStream
-     * @return size of the stream available
-     */
-    public int getTransferSize()
-    {
-        return 0;
-    }
-
-    /**
-     * From interface SourceStream. Method not implemented.
-     * @see SourceStream
-     * @param aWhere where to seek
-     * @return seeked position, allways the current position
-     * @throws IOException
-     */
-    public long seek(long aWhere) throws IOException
-    {
-        return 0;
-    }
-
-    /**
-     * From interface SourceStream. Method not implemented.
-     * @see SourceStream
-     * @return current position
-     */
-    public long tell()
-    {
-        return 0;
-    }
-
-    /**
-     * From interface SourceStream. Method not implemented.
-     * @see SourceStream
-     * @return The content type
-     * @see ContentDescriptor
-     */
-    public ContentDescriptor getContentDescriptor()
-    {
-        // Return empty content descriptor.
-        // This method is not used.
-        return new ContentDescriptor("");
-    }
-
-    /**
-     * From interface SourceStream. Method not implemented.
-     * @see SourceStream
-     * @return content length which is allways 0
-     */
-    public long getContentLength()
-    {
-        return 0;
-    }
-
-    /**
-     * From interface Controllable. Method not implemented.
-     * @see SourceStream
-     * @see Controllable
-     */
-    public Control[] getControls()
-    {
-        Control [] aControls = new Control[1];
-
-        aControls[0] = iSeekControl;
-
-        return aControls;
-    }
-
-    /**
-     * From interface Controllable. Method not implemented.
-     * @param aControlType wanted control type
-     * @return Control null
-     * @See Controllable
-     */
-    public Control getControl(String aControlType)
-    {
-        if (aControlType == SEEK_CONTROL && getSeekType() == SEEKABLE_TO_START)
-        {
-            return iSeekControl;
-        }
-        else
-        {
-            return null;
-        }
-    }
-    /**
-     * @author d35kumar 
-     * @return
-     */
-    public InputStream getInputStream(){
-    	return iInputStream;
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InternalPlayer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2002 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:  InternalPlayer
-*
-*/
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.Player;
-import javax.microedition.media.MediaException;
-
-/**
- * Internal inteface for MMA players. All players used in MMA must implement
- * this interface.
- */
-public interface InternalPlayer extends Player
-{
-    /**
-     * Adds new <code>Control</code> to player.
-     * @param aControl New <code>Control</code> to add.
-     * @param aControlType Fully-qualified name of the control class.
-     * @exception MediaException Thrown if new Control cannot be added to
-     * <code>InternalPlayer</code>.
-     */
-    void addControl(Control aControl, String aControlType)
-    throws MediaException;
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/Locator.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.MediaException;
-
-/**
- * Locator parsing class
- */
-public class Locator
-{
-    private static final String PROTOCOL_SEPARATOR = "://";
-    private static final char PARAMETER_SEPARATOR = '?';
-    private final String iLocator;
-
-    /**
-     * Constructor
-     * @param aLocator Locator to be parsed
-     */
-    public Locator(String aLocator)
-    {
-        iLocator = aLocator;
-    }
-    /**
-     * Parses the protocol part of the locator e.g. returns
-     * "capture" from "capture://audio?encoding=amr" locator
-     * @return parsed protocol
-     * @throw MediaException if Protocol cannot
-     *         be parsed from the locator
-     */
-    public String getProtocol() throws MediaException
-    {
-        // Find protocol separator
-        int pSep = iLocator.indexOf(PROTOCOL_SEPARATOR);
-
-        // Protocol must exist
-        if (pSep == -1)
-        {
-            throw new MediaException(
-                "Could not create player, URI separator not found");
-        }
-        return iLocator.substring(0, pSep);
-    }
-
-    /**
-     * Parses the middle part of the locator e.g. returns
-     * "audio" from "capture://audio?encoding=amr" locator
-     * @return parsed middle part
-     * @throw MediaException if middle part cannot
-     *         be parsed from the locator
-     */
-    public String getMiddlePart() throws MediaException
-    {
-        // Find possible parameter separator
-        int parSep = iLocator.indexOf(PARAMETER_SEPARATOR);
-
-        // No parameters
-        if (parSep == -1)
-        {
-            parSep = iLocator.length();
-        }
-
-        return iLocator.substring(getProtocol().length() +
-                                  PROTOCOL_SEPARATOR.length(), parSep);
-    }
-
-    /**
-     * Parses possible parameters of the locator e.g. returns
-     * "encoding=amr" from "capture://audio?encoding=amr" locator
-     * @return parsed parameters or <code>null</code> if there is
-     *         not parameters
-     */
-    public String getParameters()
-    {
-        // Find possible parameter separator
-        int parSep = iLocator.indexOf(PARAMETER_SEPARATOR);
-
-        String locator = null;
-
-        // Null is returned if there is no parameters
-        if (parSep != -1)
-        {
-            locator = iLocator.substring(parSep + 1);
-        }
-
-        return locator;
-    }
-
-    /**
-     * Returns the whole locator string
-     * @return locator used to create this instance
-     */
-    public String getLocatorString()
-    {
-        return iLocator;
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/MMAInvokeListener.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-/**
- * This interface is used notify other components when MMA event source is
- * created.
- */
-public interface MMAInvokeListener
-{
-    /**
-     * This method is called when MMA is invoked for the first time.
-     * @param aEventSourceHandle Handle to native MMA event source.
-     */
-    void notifyInvoke(int aEventSourceHandle);
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/NativeError.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Landmark store manager for handling landmark stores
- *
-*/
-
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-
-/**
- * A utility class for declaring and handling native SymbianOS error codes. All
- * error codes that are used in Java from native code should be declared here
- * and referenced from this class.
- */
-public final class NativeError
-{
-    public static final String NATIVE_ERROR_MESSAGE = "OS error = ";
-
-    // SymbianOS error codes
-    public static final int KErrNone = 0;
-
-    public static final int KErrNotFound = -1;
-
-    public static final int KErrGeneral = -2;
-
-    public static final int KErrCancel = -3;
-
-    public static final int KErrNoMemory = -4;
-
-    public static final int KErrNotSupported = -5;
-
-    public static final int KErrArgument = -6;
-
-    public static final int KErrOverflow = -9;
-
-    public static final int KErrAlreadyExists = -11;
-
-    public static final int KErrPathNotFound = -12;
-
-    public static final int KErrDied = -13;
-
-    public static final int KErrNotReady = -18;
-
-    public static final int KErrCorrupt = -20;
-
-    public static final int KErrAccessDenied = -21;
-
-    public static final int KErrWrite = -23;
-
-    public static final int KErrEof = -25;
-
-    public static final int KErrDiskFull = -26;
-
-    public static final int KErrBadName = -28;
-
-    public static final int KErrCommsLineFail = -29;
-
-    public static final int KErrTimedOut = -33;
-
-    public static final int KErrDisconnected = -36;
-
-    public static final int KErrTooBig = -40;
-
-    public static final int KErrDivideByZero = -41;
-
-    public static final int KErrHardwareNotAvailable = -44;
-
-    // Not intended to be constructed
-    private NativeError()
-    {
-    }
-
-    /**
-     * Checks for basic native error codes that map to standard Java exceptions
-     * and throws the exception if the error code matches. Otherwise throws an
-     * IOException.
-     *
-     * @param aError
-     *            Possible error code.
-     * @return Value passed in is returned if not an error.
-     */
-    public static int checkIO(int aError,
-                              String aErrorMessage) throws IOException
-    {
-        if (aError < KErrNone)
-        {
-            switch (aError)
-            {
-            case KErrNoMemory:
-                throw new OutOfMemoryError(aErrorMessage +
-                                           Integer.toString(aError));
-                // KErrArgument must throw IllegalArgumentException
-                // otherwise lcdui will break, so don't change this.
-            case KErrArgument:
-                throw new IllegalArgumentException(aErrorMessage +
-                                                   Integer.toString(aError));
-            case KErrDivideByZero:
-                throw new ArithmeticException(aErrorMessage +
-                                              Integer.toString(aError));
-            default:
-                throw new IOException(aErrorMessage + errorMessage(aError));
-            }
-        }
-        return aError;
-    }
-
-    /**
-     * Checks for basic native error codes that map to standard Java exceptions
-     * and throws the exception if the error code matches. Otherwise throws
-     * basic Error class.
-     *
-     * @param aError
-     *            Possible error code.
-     * @param aThrowAlways
-     *            Determines whether a default exception is thrown if the error
-     *            code is not recognised.
-     * @return Value passed in is returned if not an error.
-     * @throws Error
-     *             If the error code does not match any exception thrown in
-     *             checkExplicitOnly, a default exception is thrown here.
-     */
-    public static int check(int aError, String aErrorMessage)
-    {
-        if (aError < KErrNone)
-        {
-            checkExplicitOnly(aError);
-            throw new Error(aErrorMessage + errorMessage(aError));
-        }
-        return aError;
-    }
-
-
-	/**
-	 * Checks if the object is a null reference, and throws OutOfMemoryError
-	 * if this is the case. Useful for checking for OOM when Java objects
-	 * returned from a native method.
-	 * 
-	 * @param aObject Object that may be null.
-	 * @return Value passed in is returned if not an error.
-	 */
-	public static Object checkOOM( Object aObject )
-		{
-		if ( aObject == null )
-			{
-			throw new OutOfMemoryError();
-			}
-		return aObject;
-		}
-		
-		/**
-     * Checks if the error code represents out of memory, and throws Java Error
-     * if true. Does not throw anything otherwise.
-     *
-     * @param aError Possible error code.
-     * @return Value passed in is returned if not an out of memory error.
-     */
-    public static int checkOOMOnly(int aError)
-    {
-        if (aError == KErrNoMemory)
-        {
-            throw new OutOfMemoryError();
-        }
-        return aError;
-    }
-		
-		/**
-     * Checks for basic native error codes that map to standard Java
-     * exceptions and throws the exception if the error code matches.
-     * Otherwise throws basic Error class.
-     *
-     * @param aError Possible error code.
-     * @param aThrowAlways Determines whether a default exception is thrown
-     * if the error code is not recognised.
-     * @return Value passed in is returned if not an error.
-     * @throws Error If the error code does not match any exception thrown
-     * in checkExplicitOnly, a default exception is thrown here.
-     */
-    public static int check(int aError)
-    {
-        if (aError < KErrNone)
-        {
-            checkExplicitOnly(aError);
-            throw new Error(errorMessage(aError));
-        }
-        return aError;
-    }
-    		
-	/**
-	 * Checks for basic native error codes that map to standard Java
-	 * exceptions and throws the exception if the error code matches.
-	 * Otherwise just returns the error.
-	 * 
-	 * @param aError Possible error code.
-	 * @return Value passed in is returned if not an error.
-	 * @throws OutOfMemoryError If aError equals KErrNoMemory.
-	 * @throws IllegalArgumentException If aError equals KErrArgument
-	 * @throws ArithmeticException If aError equals KErrDivideByZero
-	 */
-	public static int checkExplicitOnly( int aError )
-		{
-		if ( aError < KErrNone )
-			{
-			switch ( aError )
-				{
-				case KErrNoMemory:
-					throw new OutOfMemoryError();
-				// KErrArgument must throw IllegalArgumentException
-				// otherwise lcdui will break, so don't change this.
-				case KErrArgument:
-					throw new IllegalArgumentException();
-				case KErrDivideByZero:
-					throw new ArithmeticException();
-				default:
-					// Do nothing
-				}
-			}
-		return aError;
-		}		
-
-    /**
-     * Returns a string formatted with generic text to indicate where the error
-     * code comes from and the error code given.
-     *
-     * @param A
-     *            native error code.
-     * @return A string containing the error code.
-     */
-    public static String errorMessage(int aError)
-    {
-        String result = NATIVE_ERROR_MESSAGE.concat(Integer.toString(aError));
-        return result;
-    }
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/NativePlayerFactory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.protocol.DataSource;
-
-/**
- * Factory for creating native and java instances of the players
- */
-public class NativePlayerFactory
-{
-    /**
-     * Do not allow contruction.
-     */
-    private NativePlayerFactory()
-    {
-    }
-
-    /**
-     * Creates native and java instances with Locator
-     * @param aLocator Locator used for creating native player
-     * @param aSource The DataSource that provides the media content.
-     * @return new instance of <code>InternalPlayer</code>
-     */
-    public static InternalPlayer createPlayer(Locator aLocator,
-            DataSource aSource)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        int playerHandle = _createPlayerLocator(ManagerImpl.getEventSource(),
-                                                ManagerImpl.getHandle(),
-                                                aLocator.getProtocol(),
-                                                aLocator.getMiddlePart(),
-                                                aLocator.getParameters());
-        return createPlayer(playerHandle, aSource);
-    }
-
-    /**
-     * Creates native and java instances with Locator
-     * @param aLocator Locator used for creating native player
-     * @return new instance of <code>InternalPlayer</code>
-     */
-    public static InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        return createPlayer(aLocator, null);
-    }
-
-    /**
-     * Creates native and java instances with content-type
-     * @param aContentType Content type for creating native counter-part
-     * @param aSource The DataSource that provides the media content.
-     * @return new instance of <code>InternalPlayer</code>
-     */
-    public static InternalPlayer createPlayer(String aContentType,
-            DataSource aSource)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        int playerHandle = _createPlayerContentType(ManagerImpl.getEventSource(),
-                           ManagerImpl.getHandle(),
-                           aContentType);
-        return createPlayer(playerHandle, aSource);
-    }
-
-    /**
-     * Creates native and java instances with header data
-     * @param aHeaderData HeaderData used for recognizing content
-     * @param aSource The DataSource that provides the media content.
-     * @return new instance of <code>InternalPlayer</code>
-     */
-    public static InternalPlayer createPlayer(byte[] aHeaderData,
-            DataSource aSource)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        int playerHandle = _createPlayerHeaderData(ManagerImpl.getEventSource(),
-                           ManagerImpl.getHandle(),
-                           aHeaderData);
-        return createPlayer(playerHandle, aSource);
-    }
-
-    /**
-     * Creates java instance from native handle and DataSource
-     */
-    private static InternalPlayer createPlayer(int aPlayerHandle,
-            DataSource aSource)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        // if aPlayerHandle is 0 null will be returned
-        InternalPlayer player = null;
-
-        if (aPlayerHandle < 0)
-        {
-            // negative handle indicates native error code
-            throw new MediaException(
-                "Could not create player, Symbian OS error: " +
-                aPlayerHandle);
-        }
-        else if (aPlayerHandle > 0)
-        {
-            // Native player was created
-            if (aSource == null)
-            {
-                player = new PlayerImpl(aPlayerHandle);
-            }
-            else
-            {
-                player = new SourcePlayer(aSource, aPlayerHandle);
-            }
-        }
-        return player;
-    }
-
-    private static native int _createPlayerLocator(int aEventSource,
-            int aManagerHandle,
-            String aProtocol,
-            String aMiddlePart,
-            String aParameters);
-
-    private static native int _createPlayerContentType(int aEventSource,
-            int aManagerHandle,
-            String aContentType);
-
-    private static native int _createPlayerHeaderData(int aEventSource,
-            int aManagerHandle,
-            byte[] aHeaderData);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,284 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is general player implementation of Player interface
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.TimeBase;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Manager;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * This abstract player implementation must be derived. This class implements
- * general player functionality such as state checking.
- */
-public abstract class PlayerBase implements InternalPlayer
-{
-    protected TimeBase iTimeBase;
-
-    // state as defined in Player interface
-    // at first player is unrealized
-    protected int iState = UNREALIZED;
-
-    /**
-     * Constructor
-     */
-    protected PlayerBase()
-    {
-    }
-
-    /**
-     * Every method has to check if player is closed with this method
-     */
-    protected void closeCheck()
-    {
-        if (iState == CLOSED)
-        {
-            throw new IllegalStateException("Player is CLOSED.");
-        }
-    }
-
-    /**
-     * This method is from methods that are
-     * not allowed to be called, when player
-     * is in UNREALIZED state
-     */
-    protected void unrealizedCheck()
-    {
-        if (getState() == UNREALIZED)
-        {
-            throw new IllegalStateException("Player is UNREALIZED.");
-        }
-    }
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public TimeBase getTimeBase()
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        // set default timebase
-        if (iTimeBase==null)
-        {
-            iTimeBase = Manager.getSystemTimeBase();
-        }
-
-        return iTimeBase;
-    }
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public void setTimeBase(TimeBase aMaster) throws MediaException
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        // A MediaException is thrown if
-        // setTimeBase is called on a STARTED  Player.
-        if (getState() == STARTED)
-        {
-            throw new IllegalStateException("Player is STARTED");
-        }
-
-        if (aMaster == null)
-        {
-            // set default timebase
-            iTimeBase = Manager.getSystemTimeBase();
-        }
-        else
-        {
-            if (aMaster instanceof SystemTimeBase)
-            {
-                iTimeBase = aMaster;
-                return;
-            }
-            else
-            {
-                // default doesn't support any other TimeBases
-                throw new MediaException("Invalid timebase or timebase not supported");
-            }
-        }
-    }
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public void realize() throws MediaException
-    {
-		Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"+ PlayerBase.realize() ");
-        closeCheck();
-        int state = getState();
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"+ PlayerBase.realize() after getstate() ");
-
-        // If realize is called when the Player is in the
-        // REALIZED, PREFETCHTED or STARTED state,
-        // the request will be ignored.
-        if (state == UNREALIZED)
-        {
-            doRealize();
-        }
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"- PlayerBase.realize() ");
-    }
-
-    /**
-     * Called from realize method. This method must be implemented in
-     * derived class.
-     * @see realize
-     */
-    abstract protected void doRealize() throws MediaException;
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public void prefetch() throws MediaException
-    {
-        realize();
-
-        // prefetch must be ignored in other states
-        if (getState() == REALIZED)
-        {
-            doPrefetch();
-        }
-    }
-
-    /**
-     * Called from prefetch method.
-     * @see prefetch
-     */
-    abstract protected void doPrefetch() throws MediaException;
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void deallocate()
-    {
-        try
-        {
-            stop();
-        }
-        catch (MediaException me)
-        {
-            // if stop fails we can do nothing
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA::PlayerBase: Stop failed in deallocate.", me);
-        }
-        if (getState() == PREFETCHED)
-        {
-            doDeallocate();
-        }
-    }
-
-    /**
-     * Called from deallocate method.
-     */
-    abstract protected void doDeallocate();
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void stop() throws MediaException
-    {
-        closeCheck();
-        if (getState() == STARTED)
-        {
-            doStop();
-        }
-    }
-
-    /**
-     * Called from realize method.
-     */
-    abstract protected void doStop() throws MediaException;
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void close()
-    {
-        /*
-        Releases all resources and cease all activity.
-        The close method indicates that the Player will no
-        longer be used and can shut itself down.
-        Methods invoked on a closed Player will throw RuntimeExceptions.
-        */
-        if (iState != CLOSED)
-        {
-            deallocate();
-            iState = CLOSED;
-            doClose();
-        }
-    }
-
-    /**
-     * Called from close method.
-     */
-    abstract protected void doClose();
-
-    /**
-     * interface Player.
-     * Derived classes may use this method to check parameter and state.
-     * @see Player
-     */
-    public void setLoopCount(int aCount)
-    {
-        closeCheck();
-        // -1 is valid count value meaning indefinitely looping
-        if ((aCount == 0) ||
-                (aCount < -1))
-        {
-            throw new java.lang.IllegalArgumentException(
-                "Invalid loop count " + aCount + ", loop count cannot be 0 or < -1");
-        }
-        if (getState() == STARTED)
-        {
-            throw new IllegalStateException("Player is STARTED");
-        }
-    }
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public long setMediaTime(long aNow) throws MediaException
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        long now = aNow;
-
-        if (now < 0)
-        {
-            // Setting the media time to negative values
-            // will effectively set the media time to zero.
-            now = 0;
-        }
-        return now;
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,487 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is native player implementation of Player interface
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.MediaException;
-import com.nokia.microedition.media.NativeError;
-import com.nokia.mj.impl.rt.support.Finalizer;
-import com.nokia.mj.impl.utils.Logger;
-
-public class PlayerImpl extends PlayerBase
-{
-    // CMMAPlayer handle
-    protected int iPlayerHandle;
-
-    // Controls container
-    protected ControlContainer iControls;
-
-    // object for waiting native asynchronous method calls
-    protected Object iLockObject = new Object();
-     protected Object iPrefetchLockObject = new Object();
-
-    // native error code
-    protected int iError;
-
-    protected PlayerListenerImpl iPlayerListenerImpl;
-
-    private Finalizer mFinalizer;
-    
-    private boolean iWaitFlag = true;
-    
-    private boolean iStartWaitFlag = true;
-
-    /**
-     * Constructor
-     * @param aPlayerHandle handle to player (CMMAPlayer)
-     */
-    public PlayerImpl(int aPlayerHandle)
-    {
-        iPlayerHandle = aPlayerHandle;
-
-        iPlayerListenerImpl = new PlayerListenerImpl(this);
-
-        // Initialize player
-        int err = _initPlayer(iPlayerListenerImpl,
-                              ManagerImpl.getEventSource(),
-                              iPlayerHandle);
-        if (err < NativeError.KErrNone)
-        {
-            throw new OutOfMemoryError(NativeError.errorMessage(err));
-        }
-
-        mFinalizer = new Finalizer()
-        {
-            public void finalizeImpl()
-            {
-                doFinalize();
-            }
-        };
-
-        iControls = ControlContainer.populateControls(this,
-                    ManagerImpl.getEventSource(),
-                    iPlayerHandle);
-    }
-
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            registeredFinalize();
-            mFinalizer = null;
-        }
-    }
-
-    /**
-     * This method is called when garbage collection occurs
-     * to delete native object
-     */
-    protected void registeredFinalize()
-    {
-        close();
-    }
-
-    /**
-     * Returns native player handle.
-     * @return Native player handle.
-     */
-    public int getPlayerHandle()
-    {
-        return iPlayerHandle;
-    }
-
-    /**
-     * @return Player's PlayerListenerImpl
-     */
-    public PlayerListenerImpl getPlayerListenerImpl()
-    {
-        return iPlayerListenerImpl;
-    }
-
-    /**
-     * Adds control to the player.
-     * @param aControl Player's control
-     * @param aControlName Identifies the control. Name must contain
-     * full package information
-     */
-    public void addControl(javax.microedition.media.Control aControl,
-                           String aControlName)
-    {
-        iControls.addControl(aControl, aControlName);
-    }
-
-    /**
-     * interface Controllable
-     * Return controls
-     * @return list of controls
-     * @see Controllable
-     */
-    public javax.microedition.media.Control[] getControls()
-    {
-        closeCheck();
-        unrealizedCheck();
-        return iControls.getControls();
-    }
-
-    /**
-     * interface Controllable
-     * get control by content type
-     * @param aControlType content type of wanted control
-     * @return control
-     * @see Controllable
-     * @see Control
-     */
-    public javax.microedition.media.Control getControl(String aControlType)
-    {
-        closeCheck();
-        unrealizedCheck();
-        return iControls.getControl(aControlType);
-    }
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void addPlayerListener(PlayerListener aPlayerListener)
-    {
-        closeCheck();
-        iPlayerListenerImpl.addPlayerListener(aPlayerListener);
-    }
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public void removePlayerListener(PlayerListener aPlayerListener)
-    {
-        closeCheck();
-        iPlayerListenerImpl.removePlayerListener(aPlayerListener);
-    }
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public int getState()
-    {
-        int state = CLOSED;
-        if (iState != CLOSED)
-        {
-            state = _getState(ManagerImpl.getEventSource(), iPlayerHandle);
-        }
-        return state;
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doRealize() throws MediaException
-    {
-        int err = _realize(ManagerImpl.getEventSource(), iPlayerHandle);
-
-        if (err < NativeError.KErrNone)
-        {
-            throw new MediaException(
-                "Realize failed, Symbian OS error: " + err);
-        }
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doPrefetch() throws MediaException
-    {
-    	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doPrefetch");
-        synchronized(iPrefetchLockObject)
-        { 
-        	if (PREFETCHED == getState())
-        	return;
-         synchronized (iLockObject)
-         {
-        	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doPrefetch inside try"+Thread.currentThread().getName());
-          //int retval[] = new int[1];
-      		 int err = _prefetch(ManagerImpl.getEventSource(), iPlayerHandle);
-          Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doPrefetch err = " + err);
-          if (err < NativeError.KErrNone)
-          {
-              throw new MediaException(
-              "Prefetch failed, Symbian OS error: " + err);
-          }
-          if(iWaitFlag)
-          {
-           try
-            {
-                // wait until actionCompleted( int aError ) is called
-                iLockObject.wait();
-            }
-            catch (InterruptedException ie)
-            {
-                // cannot occur
-            }
-          }
-         Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doPrefetch Sync end");
-	        } // end   synchronized (iLockObject)
-   	   }
-        if (iError < NativeError.KErrNone)
-        {
-            throw new MediaException(
-                "Prefetch failed, Symbian OS error: " + iError);
-        }
-    }
-
-    /**
-     * Notify that action is completed. Called from native side.
-     * @param aError error code
-     */
-    private void actionCompleted(int aError)
-    {
-    	  Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"actionCompleted callback11 aError ="+ aError + "    "+Thread.currentThread().getName());
-        iError = aError;
-
-        synchronized (iLockObject)
-       {
-        	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"actionCompleted callback inside synchronized (iLockObject)");
-            iLockObject.notify();
-        }
-    }
-    
-    private void actionCompletedFile()
-    {
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : actionCompletedFile");
-        iWaitFlag = false;       
-        
-   }
-    
-    private void actionCompletedStart()
-    {
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : actionCompletedStart");
-        iStartWaitFlag = false;       
-        
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doDeallocate()
-    {
-        int ret = _deallocate(ManagerImpl.getEventSource(), iPlayerHandle);
-        if (ret < NativeError.KErrNone)
-        {
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
-                       "_deallocate() failed: err=" + ret);
-        }
-    }
-
-    /**
-     * From Player.
-     * @see Player
-     */
-    public void start() throws MediaException
-    {
-    Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : start()");
-    prefetch();
-			 Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl, start, state = "+getState());
-    // Only preteched player may be started. If player is already started
-    // this method returns silently.
-    if (getState() == PREFETCHED)
-    {
-         synchronized (iLockObject)
-         {        
-             Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl, before calling native _start() thread is =" +Thread.currentThread().getName());
-            	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl, before calling native _start()");
-             int err = _start(ManagerImpl.getEventSource(), iPlayerHandle);
-             Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl, before calling native _start( ) returned : err = "+err);
-             if (err < NativeError.KErrNone)
-             {
-                throw new MediaException(
-                "Start failed, Symbian OS error: " + err);
-             }
-             if (iError < NativeError.KErrNone)
-             {
-                    throw new MediaException(
-                    "Start failed, Symbian OS error: " + iError);
-             }
-             if(iStartWaitFlag)
-             {
-                try
-                {
-                      // wait until actionCompleted( int aError ) is called
-                       iLockObject.wait();   // only for tck run
-                 }
-                 catch (InterruptedException ie)
-                 {
-                    // cannot occur
-                 }
-                
-             }
-          }
-    }
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doStop() throws MediaException
-    {
-        /*
-        Stops the Player. It will pause the playback at the current media time.
-        Calling start will resume the playback from where it is stopped.
-        If stop is called on a stopped Player, the request is ignored.
-        */
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doStop()");
-        int err = _stop(ManagerImpl.getEventSource(), iPlayerHandle);
-        if (err < NativeError.KErrNone)
-        {
-            throw new MediaException(
-                "Stop failed, Symbian OS error: " + err);
-        }
-        // After this request is completed,
-        // the Player is in the PREFETCHED state.
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doClose()
-    {
-    	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doclose() 1");
-        _close(ManagerImpl.getEventSource(), iPlayerHandle);
-
-        if (iPlayerHandle > NativeError.KErrNone)  // construction has succeed
-        {
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doclose() 2");
-            // notify the controls
-            iControls.dispose();
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doclose() 3");
-
-            // delete the native object
-            _dispose(ManagerImpl.getEventSource(), iPlayerHandle);
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerImpl.java : doclose() 4");
-            iPlayerHandle = 0; // Do not use native object anymore
-        }
-    }
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void setLoopCount(int aCount)
-    {
-        super.setLoopCount(aCount);
-        _setLoopCount(ManagerImpl.getEventSource(), iPlayerHandle, aCount);
-    }
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public long getDuration()
-    {
-        closeCheck();
-        long duration = _duration(ManagerImpl.getEventSource(), iPlayerHandle);
-        if (duration < NativeError.KErrNone)
-        {
-            duration = TIME_UNKNOWN;
-        }
-        return duration;
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public long setMediaTime(long aNow) throws MediaException
-    {
-        long time = _setMediaTime(ManagerImpl.getEventSource(),
-                                  iPlayerHandle,
-                                  super.setMediaTime(aNow));
-        if (time < NativeError.KErrNone)
-        {
-            throw new MediaException(
-                "Could not set media time, Symbian OS error: " + time);
-        }
-        return time;
-    }
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public long getMediaTime()
-    {
-        closeCheck();
-        long time = _getMediaTime(ManagerImpl.getEventSource(), iPlayerHandle);
-        if (time < NativeError.KErrNone)
-        {
-            time = TIME_UNKNOWN;
-        }
-        return time;
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public String getContentType()
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        return _getContentType(iPlayerHandle);
-    }
-
-    // JNI
-    private native int _initPlayer(Object aPlayerListenerObject,
-                                   int aEventSource,
-                                   int aPlayerHandle);
-
-    private static native int _start(int aEventPoster, int aPlayer);
-    private static native int _stop(int aEventPoster, int aPlayer);
-    private static native int _close(int aEventPoster, int aPlayer);
-    private static native int _prefetch(int aEventPoster, int aPlayer);
-
-    private static native int _setLoopCount(int aEventPoster, int aPlayer,
-                                            int aLoopCount);
-
-    private static native int _realize(int aEventPoster, int aPlayer);
-    private static native long _duration(int aEventPoster, int aPlayer);
-    private static native long _setMediaTime(int aEventPoster, int aPlayer,
-            long aNow);
-
-    private static native int _deallocate(int aEventPoster, int aPlayer);
-    private static native long _getMediaTime(int aEventPoster, int aPlayer);
-    private static native int _getState(int aEventPoster, int aPlayer);
-
-    protected static native int _addSourceStream(int aEventPoster,
-            int aPlayerHandle,
-            Object aSourceStreamReader);
-
-    private static native String _getContentType(int aPlayerHandle);
-
-    private static native void _dispose(int aEventSourceHandle,
-                                        int aObjectHandle);
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlayerListenerImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is player listener implementation
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.Control;
-import javax.microedition.media.control.VideoControl;
-import java.util.Vector;
-import java.util.Enumeration;
-//import com.symbian.midp.runtime.MIDletExecutor;
-//import com.symbian.midp.runtime.MIDletInstance;
-import com.nokia.mj.impl.utils.Logger;
-
-
-public class PlayerListenerImpl
-{
-    // PlayerListener event types that come from native side
-    protected static final int E_STARTED = 0;
-    protected static final int E_STOPPED = 1;
-    protected static final int E_STOPPED_AT_TIME = 2;
-    protected static final int E_END_OF_MEDIA = 3;
-    protected static final int E_DURATION_UPDATED = 4;
-    protected static final int E_AUDIO_DEVICE_UNAVAILABLE = 5;
-    protected static final int E_VOLUME_CHANGED = 6;
-    protected static final int E_SIZE_CHANGED = 7;
-    protected static final int E_ERROR = 8;
-    protected static final int E_CLOSED = 9;
-    protected static final int E_RECORD_STARTED = 10;
-    protected static final int E_RECORD_STOPPED = 11;
-    protected static final int E_PRIVATE_DATA_AVAILABLE = 12;
-    protected static final int E_PRIVATE_DATA_OVERWRITTEN = 13;
-    protected static final int E_BUFFERING_STARTED = 14;
-    protected static final int E_BUFFERING_STOPPED = 15;
-    protected static final int E_RECORD_ERROR = 16;
-    // For global volume info
-    protected static final int E_NOKIA_EXTERNAL_VOLUME_EVENT = 17;
-    // for Audio Routing preferences change
-    protected static final int E_AUDIO_ROUTING_PREFERENCE_CHANGED_EVENT = 18;
-
-    private static final String KVideoControlClassName =
-        "javax.microedition.media.control.VideoControl";
-
-    // maps int event types to String event types
-    private static Vector sEventTypes;
-
-    static
-    {
-        sEventTypes = new Vector(19); // there's 17 event types + 1 global volume event + 1 Audio Routing Preference Change Event
-        sEventTypes.addElement(PlayerListener.STARTED); // E_STARTED
-        sEventTypes.addElement(PlayerListener.STOPPED); // E_STOPPED
-        sEventTypes.addElement(PlayerListener.STOPPED_AT_TIME); // E_STOPPED_AT_TIME
-        sEventTypes.addElement(PlayerListener.END_OF_MEDIA); // E_END_OF_MEDIA
-        sEventTypes.addElement(PlayerListener.DURATION_UPDATED); // E_DURATION_UPDATED
-        sEventTypes.addElement(PlayerListener.DEVICE_UNAVAILABLE); //   E_AUDIO_DEVICE_UNAVAILABLE
-        sEventTypes.addElement(PlayerListener.VOLUME_CHANGED); //   E_VOLUME_CHANGED
-        sEventTypes.addElement(PlayerListener.SIZE_CHANGED); // E_SIZE_CHANGED
-        sEventTypes.addElement(PlayerListener.ERROR); // E_ERROR
-        sEventTypes.addElement(PlayerListener.CLOSED); //   E_CLOSED
-        sEventTypes.addElement(PlayerListener.RECORD_STARTED); //   E_RECORD_STARTED
-        sEventTypes.addElement(PlayerListener.RECORD_STOPPED); //   E_RECORD_STOPPED
-        sEventTypes.addElement(null); //    E_PRIVATE_DATA_AVAILABLE
-        sEventTypes.addElement(null); //    E_PRIVATE_DATA_OVERWRITTEN
-        sEventTypes.addElement(PlayerListener.BUFFERING_STARTED); //    E_BUFFERING_STARTED
-        sEventTypes.addElement(PlayerListener.BUFFERING_STOPPED); //    E_BUFFERING_STOPPED
-        sEventTypes.addElement(PlayerListener.RECORD_ERROR);        //  E_RECORD_ERROR
-        sEventTypes.addElement("com.nokia.external.volume.event");  // E_NOKIA_EXTERNAL_VOLUME_EVENT
-        sEventTypes.addElement("com.nokia.audiooutputchange.event");  // E_AUDIO_ROUTING_PREFERENCE_CHANGED_EVENT
-    }
-
-    private Vector iPlayerListeners = new Vector();
-    private Player iPlayer;
-
-    /**
-     * Constructor
-     * @param aPlayer Handle to player
-     */
-    public PlayerListenerImpl(Player aPlayer)
-    {
-        iPlayer = aPlayer;
-    }
-
-    /**
-     * Adds PlayerListener
-     * @param aPlayerListener Listener that will be added
-     * @see PlayerListener
-     */
-    public synchronized void addPlayerListener(PlayerListener aPlayerListener)
-    {
-        if (aPlayerListener == null)
-        {
-            return;
-        }
-        if (!iPlayerListeners.contains(aPlayerListener))
-        {
-            iPlayerListeners.addElement(aPlayerListener);
-        }
-    }
-
-
-    /**
-     * Removes PlayerListener
-     * @param aPlayerListener Listener that will be removed
-     * @see PlayerListener
-     */
-    public synchronized void removePlayerListener(PlayerListener aPlayerListener)
-    {
-        iPlayerListeners.removeElement(aPlayerListener);
-    }
-
-    /**
-     * Deliveres event to all registered PlayerListeners
-     * @param aEventType type defined in PlayerListener
-     * @param aEventData data for event
-     */
-    public synchronized void postEvent(String aEventType, Object aEventData)
-    {
-        Enumeration listeners = iPlayerListeners.elements();
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerListenerImpl.java::PostEvent" + listeners);
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlayerListenerImpl.java::PostEvent" + aEventType + aEventData );
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"PlaerListenerImpl.java::PostEvent, this = "+this +" iPlayerListeners = "+iPlayerListeners);
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Listeners count = "+iPlayerListeners.size());
-        while (listeners.hasMoreElements())
-        {
-            PlayerListener listener = (PlayerListener)listeners.nextElement();
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"listener = "+listener);
-
-            CallBackThread obj = new CallBackThread(aEventType,aEventData,listener,iPlayer);
-            Thread t = new Thread(obj);
-            t.start();
-        }
-    }
-
-    /**
-     * Posts a long event. Called from native implementation.
-     * @param aEventType Event type
-     * @param aEventData Event data
-     */
-    private void postLongEvent(int aEventType, long aEventData)
-    {
-        // event has come after this has been gc'd
-        if (this == null)
-        {
-            return;
-        }
-        Long eventData = new Long(aEventData);
-        postEvent(getEventType(aEventType), eventData);
-    }
-
-    /**
-     * Posts a string event. Called from native implementation.
-     * @param aEventType Event type
-     * @param aEventData Event data
-     */
-    private void postStringEvent(int aEventType, String aEventData)
-    {
-        // event has come after this has been gc'd
-        if (this == null)
-        {
-            return;
-        }
-        if (aEventType == E_SIZE_CHANGED)
-        {
-            VideoControl vc = (VideoControl)iPlayer.getControl(KVideoControlClassName);
-            postEvent(getEventType(aEventType), vc);
-        }
-        else
-        {
-            postEvent(getEventType(aEventType), aEventData);
-        }
-    }
-
-    /**
-     * Posts object event. Called from native implementation.
-     * @param aEventType Event type
-     * @param aEventData Event data
-     */
-    private void postObjectEvent(int aEventType, Object aEventData)
-    {
-        // event has come after this has been gc'd
-        if (this == null)
-        {
-            return;
-        }
-        postEvent(getEventType(aEventType), aEventData);
-    }
-
-    /**
-     * Posts a control event. Called from native implementation.
-     * @param aEventType Event type
-     * @param aEventData Event data
-     */
-    private void postControlEvent(int aEventType, String aEventData)
-    {
-        // event has come after this has been gc'd
-        if (this == null)
-        {
-            return;
-        }
-        Control eventData = iPlayer.getControl(aEventData);
-        postEvent(getEventType(aEventType), eventData);
-    }
-
-    /**
-     * Converts int eventType to String eventType
-     * @param aEventType event type to be converted
-     * @return converted event type
-     */
-    private String getEventType(int aEventType)
-    {
-        String eventType = null;
-        eventType = (String)sEventTypes.elementAt(aEventType);
-        return eventType;
-    }
-    
-    class CallBackThread extends Thread
-    {
-        private String iEventType;
-        private Object iEventData;
-        private PlayerListener iListener;
-        private Player iPlayer;
-        
-        public CallBackThread(String aEventType, Object aEventData, PlayerListener aListener, Player aPlayer)
-        {
-            iEventType = aEventType;
-            iEventData = aEventData;
-            iListener = aListener;
-            iPlayer = aPlayer;
-            
-            
-        }
-        
-        public void doCallBack()
-        {
-            
-            
-        }
-        public void run()
-        {
-            iListener.playerUpdate(iPlayer,
-                                  iEventType,
-                                  iEventData);  
-                                  
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"after calling midlet playerupdate");
-               
-            
-        }   
-        
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/PlugIn.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2002 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:  PlugIn used to extend mma
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.MediaException;
-
-/**
- * This interface can be used extend Mobile Media API. This interface must
- * be registered to <code>ManagerImpl</code> with <code>addPlugIn</code>
- * method. <code>ManagerImpl</code> instance can be obtained with
- * <code>ManagerImpl.getInstance</code> method.
- * <code>getSupportedContentTypes</code> and <code>getSupportedProtocols</code>
- * methods will be called when equivalent Manager methods are called.
- *
- * @see ManagerImpl.addPlugin
- */
-public interface PlugIn
-{
-    /**
-     * Return the list of supported content types for the given protocol.
-     * <p>
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content types returned.
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocol used.
-     * <p>
-     * For example, if the given <code>protocol</code>
-     * is <code>"http"</code>,
-     * then the supported content types that can be played back
-     * with the <code>http</code> protocol will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the <code>protocol</code>,
-     * all the supported content types for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>protocol</code> is an invalid or
-     * unsupported protocol, then an empty array will be returned.
-     *
-     * @param aProtocol The input protocol for the supported content types.
-     * @return The list of supported content types for the given protocol.
-     */
-    String[] getSupportedContentTypes(String aProtocol);
-
-    /**
-     * Return the list of supported protocols given the content
-     * type.  The protocols are returned
-     * as strings which identify what locators can be used for creating
-     * <code>Player</code>'s.
-     * <p>
-     * See <a href="#media-protocol">protocol name</a> for the syntax
-     * of the protocols returned.
-     * See <a href="#content-type">content types</a> for the syntax
-     * of the content type used.
-     * <p>
-     * For example, if the given <code>content_type</code>
-     * is <code>"audio/x-wav"</code>, then the supported protocols
-     * that can be used to play back <code>audio/x-wav</code>
-     * will be returned.
-     * <p>
-     * If <code>null</code> is passed in as the
-     * <code>content_type</code>,
-     * all the supported protocols for this implementation
-     * will be returned.  The returned array must be non-empty.
-     * <p>
-     * If the given <code>content_type</code> is an invalid or
-     * unsupported content type, then an empty array will be returned.
-     *
-     * @param aContentType The content type for the supported protocols.
-     * @return The list of supported protocols for the given content type.
-     */
-    String[] getSupportedProtocols(String aContentType);
-
-    /**
-     * Create a <code>Player</code> for a <code>DataSource</code>.
-     * This method will be called if MMA was not able to create
-     * Player for the DataSource.
-     *
-     * @param aDataSource The <CODE>DataSource</CODE> that provides
-     * the media content.
-     * @return A new <code>Player</code>.
-     * @exception IllegalArgumentException Thrown if <code>source</code>
-     * is <code>null</code>.
-     * @exception MediaException Thrown if a <code>Player</code> cannot
-     * be created for the given <code>DataSource</code>.
-     * @exception IOException Thrown if there was a problem connecting
-     * with the source.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to create the <code>Player</code>.
-     */
-    InternalPlayer createPlayer(DataSource aDataSource)
-    throws MediaException, IOException;
-
-    /**
-     * Method used to prepare player. This method is used only for
-     * MMA internal extensions. If PlugIn does not support given player
-     * this method must not do anything.
-     *
-     * @param aPlayer Player to prepare.
-     * @exception MediaException Thrown if a <code>InternalPlayer</code> cannot
-     * be prepared.
-     */
-    void preparePlayer(InternalPlayer aPlayer) throws MediaException;
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SeekControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Interface to seek stream.
-*
-*/
-
-package com.nokia.microedition.media;
-
-import java.io.IOException;
-import javax.microedition.media.Control;
-
-/**
- * Interface to seek stream to wanted position.
- */
-public interface SeekControl extends Control
-{
-    /**
-     * Seeks stream to wanted position.
-     * @param aWhere position in the stream.
-     * @throw IOException Thrown if an I/O error occurs.
-     */
-    void seek(int aWhere) throws IOException;
-
-    /**
-     * Close controlled stream.
-     */
-    void close();
-}
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/Setup.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class setup MMA plugins.
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * Class used to setup external components.
- */
-public class Setup
-{
-    // Class names used to invoke external components.
-    private static final String[] MMA_PLUGINS =
-    {
-        //"com.nokia.amms.MMAInvokeListenerImpl"
-    };
-
-    /**
-     * Private constructor not to allow construction.
-     */
-    private Setup()
-    {
-    }
-
-    /**
-     * Setup external components.
-     * @param aEventSourceHandle Native handle MMA event source.
-     */
-    public static void setup(int aEventSourceHandle)
-    {
-        // Go through all plugins
-        for (int i = 0; i < MMA_PLUGINS.length; i++)
-        {
-            invokeComponent(aEventSourceHandle, MMA_PLUGINS[ i ]);
-        }
-    }
-
-    /**
-     * Invokes other component. This method returns without creating the
-     * components if the class is not found.
-     *
-     * @param aEventSourceHandle Handle to native mma event source.
-     * @param aClassName Full class name to create. Class must have public
-     * default constructor and implement MMAInvokeListener interface.
-     * @throws OutOfMemoryError if component cannot be created.
-     */
-    private static void invokeComponent(int aEventSourceHandle, String aClassName)
-    {
-        try
-        {
-            Class invokerClass =
-                Class.forName(aClassName);
-            MMAInvokeListener invoker =
-                (MMAInvokeListener)invokerClass.newInstance();
-            invoker.notifyInvoke(aEventSourceHandle);
-        }
-        catch (InstantiationException ie)
-        {
-            throw new OutOfMemoryError("Instantiation failed, " + ie.toString());
-        }
-        catch (IllegalAccessException iae)
-        {
-            throw new OutOfMemoryError("Illegal access, " + iae.toString());
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            // If invoker class cannot be found, plugin is not added to J2ME
-            // build and MMA is used without it.
-            Logger.ELOG(Logger.EJavaMMAPI, "MMA::Setup:: ", cnfe);
-        }
-    }
-}
-// End of File
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SourcePlayer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is player with DataSource
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.protocol.SourceStream;
-import javax.microedition.media.MediaException;
-import java.io.IOException;
-import com.nokia.microedition.media.protocol.SourceStreamReader;
-import com.nokia.mj.impl.utils.Logger;
-/**
- * This class add to PlayerImpl DataSource handling.
- */
-public class SourcePlayer extends PlayerImpl
-{
-    //
-    protected DataSource iDataSource;
-
-    // Used to SourceStream to native side
-    protected SourceStreamReader iSourceStreamReader;
-
-    /**
-     * Constructor
-     * @param aDataSource Handle to DataSource
-     * @param aPlayerHandle handle to player (CMMAPlayer)
-     */
-    public SourcePlayer(DataSource aDataSource,
-                        int aPlayerHandle) throws MediaException
-    {
-        super(aPlayerHandle);
-        iDataSource = aDataSource;
-				Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"SourcePlayer player handle = " + aPlayerHandle);
-        // Create reader for the stream
-        iSourceStreamReader = new SourceStreamReader(
-            aDataSource.getStreams()[ 0 ],
-            aDataSource, // Controllable object
-            ManagerImpl.getEventSource(),
-            aPlayerHandle);
-
-        // Create SourceStreamReader in native side
-        int nativeHandle = _addSourceStream(ManagerImpl.getEventSource(),
-                                            iPlayerHandle,
-                                            iSourceStreamReader);
-
-        // Failed to create a native-side CMMASourceStream
-        if (nativeHandle <= 0)
-        {
-            throw new MediaException("Could not create Player, Symbian OS error: "
-                                     + nativeHandle);
-        }
-
-        // Assing java object to corresponding native object
-        iSourceStreamReader.setHandle(nativeHandle);
-    }
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doPrefetch() throws MediaException
-    {
-        // DataSource connect must reset its SourceStream if DataSource is
-        // disconnected.
-        try
-        {
-            iDataSource.connect();
-        }
-        catch (IOException ioe)
-        {
-            throw new MediaException("IOException occurred, " + ioe.getMessage());
-        }
-
-        super.doPrefetch();
-    }
-
-    /**
-     * interface PlayerImpl
-     * @see PlayerImpl
-     */
-    public void doDeallocate()
-    {
-        if (iDataSource.getStreams()[ 0 ].getSeekType() ==
-                SourceStream.NOT_SEEKABLE)
-        {
-            // if stream is not seekable we have to disconnect the whole source
-            // and re-connect it if prefetch is called
-            iDataSource.disconnect();
-        }
-        else
-        {
-            // stream is RANDOM_ACCESSIBLE or SEEKABLE_TO_START and can be
-            // seeked to beginning of the stream
-            iSourceStreamReader.resetStream();
-        }
-
-        super.doDeallocate();
-    }
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void close()
-    {
-        super.close();
-        // close threads from SourceStreamReaders
-        iSourceStreamReader.close();
-        iDataSource.disconnect();
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/SystemTimeBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements TimeBase
-*
-*/
-
-
-package com.nokia.microedition.media;
-
-import javax.microedition.media.TimeBase;
-
-public class SystemTimeBase implements TimeBase
-{
-
-    /**
-     * Constructor
-     */
-    public SystemTimeBase()
-    {
-    }
-
-    /**
-     * From TimeBase interface
-     * @return current time
-     */
-    public long getTime()
-    {
-        return System.currentTimeMillis();
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,576 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import javax.microedition.media.Control;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.protocol.DataSource;
-
-import org.eclipse.ercp.swt.mobile.MobileShell;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
-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.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-import com.nokia.microedition.media.BufferDataSource;
-import com.nokia.microedition.media.InputStreamDataSource;
-import com.nokia.microedition.media.InputStreamSourceStream;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.PlayerBase;
-import com.nokia.microedition.media.PlayerListenerImpl;
-
-/**
- * @author d35kumar
- *
- */
-public class AnimationPlayer extends PlayerBase {
-	// GIF image information, array length will be equal to the number of frames in image 
-	protected ImageData [] iImageData;
-	// number of times we need to repeat the animation
-	// by default it's value is one 
-	private int iTotalLoopCount=1;
-	// this holds all control related to this player 
-	Hashtable iControls= new Hashtable();
-	// Current frame index of the Animation file
-	private int iFrameindex;
-	// Current Loop Count 
-	private int iCurrentLoopCount;
-	// Display object of the eSWT API, creating this object will integrate the current java code with eSWT API. 
-	Display iDisplay; 
-	// Control object of ESWT API, return from LCDUIInvoker. 
-	org.eclipse.swt.widgets.Control iControl;
-	// Constants used everywhere to compare the string 
-	private static final String ANIMATION_CONTENT_TYPE = "image/gif";
-	
-	private final String fVideoControl=VideoControl.class.getName();
-	private final String fFramePositioningControl=FramePositioningControl.class.getName();
-	private final String fStopTimeControl=StopTimeControl.class.getName();
-	private final String fRateControl=RateControl.class.getName();
-	 /**
-     * Default control package. Used when getting control with
-     * getControl method which appends default control package if package is
-     * not specified.
-     */
-    static final String CONTROL_DEFAULT_PACKAGE =
-        "javax.microedition.media.control.";
-    
-	//For Player listener 
-	protected PlayerListenerImpl iPlayerListenerImpl;
-	//Image to be displayed, again object of eSWT API. 
-	protected Image iImage;
-	// Actual dimension of the image, this should be initialized while creating the player
-	// as user can change the size of the image later, in that case too, getSourceheight and getSourceWidth 
-	// of VideoControl should return the actual width and height of the image 
-	Point iSourceDimension;
-	long iMediaTime;
-	
-	// Display Location, of the image   
-	private Point iDisplayLocation= new Point(0,0);
-	
-
-	/**
-	 * 
-	 * @param ds DataSource which contains the data to be displayed 
-	 */
-	public AnimationPlayer(DataSource ds){
-		final String DEBUG_STR="AnimationPlayer::AnimationPlayer(DataSource)";
-		System.out.println(DEBUG_STR+"+");
-		iPlayerListenerImpl= new PlayerListenerImpl(this);
-		//TODO check if we can do it in better way 
-		// this is temporary solution
-		// for this I have written two functions getDataSource and getInputStream function 
-		BufferDataSource bds =(BufferDataSource )ds;
-		InputStreamDataSource isds=(InputStreamDataSource)bds.getDataSource();
-		InputStreamSourceStream isss=(InputStreamSourceStream )isds.getStreams()[0];
-		InputStream is = isss.getInputStream();
-		
-		if(is!=null){
-			ImageLoader imageLoader= new ImageLoader();
-			iImageData=imageLoader.load(is);
-			//iRepeatCount=imageLoader.repeatCount;
-			iSourceDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
-		}
-		pupulateControl();
-		System.out.println(DEBUG_STR+"-");
-	}
-	
-	/**
-	 * 
-	 * @param locator
-	 * @throws SWTException
-	 */
-	public AnimationPlayer(String locator) throws SWTException{
-		final String DEBUG_STR="AnimationPlayer::AnimationPlayer(Locator )";
-		System.out.println(DEBUG_STR+"+");
-		ImageLoader imageLoader= new ImageLoader();
-		System.out.println(DEBUG_STR+"Locator string is "+locator);
-		// Following line may throw SWTException 
-		iImageData=imageLoader.load(locator);
-		//iRepeatCount=imageLoader.repeatCount;
-		iSourceDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
-		pupulateControl();
-		System.out.println(DEBUG_STR+"-");
-	}
-	
-	/**
-	 * Moved the player to close state and releases all resources, called from PlayerBase class  
-	 */
-	protected void doClose() {
-		final String DEBUG_STR="AnimationPlayer::doClose()";
-		System.out.println(DEBUG_STR+"+");
-		iState=CLOSED;
-		iPlayerListenerImpl.postEvent(PlayerListener.CLOSED, null);
-		System.out.println(DEBUG_STR+"-");
-	}
-
-	protected void doDeallocate() {
-		// what to do here, nullify image data and display etc???
-	}
-
-	protected void doPrefetch() throws MediaException {
-		final String DEBUG_STR="AnimationPlayer::doPrefetch()";
-		System.out.println(DEBUG_STR+"+");
-		iState=PREFETCHED;
-		System.out.println(DEBUG_STR+"-");
-	}
-
-	protected void doRealize() throws MediaException {
-		final String DEBUG_STR="AnimationPlayer::doRealize()";
-		System.out.println(DEBUG_STR+"+");
-		iState=REALIZED;
-		// this is temporary solution implement it in proper way 
-		iImage=new Image(iDisplay, iImageData[0]);
-		System.out.println(DEBUG_STR+"-");
-	}
-
-	protected void doStop() throws MediaException {
-		final String DEBUG_STR="AnimationPlayer::doStop()";
-		System.out.println(DEBUG_STR+"+");
-		// since after stopping the player the player state will move to pre-fetched state 
-		iState=PREFETCHED;
-		iPlayerListenerImpl.postEvent(PlayerListener.STOPPED, new Long(iMediaTime * 10000));
-		System.out.println(DEBUG_STR+"-");
-	}
-
-	public void addControl(Control aControl, String aControlType)
-			throws MediaException {
-		iControls.put(aControlType, aControl);
-	}
-
-	public void addPlayerListener(PlayerListener aPlayerListener) {
-		closeCheck();
-        iPlayerListenerImpl.addPlayerListener(aPlayerListener);
-	}
-	
-	/**
-	 * Returns the Content type("image/GIF") supported for by this player, 
-	 */
-	public String getContentType() {
-		closeCheck();
-        unrealizedCheck();
-		return ANIMATION_CONTENT_TYPE;
-	}
-	
-	/**
-	 * This function will return, total time in microseconds this player can be played 
-	 */
-	public long getDuration() {
-		closeCheck();
-		long time = TIME_UNKNOWN;
-		int totalNoOfFrames = iImageData.length;
-		for (int i = 0; i < totalNoOfFrames; i++) {
-			time += iImageData[i].delayTime;
-		}
-		// Since we have to return it in microsecond multiply it with 1000; 
-		return time * 10000;
-	}
-	
-	/**
-	 * This returned the total time taken, till now, to play the video.  
-	 */
-	public long getMediaTime() {
-		return iMediaTime*10000;
-	}
-
-	public int getState() {
-		return iState;
-	}
-	
-	/**
-	 * Removes the specified playerListner from this player  
-	 */
-	public void removePlayerListener(PlayerListener aPlayerListener) {
-		closeCheck();
-        iPlayerListenerImpl.removePlayerListener(aPlayerListener);
-	}
-	public void start() throws MediaException {
-		final String DEBUG_STR = "AnimationPlayer::start()";
-//		prefetch();
-		initialize();
-		addPaintListener(iControl);
-		iState = STARTED;
-		Thread thread = new Thread("Animation") {
-			int frameIndex = iFrameindex;
-			int loopCount = iCurrentLoopCount;
-			GC gc=null;
-			public void run() {
-				final int noOfFrames = iImageData.length;
-				while (frameIndex < noOfFrames && (loopCount < iTotalLoopCount)
-						&& (iState == STARTED)) {
-					final int delayTimeForNextFrame = iImageData[frameIndex].delayTime;
-					System.out.println("\n\n\n************" + DEBUG_STR
-							+ "Inside the while loop " + frameIndex + "/"
-							+ noOfFrames);
-					// Since we are going to display first frame, notify all
-					// PlayerListener that Player has started
-					if (frameIndex == 0) {
-						iPlayerListenerImpl.postEvent(PlayerListener.STARTED,
-								new Long(iMediaTime * 10000));
-					}
-					iDisplay.asyncExec(new Runnable() {
-						public void run() {
-							System.out.println(DEBUG_STR+"Inside run method");
-							try {
-								if (gc == null)gc = new GC(iImage);
-							} catch (Exception e) {
-								// TODO Auto-generated catch block
-								e.printStackTrace();
-							}
-							System.out.println(DEBUG_STR+"Inside run method246");
-							Image tempImage = new Image(iDisplay,
-									iImageData[frameIndex]);
-							System.out.println(DEBUG_STR+"Inside run method246");
-							gc.drawImage(tempImage, 0, 0);
-							tempImage.dispose();
-							frameIndex = (frameIndex + 1) % noOfFrames;
-							System.out.println(DEBUG_STR+"Inside run method253>>>>>>>>>"+frameIndex);
-							iControl.redraw();
-							// update the mediaTime, as Animation progress
-							iMediaTime += delayTimeForNextFrame;
-							// If imageIndex becomes zero it means, all frames
-							// has been displayed
-							// So increase the loopCount
-							if (frameIndex == 0) {
-								// send the END_OF_MEDIA event to all listener
-								iPlayerListenerImpl.postEvent(
-										PlayerListener.END_OF_MEDIA, new Long(
-												iMediaTime * 10000));
-								loopCount++;
-								// since player is again going to start from the
-								// first frame
-								// so media time should be set to zero
-								iMediaTime = 0;
-							}
-							System.out
-									.println(DEBUG_STR
-											+ "end of asynchronous block imageIndex is "
-											+ frameIndex + " and loop count is"
-											+ loopCount );
-						}
-					});
-					try {
-						Thread.sleep(delayTimeForNextFrame * 10);
-					} catch (InterruptedException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-					System.out
-							.println("**********************End of while loop\n\n\n");
-				}
-				iCurrentLoopCount=loopCount;
-				System.out.println(DEBUG_STR + "Came out side the while loop "
-						+ iState);
-			}
-		};
-		thread.start();
-		System.out.println(DEBUG_STR + "-");
-		// }catch(Exception e){
-		// System.out.println(DEBUG_STR+"Exception caught"+e);
-		// e.printStackTrace();
-		// }
-	}
-	
-	/**
-	 * This function is also being called from VideoControl class, 
-	 * Since on each event 
-	 * @param aControl
-	 * @throws MediaException 
-	 */
-	 void addPaintListener(org.eclipse.swt.widgets.Control aControl) throws MediaException{
-		 final String DEBUG_STR="AnimationPlayer::addPaintListener()";
-		 iControl=aControl;
-		// iDisplay and IControl shouldn't be null here 
-		System.out.println(DEBUG_STR+" Control is "+iControl+" Display "+iDisplay);
-		// Following line should never execute
-		// TODO check what message to provide in case of Exception 
-		if(iControl==null)
-			throw new MediaException("Update this message");
-		iDisplay.syncExec(new Runnable(){
-			public void run() {
-				// if user is writing his MIDlet using eSWT API, then the Control object will be MobileShell
-				// and in that case it is mandatory to open the shell
-//				if(iControl instanceof MobileShell){
-				if(iControl instanceof Shell){
-					((Shell)iControl).open();
-				}
-				iControl.addPaintListener(new PaintListener(){
-					public void paintControl(PaintEvent pe) {
-//						System.out.println(DEBUG_STR+"paintControl() paintEvent is "+pe);
-//						System.out.println(DEBUG_STR+"paintControl() Display location is "+iDisplayLocation.x+", "+iDisplayLocation.y);
-						if(iImage!=null){
-							pe.gc.drawImage(iImage, iDisplayLocation.x, iDisplayLocation.y);
-						}
-					}
-				});
-			}
-		});
-	}
-	/**
-	 * 
-	 */
-	public Control getControl(String aControlType) {
-		if (aControlType == null) {
-			throw new IllegalArgumentException("argument is null");
-		}
-		
-		String controlType = aControlType;
-
-        // check if package name exists
-        if (controlType.indexOf(".") == -1)
-        {
-            // add package name
-            controlType = CONTROL_DEFAULT_PACKAGE + aControlType;
-        }
-        Control control = (Control)iControls.get(controlType);
-        // If control does not exists with default name, check if there is
-        // is a control with same type ( extends the given class name ).
-		if (control == null) {
-			try {
-				// try to create class for control
-				Class controlClass = Class.forName(controlType);
-				Enumeration elements = iControls.elements();
-				// search if any control is same type that requested control
-				while (elements.hasMoreElements()) {
-					Control tmpControl = (Control) elements.nextElement();
-					if (controlClass.isInstance(tmpControl)) {
-						// control is found
-						control = tmpControl;
-					}
-				}
-			} catch (ClassNotFoundException cnfe) // the class could not be
-													// found
-			{
-				// Exception is ignored and null is returned from this method
-			} catch (Error e) // the function failed for any other reason.
-			{
-				// Error is ignored and null is returned from this method
-			}
-		}
-        return control;
-	}
-	/**
-	 * Returns all the control associated with this player 
-	 */
-	public Control[] getControls() {
-		Control control[]= new Control[iControls.size()];
-		Enumeration enumeration= iControls.elements();
-		byte index=0;
-		while(enumeration.hasMoreElements()){
-			control[index++]=(Control)enumeration.nextElement();
-		}
-		return control;
-	}
-	/**
-	 * 
-	 */
-	public void setLoopCount(int aCount){
-		super.setLoopCount(aCount);
-		iTotalLoopCount=aCount;
-	}
-	/**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-	public long setMediaTime(long aNow) throws MediaException {
-		long now = super.setMediaTime(aNow);
-		int totalFrames = iImageData.length;
-		int totalTime = 0;
-		for (int i = 0; i < totalFrames; i++) {
-			if (now < totalTime) {
-				iFrameindex=i;
-				break;
-			}
-			totalTime += iImageData[i].delayTime * 10000;
-		}
-		return totalTime;
-	}
-	//////////////////////////////////////////////////////////////////////////////////////
-	// Following functions are for internal use, and not exposed to MIDlet developer//////
-	/////////////////////////////////////////////////////////////////////////////////////
-	/**
-	 * 
-	 */
-	private void doStart(){
-		
-	}
-	
-	
-    /**
-	 * This function is responsible for creating all controls and adding it into Controls hashtable.
-	 */
-	private void pupulateControl(){
-		final String DEBUG_STR="AnimationPlayer::pupulateControl()";
-		System.out.println(DEBUG_STR+"+");
-		VideoControl videoControl= new VideoControl(this);
-		FramePositioningControl fpc= new FramePositioningControl(this);
-		StopTimeControl stc= new StopTimeControl(this);
-		RateControl rc= new RateControl(this);
-		try {
-			addControl(videoControl, fVideoControl);
-			addControl(fpc, fFramePositioningControl);
-			addControl(stc, fStopTimeControl);
-			addControl(rc,fRateControl);
-		} catch (MediaException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		System.out.println(DEBUG_STR+"-");
-	}
-	/**
-	 * This function initialize iControl and iDisplay object if it is null,
-	 * otherwise return immediately.
-	 * 
-	 * In case of Canvas, eSWT control will be returned immediately from VideoControl(vc.getControl()), 
-	 * but in case of CustomItem we need to keep polling, eSWT doesn't return the control for CustomItem 
-	 * until CustomItem is appended to Form.      
-	 */
-	
-	private void initialize() {
-		final String DEBUG_STR = "AnimationPlayer::initialize()";
-		System.out.println(DEBUG_STR + "+");
-		System.out.println(DEBUG_STR + " Control is " + iControl
-				+ " display is " + iDisplay);
-		if (iControl == null || iDisplay == null) {
-			VideoControl vc = (VideoControl) getControl(fVideoControl);
-			iDisplay = vc.getiDisplay();
-			// in case of CustomItem,
-			while ((iControl = vc.getControl()) == null) {
-				try {
-					Thread.sleep(100);
-				} catch (InterruptedException e) {
-					e.printStackTrace();
-				}
-			}
-		}
-		System.out.println(DEBUG_STR + "-");
-	}
-	
-	/**
-	 * This function will be called from setDisplaySize(int width, int height) of animation/VideoControl class
-	 * When MIDlet developer will try to alter the size of the image 
-	 * @param width : to be set of the video(Animated GIF) 
-	 * @param height : height to be set of video(Animated GIF) 
-	 */
-	void updateImageData(int width, int height){
-		final String DEBUG_STR= "AnimationPlayer::updateImageData(int width, int height)";
-		System.out.println(DEBUG_STR+"+");
-		int noOfFrames= iImageData.length;
-		for(int i=0;i<noOfFrames;i++){
-			iImageData[i]=iImageData[i].scaledTo(width, height);
-		}
-		iImage=new Image(iDisplay, iImageData[0]);
-		System.out.println(DEBUG_STR+"-");
-	}
-	
-	/**
-	 * This function will be called from getSnapshot() function of VideoControl class 
-	 * to get the snap shot of the video 
-	 * 
-	 * @param format
-	 */
-	// This function is not implemented fully  
-	int[] getCurrentFrame(String format){
-		final String DEBUG_STR="AnimationPlayer::getCurrentFrame()";
-		System.out.println(DEBUG_STR+"+");
-		ImageData currentFrameImageData=iImage.getImageData();
-		int data[][]= new int[currentFrameImageData.height][currentFrameImageData.width];
-		System.out.println("Width of the current Image is "+data[0].length+" height "+data.length);
-		
-		int imageWidth=data[0].length;
-		int imageHeight=data.length;
-		System.out.println("Image Width "+imageWidth+", "+currentFrameImageData.width+" height "+imageHeight+", "+currentFrameImageData.height);
-		
-		for(int i=0;i<imageHeight;i++){
-			currentFrameImageData.getPixels(0, i, imageWidth, data[i], 0);
-			System.out.println(DEBUG_STR+"=========>"+data[i]);
-		}
-		System.out.println(DEBUG_STR+"After reading all pixel value");
-		int[] byteArray=new int[imageWidth*imageHeight];
-		//int dataLength=data.length;
-		
-		for(int i=0;i<imageHeight;i++){
-			System.arraycopy(data[i], 0, byteArray, i*imageWidth, imageWidth);
-		}
-		System.out.println(DEBUG_STR+"After merging all array into single array ");
-		System.out.println(DEBUG_STR+"-"+byteArray+">>>>>"+byteArray.length);
-		return byteArray;
-	}
-	
-	/**
-	 * Returns Point object, which contains the width and height of the image
-	 * Called from VideoControl to get the image width and height, 
-	 * so that Item will be created exactly of same dimension 
-	 */
-	org.eclipse.swt.graphics.Point getImageDimension(){
-		return new org.eclipse.swt.graphics.Point(iImageData[0].width, iImageData[0].height);  
-	}
-	
-	/**
-	 * This returns the imageData array, 
-	 * called from FramePositioningControl class to calculate the frame time 
-	 */
-	ImageData[] getImageData(){
-		return iImageData;
-	}
-	
-	/**
-	 * 
-	 * @param aDisplayLocation x,y coordinate where image is to be displayed 
-	 */
-	void setDisplayLocation(int aX, int aY){
-		iDisplayLocation=new Point(aX,aY);
-	}
-	
-	/**
-	 * @return the position of the image to be displayed 
-	 */
-	Point getiDisplayLocation() {
-		return iDisplayLocation;
-	}
-	/**
-	 * Called from VideoControl to get the dimension of original image size 
-	 * @return
-	 */
-	Point getSourceDimension() {
-		return iSourceDimension;
-	}
-
-	/**
-	 * @return the iPlayerListenerImpl
-	 */
-	PlayerListenerImpl getiPlayerListenerImpl() {
-		return iPlayerListenerImpl;
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayerFactory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:  This class has been implemented for playing the GIF animation
- * Earlier implementation were dependent on native API, but now AnimationPlayer 
- * will be not use any native code, and all the implementation here is using eswt API 
- *
- */
-
-package com.nokia.microedition.media.animation;
-
-import java.io.IOException;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.protocol.DataSource;
-
-import org.eclipse.swt.SWTException;
-
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.PlugIn;
-
-/**
- * This class is used for playing GIF image animation. This class also
- * implements PlugIn interface which is used from ManagerImpl.
- * Entire Animation playing is written using eSWT API.
- * There is no call to native. 
- * 
- */
-public class AnimationPlayerFactory implements PlugIn {
-
-	// Used to recognize supported locators.
-	// private static final String ANIMATION_FILE_EXTENSION = ".gif";
-
-	// Used to get supported protocols and content type.
-	private static final String ANIMATION_CONTENT_TYPE = "image/gif";
-	private static final String ANIMATION_HTTP_PROTOCOL = "http";
-	private static final String ANIMATION_HTTPS_PROTOCOL = "https";
-	private static final String ANIMATION_FILE_PROTOCOL = "file";
-	// There is no need to read the first 6 byte and compare it with following string 
-//	private static final String ANIMATION_GIF_HEADER="GIF89a";
-
-	/**
-	 * From PlugIn
-	 */
-	public InternalPlayer createPlayer(DataSource aDataSource)
-			throws MediaException, IOException {
-		final String DEBUG_STR="AnimationPlayerFactory::createPlayer()";
-		System.out.println(DEBUG_STR+"+");
-		InternalPlayer player = null;
-		System.out.println(DEBUG_STR+"data source object is "+aDataSource);
-		String contentType = aDataSource.getContentType();
-		System.out.println(DEBUG_STR+"Content type is "+contentType);
-		// There is no difference in if and else block 
-		// in first if block only checking if the content type is available 
-		// Player is being created in the same way
-		
-		// First try to create player from content type 
-		if (contentType != null){
-			if(contentType.equals(ANIMATION_CONTENT_TYPE)) {
-				player = new AnimationPlayer(aDataSource);
-				System.out.println(DEBUG_STR+"Player created from  content type"+contentType);
-			}
-//			else{ 
-//	            throw new MediaException("Content type not supported: " + contentType);
-//			}
-		} //Since it was not possible to identify the player from content type, identify it from it's header
-		// Is there any need to create player through Locator?
-		
-		else {
-			// We need only 6 bytes to identify whether it's GIF image data or not.
-			// But the problem here is that if we will read even a single byte from stream
-			// that stream won't be useful for loading the image data through ImageLoader class
-			// So better solution is to let the ImageLoader.load(InputStream ) get called
-			// if it successfully load the image, then it means that stream is intended for this player only
-			// otherwise it will throw the SWTException, catch it and return properly
-			try{
-				player = new AnimationPlayer(aDataSource);
-				System.out.println(DEBUG_STR+"Player created from  content type");
-			}catch(SWTException e){
-				// Simply ignore the exception 
-				e.printStackTrace();
-			}
-		}
-		System.out.println(DEBUG_STR+"-");
-		return player;
-	}
-	
-	/**
-	 * @param locator
-	 * @return Interplayer object 
-	 */
-	public InternalPlayer createPlayer(String locator ){
-		final String DEBUG_STR="AnimationPlayerFactory::createPlayer(String locator )";
-		System.out.println(DEBUG_STR+"+");
-		InternalPlayer player = null;
-		try{
-			player = new AnimationPlayer(locator);
-		}catch(SWTException e){
-			// just ignore it 
-			e.printStackTrace();
-		}
-		System.out.println(DEBUG_STR+"returning player "+player);
-		System.out.println(DEBUG_STR+"-");
-		return player;
-	}
-	
-
-	/**
-	 * From PlugIn
-	 */
-	public String[] getSupportedContentTypes(String aProtocol) {
-		String[] types = new String[0];
-		if (aProtocol == null || aProtocol.equals(ANIMATION_HTTP_PROTOCOL)
-				|| aProtocol.equals(ANIMATION_HTTPS_PROTOCOL)
-				|| aProtocol.equals(ANIMATION_FILE_PROTOCOL)) {
-			types = new String[1];
-			types[0] = ANIMATION_CONTENT_TYPE;
-		}
-		return types;
-	}
-
-	/**
-	 * From PlugIn
-	 */
-	public String[] getSupportedProtocols(String aContentType) {
-		String[] protocols = new String[0];
-		if ((aContentType == null)
-				|| aContentType.equals(ANIMATION_CONTENT_TYPE)) {
-			protocols = new String[3];
-			protocols[0] = ANIMATION_HTTP_PROTOCOL;
-			protocols[1] = ANIMATION_HTTPS_PROTOCOL;
-			protocols[2] = ANIMATION_FILE_PROTOCOL;
-		}
-		// else empty array is returned
-		return protocols;
-	}
-
-	/**
-	 * From PlugIn. Empty implementation.
-	 */
-	public void preparePlayer(InternalPlayer aPlayer) throws MediaException {
-		// tone does not extend existing players
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/FramePositioningControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import javax.microedition.media.Player;
-
-import org.eclipse.swt.graphics.ImageData;
-
-import com.nokia.microedition.media.control.ControlImpl;
-
-/**
- * @author d35kumar
- *
- */
-public class FramePositioningControl extends ControlImpl implements
-		javax.microedition.media.control.FramePositioningControl {
-	
-	ImageData[] iImagedata;
-	/**
-	 * 
-	 */
-	 FramePositioningControl(Player aPlayer) {
-		iPlayer=aPlayer;
-		iImagedata=((AnimationPlayer)iPlayer).getImageData();
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.FramePositioningControl#mapFrameToTime(int)
-	 */
-	public long mapFrameToTime(int aFrameNumber) {
-		checkState();
-		long time=0;
-		int totalNoOfFrames=iImagedata.length;
-		// if invalid parameter is passed
-		if(aFrameNumber<0 || aFrameNumber>totalNoOfFrames)
-			return -1;
-		for(int i=0;i<totalNoOfFrames;i++){
-			if(i==aFrameNumber)
-				break;
-			time+=iImagedata[i].delayTime;
-		}
-		return time*10000;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.FramePositioningControl#mapTimeToFrame(long)
-	 */
-	public int mapTimeToFrame(long aMediaTime) {
-		checkState();
-		int frameNumber=-1;
-		int totalNoOfFrames=iImagedata.length;
-		long time=0;
-		for(int i=0;i<totalNoOfFrames;i++){
-			if(time > aMediaTime){
-				frameNumber=i-1;
-				break;
-			}
-			time+=iImagedata[i].delayTime*10000;
-		}
-		return frameNumber;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.FramePositioningControl#seek(int)
-	 */
-	public int seek(int aFrameNumber) {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.FramePositioningControl#skip(int)
-	 */
-	public int skip(int aFramesToSkip) {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/ProxyControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import org.eclipse.ercp.swt.mobile.MobileShell;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class will act like a proxy Control
- * @author d35kumar
- */
-class ProxyControl extends Control {
-
-	/**
-	 *  this will be actual Shell, for which this class is acting like proxy
-	 */
-	Control iControl;
-	
-	public ProxyControl() {
-		super(Display.getDefault().getActiveShell(), SWT.BORDER);
-	}
-	
-	/**
-	 * Actual Control will be created here   
-	 */
-	public boolean setParent(Composite parent){
-		iControl= new Shell((Shell)parent);
-		return true;
-	}
-	
-	/**
-	 * 
-	 */
-	public void addControlListener(ControlListener aListener){
-		if(iControl!=null){
-			iControl.addControlListener(aListener);
-		}
-	}
-	/**
-	 * 
-	 */
-	public void addFocusListener(FocusListener listener){
-		if(iControl!=null)iControl.addFocusListener(listener);
-	}
-	/**
-	 * 
-	 */
-	public void addKeyListener(KeyListener listener){
-		if(iControl!=null)iControl.addKeyListener(listener);
-	}
-	public void addMouseListener(MouseListener listener){
-		if(iControl!=null)iControl.addMouseListener(listener);
-	}
-	public void addMouseMoveListener(MouseMoveListener listener){
-		if(iControl!=null)iControl.addMouseMoveListener(listener);
-	}
-	/**
-	 * 
-	 */
-	public void addPaintListener(PaintListener aListener){
-		if(iControl!=null)iControl.addPaintListener(aListener);
-			
-	}
-	
-	public void addTraverseListener(TraverseListener listener){
-		if(iControl!=null)iControl.addTraverseListener(listener);
-	}
-	public Point computeSize(int wHint,
-            int hHint){
-		Point point=null;
-		if(iControl!=null)point=iControl.computeSize(wHint, hHint);
-		System.out.println("ProxyControl::computeSize()"+point);
-		return point;
-	}
-	
-	public Point computeSize(int wHint,
-            int hHint,
-            boolean changed){
-		Point point=null;
-		if(iControl!=null)point=iControl.computeSize(wHint, hHint,changed);
-		System.out.println("ProxyControl::computeSize()"+point+"Bolean changed "+changed);
-		return point;
-	}
-	
-	public Color getBackground(){
-		Color color=null;
-		if(iControl!=null)color=iControl.getBackground();
-		System.out.println("ProxyControl::getBackground()");
-		return color;
-	}
-	public int getBorderWidth(){
-		if(iControl!=null)return iControl.getBorderWidth();
-		else return 0;
-	}
-	public Rectangle getBounds(){
-		if(iControl!=null) return iControl.getBounds();
-		else return null;
-	}
-	public boolean getEnabled(){
-		if(iControl!=null) return iControl.getEnabled();
-		else return false;
-	}
-	public Font getFont(){
-		if(iControl!=null)return iControl.getFont();
-		else return null;
-	}
-	public Color getForeground(){
-		if(iControl!=null) return iControl.getForeground();
-		else return null;
-	}
-	
-	public java.lang.Object getLayoutData(){
-		if(iControl!=null) return iControl.getLayoutData();
-		else return null;
-	}
-	
-	public Point getLocation(){
-		if(iControl!=null) return iControl.getLocation();
-		else return null;
-	}
-	
-	public Menu getMenu(){
-		if(iControl!=null) return iControl.getMenu();
-		else return null;
-	}
-	public Composite getParent(){
-		if(iControl!=null) return iControl.getParent();
-		else return null;
-	}
-	public Shell getShell(){
-		if(iControl!=null) return iControl.getShell();
-		else return null;
-	}
-	public Point getSize(){
-		if(iControl!=null) return iControl.getSize();
-		else return null;
-	}
-	
-	public java.lang.String getToolTipText(){
-		if(iControl!=null) return iControl.getToolTipText();
-		else return null;
-	}
-	public boolean getVisible(){
-		if(iControl!=null)  return iControl.getVisible();
-		else return false;
-	}
-	public boolean isEnabled(){
-		if(iControl!=null) return iControl.isEnabled();
-		else return false;
-	}
-	
-	public boolean isFocusControl(){
-		if(iControl!=null) return iControl.isFocusControl();
-		else return false;
-	}
-	public boolean isReparentable(){
-		if(iControl!=null) return iControl.isReparentable();
-		else return false;
-	}
-	
-	public boolean isVisible(){
-		if(iControl!=null)return iControl.isVisible(); 
-		else return false;
-	}
-	public void moveAbove(Control control){
-		if(iControl!=null) iControl.moveAbove(control);
-	}
-	public void moveBelow(Control control){
-		if(iControl!=null) iControl.moveBelow(control);
-	}
-	public void pack(){
-		if(iControl!=null) iControl.pack();
-	}
-	public void pack(boolean changed){
-		if(iControl!=null) iControl.pack(changed);
-	}
-	public void redraw(){
-		if(iControl!=null) iControl.redraw();
-	}
-	public void redraw(int x,
-            int y,
-            int width,
-            int height,
-            boolean all){
-		if(iControl!=null) iControl.redraw(x,y,width,height, all);
-	}
-	public void removeControlListener(ControlListener listener){
-		if(iControl!=null) iControl.removeControlListener(listener);
-	}
-	public void removeFocusListener(FocusListener listener){
-		if(iControl!=null) iControl.removeFocusListener(listener);
-	}
-	public void removeMouseListener(MouseListener listener){
-		if(iControl!=null) iControl.removeMouseListener(listener);
-	}
-	public void removeMouseMoveListener(MouseMoveListener listener){
-		if(iControl!=null) iControl.removeMouseMoveListener(listener);	
-	}
-	public void removePaintListener(PaintListener listener){
-		if(iControl!=null)iControl.removePaintListener(listener);	
-	}
-	public void removeTraverseListener(TraverseListener listener){
-		if(iControl!=null)iControl.removeTraverseListener(listener);	
-	}
-	public void setBounds(int x,
-            int y,
-            int width,
-            int height){
-		if(iControl!=null)iControl.setBounds(x, y, width, height);
-	}
-	public void setBounds(Rectangle rect){
-		if(iControl!=null)iControl.setBounds(rect);
-	}
-	public void setCapture(boolean capture){
-		if(iControl!=null)iControl.setCapture(capture);	
-	}
-	public void setEnabled(boolean enabled){
-		if(iControl!=null)iControl.setEnabled(enabled);
-	}
-	public boolean setFocus(){
-		if(iControl!=null) return iControl.setFocus();
-		else return false;
-	}
-	public void setFont(Font font){
-		if(iControl!=null)iControl.setFont(font);
-	}
-	public void setForeground(Color color){
-		if(iControl!=null)iControl.setForeground(color);	
-	}
-	public void setLayoutData(java.lang.Object layoutData){
-		if(iControl!=null)iControl.setLayoutData(layoutData);	
-	}
-	public void setLocation(int x,
-            int y){
-		if(iControl!=null)iControl.setLocation(x, y);	
-	}
-	
-	public void setLocation(Point location){
-		if(iControl!=null)iControl.setLocation(location);	
-	}
-	public void setMenu(Menu menu){
-		if(iControl!=null)iControl.setMenu(menu);	
-	}
-	public void setRedraw(boolean redraw){
-		if(iControl!=null)iControl.setRedraw(redraw);
-	}
-	public void setSize(int width,
-            int height){
-		if(iControl!=null) iControl.setSize(width, height);	
-	}
-	
-	public void setSize(Point size){
-		if(iControl!=null) iControl.setSize(size);
-	}
-	public void setToolTipText(java.lang.String string){
-		if(iControl!=null)iControl.setToolTipText(string);	
-	}
-	public void setVisible(boolean visible){
-		if(iControl!=null)iControl.setVisible(visible);	
-	}
-	public Point toControl(int x,
-            int y){
-		if(iControl!=null)return iControl.toControl(x, y);
-		else return null;
-	}
-	public Point toControl(Point point){
-		if(iControl!=null) return iControl.toControl(point);
-		else return null;
-	}
-	public Point toDisplay(int x,
-            int y){
-		if(iControl!=null)return iControl.toDisplay(x,y);
-		else return null;
-	}
-	public Point toDisplay(Point point){
-		if(iControl!=null)return iControl.toDisplay(point);
-		else return null;
-	}
-	public boolean traverse(int traversal){
-		if(iControl!=null)return iControl.traverse(traversal);
-		else return false;
-	}
-	public void update(){
-		if(iControl!=null)iControl.update();
-	}
-	
-	public void checkSubclass() {
-		// do nothing,sub-classing allowed
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/RateControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import javax.microedition.media.Player;
-
-import com.nokia.microedition.media.control.ControlImpl;
-
-/**
- * @author d35kumar
- *
- */
-public class RateControl extends ControlImpl implements
-		javax.microedition.media.control.RateControl {
-
-	
-	/**
-	 * 
-	 * @param aPlayer
-	 */
-	public RateControl(Player aPlayer){
-		this.iPlayer=aPlayer;
-	}
-	
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.RateControl#getMaxRate()
-	 */
-	public int getMaxRate() {
-		checkState();
-		return 0;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.RateControl#getMinRate()
-	 */
-	public int getMinRate() {
-		checkState();
-		return 0;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.RateControl#getRate()
-	 */
-	public int getRate() {
-		checkState();
-		return 0;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.RateControl#setRate(int)
-	 */
-	public int setRate(int aMillirate) {
-		checkState();
-		return 0;
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/StopTimeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import javax.microedition.media.Player;
-
-import com.nokia.microedition.media.control.ControlImpl;
-
-/**
- * @author d35kumar
- *
- */
-public class StopTimeControl extends ControlImpl implements
-		javax.microedition.media.control.StopTimeControl {
-
-	long iStopTime=RESET;
-	/**
-	 * 
-	 */
-	public StopTimeControl(Player aPlayer) {
-		this.iPlayer=aPlayer;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.StopTimeControl#getStopTime()
-	 */
-	public long getStopTime() {
-		 checkState();
-		return iStopTime;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.StopTimeControl#setStopTime(long)
-	 */
-	public void setStopTime(long aStopTime) {
-		checkState();
-		if (iPlayer.getState() == Player.STARTED && getStopTime() != RESET) {
-			throw new IllegalStateException(
-					"Player is STARTED or setStopTime() is already called successfully");
-		}
-		iStopTime = aStopTime;
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,532 +0,0 @@
-/**
- * 
- */
-package com.nokia.microedition.media.animation;
-
-import javax.microedition.lcdui.Item;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-
-import org.eclipse.ercp.swt.mobile.MobileShell;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-//import com.nokia.microedition.media.control.ApplicationUtils;
-import com.nokia.microedition.media.control.ControlImpl;
-import com.nokia.microedition.media.control.MMAGUIFactory;
-import com.nokia.mj.impl.rt.support.Finalizer;
-import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.nokialcdui.ItemControlStateChangeListener;
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-
-//import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-
-/**
- * @author d35kumar
- *
- */
-public class VideoControl extends ControlImpl implements
-		javax.microedition.media.control.VideoControl , ItemControlStateChangeListener{
-
-	//	Following variable has been taken from VideoControl class
-	private static final String GUI_OBJECT_CLASS_NAME =
-        "javax.microedition.lcdui.Item";
-	// lcdui package used with UiToolkitRegister
-    private static String LCDUI_PACKAGE =
-        "javax.microedition.lcdui";
-    // eswt package used with UiToolkitRegister
-    private static String ESWT_PACKAGE = "org.eclipse.swt.widgets";
- // ToolkitRegister class name used with eswt and lcdui
-    private static String DISPLAY = ".Display";
-
-    // class name used to check if eswt is included
-    private static String LISTENER = ".Listener";
-
-    // class name used to check if eswt is included
-    private static String ESWT_CONTROL = ".control";
-    // class name used with dynamic display mode initialization
-    private static String GUI_FACTORY_CLASS_NAME = ".Factory";
-    
-	private static final int NOT_INITIALIZED = -1;
-	protected int iStatus = NOT_INITIALIZED;
-	private static final int UNDEFINED_RETURN_VALUE=0;
-	// For integrating with eSWT API  
-	private Display iDisplay; 
-//	private Shell iShell;
-	
-	private Control iControl;
-	
-	// Global??? yes because we need to remove it from player listener, while finalizer will be called
-	private VideoItem iVideoItem;
-	
-	private Finalizer mFinalizer = new Finalizer(){
-        public void finalizeImpl(){
-            doFinalize();
-        }
-    };
-
-	/**
-	 * Constructor of VideoControl  
-	 * @param player
-	 */
-	public VideoControl(Player player){
-		this.iPlayer=player;
-	}
-	
-	/**
-	 * 
-	 */
-	private void doFinalize() {
-		if (mFinalizer != null) {
-			registeredFinalize();
-			mFinalizer = null;
-		}
-	}
-	
-	/**
-	 * 
-	 */
-	final void registeredFinalize() {
-		if (iVideoItem != null) {
-			iPlayer.removePlayerListener(iVideoItem);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getDisplayHeight()
-	 */
-	public int getDisplayHeight() {
-		checkState();
-		if (iStatus == NOT_INITIALIZED) {
-			throw new IllegalStateException(
-					"VideoControl.initDisplayMode() not called yet");
-		}
-		return ((AnimationPlayer)iPlayer).getImageDimension().x;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getDisplayWidth()
-	 */
-	public int getDisplayWidth() {
-		checkState();
-		if (iStatus == NOT_INITIALIZED) {
-			throw new IllegalStateException(
-					"VideoControl.initDisplayMode() not called yet");
-		}
-		return ((AnimationPlayer)iPlayer).getImageDimension().x;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getDisplayX()
-	 */
-	public int getDisplayX() {
-		checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            return UNDEFINED_RETURN_VALUE;
-        }
-		return ((AnimationPlayer)iPlayer).getiDisplayLocation().x;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getDisplayY()
-	 */
-	public int getDisplayY() {
-		checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            return UNDEFINED_RETURN_VALUE;
-        }
-		return ((AnimationPlayer)iPlayer).getiDisplayLocation().y;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getSnapshot(java.lang.String)
-	 */
-	public byte[] getSnapshot(String aImageType) throws MediaException {
-		final String DEBUG_STR="VideoControl::getSnapshot(String aImageType)";
-		System.out.println(DEBUG_STR+"+");
-		checkState();
-		if (iStatus == NOT_INITIALIZED) {
-			throw new IllegalStateException(
-					"VideoControl.initDisplayMode() not called yet");
-		}
-		int imageData[]=((AnimationPlayer)iPlayer).getCurrentFrame(aImageType);
-		byte bytArry[]= new byte[imageData.length];
-		int pixelCount=bytArry.length;
-		System.out.println(DEBUG_STR+"imageData receved is "+imageData);
-		for(int i=0;i<pixelCount;i++)
-			bytArry[i]=(byte)imageData[i];
-        // Check the permission here, so 'the moment' is not lost?
-        //Security.ensurePermission(PERMISSION, PERMISSION, PERM_ARGS);
-//        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-//        PlayerPermission per = new PlayerPermission("audio/video recording","snapshot");
-//        appUtils.checkPermission(per);
-		return bytArry;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getSourceHeight()
-	 */
-	public int getSourceHeight() {
-		checkState();
-		return ((AnimationPlayer)iPlayer).getSourceDimension().y;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#getSourceWidth()
-	 */
-	public int getSourceWidth() {
-		checkState();
-		return ((AnimationPlayer)iPlayer).getSourceDimension().x;
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#initDisplayMode(int, java.lang.Object)
-	 */
-	public Object initDisplayMode(int aMode, Object aArg) {
-		final String DEBUG_STRING = "VideoControl::initDisplayMode(int, Object)";
-		System.out.println(DEBUG_STRING + "+");
-		// To check if state is in not closed state
-		checkState();
-		System.out.println(DEBUG_STRING+"After checking state ");
-		if (iStatus != NOT_INITIALIZED) {
-			// IllegalStateException - Thrown if initDisplayMode is
-			// called again after it has previously been called successfully.
-			throw new IllegalStateException(
-					"initDisplayMode() already called successfully");
-		}
-		System.out.println(DEBUG_STRING+"Going to get the eswtDisplay, mode is  "+aMode+" argument is "+aArg);
-		// Get the Display object of ESWT
-		if(aArg!=null && aArg.equals(Control.class.getName())){
-			iDisplay =Display.getDefault();	
-//			System.out.println(DEBUG_STRING+"Display object created"+iDisplay );
-		}else{ 
-			iDisplay = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-		}
-//		System.out.println(DEBUG_STRING+"After getting the display"+iDisplay);
-		if (aMode == USE_GUI_PRIMITIVE) {
-			System.out.println(DEBUG_STRING + " mode is USE_GUI_PRIMITIVE");
-			Object guiObject = null;
-			if (aArg == null) {
-				guiObject = initNullMode();
-			} else {
-				if (aArg.equals(GUI_OBJECT_CLASS_NAME)) {
-					guiObject = initLCDUI();
-				} else // try load dynamic display mode
-				{
-					guiObject = initDynamicDisplayMode(aArg);
-					System.out.println(DEBUG_STRING+"After returning from the initDynamicDisplayMode() "+guiObject);
-					// Since it is eswtControl itself so no need of LCDUIInvoker here
-					// assign it in iControl and return immediately from here
-					iControl=(Control)guiObject;
-					// Now we will change the status, when MIDlet developer will call the setParent
-					iStatus = USE_GUI_PRIMITIVE;
-					return iControl;
-				}
-			}
-			// this will return the control as null, because the item might not
-			// have been appended in form
-			// Solution to this is as:- Add the listener through LCDUIInvoker
-			// and when item will be appended
-			// by midlet developer, notifyControlAvailable function of
-			// ItemStateChangeListener will be called
-			iControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-					.getEswtControl(guiObject);
-			// add this class as item state change listener
-			com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-					.setItemControlStateChangeListener(this, (Item)guiObject);
-			iStatus = USE_GUI_PRIMITIVE;
-			return guiObject;
-		} else if (aMode == USE_DIRECT_VIDEO) {
-			if (aArg != null) {
-				if (!(aArg instanceof javax.microedition.lcdui.Canvas)) {
-					throw new java.lang.IllegalArgumentException(
-							"For USE_DIRECT_VIDEO mode argument should be of type Canvas");
-				}
-			} else {
-				throw new java.lang.IllegalArgumentException(
-						"For USE_DIRECT_VIDEO mode argument should not be null");
-			}
-			iControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-					.getEswtControl(aArg);
-			System.out.println(DEBUG_STRING
-					+ "This is USE_DIRECT_VIDEO mode, control is " + iControl);
-			iStatus = USE_DIRECT_VIDEO;
-		} else {
-			throw new java.lang.IllegalArgumentException(
-					"Mode not supported or invalid, "
-							+ "valid modes are USE_DIRECT_VIDEO and USE_GUI_PRIMITIVE");
-		}
-		System.out.println(DEBUG_STRING + "-");
-		return null;
-	}
-	/**
-	 * 
-	 * @return
-	 */
-	private Object initLCDUI(){
-		final String DEBUG_STR="VideoControl::initLCDUI()";
-		System.out.println(DEBUG_STR+"+");
-		iVideoItem = new VideoItem(((AnimationPlayer)iPlayer).getImageDimension());
-        iPlayer.addPlayerListener(iVideoItem);
-        iStatus = USE_GUI_PRIMITIVE;
-        System.out.println(DEBUG_STR+"-");
-        return iVideoItem;
-	}
-
-	/**
-	    * Initializes USE_GUI_PRIMITIVE mode when null parameter is given to
-	    * initDisplayMode method.
-	    * UI toolkit gets selected when application uses UI toolkit
-	    * first time. After this selection null parameter must be
-	    * interpreted as the selected UI toolkit. initDisplayMode call
-	    * with null parameter before the selection must cause
-	    * IllegalArgumentException if there are several toolkits.
-	    * @return GUI object
-	    */
-	private Object initNullMode() {
-		String DEBUG_STR = "VideoControl::initNullMode()";
-	
-		String toolkit = null;
-	
-		Object guiObject = null;
-
-		// If lcdui was selected init it even if there might be several
-		// toolkits. This is done to support existing applications.
-		if ((LCDUI_PACKAGE + DISPLAY).equals(toolkit)) {
-			System.out.println(DEBUG_STR + "going to use initLCDUI function ");
-			guiObject = initLCDUI();
-		} else {
-			try {
-				System.out.println(DEBUG_STR + "Seems it is ESWT toolkit ");
-				// Several UI toolkits are supported if there are eSWT classes
-				// and eSWT direct content component
-				// Trying to load eSWT Listener interface or eSWT GUI factory
-				// does not cause any initialization to eSWT.
-				Class.forName(ESWT_PACKAGE + LISTENER);
-				Class.forName(ESWT_PACKAGE + ESWT_CONTROL
-						+ GUI_FACTORY_CLASS_NAME);
-
-				// check if eSWT was selected
-				if ((ESWT_PACKAGE + DISPLAY).equals(toolkit))
-				{
-					System.out
-							.println(DEBUG_STR
-									+ "It is eswtPackage going to call initDynamicDisplay ");
-					guiObject = initDynamicDisplayMode(ESWT_PACKAGE
-							+ ESWT_CONTROL + GUI_FACTORY_CLASS_NAME);
-				} else {
-					// If no toolkit is registered and if lcdui library exists
-					// select it
-					try {
-						Class.forName(LCDUI_PACKAGE + DISPLAY);
-
-						guiObject = initLCDUI();
-					} catch (ClassNotFoundException cnfe) {
-						// If there are several toolkits and none is selected
-						// IllegalArgumentException must be thrown
-						throw new IllegalArgumentException(
-								"UI toolkit is not available or found.");
-					}
-				}
-			} catch (ClassNotFoundException cnfe) {
-				System.out.println(DEBUG_STR
-						+ "Exception caought, going to call initLCDUI funtion");
-				// Only lcdui is supported
-				guiObject = initLCDUI();
-			}
-		}
-		return guiObject;
-	}
-	    
-	    /**
-	     * 
-	     * @param aMode class name of the component 
-	     * @return
-	     */
-	//MobileShell iMobileShell=null;
-	ProxyControl control=null;
-	private Object initDynamicDisplayMode(Object aMode) {
-		final String DEBUG_STR="VideoControl::initDynamicDisplayMode()";
-		//MMAGUIFactory guiFactory = null;
-		try {
-//			String className = ((String) aMode).toLowerCase();
-			// there is no more any Factory class 
-//					+ GUI_FACTORY_CLASS_NAME;
-			System.out.println(DEBUG_STR+"Class name is "+aMode);
-			// Following line make sure that class name provided in aMode is proper
-			Class guiClass = Class.forName((String)aMode);
-			iDisplay.syncExec(new Runnable() {
-				public void run() {
-					control=new ProxyControl();
-				}
-			});
-			
-			System.out.println(DEBUG_STR+"Class instantiated is "+control);
-			//guiFactory = (MMAGUIFactory) guiClass.newInstance();
-		} catch (ClassNotFoundException cnfe) {
-			// if the class could not be found
-			throw new IllegalArgumentException(
-					"Mode not supported or invalid, "
-							+ "valid modes are USE_DIRECT_VIDEO and USE_GUI_PRIMITIVE");
-//		} catch (IllegalAccessException iae) {
-//			// if the class or initializer is not accessible
-//			throw new IllegalArgumentException("Mode: " + aMode + " caused "
-//					+ iae);
-//		} catch (InstantiationException ie) {
-//			// if an application tries to instantiate an abstract class or an
-//			// interface, or if the instantiation fails for some other reason
-//			throw new IllegalArgumentException("Mode: " + aMode + " caused "
-//					+[= ie);
-		} catch (ClassCastException cce) {
-			// Thrown to indicate that the code has attempted to cast an
-			// object to a subclass of which it is not an instance.
-			throw new IllegalArgumentException("Mode: " + aMode + " caused "
-					+ cce);
-		}catch(Exception e){
-			System.out.println("Exception thrown while creating the control object"+e);
-			e.printStackTrace();
-		}
-//		Object guiObject = guiFactory.initDisplayMode();
-//		return guiObject;
-		return control;
-	}
-	    
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#setDisplayFullScreen(boolean)
-	 */
-	public void setDisplayFullScreen(final boolean aFullScreenMode)
-			throws MediaException {
-		if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-            "VideoControl.initDisplayMode() not called yet");
-        }
-		if(aFullScreenMode){
-			//Image size should be resized to maximum width, 
-			//so that the aspect ratio should be maintained 
-			
-			((AnimationPlayer)iPlayer).updateImageData(360, 360);
-			// when the size is set to full screen, set the location to 0,0
-			// but what if user will exit from the full screen mode, 
-			//we will have to revert back to the original position
-			// Image should be drawn at the center of the screen
-			setDisplayLocation(0, 140);
-		}
-		iDisplay.syncExec(new Runnable(){
-			public void run(){
-				MobileShell shell= (MobileShell)iControl.getShell();
-				shell.setFullScreenMode(aFullScreenMode);
-			}
-		});
-		
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#setDisplayLocation(int, int)
-	 */
-	public void setDisplayLocation(int aX, int aY) {
-		final String DEBUG_STR="VideoControl::setDisplayLocation";
-		System.out.println(DEBUG_STR+">>>>>>> Control is "+iControl);
-		// in case of customItem, we are getting canvasExtension as control 
-		// and in this case we need to ignore the setDisplayLocation call.
-		// it is also possible that iControl may be null( it will be null until and unless
-		// notifyControlAvailable function is not get called)
-		if(iControl==null || (iControl instanceof org.eclipse.swt.internal.extension.CanvasExtension))
-			return ;
-		((AnimationPlayer)iPlayer).setDisplayLocation(aX, aY);
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#setDisplaySize(int, int)
-	 */
-	public void setDisplaySize(int aWidth, int aHeight) throws MediaException {
-		final String DEBUG_STR="VideoControl::setDisplaySize(int aWidth, int aHeight)";
-		System.out.println(DEBUG_STR+"width "+aWidth+" aHeight "+aHeight);
-		if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-            "VideoControl.initDisplayMode() not called yet");
-        }
-        if (aWidth <= 0 || aHeight <= 0)
-        {
-            throw new IllegalArgumentException(
-            "Width and height must be positive");
-        }
-        ((AnimationPlayer) iPlayer).updateImageData(aWidth,aHeight);
-        // Since the DisplaySize is being changed, we need to change the  
-        // size of VideoItem as well 
-        // if the videoItem is not null, it means currently we are playing animation on form 
-        if(iVideoItem!=null)// means it is for customItem 
-        	iVideoItem.setPreferredSize(aWidth, aHeight);
-        // Notify to all player listener that video Size has been changed 
-        ((AnimationPlayer) iPlayer).getiPlayerListenerImpl().postEvent(PlayerListener.SIZE_CHANGED, this);
-        System.out.println(DEBUG_STR+"-");
-	}
-
-	/* (non-Javadoc)
-	 * @see javax.microedition.media.control.VideoControl#setVisible(boolean)
-	 */
-	public void setVisible(final boolean aVisible) {
-		if (iControl != null) {
-			iDisplay.syncExec(new Runnable() {
-				public void run() {
-					iControl.setVisible(aVisible);
-					System.out.println("VideoControl::setVisible()"+aVisible);
-				}
-			});
-		}
-	}
-	/**
-	 * 
-	 * @return Display object retrieved from ESWT
-	 */
-	public Display getiDisplay() {
-		return iDisplay;
-	}
-	
-	/**
-	 * 
-	 * @return
-	 */
-	public Control getControl() {
-		return iControl;
-	}
-	/**
-	 * Function of ItemStateChangeListener 
-	 * @param ctrl
-	 * @param item
-	 */
-	public void notifyControlAvailable(Control ctrl,Item item){
-		final String DEBUG_STR= "VideoControl::notifyControlAvailable(Control ctrl,Item item)";
-		System.out.println(DEBUG_STR+"+");
-		iControl=ctrl;
-		System.out.println(DEBUG_STR+"Control is "+ctrl.hashCode()+ " Item is "+item);
-		//TODO is it proper here to put the below line in try/catch?, remove if we can
-		// otherwise it may deteriorate the performance, as in case of CustomItem on each 
-		// repaint, eSWT control is getting destroyed, and reconstructed
-		try {
-			((AnimationPlayer)iPlayer).addPaintListener(iControl);
-		} catch (MediaException e) {
-			// TODO What to do here
-			e.printStackTrace();
-		}
-		System.out.println(DEBUG_STR+"-");
-	}
-	/**
-	 * Function of ItemStateChangeListener
-	 * We don't need to do anything in this function
-	 * @param item
-	 */
-	public void notifyControlDisposed(Item item){
-		final String DEBUG_STR= "VideoControl::notifyControlDisposed(Item item)";
-		System.out.println(DEBUG_STR+"+");
-//		System.out.println(DEBUG_STR+"Item Disposed is "+item);
-//		System.out.println(DEBUG_STR+"-");
-	}
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoItem.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-package com.nokia.microedition.media.animation;
-
-import javax.microedition.lcdui.CustomItem;
-import javax.microedition.lcdui.Graphics;
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-import org.eclipse.swt.graphics.Point;
-
-
-/**
- * 
- */
-/**
- * @author d35kumar
- *
- */
-
-public class VideoItem extends CustomItem implements PlayerListener {
-	
-	/**
-	 * Width of this item  
-	 */
-	
-	int iWidth;
-	
-	/**
-	 * Height of this item
-	 */
-	int iHeight;
-	
-	/**
-	 * 
-	 * @param dimension
-	 */
-	protected VideoItem(Point dimension ) {
-		super("");
-		iWidth=dimension.x;
-		iHeight=dimension.y;
-	}
-	
-	/**
-	 * 
-	 * @param w
-	 * @param h
-	 */
-	protected VideoItem(int w, int h) {
-		super("");
-		iWidth=w;
-		iHeight=h;
-	}
-	/**
-	 * @return the minimum content width of the item, used by form while layouting the item  
-	 */
-	protected int getMinContentWidth() {
-		return iWidth;
-	}
-
-	/**
-	 * @return the minimum content height of the item, used by form while layouting the item 
-	 */
-	protected int getMinContentHeight() {
-		return iHeight;
-	}
-	
-	/**
-	 * @return the preferred content width of the item, used by form while layouting the item 
-	 */
-	protected int getPrefContentWidth(int height) {
-		return iWidth;
-	}
-
-	/**
-	 * @return the preferred content height of the item, used by form while layouting the item 
-	 */
-
-	protected int getPrefContentHeight(int width) {
-		return iHeight;
-	}
-	/**
-	 * This is dummy implementation of the paint method. 
-	 */
-	int count;
-	protected void paint(Graphics g, int w, int h) {
-		//TODO remove this code later
-		// this is added just for testing purpose 
-		g.setColor(0x00a000);
-		g.fillRect(0,0,w,h);
-		g.setColor(0xFFFFFF);
-		g.drawString("paint"+(count++), w>>1, h>>1, Graphics.BASELINE|Graphics.HCENTER);
-	}
-	
-	/**
-	 * Whenever player will be resized this function will be invoked and it will call the invalidate method of custom item 
-	 */
-	public void playerUpdate(Player aPlayer, String aEvent, Object aEventData) {
-		System.out.println("VideoItem::playerUpdate() Event is "+aEvent+"Event Data is "+aEventData);
-		if (aEvent == SIZE_CHANGED) {
-			invalidate();
-		}
-	}
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/BaseDisplay.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,154 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import org.eclipse.swt.widgets.*;
-import javax.microedition.lcdui.*;
-import org.eclipse.swt.graphics.Rectangle;
-
-
-public abstract class BaseDisplay
-{
-	// represents native side of display and initialized by derived class
-	protected int nativeDisplayHandle;
-	protected org.eclipse.swt.widgets.Control eswtCanvasControl;
-	private Rectangle rect;
-	private int[] rectDimension = new int[ 4 ];
-	public BaseDisplay()
-    {
-    	rect = new Rectangle(0,0,0,0);
-   	}
-/*	protected void setESWTControl()
-	{
-		eswtCanvasControl =
-	}
-	*/
- 	public void GetCallbackInUiThread(int placeholder)
-	{
-		System.out.println("inside BaseDisplay : GetCallbackInUiThread +");
-		final int val = placeholder;
-		try{
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			disp.syncExec(new Runnable() {
-			 public void run() {
-			  			  _nativeMethodCallInUiThread(nativeDisplayHandle , val);
-	 			             }
-						 });
-		   }
-		 catch(Exception e)
-		 {
-			System.out.println("inside BaseDisplay : GetCallbackInUiThread....exception is " + e.toString());
-		 }
-		System.out.println("inside BaseDisplay : GetCallbackInUiThread -");
-	}
-	
-	public void setContentBound()
-	{
-		System.out.println("inside BaseDisplay : setContentBound +");
-		try{
-
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			disp.syncExec(new Runnable() {
-			 public void run() {
-			  eswtCanvasControl.setBounds(rect);
-			      }
-						 });
-		   }
-		 catch(Exception e)
-		 {
-			System.out.println("inside BaseDisplay : setContentBound....exception is  " + e.toString());
-		 }
-		 System.out.println("inside BaseDisplay : setContentBound -");
-	}
-
-
-	public void removeContentBound()
-	{
-		System.out.println("inside BaseDisplay : removeContentBound +");
-		try{
-
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			disp.syncExec(new Runnable() {
-			 public void run() {
-			 	Rectangle emptyRect = new Rectangle(0,0,0,0);
-			  eswtCanvasControl.setBounds(emptyRect);
-			      }
-						 });
-		   }
-		 catch(Exception e)
-		 {
-			System.out.println("inside BaseDisplay : removeContentBound....exception is  " + e.toString());
-		 }
-		 System.out.println("inside BaseDisplay : removeContentBound -");
-	}
-	
-	public void redrawControl()
-	{
-		System.out.println("inside BaseDisplay : redrawControl +");
-		try{
-
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			disp.syncExec(new Runnable() {
-			 public void run() {
-			 				// redraw entire bounds of receiver
-			 			  eswtCanvasControl.redraw();
-			      }
-						 });
-		   }
-		 catch(Exception e)
-		 {
-			System.out.println("inside BaseDisplay : redrawControl....exception is  " + e.toString());
-		 }
-		 System.out.println("inside BaseDisplay : redrawControl -");
-	}
-		/* called from native to reset the java side rect
-	 Before the call of this function array is updated from native side
-	 which can be used to refresh the UI screen rect and/or 
-	 set/remove bound rect
-	*/
-	public void setRect()
-	{
-		
-			rect.x = rectDimension[0];
-			rect.y = rectDimension[1];
-			rect.width = rectDimension[2];
-			rect.height = rectDimension[3];
-			
-		System.out.println("BaseDisplay : setRect rect is reset with values: x =" + rect.x +"y ="+ rect.y +"width ="+rect.width+"height = "+ rect.height);	
-			
-	}
-
-	// abstract functions implemented by concrete class
-	protected abstract void setDisplaySize(int aWidth, int aHeight);
-	protected abstract void setDisplayFullScreen(final boolean aFullScreenMode);
-	protected abstract void setDisplayLocation(int aX, int aY);
-	protected abstract void setVisible(boolean aVisible);
-	protected abstract int getDisplayHeight();
-	protected abstract int getDisplayWidth();
-	protected abstract int getDisplayX();
-	protected abstract int getDisplayY();
-	protected abstract int getSourceWidth();
-	protected abstract int getSourceHeight();
-	protected abstract void getBoundRect();
-	protected abstract void setWindowResources();
-	protected abstract void setNativeHandle(int handle);
-    // Native methods
-	 private native void _nativeMethodCallInUiThread(int nativeDisplayHandle , int placeholder);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/ControlImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is an implementation of control
-*
-*/
-
-package com.nokia.microedition.media.control;
-
-import javax.microedition.media.Player;
-
-public class ControlImpl implements javax.microedition.media.Control
-{
-    protected Player iPlayer;
-    protected int iControlHandle;
-    protected int iEventSource;
-
-    /**
-     * Constructor
-     */
-    public ControlImpl()
-    {
-    }
-
-    /**
-     * Called when the Player is disposed
-     */
-    public void notifyDispose()
-    {
-    }
-
-    /**
-     * Set handles
-     * @param aPlayer Player instance
-     * @param aEventSource Handle to event source
-     * @param aControlHandle Handle Handle to control
-     */
-    public void setHandles(Player aPlayer,
-                           int aEventSource,
-                           int aControlHandle)
-    {
-        iPlayer = aPlayer;
-        iEventSource = aEventSource;
-        iControlHandle = aControlHandle;
-
-        _setHandle(aEventSource, aControlHandle, this);
-    }
-
-    /**
-     * Throws IllegalStateException if player is closed and control
-     * cannot be used anymore.
-     * @throws IllegalStateException if Player is closed.
-     */
-    protected void checkState()
-    {
-        if (iPlayer.getState() == Player.CLOSED)
-        {
-            throw new IllegalStateException("Player is CLOSED.");
-        }
-    }
-
-    private static native void _setHandle(int aEventSourceHandle,
-                                          int aControlHandle,
-                                          Object aControl);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/FramePositioningControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2002 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:  FramePositioningControl controls frame position.
-*
-*/
-
-package com.nokia.microedition.media.control;
-import javax.microedition.media.Player;
-import javax.microedition.media.MediaException;
-
-
-/**
- * FramePositioningControl methods cannot throw any exceptions.
- * If an error occurs in native side, native side return default value.
- */
-public class FramePositioningControl extends ControlImpl
-        implements javax.microedition.media.control.FramePositioningControl
-{
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-    protected static final int NOT_FOUND = -1; // value to return on error condition
-
-    /**
-     * @see FramePositioningControl
-     */
-    public int seek(int aFrameNumber)
-    {
-        checkState();
-
-        int frameNumber = _seek(iControlHandle, iEventSource, aFrameNumber);
-
-        // in case of error
-        if (frameNumber < 0)
-        {
-            if (aFrameNumber <= 0)
-            {
-                frameNumber = 0;
-            }
-            else
-            {
-                frameNumber = Integer.MAX_VALUE;
-            }
-        }
-
-        return frameNumber;
-    }
-
-    /**
-     * @see FramePositioningControl
-     */
-    public int skip(int aFramesToSkip)
-    {
-        checkState();
-
-        // Array will be used for input and output.
-        // For output, room is needed for return value
-        // and error code, thus length of 2.
-
-        int[] values = new int[ 2 ];
-        values[ 0 ] = aFramesToSkip;
-        values[ 1 ] = NO_ERROR;
-
-        int[] framesSkipped =
-            _skip(iControlHandle,
-                  iEventSource,
-                  values);
-
-        if (framesSkipped[ 1 ] != NO_ERROR)
-        {
-            throw new Error("skip() failed");
-        }
-
-        return framesSkipped[ 0 ];
-    }
-
-    /**
-     * @see FramePositioningControl
-     */
-    public long mapFrameToTime(int aFrameNumber)
-    {
-        checkState();
-
-        long frameMediaTime =
-            _mapFrameToTime(iControlHandle,
-                            iEventSource,
-                            aFrameNumber);
-        if (frameMediaTime < NO_ERROR)
-        {
-            frameMediaTime = NOT_FOUND; // error value
-        }
-
-        return frameMediaTime; // -1 if error
-    }
-
-    /**
-     * @see FramePositioningControl
-     */
-    public int mapTimeToFrame(long aMediaTime)
-    {
-        checkState();
-
-        // mapTimeToFrame(0) must not fail and must return
-        // the frame number of the first frame.
-
-        if (aMediaTime == 0)
-        {
-            return 0;
-        }
-
-        int frameNumber =
-            _mapTimeToFrame(iControlHandle,
-                            iEventSource,
-                            aMediaTime);
-        if (frameNumber < NO_ERROR)
-        {
-            frameNumber = NOT_FOUND; // error value
-        }
-
-        return frameNumber;
-    }
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native FramePositioningControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aFrameNumber Frame number to seek
-     * @return Number of frame that is actually seeked to
-     */
-    private native int _seek(int iControlHandle,
-                             int iEventSource,
-                             int aFrameNumber);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native FramePositioningControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aValues element 0 Number of frames to skip
-     * @return element 0 Actual number of frames skipped.
-     *         element 1 Error code
-     */
-    private native int[] _skip(int iControlHandle,
-                               int iEventSource,
-                               int[] aValues);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native FramePositioningControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aFrameNumber The input frame number for conversion
-     * @return The converted media time in microseconds for the given frame
-     * (-1 on error).
-     */
-    private native long _mapFrameToTime(int iControlHandle,
-                                        int iEventSource,
-                                        int aFrameNumber);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native FramePositioningControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aMediaTime The input media time for the conversion in microseconds.
-     * @return The converted frame number for the given media time (-1 on error).
-     */
-    private native int _mapTimeToFrame(int iControlHandle,
-                                       int iEventSource,
-                                       long aMediaTime);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MIDIControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,469 +0,0 @@
-/*
-* Copyright (c) 2002 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:  MIDIControl.
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
-
-
-public class MIDIControl extends ControlImpl
-        implements javax.microedition.media.control.MIDIControl
-{
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-    protected static final int NOT_FOUND = -1;
-
-    /**
-     * Max data value for midi events.
-     */
-    private static final int MAX_VALUE = 127;
-
-    /**
-     * Min data value for midi event types.
-     */
-    private static final int MIN_TYPE = 0x80;
-
-    /**
-     * Max data value for midi event types.
-     */
-    private static final int MAX_TYPE = 0xFF;
-
-    /**
-     * Midi type reserved for system.
-     */
-    private static final int RESERVED_TYPE_A = 0xF0;
-
-    /**
-     * Midi type reserved for system.
-     */
-    private static final int RESERVED_TYPE_B = 0xF7;
-
-    /**
-     * Max channel number.
-     */
-    private static final int MAX_CHANNEL = 15;
-
-    /**
-     * Max bank number.
-     */
-    private static final int MAX_BANK = 16383;
-
-    /**
-     * Constant to use the default bank. Also the minimum bank value accepted.
-     */
-    private static final int DEFAULT_BANK = -1;
-
-    /**
-     * Constant value for the default bank.
-     */
-    private static final int DEFAULT_BANK_NUMBER = 0x3c80;
-
-    /**
-     * Constant MIDI control ID value for volume.
-     */
-    private static final int CONTROL_VOLUME = 0x07;
-
-    /**
-     * @see MIDIControl
-     */
-    public boolean isBankQuerySupported()
-    {
-        return false;
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public int[] getProgram(int aChannel)
-    throws MediaException
-    {
-        checkPlayerState();
-        checkChannel(aChannel);
-        // this method is not currently supported
-        throw new MediaException("Not supported");
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public int getChannelVolume(int aChannel)
-    {
-        checkPlayerState();
-        checkChannel(aChannel);
-
-        // Native side returns -1 if current volume cannot be
-        // determined for sure
-
-        int volume =
-            _getChannelVolume(iControlHandle, iEventSource, aChannel);
-
-        // return 0-127, or -1 if not known
-        if (volume < NOT_FOUND)
-        {
-            volume = NOT_FOUND;
-        }
-        return volume;
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public void setProgram(int aChannel, int aBank, int aProgram)
-    {
-        checkPlayerState();
-        checkChannel(aChannel);
-        checkBank(aBank);
-        checkProgram(aProgram);
-
-        // Handle query for default bank
-        if (aBank == DEFAULT_BANK)
-        {
-            aBank = DEFAULT_BANK_NUMBER;
-        }
-
-        int err = _setProgram(iControlHandle, iEventSource, aChannel, aBank, aProgram);
-
-        if (err < NO_ERROR)
-        {
-            throw new Error("setProgram() failed, Symbian OS error: " + err);
-        }
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public synchronized void setChannelVolume(int aChannel, int aVolume)
-    {
-        checkPlayerState();
-        checkChannel(aChannel);
-
-        // Volume must be between 0 - MAX_VALUE
-        if (aVolume < 0 ||
-                aVolume > MAX_VALUE)
-        {
-            throw new IllegalArgumentException("Invalid volume " + aVolume +
-                                               ", valid range is  0 <= volume <= 127");
-        }
-
-        int err = _setChannelVolume(iControlHandle, iEventSource, aChannel, aVolume);
-        if (err < NO_ERROR)
-        {
-            throw new Error("setChannelVolume() failed, SymbianO S error: " + err);
-        }
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public int[] getBankList(boolean aCustom)
-    throws MediaException
-    {
-        checkPlayerState();
-        // this method is not currently supported
-        throw new MediaException("Not supported");
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public int[] getProgramList(int aBank)
-    throws MediaException
-    {
-        checkPlayerState();
-        checkBank(aBank);
-        // this method is not currently supported
-        throw new MediaException("Not supported");
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public String getProgramName(int aBank, int aProg)
-    throws MediaException
-    {
-        checkPlayerState();
-        checkBank(aBank);
-        checkProgram(aProg);
-        // this method is not currently supported
-        throw new MediaException("Not supported");
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public String getKeyName(int aBank, int aProg, int aKey)
-    throws MediaException
-    {
-        checkPlayerState();
-        checkBank(aBank);
-        checkProgram(aProg);
-        checkKey(aKey);
-        // this method is not currently supported
-        throw new MediaException("Not supported");
-    }
-
-    /**
-     * Short midi events are delegated to the longMidiEvent method.
-     *
-     * @see MIDIControl
-     */
-    public void shortMidiEvent(int aType, int aData1, int aData2)
-    {
-        checkPlayerState();
-
-        // Data parameters must be between 0 to MAX_VALUE
-        if (aData1 < 0 ||
-                aData1 > MAX_VALUE ||
-                aData2 < 0 ||
-                aData2 > MAX_VALUE)
-        {
-            throw new IllegalArgumentException(
-                "Invalid data, valid range is  0 <= data <= 127");
-        }
-
-        // Check type:
-        // must be MIN_TYPE..MAX_TYPE, excluding RESERVED_TYPE_A and
-        // RESERVED_TYPE_B, which are reserved for system exclusive.
-        if (aType == RESERVED_TYPE_A ||
-                aType == RESERVED_TYPE_B ||
-                aType < MIN_TYPE ||
-                aType > MAX_TYPE)
-        {
-            throw new IllegalArgumentException("Invalid midi type " + aType +
-                                               ", valid range is  0x80 <= type <= 0xFF or 0xF0 or 0xF7");
-        }
-
-        // Format to long MIDI event
-        byte[] data = new byte[ 3 ];
-
-        // aType and datas are checked to fit in a byte range 0..127
-        data[ 0 ] = (byte)aType;
-        data[ 1 ] = (byte)aData1;
-        data[ 2 ] = (byte)aData2;
-
-        // Send short midi event as a long midi event.
-        // Length of short midi event is 3.
-        longMidiEvent(data, 0, 3);
-    }
-
-    /**
-     * @see MIDIControl
-     */
-    public int longMidiEvent(byte[] aData, int aOffset, int aLength)
-    {
-        checkPlayerState();
-
-        // Check parameters
-        if ((aData == null) ||
-                (aData.length < aOffset + aLength) ||   // Do not exceed array length
-                (aOffset < 0) ||   // Offset may not be negative
-                (aLength < 0))     // Length may not be negative
-        {
-            throw new IllegalArgumentException("Illegal array");
-        }
-
-        // Zero length, just return
-        if (aLength == 0)
-        {
-            return 0;
-        }
-
-        // Send to the native side.
-        int retVal = _sendMidiEvent(iControlHandle,
-                                    iEventSource,
-                                    aData,
-                                    aOffset,
-                                    aLength);
-
-        if (retVal < NO_ERROR)
-        {
-            return -1;
-        }
-
-        return retVal;
-    }
-
-    /**
-     * Restarts native MIDI engine and initializes it with specified sequence.
-     * For internal use.
-     */
-    public void reInitializeMidi(byte[] aMidiSequence, int aOffset, int aLength)
-    {
-        int retVal = _reInitializeMidi(iControlHandle,
-                                       iEventSource,
-                                       aMidiSequence,
-                                       aOffset,
-                                       aLength);
-        if (retVal < NO_ERROR)
-        {
-            throw new IllegalStateException();
-        }
-
-    }
-
-    /**
-     * Checks program parameter.
-     */
-    private void checkProgram(int aProgram)
-    {
-        // Program must be between 0 - MAX_VALUE
-        if (aProgram < 0 ||
-                aProgram > MAX_VALUE)
-        {
-            throw new IllegalArgumentException("Invalid program "
-                                               + aProgram + ", valid range is  0 <= program <= 127");
-        }
-    }
-
-    /**
-     * Checks bank parameter.
-     */
-    private void checkBank(int aBank)
-    {
-        // Bank must be between DEFAULT_BANK - MAX_BANK
-        if (aBank < DEFAULT_BANK ||
-                aBank > MAX_BANK)
-        {
-            throw new IllegalArgumentException("Invalid bank "
-                                               + aBank + ", valid range is  1 <= bank <= 16383");
-        }
-    }
-
-    /**
-     * Checks channel parameter.
-     */
-    private void checkChannel(int aChannel)
-    {
-        // Channel must be between 0 - MAX_CHANNEL
-        if (aChannel < 0 ||
-                aChannel > MAX_CHANNEL)
-        {
-            throw new IllegalArgumentException("Invalid channel "
-                                               + aChannel + ",  valid range is  0 <= channel <= 15");
-        }
-    }
-
-    /**
-     * Checks key number parameter.
-     */
-    private void checkKey(int aKey)
-    {
-        // Channel must be between 0 - MAX_VALUE
-        if (aKey < 0 ||
-                aKey > MAX_VALUE)
-        {
-            throw new IllegalArgumentException("Invalid key "
-                                               + aKey + ", valid range is  0 <= key <= 127");
-        }
-    }
-
-    /**
-     * Checks that player has been prefetched.
-     */
-    private void checkPlayerState()
-    {
-        // Player must be in PREFETCHED or STARTED state.
-        int state = iPlayer.getState();
-        if (state != Player.PREFETCHED &&
-                state != Player.STARTED)
-        {
-            throw new IllegalStateException(
-                "Player must be in PREFETCHED or STARTED state");
-        }
-    }
-
-    //
-    // Native methods
-    //
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native MIDIControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aChannel number of channel which is subject to program change.
-     * @param aBank bank to be set.
-     * @param aProgram program to be set.
-     * @return error code. Negative is error occured.
-     */
-    private native int _setProgram(int aControlHandle,
-                                   int aEventSourceHandle,
-                                   int aChannel,
-                                   int aBank,
-                                   int aProgram);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native MIDIControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aChannel channel which volume to get
-     * @return The channel volume. -1 if an error occured or if not known.
-     */
-    private native int _getChannelVolume(int aControlHandle,
-                                         int aEventSourceHandle,
-                                         int aChannel);
-
-    /**
-     * Native Implementation.
-     * @param aControlHandle Pointer to the native MIDIControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aChannel channel which volume to set
-     * @param aVolume volume to set
-     */
-    private native int _setChannelVolume(int aControlHandle,
-                                         int aEventSource,
-                                         int aChannel,
-                                         int aVolume);
-
-    /**
-     * Native implementation. Array length will asserted only in debug builds.
-     *
-     * @param aControlHandle Pointer to the native MIDIControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aData Array of the bytes to send.
-     * @param aOffset Start offset in data array.
-     * @param aLength Number of bytes to be sent.
-     * @return The number of bytes actually sent to the device.
-     *         -1 if an error occured.
-     *         KErrArgument if IllegalArgument exception must be thrown
-     */
-    private native int _sendMidiEvent(int aControlHandle,
-                                      int aEventSourceHandle,
-                                      byte[] aData,
-                                      int aOffset,
-                                      int aLength);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native MIDIControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aMidiSequence Array of the bytes containing midi sequence
-     * for initialization
-     * @param aOffset Start offset in data array.
-     * @param aLength Number of bytes to be sent.
-     * @return Native error code.
-     */
-    private native int _reInitializeMidi(int aControlHandle,
-                                         int aEventSourceHandle,
-                                         byte[] aMidiSequence,
-                                         int aOffset,
-                                         int aLength);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMACanvasDisplay.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,415 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import javax.microedition.lcdui.*;
-import org.eclipse.ercp.swt.mobile.MobileShell;
-import org.eclipse.swt.graphics.Rectangle;
-
-
-
-public class MMACanvasDisplay extends BaseDisplay
-{
-
-  private int iEventSourceHandle;
-	private MMAPIeSWTObserver eswtObserver;
-	private int x;
-	private int y;
-	private int qwidgetHandle;
-	private int eSWTcontrolLocationX;
-	private int eSWTcontrolLocationY;
-
-	// index 0 : x-coordinate of topleft corner of display
-	// index 1 : y-coordinate of topleft corner of display
-	// index 3 : width of display
-	// index 4 : height of display
-
-	private int[] displayboundarr = new int[ 4 ];
-	// represents native side of display
-
-
-    public MMACanvasDisplay(int aEventSourceHandle , javax.microedition.lcdui.Canvas canvas)
-    {
-    iEventSourceHandle = aEventSourceHandle;
-    eswtObserver = new MMAPIeSWTObserver();
-		eswtCanvasControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtControl(canvas);
-		//super.setESWTControl(eswtCanvasControl);
-		}
-
-	private void addListeners()
-	{
-	eswtObserver.addControlListenerToControl(eswtCanvasControl);
-	eswtObserver.addShellListenerToControl(eswtCanvasControl);
-	eswtObserver.addDisposeListenerToControl(eswtCanvasControl);
-	}
-
-	public void setNativeHandle( int handle)
-	{
-		System.out.println("MMACanvasDisplay.java : setNativeHandle :" + handle);
-		nativeDisplayHandle = handle;
-		eswtObserver.setDisplayToObserver(this);
-		addListeners();
-	}
-
-  public void setDisplaySize(int aWidth, int aHeight)
-	{
-		final int width = aWidth;
-		final int height = aHeight;
-		try{
-		 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-		 disp.syncExec(new Runnable() {
-							 public void run() {
-							   org.eclipse.swt.graphics.Point size = new org.eclipse.swt.graphics.Point(width,height);
-							   eswtCanvasControl.redraw();
-							   
-								System.out.println("inside videoControl's setDisplaySize redraw called");
-								        		 }
-			 });
-		   }
-		catch(Exception e)
-		{
-			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		}
-
-
-System.out.println("inside videoControl's setDisplaySize +");
-		_setDisplaySize(nativeDisplayHandle,
-							iEventSourceHandle,
-		 						aWidth,
-		 							aHeight);
-System.out.println("inside videoControl's setDisplaySize -");		 							
-	}
-
-	public void setDisplayFullScreen(final boolean aFullScreenMode)
-	{
-		try{
-
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			disp.syncExec(new Runnable() {
-			 public void run() {
-			  eswtCanvasControl.setBounds(disp.getClientArea());
-			  new MobileShell(disp).setFullScreenMode(aFullScreenMode);
-			  // instruct native to switch to full screen mode
-			  _setFullScreenMode(nativeDisplayHandle,aFullScreenMode);
-	 			             }
-						 });
-		   }
-		 catch(Exception e)
-		 {
-			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		 }
-
-	}
-
-	public void setDisplayLocation(int aX, int aY)
-	{
-
-	final int videoControlLocationX = aX;
-	final int videoControlLocationY = aY;
-
-		try{
-			 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			 disp.syncExec(new Runnable() {
-							 public void run() {
-												   org.eclipse.swt.graphics.Point topleftposition = eswtCanvasControl.getLocation();
-												   eSWTcontrolLocationX = topleftposition.x;
-												   eSWTcontrolLocationY = topleftposition.y;
-
-								    		   }
-			    });
-		 }
-		 catch(Exception e)
-		 {
-			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		 }
-		// To Avoid UI thread block
-		System.out.println("inside videoControl's setDisplaySize before calling _setPosition " );
-		_setPosition(nativeDisplayHandle,
-							iEventSourceHandle,
-		 						eSWTcontrolLocationX,
-		 							eSWTcontrolLocationY,
-		 								videoControlLocationX,
-		 									videoControlLocationY);
-		System.out.println("inside videoControl's setDisplaySize after calling _setPosition " );
-
-		try{
-		 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-		 disp.syncExec(new Runnable() {
-						 public void run() {
-							 System.out.println("inside videoControl's setDisplaySize before redraw() " );
-									eswtCanvasControl.redraw();
-							 System.out.println("inside videoControl's setDisplaySize after redraw() " );
-										   }
-					    });
-		 }
-		 catch(Exception e)
-		 {
-			System.out.println("inside videoControl's setDisplayLocation in redraw()....exception is " + e.toString());
-		 }
-
-
-	System.out.println("inside videoControl's setDisplayLocation coming out of setDisplayLocation()");
-	}
-
-
-	public void setVisible(boolean aVisible)
-	{
-		try{
-			final boolean visible = aVisible;
-		    final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				 disp.asyncExec(new Runnable() {
-								 public void run() {
-									   //eswtCanvasControl.setVisible(visible);
-									   // call native side to set the visibiity
-									   _setVisible(nativeDisplayHandle,visible);
-								 }
-			    });
-		   }
-	    catch(Exception e)
-		   {
-				System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		   }
-		   //System.out.println("inside videoControl's setVisible before native call");
-		  // _setVisible(nativeDisplayHandle,aVisible);
-		  // System.out.println("inside videoControl's setVisible after native call");
-	}
-
-	public int getDisplayHeight()
-	{
-
-
-			try{
-				final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				disp.syncExec(new Runnable() {
-
-								 public void run() {
-									y = eswtCanvasControl.getSize().y;
-											 }
-				});
-		   }
-	     catch(Exception e)
-		   {
-				System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		   }
- 	return y;
-
-	}
-
-   public int getDisplayWidth()
-   {
-	      try{
-				final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				 disp.syncExec(new Runnable() {
-								 public void run() {
-									  x = eswtCanvasControl.getSize().x;
-
-								 }
-				});
-	   		   }
-	   	     catch(Exception e)
-	   		   {
-	   			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		       }
-
-		       return x;
-
-   }
-	public int getDisplayX()
-	{
-		try{
-				final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				 disp.syncExec(new Runnable() {
-								 public void run() {
-								x = eswtCanvasControl.getLocation().x;
-
-								 }
-				});
-		    }
-		catch(Exception e)
-			{
-			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-	        }
-    return x;
-
-	}
-
-	public int getDisplayY()
-	{
-
-
-
-				try{
-						final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-						 disp.syncExec(new Runnable() {
-										 public void run() {
-											 y = eswtCanvasControl.getLocation().y;
-
-										 }
-						});
-				    }
-				catch(Exception e)
-					{
-					System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-	        }
-      return y;
-	 }
-
-	public int getSourceWidth()
-	{
-		// return width of the source video
-
-		return 0;
-
-	}
-
-	public int getSourceHeight()
-	{
-		// return height of the source video
-
-		return 0;
-	}
-
- public void getBoundRect()
- {
-   System.out.println("MMACanvasDisplay.java :getBoundRect()");
-
-	try{
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			 disp.syncExec(new Runnable() {
-							 public void run() {
-								 Rectangle boundrect  = eswtCanvasControl.getBounds();
-								 displayboundarr[0] = boundrect.x ;
-								 displayboundarr[1] = boundrect.y ;
-								 displayboundarr[2] = boundrect.width ;
-								 displayboundarr[3] = boundrect.height ;
-
-							 }
-			});
-		}
-	catch(Exception e)
-		{
-		System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		}
-  System.out.println("MMACanvasDisplay.java :getBoundRect() x =" + displayboundarr[0] + "y ="+ displayboundarr[1] +"width ="+ displayboundarr[2] +"height =" + displayboundarr[3] );
- }
-
-
-public void getContainerRect()
- {
-    // this function is not used for canvas case assuming that in case of canvas Bound rect and container rect is same.
-    // to do: need to confirm
-   getBoundRect();
-
- }
-
-public void setContainerVisibilityToNative(final boolean active)
- {
-   System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative + ");
-   new Thread(){
-   	public void run(){
-   		System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative execute the native function in new thread ");
-   		 _setContainerVisible(iEventSourceHandle,nativeDisplayHandle,active);
-   	} 
-  }.start();
-  
-   System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative - ");
- }
-
-public void setWindowResources()
-{
-	System.out.println("MMACanvasDisplay.java: setWindowResources windowHandle ");
-	try{
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-
-			 disp.syncExec(new Runnable() {
-							 public void run() {
-								Shell shell = eswtCanvasControl.getShell();
-								qwidgetHandle = Internal_PackageSupport.topHandle(shell);
-								x = eswtCanvasControl.getSize().x;
-								y = eswtCanvasControl.getSize().y;
-								_setWindowToNative(nativeDisplayHandle,qwidgetHandle);
-								System.out.println("MMACanvasDisplay.java: setWindowResources qwidgetHandle is " + qwidgetHandle);
-							 }
-			});
-		}
-	catch(Exception e)
-		{
-		System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		}
-		_setNativeWindowSize(nativeDisplayHandle,iEventSourceHandle,x,y);
-
-}
-
-/*
-// dummy
-
-public void dummy()
-{
-	_nativeDummy();
-}
-*/
-/*
-	public void getDisplaySize(int width, int height)
-	{
-
-		try{
-			final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			 disp.syncExec(new Runnable() {
-							 public void run() {
-								  x = eswtCanvasControl.getSize().x;
-								  y = eswtCanvasControl.getSize().y;
-
-							 }
-				});
-			}
-	   catch(Exception e)
-			   		   {
-			   			System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
-		       }
-
-		       width = x;
-		       height = y;
-	}
-
-	*/
-    // Native methods
-
-
-	 private native void _setVisible(int nativeDisplayHandle,
-	                                         boolean value);
-
-	 private native void _setContainerVisible(int iEventSourceHandle,
-	 																						int nativeDisplayHandle,
-		                                     					boolean value);
-	private native void _setFullScreenMode(int nativeDisplayHandle,	boolean value);
-	private native void _setWindowToNative(int nativeDisplayHandle,int qwidgetHandle);
-	private native void _setNativeWindowSize(int nativeDisplayHandle,int iEventSourceHandle, int width,int height);
-	private native void _setPosition(int nativeDisplayHandle,
-																			int iEventSourceHandle,
-																						int uiControlLocationX,
-																										int uiControlLocationY,
-																														int videoControlLocationX,
-																																	int videoControlLocationY);
-	private native void _setDisplaySize(int nativeDisplayHandle,
-																						int iEventSourceHandle,
-		 																							int	eSWTcontrolLocationX,
-		 																										int	eSWTcontrolLocationY);																																
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMAGUIFactory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.microedition.media.control;
-
-/**
- * This interface provides extension point for GUIControl.USE_GUI_PRIMITIVE
- * display mode.
- */
-public interface MMAGUIFactory
-{
-    /**
-     * Initializes display mode and returns Object that can be used with
-     * GUI.
-     * @return Associated GUI object
-     */
-    Object initDisplayMode();
-
-    /**
-     * MMA will set content for container with this method after display
-     * mode is initialized.
-     * @param aHandle MMMADirectContent native handle.
-     * @throw NullPointerException if initDisplayMode has not been called.
-     */
-    void setContentHandle(int aHandle);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMAPIeSWTObserver.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-package com.nokia.microedition.media.control;
-
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.events.*;
-import com.nokia.microedition.volumekeys.*;
-
-
-public class MMAPIeSWTObserver
-{
-	//MMAPILCDUIInvokerImpl mmapiLcduiInvoker;
-
- mmacontrollistener cntrlsner ;
- mmashelllistener shellsner ;
- mmadisposelistener displsner;
-
-MMACanvasDisplay display;
-
-
-	public MMAPIeSWTObserver()
-	{
-		//mmapiLcduiInvoker = new MMAPILCDUIInvokerImpl();
-	}
-
-	public void setDisplayToObserver(MMACanvasDisplay display)
-	{
-		this.display = display;
-		cntrlsner = new mmacontrollistener(display);
-		shellsner = new mmashelllistener(display);
-		displsner = new mmadisposelistener(display);
-	}
-
-	public void addControlListenerToControl(final Control eSWTControl)
-	{
-
-		System.out.println("MMAPIeSWTObserver.java :addControlListenerToControl +");
-		//mmapiLcduiInvoker.AddControlListenerToControl(eSWTControl,(org.eclipse.swt.events.ControlListener)this);
-
-	  try{
-			 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-			 disp.syncExec(new Runnable() {
-			 			             public void run() {
-			 							               eSWTControl.addControlListener(cntrlsner);
-			 			             					}
-				 });
-		}
-		catch(Exception e)
-		{
-			System.out.println("addControlListenerToControl....exception is " + e.toString());
-		}
-
-		System.out.println("MMAPIeSWTObserver.java :addControlListenerToControl -");
-
-	}
-
-	public void addShellListenerToControl(final Control eSWTControl)
-	{
-			System.out.println("MMAPIeSWTObserver.java :addShellListenerToControl +");
-			try{
-				 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				 disp.syncExec(new Runnable() {
-										 public void run() {
-														     eSWTControl.getShell().addShellListener(shellsner);
-														   }
-					 });
-				}
-				catch(Exception e)
-				{
-					System.out.println("addShellListenerToControl....exception is " + e.toString());
-				}
-
-			System.out.println("MMAPIeSWTObserver.java :addShellListenerToControl -");
-
-	}
-
-
-	public void addDisposeListenerToControl(final Control eSWTControl)
-	{
-			System.out.println("MMAPIeSWTObserver.java :addDisposeListenerToControl +");
-			//mmapiLcduiInvoker.AddDisposeListenerToControl(eSWTControl,(org.eclipse.swt.events.DisposeListener)this);
-
-			try{
-				 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-				 disp.syncExec(new Runnable() {
-										 public void run() {
-															 eSWTControl.addDisposeListener(displsner);
-														   }
-					 });
-				}
-				catch(Exception e)
-				{
-					System.out.println("addShellListenerToControl....exception is " + e.toString());
-				}
-			System.out.println("MMAPIeSWTObserver.java :addDisposeListenerToControl -");
-
-	}
-
-	public void removeControlListenerToControl(Control eSWTControl)
-	{
-		System.out.println("MMAPIeSWTObserver.java :removeControlListenerToControl +");
-		//mmapiLcduiInvoker.RemoveControlListenerToControl(eSWTControl,(org.eclipse.swt.events.ControlListener)this);
-		System.out.println("MMAPIeSWTObserver.java :removeControlListenerToControl -");
-
-	}
-	public void removeShellListenerToControl(Control eSWTControl)
-	{
-			System.out.println("MMAPIeSWTObserver.java :removeShellListenerToControl +");
-			//mmapiLcduiInvoker.RemoveShellListenerToControl(eSWTControl,(org.eclipse.swt.events.ShellListener)this);
-			System.out.println("MMAPIeSWTObserver.java :removeShellListenerToControl -");
-
-	}
-	public void removeDisposeListenerToControl(Control eSWTControl)
-	{
-			System.out.println("MMAPIeSWTObserver.java :removeDisposeListenerToControl +");
-			//mmapiLcduiInvoker.RemoveDisposeListenerToControl(eSWTControl,(org.eclipse.swt.events.DisposeListener)this);
-			System.out.println("MMAPIeSWTObserver.java :removeDisposeListenerToControl -");
-
-	}
-
-}
-
-
-// Control Listener
-
-class mmacontrollistener implements ControlListener
-{
-
-	private MMACanvasDisplay display;
-	mmacontrollistener(MMACanvasDisplay display)
-	{
-		this.display = display;
-
-	}
-	// from ControlListener
-	public void controlMoved(ControlEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :controlMoved callback");
-	}
-
-	public void controlResized(ControlEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :controlResized callback");
-	}
-}
-
-// ShellListener
-class mmashelllistener implements ShellListener
-{
-    private MMACanvasDisplay display;
-	mmashelllistener(MMACanvasDisplay display)
-	{
-		this.display = display;
-
-	}
-	// from ShellListener
-	public void shellActivated(ShellEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :shellActivated callback");
-		display.setContainerVisibilityToNative(true);
-	}
-
-	public void shellClosed(ShellEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :shellClosed callback");
-	}
-
-	public void shellDeactivated(ShellEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :shellDeactivated callback");
-		display.setContainerVisibilityToNative(false);
-	}
-
-	public void shellDeiconified(ShellEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :shellDeiconified callback");
-	}
-
-	public void shellIconified(ShellEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :shellIconified callback");
-	}
-
-
-}
-
-// DisposeListener
-
-class mmadisposelistener implements DisposeListener
-{
-	private MMACanvasDisplay display;
-  mmadisposelistener(MMACanvasDisplay display)
-	{
-	 this.display = display;
-	}
-
-	// from DisposeListener
-	public void widgetDisposed(DisposeEvent e)
-	{
-		System.out.println("MMAPIeSWTObserver.java :widgetDisposed callback");
-	}
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/PitchControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 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:  PitchControl controls the pitch.
-*
-*/
-
-package com.nokia.microedition.media.control;
-
-/**
- * TempoControl or RateControl methods cannot throw any exceptions.
- * If an error occurs in native side, native side return default value.
- */
-public class PitchControl extends ControlImpl
-        implements javax.microedition.media.control.PitchControl
-{
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-    protected static final int PITCH_OFFSET = 1000000;
-
-    /**
-     * @see PitchControl
-     */
-    public int setPitch(int aMillisemitones)
-    {
-        checkState();
-        int pitch =
-            _setPitch(iControlHandle, iEventSource, aMillisemitones);
-        if (pitch < NO_ERROR)
-        {
-            throw new Error("setPitch() failed, Symbian OS error: "
-                            + pitch);
-        }
-        return pitch - PITCH_OFFSET;
-    }
-
-    /**
-     * @see PitchControl
-     */
-    public int getPitch()
-    {
-        checkState();
-        int pitch = _getPitch(iControlHandle, iEventSource);
-        if (pitch < NO_ERROR)
-        {
-            throw new Error(
-                "getPitch() failed, SymbianOS error: " + pitch);
-        }
-        return pitch - PITCH_OFFSET;
-    }
-
-    /**
-     * @see PitchControl
-     */
-    public int getMaxPitch()
-    {
-        checkState();
-        int pitch = _getMaxPitch(iControlHandle, iEventSource);
-        if (pitch < NO_ERROR)
-        {
-            throw new Error(
-                "getMaxPitch() failed, SymbianOS error: "
-                + pitch);
-        }
-        return pitch - PITCH_OFFSET;
-    }
-
-    /**
-     * @see PitchControl
-     */
-    public int getMinPitch()
-    {
-        checkState();
-        int pitch = _getMinPitch(iControlHandle, iEventSource);
-        if (pitch < NO_ERROR)
-        {
-            throw new Error(
-                "getMinPitch() failed, SymbianOS error: "
-                + pitch);
-        }
-        return pitch - PITCH_OFFSET;
-    }
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native PitchControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aMillisemitones The number of semi tones to raise the playback
-     * pitch.
-     * @return The actual pitch raise set
-     */
-    private native int _setPitch(int aControlHandle,
-                                 int aEventSourceHandle,
-                                 int aMillisemitones);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native PitchControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return the current playback pitch raise in "milli-semitones".
-     */
-    private native int _getPitch(int aControlHandle,
-                                 int aEventSourceHandle);
-
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native PitchControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return the maximum pitch raise in "milli-semitones".
-     */
-    private native int _getMaxPitch(int aControlHandle,
-                                    int aEventSourceHandle);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native PitchControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return the minimum pitch raise in "milli-semitones".
-     */
-    private native int _getMinPitch(int aControlHandle,
-                                    int aEventSourceHandle);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/RateControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2002 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:  RateControl controls the rate.
-*
-*/
-
-package com.nokia.microedition.media.control;
-import javax.microedition.media.Player;
-
-/**
- * RateControl or RateControl methods cannot throw any exceptions.
- * If an error occurs in native side, native side return default value.
- */
-public class RateControl extends ControlImpl
-        implements javax.microedition.media.control.RateControl
-{
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-
-    /**
-     * @see RateControl
-     */
-    public int setRate(int aMilliRate)
-    {
-        checkState();
-        int rate = _setRate(iControlHandle, iEventSource, aMilliRate);
-        if (rate < NO_ERROR)
-        {
-            throw new Error(
-                "setRate() failed, Symbian OS error: " + rate);
-        }
-        return rate;
-    }
-
-    /**
-     * @see RateControl
-     */
-    public int getRate()
-    {
-        checkState();
-        int rate = _getRate(iControlHandle, iEventSource);
-        if (rate < NO_ERROR)
-        {
-            throw new Error(
-                "getRate() failed, Symbian OS error: " + rate);
-        }
-        return rate;
-    }
-
-    /**
-     * @see RateControl
-     */
-    public int getMaxRate()
-    {
-        checkState();
-        int rate = _getMaxRate(iControlHandle, iEventSource);
-        if (rate < NO_ERROR)
-        {
-            throw new Error(
-                "getMaxRate() failed, Symbian OS error: "
-                + rate);
-        }
-        return rate;
-    }
-
-    /**
-     * @see RateControl
-     */
-    public int getMinRate()
-    {
-        checkState();
-        int rate = _getMinRate(iControlHandle, iEventSource);
-        if (rate < NO_ERROR)
-        {
-            throw new Error(
-                "getMinRate() failed, Symbian OS error: "
-                + rate);
-        }
-        return rate;
-    }
-
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native RateControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aMilliRate The playback rate to set
-     * @return The actual rate set.
-     */
-    private native int _setRate(int aControlHandle,
-                                int aEventSourceHandle,
-                                int aMilliRate);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native RateControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return The current playback rate.
-     */
-    private native int _getRate(int aControlHandle,
-                                int aEventSourceHandle);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native RateControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return The maximum rate.
-     */
-    private native int _getMaxRate(int aControlHandle,
-                                   int aEventSourceHandle);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native RateControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return The minimum rate.
-     */
-    private native int _getMinRate(int aControlHandle,
-                                   int aEventSourceHandle);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,634 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class controls the recording of the media from a Player.
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.io.Connector;
-import javax.microedition.io.Connection;
-import javax.microedition.io.StreamConnection;
-import javax.microedition.io.HttpConnection;
-import javax.microedition.io.ConnectionNotFoundException;
-import com.nokia.microedition.media.protocol.OutputStreamWriter;
-import com.nokia.microedition.media.PlayerImpl;
-import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-
-/**
- * <code>RecordControl</code> controls the recording of media
- * from a <code>Player</code>.  <code>RecordControl</code> records
- * what's currently being played by the <code>Player</code>.
- * <p>
- * <h2>Example</h2>
- * <blockquote>
- * <pre>
- * try {
- *    // Create a Player that captures live audio.
- *    Player p = Manager.createPlayer("capture://audio");
- *    p.realize();
- *    // Get the RecordControl, set the record stream,
- *    // start the Player and record for 5 seconds.
- *    RecordControl rc = (RecordControl)p.getControl("RecordControl");
- *    ByteArrayOutputStream output = new ByteArrayOutputStream();
- *    rc.setRecordStream(output);
- *    rc.startRecord();
- *    p.start();
- *    Thread.currentThread().sleep(5000);
- *    rc.commit();
- *    p.close();
- * } catch (IOException ioe) {
- * } catch (MediaException me) {
- * } catch (InterruptedException ie) { }
- * </pre>
- * </blockquote>
- *
- * @see javax.microedition.media.Player
- */
-public class RecordControl extends ControlImpl
-        implements javax.microedition.media.control.RecordControl, Runnable
-{
-
-    protected static final int ERROR_NONE = 0; // native side returns if OK
-
-    private OutputStreamWriter iOutputStreamWriter;
-    private Connection iConnection;
-    private boolean iStarted = false;
-
-    // commit() must be allowed when RecordControl is already
-    // committed from native side
-    private boolean iIgnoreCommitState = false;
-
-    private static final String REQUEST_NAME = "User-Agent";
-    private static final String REQUEST_VALUE =
-        "Profile/MIDP-2.0 Configuration/CLDC-1.0";
-    private static final String CONTENT_TYPE = "Content-Type";
-
-    private static final String RECORD_CONTROL_PERMISSION =
-        "javax.microedition.media.control.RecordControl";
-
-    /**
-     * RecordControl constructor
-     */
-    public RecordControl()
-    {
-    }
-
-    /**
-     * Called when the Player is disposed
-     */
-    public void notifyDispose()
-    {
-        try
-        {
-            closeStream();
-        }
-        catch (IOException ioe)
-        {
-            // cannot throw error here
-            Logger.WLOG(Logger.EJavaMMAPI,
-                        "Closing stream failed: ", ioe);
-        }
-    }
-
-    private void closeStream() throws IOException
-    {
-        if (iOutputStreamWriter != null)
-        {
-            // wait until the StreamWriter events are fully handled
-            iOutputStreamWriter.close();
-        }
-        try
-        {
-            if (iConnection != null)
-            {
-                // If stream was created with setRecordLocation( String aLocator )
-                // method there is connection object and we have to close
-                // the OutputStream. Stream set with setRecordStream may not be
-                // closed. Any open streams would cause the connection to be
-                // held open until they themselves are closed.
-                iOutputStreamWriter.closeStream();
-            }
-        }
-        finally
-        {
-            iOutputStreamWriter = null;
-            if (iConnection != null)
-            {
-                iConnection.close();
-                iConnection = null;
-            }
-        }
-    }
-
-    /**
-     * Set the output stream where the data will be
-     * recorded.
-     *
-     * @param aStream The output stream where the data will be recorded.
-     * @exception IllegalStateException Thrown if one of the following
-     * conditions is true:
-     * <ul>
-     * <li>
-     * <code>startRecord</code> has been called and <code>commit</code> has
-     * not been called.
-     * <li>
-     * <code>setRecordLocation</code> has been called and <code>commit</code> has
-     * not been called.
-     * </ul>
-     *
-     * @exception IllegalArgumentException Thrown if
-     * <code>stream</code> is null.
-     *
-     */
-    public void setRecordStream(OutputStream aStream)
-    {
-        checkState();
-        if (null == aStream)
-        {
-            throw new IllegalArgumentException("Stream is null");
-        }
-
-        // Stream is already set (and not commited)
-        if (iOutputStreamWriter != null)
-        {
-            throw new IllegalStateException(
-                "Stream is already set but not commited yet");
-        }
-
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        PlayerPermission per = new PlayerPermission("audio/video recording","record");
-        appUtils.checkPermission(per);
-
-        privateSetRecordStream(aStream);
-    }
-
-    /**
-     * Private method for setting record stream.
-     * Called from setRecordStream and setRecordLocation methods.
-     * @param aStream The output stream where the data will be recorded.
-     */
-    private void privateSetRecordStream(OutputStream aStream)
-    {
-        int playerHandle = ((PlayerImpl)iPlayer).getPlayerHandle();
-        // Create a writer for OutputStream
-        iOutputStreamWriter = new OutputStreamWriter(aStream,
-                iEventSource,
-                this,
-                playerHandle);
-
-        // Set the writer to the native object
-        int handle = _setRecordStream(iEventSource,
-                                      iControlHandle,
-                                      iOutputStreamWriter);
-        if (handle < ERROR_NONE)
-        {
-            iOutputStreamWriter = null;
-            throw new IllegalArgumentException(
-                "setRecordStream() failed, Symbian OS error: " + handle);
-        }
-        else
-        {
-            iOutputStreamWriter.start(handle);
-        }
-    }
-
-    /**
-     * Set the output location where the data will be recorded.
-     *
-     * @param aLocator The locator specifying where the
-     * recorded media will be saved.  The locator must be
-     * specified as a URL.
-     * @exception IllegalStateException Thrown if one of the following
-     * conditions is true:
-     * <ul>
-     * <li>
-     * <code>startRecord</code> has been called and <code>commit</code> has
-     * not been called.
-     * <li>
-     * <code>setRecordStream</code> has been called and <code>commit</code> has
-     * not been called.
-     * </ul>
-     * @exception IllegalArgumentException Thrown if <code>locator</code>
-     * is null.
-     * @exception IOException Thrown if protocol is valid but the
-     * media cannot be created at the specified location.
-     * @exception MediaException Thrown if the locator is not in URL syntax
-     * or it specifies a protocol that is not supported.
-     * @exception SecurityException Thrown if the caller does not
-     * have security permission to set the record location.
-     */
-    public void setRecordLocation(String aLocator)
-    throws IOException, MediaException
-    {
-        checkState();
-        if (aLocator == null)
-        {
-            throw new IllegalArgumentException("Locator is null");
-        }
-
-        // Stream is already set (and not commited)
-        if (iOutputStreamWriter != null)
-        {
-            throw new IllegalStateException(
-                "Record location is already set but not commited yet");
-        }
-
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        PlayerPermission per = new PlayerPermission("audio/video recording","record");
-        appUtils.checkPermission(per);
-
-        Connection conn;
-        try
-        {
-            conn = Connector.open(aLocator, Connector.WRITE);
-        }
-        catch (IllegalArgumentException iae)
-        {
-            throw new MediaException("Locator not supported: " + aLocator);
-        }
-        catch (ConnectionNotFoundException cnfe)
-        {
-            throw new MediaException("" + cnfe);
-        }
-
-        // Using HTTP post
-        if (conn instanceof HttpConnection)
-        {
-            HttpConnection hc = (HttpConnection)conn;
-
-            // Set the request method and headers
-            hc.setRequestMethod(HttpConnection.POST);
-            hc.setRequestProperty(REQUEST_NAME, REQUEST_VALUE);
-            hc.setRequestProperty(CONTENT_TYPE, getContentType());
-
-            // Getting the output stream may flush the headers
-            privateSetRecordStream(hc.openOutputStream());
-        }
-        else if (conn instanceof StreamConnection)
-        {
-            // Using StreamConnection
-            StreamConnection sc = (StreamConnection)conn;
-            privateSetRecordStream(sc.openOutputStream());
-        }
-        else
-        {
-            conn.close();
-            throw new MediaException("Unsupported connection type");
-        }
-        iConnection = conn;
-    }
-
-
-    /**
-     * Return the content type of the recorded media.
-     *
-     * The content type is given in the
-     * <a HREF="../Manager.html#content-type">content type syntax</a>.
-     *
-     * @return The content type of the media.
-     */
-    public String getContentType()
-    {
-        checkState();
-        return _getContentType(iEventSource, iControlHandle);
-    }
-
-
-    /**
-     * Start recording the media.
-     * <p>
-     * If the <code>Player</code> is already started, <code>startRecord</code>
-     * will immediately start the recording.  If the <code>Player</code>
-     * is not already started, <code>startRecord</code> will not
-     * record any media.  It will put the recording in a "standby" mode.
-     * As soon as the <code>Player</code> is started,
-     * the recording will start right away.
-     * <p>
-     * If <code>startRecord</code> is called when the recording has
-     * already started, it will be ignored.
-     * <p>
-     * When <code>startRecord</code> returns, the recording has started
-     * and a <i>RECORD_STARTED</i> event will be delivered through the
-     * <code>PlayerListener</code>.
-     * <p>
-     * If an error occurs while recording is in progress,
-     * <i>RECORD_ERROR</i> event will be delivered via the PlayerListener.
-     *
-     * @exception IllegalStateException Thrown if any of the following
-     * conditions is true:
-     * <ul>
-     * <li>
-     * if <code>setRecordLocation</code> or <code>setRecordStream</code> has
-     * not been called for the first time.
-     * <li>
-     * If <code>commit</code> has been called and
-     * <code>setRecordLocation</code> or <code>setRecordStream</code>
-     * has not been called.
-     * </ul>
-     */
-    public void startRecord()
-    {
-        checkState();
-        // Ignore if startRecord is called when the recording has already started
-        if (iStarted)
-        {
-            return;
-        }
-
-        if (iOutputStreamWriter==null)
-        {
-            throw new IllegalStateException(
-                "Output stream or location not set yet");
-        }
-
-        int rval = _startRecord(iEventSource, iControlHandle);
-        if (rval != ERROR_NONE)
-        {
-            throw new RuntimeException("startRecord() failed, Symbian OS error: " + rval);
-        }
-        iStarted = true;
-        iIgnoreCommitState = false;
-    }
-
-    /**
-     * Stop recording the media.  <code>stopRecord</code> will not
-     * automatically stop the <code>Player</code>.  It only stops
-     * the recording.
-     * <p>
-     * Stopping the <code>Player</code> does not imply
-     * a <code>stopRecord</code>.  Rather, the recording
-     * will be put into a "standby" mode.  Once the <code>Player</code>
-     * is re-started, the recording will resume automatically.
-     * <p>
-     * After <code>stopRecord</code>, <code>startRecord</code> can
-     * be called to resume the recording.
-     * <p>
-     * If <code>stopRecord</code> is called when the recording has
-     * already stopped, it will be ignored.
-     * <p>
-     * When <code>stopRecord</code> returns, the recording has stopped
-     * and a <i>RECORD_STOPPED</i> event will be delivered through the
-     * <code>PlayerListener</code>.
-     */
-    public void stopRecord()
-    {
-        checkState();
-        // If stopRecord is called when the recording has already stopped,
-        // it will be ignored.
-        if (!iStarted)
-        {
-            return;
-        }
-
-        int rval = _stopRecord(iEventSource, iControlHandle);
-        if (rval != ERROR_NONE)
-        {
-            throw new RuntimeException("stopRecord() failed, Symbian OS error: " + rval);
-        }
-        iStarted = false;
-    }
-
-    /**
-     * Complete the current recording.
-     * <p>
-     * If the recording is in progress, <code>commit</code>
-     * will implicitly call <code>stopRecord</code>.
-     * <p>
-     * To record again after <code>commit</code> has been called,
-     * <code>setRecordLocation</code> or <code>setRecordStream</code>
-     * must be called.
-     *
-     * @exception IOException Thrown if an I/O error occurs during commit.
-     * The current recording is not valid. To record again,
-     * <code>setRecordLocation</code> or <code>setRecordStream</code>
-     * must be called.
-     *
-     */
-    public void commit() throws IOException
-    {
-        checkState();
-        // If commit has been called and setRecordLocation or setRecordStream
-        // has not been called.
-        if (null == iOutputStreamWriter)
-        {
-            if (iIgnoreCommitState)
-            {
-                return;
-            }
-            throw new IllegalStateException(
-                "setRecordLocation() or setRecordStream() not called before calling commit()");
-        }
-
-        // If the recording is in progress, commit will implicitly call stopRecord
-        if (iStarted)
-        {
-            stopRecord();
-        }
-
-        int rval = _commit(iEventSource, iControlHandle);
-
-        try
-        {
-            // Do not commit Java stream if native commit failed.
-            if (rval == ERROR_NONE)
-            {
-                iOutputStreamWriter.commit();
-            }
-        }
-        finally
-        {
-            closeStream();
-        }
-        if (rval != ERROR_NONE)
-        {
-            throw new IOException("commit() failed, Symbian OS error: " + rval);
-        }
-    }
-
-    /**
-     * From Runnable.
-     * This method is called when commit is started from native code
-     * (record size limit is reached).
-     */
-    public void run()
-    {
-        // Recording is already stopped.
-        iStarted = false;
-        try
-        {
-            commit();
-        }
-        catch (Exception e)
-        {
-            // Because this method is called from new Thread no exceptions
-            // can be thrown.
-            ((PlayerImpl)iPlayer).getPlayerListenerImpl().postEvent(
-                PlayerListener.RECORD_ERROR, "Commit failed" + e);
-
-            Logger.ELOG(Logger.EJavaMMAPI, "MMA::RecordControl::run failed: ", e);
-        }
-        iIgnoreCommitState = true;
-    }
-
-    /**
-     * Set the record size limit.  This limits the size of the
-     * recorded media to the number of bytes specified.
-     * <p>
-     * When recording is in progress, <code>commit</code> will be
-     * called implicitly in the following cases:
-     * <ul>
-     * <li>Record size limit is reached
-     * <li>If the requested size is less than the already recorded size
-     * <li>No more space is available.
-     * </ul>
-     * <p>
-     * Once a record size limit has been set, it will remain so
-     * for future recordings until it is changed by another
-     * <code>setRecordSizeLimit</code> call.
-     * <p>
-     * To remove the record size limit, set it to
-     * <code>Integer.MAX_VALUE</code>.
-     * By default, the record size limit is not set.
-     * <p>
-     * Only positive values can be set.  Zero or negative values
-     * are invalid and an <code>IllegalArgumentException</code>
-     * will be thrown.
-     *
-     * @param aSize The record size limit in number of bytes.
-     * @return The actual size limit set.
-     * @exception IllegalArgumentException Thrown if the given size
-     * is invalid.
-     * @exception MediaException Thrown if setting the record
-     * size limit is not supported.
-     */
-    public int setRecordSizeLimit(int aSize) throws MediaException
-    {
-        checkState();
-        if (aSize <= 0)
-        {
-            throw new IllegalArgumentException("Size should be > 0");
-        }
-        int rval = _setRecordSizeLimit(iEventSource,
-                                       iControlHandle,
-                                       aSize);
-
-        // @exception MediaException Thrown if setting the record
-        // size limit is not supported.
-
-        // Negative values are errors
-        if (rval < ERROR_NONE)
-        {
-            throw new MediaException(
-                "Setting record size limit is not supported, Symbian OS error: " + rval);
-        }
-
-        // Returns 0, if the buffer cannot be resized
-        // Commit the buffer now
-        if (rval==0)
-        {
-            try
-            {
-                commit();
-            }
-            catch (IOException ioe)
-            {
-                // Converts IOE to ME
-                throw new MediaException("IOException occurred during commit, " + ioe);
-            }
-
-            rval = aSize;   // return the requested size
-        }
-
-        // Special case; do not return the actual size set when using MAX_VALUE
-        // (this was in TCK tests; RecordControl/SetRecordSizeLimit )
-        if (aSize == Integer.MAX_VALUE)
-        {
-            return Integer.MAX_VALUE;
-        }
-
-        return rval;
-    }
-
-    /**
-     * Erase the current recording.
-     * <p>
-     * If the recording is in progress, <code>reset</code>
-     * will implicitly call <code>stopRecord</code>.
-     * <p>
-     * Calling <code>reset</code> after <code>commit</code>
-     * will have no effect on the current recording.
-     * <p>
-     * If the <code>Player</code> that is associated with this
-     * <code>RecordControl</code> is closed, <code>reset</code>
-     * will be called implicitly.
-     *
-     * @exception IOException Thrown if the current recording
-     * cannot be erased. The current recording is not valid.
-     * To record again, <code>setRecordLocation</code> or
-     * <code>setRecordStream</code> must be called.
-     *
-     */
-    public void reset() throws IOException
-    {
-        checkState();
-        if (null == iOutputStreamWriter)
-        {
-            return;
-        }
-
-        // If the recording is in progress, reset will implicitly call stopRecord
-        if (iStarted)
-        {
-            stopRecord();
-        }
-
-        int rval = _reset(iEventSource, iControlHandle);
-        if (rval < ERROR_NONE)
-        {
-            // IOException thrown if the current recording cannot be erased.
-            // To record again, setRecordLocation or setRecordStream must be called.
-            // closing the stream
-            closeStream();
-            throw new IOException("reset() failed, Symbian OS error: " + rval);
-        }
-    }
-
-
-    private static native int _startRecord(int aEventSource, int aControlHandle);
-    private static native int _stopRecord(int aEventSource, int aControlHandle);
-
-    private static native int _setRecordStream(int aEventSource,
-            int aControlHandle,
-            OutputStreamWriter aWriter);
-
-    private static native String _getContentType(int aEventSource,
-            int aControlHandle);
-
-    private static native int _commit(int aEventSource, int aControlHandle);
-
-    private static native int _setRecordSizeLimit(int aEventSource,
-            int aControlHandle,
-            int aSize);
-
-    private static native int _reset(int aEventSource, int aControlHandle);
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/StopTimeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class allows one to specify a preset stop time for a Player
-*
-*/
-
-package com.nokia.microedition.media.control;
-
-/**
- * <code>StopTimeControl</code> allows one to specify a preset stop time for
- * a <code>Player</code>.
- * <p>
- */
-public class StopTimeControl extends ControlImpl
-        implements javax.microedition.media.control.StopTimeControl
-{
-    /**
-     * StopTimeControl constructor
-     */
-    public StopTimeControl()
-    {
-    }
-
-    /**
-     * Gets the last value successfully set by <CODE>setStopTime</CODE>.
-     *
-     * Returns the constant <CODE>RESET</CODE> if no stop time is set.
-     * This is the default.
-     *
-     * @return The current stop time in microseconds.
-     * @see #setStopTime
-     */
-    public long getStopTime()
-    {
-        checkState();
-        long time = _getStopTime(iEventSource, iControlHandle);
-        return time;
-    }
-
-    /**
-     *
-     * Sets the <i>media time</i> at which you want the <code>Player</code>
-     * to stop.
-     * The <code>Player</code> will stop when its <i>media time</i>
-     * reaches the stop-time.
-     * A <code>STOPPED_AT_TIME</code> event
-     * will be delivered through the <code>PlayerListener</code>.
-     * <p>
-     * The <code>Player</code> is guaranteed
-     * to stop within one second past the preset stop-time
-     * (i.e. <code>stop-time <= current-media-time <= stop-time + 1 sec.</code>);
-     * unless the current media time is already passed the preset stop time
-     * when the stop time is set.
-     * If the current media time is already past the stop time set,
-     * the <code>Player</code> will stop immediately.  A
-     * <code>STOPPED_AT_TIME</code> event will be delivered.
-     * After the <code>Player</code> stops due to the stop-time set,
-     * the previously set stop-time will be cleared automatically.
-     * Alternatively, the stop time can be explicitly removed by
-     * setting it to: <code>RESET</code>.
-     * <p>
-     *
-     * You can always call <code>setStopTime</code> on a stopped
-     * <code>Player</code>.
-     * To avoid a potential race condition, it is illegal to
-     * call <code>setStopTime</code> on a started <code>Player</code> if a
-     * <i>media stop-time</i> has already been set.
-     *
-     * @param aStopTime The time in microseconds at which you want the
-     * <code>Player</code> to stop, in <i>media time</i>.
-     * @exception IllegalStateException Thrown if
-     * <code>aStopTime</code> is called on a started
-     * <code>Player</code> and the
-     * <i>media stop-time</i> has already been set.
-     * @see #getStopTime
-     */
-    public void setStopTime(long aStopTime) throws IllegalStateException
-    {
-        checkState();
-        if (iPlayer.getState() == iPlayer.STARTED && getStopTime() != RESET)
-        {
-            throw new IllegalStateException(
-                "Player is STARTED or setStopTime() is already called successfully");
-        }
-
-        // Set native object to stop at time
-        _setStopTime(iEventSource, iControlHandle, aStopTime);
-    }
-
-    private static native long _getStopTime(int aEventSourceHandle,
-                                            int aControlHandle);
-
-    private static native int _setStopTime(int aEventSourceHandle,
-                                           int aControlHandle,
-                                           long aTime);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/TempoControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2002 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:  TempoControl is used to control the tempo.
-*
-*/
-
-package com.nokia.microedition.media.control;
-import javax.microedition.media.Player;
-
-/**
- * TempoControl or RateControl methods cannot throw any exceptions.
- * If an error occurs in native side, native side return default value.
- */
-public class TempoControl extends RateControl
-        implements javax.microedition.media.control.TempoControl
-{
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-
-    // Tempo holder for PREFETCHED state. Initially set to default value.
-    private static final int DEFAULT_TEMPO = 120000;
-
-    /**
-     * @see TempoControl
-     */
-    public int setTempo(int aMilliTempo)
-    {
-        checkState();
-        // _setTempo returns real value (STARTED) or user set value
-        // (PREFETCHED). In latter case user set value is adjusted
-        // in native side according to max/min bounds of tempo.
-        int tempo = _setTempo(iControlHandle, iEventSource, aMilliTempo);
-
-        if (tempo < NO_ERROR)
-        {
-            throw new Error(
-                "setTempo() failed, Symbian OS error: " + tempo);
-        }
-        return tempo;
-    }
-
-    /**
-     * @see TempoControl
-     */
-    public int getTempo()
-    {
-        checkState();
-
-        int tempo = _getTempo(iControlHandle, iEventSource);
-        return tempo;
-    }
-
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native TempoControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @param aMilliTempo The tempo specified in milli-beats per minute
-     * @return The actual tempo set.
-     */
-    private native int _setTempo(int aControlHandle,
-                                 int aEventSourceHandle,
-                                 int aMilliTempo);
-
-    /**
-     * Native implementation.
-     *
-     * @param aControlHandle Pointer to the native TempoControl object.
-     * @param aEventSourceHandle Pointer to the native event source object.
-     * @return The tempo.
-     */
-    private native int _getTempo(int aControlHandle,
-                                 int aEventSourceHandle);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VideoControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,881 +0,0 @@
-/*
-* Copyright (c) 2002 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:  VideoControl is used to control the display of video.
-*
-*/
-
-package com.nokia.microedition.media.control;
-
-import javax.microedition.media.Player;
-import javax.microedition.media.MediaException;
-import javax.microedition.lcdui.Canvas;
-import javax.microedition.lcdui.Display;
-import javax.microedition.midlet.MIDlet;
-import com.nokia.microedition.media.NativeError;
-
-//import com.symbian.midp.runtime.MIDletExecutor;
-import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-
-
-import javax.microedition.lcdui.Displayable;
-import javax.microedition.lcdui.Display;
-//import com.symbian.midp.runtime.MIDletInstance;
-
-//import com.symbian.midp.runtime.ToolkitInvoker;
-
-import com.nokia.mj.impl.rt.support.Finalizer;
-import com.nokia.mj.impl.utils.Logger;
-
-// MMAPI 3.x UI req.
-import com.nokia.microedition.media.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import javax.microedition.lcdui.*;
-import org.eclipse.ercp.swt.mobile.MobileShell;
-
-
-
-
-public class VideoControl
-        extends ControlImpl
-        implements javax.microedition.media.control.VideoControl
-{
-    private static final String GUI_OBJECT_CLASS_NAME =
-        "javax.microedition.lcdui.Item";
-    private static final int NOT_INITIALIZED = -1;
-    private static final int ERROR_ARGUMENT = -6; // KErrArgument
-
-    // use contans to avoid making native methods
-    // which has same prototypes
-
-    // getter constants for native side
-    private static final int PROPERTY_DISPLAY_WIDTH = 1;
-    private static final int PROPERTY_DISPLAY_HEIGHT = 2;
-    private static final int PROPERTY_DISPLAY_X = 3;
-    private static final int PROPERTY_DISPLAY_Y = 4;
-    private static final int PROPERTY_SOURCE_WIDTH = 5;
-    private static final int PROPERTY_SOURCE_HEIGHT = 6;
-
-    // setter constants for native side
-    private static final int SET_DISPLAY_SIZE = 20;
-    private static final int SET_DISPLAY_LOCATION = 21;
-    private static final int SET_DISPLAY_VISIBLE_TRUE = 22;
-    private static final int SET_DISPLAY_VISIBLE_FALSE = 23;
-    private static final int SET_DISPLAY_FULLSCREEN_TRUE = 24;
-    private static final int SET_DISPLAY_FULLSCREEN_FALSE = 25;
-
-    // MMA API defines return values like 'return value is undefined'
-    // then UNDEFINED_RETURN_VALUE is returned
-    private static final int UNDEFINED_RETURN_VALUE = 0;
-
-    // class name used with dynamic display mode initialization
-    private static String GUI_FACTORY_CLASS_NAME = ".Factory";
-
-    // lcdui package used with UiToolkitRegister
-    private static String LCDUI_PACKAGE =
-        "javax.microedition.lcdui";
-
-    // eswt package used with UiToolkitRegister
-    private static String ESWT_PACKAGE = "org.eclipse.swt.widgets";
-
-    // ToolkitRegister class name used with eswt and lcdui
-    private static String DISPLAY = ".Display";
-
-    // class name used to check if eswt is included
-    private static String LISTENER = ".Listener";
-
-    // class name used to check if eswt is included
-    private static String ESWT_CONTROL = ".control";
-
-    protected int iStatus = NOT_INITIALIZED;
-
-    // Needed for getting native handle from lcdui components
-    //com.symbian.midp.runtime.ToolkitInvoker iToolkitInvoker;
-
-    private VideoItem iVideoItem;
-    private Canvas iVideoCanvas;
-    
-    BaseDisplay display;
-//    private MIDletInstance iMIDletInstance;
-
-    // error code used asynchronous native calls
-    private int iError;
-
-    // used in asynchronous getSnapshot method
-    private byte[] iImageData;
-    private int iToolkitHandle = 0;
-
-    // toolkit, stored as object as we don't have access to Toolkit class.
-    private Object iToolkit;
-    // for midlet foreground statelistening
-    //ToolkitInvoker iTlkitInvoker;
-
-    private Finalizer mFinalizer = new Finalizer()
-    {
-        public void finalizeImpl()
-        {
-            doFinalize();
-        }
-    };
-
-    public VideoControl()
-    {
-       // iToolkitInvoker = com.symbian.midp.runtime.ToolkitInvoker.getToolkitInvoker();
-//       lcduiinvoker = new com.nokia.microedition.volumekeys.MMAPILCDUIInvokerImpl();
-     //  eswtObserver = new MMAPIeSWTObserver();
-    }
-
-    private void doFinalize()
-    {
-        if (mFinalizer != null)
-        {
-            registeredFinalize();
-            mFinalizer = null;
-        }
-    }
-
-    final void registeredFinalize()
-    {
-        if (iVideoItem != null)
-        {
-            iPlayer.removePlayerListener(iVideoItem);
-            iVideoItem.iNativeHandle = 0;
-        }
-    }
-
-    public void setHandles(Player aPlayer, int aEventSource, int aControlHandle)
-    {
-        iPlayer = aPlayer;
-        iEventSource = aEventSource;
-        iControlHandle = aControlHandle;
-        iToolkitHandle = 0;   // TODO: remove once implementation is done.
-        int error = _construct(iControlHandle,
-                               aEventSource,
-                               iToolkitHandle);
-
-        NativeError.check(error);
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public void setDisplaySize(int aWidth, int aHeight) throws MediaException
-    {
-       // checkState();
-
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-                "VideoControl.initDisplayMode() not called yet");
-        }
-        if (aWidth <= 0 || aHeight <= 0)
-        {
-            throw new IllegalArgumentException(
-                "Width and height must be positive");
-        }
-
-
-
-			System.out.println("before display.setDisplaySize()");
-
-
-				//canvasdisplay.setDisplaySize( aWidth, aHeight);
-			display.setDisplaySize( aWidth, aHeight);
-			
-			System.out.println("after display.setDisplaySize()");
-        /*
-        int ret = setDisplayProperty(aWidth, aHeight, SET_DISPLAY_SIZE);
-        if (ret < 0)
-        {
-            throw new MediaException("setDisplaySize() failed, SymbianOS error: "
-                                                    + ret);
-        }
-        if (iStatus == USE_GUI_PRIMITIVE &&
-                iVideoItem != null)  // with dynamic display mode item can be null
-        {
-            iVideoItem.privateInvalidate();
-        }
-
-        */
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public void setDisplayFullScreen(boolean aFullScreenMode) throws MediaException
-    {
-       // checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-                "VideoControl.initDisplayMode() not called yet");
-        }
-        /*
-        int ret;
-        if (aFullScreenMode)
-        {
-            ret = setDisplayProperty(SET_DISPLAY_FULLSCREEN_TRUE);
-        }
-        else
-        {
-            ret = setDisplayProperty(SET_DISPLAY_FULLSCREEN_FALSE);
-        }
-
-        if (ret < 0)
-        {
-            throw new MediaException();
-        }
-
-        */
-		System.out.println("inside setDisplayFullScreen()");
-			//canvasdisplay.setDisplayFullScreen( aFullScreenMode);
-		display.setDisplayFullScreen( aFullScreenMode);
-
-
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public void setDisplayLocation(int aX, int aY)
-    {
-       // checkState();
-         System.out.println("VideoControl.java :: setDisplayLocation x, y = " + aX + ","+ aY);
-        if (iStatus == USE_GUI_PRIMITIVE)
-        {
-            // In USE_GUI_PRIMITIVE mode, this call will be ignored.
-            return;
-        }
-        if (iStatus != USE_DIRECT_VIDEO)
-        {
-            // This method only works when the USE_DIRECT_VIDEO mode is set.
-            throw new IllegalStateException();
-        }
-	/*
-        // cannot fail -> ignore return value
-        setDisplayProperty(aX, aY, SET_DISPLAY_LOCATION);
-	*/
-
-	System.out.println("inside setDisplayLocation()");
-	//canvasdisplay.setDisplayLocation( aX , aY);
-	display.setDisplayLocation( aX , aY);
-
-	 }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public void setVisible(boolean aVisible)
-    {
-       // checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-                "VideoControl.initDisplayMode() not called yet");
-        }
-        /*if (aVisible)
-        {
-            // Update the foreground or background state of the midlet before
-            // setting the visibility of the control
-            updateForeground();
-            // cannot fail -> ignore return value
-            setDisplayProperty(SET_DISPLAY_VISIBLE_TRUE);
-        }
-        else
-        {
-            // cannot fail -> ignore return value
-            setDisplayProperty(SET_DISPLAY_VISIBLE_FALSE);
-        }
-        */
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
-                           " before display.setVisible()");
-        System.out.println("inside setVisible()");
-        if(aVisible)
-        {
-        // set the Midlet BG/FG status to native	
-        updateForeground();
-      	}
-        display.setVisible( aVisible );
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
-                           "after display.setVisible()");
-        
-
-
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getDisplayWidth()
-    {/*
-        checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-            "VideoControl.initDisplayMode() not called yet");
-        }
-        int width = getControlProperty(PROPERTY_DISPLAY_WIDTH);
-        return width;
-        */
-                //return  canvasdisplay.getDisplayWidth( );
-        return display.getDisplayWidth( );
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getDisplayHeight()
-    {
-       /* checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-            "VideoControl.initDisplayMode() not called yet");
-        }
-        int height = getControlProperty(PROPERTY_DISPLAY_HEIGHT);
-        return height;
-
-        */
-        return  display.getDisplayHeight( );
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getDisplayX()
-    {
-       /* checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            return UNDEFINED_RETURN_VALUE;
-        }
-        int x = getControlProperty(PROPERTY_DISPLAY_X);
-        return x;
-        */
-        return  display.getDisplayX( );
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getDisplayY()
-    {
-		/*
-        checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            return UNDEFINED_RETURN_VALUE;
-        }
-        int y = getControlProperty(PROPERTY_DISPLAY_Y);
-        return y;
-
-        */
-          return  display.getDisplayY( );
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getSourceWidth()
-    {
-       /* checkState();
-        int width = getControlProperty(PROPERTY_SOURCE_WIDTH);
-        if (width <= 0)
-        {
-            width = 1;
-        }
-        return width;
-
-        */
-        return  display.getSourceWidth( );
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public int getSourceHeight()
-    {
-        /*checkState();
-        int height = getControlProperty(PROPERTY_SOURCE_HEIGHT);
-        if (height <= 0)
-        {
-            height = 1;
-        }
-        return height;
-        */
-		return  display.getSourceHeight( );
-
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    synchronized public byte[] getSnapshot(String aImageType) throws MediaException
-    {
-        checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            throw new IllegalStateException(
-                "VideoControl.initDisplayMode() not called yet");
-        }
-
-        // starts native side. Native will release wait lock if
-        // _getSnapshot doesn't leave.
-        int error = _getSnapshot(iControlHandle,
-                                 iEventSource, aImageType);
-        if (error == ERROR_ARGUMENT)
-        {
-            throw new MediaException("Unsupported image type: " + aImageType);
-        }
-        else if (error < 0)
-        {
-            throw new MediaException("getSnapshot() failed, Symbian OS error: " + error);
-        }
-
-        synchronized (this)
-        {
-            try
-            {
-                // wait native side
-                wait();
-            }
-            catch (Exception  e)
-            {
-                throw new MediaException("" + e);
-            }
-        }
-        if (iError < 0)
-        {
-            throw new MediaException("Symbian OS error: " + iError);
-        }
-
-        // Check the permission here, so 'the moment' is not lost?
-        //Security.ensurePermission(PERMISSION, PERMISSION, PERM_ARGS);
-        ApplicationUtils appUtils = ApplicationUtils.getInstance();
-        PlayerPermission per = new PlayerPermission("audio/video recording","snapshot");
-        appUtils.checkPermission(per);
-
-        return iImageData;
-    }
-
-    /**
-     * from Interface VideoControl
-     *
-     */
-    public Object initDisplayMode(int aMode, Object aArg)
-    {
-        checkState();
-        if (iStatus != NOT_INITIALIZED)
-        {
-            // IllegalStateException - Thrown if initDisplayMode is
-            // called again after it has previously been called successfully.
-            throw new IllegalStateException(
-                "initDisplayMode() already called successfully");
-        }
-
-        if (aMode == USE_GUI_PRIMITIVE)
-        {
-            Object guiObject = null;
-            if (aArg == null)
-            {
-                guiObject = initNullMode();
-            }
-            else
-            {
-                if (aArg.equals(GUI_OBJECT_CLASS_NAME))
-                {
-                    guiObject = initLCDUI();
-                }
-                else // try load dynamic display mode
-                {
-                    guiObject = initDynamicDisplayMode(aArg);
-                }
-            }
-
-            iStatus = USE_GUI_PRIMITIVE;
-            return guiObject;
-        }
-        else if (aMode == USE_DIRECT_VIDEO)
-        {
-            if (aArg != null)
-            {
-                if (!(aArg instanceof javax.microedition.lcdui.Canvas))
-                {
-                    throw new java.lang.IllegalArgumentException(
-                        "For USE_DIRECT_VIDEO mode argument should be of type Canvas");
-                }
-            }
-            else
-            {
-                throw new java.lang.IllegalArgumentException(
-                    "For USE_DIRECT_VIDEO mode argument should not be null");
-            }
-            iVideoCanvas = (Canvas)aArg;
-			// MMAPI UI 3.x req.
-
-			display = new MMACanvasDisplay(iEventSource , iVideoCanvas);
-
-			System.out.println("VideoControl.java: after eswt control got from canvas has added observer");
-
-            int handle = initNativeDisplay(iVideoCanvas, display);
-            // here actual listener is added to display
-						display.setNativeHandle(handle);
-						// Window resource initialization is done to the native video player
-						display.setWindowResources();
-            iStatus = USE_DIRECT_VIDEO;
-
-           /*( try
-            {
-                this.setVisible(false);
-            }
-
-            catch (IllegalStateException ex) { }
-					*/
-            return null;
-        }
-        else
-        {
-            // java.lang.IllegalArgumentException - Thrown if the mode is invalid.
-            throw new java.lang.IllegalArgumentException(
-            "Mode not supported or invalid, " +
-            "valid modes are USE_DIRECT_VIDEO and USE_GUI_PRIMITIVE");
-        }
-    }
-    
- 		/**
-     * Called from java for early initialization of native handle to java peer
-     * Because it will be used to make a jni call 
-     */   
-   public void setNativeDisplayHandleToJavaPeer(int handle)
-   {
-   	System.out.println("VideoControl.java: setNativeDisplayHandleToJavaPeer handle =" + handle);
-   	  display.setNativeHandle(handle);
-   }
-
-    /**
-     * Initializes native display.
-     *
-     */
-    private int initNativeDisplay(Object aGuiObject, Object mmadisplay)
-    {
-        int handle = _initDisplayMode(iControlHandle,
-                                      iEventSource,
-                                      mmadisplay,
-                                      aGuiObject);
-        NativeError.check(handle);
-        return handle;
-    }
-
-    /**
-     * Gets control property from native side.
-     * @param aPropertyType One of the types defined in this class
-     *
-     */
-    private int getControlProperty(int aPropertyType)
-    {
-        return _getControlProperty(iControlHandle,
-                                   iEventSource,
-                                   aPropertyType);
-    }
-
-    /**
-     * Sets two properties to native side.
-     *
-     * @param aParamA Specific parameter A for property type.
-     * @param aParamB Specific parameter B for property type.
-     * @param aPropertyType One of the types defined in this class
-     */
-    private int setDisplayProperty(int aParamA, int aParamB, int aPropertyType)
-    {
-        return _setDisplayProperty(iControlHandle,
-                                   iEventSource,
-                                   aParamA,
-                                   aParamB,
-                                   aPropertyType);
-    }
-
-    /**
-     * Sets one property to native side.
-     *
-     * @param aPropertyType One of the types defined in this class
-     */
-    private int setDisplayProperty(int aPropertyType)
-    {
-        return _setDisplayProperty(iControlHandle,
-                                   iEventSource,
-                                   0,
-                                   0,
-                                   aPropertyType);
-    }
-
-    /**
-     * Called from native side when snapshot is ready
-     *
-     */
-    private void snapshotReady(int aError, byte[] aImageData)
-    {
-        iImageData = aImageData;
-        iError = aError;
-
-        synchronized (this)
-        {
-            notify();
-        }
-    }
-
-    /**
-     * This method will try to use dynamic class loading to instantiate GUI
-     * object for given mode.
-     * @param aMode parameter for display mode
-     * @return GUI object
-     */
-    private Object initDynamicDisplayMode(Object aMode)
-    {
-        MMAGUIFactory guiFactory = null;
-        try
-        {
-            String className = ((String)aMode).toLowerCase() +
-                               GUI_FACTORY_CLASS_NAME;
-            Class guiClass = Class.forName(className);
-            guiFactory = (MMAGUIFactory)guiClass.newInstance();
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            // if the class could not be found
-            throw new IllegalArgumentException(
-                "Mode not supported or invalid, " +
-                "valid modes are USE_DIRECT_VIDEO and USE_GUI_PRIMITIVE");
-        }
-        catch (IllegalAccessException iae)
-        {
-            // if the class or initializer is not accessible
-            throw new IllegalArgumentException("Mode: " + aMode +
-                                               " caused " + iae);
-        }
-        catch (InstantiationException ie)
-        {
-            // if an application tries to instantiate an abstract class or an
-            // interface, or if the instantiation fails for some other reason
-            throw new IllegalArgumentException("Mode: " + aMode +
-                                               " caused " + ie);
-        }
-        catch (ClassCastException cce)
-        {
-            // Thrown to indicate that the code has attempted to cast an
-            // object to a subclass of which it is not an instance.
-            throw new IllegalArgumentException("Mode: " + aMode +
-                                               " caused " + cce);
-        }
-
-        Object guiObject = guiFactory.initDisplayMode();
-        // initNativeDisplay return handle MMMADirectContainer, 0 parameter
-        // indicates that dynamic display will be used
-        // MMAPI UI 3.x req.
-      //  guiFactory.setContentHandle(initNativeDisplay(guiObject, 0));
-        return guiObject;
-    }
-
-    /**
-     * Initializes LCDUI display mode.
-     * @return LCDUI Item
-     */
-    private Object initLCDUI()
-    {
-        iVideoItem = new VideoItem(iEventSource);
-        iPlayer.addPlayerListener(iVideoItem);
-
-        // MMAPI UI 3.x req.
-       // int handle = initNativeDisplay(iVideoItem,
-       //                                1 /*iToolkitInvoker.itemGetHandle(iVideoItem)*/);
-
-       // iVideoItem.setNativeHandle(handle);
-
-        iStatus = USE_GUI_PRIMITIVE;
-        return iVideoItem;
-    }
-
-    /**
-    * Initializes USE_GUI_PRIMITIVE mode when null parameter is given to
-    * initDisplayMode method.
-    * UI toolkit gets selected when application uses UI toolkit
-    * first time. After this selection null parameter must be
-    * interpreted as the selected UI toolkit. initDisplayMode call
-    * with null parameter before the selection must cause
-    * IllegalArgumentException if there are several toolkits.
-    * @return GUI object
-    */
-    private Object initNullMode()
-    {
-        String toolkit = null;
-
-        Object guiObject = null;
-
-        // If lcdui was selected init it even if there might be several
-        // toolkits. This is done to support existing applications.
-        if ((LCDUI_PACKAGE + DISPLAY).equals(toolkit))
-        {
-            guiObject = initLCDUI();
-        }
-        else
-        {
-            try
-            {
-                // Several UI toolkits are supported if there are eSWT classes
-                // and eSWT direct content component
-                // Trying to load eSWT Listener interface or eSWT GUI factory
-                // does not cause any initialization to eSWT.
-                Class.forName(ESWT_PACKAGE + LISTENER);
-                Class.forName(ESWT_PACKAGE +
-                              ESWT_CONTROL +
-                              GUI_FACTORY_CLASS_NAME);
-
-                // check if eSWT was selected
-                if ((ESWT_PACKAGE + DISPLAY).equals(toolkit))
-
-                {
-                    guiObject = initDynamicDisplayMode(
-                                    ESWT_PACKAGE +
-                                    ESWT_CONTROL +
-                                    GUI_FACTORY_CLASS_NAME);
-                }
-                else
-                {
-                    // If no toolkit is registered and if lcdui library exists select it
-                    try
-                    {
-                        Class.forName(LCDUI_PACKAGE + DISPLAY);
-
-                        guiObject = initLCDUI();
-                    }
-                    catch (ClassNotFoundException cnfe)
-                    {
-                        // If there are several toolkits and none is selected
-                        // IllegalArgumentException must be thrown
-                        throw new IllegalArgumentException(
-                            "UI toolkit is not available or found.");
-                    }
-                }
-            }
-            catch (ClassNotFoundException cnfe)
-            {
-                // Only lcdui is supported
-                guiObject = initLCDUI();
-            }
-        }
-        return guiObject;
-    }
-
-
-  //  private int updateForeground()  // MMAPI UI 3.x changes
-    private void updateForeground()
-    {
-
-        int isFG = 1;
-/*
-        // Check whether display is initialized
-        checkState();
-        if (iStatus == NOT_INITIALIZED)
-        {
-            return visible;
-        }
-
-        iMIDletInstance = MIDletExecutor.getCurrentMIDlet();
-        MIDlet midlet = iMIDletInstance.getMIDlet();
-        //Displayable displayable;
-        if (midlet == null)
-        {
-            return visible;
-        }
-        else
-        {
-            Displayable displayable = Display.getDisplay(midlet).getCurrent();
-
-            if (displayable != null && displayable.isShown())
-            {
-                Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
-                           "VideoControl.updateForeground isShown() = 1");
-                // visible
-            }
-            else
-            {
-                Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
-                           "VideoControl.updateForeground isShown() = 0");
-                // not visible
-                visible = 0;
-            }
-
-            // Set the foreground state
-            _setForeground(iControlHandle,
-                           iEventSource,
-                           visible);
-        }
-
-        return visible;
-        */
-
-        // MMAPI UI 3.x req.
-		// Get the midlet position BG/FG
-		boolean visible = ManagerImpl.getInstance().isForground();
-		if(visible)
-		isFG = 1;
-		else
-		isFG = 0;
-
-        _setForeground(iControlHandle,
-                           iEventSource,
-                           isFG);
-       // return visible;
-    }
-
-    private native int _construct(int aControlHandle,
-                                  int aEventSourceHandle,
-                                  int aToolkitHandle);
-
-    private native int _getControlProperty(int aControlHandle,
-                                           int aEventSourceHandle,
-                                           int aPropertyType);
-
-    private native int _setDisplayProperty(int aControlHandle,
-                                           int aEventSourceHandle,
-                                           int aParamA,
-                                           int aParamB,
-                                           int aPropertyType);
-
-    private native int _getSnapshot(int aControlHandle,
-                                    int aEventSourceHandle,
-                                    String aProperties);
-
-    private native int _initDisplayMode(int aControlHandle,
-                                        int aEventSourceHandle,
-                                        Object aJavaDisplay,
-                                        Object aJavaDisplayObject);
-    private native int _setForeground(int aControlHandle,
-                                      int aEventSourceHandle,
-                                      int aIsForeground);
-
-    private native boolean _isESWT();
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VideoItem.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Item for VideoControl.
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-import javax.microedition.lcdui.CustomItem;
-import javax.microedition.lcdui.Graphics;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.Player;
-import javax.microedition.lcdui.*;
-
-/**
- * Item for VideoControl.
- * This class native equivalent is CMIDItemDisplay.
- * All drawing is done in native.
- * CustomItem has its native bitmap after it is layouted to
- * the form and then SizeChanged method is called and native side
- * gets the bitmap for item.
- *
- */
-public class VideoItem extends CustomItem implements PlayerListener
-{
-    int iNativeHandle;
-
-    private int iEventSourceHandle;
-
-    public VideoItem(int aEventSourceHandle)
-    {
-        super("");   // we don't have title
-        iEventSourceHandle = aEventSourceHandle;
-    }
-
-    // from PlayerListener
-    public void playerUpdate(Player aPlayer, String aEvent, Object aEventData)
-    {
-        if (aEvent == SIZE_CHANGED)
-        {
-            invalidate();
-        }
-    }
-
-    /**
-     * From class CustomItem
-     *
-     */
-    protected int getMinContentHeight()
-    {
-        int minHeight = 0;
-        if (iNativeHandle != 0)
-        {
-            minHeight = _getMinContentHeight(iEventSourceHandle,
-                                             iNativeHandle);
-        }
-        return minHeight;
-    }
-
-    /**
-     * From class CustomItem
-     *
-     */
-    protected int getMinContentWidth()
-    {
-        int minWidth = 0;
-        if (iNativeHandle != 0)
-        {
-            minWidth = _getMinContentWidth(iEventSourceHandle,
-                                           iNativeHandle);
-        }
-        return minWidth;
-    }
-
-    /**
-     * From class CustomItem
-     *
-     */
-    protected int getPrefContentHeight(int aWidth)
-    {
-        int prefHeight = 0;
-        if (iNativeHandle != 0)
-        {
-            prefHeight = _getPrefContentHeight(iEventSourceHandle,
-                                               iNativeHandle,
-                                               aWidth);
-        }
-        return prefHeight;
-    }
-
-    /**
-     * From class CustomItem
-     *
-     */
-    protected int getPrefContentWidth(int aHeight)
-    {
-        int prefWidth = 0;
-        if (iNativeHandle != 0)
-        {
-            prefWidth = _getPrefContentWidth(iEventSourceHandle,
-                                             iNativeHandle,
-                                             aHeight);
-        }
-        return prefWidth;
-    }
-
-    /**
-     * From class CustomItem
-     *
-     * Empty implementation because drawing is done in native side.
-     * Must be implemented because this method is abstract.
-     *
-     */
-    protected void paint(Graphics aGrapchics, int aWidth, int aHeight)
-    {
-    }
-
-    /**
-     * From class CustomItem
-     *
-     */
-    protected void sizeChanged(int aWidth, int aHeight)
-    {
-        if (iNativeHandle != 0)
-        {
-            _sizeChanged(iEventSourceHandle,
-                         iNativeHandle,
-                         aWidth,
-                         aHeight);
-        }
-    }
-
-    /**
-     * Package private method for invalidating the Form owning this item.
-     */
-    void privateInvalidate()
-    {
-        invalidate();
-    }
-
-    /**
-     * Sets native CMIDItemDisplay handle.
-     */
-    void setNativeHandle(int aHandle)
-    {
-        iNativeHandle = aHandle;
-    }
-
-    // Native methods
-
-    /**
-     * Informs got size to native side.
-     */
-    private native int _sizeChanged(int aEventSourceHandle,
-                                    int aNativeHandle,
-                                    int aWidth,
-                                    int aHeight);
-
-    // Getters for layout.
-    private native int _getMinContentWidth(int aEventSourceHandle,
-                                           int aNativeHandle);
-    private native int _getMinContentHeight(int aEventSourceHandle,
-                                            int aNativeHandle);
-    private native int _getPrefContentWidth(int aEventSourceHandle,
-                                            int aNativeHandle,
-                                            int aTentativeWidth);
-    private native int _getPrefContentHeight(int aEventSourceHandle,
-            int aNativeHandle,
-            int aTentativeHeigth);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/VolumeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Item for VideoControl.
-*
-*/
-
-
-package com.nokia.microedition.media.control;
-
-public class VolumeControl extends ControlImpl
-        implements javax.microedition.media.control.VolumeControl
-{
-    private static final int MAX_VOLUME = 100;
-    private static final int UNDEFINED_VOLUME = -1;
-
-    // these constants come from native side
-    protected static final int NO_ERROR = 0; // native side returns if OK
-
-    private int iLevel;
-    private boolean iMuted;
-
-    public VolumeControl()
-    {
-        iLevel = UNDEFINED_VOLUME;
-    }
-
-    public boolean isMuted()
-    {
-        checkState();
-        return iMuted;
-    }
-
-    public int getLevel()
-    {
-        checkState();
-
-        // If the control is muted the cached volume level is returned
-        // because the native implemnetation doesn't directly support
-        // muting. The mute is applied by setting volume level to zero
-        if (!iMuted)
-        {
-            int level = _getLevel(iEventSource, iControlHandle);
-            if (level < NO_ERROR)
-            {
-                throw new Error("getLevel() failed, Symbian OS error: " + level);
-            }
-            // Cache the returned volume level due to mute handling
-            iLevel = level;
-        }
-
-        return iLevel;
-    }
-
-
-    public int setLevel(int aLevel)
-    {
-        checkState();
-        int level = aLevel;
-
-        if (level < 0)
-        {
-            level = 0;
-        }
-        else if (level > MAX_VOLUME)
-        {
-            level = MAX_VOLUME;
-        }
-
-        if (!iMuted)
-        {
-            int error = _setLevel(iEventSource, iControlHandle, level);
-            if (error < NO_ERROR)
-            {
-                throw new Error("setLevel() failed, Symbian OS error: " + error);
-            }
-        }
-        iLevel = level;
-        return level;
-    }
-
-    public void setMute(boolean aMuted)
-    {
-        checkState();
-        if (aMuted != iMuted)
-        {
-            if (iLevel == UNDEFINED_VOLUME)
-            {
-                getLevel();
-            }
-            iMuted = aMuted;
-            int level = 0;
-            if (!iMuted)
-            {
-                level = iLevel;
-            }
-            // else level is 0
-
-            int error = _setLevel(iEventSource, iControlHandle, level);
-            if (error < NO_ERROR)
-            {
-                throw new Error("setMute() failed, Symbian OS error: " + error);
-            }
-        }
-    }
-
-    private static native int _setLevel(int aEventSource, int aControlHandle,
-                                        int aLevel);
-    private static native int _getLevel(int aEventSource, int aControlHandle);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ConnectorProtocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Protocol used with locators that needs Connector.
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import javax.microedition.media.MediaException;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ConnectorDataSource;
-import com.nokia.microedition.media.ManagerImpl;
-
-/**
- * Protocol used with locators that needs Connector.
- */
-public class ConnectorProtocol implements Protocol
-{
-    /**
-     * Default constructor.
-     */
-    public ConnectorProtocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        ConnectorDataSource dataSource = new ConnectorDataSource(aLocator);
-        return ManagerImpl.getInstance().createInternalPlayer(dataSource);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/NativeBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.NativePlayerFactory;
-import javax.microedition.media.MediaException;
-
-/**
- * Base class for native based protocols
- */
-public class NativeBase implements Protocol
-{
-    /**
-     * Protected constructor.
-     */
-    protected NativeBase()
-    {
-    }
-
-    /**
-     * From Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        return NativePlayerFactory.createPlayer(aLocator);
-    }
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/OutputStreamWriter.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class gets data from java classes and passes stream
-*                to CMMASourceStream on C++ side
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class OutputStreamWriter extends Thread
-{
-    /**
-     * Private helper class to handle case when notify comes before
-     * wait
-     */
-    private class WaitObject
-    {
-        static final int NOTIFIED = 1;
-        public int iStatus = NO_ERROR;
-
-        public synchronized void doWait()
-        {
-            if (iStatus == OutputStreamWriter.NO_ERROR)
-            {
-                try
-                {
-                    super.wait();
-                }
-                catch (InterruptedException ex)
-                {
-                    iStatus = OutputStreamWriter.GENERAL_ERROR;
-                }
-            }
-        }
-
-        public synchronized void doNotify()
-        {
-            super.notify();
-            iStatus = NOTIFIED;
-        }
-    }
-    /**
-     * Size of the buffer (transferred bytes) the same size as in c++ side
-     */
-    private static final int BUFFER_MAXSIZE = 4096;
-
-    /**
-     * Status code. Negative values are error codes.
-     * Values >= NO_ERROR are status codes.
-     */
-    private static final int NO_ERROR = 0;
-
-    /**
-     * Status code. Stream is ended.
-     */
-    private static final int COMPLETED = 2;
-
-    /**
-     * Status code. Stream is closed.
-     */
-    private static final int CLOSED = -2002;
-
-    /**
-     * Error status code.
-     */
-    private static final int GENERAL_ERROR = -2003;
-
-    /**
-     * IO error status code.
-     */
-    private static final int IO_ERROR = -2004;
-
-    /**
-     * This constant indicates native commit.
-     */
-    private static final int COMMIT = -10000;
-
-    /**
-     * Stream status.
-     * >= 0 indicates no error
-     * < 0 indicates error
-     */
-    private int iStatus = NO_ERROR;
-
-    /**
-     * Stream where output will be written.
-     */
-    private OutputStream iOutputStream;
-
-    /**
-     * Native handle.
-     */
-    private int iHandle;
-
-    /**
-     * Native event source handle.
-     */
-    private int iEventSourceHandle;
-
-    /**
-     * Used to wait native object to start writing.
-     */
-    private WaitObject iWaitObject = new WaitObject();
-
-    /**
-     * Used to wait in commit method until all data is read.
-     */
-    private WaitObject iCommitWaitObject = new WaitObject();
-
-    /**
-     * Runnable object that does stream commit.
-     */
-    private Runnable iRunnable;
-
-    /**
-     * Player handle is needed to check if native player object is deleted.
-     */
-    private int iPlayerHandle;
-
-    /**
-     * Constructor
-     *
-     * @param aOutputStream a Stream to be passed to C++ side
-     * @param aEventsourceHandle handle to event source
-     * @param aRunnable is called when native commit is done
-     * @param aPlayerHandle Used to check if player is already deleted.
-     */
-    public OutputStreamWriter(OutputStream aOutputStream,
-                              int aEventSourceHandle,
-                              Runnable aRunnable,
-                              int aPlayerHandle)
-    {
-        iOutputStream = aOutputStream;
-        iEventSourceHandle = aEventSourceHandle;
-        iRunnable = aRunnable;
-        iPlayerHandle = aPlayerHandle;
-    }
-
-    /**
-     * Sets handle to native object (CMMAOutputStream) and starts read thread.
-     *
-     * @param aHandle handle (CMMAOutputStream)
-     */
-    public void start(int aHandle)
-    {
-        if (aHandle <= 0)
-        {
-            // Handle must be positive integer.
-            throw new IllegalArgumentException("Could not start player, " + aHandle);
-        }
-        iHandle = aHandle;
-        start();
-    }
-
-    /**
-     * From Thread
-     */
-    public void run()
-    {
-        // buffer for the data copied from native
-        byte[] buffer = new byte[ BUFFER_MAXSIZE ];
-
-        // used get read size from native
-        int[] outputStreamSize = new int[ 1 ];
-
-        // Wait until native side starts writing or
-        // stream is closed.
-        iWaitObject.doWait();
-        if (iWaitObject.iStatus != WaitObject.NOTIFIED)
-        {
-            // some error has occured
-            iStatus = iWaitObject.iStatus;
-        }
-        // Read data until stream is completed or error occures.
-        while (iStatus >= NO_ERROR &&
-                iStatus != COMPLETED)
-        {
-            // Read data from native.
-            iStatus = _readData(iHandle,
-                                iEventSourceHandle,
-                                buffer,
-                                outputStreamSize,
-                                BUFFER_MAXSIZE,
-                                iPlayerHandle);
-
-            // Write data to Java stream.
-            try
-            {
-                // Don't write if no bytes was read or error occured
-                if (outputStreamSize[ 0 ] > 0 &&
-                        iStatus >= NO_ERROR)
-                {
-                    iOutputStream.write(buffer, 0, outputStreamSize[ 0 ]);
-                }
-            }
-            catch (IOException ioe)
-            {
-                // Error writing to stream
-                iStatus = IO_ERROR;
-            }
-            catch (Throwable t)
-            {
-                // For example when OutputStream is closed
-                iStatus = IO_ERROR;
-            }
-        }
-
-        // Notify object waiting commit to complete.
-        iCommitWaitObject.doNotify();
-    }
-
-    /**
-     * Close stops run() thread
-     */
-    public void close()
-    {
-        iStatus = CLOSED;
-        // release wait
-        iWaitObject.doNotify();
-    }
-
-    /**
-     * Close the OutputStream.
-     * @throws IOException If an I/O error occurs
-     */
-    public void closeStream() throws IOException
-    {
-        iOutputStream.close();
-    }
-
-    /**
-     * Wait until all data is written from native side and flush the stream.
-     */
-    public void commit() throws IOException
-    {
-        if (iStatus < NO_ERROR)
-        {
-            throw new IOException(
-                "Current recording cannot be completed, Symbian OS error: " + iStatus);
-        }
-        iCommitWaitObject.doWait();
-        if (iCommitWaitObject.iStatus != WaitObject.NOTIFIED)
-        {
-            // error happened in waiting
-            iStatus = iCommitWaitObject.iStatus;
-        }
-        if (iStatus < NO_ERROR)
-        {
-            throw new IOException(
-                "Current recording cannot be completed, Symbian OS error: " + iStatus);
-        }
-        iOutputStream.flush();
-        iStatus = CLOSED;
-    }
-
-    /**
-     * C++ side notifies that data is available. Java makes a byte array
-     * and passes it to c++ side. Native side fills the byte array.
-     *
-     * @param alength native side notifies how many bytes are ready to be read
-     * @param aStatus Status of the stream reading
-     *
-     */
-    private void write(int aLength, int aStatus)
-    {
-        if (aStatus == COMMIT && iStatus >= NO_ERROR)
-        {
-            (new Thread(iRunnable)).start();
-        }
-        else if (this != null &&
-                 iStatus >= NO_ERROR)
-        {
-            iStatus = aStatus;
-
-            // notify the write-loop that data is available
-            iWaitObject.doNotify();
-        }
-    }
-
-    /**
-     * _readData passes c++ side a byte array and native side
-     * fills it with output stream data.
-     *
-     * @param aHandle Handle
-     * @param aEventSourceHandle Event source
-     * @param aData byte array for output stream data
-     * @param aLength length of byte array
-     * @param aStatus status
-     * @return return value
-     */
-    static private native int _readData(int aHandle,
-                                        int aEventSourceHandle,
-                                        byte[] aData,
-                                        int[] aOutputStreamSize,
-                                        int aLength,
-                                        int aPlayerHandle);
-
-}
-
-//end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.Locator;
-import javax.microedition.media.MediaException;
-
-/**
- * Interface for player creation from locator
- */
-public interface Protocol
-{
-    /**
-     * Creates a new instance of the player from given locator
-     * @param aLocator Locator for creating Player.
-     * @return Fully constructed new Player
-     */
-    abstract InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException;
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ProtocolFactory.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.Locator;
-import javax.microedition.media.MediaException;
-
-/**
- * Factory for creating the Protocols
- */
-public class ProtocolFactory
-{
-    private Protocol iConnectorProtocol = null;
-
-    public static final String PROTOCOL_CLASS_NAME = ".Protocol";
-    public static final String PROTOCOL_BASE_PACKAGE =
-        "com.nokia.microedition.media.protocol.";
-
-    /**
-     * Constructor
-     */
-    public ProtocolFactory()
-    {
-        iConnectorProtocol = new ConnectorProtocol();
-    }
-
-    /**
-     * Factory method for creating player from locator
-     * Tries to load assosiated <code>Protocol</code> first, if this fails
-     * then we try to create player by using <code>Connector</code>
-     * @param aLocator Media locator
-     * @return Player according to locator or null if cannot create
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        InternalPlayer player = null;
-        try
-        {
-            Class protocolClass =
-                Class.forName(PROTOCOL_BASE_PACKAGE +
-                              aLocator.getProtocol() + PROTOCOL_CLASS_NAME);
-            Protocol protocol = (Protocol)protocolClass.newInstance();
-            player = protocol.createPlayer(aLocator);
-        }
-        catch (InstantiationException ie)
-        {
-            throw new MediaException("Instantiation failed: " + ie);
-        }
-        catch (IllegalAccessException iae)
-        {
-            throw new MediaException("Illegal access: " + iae);
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            // we did not find specified Protocol, trying to create player
-            // with connector
-            player = iConnectorProtocol.createPlayer(aLocator);
-        }
-        return player;
-    }
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/ProtocolPackage.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.Locator;
-import javax.microedition.media.MediaException;
-
-/**
- * Base class for Protocols those can contain different Protocols
- * e.g. "capture" protocol can handle also sub-protocols, depending
- * on what type of Player is created.
- * This class instantiates those automatically
- */
-public class ProtocolPackage implements Protocol
-{
-    /**
-     * Protected to allow this class class to be extended.
-     */
-    protected ProtocolPackage()
-    {
-    }
-
-    /**
-     * Implementation from Protocol class, this method will create
-     * new protocol and call it's createPlayer
-     * @param aLocator identifies player
-     * @return new player
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        InternalPlayer player = null;
-        try
-        {
-            Class protocolClass =
-                Class.forName(ProtocolFactory.PROTOCOL_BASE_PACKAGE +
-                              getProtocolName(aLocator) + "." +
-                              getPackageName(aLocator) +
-                              ProtocolFactory.PROTOCOL_CLASS_NAME);
-            Protocol protocol = (Protocol)protocolClass.newInstance();
-            player = protocol.createPlayer(aLocator);
-        }
-        catch (InstantiationException ie)
-        {
-            throw new MediaException("Internal error: " + ie);
-        }
-        catch (IllegalAccessException iae)
-        {
-            throw new MediaException("Internal error: " + iae);
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            throw new MediaException("Unable to create Player with locator: "
-                                     + aLocator.getLocatorString());
-        }
-        return player;
-    }
-
-    /**
-     * Returns the name of the package, this will be used for
-     * creating sub-protocol with name. e.g. with locator "capture://audio"
-     * this will return "audio"
-     *
-     * This method can be overridden if there is need for returning something else
-     * than middle part of the locator
-     * @return Middle part of the locator
-     */
-    protected String getPackageName(Locator aLocator) throws MediaException
-    {
-        return aLocator.getMiddlePart();
-    }
-
-    /**
-     * Returns the name of the protocol, this will be used for
-     * creating sub-protocol with name. e.g. with locator "capture://audio"
-     * this will return "capture"
-     *
-     * This method can be overridden if there is need for returning something else
-     * than protocol of the locator
-     * @return Protocol of the locator
-     */
-    protected String getProtocolName(Locator aLocator) throws MediaException
-    {
-        return aLocator.getProtocol();
-    }
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/SeekThread.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Thread that calls SeekControl's seek method.
-*
-*/
-
-package com.nokia.microedition.media.protocol;
-
-import com.nokia.microedition.media.SeekControl;
-import com.nokia.mj.impl.utils.Logger;
-
-/**
- * Thread that calls SeekControl's seek method.
- */
-class SeekThread extends Thread
-{
-    // control to call in run method
-    final private SeekControl iSeekControl;
-
-    // object to notify when seek is ready
-    final private Object iWaitObject;
-
-    /**
-     * Public constructor.
-     * @param aWwaitObject Object to notify when ready
-     * @param aSeekControl Control to seek.
-     */
-    public SeekThread(Object aWaitObject,
-                      SeekControl aSeekControl)
-    {
-        iWaitObject = aWaitObject;
-        iSeekControl = aSeekControl;
-    }
-
-    /**
-     * From Thread class.
-     */
-    public void run()
-    {
-        try
-        {
-            iSeekControl.seek(0);
-        }
-        catch (Exception e)
-        {
-            // If seek fails, stream cannot be read and SeekControl's target
-            // read must return -1 or throw an exception.
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA::SourceStreamReader::read seek exception ", e);
-        }
-
-        // notify that seek is ready
-        synchronized (iWaitObject)
-        {
-            iWaitObject.notify();
-        }
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/SourceStreamReader.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
-* Copyright (c) 2002 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:  SourceStreamReader gets data from java classes and passes
-*                stream to CMMASourceStream on C++ side
-*
-*/
-
-
-package com.nokia.microedition.media.protocol;
-
-import java.io.IOException;
-import javax.microedition.media.protocol.SourceStream;
-import javax.microedition.media.Controllable;
-import javax.microedition.media.Control;
-import com.nokia.microedition.media.SeekControl;
-import com.nokia.microedition.media.InputStreamSeekControl;
-import com.nokia.mj.impl.utils.Logger;
-
-public class SourceStreamReader extends Thread
-{
-	  Thread t1 = null;
-    // these states are the same in c++ side
-    private static final int NO_ERROR = 0;
-    private static final int ERR_GENERAL = -2;  // KErrGeneral
-    private static final int ERR_EOF = -25;   // KErrEof
-    private static final int READ_ALL = -1;
-    private static final int MORE_DATA = 3;
-    private static final int COMPLETED = 4;
-    private static final int CLOSED = -45;   // KErrSessionClosed
-
-    // size of the buffer (transferred bytes)
-    // MMF currently requests data in 4k blocks
-    private static final int BUFFER_SIZE = 4096;
-
-    private static final String SEEK_CONTROL = "SeekControl";
-
-    private SourceStream iSourceStream;
-    private byte[] iBuffer;
-    private int iLength;            // Length of stream c++ requested
-    private int iHandle;            // handle to CMMASourceStream
-    private int iStatus = NO_ERROR;       // source stream status
-    private int iEventSourceHandle;
-    private boolean iIsActive;
-    private int iPlayerHandle;
-
-    private Object iWaitObject = new Object();
-
-    // DataSource that SourceStream belongs to
-    private Controllable iControllable;
-
-    /**
-     * Constructor
-     *
-     * @param aSourceStream a Stream to be passed to C++ side
-     * @param aEventSourceHandle handle to the event source
-     */
-    public SourceStreamReader(SourceStream aSourceStream,
-                              Controllable aControllable,
-                              int aEventSourceHandle,
-                              int aPlayerHandle)
-    {
-        iSourceStream = aSourceStream;
-        iControllable = aControllable;
-        iEventSourceHandle = aEventSourceHandle;
-        iBuffer = new byte[ BUFFER_SIZE ];
-        iPlayerHandle = aPlayerHandle;
-    }
-
-    /**
-     * Sets handle to CMMASourceStream
-     *
-     * @param aHandle handle to CMMASourceStream
-     */
-    public void setHandle(int aHandle)
-    {
-        iHandle = aHandle;
-    }
-
-    /**
-     * Run method for a thread which writes data to C++
-     */
-    public void run()
-    {
-        int length = 0;
-        do
-        {
-        	  Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run()");
-            iStatus = MORE_DATA;
-            try
-            {
-                length = iSourceStream.read(iBuffer, 0, iLength);
-            }
-            catch (IOException ioe)
-            {
-            	  Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), io exception");
-            	  ioe.printStackTrace();
-                iStatus = ERR_GENERAL;
-            }
-						Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), length = "+length);
-            if (iStatus == CLOSED)
-            {
-                return;
-            }
-            // no more data because end of file has been reach
-            if (length == -1)
-            {
-            	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"no more data because end of file has been reach");
-                iStatus = COMPLETED;
-            }
-           // synchronized (iWaitObject)
-           // {
-            	  Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), calling jni _write"+"status =" + iStatus + "length =" + length);
-
-                int err = _write(iHandle,
-                                 iEventSourceHandle,
-                                 iBuffer,
-                                 length,
-                                 iStatus,
-                                 iPlayerHandle);
-               Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), calling jni _write ret = "+err);
-                if (err != 0)
-                {
-                    // error in writing, closing thread
-                    iIsActive = false;
-                    iStatus = CLOSED;
-                    break;
-                }
-								// wait for next native read
-               // try
-               // {
-                	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), calling wait()");
-                	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"Source stream reader run(), calling wait() thread is =" +Thread.currentThread().getName());
-                   // iWaitObject.wait();
-                //}
-                /*catch (InterruptedException ex)
-                {
-                    // MIDP's object does not have interrupt
-                }*/
-           // }
-        }
-        while (length>0);
-    }
-
-    /**
-     * Close stops run() thread
-     */
-    public void close()
-    {
-        iIsActive = false;
-        iStatus = CLOSED;
-
-        // If Controllable has SeekControl it must be closed
-        Control control = iControllable.getControl(SEEK_CONTROL);
-        if (control != null)
-        {
-            SeekControl sc = (SeekControl)control;
-            sc.close();
-        }
-
-        synchronized (iWaitObject)
-        {
-            iWaitObject.notify();
-        }
-    }
-
-    /**
-     * Resets streams to point start of the media. Player deallocate needs
-     * this.
-     */
-    public void resetStream()
-    {
-        try
-        {
-            SeekControl control = (SeekControl)iControllable.getControl(SEEK_CONTROL);
-            control.seek(0);
-        }
-        catch (IOException ioe)
-        {
-            // Stream may be broken, we can't do anything for it here.
-            // It will be noticed by the player when changing state from deallocate
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "SourceStreamReader: resetStream: ", ioe);
-        }
-    }
-
-
-    /**
-     * Native side request data from Java with read method.
-     *
-     * @param aBytes native side notifies how many bytes should be sent to it
-     * @param aStatus Status of the stream reading
-     */
-    private void read(int aBytes, int aStatus)
-    {
-        // Try to read but SourceStream is already completed or closed?
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"SourceStreamReader::  read() , callback detected ,iStatus  = "+iStatus+"  aBytes = "+aBytes);
-        Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"thread id = "+Thread.currentThread().getName());
-        if (iStatus == CLOSED)
-        {
-            // Inform the native object; attempting to read pass the end of the stream
-            _write(iHandle, iEventSourceHandle, new byte[ 0 ], 0, ERR_EOF, iPlayerHandle);
-            return;
-        }
-
-        if (aBytes == READ_ALL)
-        {
-            iLength = BUFFER_SIZE;
-        }
-        else
-        {
-            iLength = aBytes;
-        }
-
-        if (aBytes > iBuffer.length)
-        {
-            // native request larger buffer
-            iBuffer = new byte[ aBytes ];
-        }
-
-        if (iStatus == COMPLETED)
-        {
-            // Stream is already read ones and need to be seeked to start
-            Control control = iControllable.getControl(SEEK_CONTROL);
-            if (control != null)
-            {
-                // start new seak thread, thread will notify iWaitObject
-                // when completed
-                (new SeekThread(iWaitObject,
-                                (SeekControl)control)).start();
-            }
-            else
-            {
-                // stream is not seekable, so informing native object
-                _write(iHandle, iEventSourceHandle, new byte[ 0 ], 0,
-                       ERR_EOF, iPlayerHandle);
-            }
-        }
-        else if (iIsActive)
-        {
-            // notify to while() write -loop that data is requested
-            Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"SourceStreamReader::  read() before sync(iWaitObjet() ");
-            synchronized (iWaitObject)
-            {
-            	Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"SourceStreamReader::  read() notifying iWaitObject");
-              iWaitObject.notify();
-            }
-        }
-        else
-        {
-        	  Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"SourceStreamReader, creating new Thread");
-            iIsActive = true;
-            t1 = new Thread(this);
-            t1.start();
-          // start();
-        }
-
-    }
-
-
-    /**
-     * _write writes data to the C++ side
-     *
-     * @param aHandle Handle
-     * @param aEventSourceHandle EventSourceHandle
-     * @param aData Source stream
-     * @param aBytesRead how many bytes is read
-     * @param aStatus stream status
-     * @return return value
-     */
-    static private native int _write(int aHandle,
-                                     int aEventSourceHandle,
-                                     byte[] aData,
-                                     int aBytesRead,
-                                     int aStatus,
-                                     int aPlayerHandle);
-
-}
-
-// end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.capture;
-
-/**
- * Protocol class for handling "capture://" protocol
- */
-public class Protocol extends com.nokia.microedition.media.protocol.ProtocolPackage
-{
-
-    /**
-     * Constructor
-     */
-    public Protocol()
-    {
-    };
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/audio/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is capture://audio protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.capture.audio;
-
-import com.nokia.microedition.media.protocol.NativeBase;
-
-/**
- * This class is capture://audio protocol.
- */
-public class Protocol extends NativeBase
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/devcam0/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is capture://devcam0 protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.capture.devcam0;
-
-import com.nokia.microedition.media.protocol.NativeBase;
-
-/**
- * This class is capture://devcam0 protocol.
- */
-public class Protocol extends NativeBase
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/devcam1/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is capture://devcam1 protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.capture.devcam1;
-
-import com.nokia.microedition.media.protocol.NativeBase;
-
-/**
- * This class is capture://devcam1 protocol.
- */
-public class Protocol extends NativeBase
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/capture/video/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is capture://video protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.capture.video;
-
-import com.nokia.microedition.media.protocol.NativeBase;
-
-/**
- * This class is capture://video protocol.
- */
-public class Protocol extends NativeBase
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.device;
-
-/**
- * Protocol class for handling "capture://" protocol
- */
-public class Protocol extends com.nokia.microedition.media.protocol.ProtocolPackage
-{
-
-    /**
-     * Constructor
-     */
-    public Protocol()
-    {
-    };
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/midi/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is device://midi protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.device.midi;
-
-import com.nokia.microedition.media.protocol.NativeBase;
-
-/**
- * This class is device://midi protocol.
- */
-public class Protocol extends NativeBase
-{
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/device/tone/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is device://tone protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.device.tone;
-
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlugIn;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.tone.TonePlayer;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Manager;
-import java.io.IOException;
-import javax.microedition.media.protocol.DataSource;
-
-/**
- * This class is device://tone protocol. This class also implements PlugIn
- * interface which is used from ManagerImpl.
- */
-public class Protocol
-        implements com.nokia.microedition.media.protocol.Protocol,
-        PlugIn
-{
-    // Used to recognize supported locators.
-    private static final String TONE_FILE_EXTENSION = ".jts";
-
-    // Used to get supported protocols. jts supports same protocols than midi.
-    private static final String MIDI_CONTENT_TYPE = "audio/midi";
-
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        if (aLocator.getParameters() != null)
-        {
-            // device://tone may not have properties.
-            throw new MediaException(
-                "Could not create player, parameters not supported: " +
-                aLocator.getParameters());
-        }
-        return new TonePlayer();
-    }
-
-    /**
-     * From PlugIn
-     */
-    public String[] getSupportedContentTypes(String aProtocol)
-    {
-        String[] types = new String[ 0 ];
-
-        if ((aProtocol == null) ||
-                isSupportedProtocol(aProtocol))
-        {
-            types = new String[ 1 ];
-            types[ 0 ] = TonePlayer.TONE_CONTENT_TYPE;
-        }
-        // else empty array is returned
-        return types;
-    }
-
-    /**
-     * Returns true if protocol is supported.
-     * @return true if protocol is supported.
-     */
-    private boolean isSupportedProtocol(String aProtocol)
-    {
-        // get all supported protocols
-        String[] protocols = getSupportedProtocols(null);
-        boolean isSupported = false;
-        // protocol is supported if it is found from protols array
-        for (int i = 0; i < protocols.length &&
-                !isSupported; i++)
-        {
-            if (protocols[ i ].equals(aProtocol))
-            {
-                isSupported = true;
-            }
-        }
-        return isSupported;
-    }
-
-    /**
-     * From PlugIn
-     */
-    public String[] getSupportedProtocols(String aContentType)
-    {
-        String[] protocols = new String[ 0 ];
-        if ((aContentType == null) ||
-                aContentType.equals(TonePlayer.TONE_CONTENT_TYPE))
-        {
-            // tone and midi supports same protocols.
-            protocols = Manager.getSupportedProtocols(
-                            MIDI_CONTENT_TYPE);
-        }
-        // else empty array is returned
-        return protocols;
-    }
-
-    /**
-     * From PlugIn
-     */
-    public InternalPlayer createPlayer(DataSource aDataSource)
-    throws MediaException, IOException
-    {
-        InternalPlayer player = null;
-        String contentType = aDataSource.getContentType();
-        String locator = aDataSource.getLocator();
-        if ((contentType != null &&
-                contentType.equals(TonePlayer.TONE_CONTENT_TYPE)) ||
-                (locator != null &&
-                 locator.endsWith(TONE_FILE_EXTENSION)))
-        {
-            player = new TonePlayer(aDataSource);
-        }
-        return player;
-    }
-
-    /**
-     * From PlugIn. Empty implementation.
-     */
-    public void preparePlayer(InternalPlayer aPlayer) throws MediaException
-    {
-        // tone does not extend existing players
-    }
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/file/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2002 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:  file protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.file;
-
-import javax.microedition.media.MediaException;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.NativePlayerFactory;
-import com.nokia.microedition.media.ConnectorDataSource;
-import com.nokia.microedition.media.tone.TonePlayer;
-import javax.microedition.io.file.FileConnection;
-import javax.microedition.io.Connector;
-import java.io.IOException;
-
-
-/**
- * This class presents file protocol
- */
-public class Protocol implements
-        com.nokia.microedition.media.protocol.Protocol
-{
-    private static final String FILE = "file://";
-    private static final String DRM_SUFFIX = "dcf";
-    private static final String DRM_PARAMS = "?drm=enc";
-    private static final String JTS_SUFFIX = "jts";
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-        FileConnection fileConnection = null;
-        try
-        {
-            if ((aLocator.getParameters() == null) &&
-                    (aLocator.getMiddlePart().endsWith(DRM_SUFFIX)
-                    ))
-            {
-                // DRM file, adding parameters to locator
-                fileConnection = (FileConnection)Connector.open(aLocator.getLocatorString(),Connector.READ);
-            }
-            else if (aLocator.getMiddlePart().endsWith(JTS_SUFFIX))
-            {
-                // JTS file, this format is handled in Java side, so creating player in traditional way
-                ConnectorDataSource dataSource = new ConnectorDataSource(aLocator);
-                return new TonePlayer(dataSource);
-            }
-            else
-            {
-                fileConnection = (FileConnection)Connector.open(aLocator.getLocatorString(),
-                                 Connector.READ);
-            }
-            String fileAndPath  = getPathAndFileName(fileConnection);
-            Locator newLocator = new Locator(fileAndPath);
-            return NativePlayerFactory.createPlayer(newLocator, null);
-        }
-        finally
-        {
-            if (null != fileConnection)
-            {
-                fileConnection.close();
-            }
-        }
-    }
-
-    /**
-     * Internal operation to construct path + fileName from the URI of the file.
-     * Note: This operation removes parameter of the URI just like old
-     * FileConnectionImpl.getPathAndFileName() operation (used in older releases).
-     */
-    private String getPathAndFileName(FileConnection aFileConn)
-    {
-        String path = aFileConn.getPath();
-        // Path always starts with '/' character. This has to be skipped away because
-        // otherwise this is converted to '\\' below. FILE constant contains this first
-        // character('/') of the path.
-        path = path.substring(1);
-        String pathAndFileName = path + aFileConn.getName();
-        pathAndFileName = pathAndFileName.replace('/','\\');
-        return FILE + pathAndFileName;
-    }
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/protocol/rtsp/Protocol.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2002 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:  rtsp protocol
-*
-*/
-
-
-package com.nokia.microedition.media.protocol.rtsp;
-
-import javax.microedition.media.MediaException;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.protocol.NativeBase;
-import com.nokia.mj.impl.media.RTSPPermission;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
-
-/**
- * This class presents rtsp protocol and adds security prompt.
- */
-public class Protocol extends NativeBase
-{
-    private static final String RTSP_CONNECTION_PERMISSION =
-        "javax.microedition.io.Connector.rtsp";
-
-    /**
-     * Default constructor.
-     */
-    public Protocol()
-    {
-    }
-
-    /**
-     * From interface Protocol
-     * @see Protocol
-     */
-    public InternalPlayer createPlayer(Locator aLocator)
-    throws java.io.IOException,
-                MediaException,
-                java.lang.SecurityException
-    {
-    	ApplicationUtils appUtils = ApplicationUtils.getInstance();
-      RTSPPermission per = new RTSPPermission("network usage");
-      appUtils.checkPermission(per);
-        return super.createPlayer(aLocator);
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/BlockEndEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence BLOCK_END events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Event processor class for tone sequence BLOCK_END events
- */
-public class BlockEndEvent extends Event
-{
-    BlockEndEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    public int advance(int aPosition)
-    throws MidiSequenceException, IllegalArgumentException
-    {
-        int retVal = doValidate(aPosition);
-        if (retVal == 0)
-        {
-            return 0;
-        }
-        // if stack is already empty, we cannot revert back. Thus
-        // this BLOCK_END must be invalid
-        if (iReturnPositionStack.empty())
-        {
-            throw new IllegalArgumentException("Illegal BLOCK_END");
-        }
-        // If valid, go back to last position before entering block
-        int lastPos = ((Integer)iReturnPositionStack.pop()).intValue();
-        retVal = lastPos - aPosition;
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        int type = iSequence[ aPosition ];
-        int data = iSequence[ aPosition + 1 ];
-        int retVal = 0;
-
-        if (type == ToneControl.BLOCK_END)
-        {
-            leaveBlock(data);   // fails if block number is incorrect
-            retVal = EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, BlockStart, PlayBlock, Volume, Repeat
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            throw new IllegalArgumentException(
-                "Validation failed, invalid position found in sequence");
-        }
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.BLOCK_START ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-
-        throw new IllegalArgumentException(
-            "Illegal event found; sequence is corrupted");
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/BlockStartEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence BLOCK_START events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Event processor class for tone sequence BLOCK_START events
- */
-public class BlockStartEvent extends Event
-{
-    BlockStartEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    public int advance(int aPosition)
-    throws MidiSequenceException, IllegalArgumentException
-    {
-        return doValidate(aPosition);
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        int type = iSequence[ aPosition ];
-        int data = iSequence[ aPosition + 1 ];
-        int retVal = 0;
-
-        if (type == ToneControl.BLOCK_START)
-        {
-            if (data > MidiToneConstants.TONE_MAX_BLOCK ||
-                    data < MidiToneConstants.TONE_MIN_BLOCK)
-            {
-                throw new IllegalArgumentException(
-                    "Illegal sequence, block number not in range, valid range is 0 <= tempo <= 127");
-            }
-            enterBlock(data);
-            retVal = EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, PlayBlock, Volume, Repeat
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            throw new IllegalArgumentException(
-                "Validation failed, invalid position found in sequence");
-        }
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-        throw new IllegalArgumentException(
-            "Illegal event found; sequence is corrupted");
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/Event.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Base class for tone event processors
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-import java.util.Stack;
-import java.util.Hashtable;
-import com.nokia.mj.impl.utils.Logger;
-
-
-/**
- * Base class for tone event processors
- */
-public abstract class Event
-{
-    // CONSTANTS
-
-    /* Size of single tone event in bytes */
-    public static final byte EVENT_SIZE = 2;
-
-    // MEMBER DATA
-
-    /* Hold original tone sequence bytes */
-    protected byte[] iSequence;
-
-    /* Holds the new tone sequence converted to MIDI */
-    protected MidiSequence iMidiSequence;
-
-    /* Holds block position index in iSequence associated with block
-       number as key. Both are Integer. */
-    protected static Hashtable iBlocksHashtable;
-
-    /* Stack for tone event processors. Used by the method advance. */
-    protected static Stack iReturnPositionStack;
-
-    /* Current block number holder for validating blocks. If not in any
-       block, the value is -1. Manipulated by accessor methods. */
-    private static Stack iCurrentBlockNumStack;
-
-    /* Defines which event types (byte code) are accepted after this event.
-       List is very probably overridden by child events. Defaults to none. */
-//  protected int[] ACCEPTED_EVENTS = {};
-
-    // Static initialization
-    static
-    {
-        iBlocksHashtable = new Hashtable();
-        iReturnPositionStack = new Stack();
-        iCurrentBlockNumStack = new Stack();
-    }
-
-    protected Event(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        iSequence = aSequence;
-        iMidiSequence = aMidiSequence;
-    }
-
-    /**
-     * Reset events for reuse
-     */
-    public void reset()
-    {
-        if (!iReturnPositionStack.empty())
-        {
-            iReturnPositionStack = new Stack();
-        }
-        if (!iBlocksHashtable.isEmpty())
-        {
-            iBlocksHashtable = new Hashtable();
-        }
-        if (!iCurrentBlockNumStack.isEmpty())
-        {
-            iCurrentBlockNumStack = new Stack();
-        }
-    }
-
-    /**
-     * Process events step by step. Does not validate and does not go
-     * through whole sequence, but only those positions that are
-     * needed for playing.
-     * @param aPosition position where to process
-     * @return int offset of position after processing, relative to aPosition.
-     * If zero, no processing has happened.
-     */
-    public abstract int advance(int aPosition)
-    throws MidiSequenceException, IllegalArgumentException;
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected abstract int doValidate(int aPosition)
-    throws IllegalArgumentException;
-
-    /**
-     * Validate sequence step by step. Does not process events, but can do
-     * initialization along validation. Validation includes: Check event
-     * type, parameters and that next event type after this one is allowed
-     * to be there.
-     * @param aPosition position where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    public int validate(int aPosition)
-    throws IllegalArgumentException
-    {
-        int nextPos = 0;
-        try
-        {
-            nextPos = doValidate(aPosition);
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            Logger.WLOG(Logger.EJavaMMAPI, "MMA: Event: validate: AIOOBE");
-            // just return
-            return nextPos;
-        }
-
-        if (nextPos < 0)
-        {
-            // doValidate must never return negative value
-            throw new Error();
-        }
-
-        if (nextPos != 0)
-        {
-            // check that event type in next position is allowed
-            checkEventAtNextPosition(aPosition + nextPos);
-        }
-        return nextPos;
-    }
-
-    /**
-     * Check whether event or end of sequence at next position
-     * is legal after this type of event. Throws
-     * IllegalArgumentException if not accepted.
-     * @param aPosition position of next event
-     */
-
-    protected abstract void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException;
-
-    /**
-     * Called when entering a block.
-     * @param aBlockNum number of block to enter
-     */
-    protected void enterBlock(int aBlockNum)
-    {
-        iCurrentBlockNumStack.push(new Integer(aBlockNum));
-    }
-
-    /**
-     * Called when leaving a block.
-     * @param aBlockNum number of block to leave
-     * @exception IllegalArgumentException if aBlockNum does not
-     * correspond to last block entered or if no block has been
-     * entered.
-     */
-    protected void leaveBlock(int aBlockNum) throws IllegalArgumentException
-    {
-        if (iCurrentBlockNumStack.isEmpty())
-        {
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA: Event: leaveBlock: Not inside block, IAE");
-            throw new IllegalArgumentException(
-                "Illegal Sequence, invalid block number found");
-        }
-
-        if (aBlockNum !=
-                (((Integer)iCurrentBlockNumStack.pop()).intValue()))
-        {
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA: Event: leaveBlock: Incorrect block number, IAE");
-            throw new IllegalArgumentException(
-                "Illegal Sequence, invalid block number found");
-        }
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/EventList.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is holder/handler for other event types
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-import java.util.Vector;
-import java.util.Enumeration;
-
-/**
- * This class is holder/handler for other event types
- */
-public class EventList extends Event
-{
-
-    // CONSTANTS
-
-    private static final int EVENT_PROCESSOR_COUNT = 6;
-
-    // MEMBERS
-
-    private Vector iEvents;
-
-    EventList(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-
-        iEvents = new Vector(EVENT_PROCESSOR_COUNT);
-
-        iEvents.addElement(
-            new ToneEvent(aSequence, aMidiSequence));
-        iEvents.addElement(
-            new BlockStartEvent(aSequence, aMidiSequence));
-        iEvents.addElement(
-            new BlockEndEvent(aSequence, aMidiSequence));
-        iEvents.addElement(
-            new PlayBlockEvent(aSequence, aMidiSequence));
-        iEvents.addElement(
-            new RepeatEvent(aSequence, aMidiSequence));
-        iEvents.addElement(
-            new VolumeEvent(aSequence, aMidiSequence));
-    }
-
-    public int advance(int aPosition) throws MidiSequenceException
-    {
-        // first check that we have at least two bytes left in iSequence
-        // in aPosition.
-        if (iSequence.length - aPosition < EVENT_SIZE)
-        {
-            // return with 0 if end of sequence is reached
-            return 0;
-        }
-
-        Event event = null;
-        int retVal = 0;
-
-        for (Enumeration e = iEvents.elements(); e.hasMoreElements();)
-        {
-            event = (Event)e.nextElement();
-            retVal = event.advance(aPosition);
-            if (retVal != 0)
-            {
-                return retVal;
-            }
-        }
-        // if none of event processors accepts data at current position,
-        // parameter data is illegal.
-        throw new IllegalArgumentException("Illegal event found, sequence is corrupted");
-    }
-
-
-    /**
-     * Inherited from Event.
-     * Special definition for validate. EventList is the main
-     * class performing the actual validation and is thus
-     * excempt from the usual validation process.
-     * @param aPosition position to validate
-     */
-    public int validate(int aPosition)
-    throws IllegalArgumentException
-    {
-        Event event = null;
-        int retVal = 0;
-        for (Enumeration e = iEvents.elements(); e.hasMoreElements();)
-        {
-            event = (Event)e.nextElement();
-            retVal = event.validate(aPosition);
-            if (retVal != 0)
-            {
-                return retVal;
-            }
-        }
-        // if none of event processors accepts data at current position,
-        // parameter data is illegal.
-        throw new IllegalArgumentException("Illegal event found, sequence is corrupted");
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        throw new Error("Illegal validation call");
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        throw new Error("Illegal validation call");
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiSequence.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,446 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class represents midi sequence
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-/**
- * This class represents midi sequence
- */
-public class MidiSequence
-{
-    // CONSTANTS
-
-    /* Value of minute expressed as microseconds */
-    private static final int MINUTE_AS_MICROSECONDS = 60000000;
-
-    /* MIDI events track stream granularity */
-    private static final int MIDI_EVENTS_TRACK_GRANULARITY = 100;
-
-    // MIDI constants
-
-    /* Note value used for silence events. This will not be audible */
-    public static final byte MIDI_SILENCE_NOTE = 0;
-
-    // MIDI file constants
-
-    /* Maximum length of midi sequence events. After this has been
-       met, no new events are accepted by writeMidiEvent. This is not
-       a hard limit anyway (may be exceeded by the last written event),
-       so it's only here to guard memory use and possible infinite
-       sequence */
-
-    private static final int MIDI_EVENTS_MAX_BYTE_COUNT = 32768;
-
-    /* Length of MIDI file header. This includes following:
-       MThd block id, MThd length, midi format, MTrk chunk amount and PPQN */
-    private static final byte FILE_HEADER_LENGTH = 14;
-
-    /* Length of MTrk block. This includes: MTrk block id, MTrk length */
-    private static final byte MTRK_HEADER_LENGTH = 8;
-
-    /* Length of MIDI track header. This includes:
-       tempo change, tempo value, program change */
-    private static final int TRACK_HEADER_LENGTH = 10;
-
-    /* Length of MIDI track trailer */
-    private static final int TRACK_TRAILER_LENGTH = 4;
-
-    // MIDI file header constants
-
-    /* Header block for MThd */
-    private static final byte[] MIDI_HEADER_MTHD =
-        { 0x4D, 0x54, 0x68, 0x64 };
-
-    /* Header block for MThd block length; value is 6 */
-    private static final byte[] MIDI_HEADER_MTHD_LENGTH =
-        { 0x00, 0x00, 0x00, 0x06 };
-
-    /* Header block for used MIDI format; format is 0 */
-    private static final byte[] MIDI_HEADER_MIDI_FORMAT =
-        { 0x00, 0x00 };
-
-    /* Header block for amount of MTrk blocks used */
-    private static final byte[] MIDI_HEADER_MTRK_CHUNK_AMOUNT =
-        { 0x00, 0x01 };
-
-    /* Value for first byte in PPQN block in midi file header */
-    private static final byte MIDI_HEADER_PPQN_FIRST_BYTE = 0x00;
-
-    // MIDI track constants
-
-    /* Header block for MTrk */
-    private static final byte[] MIDI_HEADER_MTRK =
-        { 0x4D, 0x54, 0x72, 0x6B };
-
-    /* Tempo change command. Includes delta time ( 0x00 )
-       and command (0xFF5103) */
-    private static final byte[] TRACK_HEADER_TEMPO_CHANGE =
-        { 0x00, (byte)0xFF, 0x51, 0x03 };
-
-    /* Track end meta event */
-    private static final byte[] TRACK_TRAILER =
-        { 0x00, (byte)0xFF, 0x2F, 0x00 };
-
-    /* Length of single midi event without the variable length
-       delta time */
-    private static final int MIDI_EVENT_COMMAND_LENGTH = 3;
-
-    /* Channel mask for setting correct channel in writeMidiEvent */
-    private static final byte MIDI_EVENT_CHANNEL_MASK = (byte)0xF0;
-
-    /* Maximum value for midi variable length quantity */
-    private static final int MIDI_VARIABLE_LENGTH_MAX_VALUE = 0x0FFFFFFF;
-
-    // Tone constants
-
-    /* Tone resolution is expressed in pulses per full note, whereas
-       midi resolution is pulses per quarter note. Thus we must divide tone
-       empo by 4. For tone, 64 is considered default */
-    private static final byte TONE_DEFAULT_RESOLUTION = 64; // 64/4 = 16(ppqn)
-
-    /* Default tempo for tone is 30. For bpm value it is multiplied by 4 */
-    private static final byte TONE_DEFAULT_TEMPO = 30; // 4*30 = 120 (bpm)
-
-    /* Tone multiplier is used for both dividing resolution and multiplying
-       tempo to get equivalent midi values */
-    private static final byte TONE_MULTIPLIER = 1;
-
-    // MEMBER DATA
-
-    /* Midi channel for generated MIDI sequence */
-    private byte iChannel;
-
-    /* Tempo in MIDI terms */
-    private int iTempo;
-
-    /* Resolution in MIDI terms */
-    private int iResolution;
-
-    /* Instrument used to represent tone */
-    private byte iInstrument;
-
-    /* Counter for written midi events */
-    private int iMidiEventsByteCount;
-
-    /* MIDI sequence written using writeEvent( ) */
-    private ByteArrayOutputStream iMidiTrackEvents;
-
-    /* Tone sequence duration */
-    private int iDuration;
-
-    /**
-     * Constructor
-     * @param aChannel MIDI channel which is assigned to generate track
-     * @param aInstrument Instrument used to represent tone
-     */
-    MidiSequence(byte aChannel, byte aInstrument)
-    {
-        iChannel = aChannel;
-        iInstrument = aInstrument;
-        iTempo = TONE_DEFAULT_TEMPO * TONE_MULTIPLIER;
-        iResolution = TONE_DEFAULT_RESOLUTION / TONE_MULTIPLIER;
-        iMidiTrackEvents = new ByteArrayOutputStream(
-            MIDI_EVENTS_TRACK_GRANULARITY);
-    }
-
-    /**
-     * Get midi stream
-     */
-    public ByteArrayInputStream getStream() throws IOException
-    {
-        iMidiTrackEvents.flush();
-        byte[] midiTrackEvents = iMidiTrackEvents.toByteArray();
-        ByteArrayOutputStream concateStream =
-            new ByteArrayOutputStream(
-            FILE_HEADER_LENGTH +
-            MTRK_HEADER_LENGTH +
-            TRACK_HEADER_LENGTH +
-            midiTrackEvents.length +
-            TRACK_TRAILER_LENGTH);
-
-        writeHeader(concateStream, midiTrackEvents.length);
-        concateStream.write(midiTrackEvents);
-        writeTrailer(concateStream);
-
-        ByteArrayInputStream midi = new ByteArrayInputStream(
-            concateStream.toByteArray());
-
-        concateStream.close();
-        return midi;
-    }
-
-    /**
-     * Get midi file data as byte[]
-     */
-    public byte[] getByteArray() throws IOException
-    {
-        iMidiTrackEvents.flush();
-        byte[] midiTrackEvents = iMidiTrackEvents.toByteArray();
-        ByteArrayOutputStream concateStream =
-            new ByteArrayOutputStream(
-            FILE_HEADER_LENGTH +
-            MTRK_HEADER_LENGTH +
-            TRACK_HEADER_LENGTH +
-            midiTrackEvents.length +
-            TRACK_TRAILER_LENGTH);
-
-        writeHeader(concateStream, midiTrackEvents.length);
-        concateStream.write(midiTrackEvents);
-        writeTrailer(concateStream);
-
-        byte[] midi = concateStream.toByteArray();
-        concateStream.close();
-        return midi;
-    }
-
-    /**
-     * Set tempo
-       * @param aTempo tempo in tone sequence terms
-     */
-    public void setTempo(int aTempo)
-    {
-        if (aTempo < MidiToneConstants.TONE_TEMPO_MIN ||
-                aTempo > MidiToneConstants.TONE_TEMPO_MAX)
-        {
-            throw new IllegalArgumentException("Tempo is out of range, " +
-                                               "valid range is 5 <= tempo <= 127");
-        }
-        iTempo = aTempo * TONE_MULTIPLIER;
-    }
-
-    /**
-     * Set resolution
-       * @param aResolution resolution in tone sequence terms
-       */
-    public void setResolution(int aResolution)
-    {
-        if (aResolution < MidiToneConstants.TONE_RESOLUTION_MIN ||
-                aResolution > MidiToneConstants.TONE_RESOLUTION_MAX)
-        {
-            throw new IllegalArgumentException("Resolution is out of range, " +
-                                               "valid range is 1 <= resolution <= 127");
-        }
-        iResolution = aResolution / TONE_MULTIPLIER;
-    }
-
-    /*
-     * Write midi event to stream. This method writes both variable length
-     * delta time and midi event.
-     * @param aLength time between last event and this event (delta time)
-     * @param aCommand MIDI command byte
-     * @param aEvent First MIDI command parameter
-     * @param aData Second MIDI command parameter
-     */
-    public void writeMidiEvent(int aLength,
-                               byte aCommand,
-                               byte aEvent,
-                               byte aData)
-    throws MidiSequenceException
-    {
-        if (iMidiEventsByteCount > MIDI_EVENTS_MAX_BYTE_COUNT)
-        {
-            throw new MidiSequenceException();
-        }
-        iMidiEventsByteCount += writeVarLen(iMidiTrackEvents, aLength);
-
-        // Write down cumulative count of event lengths (sum will
-        // make up duration of this midi sequence. Only audible events
-        // are counted, which means only those delta times which
-        // are associated to NOTE_OFF events
-        if (aCommand == MidiToneConstants.MIDI_NOTE_OFF)
-        {
-            iDuration += aLength;
-        }
-
-        // attach correct channel number
-        aCommand &= MIDI_EVENT_CHANNEL_MASK;
-        aCommand |= iChannel;
-
-        iMidiTrackEvents.write(aCommand);
-        iMidiTrackEvents.write(aEvent);
-        iMidiTrackEvents.write(aData);
-        iMidiEventsByteCount += MIDI_EVENT_COMMAND_LENGTH;
-    }
-
-    /**
-     * Write time interval value as MIDI variable length data to byte array.
-     * @param aOut output stream
-     * @param aValue time before the event in question happens, relative to
-     * current time. Must be between 0 and 0x0FFFFFFF
-     */
-    private int writeVarLen(ByteArrayOutputStream aOut, int aValue)
-    {
-        if ((aValue > MIDI_VARIABLE_LENGTH_MAX_VALUE) || (aValue < 0))
-        {
-            throw new IllegalArgumentException("Input(time) value is not within range");
-        }
-
-        // Variable to hold count of bytes written to output stream.
-        // Value range is 1-4.
-        int byteCount = 0;
-
-        // variable length quantity can any hold unsigned integer value which
-        // can be represented with 7-28 bits. It is written out so that 7 low
-        // bytes of each byte hold part of the value and 8th byte indicates
-        // whether it is last byte or not (0 if is, 1 if not). Thus a variable
-        // length quantity can be 1-4 bytes long.
-
-        int buffer = aValue & 0x7F; // put low 7 bytes to buffer
-
-        // check if bits above 7 first are significant, 7 bits at time. If
-        // they are, buffer is shifted 8 bits left and the new 7 bits are
-        // appended to beginning of buffer. The eigth byte from right is
-        // set 1 to indicate that that there is at least another 7 bits
-        // on left (bits 9-15) which are part of the quantity.
-
-        // Example. Integer 00000100 11111010 10101010 01010101
-        // 1) Set low 7 bytes to buffer => 1010101
-        // 2) Check if there is more significant bytes in the integer. If
-        // is, continue.
-        // 3) Shift buffer 8 left => 1010101 00000000
-        // 4) Append next 7 bytes to beginning of buffer
-        // buffer => 1010101 01010100
-        // 5) Set 8th bit 1 to indicate that there is another 7 bits on left
-        // buffer => 1010101 11010100
-        // 6) repeat from step 2
-
-        aValue >>= 7;
-        while (aValue != 0)
-        {
-            buffer <<= 8;
-            buffer |= ((aValue & 0x7F) | 0x80);
-            aValue >>= 7;
-        }
-
-        // write the buffer out as 1-4 bytes.
-        while (true)
-        {
-            aOut.write(buffer);
-            byteCount++;
-
-            // check if the indicator bit (8th) is set.
-            // If it is, continue writing.
-            int tempBuf = buffer & 0x80;
-            if (tempBuf != 0)
-            {
-                buffer >>= 8;
-            }
-            else
-            {
-                break;
-            }
-        }
-        return byteCount;
-    }
-
-    /**
-     * Writes midi header
-    * @param aOut output stream
-    * @param aMidiEventsLength lenght of midi event content in bytes
-     */
-    private void writeHeader(
-        ByteArrayOutputStream aOut,
-        int aMidiEventsLength)
-    throws IOException
-    {
-        // MIDI FILE HEADER
-
-        // write 'MThd' block id
-        aOut.write(MIDI_HEADER_MTHD);
-
-        // write MThd block length
-        aOut.write(MIDI_HEADER_MTHD_LENGTH);
-
-        // write midi format; format is 0
-        aOut.write(MIDI_HEADER_MIDI_FORMAT);
-
-        // write MTrk chunk amount; only one track
-        aOut.write(MIDI_HEADER_MTRK_CHUNK_AMOUNT);
-
-        // write PPQN resolution (pulses per quarternote)
-        aOut.write(MIDI_HEADER_PPQN_FIRST_BYTE);
-        aOut.write(iResolution);
-
-        // MTrk HEADER
-
-        // write 'MTrk' for the only track
-        aOut.write(MIDI_HEADER_MTRK);
-
-        // calculate real track length
-        int trackLength = TRACK_HEADER_LENGTH +
-                          aMidiEventsLength +
-                          TRACK_TRAILER_LENGTH;
-
-        // write track length in bytes.
-        // Literal numeric values (24,16,8) indicate shift offset in bits
-        // 0xFF is used to mask out everything but the lowest byte.
-        aOut.write((trackLength >> 24) & 0xFF);
-        aOut.write((trackLength >> 16) & 0xFF);
-        aOut.write((trackLength >> 8) & 0xFF);
-        aOut.write(trackLength & 0xFF);
-
-        // TRACK HEADER
-
-        // write tempo change at beginning
-        aOut.write(TRACK_HEADER_TEMPO_CHANGE);
-
-        // calculate tempo in microseconds per quarter note
-        int mpqn = MINUTE_AS_MICROSECONDS / iTempo;
-
-        // write tempo value
-        // Literal numeric values (16,8) indicate shift offset in bits
-        // 0xFF is used to mask out everything but the lowest byte.
-        aOut.write((mpqn >> 16) & 0xFF);
-        aOut.write((mpqn >> 8) & 0xFF);
-        aOut.write(mpqn & 0xFF);
-
-        // change program at beginning (at delta time 0)
-        writeVarLen(aOut, 0);
-        aOut.write((byte)(MidiToneConstants.MIDI_PROGRAM_CHANGE | iChannel));
-        aOut.write(iInstrument);   // instrument number
-    }
-
-    /**
-     * Write midi trailer
-     * @param aOut output stream
-     */
-    private void writeTrailer(ByteArrayOutputStream aOut) throws IOException
-    {
-        aOut.write(TRACK_TRAILER);
-    }
-
-    /**
-     * Return duration accumulated so far.
-     * @return long duration in microseconds
-     */
-    public long getCumulativeDuration()
-    {
-        // duration * seconds in minute * microseconds in second /
-        // (resolution * tempo)
-        long duration = (long)iDuration * 60 * 1000000 / (iResolution  * iTempo);
-        return duration;
-    }
-
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiSequenceException.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Exception class for internal use
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-/**
- * Exception class for internal use
- */
-public class MidiSequenceException extends Exception
-{
-
-} // end of class
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/MidiToneConstants.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Midi and tone related constants
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-/**
- * MIDI and tone related common constants
- */
-public class MidiToneConstants
-{
-    // Fully qualified name for ToneControl
-    public static final String TONE_CONTROL_FULL_NAME =
-        "javax.microedition.media.control.ToneControl";
-
-    // Fully qualified name for MIDIControl
-    public static final String MIDI_CONTROL_FULL_NAME =
-        "javax.microedition.media.control.MIDIControl";
-
-    // MIDI constants
-
-    // Note on message ID
-    public static final byte MIDI_NOTE_ON = (byte)0x90;
-
-    // Note off message ID
-    public static final byte MIDI_NOTE_OFF = (byte)0x80;
-
-    // Control change message ID
-    public static final byte MIDI_CONTROL_CHANGE = (byte)0xB0;
-
-    // Program change message ID
-    public static final byte MIDI_PROGRAM_CHANGE = (byte)0xC0;
-
-    // MIDI Main volume control ID for control change message
-    public static final byte MIDI_CONTROL_MAIN_VOLUME = 0x07;
-
-    // MIDI velocity for tone notes
-    public static final byte MIDI_MAX_VELOCITY = 127;
-    public static final byte MIDI_MIN_VELOCITY = 0;
-
-    // Maximum and minimum MIDI volume values
-    public static final byte MIDI_MAX_VOLUME = 127;
-    public static final byte MIDI_MIN_VOLUME = 0;
-
-    // Maximum and minimum MIDI volume values
-    public static final byte MIDI_MAX_TONE = 127;
-    public static final byte MIDI_MIN_TONE = 0;
-
-    // MIDI instrument used to play tone events
-    public static final byte MIDI_TONE_INSTRUMENT = 39;
-
-    // MIDI bank for instrument used to play tone events
-    public static final byte MIDI_TONE_BANK = -1;
-
-    // MIDI channel used to play tone events
-    public static final byte MIDI_TONE_CHANNEL = 0;
-
-    // Tone MidiToneConstants
-
-    // Maximum and minimum tone volume values
-    public static final byte TONE_MAX_VOLUME = 100;
-    public static final byte TONE_MIN_VOLUME = 0;
-
-    // Maximum and minimum tone note values
-    public static final byte TONE_MAX_NOTE = 127;
-    public static final byte TONE_MIN_NOTE = 0;
-
-    // Maximum and minimum block number values
-    public static final byte TONE_MAX_BLOCK = 127;
-    public static final byte TONE_MIN_BLOCK = 0;
-
-    /* Minimum and maximum values for note duration */
-    public static final int TONE_SEQUENCE_NOTE_MAX_DURATION = 127;
-    public static final int TONE_SEQUENCE_NOTE_MIN_DURATION = 1;
-
-    /* Minimun tone sequence length */
-    public static final int TONE_SEQUENCE_MIN_LENGTH = 4;
-
-    /* Supported tone version number */
-    public static final int TONE_SEQUENCE_SUPPORTED_VERSION = 1;
-
-    /* Minimum and maximum tone tempo values */
-    public static final int TONE_TEMPO_MIN = 5;
-    public static final int TONE_TEMPO_MAX = 127;
-
-    /* Minimum and maximum tone resolution values */
-    public static final int TONE_RESOLUTION_MIN = 1;
-    public static final int TONE_RESOLUTION_MAX = 127;
-
-
-} // end of class
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/PlayBlockEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence PLAY_BLOCK events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Processor for play block events
- */
-public class PlayBlockEvent extends Event
-{
-
-    // CONSTANTS
-
-    /* Maximum and minimum values for block number */
-    public static final int PLAY_BLOCK_MAX_VALUE = 127;
-    public static final int PLAY_BLOCK_MIN_VALUE = 0;
-
-    PlayBlockEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    /**
-     * Inherited from Event
-     */
-    public int advance(int aPosition)
-    {
-        int retVal = doValidate(aPosition);
-        if (retVal != 0)
-        {
-            // Push the position to stack that is going to be
-            // played after this play block has completed
-            iReturnPositionStack.push(new Integer(aPosition + EVENT_SIZE));
-
-            int data = iSequence[ aPosition + 1 ];
-            retVal = findBlock(data) - aPosition;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        // it is already checked that there is at least two bytes left
-        int type = iSequence[ aPosition ];
-        int data = iSequence[ aPosition + 1 ];
-        int retVal = 0;
-
-        if (type == ToneControl.PLAY_BLOCK)
-        {
-            if (data < PLAY_BLOCK_MIN_VALUE ||
-                    data > PLAY_BLOCK_MAX_VALUE)
-            {
-                throw new IllegalArgumentException(
-                    "Block number out of range");
-            }
-            findBlock(data);   // for check only
-            retVal = EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Find block
-     * @param block number
-     * @return position of corresponding BLOCK_START event
-     * @exception IllegalArgumentException if block is not found
-     */
-    private int findBlock(int aBlockNumber)
-    {
-        for (int i = 0; i < iSequence.length; i += EVENT_SIZE)
-        {
-            if (iSequence[ i ] == ToneControl.BLOCK_START &&
-                    iSequence[ i + 1 ] == aBlockNumber)
-            {
-                return i;
-            }
-        }
-        // if block is not found, input is illegal
-        throw new IllegalArgumentException("No block found, sequence is corrupted");
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, BlockEnd PlayBlock, Volume, Repeat or end of sequence
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            return; // end of sequence is OK
-        }
-
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.BLOCK_END ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-        throw new IllegalArgumentException("Illegal event found, sequence is corrupted");
-    }
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/PlayToneImpl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Manager.playTone implementation
-*
-*/
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.Manager;
-import javax.microedition.media.Player;
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.control.ToneControl;
-import javax.microedition.media.MediaException;
-import java.io.IOException;
-import java.io.ByteArrayInputStream;
-import java.util.Vector;
-
-/**
- * Manager.playTone implementation
- *
- */
-public class PlayToneImpl implements PlayerListener
-{
-
-    // MEMBERS
-    private static final String TONE_SEQUENCE_CONTENT_TYPE = "audio/x-tone-seq";
-    private static final int TONE_SEQUENCE_VERSION = 1;
-    private static final int TONE_SEQUENCE_RESOLUTION = 64;
-    private static final int TONE_SEQUENCE_TEMPO = 30;
-    private static final int DURATION_DIVIDE = 240000;
-    private static final String CANNOT_PLAY_TONE = "Cannot play tone";
-
-    // Holds tone players
-    private Vector iPlayers = new Vector();
-
-    /**
-     * Constructor
-     */
-    public PlayToneImpl()
-    {
-    }
-
-    /**
-     * Play tone.
-     * @see javax.microedition.media.Manager.playTone()
-     */
-    synchronized public void playTone(int aNote, int aDuration, int aVolume)
-    throws MediaException
-    {
-        if (aVolume < MidiToneConstants.TONE_MIN_VOLUME)
-        {
-            aVolume = MidiToneConstants.TONE_MIN_VOLUME;
-        }
-        else if (aVolume > MidiToneConstants.TONE_MAX_VOLUME)
-        {
-            aVolume = MidiToneConstants.TONE_MAX_VOLUME;
-        }
-
-        if (aNote > MidiToneConstants.TONE_MAX_NOTE ||
-                aNote < MidiToneConstants.TONE_MIN_NOTE)
-        {
-            throw new IllegalArgumentException("Note is out of range, " +
-                                               "valid range is 0 <= Note <= 127");
-        }
-
-        if (aDuration <= 0)
-        {
-            throw new IllegalArgumentException("Duration must be positive");
-        }
-
-        int duration = aDuration * TONE_SEQUENCE_RESOLUTION *
-                       TONE_SEQUENCE_TEMPO / DURATION_DIVIDE;
-
-        if (duration < MidiToneConstants.TONE_SEQUENCE_NOTE_MIN_DURATION)
-        {
-            duration = MidiToneConstants.TONE_SEQUENCE_NOTE_MIN_DURATION;
-        }
-        else if (duration > MidiToneConstants.TONE_SEQUENCE_NOTE_MAX_DURATION)
-        {
-            duration = MidiToneConstants.TONE_SEQUENCE_NOTE_MAX_DURATION;
-        }
-
-        byte[] sequence =
-        {
-            ToneControl.VERSION, TONE_SEQUENCE_VERSION,
-            ToneControl.TEMPO, TONE_SEQUENCE_TEMPO,
-            ToneControl.RESOLUTION, TONE_SEQUENCE_RESOLUTION,
-            ToneControl.SET_VOLUME, (byte)aVolume,
-            (byte)aNote, (byte)duration
-        };
-
-        Player p = null;
-        try
-        {
-            p = Manager.createPlayer(
-                    new ByteArrayInputStream(sequence),
-                    TONE_SEQUENCE_CONTENT_TYPE);
-        }
-        catch (IOException ioe)
-        {
-            iPlayers.removeElement(p);
-            throw new MediaException(CANNOT_PLAY_TONE + " " + ioe.getMessage());
-        }
-
-        p.addPlayerListener(this);
-        iPlayers.addElement(p);
-        try
-        {
-            p.start();
-        }
-        catch (MediaException me)
-        {
-            iPlayers.removeElement(p);
-            throw me;
-        }
-    }
-
-    /**
-     * @see javax.microedition.media.PlayerListener.playerUpdate()
-     */
-    public void playerUpdate(Player aPlayer, java.lang.String aEvent,
-                             java.lang.Object aEventData)
-    {
-        if ((aEvent == END_OF_MEDIA) || (aEvent == ERROR))
-        {
-            aPlayer.close();
-            iPlayers.removeElement(aPlayer);
-        }
-    }
-}
-
-// End of File
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/RepeatEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence REPEAT events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Event processor class for tone sequence REPEAT events
- */
-public class RepeatEvent extends Event
-{
-
-    // CONSTANTS
-
-    /* Maximum and minimum tone repeat multiplier values */
-    public static final int REPEAT_MIN_MULTIPLIER = 2;
-    public static final int REPEAT_MAX_MULTIPLIER = 127;
-
-    /**
-     * RepeatEvent constructor
-     * @param aSequence tone sequence byte array (input)
-     * @param aMidiSequence midi sequence object where to output midi events.
-     */
-
-    RepeatEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    /**
-     * Inherited from Event
-     */
-    public int advance(int aPosition)
-    throws MidiSequenceException
-    {
-        // it is already checked that there is at least two bytes left
-        byte type = iSequence[ aPosition ];
-        byte data = iSequence[ aPosition + 1 ];
-        int retVal = doValidate(aPosition);
-        if (retVal == 0)
-        {
-            return 0;
-        }
-        for (int i = 0; i < data; i++)
-        {
-            retVal = ToneEvent.staticAdvance(aPosition + EVENT_SIZE,
-                                             iSequence,
-                                             iMidiSequence);
-            // This would go unnoticed if not checked here.
-            if (retVal == 0)
-            {
-                throw new IllegalArgumentException(
-                    "Illegal sequence, processing events for playing failed");
-            }
-            retVal = EVENT_SIZE + EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        byte type = iSequence[ aPosition ];
-        byte data = iSequence[ aPosition + 1 ];
-        int retVal = 0;
-        if (type == ToneControl.REPEAT)
-        {
-            if (data < REPEAT_MIN_MULTIPLIER || data > REPEAT_MAX_MULTIPLIER)
-            {
-                throw new IllegalArgumentException(
-                    "Repeat multiplier out of range, valid range is 2 <= multiplier <= 127");
-            }
-
-            // Check that there is two more bytes available
-            if (iSequence.length - (aPosition + EVENT_SIZE) < EVENT_SIZE)
-            {
-                throw new IllegalArgumentException(
-                    "Illegal ToneControl.REPEAT event, " +
-                    "there should be two more bytes available after REPEAT event");
-            }
-            retVal = EVENT_SIZE + EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, BlockEnd, PlayBlock, Volume, Repeat or
-        // end of sequence
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            return; // end of sequence is ok for this event
-        }
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.BLOCK_END ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-
-        throw new IllegalArgumentException(
-            "Illegal event found; sequence is corrupted");
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/ToneEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence audible note events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Event processor class for tone sequence note events (both audible & silent)
- */
-public class ToneEvent extends Event
-{
-    /**
-     * ToneEvent constructor
-     * @param aSequence tone sequence byte array (input)
-     * @param aMidiSequence midi sequence object where to output midi events.
-     */
-    ToneEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    /**
-     * Inherited from Event
-     */
-    public int advance(int aPosition)
-    throws MidiSequenceException
-    {
-        return staticAdvance(aPosition, iSequence, iMidiSequence);
-    }
-
-    /**
-     * Static version of advance( ) to be used by RepeatEvent
-     */
-    public static int staticAdvance(int aPosition,
-                                    byte[] aToneSequence,
-                                    MidiSequence aMidiSequence)
-    throws MidiSequenceException
-    {
-        int retVal = doStaticValidate(aPosition, aToneSequence);
-        if (retVal == 0)
-        {
-            return 0;
-        }
-        // it is already checked that there is at least two bytes left
-        byte type = aToneSequence[ aPosition ];
-        byte data = aToneSequence[ aPosition + 1 ];
-
-        if (type == ToneControl.SILENCE)
-        {
-            retVal = processToneEvent(type, data, true, aMidiSequence);
-        }
-        else if (type >= MidiToneConstants.TONE_MIN_NOTE &&
-                 type <= MidiToneConstants.TONE_MAX_NOTE)
-        {
-            retVal = processToneEvent(type, data, false, aMidiSequence);
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        return doStaticValidate(aPosition, iSequence);
-    }
-
-    /**
-     * Implementation for doValidate, for static context.
-     * @param aPosition position where to validate
-     * @param aToneSequence sequence which to validate
-     */
-    private static int doStaticValidate(int aPosition, byte[] aToneSequence)
-    {
-        byte type = aToneSequence[ aPosition ];
-        byte data = aToneSequence[ aPosition + 1 ];
-        int retVal = 0;
-
-        if (type >= ToneControl.SILENCE &&
-                type <= MidiToneConstants.TONE_MAX_NOTE)
-        {
-            if (data < MidiToneConstants.TONE_SEQUENCE_NOTE_MIN_DURATION ||
-                    data > MidiToneConstants.TONE_SEQUENCE_NOTE_MAX_DURATION)
-            {
-                throw new IllegalArgumentException(
-                    "Note duration out of range, valid range is 1 <= duration <=127");
-            }
-            retVal = EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Writes tone event into MIDI sequence.
-     * @param aType tone event type
-     * @param aData tone event parameter
-     * @param aSilent whether this event is silent (note value -1) or not.
-     * @param aMidiSequence midi sequence to write midi events to
-     */
-    private static int processToneEvent(
-        byte aType,
-        byte aData,
-        boolean aSilent,
-        MidiSequence aMidiSequence) throws MidiSequenceException
-    {
-        // If this is a silent note, two NOTE_OFFs are written into midi sequence.
-        // otherwise NOTE_ON and NOTE_OFF.
-
-        byte firstMidiEventType = MidiToneConstants.MIDI_NOTE_ON;
-        if (aSilent)
-        {
-            firstMidiEventType = MidiToneConstants.MIDI_NOTE_OFF;
-        }
-
-        // write 'note on' on delta time 0
-        aMidiSequence.writeMidiEvent(0,
-                                     firstMidiEventType,
-                                     aType,
-                                     MidiToneConstants.MIDI_MAX_VELOCITY);
-        // write 'note off' after delta time represented by  'data' variable
-        aMidiSequence.writeMidiEvent(aData,
-                                     MidiToneConstants.MIDI_NOTE_OFF,
-                                     aType,
-                                     MidiToneConstants.MIDI_MAX_VELOCITY);
-
-        // N.B.! Above MIDI_NOTE_ON and MIDI_NOTE_OFF can be written without channel
-        // value because MidiSequence attached correct channel value to them anyway.
-        return EVENT_SIZE;
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, BlockEnd, PlayBlock, Volume, Repeat or
-        // end of sequence
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            return; // end of sequence is ok for this event
-        }
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.BLOCK_END ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-
-        throw new IllegalArgumentException(
-            "Illegal event found; sequence is corrupted");
-    }
-
-} // end of class
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/TonePlayer.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,509 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.PlayerListener;
-import javax.microedition.media.MediaException;
-import javax.microedition.media.control.ToneControl;
-import javax.microedition.media.protocol.DataSource;
-import javax.microedition.media.protocol.SourceStream;
-import javax.microedition.media.Manager;
-import javax.microedition.media.Player;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import com.nokia.microedition.media.PlayerBase;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.tone.ToneSequence;
-import com.nokia.microedition.media.control.MIDIControl;
-import com.nokia.microedition.media.PlayerListenerImpl;
-import java.util.Vector;
-import com.nokia.mj.impl.utils.Logger;
-
-
-/**
- * Player that is created with Manager.TONE_DEVICE_LOCATOR locator or
- * with jts content.
- */
-public class TonePlayer extends PlayerBase implements ToneControl, PlayerListener
-{
-    // This is allways tone's content type
-    public static final String TONE_CONTENT_TYPE =
-        "audio/x-tone-seq";
-
-    private static final String TONE_LOCATOR_SUFFIX = ".jts";
-
-    // MIDI player used to play tone
-    private InternalPlayer iMidiPlayer;
-
-    // Internal MIDI player listener
-    private PlayerListenerImpl iPlayerListenerImpl;
-
-    // MIDI control used to reset native midi engine.
-    private MIDIControl iMIDIControl;
-
-    // Tone sequence processed to midi sequence
-    private byte[] iMidiSequence;
-
-    // Tone sequence duration
-    private long iDuration;
-
-    // Granularity for tone sequence reader
-    private static final int SEQUENCE_READ_GRANULARITY = 1024; // 1 KB
-
-    // Empty midi sequence for midi player initialization
-    private static final byte[] EMPTY_MIDI_SEQUENCE =
-    {
-        0x4D,0x54,0x68,0x64,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x10,
-        0x4D,0x54,0x72,0x6B,0x00,0x00,0x00,0x12,0x00,(byte)0xFF,0x51,0x03,
-        0x07,(byte)0xA1,0x20,0x00,(byte)0xC0,0x01,0x00,(byte)0x80,0x40,
-        0x7F,0x00,(byte)0xFF,0x2F,0x00
-    };
-
-    private static final String[] TONE_FORBIDDEN_CONTROLS =
-        { "javax.microedition.media.control.MetaDataControl" };
-
-    // For checking whether a control is allowed for tone player
-    static final String CONTROL_DEFAULT_PACKAGE =
-        "javax.microedition.media.control.";
-
-    /**
-     * Create player without content.
-     */
-    public TonePlayer() throws MediaException
-    {
-        initializeMidi();
-    }
-
-
-    /**
-     * Create player from DataSource.
-     * @param aDataSource DataSource with audio/x-tone-seq content.
-     */
-    public TonePlayer(DataSource aDataSource) throws MediaException
-    {
-        initializeMidi();
-
-        // Read .JTS file data from data source
-        SourceStream input = (aDataSource.getStreams())[ 0 ];
-        byte[] sequenceTemp = new byte[ SEQUENCE_READ_GRANULARITY ];
-        ByteArrayOutputStream sequenceStream =
-            new ByteArrayOutputStream(SEQUENCE_READ_GRANULARITY);
-        byte[] sequence = null; // container for read tone sequence
-        int readCount = 0;
-
-        // Read data in SEQUENCE_READ_GRANULARITY sized blocks
-        try
-        {
-            while (readCount >= 0)
-            {
-                readCount = input.read(sequenceTemp, 0, SEQUENCE_READ_GRANULARITY);
-                if (readCount > 0)
-                {
-                    sequenceStream.write(sequenceTemp, 0, readCount);
-                }
-            }
-            sequenceStream.flush();
-            sequence = sequenceStream.toByteArray();
-            sequenceStream.close();
-        }
-        catch (IOException ioe)
-        {
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA::TonePlayer: TonePlayer( DataSource ): " + ioe.toString());
-            throw new IllegalArgumentException();
-        }
-
-        setSequence(sequence);
-    }
-
-
-    /**
-     * Private method for initializing internal midi player
-     */
-    private void initializeMidi() throws MediaException
-    {
-        // Create concrete PlayerListenerImpl for listeners of
-        // this TonePlayer
-        iPlayerListenerImpl = new PlayerListenerImpl(this);
-        iMidiSequence = EMPTY_MIDI_SEQUENCE;
-
-        try
-        {
-            ByteArrayInputStream in = new ByteArrayInputStream(iMidiSequence);
-            iMidiPlayer = (InternalPlayer)Manager.createPlayer(in, "audio/midi");
-        }
-        catch (IOException ioe)
-        {
-            throw new IllegalStateException();
-        }
-
-        // we only have controls from MIDI player this far, so ToneControl
-        // must be added.
-
-        addControl(this, MidiToneConstants.TONE_CONTROL_FULL_NAME);
-
-        // register this TonePlayer as MIDI player listener
-        iMidiPlayer.addPlayerListener(this);
-    }
-
-
-    /**
-     * @see ToneControl
-     */
-    public void setSequence(byte[] aSequence)
-    {
-        // player must not be prefetched or started
-        int state = getState();
-        if (state == javax.microedition.media.Player.PREFETCHED)
-        {
-            throw new IllegalStateException("Player is PREFETCHED");
-        }
-        if (state == javax.microedition.media.Player.STARTED)
-        {
-            throw new IllegalStateException("Player is STARTED");
-        }
-
-        try
-        {
-            // process tone sequence into midi sequence
-            ToneSequence tone = new ToneSequence(aSequence);
-            tone.process();
-            iMidiSequence = tone.getByteArray();
-            iDuration = tone.getDuration();
-        }
-        catch (Exception e)
-        {
-            Logger.ELOG(Logger.EJavaMMAPI,
-                        "MMA: TonePlayer: setSequence: !! Exception: " + e);
-            throw new IllegalArgumentException("Illegal sequence");
-        }
-    }
-
-
-    /**
-     * Adds control to the player.
-     * @param aControl Player's control
-     * @param aControlName Identifies the control. Name must contain
-     *                     full package information
-     */
-    public void addControl(javax.microedition.media.Control aControl,
-                           String aControlName) throws MediaException
-    {
-        iMidiPlayer.addControl(aControl, aControlName);
-    }
-
-
-    /**
-     * interface Controllable
-     * Return controls
-     * @return list of controls
-     * @see Controllable
-     */
-    public javax.microedition.media.Control[] getControls()
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        // Get all controls but discard forbidden ones
-        javax.microedition.media.Control[] allControls =
-            iMidiPlayer.getControls();
-        javax.microedition.media.Control[] controls = null;
-
-        Vector controlVector = new Vector(allControls.length);
-
-        for (int i = 0; i < allControls.length; i++)
-        {
-            // Add only allowed controls to control vector
-            if (isAllowedControl(allControls[ i ].getClass()))
-            {
-                controlVector.addElement(allControls[ i ]);
-            }
-
-            controls =
-                new javax.microedition.media.Control[ controlVector.size()];
-
-            controlVector.copyInto(controls);
-        }
-        return controls;
-    }
-
-
-    /**
-     * interface Controllable
-     * get control by content type
-     * @param aControlType content type of wanted control
-     * @return control
-     * @see Controllable
-     * @see Control
-     */
-    public javax.microedition.media.Control getControl(String aControlType)
-    {
-        closeCheck();
-        unrealizedCheck();
-
-        if (aControlType == null)
-        {
-            throw new IllegalArgumentException("argument was null");
-        }
-
-        // If not fully qualified name, then supply default package
-        String controlType = null;
-        if (aControlType.indexOf(".") == -1)
-        {
-            controlType = CONTROL_DEFAULT_PACKAGE + aControlType;
-        }
-        else
-        {
-            controlType = aControlType;
-        }
-
-        Class controlClass = null;
-        try
-        {
-            controlClass = Class.forName(controlType);
-        }
-        catch (ClassNotFoundException cnfe)
-        {
-            return null;
-        }
-
-        if (isAllowedControl(controlClass))
-        {
-            return iMidiPlayer.getControl(controlType);
-        }
-        else
-        {
-            return null;
-        }
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void addPlayerListener(PlayerListener aPlayerListener)
-    {
-        closeCheck();
-        iPlayerListenerImpl.addPlayerListener(aPlayerListener);
-    }
-
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public void removePlayerListener(PlayerListener aPlayerListener)
-    {
-        closeCheck();
-        iPlayerListenerImpl.removePlayerListener(aPlayerListener);
-    }
-
-
-    /**
-     * From Player
-     * @see Player
-     */
-    public int getState()
-    {
-        return iMidiPlayer.getState();
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doRealize() throws MediaException
-    {
-        iMidiPlayer.realize();
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doPrefetch() throws MediaException
-    {
-
-        // we get javax.microedition control which is cast to com.nokia control
-        iMIDIControl = (MIDIControl)
-                       iMidiPlayer.getControl(MidiToneConstants.MIDI_CONTROL_FULL_NAME);
-
-        // reinitialize midi engine with the sequence currently
-        // in iMidiSequence
-
-        iMIDIControl.reInitializeMidi(
-            iMidiSequence, 0, iMidiSequence.length);
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doDeallocate()
-    {
-        iMidiPlayer.deallocate();
-    }
-
-
-    /**
-     * From Player.
-     * @see Player
-     */
-    public void start() throws MediaException
-    {
-        prefetch();
-        iMidiPlayer.start();
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doStop() throws MediaException
-    {
-        iMidiPlayer.stop();
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public void doClose()
-    {
-        iDuration = 0;
-        iMidiPlayer.close();
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public void setLoopCount(int aCount)
-    {
-        iMidiPlayer.setLoopCount(aCount);
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public long getDuration()
-    {
-        closeCheck();
-
-        int state = iMidiPlayer.getState();
-
-        // Return TIME_UNKNOWN if player is realized and a midi
-        // sequence has been explicitely set.
-        if (state == Player.REALIZED &&
-                !(iMidiSequence.equals(EMPTY_MIDI_SEQUENCE)))
-        {
-            iDuration = Player.TIME_UNKNOWN;
-        }
-        else if (state == Player.PREFETCHED ||
-                 state == Player.STARTED)
-        {
-            iDuration = iMidiPlayer.getDuration();
-        }
-        return iDuration;
-    }
-
-
-    /**
-     * From PlayerBase
-     * @see PlayerBase
-     */
-    public long setMediaTime(long aNow) throws MediaException
-    {
-        return iMidiPlayer.setMediaTime(aNow);
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public long getMediaTime()
-    {
-        closeCheck();
-        return iMidiPlayer.getMediaTime();
-    }
-
-
-    /**
-     * interface Player
-     * @see Player
-     */
-    public String getContentType()
-    {
-        closeCheck();
-        unrealizedCheck();
-        return TONE_CONTENT_TYPE;
-    }
-
-    /**
-     * from PlayerListener
-     * @see PlayerListener
-     */
-    public void playerUpdate(Player player,
-                             java.lang.String event,
-                             java.lang.Object eventData)
-    {
-        iPlayerListenerImpl.postEvent(event, eventData);
-    }
-
-    /**
-     * Check whether a control is allowed for tone player.
-     * @param aControl instance of control to check
-     * @return boolean allowed or not
-     */
-    private boolean isAllowedControl(Class aControlClass)
-    {
-        for (int i = 0; i < TONE_FORBIDDEN_CONTROLS.length; i++)
-        {
-            Class forbidden = null;
-            try
-            {
-                forbidden = Class.forName(TONE_FORBIDDEN_CONTROLS[ i ]);
-            }
-            catch (ClassNotFoundException cnfe)
-            {
-                // This should never happen
-                throw new Error("Control class not found");
-            }
-
-            if (forbidden.isAssignableFrom(aControlClass))
-            {
-                // Not allowed
-                return false;
-            }
-        }
-        // else
-        return true;
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/ToneSequence.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class represents tone sequence for tone to midi conversion
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Stack;
-import com.nokia.mj.impl.utils.Logger;
-
-
-/**
- * This class represents tone sequence for tone to midi conversion
- */
-public class ToneSequence
-{
-    // MEMBER DATA
-
-    /* Hold original tone sequence bytes */
-    private byte[] iToneSequence;
-
-    /* Holds the new tone sequence converted to MIDI */
-    private MidiSequence iMidiSequence;
-
-    /* Event list used to hold tone event processors */
-    private EventList iEventList;
-
-    ToneSequence(byte[] aSequence)
-    {
-        iToneSequence = aSequence;
-        iMidiSequence = new MidiSequence(MidiToneConstants.MIDI_TONE_CHANNEL,
-                                         MidiToneConstants.MIDI_TONE_INSTRUMENT);
-        iEventList = new EventList(iToneSequence, iMidiSequence);
-    }
-
-    public void process()
-    {
-        // Reset static base class variables of events before processing.
-        iEventList.reset();
-
-        // Check input; tone sequence must be even length
-        // ie. multiple of event size
-        if ((iToneSequence.length % Event.EVENT_SIZE) != 0)
-        {
-            throw new IllegalArgumentException(
-                "Illegal sequence, tone sequence must be multiple of single tone event size (2)");
-        }
-
-        // Validate header bytes
-
-        // Next check that have correct VERSION and possibly
-        // VERSION and RESOLUTION.
-        int checkPos = 0;
-
-        // First two bytes must belong to VERSION
-        if (iToneSequence[ checkPos ] != ToneControl.VERSION ||
-                iToneSequence[ checkPos + 1 ] !=
-                MidiToneConstants.TONE_SEQUENCE_SUPPORTED_VERSION)
-        {
-            throw new IllegalArgumentException(
-                "Illegal sequence, first two bytes must belong to version");
-        }
-
-        // Next two may be TEMPO or RESOLUTION
-        checkPos += Event.EVENT_SIZE;
-
-        if (iToneSequence[ checkPos ] == ToneControl.TEMPO)
-        {
-            iMidiSequence.setTempo(iToneSequence[ checkPos + 1 ]);
-            checkPos += Event.EVENT_SIZE;
-        }
-
-        // Continue checking RESOLUTION
-        if (iToneSequence[ checkPos ] == ToneControl.RESOLUTION)
-        {
-            iMidiSequence.setResolution(iToneSequence[ checkPos + 1 ]);
-            checkPos += Event.EVENT_SIZE;
-        }
-
-        // Validate rest of the sequence
-
-        int count = 0; // Offset to new position in tone sequence. >= 0
-        while (checkPos < iToneSequence.length)
-        {
-            count = iEventList.validate(checkPos);
-            checkPos += count;
-            if (count == 0)
-            {
-                // if end of tone sequence is reached, zero is
-                // OK. Otherwise this indicates error
-                if (checkPos != iToneSequence.length)
-                {
-                    throw new IllegalArgumentException(
-                        "Validation failed, sequence corrupted");
-                }
-                break;
-            }
-        }
-
-        // Find start of sequence
-        int position = 0; // current position on tone sequence
-
-        for (int i = iToneSequence.length - Event.EVENT_SIZE;
-                i >= 0;
-                i -= Event.EVENT_SIZE)
-        {
-            // There cannot be any lower value command bytes in tone sequence
-            // than REPEAT
-            if (iToneSequence[ i ] < ToneControl.REPEAT)
-            {
-                throw new IllegalArgumentException(
-                    "Illegal sequence, lower value command than ToneControl.REPEAT found");
-            }
-
-            if (iToneSequence[ i ] < ToneControl.SILENCE &&
-                    iToneSequence[ i ] != ToneControl.PLAY_BLOCK &&
-                    iToneSequence[ i ] != ToneControl.SET_VOLUME &&
-                    iToneSequence[ i ] != ToneControl.REPEAT)
-            {
-                position = i + Event.EVENT_SIZE;
-                // stop the for loop
-                break;
-            }
-        }
-
-        // No start position found
-        if (position < Event.EVENT_SIZE)
-        {
-            throw new IllegalArgumentException(
-                "Illegal sequence, no start position found");
-        }
-
-        count = 0; // offset to new position in tone sequence. +/-
-        try
-        {
-            while (position > 0 && position < iToneSequence.length)
-            {
-                count = iEventList.advance(position);
-                position += count;
-                if (count == 0)
-                {
-                    // if end of tone sequence is reached, zero is
-                    // OK. Otherwise this indicates error
-                    if (position != iToneSequence.length)
-                    {
-                        throw new IllegalArgumentException(
-                            "Validation failed, sequence corrupted");
-                    }
-                    break;
-                }
-            }
-        }
-        catch (MidiSequenceException mse)
-        {
-            // This exception indicates that we have reached the maximum
-            // midi sequence length and thus must stop processing. Currently
-            // processed midi sequence is however available by getStream.
-            // So no action is needed here.
-            Logger.WLOG(Logger.EJavaMMAPI,
-                        "MMA: ToneSequence: MIDI maximum lenght reached.");
-        }
-    }
-
-    public ByteArrayInputStream getStream() throws IOException
-    {
-        return iMidiSequence.getStream();
-    }
-
-    public byte[] getByteArray() throws IOException
-    {
-        return iMidiSequence.getByteArray();
-    }
-
-    /**
-     * Get duration of tone sequence
-     */
-    public long getDuration()
-    {
-        return iMidiSequence.getCumulativeDuration();
-    }
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/tone/VolumeEvent.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Event processor class for tone sequence VOLUME events
-*
-*/
-
-
-package com.nokia.microedition.media.tone;
-
-import javax.microedition.media.control.ToneControl;
-
-/**
- * Event processor class for tone sequence VOLUME events
- */
-public class VolumeEvent extends Event
-{
-    /**
-     * ToneEvent constructor
-     * @param aSequence tone sequence byte array (input)
-     * @param aMidiSequence midi sequence object where to output midi events.
-     */
-    VolumeEvent(byte[] aSequence, MidiSequence aMidiSequence)
-    {
-        super(aSequence, aMidiSequence);
-    }
-
-    /**
-     * Inherited from Event
-     */
-    public int advance(int aPosition) throws MidiSequenceException
-    {
-        int retVal = doValidate(aPosition);
-        {
-            if (retVal == 0)
-            {
-                return 0;
-            }
-        }
-        // it is already checked that there is at least two bytes left
-        byte type = iSequence[ aPosition ];
-        byte data = iSequence[ aPosition + 1 ];
-
-        // calculate equivalent midi TONE_VOLUME
-        float vol = (float)MidiToneConstants.MIDI_MAX_VOLUME /
-                    (float)MidiToneConstants.TONE_MAX_VOLUME * (float)data;
-
-        byte volume = (byte) vol;
-        if (volume < MidiToneConstants.MIDI_MIN_VOLUME)
-        {
-            volume = MidiToneConstants.MIDI_MIN_VOLUME;
-        }
-
-        if (volume > MidiToneConstants.MIDI_MAX_VOLUME)
-        {
-            volume = MidiToneConstants.MIDI_MAX_VOLUME;
-        }
-        // write TONE_VOLUME change on delta time 0
-        iMidiSequence.writeMidiEvent(
-            0,
-            MidiToneConstants.MIDI_CONTROL_CHANGE,
-            MidiToneConstants.MIDI_CONTROL_MAIN_VOLUME,
-            volume);
-
-        // N.B.! Above MIDI_CONTROL_CHANGE can be written without channel
-        // value because MidiSequence will attach correct channel value to them anyway.
-        return EVENT_SIZE;
-    }
-
-    /**
-     * Child class defined functionality for validate
-     * @param aPosition position in tone sequence array where to validate
-     * @return new position offset related to aPosition in tone sequence
-     * array. Must be positive.
-     */
-    protected int doValidate(int aPosition)
-    throws IllegalArgumentException
-    {
-        byte type = iSequence[ aPosition ];
-        byte data = iSequence[ aPosition + 1 ];
-        int retVal = 0;
-        if (type == ToneControl.SET_VOLUME)
-        {
-            if (data < MidiToneConstants.TONE_MIN_VOLUME  ||
-                    data > MidiToneConstants.TONE_MAX_VOLUME)
-            {
-                throw new IllegalArgumentException(
-                    "Volume is out of range, valid range is  0 <= volume <= 100");
-            }
-            retVal = EVENT_SIZE;
-        }
-        return retVal;
-    }
-
-    /**
-     * Child class defined functionality for checkEventAtNextPosition
-     * @param aPosition position in tone sequence array where to check
-     */
-    protected void checkEventAtNextPosition(int aPosition)
-    throws IllegalArgumentException
-    {
-        // After this event there can be:
-        // Tone, BlockEnd, PlayBlock, Volume, Repeat or
-        // end of sequence
-
-        int type = 0;
-        try
-        {
-            type = iSequence[ aPosition ];
-        }
-        catch (ArrayIndexOutOfBoundsException aioobe)
-        {
-            return; // end of sequence is ok for this event
-        }
-
-        if (type >= ToneControl.SILENCE ||
-                type == ToneControl.BLOCK_END ||
-                type == ToneControl.PLAY_BLOCK ||
-                type == ToneControl.SET_VOLUME ||
-                type == ToneControl.REPEAT)
-        {
-            return;
-        }
-        throw new IllegalArgumentException(
-            "Illegal event found; sequence is corrupted");
-    }
-
-} // end of class
-
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/media/PlayerPermission.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
- *
-*/
-
-
-package com.nokia.mj.impl.media;
-
-import java.security.Permission;
-import java.security.PermissionCollection;
-import com.nokia.mj.impl.security.common.PermissionBase;
-import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
-
-public class PlayerPermission extends PermissionBase
-{
-    String iAction;
-
-    public PlayerPermission(String aUri, String aAction)
-    {
-        super(aUri);
-        iAction = aAction ;
-    }
-
-    /**
-     * Returns the question (as localized text) associated with the security
-     * prompt
-     *
-     * @return the localized text associated with the security prompt
-     */
-    public String getSecurityPromptQuestion(int aInteractionMode)
-    {
-        return (SecurityPromptMessage.getInstance()).getText(
-                   SecurityPromptMessage.QUESTION_ID_AUDIO_VIDEO_RECORDING,
-                   null);
-    }
-
-
-    public String toString()
-    {
-        if (iAction.compareTo("record") == 0)
-        {
-            return "javax.microedition.media.control.RecordControl";
-        }
-        else if (iAction.compareTo("snapshot") == 0)
-        {
-            return "javax.microedition.media.control.VideoControl.getSnapshot";
-        }
-        return "";
-    }
-
-    public boolean implies(Permission p)
-    {
-        if (p instanceof PlayerPermission)
-        {
-            PlayerPermission per = (PlayerPermission)p;
-            return matchActions(iAction, per.iAction);
-        }
-        return false;
-    }
-
-    public boolean equals(Object obj)
-    {
-        return true;
-    }
-
-    public int hashCode()
-    {
-        return 0;
-    }
-
-    public String getActions()
-    {
-        return iAction;
-    }
-
-    public PermissionCollection newPermissionCollection()
-    {
-        return null;
-    }
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/media/RTSPPermission.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
- *
-*/
-
-
-package com.nokia.mj.impl.media;
-
-import java.security.Permission;
-import java.security.PermissionCollection;
-import com.nokia.mj.impl.security.common.PermissionBase;
-import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
-
-public class RTSPPermission extends PermissionBase
-{
-    public RTSPPermission(String aUri)
-    {
-        super(aUri);
-    }
-
-    /**
-     * Returns the question (as localized text) associated with the security
-     * prompt
-     *
-     * @return the localized text associated with the security prompt
-     */
-    public String getSecurityPromptQuestion(int aInteractionMode)
-    {
-        return (SecurityPromptMessage.getInstance()).getText(
-                   SecurityPromptMessage.QUESTION_ID_NETWORK_USAGE,
-                   null);
-    }
-
-
-    public String toString()
-    {
-        return "javax.microedition.io.Connector.rtsp";
-    }
-
-    public boolean implies(Permission p)
-    {
-        if (p instanceof RTSPPermission)
-        {
-            return true;
-        }
-        return false;
-    }
-
-    public boolean equals(Object obj)
-    {
-        return true;
-    }
-
-    public int hashCode()
-    {
-        return 0;
-    }
-
-    public String getActions()
-    {
-        return "";
-    }
-
-    public PermissionCollection newPermissionCollection()
-    {
-        return null;
-    }
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/mj/impl/properties/mobilemedia/DynamicPropertyHandler.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.properties.mobilemedia;
-
-import com.nokia.mj.impl.rt.support.SystemPropertyProvider;
-import javax.microedition.media.Manager;
-
-/**
- * A class for handling dynamic system properties of MobileMedia API.
- */
-public class DynamicPropertyHandler implements SystemPropertyProvider
-{
-
-    /*
-     * Constants for identifying the asked property.
-     */
-    private static String AUDIO_ENCODINGS = "audio.encodings";
-    private static String SUPPORTS_VIDEO_CAPTURE = "supports.video.capture";
-    private static String VIDEO_ENCODINGS = "video.encodings";
-
-    // start of the audio content types
-    private static final String AUDIO = "audio";
-
-    // special audio encoding strings which are defined in the JSR
-    private static final String AUDIO_ENCODINGS_JSR =
-        " encoding=pcm encoding=ulaw encoding=gsm";
-
-    // start of the video content types
-    private static final String VIDEO = "video";
-
-
-    /* (non-Javadoc)
-     * @see com.nokia.mj.impl.rt.DynamicProperty#getProperty(com.nokia.mj.impl.rt.DynamicPropertyInfo)
-     */
-    public String getProperty(String propertyName)
-    {
-        String propertyValue = null;
-
-        if (propertyName.equals(AUDIO_ENCODINGS))
-        {
-            propertyValue = getSupportedCaptureEncodings(AUDIO) +
-                            AUDIO_ENCODINGS_JSR;
-        }
-        else if (propertyName.equals(SUPPORTS_VIDEO_CAPTURE))
-        {
-            propertyValue = getSupportedCaptureEncodings(VIDEO);
-            // video capture is supported only if there is supported encodings
-            propertyValue = String.valueOf(propertyValue != null);
-        }
-        else if (propertyName.equals(VIDEO_ENCODINGS))
-        {
-            propertyValue = getSupportedCaptureEncodings(VIDEO);
-        }
-        return propertyValue;
-    }
-
-    public boolean isStatic(String key)
-    {
-        // All property values of MobileMedia API do not change during the
-        // lifetime of the application.
-        return true;
-    }
-
-    // capture protocol
-    private static final String CAPTURE = "capture";
-
-    // encoding for media strings
-    private static final String ENCODING = "encoding=";
-
-    /**
-     * Returns supported capture encodings.
-     * @param aPrefix Capture format type.
-     * @return the supported capture encodings.
-     */
-    private String getSupportedCaptureEncodings(String aPrefix)
-    {
-        // get supported content types from all capture:// protocols
-        String[] cTypes = Manager.getSupportedContentTypes(CAPTURE);
-
-        StringBuffer sBuffer = new StringBuffer();
-
-        // go through all types
-        for (int i = 0; i < cTypes.length; i++)
-        {
-            if (cTypes[ i ].startsWith(aPrefix))
-            {
-                // if video type appent to buffer encoding= + content type
-                sBuffer.append(ENCODING + cTypes[ i ] + " ");
-            }
-        }
-        String encodings = null;
-
-        // if no types was found null must be returned
-        if (sBuffer.length() > 0)
-        {
-            // substring is taken to remove last empty space added in previous
-            // for loop
-            encodings = sBuffer.toString().substring(0,
-                        sBuffer.length() - 1);
-        }
-        return encodings;
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Control.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-public interface Control
-{
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Controllable.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-public interface Controllable
-{
-
-    public Control[] getControls();
-
-    public Control getControl(String aControlType);
-
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Manager.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Please refer JSR 135 for more details. 
-*/
-
-
-package javax.microedition.media;
-
-import java.io.IOException;
-import com.nokia.microedition.media.ManagerImpl;
-import javax.microedition.media.protocol.DataSource;
-import java.io.InputStream;
-
-public final class Manager
-{
-    private static ManagerImpl sInstance;
-
-    static
-    {
-        sInstance = ManagerImpl.getInstance();
-    }
-
-    final public static String TONE_DEVICE_LOCATOR = "device://tone";
-
-    final public static String MIDI_DEVICE_LOCATOR = "device://midi";
-
-
-    private Manager()
-    {
-    }
-
-    public static String[] getSupportedContentTypes(String aProtocol)
-    {
-        return sInstance.getAllSupportedContentTypes(aProtocol);
-    }
-
-    public static String[] getSupportedProtocols(String aContentType)
-    {
-        return sInstance.getAllSupportedProtocols(aContentType);
-    }
-
-    public static Player createPlayer(String aLocator)
-    throws IOException, MediaException
-    {
-        return sInstance.createPlayer(aLocator);
-    }
-
-    public static Player createPlayer(DataSource aSource)
-    throws IOException, MediaException
-    {
-        return sInstance.createInternalPlayer(aSource);
-    }
-
-    public static Player createPlayer(InputStream aStream, String aType)
-    throws IOException, MediaException
-    {
-        return sInstance.createPlayer(aStream, aType);
-    }
-
-    static public void playTone(int aNote, int aDuration, int aVolume)
-    throws MediaException
-    {
-        sInstance.playTone(aNote, aDuration, aVolume);
-    }
-
-    public static TimeBase getSystemTimeBase()
-    {
-        return sInstance.getSystemTimeBase();
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/MediaException.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-public class MediaException extends Exception
-{
-
-    public MediaException()
-    {
-        super();
-    }
-
-    public MediaException(String aReason)
-    {
-        super(aReason);
-    }
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/Player.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-public interface Player extends Controllable
-{
-
-    public static final int UNREALIZED=100;
-    public static final int REALIZED=200;
-    public static final int PREFETCHED=300;
-    public static final int STARTED=400;
-    public static final int CLOSED=0;
-    public static final long TIME_UNKNOWN=-1;
-
-    public void realize() throws MediaException;
-
-    public void prefetch() throws MediaException;
-
-    public void start() throws MediaException;
-
-    public void stop() throws MediaException;
-
-    public void deallocate();
-
-    public void close();
-
-    public long setMediaTime(long aTime) throws MediaException;
-
-    public long getMediaTime();
-
-    public int getState();
-
-    public long getDuration();
-
-    public String getContentType();
-
-    public void setLoopCount(int aCount);
-
-    public void addPlayerListener(PlayerListener aPlayerListener);
-
-    public void removePlayerListener(PlayerListener aPlayerListener);
-
-    /**
-     * The following methods do not belong to the MIDP-NG multimedia subset
-     */
-
-    public void setTimeBase(TimeBase aTimeBase) throws MediaException;
-
-    public TimeBase getTimeBase();
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/PlayerListener.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-public interface PlayerListener
-{
-
-    public static final String STARTED="started";
-    public static final String STOPPED="stopped";
-    public static final String END_OF_MEDIA="endOfMedia";
-    public static final String DURATION_UPDATED="durationUpdated";
-    public static final String DEVICE_UNAVAILABLE="deviceUnavailable";
-    public static final String DEVICE_AVAILABLE="deviceAvailable";
-    public static final String VOLUME_CHANGED="volumeChanged";
-    public static final String ERROR="error";
-    public static final String CLOSED="closed";
-
-
-    /**
-     * The following constants do not belong to the MIDP-NG multimedia subset
-     */
-
-    public static final String STOPPED_AT_TIME="stoppedAtTime";
-    public static final String SIZE_CHANGED="sizeChanged";
-    public static final String RECORD_STARTED="recordStarted";
-    public static final String RECORD_STOPPED="recordStopped";
-    public static final String RECORD_ERROR="recordError";
-    public static final String BUFFERING_STARTED="bufferingStarted";
-    public static final String BUFFERING_STOPPED="bufferingStopped";
-
-    /**
-     * This method belongs to the MIDP-NG multimedia subset
-     */
-
-    public void playerUpdate(Player aPlayer, String aEvent, Object aEventData);
-
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/TimeBase.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2002 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 javax.microedition.media;
-
-/**
- * This class does not belong to the MIDP-NG multimedia subset
- */
-
-public interface TimeBase
-{
-    public long getTime();
-}
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/FramePositioningControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface FramePositioningControl
-            extends javax.microedition.media.Control
-{
-    int seek(int aFrameNumber);
-
-    int skip(int aFramesToSkip);
-
-    long mapFrameToTime(int aFrameNumber);
-
-    int mapTimeToFrame(long aMediaTime);
-}
-
-
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/GUIControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface GUIControl extends javax.microedition.media.Control
-{
-    int USE_GUI_PRIMITIVE = 0;
-
-    Object initDisplayMode(int aMode, Object aArg);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/MIDIControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-import javax.microedition.media.MediaException;
-
-public interface MIDIControl extends javax.microedition.media.Control
-{
-    int NOTE_ON = 0x90;  // 144
-
-    int CONTROL_CHANGE = 0xB0;  // 176
-
-    boolean isBankQuerySupported();
-
-    int[] getProgram(int aChannel)
-    throws MediaException;
-
-    int getChannelVolume(int aChannel);
-
-    void setProgram(int aChannel, int aBank, int aProgram);
-
-    void setChannelVolume(int aChannel, int aVolume);
-
-    int[] getBankList(boolean aCustom)
-    throws MediaException;
-
-    int[] getProgramList(int aBank)
-    throws MediaException;
-
-    String getProgramName(int aBank, int aProg)
-    throws MediaException;
-
-    String getKeyName(int aBank, int aProg, int aKey)
-    throws MediaException;
-
-    void shortMidiEvent(int aType, int aData1, int aData2);
-
-    int longMidiEvent(byte[] aData, int aOffset, int aLength);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/MetaDataControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-package javax.microedition.media.control;
-
-public interface MetaDataControl extends javax.microedition.media.Control
-{
-    String AUTHOR_KEY = "author";
-
-    String COPYRIGHT_KEY = "copyright";
-
-    String DATE_KEY = "date";
-
-    String TITLE_KEY = "title";
-
-    String[] getKeys();
-
-    String getKeyValue(String aKey);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/PitchControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface PitchControl extends javax.microedition.media.Control
-{
-    int setPitch(int aMillisemitones);
-
-    int getPitch();
-
-    int getMaxPitch();
-
-    int getMinPitch();
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/RateControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface RateControl extends javax.microedition.media.Control
-{
-    int setRate(int aMillirate);
-
-    int getRate();
-
-    int getMaxRate();
-
-    int getMinRate();
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/RecordControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-package javax.microedition.media.control;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import javax.microedition.media.MediaException;
-
-public interface RecordControl extends javax.microedition.media.Control
-{
-    void setRecordStream(OutputStream aStream);
-
-    void setRecordLocation(String aLocator)
-    throws IOException, MediaException;
-
-    String getContentType();
-
-    void startRecord();
-
-    void stopRecord();
-
-    void commit() throws IOException;
-
-    int setRecordSizeLimit(int aSize) throws MediaException;
-
-    void reset() throws IOException;
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/StopTimeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface StopTimeControl extends javax.microedition.media.Control
-{
-    long RESET = Long.MAX_VALUE;
-
-    void setStopTime(long aStopTime);
-
-    long getStopTime();
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/TempoControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface TempoControl extends RateControl
-{
-    int setTempo(int aMillitempo);
-
-    int getTempo();
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/ToneControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface ToneControl extends javax.microedition.media.Control
-{
-    byte VERSION = -2;
-
-    byte TEMPO = -3;
-
-    byte RESOLUTION = -4;
-
-    byte BLOCK_START = -5;
-
-    byte BLOCK_END = -6;
-
-    byte PLAY_BLOCK = -7;
-
-    byte SET_VOLUME = -8;
-
-    byte REPEAT = -9;
-
-    byte C4 = 60;
-
-    byte SILENCE = -1;
-
-    void setSequence(byte[] aSequence);
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/VideoControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-import javax.microedition.media.MediaException;
-
-public interface VideoControl extends GUIControl
-{
-    int USE_DIRECT_VIDEO = 1;
-
-    Object initDisplayMode(int aMode, Object aArg);
-
-    void setDisplayLocation(int aX, int aY);
-
-    int getDisplayX();
-
-    int getDisplayY();
-
-    void setVisible(boolean aVisible);
-
-    void setDisplaySize(int aWidth, int aHeight)
-    throws MediaException;
-
-    void setDisplayFullScreen(boolean aFullScreenMode) throws MediaException;
-
-    int getSourceWidth();
-
-    int getSourceHeight();
-
-    int getDisplayWidth();
-
-    int getDisplayHeight();
-
-    byte[] getSnapshot(String aImageType) throws MediaException;
-}
-
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/control/VolumeControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.control;
-
-public interface VolumeControl extends javax.microedition.media.Control
-{
-    void setMute(boolean aMute);
-
-    boolean isMuted();
-
-    int setLevel(int aLevel);
-
-    int getLevel();
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/ContentDescriptor.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.protocol;
-
-public class ContentDescriptor
-{
-    private String iEncoding;
-
-    public ContentDescriptor(String aContentType)
-    {
-        iEncoding = aContentType;
-    }
-
-    public String getContentType()
-    {
-        return iEncoding;
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/DataSource.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.protocol;
-
-import javax.microedition.media.Controllable;
-import java.io.IOException;
-
-abstract public class DataSource implements Controllable
-{
-    private String iSourceLocator;
-
-    public DataSource(String aLocator)
-    {
-        iSourceLocator = aLocator;
-    }
-
-    public abstract String getContentType();
-
-    public abstract void connect() throws IOException;
-
-    public abstract void disconnect();
-
-    public abstract void start() throws IOException;
-
-    public abstract void stop() throws IOException;
-
-    public abstract SourceStream[] getStreams();
-
-    public String getLocator()
-    {
-        return iSourceLocator;
-    }
-}
--- a/javauis/mmapi_qt/baseline/javasrc/javax/microedition/media/protocol/SourceStream.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Please refer JSR 135 for more details.
-*
-*/
-
-
-package javax.microedition.media.protocol;
-
-import java.io.IOException;
-import javax.microedition.media.Controllable;
-
-public interface SourceStream extends Controllable
-{
-    int NOT_SEEKABLE = 0;
-
-    int SEEKABLE_TO_START = 1;
-
-    int RANDOM_ACCESSIBLE = 2;
-
-    ContentDescriptor getContentDescriptor();
-
-    long getContentLength();
-
-    int read(byte[] aB, int aOff, int aLen)
-    throws IOException;
-
-    int getTransferSize();
-
-    long seek(long aWhere) throws IOException;
-
-    long tell();
-
-    int getSeekType();
-}
--- a/javauis/mmapi_qt/baseline/src.dsa/cmmadsawindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,359 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplayWindow functionality
-*                in Direct Screen Access based displays for Helix engine.
-*
-*/
-
-
-//  Include Files
-#include <logger.h>
-#include "cmmadsawindow.h"
-#include "cmmaplayer.h"
-
-CMMADSAWindow* CMMADSAWindow::NewL(
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer,
-    RMMFVideoPlayControllerCustomCommands* aVPCustomCommand)
-{
-    CMMADSAWindow* self =
-        new(ELeave) CMMADSAWindow(aEventSource,
-                                  aPlayer,
-                                  aVPCustomCommand);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-// Destructor (virtual by CBase)
-CMMADSAWindow::~CMMADSAWindow()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADSAWindow::~CMMADSAWindow");
-}
-
-CMMADSAWindow::CMMADSAWindow(
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer,
-    RMMFVideoPlayControllerCustomCommands* aVPCustomCommand)
-        : iEventSource(aEventSource), iPlayer(aPlayer),
-        iVideoPlayControllerCustomCommands(aVPCustomCommand),
-        iDSAAborted(EFalse)
-{
-    // Nothing to do.
-}
-
-void CMMADSAWindow::ConstructL()
-{
-    iClientRect.SetRect(0, 0, 0, 0);
-
-    // Empty rect until video size is known
-    iDrawRect.SetRect(0, 0, 0, 0);
-}
-
-
-void CMMADSAWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-void CMMADSAWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-// Local wrapper function to SetDrawRect method
-LOCAL_C void StaticSetDrawRect(
-    CMMADSAWindow* aWindow,
-    const TRect* aRect,
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    RPointerArray< CMMAPlayer > players = aEventSource->Players();
-    // Invoke SetDrawRect only if the player has not been cleaned
-    if (players.Find(aPlayer) != KErrNotFound)
-    {
-        aWindow->SetDrawRect(*aRect);
-    }
-}
-
-void CMMADSAWindow::SetDrawRectThread(const TRect& aRect)
-{
-    // Call through event source changes thread to MMA event source thread
-    // and new rect can be set with RMMFVideoPlayControllerCustomCommands
-    // MMA player may be deleted after ExecuteV and before the static method
-    // is called so Event source is used to check if a cleanup has
-    // already been done for the player (for example due to MIDlet exit)
-    iEventSource->ExecuteV(&StaticSetDrawRect,
-                           this,
-                           &aRect,
-                           iEventSource,
-                           iPlayer);
-}
-
-void CMMADSAWindow::SetDrawRect(const TRect& aRect)
-{
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    // setting video draw rect and adjusting it to window
-    iDrawRect = aRect;
-    TRect drawRect = iDrawRect;
-    drawRect.Move(iClientRect.iTl);
-
-    if (!iVideoPlayControllerCustomCommands)
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: no VideoPlayControllerCustomCommands set, aborting -");
-        return;
-    }
-
-    if (iVisible)
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: Abort DSA");
-        iVideoPlayControllerCustomCommands->DirectScreenAccessEvent(EAbortDSA);
-    }
-
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: drawRect TL %d %d",
-               drawRect.iTl.iX, drawRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: drawRect BR %d %d",
-               drawRect.iBr.iX, drawRect.iBr.iY);
-
-    // Area where should be drawn is the intersection of drawRect and iClientRect.
-    TRect areaRect = iClientRect;
-    areaRect.Intersection(drawRect);
-
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: areaRect TL %d %d",
-               areaRect.iTl.iX, areaRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: areaRect BR %d %d",
-               areaRect.iBr.iX, areaRect.iBr.iY);
-
-    if (iVisible && !iDSAAborted)
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: SetDisplayWindow( drawRect, areaRect )");
-        iVideoPlayControllerCustomCommands->SetDisplayWindow(
-            drawRect , areaRect);
-
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: Update region (areaRect)");
-        RRegion region(areaRect);
-        iVideoPlayControllerCustomCommands->UpdateDisplayRegion(region);
-        region.Close();
-
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: Resume DSA");
-        iVideoPlayControllerCustomCommands->DirectScreenAccessEvent(EResumeDSA);
-    }
-    LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetDrawRect: -");
-}
-
-const TRect& CMMADSAWindow::DrawRect()
-{
-    return iDrawRect;
-}
-
-TSize CMMADSAWindow::WindowSize()
-{
-    return iClientRect.Size();
-}
-
-void CMMADSAWindow::SetPosition(const TPoint& aPosition)
-{
-    // changing to MMA thread
-    // MMA player may be deleted after ExecuteV and before the static method
-    // is called so Event source is used to check if a cleanup has
-    // already been done for the player (for example due to MIDlet exit)
-    iEventSource->ExecuteV(&CMMADSAWindow::StaticSetWindowPosition,
-                           this,
-                           aPosition,
-                           iEventSource,
-                           iPlayer);
-}
-
-void CMMADSAWindow::StaticSetWindowPosition(
-    CMMADSAWindow* aWindow,
-    TPoint aPosition,
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    RPointerArray< CMMAPlayer > players = aEventSource->Players();
-    // Invoke SetDrawRect only if the player has not been cleaned
-    if (players.Find(aPlayer) != KErrNotFound)
-    {
-        aWindow->SetDrawRect(TRect(aPosition, aWindow->iDrawRect.Size()));
-    }
-}
-
-TBool CMMADSAWindow::IsVisible() const
-{
-    LOG1( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::IsVisible %d ", iVisible);
-    return iVisible;
-}
-
-void CMMADSAWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
-{
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetVisible avisible=%d useES=%d +", aVisible, aUseEventServer);
-    // Event server may not be used if we already in mma event server thread
-    if (aUseEventServer)
-    {
-        // MMA player may be deleted after ExecuteV and before the static method
-        // is called so Event source is used to check if a cleanup has
-        // already been done for the player (for example due to MIDlet exit)
-        iEventSource->ExecuteV(&CMMADSAWindow::SetWindowVisible,
-                               this,
-                               aVisible,
-                               iEventSource,
-                               iPlayer);
-    }
-    else
-    {
-        SetWindowVisible(this, aVisible, iEventSource, iPlayer);
-    }
-    LOG1( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetVisible %d -", aVisible);
-}
-
-void CMMADSAWindow::SetWindowVisible(
-    CMMADSAWindow* aWindow,
-    TBool aVisible,
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    LOG1( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible aVisible %d", aVisible);
-    RPointerArray< CMMAPlayer > players = aEventSource->Players();
-    // Invoke SetDrawRect only if the player has not been cleaned
-    if (players.Find(aPlayer) != KErrNotFound)
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible : Player found");
-        if (aVisible != aWindow->iVisible)
-        {
-            LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible: Changed visibility");
-            aWindow->iVisible = aVisible;
-        }
-        if (aVisible)
-        {
-            LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible: aVisible = 1");
-            const TRect drawRect = aWindow->DrawRect();
-
-            aWindow->SetDrawRect(drawRect);
-        }
-        else
-        {
-            LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible: aVisible = 0");
-            TRect emptyRect(0, 0, 0, 0);
-
-            RRegion region(emptyRect);
-            aWindow->iVideoPlayControllerCustomCommands->UpdateDisplayRegion(region);
-            region.Close();
-            LOG( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowVisible: Abort DSA");
-
-            aWindow->iVideoPlayControllerCustomCommands->
-            DirectScreenAccessEvent(EAbortDSA);
-        }
-
-    }
-}
-
-void CMMADSAWindow::SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType /*aThreadType*/)
-{
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowRect aRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MID::CMMADSAWindow::SetWindowRect aRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iClientRect = aRect;
-}
-
-const TRect& CMMADSAWindow::WindowRect()
-{
-    return iClientRect;
-}
-
-
-void CMMADSAWindow::AbortDSA()
-{
-    iDSAAborted = ETrue;
-
-    // Always runs in UI thread
-    iEventSource->ExecuteV(&StaticAbortDSA,
-                           this,
-                           iEventSource,
-                           iPlayer);
-}
-
-
-void CMMADSAWindow::ResumeDSA()
-{
-    iDSAAborted = EFalse;
-
-    // Always runs in UI thread
-    iEventSource->ExecuteV(&StaticResumeDSA,
-                           this,
-                           iEventSource,
-                           iPlayer);
-}
-
-
-void CMMADSAWindow::StaticAbortDSA(
-    CMMADSAWindow* aWindow,
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    RPointerArray< CMMAPlayer > players = aEventSource->Players();
-    // Invoke SetDrawRect only if the player has not been cleaned
-    if (players.Find(aPlayer) != KErrNotFound &&
-            aWindow->iVisible && aWindow->iVideoPlayControllerCustomCommands)
-    {
-        TRect emptyRect(0, 0, 0, 0);
-
-        RRegion region(emptyRect);
-        aWindow->iVideoPlayControllerCustomCommands->UpdateDisplayRegion(region);
-        region.Close();
-        aWindow->iVideoPlayControllerCustomCommands->DirectScreenAccessEvent(EAbortDSA);
-    }
-}
-
-
-void CMMADSAWindow::StaticResumeDSA(
-    CMMADSAWindow* aWindow,
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    RPointerArray< CMMAPlayer > players = aEventSource->Players();
-    // Invoke SetDrawRect only if the player has not been cleaned
-    if (players.Find(aPlayer) != KErrNotFound &&
-            aWindow->iVisible && aWindow->iVideoPlayControllerCustomCommands)
-    {
-        TRect drawRect = aWindow->iDrawRect;
-        drawRect.Move(aWindow->iClientRect.iTl);
-
-        // Area where should be drawn is the intersection of drawRect and iClientRect.
-        TRect areaRect = aWindow->iClientRect;
-        areaRect.Intersection(drawRect);
-
-        aWindow->iVideoPlayControllerCustomCommands->SetDisplayWindow(
-            drawRect , areaRect);
-
-        RRegion region(areaRect);
-        aWindow->iVideoPlayControllerCustomCommands->UpdateDisplayRegion(region);
-        region.Close();
-
-        aWindow->iVideoPlayControllerCustomCommands->DirectScreenAccessEvent(EResumeDSA);
-    }
-}
-
-void CMMADSAWindow::ContainerDestroyed()
-{
-    SetVisible(EFalse, ETrue);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.dsa/cmmavideoplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,403 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing video.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmffile.h>
-#include <logger.h>
-
-#include "cmmavideoplayer.h"
-#include "mmmadisplay.h"
-#include "mmafunctionserver.h"
-#include "cmmadsawindow.h"
-
-// CONSTANTS
-_LIT(KVideoControlName, "VideoControl");
-
-CMMAVideoPlayer* CMMAVideoPlayer::NewLC(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAVideoPlayer* self =
-        new(ELeave) CMMAVideoPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAVideoPlayer::~CMMAVideoPlayer()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoPlayer::~CMMAVideoPlayer");
-    if (iDisplay)
-    {
-        TRAPD(err, iDisplay->SetWindowL(NULL));
-        if (err != KErrNone)
-        {
-            __ASSERT_DEBUG(EFalse, User::Invariant());
-        }
-    }
-    delete iDSAWindow;
-    delete iEmptySnapshotImage;
-    delete iActiveSchedulerWait;
-}
-
-CMMAVideoPlayer::CMMAVideoPlayer(
-    CMMAMMFResolver* aResolver):
-        CMMAAudioPlayer(aResolver),
-        iVideoControllerCustomCommands(iController),
-        iVideoPlayControllerCustomCommands(iController)
-{
-}
-
-void CMMAVideoPlayer::ConstructL()
-{
-    CMMAAudioPlayer::ConstructL();
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-}
-
-EXPORT_C void CMMAVideoPlayer::SetPlayerListenerObjectL(jobject aListenerObject,
-        JNIEnv* aJni,
-        MMMAEventPoster* aEventPoster)
-{
-    CMMAPlayer::SetPlayerListenerObjectL(aListenerObject,
-                                         aJni,
-                                         aEventPoster);
-
-    // this method must be called only ones
-    __ASSERT_DEBUG(!iDSAWindow, User::Invariant());
-
-    // create window for videoplayer
-    // event poster is always MMAFunctionServer type.
-
-    iDSAWindow = CMMADSAWindow::NewL(
-                     static_cast< MMAFunctionServer* >(iEventPoster),
-                     this,
-                     &iVideoPlayControllerCustomCommands);
-}
-
-EXPORT_C void CMMAVideoPlayer::SetDisplayL(MMMADisplay* aDisplay)
-{
-    // now it is ready to draw
-    iDisplay = aDisplay;
-    iDisplay->SetWindowL(iDSAWindow);
-
-    // if state < prefeteched then we dont know actual source size yet
-    // and it will be set after prefetch
-    if (iState >= EPrefetched)
-    {
-        SourceSizeChanged();
-    }
-}
-void CMMAVideoPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::RealizeL");
-    // DataSource must have at least 1 stream or
-    // we must have file to play
-    if ((iSourceStreams.Count() == 0) && !iFileName)
-    {
-        User::Leave(KErrNotEnoughStreams);
-    }
-
-    // If file locator is used, then file is prefetched
-    // in realized state so that FramePositioningControl
-    // can acquire frame count in REALIZED state
-    if (iFileName)
-    {
-        PrefetchFileL();
-        if (!iActiveSchedulerWait->IsStarted())
-        {
-            iActiveSchedulerWait->Start();
-        }
-        // If the player has not changed state during wait,
-        // Then there is an error condition.
-        if (iState != ERealized)
-        {
-            User::Leave(KErrNotSupported);
-        }
-    }
-    else
-    {
-        CMMAPlayer::RealizeL();
-    }
-}
-
-void CMMAVideoPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::PrefetchL");
-    if (iFileName)
-    {
-        // File has already been prefetched when realizing
-
-        // If initDisplayMode was called before prefetch,
-        // then the display must notified about source size.
-        if (iDisplay)
-        {
-            SourceSizeChanged();
-        }
-
-        ChangeState(EPrefetched);
-        PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        // Using TDes -- load the whole video
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-    // CMMASourceStream will notify with ReadCompleted
-}
-
-EXPORT_C void CMMAVideoPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoPlayer::ReadCompletedL: status = %d", aStatus);
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        TRAPD(err, PrefetchDataL(aData));
-        if (err != KErrNone)
-        {
-            PostActionCompleted(err);
-        }
-        // action completed event will be delivered from handleEvent
-    }
-}
-
-void CMMAVideoPlayer::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoPlayer::HandleEvent %d", aEvent.iEventType.iUid);
-
-    // KNotCompleteVideoError can be notified when video is not complete
-    // ( missing sound ) but still can be played. Because
-    // CMMAAudioPlayer::HandleEvent fails with all negative error codes,
-    // do not call it with KNotCompleteVideoError error when preparing.
-    if ((aEvent.iErrorCode != KNotCompleteVideoError) ||
-            (aEvent.iEventType != KMMFEventCategoryVideoPrepareComplete))
-    {
-        CMMAAudioPlayer::HandleEvent(aEvent);
-    }
-
-    // video opened, preparing
-    if (aEvent.iEventType == KMMFEventCategoryVideoOpenComplete)
-    {
-        if (aEvent.iErrorCode == KErrNone)
-        {
-            TInt prepareError(iVideoPlayControllerCustomCommands.Prepare());
-            if (prepareError != KErrNone)
-            {
-                // opening failed, notifying java
-                PostActionCompleted(prepareError);
-            }
-        }
-        else
-        {
-            // opening failed, notifying java
-            PostActionCompleted(aEvent.iErrorCode);
-        }
-    }
-    // final state of prefetch ( prepare completed )
-    else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
-    {
-        // This callback must be handled differently depending on whether
-        // player is created for a file locator or for a stream. When file
-        // locator is used, this callback is made in realized state. For
-        // stream it is made in prefetched state.
-        PrepareDisplay();
-        if (iFileName)
-        {
-            LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::HandleEvent: Using filename, change state to REALIZED");
-
-            // If there is an error condition, then the player state is not
-            // changed, which indicates the error condition to StartL when
-            // the ActiveSchedulerWait returns. KNotCompleteVideoError is not
-            // considered as an error condition, instead it indicates that some
-            // elements of the media cannot be played (e.g. video OR audio)
-            if (aEvent.iErrorCode == KErrNone ||
-                    aEvent.iErrorCode == KNotCompleteVideoError)
-            {
-                ChangeState(ERealized);
-            }
-            __ASSERT_DEBUG(iActiveSchedulerWait->IsStarted(), User::Invariant());
-            iActiveSchedulerWait->AsyncStop();
-        }
-        else
-        {
-            LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::HandleEvent: Not using filename, change state to PREFETCHED");
-            CompletePrefetch(aEvent.iErrorCode);
-        }
-    }
-    else            // in case of any other event
-    {
-        if (aEvent.iErrorCode != KErrNone)
-        {
-            PostActionCompleted(aEvent.iErrorCode);   //some other error
-        }
-    }
-}
-
-void CMMAVideoPlayer::CompletePrefetch(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "CMMAVideoPlayer::CompletePrefetch + error = %d",aError);
-    // Post KNotCompleteVideoError as KErrNone to the Java side, because
-    // video can be played.
-    if (aError == KNotCompleteVideoError)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::CompletePrefetch  KNotCompleteVideoError ");
-        // release java
-        PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::CompletePrefetch  CompleteVideoError ");
-        // release java
-        PostActionCompleted(aError);
-    }
-
-    if (aError == KErrNone || aError == KNotCompleteVideoError)
-    {
-        ChangeState(EPrefetched);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::CompletePrefetch - ");
-}
-
-void CMMAVideoPlayer::PrepareDisplay()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::PrepareDisplay +");
-    // construction should have leaved if iDSAWindow does not exist
-    __ASSERT_DEBUG(iDSAWindow,
-                   User::Panic(_L("CMMVideoPlayer::iDSAWindow is null"),
-                               KErrArgument));
-
-    // Video must be initially not visible
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::PrepareDisplay: Initially aborting DSA");
-    iVideoPlayControllerCustomCommands.DirectScreenAccessEvent(EAbortDSA);
-
-    //First place where we are certain that source size can be fetched
-    TSize sourceSize;
-
-    TInt err = iVideoControllerCustomCommands.GetVideoFrameSize(sourceSize);
-
-    ELOG1( EJavaMMAPI, "MID::CMMAVideoPlayer::PrepareDisplay: GetVideoFrameSize err = %d", err);
-
-    // Still we did not get the size of video
-    if ((err != KErrNone) ||
-            (sourceSize.iWidth <= 0) ||
-            (sourceSize.iHeight <= 0))
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMAVideoPlayer::PrepareDisplay: No sourcesize found, using DSAWindow size");
-        // setting size to window size (client rect)
-        sourceSize = iDSAWindow->WindowSize();
-    }
-
-    // If 1x1 was got (the default size of form), it must be replaced
-    // with a valid size as controller will not accept 1x1.
-    if ((sourceSize.iWidth < KMMAVideoMinDimension) ||
-            (sourceSize.iHeight < KMMAVideoMinDimension))
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMAVideoPlayer::PrepareDisplay: Unacceptable source size, using failsafe");
-        // This is a special case and ought to be used only in
-        // the rare case that real size is not got from stream.
-        sourceSize = TSize(KMMAVideoMinDimension, KMMAVideoMinDimension);
-    }
-
-    iSourceSize = sourceSize;
-
-    // If init has been already done
-    if (iDisplay)
-    {
-        LOG( EJavaMMAPI, EInfo, "MID::CMMAVideoPlayer::PrepareDisplay: display exists, changing source size");
-        SourceSizeChanged();
-    }
-
-    // Setting (in)visible if something has changed the DSA state
-    // (e.g. prepare). If initDisplayMode is not called, this will always
-    // set visibility to false.
-    iDSAWindow->SetVisible(iDSAWindow->IsVisible(), EFalse);
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoPlayer::PrepareDisplay -");
-}
-
-EXPORT_C const TDesC& CMMAVideoPlayer::Type()
-{
-    return KMMAVideoPlayer;
-}
-
-EXPORT_C TSize CMMAVideoPlayer::SourceSize()
-{
-    return iSourceSize;
-}
-
-EXPORT_C MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(TRequestStatus* aStatus,
-        const TSize& /*aSize*/,
-        const CMMAImageSettings& /*aSettings*/)
-{
-    if (iEmptySnapshotImage)
-    {
-        // Ealier snapshot was not got with SnapshotBitmap method.
-        User::Leave(KErrInUse);
-    }
-    // frame can't be got from video player, but TCK requires that it should
-    // be available. So returning empty image
-    iEmptySnapshotImage = new(ELeave) CFbsBitmap();
-    User::LeaveIfError(iEmptySnapshotImage->Create(TSize(1, 1),
-                       EColor4K));
-
-
-    User::RequestComplete(aStatus, KErrNone);
-
-    // Return raw bitmap encoding and thus SnapshotEncoded() should not
-    // get called later on.
-    return EBitmap;
-}
-
-EXPORT_C CFbsBitmap* CMMAVideoPlayer::SnapshotBitmap()
-{
-    // snapshot is not supported, returning empty image
-    CFbsBitmap* image = iEmptySnapshotImage;
-
-    // ownership is transferred to caller
-    iEmptySnapshotImage = NULL;
-    return image;
-}
-
-EXPORT_C HBufC8* CMMAVideoPlayer::SnapshotEncoded()
-{
-    // This method should never be called.
-    // Asserted in debug build to be sure.
-    __ASSERT_DEBUG(EFalse, User::Invariant());
-
-    return NULL;
-}
-
-EXPORT_C void CMMAVideoPlayer::NotifyWithStringEvent(
-    CMMAPlayerEvent::TEventType aEventType,
-    const TDesC& aStringEventData)
-{
-    PostStringEvent(aEventType, aStringEventData);
-}
-
-EXPORT_C MMMASnapshot* CMMAVideoPlayer::SnapshoterL()
-{
-    return this;
-}
-
-void CMMAVideoPlayer::SourceSizeChanged()
-{
-    iDisplay->SourceSizeChanged(iSourceSize);
-    NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmaemcaudioplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-#include <AudioPreference.h>
-#include <logger.h>
-#include "cmmaemcaudioplayer.h"
-
-CMMAEMCAudioPlayer* CMMAEMCAudioPlayer::NewLC(
-    CMMAEMCResolver* aResolver)
-{
-    CMMAEMCAudioPlayer* self = new(ELeave) CMMAEMCAudioPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-EXPORT_C CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer()
-{
-}
-
-EXPORT_C CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(
-    CMMAEMCResolver* aResolver):
-        CMMAEMCPlayerBase(aResolver)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::CMMAEMCAudioPlayer");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::ConstructL +");
-    CMMAEMCPlayerBase::ConstructL();
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::ConstructL -");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::PrefetchDataL(const TDesC8& /*aData*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::PrefetchDataL +");
-
-    User::LeaveIfError(iMStreamControl->Prime());
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::PrefetchDataL -");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::PrefetchFileL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::Prefetching from file");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::PlayCompleteL(TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::PlayCompleteL +");
-    TInt64 time;
-    GetDuration(&time);
-    iMediaTime = time;
-    iStartedEventTime = 0;
-
-    ChangeState(EPrefetched);   // ready to play again
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, time);
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        // priming again for allowing e.g. media time setting
-        User::LeaveIfError(iMStreamControl->Prime());
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-
-            TInt64 position(0);
-            User::LeaveIfError(iMStreamControl->SetPosition(position));
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCAudioPlayer::PlayCompleteL -");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::RealizeL +");
-    // DataSource must have at least 1 stream or
-    // we must have file to play
-    if ((iSourceStreams.Count() == 0) && !iFileName)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::RealizeL : Not Enough Streams");
-        User::Leave(KErrNotEnoughStreams);
-    }
-    User::LeaveIfError(iMStreamControl->Open());
-
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    CMMAPlayer::RealizeL();
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::RealizeL -");
-}
-
-EXPORT_C void CMMAEMCAudioPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::PrefetchL +");
-    __ASSERT_DEBUG((iSourceStreams.Count() > 0) || iFileName, User::Invariant());
-
-    if (iFileName)
-    {
-        // prefetching the file
-        PrefetchFileL();
-        // we can go to prefetched state immediately
-        ChangeState(EPrefetched);
-        PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        // Using TDes -- load the whole sound
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-    // CMMASourceStream will notify with ReadCompleted
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::PrefetchL -");
-}
-
-EXPORT_C const TDesC& CMMAEMCAudioPlayer::Type()
-{
-    // Should be used in AMMS Implementation to differentiate between
-    // this new kind of player with others
-    return KMMAEMCAudioPlayer;
-}
-
-//
-// CMMASourceStreamReader finished read operation
-// This is called when ReadL is completed in Prefetch()
-//
-EXPORT_C void CMMAEMCAudioPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::ReadCompletedL +");
-    LOG1( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::ReadCompletedL: status = %d", aStatus);
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        TRAPD(err, PrefetchDataL(aData));
-        if (err == KErrNone)
-        {
-            ChangeState(EPrefetched);
-        }
-        PostActionCompleted(err);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCAudioPlayer::ReadCompletedL -");
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmaemcaudiovolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#include <logger.h>
-#include "StreamControl.h"
-#include "EffectControl.h"
-#include "MMControlFactory.h"
-#include "cmmaemcaudiovolumecontrol.h"
-#include "cmmaemcaudioplayer.h"
-
-using multimedia ::KVolumeEffectControl;
-using multimedia ::MStreamControl;
-using multimedia ::MEffectControl;
-using multimedia ::CMultimediaFactory;
-
-EXPORT_C CMMAEMCAudioVolumeControl* CMMAEMCAudioVolumeControl::NewL(CMMAEMCAudioPlayer& aPlayer)
-{
-    CMMAEMCAudioVolumeControl* self = new(ELeave)CMMAEMCAudioVolumeControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-EXPORT_C CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(CMMAEMCAudioPlayer& aPlayer)
-        : CMMAVolumeControl(&aPlayer), iPlayer(aPlayer)
-{
-}
-
-void CMMAEMCAudioVolumeControl::ConstructL()
-{
-    ConstructBaseL();
-    MStreamControl* streamControl = iPlayer.StreamControl();
-    CMultimediaFactory* mmFactory = iPlayer.MMFactory();
-
-    MEffectControl* temp(NULL);
-    User::LeaveIfError(mmFactory->CreateEffectControl(KVolumeEffectControl, temp));
-    iVolCntrl = static_cast<MVolumeControl*>(temp);
-    User::LeaveIfError(streamControl->AddEffect(*iVolCntrl));
-}
-
-CMMAEMCAudioVolumeControl::~CMMAEMCAudioVolumeControl()
-{
-    MStreamControl* streamControl = iPlayer.StreamControl();
-    CMultimediaFactory* mmFactory = iPlayer.MMFactory();
-
-    if ((NULL != streamControl) && (NULL != iVolCntrl))
-    {
-        streamControl->RemoveEffect(*iVolCntrl);
-    }
-
-    MEffectControl* temp = static_cast<MEffectControl*>(iVolCntrl);
-
-    if (NULL != mmFactory)
-    {
-        mmFactory->DeleteEffectControl(temp);
-    }
-}
-
-EXPORT_C void CMMAEMCAudioVolumeControl::DoSetLevelL(TInt aLevel)
-{
-    TInt maxVolume = 0;
-    User::LeaveIfError(iVolCntrl->GetMaxVolume(maxVolume));
-    // aLevel is the desired volume in range 0..100
-    TInt volLevel = aLevel * maxVolume / KMMAVolumeMaxLevel;
-    User::LeaveIfError(iVolCntrl->SetVolume(volLevel));
-    User::LeaveIfError(iVolCntrl->Apply());
-}
-
-EXPORT_C TInt CMMAEMCAudioVolumeControl::DoGetLevelL()
-{
-    TInt maxVolume = 0;
-    User::LeaveIfError(iVolCntrl->GetMaxVolume(maxVolume));
-    __ASSERT_DEBUG(maxVolume != 0, User::Invariant());
-    TInt volume = 0;
-    User::LeaveIfError(iVolCntrl->GetVolume(volume));
-    // result is in range 0..100
-    return (volume * KMMAVolumeMaxLevel / maxVolume);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmaemcplayerbase.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,358 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-//#include <mmf/server/mmfdes.h>
-#include <AudioPreference.h>
-#include <logger.h>
-#include "cmmaemcplayerbase.h"
-#include "cmmaemcresolver.h"
-
-using namespace multimedia;
-
-using multimedia::MSourceControlObserver;
-using multimedia::MStreamControlObserver;
-
-CMMAEMCPlayerBase::~CMMAEMCPlayerBase()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::~CMMAEMCPlayerBase +");
-
-    if (iMStreamControl)
-    {
-        iMStreamControl->RemoveObserver(*this);
-        if (iMStreamControl->GetState() > 0)
-        {
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::~CMMAEMCPlayerBase: iMStreamControl's state = %d",iMStreamControl->GetState());
-            TInt err = iMStreamControl->Close();
-            ELOG1( EJavaMMAPI, "MMA::CMMAEMCPlayerBase::~CMMAEMCPlayerBase: Close() err = %d",err);
-        }
-    }
-
-    if (iFactory)
-    {
-        CleanupSource();
-
-        MSinkControl* objPtr1 = iMAudioSink;
-        iMStreamControl->RemoveSink(*objPtr1);
-
-        iFactory->DeleteSinkControl(objPtr1);
-        iMAudioSink = NULL;
-
-        //before deleting Stream Control all the controls need to be deleted
-        if (iControls.Count() > 0)
-            iControls.ResetAndDestroy();
-
-        iFactory->DeleteStreamControl(iMStreamControl);
-        delete iFactory;
-    }
-
-    delete iFileName;
-
-    delete iActiveSchedulerWait;
-
-    delete iMimeType;
-
-    delete iDescData;
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::~CMMAEMCPlayerBase -");
-}
-
-
-CMMAEMCPlayerBase::CMMAEMCPlayerBase(
-    CMMAEMCResolver* aResolver) :
-        iMediaTime(KTimeUnknown), iStartedEventTime(0)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase +");
-    // content type ownership is transferred
-    iDescData = NULL;
-    iContentType = aResolver->ContentTypeOwnership();
-    iMimeType = aResolver->MimeTypeOwnership();   // 8-bit version of iContentType
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::ContentType-- %S" ,iContentType->Des().PtrZ());
-
-    // file name ownership is transferred
-    iFileName = aResolver->FileNameOwnership();
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::FileName-- %S" ,iFileName->Des().PtrZ());
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase -");
-}
-
-void CMMAEMCPlayerBase::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::ConstructL +");
-    CMMAPlayer::ConstructL();
-    iSourceType = EDATABUFFERSOURCE;    //Currently it only support Http
-
-    TInt status=CMultimediaFactory::CreateFactory(iFactory);
-    CreateStreamL();
-    AddDataSourceToStreamL();
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::ConstructL -");
-}
-
-void CMMAEMCPlayerBase::CreateStreamL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::CreateStreamL +");
-    if (iMStreamControl)
-        User::Leave(KErrAlreadyExists);
-    TInt err = iFactory->CreateStreamControl(KStreamControl,iMStreamControl);
-    User::LeaveIfError(err);
-    //If the state of iMStreamControl changes,iPrevStreamControlState will keep its previous state
-    iPrevStreamControlState = MStreamControl::CLOSED;
-    iMStreamControl->AddObserver(*this);
-
-    MSinkControl* tempSinkCtrl(NULL);
-    err = iFactory->CreateSinkControl(KMMFAudioOutputSinkControl,tempSinkCtrl);
-    User::LeaveIfError(err);
-    iMAudioSink = tempSinkCtrl;
-    iMStreamControl->AddSink(*iMAudioSink);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::CreateStreamL -");
-}
-
-void CMMAEMCPlayerBase::AddDataSourceToStreamL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::AddDataSourceToStreamL +");
-    if (iMStreamControl == NULL)
-    {
-        User::Leave(KErrNotReady);
-    }
-
-    TInt err(KErrNone);
-    MSourceControl* tempCtrl(NULL);
-
-    switch (iSourceType)
-    {
-    case EFILESOURCE:
-    {
-        err = iFactory->CreateSourceControl(KFileSourceControl, tempCtrl);
-        User::LeaveIfError(err);
-        iMFileSource = static_cast<MFileSource*>(tempCtrl);
-        iMimeType->Des().FillZ();
-        User::LeaveIfError(iMFileSource->Open(*iFileName, *iMimeType));
-        iMFileSource->AddObserver(*this);
-        break;
-    }
-    case EDATABUFFERSOURCE:
-    {
-        err = iFactory->CreateSourceControl(KDataBufferSourceControl, tempCtrl);
-        User::LeaveIfError(err);
-
-        iMDataBufferSource = static_cast<MDataBufferSource*>(tempCtrl);
-        MDataBuffer* headerData = NULL;
-        User::LeaveIfError(iMDataBufferSource->Open(*iMimeType, *headerData));
-        iMDataBufferSource->AddObserver(*this);
-        break;
-    }
-    case EDESCRIPTORSOURCE:
-    {
-        err = iFactory->CreateSourceControl(KDescriptorSourceControl, tempCtrl);
-        User::LeaveIfError(err);
-        iMDescriptorSource = static_cast<MDescriptorSource*>(tempCtrl);
-        TInt size = 0;
-        // iFile.Size(size);   will be used when Descriptor support will be implemented
-
-        if (iDescData)
-        {
-            delete iDescData;
-            iDescData = NULL;
-        }
-        iDescData = HBufC8::NewL(size);
-        TPtr8 des = iDescData->Des();
-        //iFile.Read(des);
-        User::LeaveIfError(iMDescriptorSource->Open(*iMimeType,*iDescData));
-        iMDescriptorSource->AddObserver(*this);
-        break;
-    }
-    default:
-        break;
-    }
-
-    iMStreamControl->AddSource(*tempCtrl);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::AddDataSourceToStreamL -");
-}
-
-void CMMAEMCPlayerBase::CleanupSource()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::CleanupSource +");
-    if (iMDataBufferSource)
-    {
-        iMDataBufferSource->RemoveObserver(*this);
-        MSourceControl* objPtr = iMDataBufferSource;
-        iMStreamControl->RemoveSource(*objPtr);    //added
-        objPtr->Close();
-        iFactory->DeleteSourceControl(objPtr);
-        iMDataBufferSource = NULL;
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::CleanupSource -");
-}
-
-EXPORT_C MStreamControl* CMMAEMCPlayerBase::StreamControl()
-{
-    return iMStreamControl;
-}
-
-EXPORT_C CMultimediaFactory* CMMAEMCPlayerBase::MMFactory()
-{
-    return iFactory;
-}
-
-TBool CMMAEMCPlayerBase::IsFilePlayer()
-{
-    return EFalse;
-}
-
-void CMMAEMCPlayerBase::StartL()
-{
-    // empty implementation
-    // should be overwritten in derived class
-}
-
-void CMMAEMCPlayerBase::StopL(TBool /*aPostEvent*/)
-{
-    // empty implementation
-    // should be overwritten in derived class
-}
-
-void CMMAEMCPlayerBase::DeallocateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::DeallocateL +");
-    if (iState == EPrefetched)
-    {
-        // Change state first to enable AMMS to delete Effect API classes
-        ChangeState(ERealized);
-
-        TInt err = iMStreamControl->Stop();
-        ELOG1( EJavaMMAPI, "CMMAEMCPlayerBase::DeallocateL iMStreamControl->Stop = %d", err);
-        ResetSourceStreams();
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::DeallocateL -");
-}
-
-
-void CMMAEMCPlayerBase::GetDuration(TInt64* aDuration)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::GetDuration +");
-    if (iDuration == KTimeUnknown)
-    {
-        TInt64 duration(0);
-        TInt err = iMStreamControl->GetDuration(duration);
-        if (!err)
-        {
-            iDuration = duration;
-        }
-    }
-    *aDuration = iDuration;
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerBase::GetDuration -");
-}
-
-void CMMAEMCPlayerBase::SetMediaTimeL(TInt64* aTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::SetMediaTimeL +");
-
-    // Negative values are not checked here
-    // because it's done already in Java side.
-
-    // Get clip duration
-    TInt64 duration;
-    User::LeaveIfError(iMStreamControl->GetDuration(duration));
-    LOG1( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::SetMediaTimeL iMStreamControl->GetDuration=%d", duration);
-
-    TInt64 position;
-
-    // If the desired media time is beyond the duration,
-    // the time is set to the end of the media.
-    if (*aTime > duration)
-    {
-        position = duration;
-    }
-    else
-    {
-        position = *aTime;
-    }
-
-    // The controller must be in the PRIMED or PLAYING state
-    User::LeaveIfError(iMStreamControl->SetPosition(position));
-
-    // Reset cached media time, because actual set position may be
-    // something else than aTime.
-    iMediaTime = KTimeUnknown;
-
-    // Inform about the position change to the StateListeners
-    ChangeState(iState);
-
-    // Get the actual media time
-    GetMediaTime(aTime);
-
-    iStartedEventTime = iMediaTime;
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::SetMediaTimeL -");
-}
-
-void CMMAEMCPlayerBase::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::GetMediaTimeL +");
-    TInt64 position(0);
-
-    if (iMediaTime == KTimeUnknown || iState == EStarted)
-    {
-
-        TInt error(iMStreamControl->GetPosition(position));
-
-        if (error == KErrNone)
-        {
-            TInt64 newTime = position;
-
-            // Sanity check for media time going backwards or beyond the
-            // duration.
-            // Some native controls may return zero media time for
-            // a few moments just before playback will complete.
-            if (newTime < iMediaTime ||
-                    (iDuration > 0 && newTime > iDuration))
-            {
-                GetDuration(&iMediaTime);
-            }
-            else
-            {
-                // set return value
-                iMediaTime = newTime;
-            }
-        }
-        else
-        {
-            ELOG1( EJavaMMAPI, "CMMAEMCPlayerBase::GetMediaTimeL: error=%d, returning TIME_UNKNOWN", error);
-            // cannot get media time
-            iMediaTime = KTimeUnknown;
-        }
-    }
-    *aMediaTime = iMediaTime;
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::GetMediaTimeL -");
-}
-
-void CMMAEMCPlayerBase::CloseL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::CloseL +");
-    CMMAPlayer::CloseL();
-
-    iMStreamControl->Close();
-    LOG( EJavaMMAPI, EInfo, "CMMAEMCPlayerBase::CloseL -");
-}
-
-void CMMAEMCPlayerBase::Event(MControl* /*aControl*/, TUint /*aEventType*/, TAny* /*aEventObject*/)
-{
-    //Not Called
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmaemcplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating EMC-based players.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <badesca.h>
-#include <logger.h>
-
-#ifndef RD_JAVA_OMA_DRM_V2
-#include <DRMCommon.h>
-#endif // RD_JAVA_OMA_DRM_V2
-
-#include "cmmaemcplayerfactory.h"
-#include "cmmaemcresolver.h"
-#include "MimeTypes.h"
-
-// CONSTANTS
-// Granularity used to create initial arrays.
-const TInt KGranularity = 8;
-_LIT(KContentTypePacketSrcNotIncluded, "application/x-ext-packetsrc");
-
-CMMAEMCPlayerFactory::CMMAEMCPlayerFactory()
-{
-}
-
-CMMAEMCPlayerFactory::~CMMAEMCPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAEMCPlayerFactory::CreatePlayerL(const TDesC& aContentType)
-{
-    return CreatePlayerL(aContentType, NULL);
-}
-
-CMMAPlayer* CMMAEMCPlayerFactory::CreatePlayerL(const TDesC& /*aContentType*/,
-        const TDesC* /*aFileName*/)
-{
-    return (CMMAPlayer*)NULL;
-}
-
-CMMAPlayer* CMMAEMCPlayerFactory::CreatePlayerL(const TDesC& aProtocol,
-        const TDesC& aMiddlePart,
-        const TDesC&)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerFactory::CreatePlayerL aMiddlePart = %S",
-              aMiddlePart.Ptr());
-    CMMAEMCResolver* emcresolver =
-        CMMAEMCResolver::NewLC();
-
-    emcresolver ->SetFileNameL(&aMiddlePart);
-
-    CMMAPlayer* player = NULL;
-    if (aProtocol == KMMAFileProtocol)
-    {
-
-        //player = CreatePlayerL( emcresolver, &aMiddlePart );
-
-#ifndef RD_JAVA_OMA_DRM_V2
-        // if opening is failed, it might be DRM file, trying it
-        if (!player)
-        {
-            player = TryOpenDRMFileL(aMiddlePart);
-        }
-#endif // RD_JAVA_OMA_DRM_V2
-
-    }
-    else
-    {
-        player = CreatePlayerL(emcresolver);
-    }
-
-    CleanupStack::PopAndDestroy(emcresolver);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerFactory::CreatePlayerL aMiddlePart ok");
-    return player;
-}
-
-#ifndef RD_JAVA_OMA_DRM_V2
-CMMAPlayer* CMMAEMCPlayerFactory::TryOpenDRMFileL(const TDesC& aFileName)
-{
-    // we are most likely going to play this file
-    ContentAccess::TIntent intent = ContentAccess::EPlay;
-
-    CContent* contentObj = CContent::NewL(aFileName);
-    CleanupStack::PushL(contentObj);
-    CData* dataObj = contentObj->OpenContentL(intent);
-    CleanupStack::PushL(dataObj);
-    User::LeaveIfError(dataObj->EvaluateIntent(intent));
-    TBuf8<KMaxName> mimeType;
-    CMMAPlayer* player = NULL;
-    if (dataObj->GetMimeTypeL(mimeType))
-    {
-        // we use 16bit mimeType
-        HBufC* mimeTypeBuf = HBufC::NewLC(mimeType.Length());
-        mimeTypeBuf->Des().Copy(mimeType);
-        player = CreatePlayerL(*mimeTypeBuf, &aFileName);
-        CleanupStack::PopAndDestroy(mimeTypeBuf);
-    }
-    CleanupStack::PopAndDestroy(2); //dataObj, contentObj
-    return player;
-}
-#endif // RD_JAVA_OMA_DRM_V2
-
-CMMAPlayer* CMMAEMCPlayerFactory::CreatePlayerL(const TDesC8& /*aHeaderData*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAEMCPlayerFactory::CreatePlayerL header data +");
-
-    return (CMMAPlayer*)NULL;
-}
-
-void CMMAEMCPlayerFactory::GetSupportedContentTypesL(const TDesC& aProtocol,
-        CDesC16Array& aMimeTypeArray)
-{
-    //CMMAEMCResolver class should contain the constant array of all supported mimetype defined in EMC api MimeTypes.h
-    if (!IsSupportedProtocolL(aProtocol))
-    {
-        return;
-    }
-    CMMAEMCResolver* emcresolver = CMMAEMCResolver::NewLC();
-    emcresolver->GetSupportedContentTypesL(aMimeTypeArray);
-
-    CleanupStack::PopAndDestroy(emcresolver);
-}
-
-void CMMAEMCPlayerFactory::GetSupportedProtocolsL(const TDesC& aContentType,
-        CDesC16Array& aProtocolArray)
-{
-    // Check that this is supported content type
-    if (!IsSupportedContentTypeL(aContentType))
-    {
-        return;
-    }
-    aProtocolArray.AppendL(KMMAHttpProtocol);
-    aProtocolArray.AppendL(KMMAHttpsProtocol);
-}
-
-TBool CMMAEMCPlayerFactory::IsSupportedProtocolL(const TDesC& aProtocol)
-{
-    // With null desc we are getting all
-    if (aProtocol == KNullDesC)
-    {
-        return ETrue;
-    }
-    CDesC16ArraySeg* protocols = new(ELeave) CDesC16ArraySeg(KGranularity);
-    CleanupStack::PushL(protocols);
-    GetSupportedProtocolsL(KNullDesC, *protocols);
-    TInt pos = KErrNotFound;
-    // Find returns 0 if there contentType is found
-    TBool retValue = (protocols->Find(aProtocol, pos) == 0);
-    CleanupStack::PopAndDestroy(protocols);
-    return retValue;
-}
-
-TBool CMMAEMCPlayerFactory::IsSupportedContentTypeL(const TDesC& aContentType)
-{
-    // With null desc we are getting all
-    if (aContentType == KNullDesC)
-    {
-        return ETrue;
-    }
-
-    // Content type application/x-ext-packetsrc
-    // must not be supported at the moment.
-    if (aContentType == KContentTypePacketSrcNotIncluded)
-    {
-        return EFalse;
-    }
-
-    CDesC16ArraySeg* contentTypes = new(ELeave) CDesC16ArraySeg(KGranularity);
-    CleanupStack::PushL(contentTypes);
-    GetSupportedContentTypesL(KNullDesC, *contentTypes);
-    TInt pos = KErrNotFound;
-    // Find returns 0 if there contentType is found
-    TBool retValue = (contentTypes->Find(aContentType, pos) == 0);
-    CleanupStack::PopAndDestroy(contentTypes);
-    return retValue;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmaemcresolver.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,329 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaemcresolver.h"
-#include "hxmetadatautil.h"
-#include "apgcli.h"
-#include "apmrec.h"
-
-using namespace multimedia;
-
-_LIT(KRVMimeType1, "video/x-pn-realvideo");
-_LIT(KRVMimeType2, "video/x-realvideo");
-_LIT(KRVMimeType3, "video/vnd.rn-realvideo");
-
-// CONSTANTS
-
-CMMAEMCResolver* CMMAEMCResolver::NewLC()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: NewLC ++");
-    CMMAEMCResolver* self = new(ELeave)CMMAEMCResolver();
-    CleanupStack::PushL(self);
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: NewLC --");
-    return self;
-}
-
-CMMAEMCResolver::~CMMAEMCResolver()
-{
-    delete iContentType;
-
-    delete iFileName;
-
-    delete iMimeType;
-}
-
-HBufC* CMMAEMCResolver::ContentTypeOwnership()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: ContentTypeOwnership ++");
-    HBufC* ct = iContentType;
-    iContentType = NULL;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: ContentTypeOwnership --");
-    return ct;
-}
-
-HBufC8* CMMAEMCResolver::MimeTypeOwnership()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: MimeTypeOwnership ++");
-    HBufC8* mt = iMimeType;
-    iMimeType = NULL;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: MimeTypeOwnership --");
-    return mt;
-}
-
-HBufC* CMMAEMCResolver::ContentType()
-{
-    return iContentType;
-}
-
-void CMMAEMCResolver::SetFileNameL(const TDesC* aFileName)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: SetFileNameL ++");
-    HBufC* fn = NULL;
-    if (aFileName)
-    {
-        fn = aFileName->AllocL();
-    }
-    delete iFileName;
-    iFileName = fn;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: SetFileNameL --");
-}
-
-HBufC* CMMAEMCResolver::FileNameOwnership()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: FileNameOwnership ++");
-    HBufC* fn = iFileName;
-    iFileName = NULL;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: FileNameOwnership --");
-    return fn;
-}
-
-void CMMAEMCResolver::SetMimeTypeL(const TDesC* aFileName)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: SetMimeTypeL +");
-    if (iContentType)
-    {
-        delete iContentType;
-        iContentType = NULL;
-    }
-    iContentType = HBufC::NewL(KContentTypeMaxLength);
-    TBuf8<KContentTypeMaxLength> mimeType;
-    ResolveContentTypeL(*aFileName,mimeType);
-    iContentType->Des().Copy(mimeType);
-    iMimeType = HBufC8::NewL(mimeType.Length());        //8 bit Descriptor of iContentType
-    iMimeType->Des().Copy(mimeType);
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: SetMimeTypeL -");
-}
-
-void CMMAEMCResolver::ResolveContentTypeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver::ResolveContentTypeL +");
-
-    if (iContentType)
-    {
-        delete iContentType;
-        iContentType = NULL;
-    }
-    if (iMimeType)
-    {
-        delete iMimeType;
-        iMimeType = NULL;
-    }
-
-    iContentType = HBufC::NewL(KContentTypeMaxLength);
-    iMimeType = HBufC8::NewL(KContentTypeMaxLength);
-
-    if (iFileName->Right(4).Compare(KAacFileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeAAC);
-        iMimeType->Des().Copy(KMimetypeAAC);
-    }
-    else if (iFileName->Right(4).Compare(KAmrFileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeAMR);
-        iMimeType->Des().Copy(KMimetypeAMR);
-    }
-    else if (iFileName->Right(4).Compare(KAwbFileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeAMRWB);
-        iMimeType->Des().Copy(KMimetypeAMRWB);
-    }
-    else if (iFileName->Right(4).Compare(KWmaFileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeXMSWMA);
-        iMimeType->Des().Copy(KMimetypeXMSWMA);
-    }
-    else if (iFileName->Right(3).Compare(KRaFileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeRM);
-        iMimeType->Des().Copy(KMimetypeRM);
-    }
-    else if (iFileName->Right(4).Compare(KMp3FileExtension()) == 0)
-    {
-        iContentType->Des().Copy(KMimetypeMPEG);
-        iMimeType->Des().Copy(KMimetypeMPEG);
-    }
-    else if (iHeaderData)
-    {
-        RApaLsSession ls;
-        TInt err;
-        err = ls.Connect();
-
-        if (iFileName->Right(3).Compare(KRmFileExtension()) == 0)
-        {
-            TBool res = IsRealVideoTypeL(*iHeaderData);
-
-            if (!res)
-            {
-                iContentType->Des().Copy(KMimetypeRM);
-                iMimeType->Des().Copy(KMimetypeRM);
-            }
-            else
-            {
-                iContentType->Des().Copy(KNullDesC);
-                iMimeType->Des().Copy(KNullDesC8);
-            }
-        }
-        else if ((iFileName->Right(4).Compare(K3gpFileExtension()) == 0) ||
-                 (iFileName->Right(4).Compare(KMp4FileExtension()) == 0))
-        {
-            TDataRecognitionResult result;
-            err = ls.RecognizeData(*iFileName, *iHeaderData, result);
-            if (!err && (result.iConfidence >= CApaDataRecognizerType::EProbable))
-            {
-                iContentType->Des().Copy(result.iDataType.Des8());
-                iMimeType->Des().Copy(result.iDataType.Des8());
-            }
-            else
-            {
-                iContentType->Des().Copy(KNullDesC);
-                iMimeType->Des().Copy(KNullDesC8);
-            }
-        }
-        ls.Close();
-    }
-    else
-    {
-        iContentType->Des().Copy(KNullDesC);
-        iMimeType->Des().Copy(KNullDesC8);
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver::ResolveContentTypeL -");
-}
-//
-
-void CMMAEMCResolver::ResolveContentTypeL(const TDesC& /*aFileName*/, TDes8& /*aMimeType*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: ResolveContentTypeL");
-}
-
-void CMMAEMCResolver::GetSupportedContentTypesL(CDesC16Array& aMimeTypeArray)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: GetSupportedContentTypesL +");
-    // All supported mimetypes are taken from "MimeTypes.h"
-    TBuf16<KContentTypeMaxLength> tempBuf;
-    tempBuf.Copy(KMimetype3GPP);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetype3GPP2);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeAAC);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeAMR);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeAMRWB);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeMPEG);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeMP4);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeXMSWMA);
-    aMimeTypeArray.AppendL(tempBuf);
-    tempBuf.Zero();
-    tempBuf.Copy(KMimetypeRM);
-    aMimeTypeArray.AppendL(tempBuf);
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAEMCResolver :: GetSupportedContentTypesL -");
-}
-
-// EMC - II
-void CMMAEMCResolver::SetSourceInfoL(const HBufC8* aHeaderData)
-{
-    iHeaderData = aHeaderData;
-    ResolveContentTypeL();
-}
-
-TBool CMMAEMCResolver::IsRealVideoTypeL(const TDesC8& aHeader)
-{
-    TBool result = EFalse;
-
-    CHXMetaDataUtility *putil;
-    putil = CHXMetaDataUtility::NewL();
-    CleanupStack::PushL(putil);
-    TRAPD(err, putil->OpenDesL((TDesC8 &)aHeader));
-    ELOG1( EJavaMMAPI, "MMA:CMMAEMCResolver::IsRealVideoTypeL, err = %d", err);
-
-    if (err != KErrNone)
-    {
-        CleanupStack::Pop(putil);
-        putil->ResetL();
-        delete putil;
-        return EFalse;
-    }
-
-    TUint count = 0;
-    putil->GetMetaDataCount(count);
-
-    TUint i;
-    HXMetaDataKeys::EHXMetaDataId  id;
-
-    for (i = 0; i < count; i++)
-    {
-        HBufC* pDes = NULL;
-
-        putil->GetMetaDataAt(i, id, pDes);
-
-        if (id == HXMetaDataKeys::EHXMimeType)
-        {
-            if (IsRealMimeTypeSupported(*pDes))
-            {
-                result = ETrue;
-            }
-        }
-    }
-
-    CleanupStack::Pop(putil);
-
-    putil->ResetL();
-    delete putil;
-
-    return result;
-}
-
-TBool CMMAEMCResolver::IsRealMimeTypeSupported(const TDesC& aMimeType)
-{
-    TBool match = EFalse;
-
-    if (!aMimeType.Compare(KRVMimeType1()))
-    {
-        match = ETrue;
-        return match;
-    }
-    if (!aMimeType.Compare(KRVMimeType2()))
-    {
-        match = ETrue;
-        return match;
-    }
-    if (!aMimeType.Compare(KRVMimeType3()))
-    {
-        match = ETrue;
-        return match;
-    }
-
-    return match;
-}
-//
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/cmmamanager.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class uses player factories to generate different players
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <ecam.h>
-
-#include "cmmamanager.h"
-#include "cmmaaudioplayerfactory.h"
-#include "cmmavideoplayerfactory.h"
-#include "cmmaaudiorecorderfactory.h"
-#include "cmmacameraplayerfactory.h"
-#include "cmmamidiplayerfactory.h"
-#include "cmmavideourlplayerfactory.h"
-#include "cmmaaudiostreamplayerfactory.h"
-//#include "cmmaanimationplayerfactory.h"
-
-#ifdef RD_JAVA_OMA_DRM_V2
-#include "cmmadrmplayerfactory.h"
-#endif // RD_JAVA_OMA_DRM_V2
-
-// index of CMMAAudioStreamPlayerFactory in iPlayerFactories
-// if CMMAAudioStreamPlayerFactory is moved in iPlayerFactories
-// this constant should be updated accordingly
-const TInt KAudioStreamPlayerFactoryIndex = 2;
-
-CMMAManager::~CMMAManager()
-{
-    iPlayerFactories.ResetAndDestroy();
-    iPlayerFactories.Close();
-}
-
-CMMAManager::CMMAManager()
-{
-}
-
-void CMMAManager::ConstructL(TInt aMIDletSuiteID)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAManager::ConstructL +");
-    //
-    // Create and insert known player factories
-    //
-
-    CMMAVideoUrlPlayerFactory* videoUrlPlayerFactory = CMMAVideoUrlPlayerFactory::NewLC();
-    AddPlayerFactoryL(videoUrlPlayerFactory);
-    CleanupStack::Pop(); // videoUrlPlayerFactory
-
-    CMMAMIDIPlayerFactory* midiPlayerFactory = CMMAMIDIPlayerFactory::NewLC();
-    AddPlayerFactoryL(midiPlayerFactory);
-    CleanupStack::Pop(); // midiPlayerFactory
-
-    CMMAAudioStreamPlayerFactory* audioStreamPlayerFactory =
-        CMMAAudioStreamPlayerFactory::NewLC();
-    AddPlayerFactoryL(audioStreamPlayerFactory);
-    CleanupStack::Pop(); // audioStreamPlayerFactory
-
-    CMMAVideoPlayerFactory* videoPlayerFactory = CMMAVideoPlayerFactory::NewLC();
-    AddPlayerFactoryL(videoPlayerFactory);
-    CleanupStack::Pop(); // videoPlayerFactory
-
-    CMMAAudioPlayerFactory* audioPlayerFactory = CMMAAudioPlayerFactory::NewLC();
-    AddPlayerFactoryL(audioPlayerFactory);
-    CleanupStack::Pop(); // audioPlayerFactory
-
-    CMMAAudioRecorderFactory* audioRecorderFactory =
-        CMMAAudioRecorderFactory::NewLC(aMIDletSuiteID);
-    AddPlayerFactoryL(audioRecorderFactory);
-    CleanupStack::Pop(); // audioRecorderFactory
-
-/*
-    CMMAAnimationPlayerFactory* animationPlayerFactory =
-        CMMAAnimationPlayerFactory::NewLC();
-    AddPlayerFactoryL(animationPlayerFactory);
-    CleanupStack::Pop(); // animationPlayerFactory
-*/
-
-    // Add camera playerfactory only if there is a camera
-    if (CCamera::CamerasAvailable() > 0)
-    {
-        CMMACameraPlayerFactory* cameraPlayerFactory =
-            CMMACameraPlayerFactory::NewLC();
-        AddPlayerFactoryL(cameraPlayerFactory);
-        CleanupStack::Pop(); // cameraPlayerFactory
-    }
-
-#ifdef RD_JAVA_OMA_DRM_V2
-    CMMADRMPlayerFactory* drmPlayerFactory =
-        CMMADRMPlayerFactory::NewLC(videoPlayerFactory);
-    AddPlayerFactoryL(drmPlayerFactory);
-    CleanupStack::Pop(); // drmPlayerFactory
-#endif // RD_JAVA_OMA_DRM_V2
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAManager::ConstructL -");
-}
-
-void CMMAManager::StaticCreateManagerL(CMMAManager** aManager,
-                                       TInt aMIDletSuiteID)
-{
-    CMMAManager* self = new(ELeave) CMMAManager();
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aMIDletSuiteID);
-    CleanupStack::Pop();
-
-    *aManager = self;
-}
-
-/**
- * Use factories to create a player from content type
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC& aContentType)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aContentType);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * Use factories to create a player from locator
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC& aProtocol,
-                                       const TDesC& aMiddlePart,
-                                       const TDesC& aParameters)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aProtocol,
-                             aMiddlePart,
-                             aParameters);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * Use factories to create a player from header data
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC8& aHeaderData)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aHeaderData);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * From MMMAPlayerFactory. Get all supported protocols
- */
-void CMMAManager::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aSupportedProtocols)
-{
-    // Query supported protocols from all player factories
-    for (TInt i = 0; i < iPlayerFactories.Count(); i++)
-    {
-        iPlayerFactories[ i ]->GetSupportedProtocolsL(aContentType,
-                aSupportedProtocols);
-    }
-}
-
-/**
- * From MMMAPlayerFactory. Get all supported content types
- */
-void CMMAManager::GetSupportedContentTypesL(
-    const TDesC& aProtocol,
-    CDesC16Array& aContentTypes)
-{
-    // Get all supported content types from PlayerFactories
-    for (TInt i = 0; i < iPlayerFactories.Count(); i++)
-    {
-        iPlayerFactories[ i ]->GetSupportedContentTypesL(aProtocol,
-                aContentTypes);
-    }
-}
-
-EXPORT_C void CMMAManager::AddPlayerFactoryL(MMMAPlayerFactory* aPlayerFactory)
-{
-    User::LeaveIfError(iPlayerFactories.Append(aPlayerFactory));
-}
-
-void CMMAManager::SetSourceInfoL(const TUint8* aHeader, TInt aLength)
-{
-
-    if (iPlayerFactories.Count() > KAudioStreamPlayerFactoryIndex)
-    {
-        // assumption - iPlayerFactories[KAudioStreamPlayerFactoryIndex] is CMMAAudioStreamPlayerFactory
-        CMMAAudioStreamPlayerFactory* audiostreamplayerfactory =
-            static_cast<CMMAAudioStreamPlayerFactory*>(iPlayerFactories[ KAudioStreamPlayerFactoryIndex ]);
-        audiostreamplayerfactory->SetSourceInfoL(aHeader, aLength);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.emc/emcsourceinfo.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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:
-*
-*/
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-#include "com_nokia_microedition_media_protocol_EMCSourceInfo.h"
-#include "cmmamanager.h"
-
-LOCAL_C void SetHeaderDataL(
-    CMMAManager* aManager,
-    const TUint8* aHeader,
-    TInt aLength)
-{
-    aManager->SetSourceInfoL(aHeader, aLength);
-}
-
-/*
- * Class:     com_nokia_microedition_media_protocol_http_EMCSourceInfo
- * Method:    _writeHeaderData
- * Signature: (II[B)V
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_protocol_EMCSourceInfo__1writeHeaderData
-(JNIEnv* aJni, jobject, jint aEventSourceHandle, jint aManagerHandle, jbyteArray aHeader)
-{
-    // Development time check.
-    __ASSERT_DEBUG((aEventSourceHandle > 0) && (aManagerHandle > 0), User::Invariant());
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);	
-    CMMAManager* manager = reinterpret_cast< CMMAManager* >(aManagerHandle);
-
-    if (aHeader)
-    {
-        // Get pointer to Java header data
-        jbyte* data = aJni->GetByteArrayElements(aHeader, NULL);
-
-        // if data is null Java data could not be obtained to native and
-        // KErrNoMemory is returned to Java
-        if (!data)
-        {
-            return KErrNoMemory;
-        }
-
-        TInt headerDataLength = aJni->GetArrayLength(aHeader);
-
-        TInt err = eventSource->ExecuteTrap(&SetHeaderDataL,
-                                            manager,
-                                            (const TUint8*)data,
-                                            headerDataLength);
-
-        // release bytes got with GetByteArrayElements
-        aJni->ReleaseByteArrayElements(aHeader,
-                                       data,
-                                       0);
-
-        return err;
-    }
-    else
-    {
-        // if aHeader is NULL, this method should not have been called
-        // from java
-        return KErrBadHandle;
-    }
-}
--- a/javauis/mmapi_qt/baseline/src.mmf/cmmamanager.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class uses player factories to generate different players
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <ECam.h>
-
-#include "CMMAManager.h"
-#include "CMMAAudioPlayerFactory.h"
-#include "CMMAVideoPlayerFactory.h"
-#include "CMMAAudioRecorderFactory.h"
-#include "CMMACameraPlayerFactory.h"
-#include "CMMAMidiPlayerFactory.h"
-#include "CMMAVideoUrlPlayerFactory.h"
-
-#ifdef __MMA_AUDIOSTREAMING__
-#include "CMMAAudioStreamPlayerFactory.h"
-#endif // __MMA_AUDIOSTREAMING__
-
-#ifdef __MMA_ANIMATED_GIF__
-#include "CMMAAnimationPlayerFactory.h"
-#endif // __MMA_ANIMATED_GIF__
-
-#ifdef RD_JAVA_OMA_DRM_V2
-#include "CMMADRMPlayerFactory.h"
-#endif // RD_JAVA_OMA_DRM_V2
-
-CMMAManager::~CMMAManager()
-{
-    iPlayerFactories.ResetAndDestroy();
-    iPlayerFactories.Close();
-}
-
-CMMAManager::CMMAManager()
-{
-}
-
-void CMMAManager::ConstructL(TInt aMIDletSuiteID)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAManager::ConstructL +");
-    //
-    // Create and insert known player factories
-    //
-
-    CMMAVideoUrlPlayerFactory* videoUrlPlayerFactory = CMMAVideoUrlPlayerFactory::NewLC();
-    AddPlayerFactoryL(videoUrlPlayerFactory);
-    CleanupStack::Pop(); // videoUrlPlayerFactory
-
-    CMMAMIDIPlayerFactory* midiPlayerFactory = CMMAMIDIPlayerFactory::NewLC();
-    AddPlayerFactoryL(midiPlayerFactory);
-    CleanupStack::Pop(); // midiPlayerFactory
-
-    CMMAVideoPlayerFactory* videoPlayerFactory = CMMAVideoPlayerFactory::NewLC();
-    AddPlayerFactoryL(videoPlayerFactory);
-    CleanupStack::Pop(); // videoPlayerFactory
-
-#ifdef __MMA_AUDIOSTREAMING__
-    CMMAAudioStreamPlayerFactory* audioStreamPlayerFactory =
-        CMMAAudioStreamPlayerFactory::NewLC();
-    AddPlayerFactoryL(audioStreamPlayerFactory);
-    CleanupStack::Pop(); // audioStreamPlayerFactory
-#endif // __MMA_AUDIOSTREAMING__
-
-    CMMAAudioPlayerFactory* audioPlayerFactory = CMMAAudioPlayerFactory::NewLC();
-    AddPlayerFactoryL(audioPlayerFactory);
-    CleanupStack::Pop(); // audioPlayerFactory
-
-    CMMAAudioRecorderFactory* audioRecorderFactory =
-        CMMAAudioRecorderFactory::NewLC(aMIDletSuiteID);
-    AddPlayerFactoryL(audioRecorderFactory);
-    CleanupStack::Pop(); // audioRecorderFactory
-
-#ifdef __MMA_ANIMATED_GIF__
-    CMMAAnimationPlayerFactory* animationPlayerFactory =
-        CMMAAnimationPlayerFactory::NewLC();
-    AddPlayerFactoryL(animationPlayerFactory);
-    CleanupStack::Pop(); // animationPlayerFactory
-#endif // __MMA_ANIMATED_GIF__
-
-    // Add camera playerfactory only if there is a camera
-    if (CCamera::CamerasAvailable() > 0)
-    {
-        CMMACameraPlayerFactory* cameraPlayerFactory =
-            CMMACameraPlayerFactory::NewLC();
-        AddPlayerFactoryL(cameraPlayerFactory);
-        CleanupStack::Pop(); // cameraPlayerFactory
-    }
-
-#ifdef RD_JAVA_OMA_DRM_V2
-    CMMADRMPlayerFactory* drmPlayerFactory =
-        CMMADRMPlayerFactory::NewLC(videoPlayerFactory);
-    AddPlayerFactoryL(drmPlayerFactory);
-    CleanupStack::Pop(); // drmPlayerFactory
-#endif // RD_JAVA_OMA_DRM_V2
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAManager::ConstructL -");
-}
-
-void CMMAManager::StaticCreateManagerL(CMMAManager** aManager,
-                                       TInt aMIDletSuiteID)
-{
-    CMMAManager* self = new(ELeave) CMMAManager();
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aMIDletSuiteID);
-    CleanupStack::Pop();
-
-    *aManager = self;
-}
-
-/**
- * Use factories to create a player from content type
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC& aContentType)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aContentType);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * Use factories to create a player from locator
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC& aProtocol,
-                                       const TDesC& aMiddlePart,
-                                       const TDesC& aParameters)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aProtocol,
-                             aMiddlePart,
-                             aParameters);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * Use factories to create a player from header data
- *
- */
-CMMAPlayer* CMMAManager::CreatePlayerL(const TDesC8& aHeaderData)
-{
-    // Try all factories, in order
-    TInt factoryCount = iPlayerFactories.Count();
-    for (TInt i = 0; i < factoryCount; i++)
-    {
-        CMMAPlayer* player = iPlayerFactories[ i ]->CreatePlayerL(aHeaderData);
-        if (player)
-        {
-            return player;
-        }
-    }
-    // No PlayerFactory accepted the content type
-    return NULL;
-}
-
-/**
- * From MMMAPlayerFactory. Get all supported protocols
- */
-void CMMAManager::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aSupportedProtocols)
-{
-    // Query supported protocols from all player factories
-    for (TInt i = 0; i < iPlayerFactories.Count(); i++)
-    {
-        iPlayerFactories[ i ]->GetSupportedProtocolsL(aContentType,
-                aSupportedProtocols);
-    }
-}
-
-/**
- * From MMMAPlayerFactory. Get all supported content types
- */
-void CMMAManager::GetSupportedContentTypesL(
-    const TDesC& aProtocol,
-    CDesC16Array& aContentTypes)
-{
-    // Get all supported content types from PlayerFactories
-    for (TInt i = 0; i < iPlayerFactories.Count(); i++)
-    {
-        iPlayerFactories[ i ]->GetSupportedContentTypesL(aProtocol,
-                aContentTypes);
-    }
-}
-
-EXPORT_C void CMMAManager::AddPlayerFactoryL(MMMAPlayerFactory* aPlayerFactory)
-{
-    User::LeaveIfError(iPlayerFactories.Append(aPlayerFactory));
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.nga/cmmasurfacewindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,728 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplayWindow functionality
-*               in graphics surface based displays for Helix engine.
-*
-*/
-
-//  Include Files
-#include <logger.h>
-#include "cmmasurfacewindow.h"
-#include "cmmaplayer.h"
-
-// Used for iDisplay member
-#include "mmmadisplay.h"
-
-CMMASurfaceWindow* CMMASurfaceWindow::NewL(
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer)
-{
-    CMMASurfaceWindow* self =
-        new(ELeave) CMMASurfaceWindow(aEventSource,
-                                      aPlayer);
-    return self;
-}
-
-// Destructor (virtual by CBase)
-CMMASurfaceWindow::~CMMASurfaceWindow()
-{
-    // It's not allowed to delete any nonsharable object here.
-    // This must be done in Destroy().
-    // If the iDisplay is set,
-    // instance should be deleted by sending
-    // event from UI to be received by MUiEventConsumer.
-}
-
-CMMASurfaceWindow::CMMASurfaceWindow(
-    MMAFunctionServer* aEventSource,
-    CMMAPlayer* aPlayer):
-        iEventSource(aEventSource),
-        iPlayer(aPlayer),
-        iVideoDisplayInitState(EUIResourcesAndSurfaceParametersNotSet)
-{
-    // Empty rect until video size is known
-    iContentRect.SetRect(0, 0, 0, 0);
-    iParentRect.SetRect(0, 0, 0, 0);
-    iRWindowRect.SetRect(0, 0, 0, 0);
-}
-
-void CMMASurfaceWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-void CMMASurfaceWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-void CMMASurfaceWindow::SetDrawRectThread( const TRect& aRect )
-    {
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDrawRectThread TL %d %d",
-    	aRect.iTl.iX, aRect.iTl.iY );
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDrawRectThread BR %d %d",
-    	aRect.iBr.iX, aRect.iBr.iY );
-
-    iContentRect = aRect;
-    
-    TInt error = StaticRedrawVideo(*this);
-    if ( KErrNone != error  )
-		 {
-     ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::SetDrawRectThread, StaticRedrawVideo error = %d", error);
-     }
-    }
-
-void CMMASurfaceWindow::SetRWindowRect(const TRect& aRect,
-                                       MMMADisplay::TThreadType aThreadType)
-{
-		LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetRWindowRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetRWindowRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iRWindowRect = aRect;
-
-    if (MMMADisplay::EMmaThread == aThreadType)
-    {
-        if (iDisplay)
-        {
-				/*		    iDisplay->UIGetCallback( *this,
-                                    CMMASurfaceWindow::ESetDrawRect);
-        */                            
-	     // MMAPI UI 3.x req.
-	     iDisplay->GetCallbackInUiThread( (TInt)CMMASurfaceWindow::ESetDrawRect );
-       LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetRWindowRect after GetCallbackInUiThread " );
-
-        }
-    }
-    else if (MMMADisplay::EUiThread == aThreadType)
-    {
-        /*TInt error = StaticRedrawVideo(*this);
-        if (KErrNone != error)
-        {
-		   LOG1(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetRWindowRect, StaticRedrawVideo error = %d", error);
-        }
-				*/
-		   LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetRWindowRect else GetCallbackInUiThread + " );
-		   iDisplay->GetCallbackInUiThread( (TInt)CMMASurfaceWindow::ESetDrawRect );
-       LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetRWindowRect else GetCallbackInUiThread -" );
-    }
-}
-
-void CMMASurfaceWindow::SetDrawRect( const TRect& aRect )
-		{
-		LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDrawRect TL %d %d",
-    	aRect.iTl.iX, aRect.iTl.iY );
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDrawRect BR %d %d",
-    	aRect.iBr.iX, aRect.iBr.iY );
-
-		iContentRect = aRect;
-		if ( iDisplay )
-		  {
-		 // iDisplay->UIGetCallback( *this,
-		  //                         CMMASurfaceWindow::ESetDrawRect );
-		   // MMAPI UI 3.x req.
-		   iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ESetDrawRect);
-       LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetDrawRect, after GetCallbackInUiThread");
-		  }
-		}
-
-TInt CMMASurfaceWindow::StaticRedrawVideo(CMMASurfaceWindow& aSurfaceWindow)
-{
-    TRAPD(error, aSurfaceWindow.RedrawVideoL());
-    return error;
-}
-
-void CMMASurfaceWindow::RedrawVideoL()
-{
-    if (!iMediaClientVideoDisplay)
-    {
-      LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::RedrawVideoL: no MediaClientVideoDisplay set, aborting -" );
-        return;
-    }
-
-    if (iWindow)
-    {
-        TRect contentRect;
-        if (iVisible)
-        {
-            contentRect = iContentRect;
-            ScaleVideoL(contentRect);
-        }
-        else
-        {
-            TRect emptyRect(0,0,0,0);
-            contentRect = emptyRect;
-        }
-
-        // align parent rect with respect to RWindow
-        TRect relativeParentRect;
-        relativeParentRect = iParentRect;
-        relativeParentRect.Move(-iRWindowRect.iTl);
-
-        // setting video draw rect and adjusting it to window
-        TRect drawRect = contentRect;
-        drawRect.Move(relativeParentRect.iTl);
-
-        // Area where should be drawn is the intersection of drawRect and relativeParentRect.
-        TRect areaRect = relativeParentRect;
-        areaRect.Intersection(drawRect);
-
-        iMediaClientVideoDisplay->SetWindowClipRectL(*iWindow,
-                areaRect,
-                iVideoCropRegion);
-
-        iMediaClientVideoDisplay->SetVideoExtentL(*iWindow,
-                areaRect,
-                iVideoCropRegion);
-
-			LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::RedrawVideoL: RedrawWindows() areaRect is %d X %d",areaRect.Width(),areaRect.Height() );
-
-        iMediaClientVideoDisplay->RedrawWindows(iVideoCropRegion);
-    }
-}
-
-void CMMASurfaceWindow::ScaleVideoL(const TRect& aRect)
-{
-    // return without scaling incase cropregion dimensions are zero
-    if (!(iVideoCropRegion.Width() && iVideoCropRegion.Height()))
-    {
-        return;
-    }
-
-    TReal32 numerator = 1.0f * (aRect.Width() - iVideoCropRegion.Width());
-    TReal32 denominator = 1.0f * iVideoCropRegion.Width();
-    // new video width percent(relative to the original width) to
-    // which video has to be scaled.
-    TReal32 scaleWidthPercent = 100.0f + (100.0f * (numerator/denominator));
-
-    numerator = 1.0f * (aRect.Height() - iVideoCropRegion.Height());
-    denominator = 1.0f * iVideoCropRegion.Height();
-    // new video height percent(relative to the original height) to
-    // which video has to be scaled.
-    TReal32 scaleHeightPercent = 100.0f + (100.0f * (numerator/denominator));
-
-	LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow:: scaleWidthPercent, scaleHeightPercent %d %d",
-	scaleWidthPercent, scaleHeightPercent );
-
-    iMediaClientVideoDisplay->SetScaleFactorL(scaleWidthPercent,
-            scaleHeightPercent,
-            iVideoCropRegion);
-}
-
-const TRect& CMMASurfaceWindow::DrawRect()
-{
-    return iContentRect;
-}
-
-TSize CMMASurfaceWindow::WindowSize()
-{
-    return iParentRect.Size();
-}
-
-void CMMASurfaceWindow::SetPosition(const TPoint& aPosition)
-{
-    iContentRect = TRect(aPosition, iContentRect.Size());
-    TInt error = StaticRedrawVideo(*this);
-    if (KErrNone != error)
-    {
-   ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::SetPosition, StaticRedrawVideo error = %d", error);
-    }
-}
-
-TBool CMMASurfaceWindow::IsVisible() const
-  {
-  LOG1( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::IsVisible %d ", iVisible );
-  return iVisible;
-  }
-
-void CMMASurfaceWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
-{
-  LOG1( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetVisible aVisible %d", aVisible );
-    RPointerArray< CMMAPlayer > players = iEventSource->Players();
-
-    if (players.Find(iPlayer) != KErrNotFound)
-    {
-    LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetVisible : Player found");
-        if (aVisible != iVisible)
-        {
-    	LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetVisible: Changed visibility" );
-            iVisible = aVisible;
-            if (iDisplay)
-            {
-      			 //MMAPI UI 3.x req.
-     					iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ESetDrawRect);
-     					LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetVisible,GetCallbackInUiThread");
-            }
-            
-
-											          /*  if (aUseEventServer)
-											            {
-											                TInt error = StaticRedrawVideo(*this);
-											                if (KErrNone != error)
-											                {
-											         ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::SetVisible, StaticRedrawVideo error = %d", error);
-											                }
-											            }
-											            else // in MMA thread, so switch to UI thread
-											            {
-											                if (iDisplay)
-											                {
-													      				//iDisplay->UIGetCallback(*this,
-													     				  //                     CMMASurfaceWindow::ESetDrawRect );
-													    				  //MMAPI UI 3.x req.
-													     					iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ESetDrawRect);
-											         					LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::SetVisible,GetCallbackInUiThread");
-											                }
-											            }
-											            */
-        }
-    }
-}
-
-void CMMASurfaceWindow::SetWindowRect(const TRect& aRect,MMMADisplay::TThreadType /*aThreadType*/)
-{
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetWindowRect aRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetWindowRect aRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iParentRect = aRect;
-}
-
-void CMMASurfaceWindow::SetVideoCropRegion(const TRect& aRect)
-{
-    // video size
-    iVideoCropRegion = aRect;
-}
-
-const TRect& CMMASurfaceWindow::WindowRect()
-{
-    return iParentRect;
-}
-
-void CMMASurfaceWindow::ContainerDestroyed()
-{
-    // We are in UI thread context now.
-    CleanVideoDisplay();
-}
-
-void CMMASurfaceWindow::SetDisplay(MMMADisplay *aDisplay)
-{
-    LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDisplay +" );
-
-    if (iDisplay != aDisplay)
-    {
-        if (iDisplay)
-        {
-            // Clear the resources created within the old Display
-         	 iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ECleanVideoDisplay );
-        }
-
-        // Set the new Display
-        iDisplay = aDisplay;
-
-        /*if ( iDisplay )
-            {
-            // Get a DSA resources for the new Display
-            //iDisplay->UIGetDSAResources( *this, MMMADisplay::EMmaThread );
-            CMMACanvasDisplay* display =  static_cast< CMMACanvasDisplay* >( iDisplay );
-
-            display->GetWindowResources( this, MMMADisplay::EMmaThread );
-            }
-
-            */
-        }
-
-    LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::SetDisplay -" );
-    }
-
-void CMMASurfaceWindow::ContainerSet()
-    {
-    	LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ContainerSet" );
-    // We are in UI thread now
-
-    // Container was probably not set when
-    // iDisplay was set,
-    // we can now try get the DSA stuff again
-    if (iDisplay)
-    {
-        // Get a DSA stuff for the new Display
-//        iDisplay->UIGetDSAResources( *this, MMMADisplay::EUiThread );
-        }
-    }
-
-void CMMASurfaceWindow::Destroy()
-    {
-    LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::Destroy" );
-    // Delete itself
-    delete this;
-    }
-
-void CMMASurfaceWindow::ProcureWindowResourcesFromQWidget(RWsSession * aWs,
-    CWsScreenDevice* aScreenDevice,
-    RWindowBase* aWindow)
-	{
-		iWs = aWs;
-    iScreenDevice = aScreenDevice;
-    iWindow = aWindow;
-		LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget" );
-		switch ( iVideoDisplayInitState )
-		  {
-		  	LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -7" );
-			case EUIResourcesAndSurfaceParametersNotSet:
-			     {
-			     LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -8" );
-			     iVideoDisplayInitState =
-			     EUIResourcesSetAndSurfaceParametersNotSet;
-			     }
-			     break;
-			case ESurfaceParametersSetAndUIResourcesNotSet:
-			     {
-			     	LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -9" );
-			     iVideoDisplayInitState =
-			     EUIResourcesAndSurfaceParametersSet;
-			     }
-			     break;
-			 // can not occur
-			case EUIResourcesSetAndSurfaceParametersNotSet:
-		  case EUIResourcesAndSurfaceParametersSet:
-			default:
-           {LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -10" );
-      		 __ASSERT_DEBUG( EFalse, User::Invariant() );
-           }
-			     break;
-		  }
-
-		if( iVideoDisplayInitState == EUIResourcesAndSurfaceParametersSet )
-			{
-				LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -11" );
-			TRAPD(error, InitVideoDisplayL());
-			LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::ProcureWindowResourcesFromQWidget  -12" );
-			if ( KErrNone != error )
-				{
-				ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::MdcDSAResourcesCallback, error = %d", error);
-				}
-			}
-
-	}
-/*
-void CMMASurfaceWindow::MdcDSAResourcesCallback(
-    RWsSession &aWs,
-    CWsScreenDevice &aScreenDevice,
-    RWindowBase &aWindow )
-    {
-    LOG(EJavaMMAPI,EInfo, "MID::CMMASurfaceWindow::MdcDSAResourcesCallback" );
-
-    // We are in UI thread context now.
-    iWs = &aWs;
-    iScreenDevice = &aScreenDevice;
-    iWindow = &aWindow;
-
-		switch ( iVideoDisplayInitState )
-		  {
-			case EUIResourcesAndSurfaceParametersNotSet:
-			     {
-			     iVideoDisplayInitState =
-			     EUIResourcesSetAndSurfaceParametersNotSet;
-			     }
-			     break;
-			case ESurfaceParametersSetAndUIResourcesNotSet:
-			     {
-			     iVideoDisplayInitState =
-			     EUIResourcesAndSurfaceParametersSet;
-			     }
-			     break;
-			 // can not occur
-			case EUIResourcesSetAndSurfaceParametersNotSet:
-		  case EUIResourcesAndSurfaceParametersSet:
-			default:
-           {
-      		 __ASSERT_DEBUG( EFalse, User::Invariant() );
-           }
-			     break;
-		  }
-
-		if( iVideoDisplayInitState == EUIResourcesAndSurfaceParametersSet )
-			{
-			TRAPD(error, InitVideoDisplayL());
-			if ( KErrNone != error )
-				{
-				LOG1(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::MdcDSAResourcesCallback, error = %d", error);
-				}
-			}
-    }
-*/
-void CMMASurfaceWindow::UICallback( TInt aCallbackId )
-    {
-    // We are in UI thread context now.
-    LOG1( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::MdcUICallback CallbackId = %d", aCallbackId );
-
-    TInt error = KErrNone;
-    switch (aCallbackId)
-    {
-    case ERemoveSurface:
-    {
-        DoRemoveSurface();
-    }
-    break;
-    case ESetDrawRect:
-    {
-        error = StaticRedrawVideo(*this);
-           ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::MdcUICallback,StaticRedrawVideo error = %d", error);
-    }
-    break;
-    case EInitVideoDisplay:
-    {
-        TRAP(error, InitVideoDisplayL());
-			     ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::MdcUICallback,InitVideoDisplayL error = %d", error);
-    }
-    break;
-    case ESetChangedSurfaceParameters:
-    {
-        DoSetChangedSurfaceParameters();
-    }
-    break;
-    case EResetSurfaceParameters:
-    {
-        DoResetSurfaceParameters();
-    }
-    break;
-    case ECleanVideoDisplay:
-    {
-        CleanVideoDisplay();
-    }
-    break;
-    case EDestroyWindow:
-    {
-        Destroy();
-    }
-    break;
-    default:
-    {
-        __ASSERT_DEBUG(EFalse, User::Invariant());
-    }
-    break;
-    }
-}
-
-void CMMASurfaceWindow::SetSurfaceParameters(const TSurfaceId& aSurfaceId,
-        const TRect& aCropRect,
-        const TVideoAspectRatio& aPixelAspectRatio)
-{
-    iSurfaceId = aSurfaceId;
-    iCropRect = aCropRect;
-    iPixelAspectRatio = aPixelAspectRatio;
-
-    switch ( iVideoDisplayInitState )
-		  {
-			case EUIResourcesAndSurfaceParametersNotSet:
-			     {
-			     iVideoDisplayInitState =
-			     ESurfaceParametersSetAndUIResourcesNotSet;
-			     }
-			     break;
-			case EUIResourcesSetAndSurfaceParametersNotSet:
-			     {
-			     iVideoDisplayInitState =
-			     EUIResourcesAndSurfaceParametersSet;
-			     }
-			     break;
-			  // control reaches below two switch cases when
-			  // playback is looped using setLoopCount() in java.
-		  case ESurfaceParametersSetAndUIResourcesNotSet:
-		  	   {
-			     }
-			     break;
-			  // update surface parameters and return with out calling
-			  // InitVideoDisplayL again.
-			case EUIResourcesAndSurfaceParametersSet:
-			     {
-			    // iDisplay->UIGetCallback( *this, CMMASurfaceWindow::EResetSurfaceParameters );
-			    //MMAPI UI 3.x req.
-			    LOG(EJavaMMAPI,EInfo,"CMMASurfaceWindow::SetSurfaceParameters : switch case EUIResourcesAndSurfaceParametersSet +");
-			    iDisplay->GetCallbackInUiThread( (TInt)CMMASurfaceWindow::EResetSurfaceParameters );
-			    LOG(EJavaMMAPI,EInfo,"CMMASurfaceWindow::SetSurfaceParameters : switch case EUIResourcesAndSurfaceParametersSet -");
-			     return;
-			     }
-			     // break; not reachable
-			default: // can not occur
-           {
-      		 __ASSERT_DEBUG( EFalse, User::Invariant() );
-           }
-			     break;
-		  }
-
-    if ( iVideoDisplayInitState == EUIResourcesAndSurfaceParametersSet )
-    	{
-    	//iDisplay->UIGetCallback( *this, CMMASurfaceWindow::EInitVideoDisplay );
-    	//MMAPI UI 3.x req.
-    	iDisplay->GetCallbackInUiThread( (TInt)CMMASurfaceWindow::EInitVideoDisplay );
-			LOG(EJavaMMAPI,EInfo,"CMMASurfaceWindow::SetSurfaceParameters,EUIResourcesAndSurfaceParametersSet");
-    	}
-		}
-
-void CMMASurfaceWindow::SetChangedSurfaceParameters(const TSurfaceId& aSurfaceId,
-        const TRect& aCropRect,
-        const TVideoAspectRatio& aPixelAspectRatio)
-{
-    iSurfaceId = aSurfaceId;
-    iCropRect = aCropRect;
-    iPixelAspectRatio = aPixelAspectRatio;
-
-    if (iDisplay)
-    {
-        //iDisplay->UIGetCallback(*this, CMMASurfaceWindow::ESetChangedSurfaceParameters);
-    	LOG(EJavaMMAPI,EInfo,"CMMASurfaceWindow::SetChangedSurfaceParameters + ");
-    	iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ESetChangedSurfaceParameters);
-    	LOG(EJavaMMAPI,EInfo,"CMMASurfaceWindow::SetChangedSurfaceParameters - ");
-
-	}
-}
-
-void CMMASurfaceWindow::RemoveSurface()
-{
-    if (iDisplay)
-    {
-        iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::ERemoveSurface);                         	
-    }
-}
-
-void CMMASurfaceWindow::DoRemoveSurface()
-{
-    if (iMediaClientVideoDisplay)
-    {
-        iMediaClientVideoDisplay->RemoveSurface();
-        LOG(EJavaMMAPI,EInfo,"MID::CMMASurfaceWindow::DoRemoveSurface, Surface Removed");
-
-    }
-}
-
-void CMMASurfaceWindow::DoResetSurfaceParameters()
-{
-    __ASSERT_DEBUG((iMediaClientVideoDisplay != NULL), User::Invariant());
-
-    if (iMediaClientVideoDisplay)
-    {
-    	iMediaClientVideoDisplay->RemoveSurface();
-        TInt error = iMediaClientVideoDisplay->SurfaceCreated(iSurfaceId,
-                     iCropRect,
-                     iPixelAspectRatio,
-                     iVideoCropRegion);
-
-      ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::DoResetSurfaceParameters,SurfaceCreated error = %d", error);
-
-        iMediaClientVideoDisplay->RedrawWindows(iVideoCropRegion);
-    }
-}
-
-void CMMASurfaceWindow::DoSetChangedSurfaceParameters()
-{
-    if (iMediaClientVideoDisplay)
-    {
-        TInt error = iMediaClientVideoDisplay->SurfaceParametersChanged(iSurfaceId,
-                     iCropRect,
-                     iPixelAspectRatio);
-
-			ELOG1( EJavaMMAPI, "MID::CMMASurfaceWindow::DoSetChangedSurfaceParameters,SurfaceParametersChanged, error = %d", error);
-
-        iMediaClientVideoDisplay->RedrawWindows(iVideoCropRegion);
-    }
-}
-
-void CMMASurfaceWindow::InitVideoDisplayL()
-{
-    if (iVideoDisplayInitState != EUIResourcesAndSurfaceParametersSet)
-    {
-        User::Leave(KErrNotReady);
-    }
-
-    // check that this is the first time we are creating instance.
-    if (iMediaClientVideoDisplay)
-    {
-        __ASSERT_DEBUG(EFalse, User::Invariant());
-    }
-
-    iMediaClientVideoDisplay =
-        CMediaClientVideoDisplay::NewL(iScreenDevice->GetScreenNumber(),
-                                       iSurfaceId,
-                                       iCropRect,
-                                       iPixelAspectRatio);
-
-    // video is not scaled untill user requests explicitly
-    // so retain same video width & height.
-    TReal32 scaleWidthPercent = 100.0f;
-    TReal32 scaleHeightPercent = 100.0f;
-
-    // video rotation feature not supported in MMAPI
-    TVideoRotation videoRotation(EVideoRotationNone);
-    // no automatic scaling, can be controlled only via VideoControl
-    TAutoScaleType autoScaleType = EAutoScaleNone;
-
-    // always align video to the top left corner of the display area
-    TInt horizontalPosition(EHorizontalAlignLeft);
-    TInt verticalPosition(EVerticalAlignTop);
-
-    TInt error = iMediaClientVideoDisplay->SurfaceCreated(iSurfaceId,
-                 iCropRect,
-                 iPixelAspectRatio,
-                 iVideoCropRegion);
-
-		ELOG1( EJavaMMAPI,  "MID::CMMASurfaceWindow::InitVideoDisplayL error = %d", error );
-    User::LeaveIfError(error);
-
-    iMediaClientVideoDisplay->AddDisplayWindowL(iWindow,
-            iContentRect,
-            iVideoCropRegion,
-            iContentRect,
-            scaleWidthPercent,
-            scaleHeightPercent,
-            videoRotation,
-            autoScaleType,
-            horizontalPosition,
-            verticalPosition,
-            (RWindow*)iWindow);
-
-    RedrawVideoL();
-}
-
-void CMMASurfaceWindow::CleanVideoDisplay()
-{
-		LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::CleanVideoDisplay +" );
-
-    SetVisible(EFalse, ETrue);
-    if (iMediaClientVideoDisplay)
-    {
-        if (iWindow)
-        {
-            iMediaClientVideoDisplay->RemoveDisplayWindow(*iWindow);
-        }
-        iMediaClientVideoDisplay->RemoveSurface();
-        delete iMediaClientVideoDisplay;
-
-        iMediaClientVideoDisplay = NULL;
-        iWindow = NULL;
-        iScreenDevice = NULL;
-        iWs = NULL;
-    }
-
-    LOG( EJavaMMAPI, EInfo,  "MID::CMMASurfaceWindow::CleanVideoDisplay -" );
-}
-
-
-CMMAPlayer* CMMASurfaceWindow::UiPlayer()
-	{
-		  return iPlayer;
-	}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src.nga/cmmavideoplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,525 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing video.
-*
-*/
-
-//  INCLUDE FILES
-#include <mmf/server/mmffile.h>
-#include <logger.h>
-
-#include "cmmavideoplayer.h"
-#include "mmmadisplay.h"
-#include "mmafunctionserver.h"
-#include "cmmasurfacewindow.h"
-
-// CONSTANTS
-_LIT(KVideoControlName, "VideoControl");
-
-CMMAVideoPlayer* CMMAVideoPlayer::NewLC(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAVideoPlayer* self =
-        new(ELeave) CMMAVideoPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAVideoPlayer::~CMMAVideoPlayer()
-    {
-    LOG(EJavaMMAPI,EInfo, "MMA::CMMAVideoPlayer::~CMMAVideoPlayer" );
-
-    // Window is not able to send any
-    // callback requests to UI from now.
-    if (iSurfaceWindow)
-    {
-        iSurfaceWindow->SetDisplay(NULL);
-    }
-
-    if ( iDisplay && iDisplay->HasContainer() )
-       {
-       // Window will delete itself
-       // after all pending events are processed
-       // (lazy delete)
-//       iDisplay->UIGetCallback(
-  //             *iSurfaceWindow, CMMASurfaceWindow::EDestroyWindow );
-       iDisplay->GetCallbackInUiThread((TInt)CMMASurfaceWindow::EDestroyWindow );        	
-       }
-    else
-    {
-        delete iSurfaceWindow;
-    }
-
-    if (iDisplay)
-    {
-        TRAPD(err, iDisplay->SetWindowL(NULL));
-        if (err != KErrNone)
-        {
-            __ASSERT_DEBUG(EFalse, User::Invariant());
-        }
-    }
-
-    delete iEmptySnapshotImage;
-    delete iActiveSchedulerWait;
-}
-
-CMMAVideoPlayer::CMMAVideoPlayer(
-    CMMAMMFResolver* aResolver):
-        CMMAAudioPlayer(aResolver),
-        iVideoControllerCustomCommands(iController),
-        iVideoPlayControllerCustomCommands(iController),
-        iVideoPlaySurfaceSupportCustomCommands(iController)
-{
-    iMMASurface.iPrevSurfaceAvailable = EFalse;
-}
-
-void CMMAVideoPlayer::ConstructL()
-{
-    CMMAAudioPlayer::ConstructL();
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-}
-
-EXPORT_C void CMMAVideoPlayer::SetPlayerListenerObjectL(jobject aListenerObject,
-        JNIEnv* aJni,
-        MMMAEventPoster* aEventPoster)
-{
-    CMMAPlayer::SetPlayerListenerObjectL(aListenerObject,
-                                         aJni,
-                                         aEventPoster);
-
-    // this method must be called only ones
-    __ASSERT_DEBUG(!iSurfaceWindow, User::Invariant());
-
-    // create window for videoplayer
-    // event poster is always MMAFunctionServer type.
-
-    iSurfaceWindow = CMMASurfaceWindow::NewL(
-                         static_cast< MMAFunctionServer* >(iEventPoster),
-                         this);
-}
-
-EXPORT_C void CMMAVideoPlayer::SetDisplayL(MMMADisplay* aDisplay)
-{
-    // now it is ready to draw
-    iDisplay = aDisplay;
-		iDisplay->SetWindowL( iSurfaceWindow );
-    iSurfaceWindow->SetDisplay( aDisplay );
-    iDisplay->SetUIPlayer(this);
-
-    
-/*
-    // if state < prefeteched then we dont know actual source size yet
-    // and it will be set after prefetch
-    if ( iState >= EPrefetched )
-        {
-        SourceSizeChanged();
-        }
-     */ 
-    }
-void CMMAVideoPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::RealizeL" );
-    // DataSource must have at least 1 stream or
-    // we must have file to play
-    if ((iSourceStreams.Count() == 0) && !iFileName)
-    {
-        User::Leave(KErrNotEnoughStreams);
-    }
-
-    // If file locator is used, then file is prefetched
-    // in realized state so that FramePositioningControl
-    // can acquire frame count in REALIZED state
-    if (iFileName)
-    {
-        PrefetchFileL();
-        if (!iActiveSchedulerWait->IsStarted())
-        {
-            iActiveSchedulerWait->Start();
-        }
-        // If the player has not changed state during wait,
-        // Then there is an error condition.
-        if (iState != ERealized)
-        {
-            User::Leave(KErrNotSupported);
-        }
-    }
-    else
-    {
-        CMMAPlayer::RealizeL();
-    }
-}
-
-void CMMAVideoPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::PrefetchL" );
-    if (iFileName)
-    {
-        // File has already been prefetched when realizing
-
-        // If initDisplayMode was called before prefetch,
-        // then the display must notified about source size.
-        if (iDisplay)
-        {
-            SourceSizeChanged();
-        }
-
-        PostActionCompletedFile();
-        ChangeState( EPrefetched );
-    }
-    else
-    {
-        // Using TDes -- load the whole video
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-    // CMMASourceStream will notify with ReadCompleted
-}
-
-EXPORT_C void CMMAVideoPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::ReadCompletedL: status = %d", aStatus );
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        TRAPD(err, PrefetchDataL(aData));
-        if (err != KErrNone)
-        {
-            PostActionCompleted(err);
-        }
-        // action completed event will be delivered from handleEvent
-    }
-}
-
-void CMMAVideoPlayer::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG1( EJavaMMAPI, EInfo,  "MMA:CMMAVideoPlayer::HandleEvent %d", aEvent.iEventType.iUid );
-    
-    // event KMMFEventCategoryPlaybackComplete is handled by both Video
-    // and Audio players. first it should be handled by Video player
-    if (aEvent.iEventType == KMMFEventCategoryPlaybackComplete)
-    {
-        iSurfaceWindow->RemoveSurface();
-    }
-
-    // KNotCompleteVideoError can be notified when video is not complete
-    // ( missing sound ) but still can be played. Because
-    // CMMAAudioPlayer::HandleEvent fails with all negative error codes,
-    // do not call it with KNotCompleteVideoError error when preparing.
-    if ((aEvent.iErrorCode != KNotCompleteVideoError) ||
-            (aEvent.iEventType != KMMFEventCategoryVideoPrepareComplete))
-    {
-        CMMAAudioPlayer::HandleEvent(aEvent);
-    }
-
-    if (aEvent.iEventType == KMMFEventCategoryVideoSurfaceCreated)
-    {
-        if (aEvent.iErrorCode == KErrNone)
-        {
-            TSurfaceId surfaceId;
-            TRect cropRect;
-            TVideoAspectRatio pixelAspectRatio;
-
-            iVideoPlaySurfaceSupportCustomCommands.GetSurfaceParameters(surfaceId,
-                    cropRect,
-                    pixelAspectRatio);
-
-            if (iMMASurface.iPrevSurfaceAvailable)
-            {
-                // free Surface
-                TInt error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved(iMMASurface.iPrevSurfaceId);
-                if (KErrNone != error)
-                {
-                 	ELOG1( EJavaMMAPI, "CMMAVideoPlayer::HandleEvent:SurfaceRemoved error, %d", aEvent.iErrorCode);
-                }
-            }
-            iMMASurface.iPrevSurfaceId = surfaceId;
-            iMMASurface.iPrevSurfaceAvailable = ETrue;
-
-            iSurfaceWindow->SetSurfaceParameters(surfaceId,
-                                                 cropRect,
-                                                 pixelAspectRatio);
-
-						LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::HandleEvent: KMMFEventCategoryVideoSurfaceCreated, surface parameters set" );
-        }
-        else
-        {
-        		ELOG1( EJavaMMAPI,  "CMMAVideoPlayer::HandleEvent: error getting surface parameters, %d", aEvent.iErrorCode );
-        }
-    }
-    else if (aEvent.iEventType == KMMFEventCategoryVideoSurfaceParametersChanged)
-    {
-        if (aEvent.iErrorCode == KErrNone)
-        {
-            TSurfaceId surfaceId;
-            TRect cropRect;
-            TVideoAspectRatio pixelAspectRatio;
-
-            iVideoPlaySurfaceSupportCustomCommands.GetSurfaceParameters(surfaceId,
-                    cropRect,
-                    pixelAspectRatio);
-
-            if (iMMASurface.iPrevSurfaceAvailable)
-            {
-                // free Surface
-                TInt error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved(iMMASurface.iPrevSurfaceId);
-                if (KErrNone != error)
-                {
-                   	LOG1( EJavaMMAPI, EInfo, "CMMAVideoPlayer::HandleEvent:SurfaceRemoved error, %d", aEvent.iErrorCode);
-                }
-            }
-            iMMASurface.iPrevSurfaceAvailable = ETrue;
-            iMMASurface.iPrevSurfaceId = surfaceId;
-
-            iSurfaceWindow->SetChangedSurfaceParameters(surfaceId,
-                    cropRect,
-                    pixelAspectRatio);
-
-						LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::HandleEvent: KMMFEventCategoryVideoSurfaceParametersChanged" );
-        }
-        else
-        {
-          	ELOG1( EJavaMMAPI,  "CMMAVideoPlayer::HandleEvent: surface parameters changed error, %d", aEvent.iErrorCode );
-        }
-    }
-    else if (aEvent.iEventType == KMMFEventCategoryVideoRemoveSurface)
-    {
-    	  if (aEvent.iErrorCode == KErrNone)
-        {
-           if (iMMASurface.iPrevSurfaceAvailable)
-           {
-                // free Surface
-                TInt error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved(iMMASurface.iPrevSurfaceId);
-                if (KErrNone != error)
-                {
-				  ELOG1( EJavaMMAPI,  "CMMAVideoPlayer::HandleEvent:SurfaceRemoved error, %d", aEvent.iErrorCode);
-                }
-                iMMASurface.iPrevSurfaceAvailable = EFalse;
-           }
-        }
-        else
-        {
-           ELOG1( EJavaMMAPI, "CMMAVideoPlayer::HandleEvent:KMMFEventCategoryVideoRemoveSurface error, %d", aEvent.iErrorCode);
-        }
-    }
-    // video opened, preparing
-    else if (aEvent.iEventType == KMMFEventCategoryVideoOpenComplete)
-    {
-        if (aEvent.iErrorCode == KErrNone)
-        {
-            TInt error = iVideoPlaySurfaceSupportCustomCommands.UseSurfaces();
-    				ELOG1( EJavaMMAPI,  "MMA::CMMAVideoPlayer::HandleEvent::After UseSurfaces(), error = %d", error );
-            TInt prepareError(iVideoPlayControllerCustomCommands.Prepare());
-            if (prepareError != KErrNone)
-            {
-                // opening failed, notifying java
-                PostActionCompleted(prepareError);
-            }
-        }
-        else
-        {
-            // opening failed, notifying java
-            PostActionCompleted(aEvent.iErrorCode);
-        }
-    }
-    // final state of prefetch ( prepare completed )
-    else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
-    {
-        // This callback must be handled differently depending on whether
-        // player is created for a file locator or for a stream. When file
-        // locator is used, this callback is made in realized state. For
-        // stream it is made in prefetched state.
-        PrepareDisplay();
-        if (iFileName)
-        {
-            LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::HandleEvent: Using filename, change state to REALIZED" );
-
-            // If there is an error condition, then the player state is not
-            // changed, which indicates the error condition to StartL when
-            // the ActiveSchedulerWait returns. KNotCompleteVideoError is not
-            // considered as an error condition, instead it indicates that some
-            // elements of the media cannot be played (e.g. video OR audio)
-            if (aEvent.iErrorCode == KErrNone ||
-                    aEvent.iErrorCode == KNotCompleteVideoError)
-            {
-                ChangeState(ERealized);
-            }
-            __ASSERT_DEBUG(iActiveSchedulerWait->IsStarted(), User::Invariant());
-            iActiveSchedulerWait->AsyncStop();
-        }
-        else
-        {
-            LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::HandleEvent: Not using filename, change state to PREFETCHED" );
-            CompletePrefetch(aEvent.iErrorCode);
-        }
-    }
-    else            // in case of any other event
-    {
-        if (aEvent.iErrorCode != KErrNone)
-        {
-            PostActionCompleted(aEvent.iErrorCode);   //some other error
-        }
-    }
-}
-
-void CMMAVideoPlayer::CompletePrefetch(TInt aError)
-{
-    ELOG1( EJavaMMAPI,  "CMMAVideoPlayer::CompletePrefetch + error = %d",aError);
-    // Post KNotCompleteVideoError as KErrNone to the Java side, because
-    // video can be played.
-    if (aError == KNotCompleteVideoError)
-    {
-        LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::CompletePrefetch  KNotCompleteVideoError ");
-        // release java
-        PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::CompletePrefetch  CompleteVideoError ");
-        // release java
-        PostActionCompleted(aError);
-    }
-
-    if (aError == KErrNone || aError == KNotCompleteVideoError)
-    {
-        ChangeState(EPrefetched);
-    }
-    LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::CompletePrefetch - ");
-}
-
-void CMMAVideoPlayer::PrepareDisplay()
-{
-    LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::PrepareDisplay +" );
-    // construction should have leaved if iSurfaceWindow does not exist
-    __ASSERT_DEBUG(iSurfaceWindow,
-                   User::Panic(_L("CMMVideoPlayer::iSurfaceWindow is null"),
-                               KErrArgument));
-
-    //First place where we are certain that source size can be fetched
-    TSize sourceSize;
-
-    TInt err = iVideoControllerCustomCommands.GetVideoFrameSize(sourceSize);
-
-    ELOG1( EJavaMMAPI,  "MID::CMMAVideoPlayer::PrepareDisplay: GetVideoFrameSize err = %d", err );
-
-    // Still we did not get the size of video
-    if ((err != KErrNone) ||
-            (sourceSize.iWidth <= 0) ||
-            (sourceSize.iHeight <= 0))
-    {
-        LOG( EJavaMMAPI, EInfo,  "MID::CMMAVideoPlayer::PrepareDisplay: No sourcesize found, using SurfaceWindow size" );
-        // setting size to window size (client rect)
-        sourceSize = iSurfaceWindow->WindowSize();
-    }
-
-    // If 1x1 was got (the default size of form), it must be replaced
-    // with a valid size as controller will not accept 1x1.
-    if ((sourceSize.iWidth < KMMAVideoMinDimension) ||
-            (sourceSize.iHeight < KMMAVideoMinDimension))
-    {
-        LOG( EJavaMMAPI, EInfo,  "MID::CMMAVideoPlayer::PrepareDisplay: Unacceptable source size, using failsafe" );
-        // This is a special case and ought to be used only in
-        // the rare case that real size is not got from stream.
-        sourceSize = TSize(KMMAVideoMinDimension, KMMAVideoMinDimension);
-    }
-
-    iSourceSize = sourceSize;
-
-    // If init has been already done
-    if (iDisplay)
-    {
-        LOG( EJavaMMAPI, EInfo,  "MID::CMMAVideoPlayer::PrepareDisplay: display exists, changing source size" );
-        SourceSizeChanged();
-    }
-
-    // Setting (in)visible if something has changed the DSA state
-    // (e.g. prepare). If initDisplayMode is not called, this will always
-    // set visibility to false.
-    iSurfaceWindow->SetVisible(iSurfaceWindow->IsVisible(), EFalse);
-    LOG( EJavaMMAPI, EInfo,  "CMMAVideoPlayer::PrepareDisplay -" );
-}
-
-EXPORT_C const TDesC& CMMAVideoPlayer::Type()
-{
-    return KMMAVideoPlayer;
-}
-
-EXPORT_C TSize CMMAVideoPlayer::SourceSize()
-{
-    return iSourceSize;
-}
-
-EXPORT_C MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(TRequestStatus* aStatus,
-        const TSize& /*aSize*/,
-        const CMMAImageSettings& /*aSettings*/)
-{
-    if (iEmptySnapshotImage)
-    {
-        // Ealier snapshot was not got with SnapshotBitmap method.
-        User::Leave(KErrInUse);
-    }
-    // frame can't be got from video player, but TCK requires that it should
-    // be available. So returning empty image
-    iEmptySnapshotImage = new(ELeave) CFbsBitmap();
-    User::LeaveIfError(iEmptySnapshotImage->Create(TSize(1, 1),
-                       EColor4K));
-
-
-    User::RequestComplete(aStatus, KErrNone);
-
-    // Return raw bitmap encoding and thus SnapshotEncoded() should not
-    // get called later on.
-    return EBitmap;
-}
-
-EXPORT_C CFbsBitmap* CMMAVideoPlayer::SnapshotBitmap()
-{
-    // snapshot is not supported, returning empty image
-    CFbsBitmap* image = iEmptySnapshotImage;
-
-    // ownership is transferred to caller
-    iEmptySnapshotImage = NULL;
-    return image;
-}
-
-EXPORT_C HBufC8* CMMAVideoPlayer::SnapshotEncoded()
-{
-    // This method should never be called.
-    // Asserted in debug build to be sure.
-    __ASSERT_DEBUG(EFalse, User::Invariant());
-
-    return NULL;
-}
-
-EXPORT_C void CMMAVideoPlayer::NotifyWithStringEvent(
-    CMMAPlayerEvent::TEventType aEventType,
-    const TDesC& aStringEventData)
-{
-    PostStringEvent(aEventType, aStringEventData);
-}
-
-EXPORT_C MMMASnapshot* CMMAVideoPlayer::SnapshoterL()
-{
-    return this;
-}
-
-void CMMAVideoPlayer::SourceSizeChanged()
-{
-    iDisplay->SourceSizeChanged(iSourceSize);
-    NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/canvasdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-#include "logger.h"
-#include "com_nokia_microedition_media_control_MMACanvasDisplay.h"
-#include "cmmacanvasdisplay.h"
-#include "qwidget.h"
-#include "cmmasurfacewindow.h"
-
-
-/*
- * Class:     com_nokia_microedition_media_control_mmacanvasdisplay
- * Method:    _setVisible
- * Signature: (IIZ)I
- */
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setVisible
-  (JNIEnv *, jobject, jint nativeDisplayHandle, jboolean isVisible)
-  {
-   LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setVisible +");
-	    CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-        TBool visible = (TBool)isVisible;
-        display ->SetVisible(visible);
-   LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setVisible -");
-  }
-
-LOCAL_C void LocalSetContainerVisible(CMMADisplay* display,TBool visible)
-{
-	 display ->SetContainerVisibility(visible);
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setContainerVisible
-(JNIEnv *, jobject,jint aEventSourceHandle, jint nativeDisplayHandle, jboolean isActive)
-{
-  LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setContainerVisible +");
-  MMAFunctionServer* eventSource =  reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
-	 // need to call in Function server thread context because CMMADisplay's JNI pointer
-	 // is valid in that thread context only.
-  
-		    CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	        TBool visible = (TBool)isActive;
-	        
-	         TInt error = eventSource->ExecuteTrap(&LocalSetContainerVisible,
-					                                          display,
-					                                          		visible);
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setContainerVisible -");
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setFullScreenMode
-(JNIEnv *, jobject, jint nativeDisplayHandle, jboolean isFullScreen)
-{
-  LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setFullScreenMode  +");
-		    CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	        TBool mode = (TBool)isFullScreen;
-	        display ->SetFullScreenL(mode);
-  LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setFullScreenMode  -");
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setWindowToNative
-(JNIEnv *, jobject,jint nativeDisplayHandle, jint qtWidgetHandle)
-{
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setWindowToNative + ");
-	 QWidget *widget = reinterpret_cast<QWidget*>(qtWidgetHandle);
-	 CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	 display->SetWindowResources(widget);
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setWindowToNative - ");
-}
-
-
-/*
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1nativeDummy
-(JNIEnv *, jobject,)
-{
-*/
-
-LOCAL_C void LocalSourceSizeChanged(CMMADisplay* display,TInt width,TInt height)
-{
-	display->SourceSizeChanged(width,height);
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setNativeWindowSize
-(JNIEnv *, jobject,jint nativeDisplayHandle, jint aEventSourceHandle, jint eswtControlwidth,jint eswtControlheight)
-{
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setNativeWindowSize + ");
-	 CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	 TInt width = eswtControlwidth;
-	 TInt height = eswtControlheight;
-	 MMAFunctionServer* eventSource =  reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
-	 // need to call in Function server thread context because CMMADisplay's JNI pointer
-	 // is valid in that thread context only.
-   TInt error = eventSource->ExecuteTrap(&LocalSourceSizeChanged,
-					                                          display,
-					                                          		width,
-					                                          			height);
-
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : setNativeWindowSize - ");
-}
-
-LOCAL_C void LocalSetDisplayPosition(CMMADisplay* display,TInt uiX,TInt uiY,TInt vcX,TInt vcY)
-{
-	display->SetDisplayPosition(uiX,uiY,vcX,vcY);
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setPosition
-(JNIEnv *, jobject,jint nativeDisplayHandle,jint aEventSourceHandle,jint uiX,jint uiY,jint vcX,jint vcY)
-{
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setPosition + ");
-	 CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	 TInt uiControlLocationX = uiX;
-	 TInt uiControlLocationY = uiY;
-	 TInt videoControlLocationX = vcX;
-	 TInt videoControlLocationY = vcY;
-	 MMAFunctionServer* eventSource =  reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
-	 // need to call in Function server thread context because CMMADisplay's JNI pointer
-	 // is valid in that thread context only.
-   TInt error = eventSource->ExecuteTrap(&LocalSetDisplayPosition,
-					                                          display,
-					                                          		uiControlLocationX,
-					                                          				uiControlLocationY,
-					                                          						videoControlLocationX,
-					                                          								videoControlLocationY);
-
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setPosition - ");
-}
-
-
-
-
-LOCAL_C void LocalSetDisplaySize(CMMADisplay* display,TInt vcX,TInt vcY)
-{
-	LOG2(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : LocalSetDisplaySize vcX = %d,vcY=%d ",vcX,vcY);
-	TSize size(vcX,vcY);
-	display->SetDisplaySizeL(size);
-}
-		 																										
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMACanvasDisplay__1setDisplaySize
-(JNIEnv *, jobject,jint nativeDisplayHandle,jint aEventSourceHandle,jint width,jint height)
-{
-	 LOG2(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setDisplaySize +  width = %d,height = %d",width,height);
-	 CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-	 TInt vc_width = width;
-	 TInt vc_height = height;
-	 MMAFunctionServer* eventSource =  reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
-	 // need to call in Function server thread context because CMMADisplay's JNI pointer
-	 // is valid in that thread context only.
-	 LOG2(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setDisplaySize +  vc_width = %d,vc_height = %d",vc_width,vc_height);
-   TInt error = eventSource->ExecuteTrap(&LocalSetDisplaySize,
-					                                          display,
-					                                          		vc_width,
-					                                          				vc_height);
-
-	 LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setDisplaySize - ");
-}		 																												
\ No newline at end of file
--- a/javauis/mmapi_qt/baseline/src/cmmaaudiometadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMAAudioMetaDataControl is a concrete class for getting
-*                metadata from an audio media.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaaudiometadatacontrol.h"
-
-CMMAAudioMetaDataControl::CMMAAudioMetaDataControl(
-    RMMFController& aController)
-        : iController(aController)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioMetaDataControl constructor called.");
-}
-
-TInt CMMAAudioMetaDataControl::KeyCountL()
-{
-    TInt entries = 0;
-
-    User::LeaveIfError(iController.GetNumberOfMetaDataEntries(entries));
-    return entries;
-}
-
-HBufC* CMMAAudioMetaDataControl::KeyL(TInt aIndex)
-{
-    CMMFMetaDataEntry* currEntry = NULL;
-
-    currEntry = iController.GetMetaDataEntryL(aIndex);
-    CleanupStack::PushL(currEntry);
-    HBufC* key = currEntry->Name().AllocL();
-    CleanupStack::PopAndDestroy(); // currEntry
-
-    return key;
-}
-
-
-/*
- * Get the value of given audio metadata key. The ownership of the created value
- * (descriptor) is passed to the caller.
- */
-HBufC* CMMAAudioMetaDataControl::KeyValueL(const TDesC& aKey)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioMetaDataControl::GetKeyValueL() called.");
-
-    HBufC* retVal = NULL;
-    CMMFMetaDataEntry* currEntry = NULL;
-
-    TInt nEntries = 0;
-    User::LeaveIfError(iController.GetNumberOfMetaDataEntries(nEntries));
-
-    for (TInt i = 0; i < nEntries; ++i)
-    {
-        currEntry = iController.GetMetaDataEntryL(i);
-
-        if (0 == aKey.Compare(currEntry->Name()))
-        {
-            CleanupStack::PushL(currEntry);
-            retVal = currEntry->Value().AllocL();
-            CleanupStack::PopAndDestroy(); // currEntry
-            break;
-        }
-
-        delete currEntry;
-    }
-
-    User::LeaveIfNull(retVal);
-    return retVal;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaaudioplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,326 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmfdes.h>
-#include <mmf/server/mmffile.h>
-#include <AudioPreference.h>
-#include <logger.h>
-#include "cmmaaudioplayer.h"
-
-const TInt KPlayerPriority = KAudioPriorityRecording;
-const TInt KErrorMessageSize = 32;
-
-const TUid KSourceUid = { KMmfUidDescriptorSource };
-const TUid KFileSourceUid = { KMmfUidFileSource };
-_LIT(KErrDefaultError, "Symbian OS Error: %d");
-
-const TInt KMinIntervalBeforePrime = 0;
-
-CPlaybackCompletedCallback* CPlaybackCompletedCallback::NewL(MPlaybackCompletedCallback& aObs)
-{
-    CPlaybackCompletedCallback* self = new(ELeave)CPlaybackCompletedCallback(aObs);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CPlaybackCompletedCallback::~CPlaybackCompletedCallback()
-{
-    Cancel();
-}
-
-void CPlaybackCompletedCallback::RunL()
-{
-    iObs.HandlePlaybackCompleteL();
-}
-
-TInt CPlaybackCompletedCallback::RunError(TInt aError)
-{
-    iObs.ErrorPlaybackComplete(aError);
-    return KErrNone;
-}
-
-CPlaybackCompletedCallback::CPlaybackCompletedCallback(MPlaybackCompletedCallback& aObs)
-        : CTimer(EPriorityStandard), iObs(aObs)
-{
-    CActiveScheduler::Add(this);
-}
-
-void CPlaybackCompletedCallback::Callback()
-{
-    if (!IsActive())
-        After(KMinIntervalBeforePrime);
-}
-
-CMMAAudioPlayer* CMMAAudioPlayer::NewLC(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAAudioPlayer* self = new(ELeave) CMMAAudioPlayer(aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-
-CMMAAudioPlayer::~CMMAAudioPlayer()
-{
-
-    delete iPlaybackCompleted;
-}
-
-
-CMMAAudioPlayer::CMMAAudioPlayer(
-    CMMAMMFResolver* aResolver):
-        CMMAMMFPlayerBase(aResolver)
-{
-}
-
-
-void CMMAAudioPlayer::ConstructL()
-{
-    CMMAMMFPlayerBase::ConstructL();
-
-    iPlaybackCompleted = CPlaybackCompletedCallback::NewL(*this);
-}
-
-
-EXPORT_C void CMMAAudioPlayer::PrefetchDataL(const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAAudioPlayer::PrefetchDataL aData size %d",
-              aData.Size());
-
-    // player priority settings
-    TMMFPrioritySettings prioritySettings;
-    prioritySettings.iPriority = KPlayerPriority;
-    prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
-    prioritySettings.iState = EMMFStatePlaying;
-
-    TMMFDescriptorConfig srcConfig;
-    srcConfig().iDes = (TAny*)&aData; // wants pointer to TPtr8
-    srcConfig().iDesThreadId = RThread().Id();
-
-    User::LeaveIfError(DoOpen(KSourceUid,
-                              srcConfig,
-                              KUidMmfAudioOutput,
-                              KNullDesC8,
-                              prioritySettings));
-
-    User::LeaveIfError(iController.Prime());
-}
-
-EXPORT_C void CMMAAudioPlayer::PrefetchFileL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAAudioPlayer::Prefetching from file");
-
-    // player priority settings
-    TMMFPrioritySettings prioritySettings;
-    prioritySettings.iPriority = KPlayerPriority;
-    prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
-    prioritySettings.iState = EMMFStatePlaying;
-
-    TMMFFileConfig srcConfig;
-    srcConfig().iPath = iFileName->Des();
-
-    User::LeaveIfError(DoOpen(KFileSourceUid,
-                              srcConfig,
-                              KUidMmfAudioOutput,
-                              KNullDesC8,
-                              prioritySettings));
-
-    User::LeaveIfError(iController.Prime());
-}
-
-EXPORT_C void CMMAAudioPlayer::PlayCompleteL(TInt aError)
-{
-	LOG( EJavaMMAPI, EInfo, "CMMAAudioPlayer::PlayCompleteL +");
-    TInt64 time;
-    GetDuration(&time);
-    iMediaTime = time;
-    iStartedEventTime = 0;
-
-    ChangeState(EPrefetched);   // ready to play again
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, time);
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        // priming again for allowing e.g. mediatime setting
-        User::LeaveIfError(iController.Prime());
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-
-            TTimeIntervalMicroSeconds position(0);
-            User::LeaveIfError(iController.SetPosition(position));
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-    	LOG( EJavaMMAPI, EInfo, "CMMAAudioPlayer::PlayCompleteL -");
-}
-
-void CMMAAudioPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioPlayer::RealizeL");
-    // DataSource must have at least 1 stream or
-    // we must have file to play
-    if ((iSourceStreams.Count() == 0) && !iFileName)
-    {
-        User::Leave(KErrNotEnoughStreams);
-    }
-    CMMAPlayer::RealizeL();
-}
-
-
-void CMMAAudioPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioPlayer::PrefetchL");
-    __ASSERT_DEBUG((iSourceStreams.Count() > 0) || iFileName, User::Invariant());
-
-    if (iFileName)
-    {
-        // prefetching the file
-        PrefetchFileL();
-        // we can go to prefetched state immediately
-        PostActionCompletedFile();
-        ChangeState(EPrefetched);
-        //PostActionCompleted(KErrNone);
-    }
-    else
-    {
-        // Using TDes -- load the whole sound
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-    // CMMASourceStream will notify with ReadCompleted
-}
-
-const TDesC& CMMAAudioPlayer::Type()
-{
-    return KMMAAudioPlayer;
-}
-
-//
-// CMMASourceStreamReader finished read operation
-// This is called when ReadL is completed in Prefetch()
-//
-void CMMAAudioPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAAudioPlayer::ReadCompletedL: status = %d", aStatus);
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        TRAPD(err, PrefetchDataL(aData));
-        if (err == KErrNone)
-        {
-            ChangeState(EPrefetched);
-        }
-        PostActionCompleted(err);
-    }
-}
-
-
-void CMMAAudioPlayer::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG( EJavaMMAPI, EInfo, "MID::CMMAAudioPlayer::HandleEvent");
-    TInt err = aEvent.iErrorCode;
-    if (iState == EStarted)
-    {
-        // normal situation; will loop in PlayCompleteL if looping is set
-        if ((err == KErrEof || err == KErrUnderflow || err == KErrNone)
-                && aEvent.iEventType == KMMFEventCategoryPlaybackComplete)
-        {
-            iPlaybackCompleted->Callback();
-        }
-    }
-
-    if (err ==  KErrDied && aEvent.iEventType == KMMFEventCategoryPlaybackComplete)
-    {
-
-        // basically pausing the playback
-        //1. when the phone call is received/answered , the player will be pushed to pause state and phone call is given high priority.
-        //2. when the call ends the player will still be in pause state , In this case the user should resume the player.
-        err = iController.Pause();
-
-        if (iState == EStarted)
-        {
-            TInt64 time;
-            GetMediaTime(&time);
-            iStartedEventTime = time;
-            LOG( EJavaMMAPI, EInfo, "MID::CMMAAudioPlayer::Going to ChangeState( EPrefetched );");
-
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-            ChangeState(EPrefetched);
-        }
-    }
-
-    if (err != KErrNone && err != KErrDied)
-    {
-        ErrorPlaybackComplete(err);
-    }
-}
-
-EXPORT_C void CMMAAudioPlayer::HandlePlaybackCompleteL()
-{
-    PlayCompleteL(KErrNone);
-}
-
-EXPORT_C void CMMAAudioPlayer::ErrorPlaybackComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MID::CMMAAudioPlayer::ErrorPlaybackComplete: aError = %d", aError);
-    TBuf<KErrorMessageSize> errorMessage;
-    errorMessage.Format(KErrDefaultError, aError);
-    PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-
-    // Preparing controller for next try
-    TInt err = iController.Prime();
-    if (err != KErrNone)
-    {
-        // Prime failed
-        errorMessage.Format(KErrDefaultError, err);
-        PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        // we cannot recover, going back to unrealized state
-        ChangeState(EUnrealized);
-        return;
-    }
-
-    // If player was in started state, then error will change state to
-    // EPrefetched. In other cases the old state is retained.
-    if (iState == EStarted)
-    {
-        ChangeState(EPrefetched);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaaudioplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating wav player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "cmmaaudioplayerfactory.h"
-#include "cmmaaudioplayer.h"
-#include "cmmaaudiovolumecontrol.h"
-#include "cmmastoptimecontrol.h"
-#include "cmmaaudiometadatacontrol.h"
-#include "cmmammfratecontrol.h"
-
-_LIT(KMMAMP3ContentType, "audio/mp3");
-_LIT(KMMAMPEGContentType, "audio/mpeg");
-
-CMMAAudioPlayerFactory* CMMAAudioPlayerFactory::NewLC()
-{
-    CMMAAudioPlayerFactory* pFactory =
-        new(ELeave) CMMAAudioPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAAudioPlayerFactory::CMMAAudioPlayerFactory()
-{
-}
-
-
-CMMAAudioPlayerFactory::~CMMAAudioPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAAudioPlayerFactory::CreatePlayerL(const TDesC& aContentType)
-{
-    CMMAPlayer* player = NULL;
-    if (aContentType == KMMAMP3ContentType)
-    {
-        // If 'mp3' use 'mpeg' to create player, because audio controller
-        // does not recognize mp3
-        player = CMMAMMFPlayerFactory::CreatePlayerL(KMMAMPEGContentType);
-    }
-    else
-    {
-        player = CMMAMMFPlayerFactory::CreatePlayerL(aContentType);
-    }
-    return player;
-}
-
-CMMAPlayer* CMMAAudioPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAAudioPlayer* player = CMMAAudioPlayer::NewLC(aResolver);
-
-    CMMAAudioVolumeControl* volumeControl = CMMAAudioVolumeControl::NewL(player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-    CMMAAudioMetaDataControl* metaDataControl =
-        new(ELeave) CMMAAudioMetaDataControl(player->Controller());
-    CleanupStack::PushL(metaDataControl);
-    player->AddControlL(metaDataControl);
-    CleanupStack::Pop(metaDataControl);
-
-    CMMAStopTimeControl* stopTimeControl = CMMAStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    CMMAMMFRateControl* rateControl = CMMAMMFRateControl::NewL(player);
-    CleanupStack::PushL(rateControl);
-    player->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-
-    CleanupStack::Pop(player);
-
-    return player;
-}
-
-void CMMAAudioPlayerFactory::GetSupportedContentTypesL(const TDesC& aProtocol,
-        CDesC16Array& aMimeTypeArray)
-{
-    // protocol is empty string all types must be returned.
-    if (IsSupportedProtocolL(aProtocol) ||
-            (aProtocol == KNullDesC))
-    {
-        // mp3 is not supported in the mmf, but support is
-        // added in CreatePlayerL( const TDesC& aContentType ) method.
-        aMimeTypeArray.AppendL(KMMAMP3ContentType);
-
-        // all other types from mmf
-        CMMAMMFPlayerFactory::GetSupportedContentTypesL(aProtocol,
-                aMimeTypeArray);
-    }
-}
-
-void CMMAAudioPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeAudio));
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaaudiorecordcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  RecordControl for AudioRecorder
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaaudiorecordcontrol.h"
-
-
-CMMAAudioRecordControl* CMMAAudioRecordControl::NewL(
-    CMMAAudioRecorder* aRecorder)
-{
-    CMMAAudioRecordControl* self = new(ELeave) CMMAAudioRecordControl(aRecorder);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    aRecorder->InitializeL(&self->iFile, self);
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CMMAAudioRecordControl::~CMMAAudioRecordControl()
-{
-    // close controller to free temp file
-    if (iRecorder)
-    {
-        iRecorder->Deinitialize();
-    }
-}
-
-
-CMMAAudioRecordControl::CMMAAudioRecordControl(CMMAAudioRecorder* aRecorder):
-        CMMARecordControl(aRecorder)
-{
-    iRecorder = aRecorder;
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioRecordControl()");
-}
-
-void CMMAAudioRecordControl::DoStartRecordL()
-{
-    iRecorder->StartRecordL();
-}
-
-void CMMAAudioRecordControl::DoStopRecordL()
-{
-    iRecorder->StopRecordL();
-}
-
-void CMMAAudioRecordControl::DoResetL()
-{
-    iRecorder->ResetL();
-}
-
-void CMMAAudioRecordControl::InitializeL()
-{
-    // already initialized, empty implementation
-}
-
-TInt CMMAAudioRecordControl::SetRecordSizeLimitL(TInt aSize)
-{
-    return iRecorder->SetRecordSizeLimitL(aSize);
-}
-
-void CMMAAudioRecordControl::HandleEvent(const TMMFEvent& aEvent)
-{
-    ELOG2( EJavaMMAPI, "MMA:CMMAAudioRecordControl::HandleEvent(type=%x,err=%d)",
-               aEvent.iEventType.iUid, aEvent.iErrorCode);
-    if (iState == ERecordRecording)
-    {
-        // Event's error code is KErrEof or KErrNone when record size limit
-        // is reached. When controller is stopped from java error code is
-        // KErrNone.
-        if ((aEvent.iEventType == KMMFEventCategoryPlaybackComplete) &&
-                ((aEvent.iErrorCode == KErrNone) ||
-                 (aEvent.iErrorCode == KErrEof)))
-        {
-            HandleRecordSizeLimit();
-        }
-        else if (aEvent.iErrorCode != KErrNone)
-        {
-            Error(aEvent.iErrorCode);
-        }
-    }
-}
-
-//  END OF FILE
-
-
--- a/javauis/mmapi_qt/baseline/src/cmmaaudiorecorder.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,391 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for recording Audio
-*
-*/
-
-
-#include <logger.h>
-#include <mmf/server/mmffile.h>
-#include <mmf/server/mmfdes.h>
-#include <mmfformatimplementationuids.hrh>
-#include "cmmaaudiorecorder.h"
-#include "cmmaoutputstream.h"
-
-const TInt KDefaultSize = KMaxTInt32;   // Default record size limit
-
-CMMAAudioRecorder* CMMAAudioRecorder::NewLC(
-    CMMAMMFResolver* aResolver,
-    CMMAAudioSettings* aAudioSettings,
-    TInt aMIDletSuiteID)
-{
-    // Not using ELeave to avoid leave before owneship change of settings
-    CMMAAudioRecorder* self = new CMMAAudioRecorder(aResolver, aMIDletSuiteID);
-    if (!self)
-    {
-        delete aAudioSettings;
-        User::Leave(KErrNoMemory);
-    }
-    // Take the ownership of setting before any possible leaves
-    self->iSettings = aAudioSettings;
-    CleanupStack::PushL(self);
-    self->iWait = new(ELeave) CActiveSchedulerWait();
-    self->ConstructL();
-    return self;
-}
-
-
-CMMAAudioRecorder::~CMMAAudioRecorder()
-{
-    iFile.Close();
-    delete iSettings;
-    delete iWait;
-}
-
-
-CMMAAudioRecorder::CMMAAudioRecorder(
-    CMMAMMFResolver* aResolver,
-    TInt /*aMIDletSuiteID*/):
-        CMMAMMFPlayerBase(aResolver),
-        iAudioRecordControllerCustomCommands(iController),
-        iAudioControllerRecCustomCommands(iController),
-        iRecordSizeLimit(KDefaultSize),
-        iPauseError(KErrNone),
-        iEOFReached(EFalse)
-{
-}
-
-/**
- * start the play
- */
-void CMMAAudioRecorder::StartL()
-{
-    TInt64 time;
-    GetMediaTime(&time);
-
-    PostLongEvent(CMMAPlayerEvent::EStarted, time);
-    ChangeState(EStarted);
-    PostActionCompletedStart();
-}
-
-
-void CMMAAudioRecorder::StopL(TBool aPostEvent)
-{
-    if (iState == EStarted)
-    {
-        ChangeState(EPrefetched);
-    }
-
-    if (aPostEvent)
-    {
-        TInt64 time;
-        GetMediaTime(&time);
-        PostLongEvent(CMMAPlayerEvent::EStopped, time);
-    }
-}
-
-void CMMAAudioRecorder::DoOpenL()
-{
-    // Make sure any existing controller is closed.
-    iEventMonitor->Cancel();
-    iController.Close();
-
-    // player priority settings
-    TMMFPrioritySettings prioritySettings;
-    prioritySettings.iPriority = EMdaPriorityMax;
-    prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
-    prioritySettings.iState = EMMFStateRecording;
-
-    // Try opening and configuring each controller in turn
-    TInt error = KErrNotSupported;
-    TInt index = 0;
-
-    // Try controllers until found a good controller or out of list
-    while ((error != KErrNone) &&
-            (index < iControllerInfos->Count()))
-    {
-        // Open the controller
-        error = iController.Open((*iControllerInfos)[ index ]->Uid(),
-                                 prioritySettings);
-
-        // If the controller was opened without error, start receiving events from it.
-        if (!error)
-        {
-            iEventMonitor->Start();
-
-            // Add the data source to the controller.
-            error = iController.AddDataSource(KUidMmfAudioInput, KNullDesC8);
-        }
-
-        // Add the data sink
-        if (!error)
-        {
-            TMMFFileHandleParams params(&iFile);
-            TPckg<TMMFFileHandleParams> paramPckg = params;
-            error = iController.AddDataSink(KUidMmfFileSink, paramPckg, iSinkInfo);
-        }
-
-        // If an error occurred in any of the above, close the controller.
-        if (error)
-        {
-            iEventMonitor->Cancel();
-            iController.Close();
-        }
-
-        index++;
-    }
-    User::LeaveIfError(error);
-
-    HBufC8* contentType8 = HBufC8::NewLC(iContentType->Length());
-    contentType8->Des().Copy(*iContentType);
-
-    TInt cInfoCount = iControllerInfos->Count();
-    for (TInt i = 0; i < cInfoCount; i++)
-    {
-        CMMFControllerImplementationInformation* contrInfo = (*iControllerInfos)[ i ];
-        const RMMFFormatImplInfoArray& recordFormats = contrInfo->RecordFormats();
-
-        for (TInt formatIndex = 0; formatIndex < recordFormats.Count(); formatIndex++)
-        {
-            CMMFFormatImplementationInformation* formatInfo = recordFormats[ formatIndex ];
-
-            if (formatInfo->SupportsMimeType(*contentType8))
-            {
-                iSupplier.Set(formatInfo->Supplier());
-                // Some of the controllers those support only one format can return KErrNotSupported
-                // error when setting the format, but still they can record that only supported format
-                // Ignoring this error
-                TInt err = iAudioControllerRecCustomCommands.SetSinkFormat(formatInfo->Uid());
-                if ((err != KErrNotSupported))
-                {
-                    User::LeaveIfError(err);
-                }
-                break;
-            }
-        }
-    }
-    CleanupStack::PopAndDestroy(contentType8);
-
-    // Do not set codec if it is default
-    if (iSettings->iDataType != TFourCC(KFourCCNULL))
-    {
-        User::LeaveIfError(
-            iAudioControllerRecCustomCommands.SetCodec(KFourCCNULL, iSettings->iDataType));
-    }
-
-    // set the audio data settings ie sample rate & channels, if not defaults
-    if (iSettings->iRate != KDefaultRate)
-    {
-        User::LeaveIfError(
-            iAudioControllerRecCustomCommands.SetSinkSampleRate(iSettings->iRate));
-    }
-
-    if (iSettings->iChannels != KDefaultChannels)
-    {
-        User::LeaveIfError(
-            iAudioControllerRecCustomCommands.SetSinkNumChannels(iSettings->iChannels));
-    }
-}
-
-void CMMAAudioRecorder::PrefetchL()
-{
-    if (iResetController)
-    {
-        DoOpenL();
-    }
-    User::LeaveIfError(iController.Prime());
-    //PostActionCompleted(KErrNone);
-    PostActionCompletedFile();
-    ChangeState(EPrefetched);    
-}
-
-void CMMAAudioRecorder::InitializeL(RFile* aFile,
-                                    MMMFControllerEventMonitorObserver* aObserver)
-{
-    iFile.Duplicate(*aFile);
-    iObserver = aObserver;
-    DoOpenL();
-}
-
-void CMMAAudioRecorder::Deinitialize()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::Deinitialize++");
-    if (iEventMonitor)
-    {
-        iEventMonitor->Cancel();
-    }
-    iController.Close();
-    iFile.Close();
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::Deinitialize--");
-}
-
-const TDesC& CMMAAudioRecorder::Type()
-{
-    return KMMAAudioRecorder;
-}
-
-void CMMAAudioRecorder::StartRecordL()
-{
-    if (iResetController)
-    {
-        iResetController = EFalse;
-        LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StartRecordL reopen controller");
-        DoOpenL();
-        LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StartRecordL reopen done");
-    }
-
-
-    User::LeaveIfError(
-        iAudioRecordControllerCustomCommands.SetMaxFileSize(iRecordSizeLimit));
-
-    LOG1( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StartRecordL Max File size set %d", iRecordSizeLimit);
-
-    User::LeaveIfError(iController.Prime());
-    User::LeaveIfError(iController.Play());
-}
-
-
-void CMMAAudioRecorder::StopRecordL()
-{
-    // ! here is the workaround for pause
-    // Pause() doesn't work with all formats.
-    LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StopRecordL Stopping");
-
-    TInt pauseError = iController.Pause();
- 		// if EOF is already reached return without
-		// doing any operation because controller is 
-		// already in Stopped state
-		if (iEOFReached && (KErrNotReady == pauseError))
-		{
-				LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StopRecordL, EOF reached already");
-				iEOFReached = EFalse;
-				return;
-		}
-    if (pauseError == KErrNotSupported)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StopRecordL Stopped instead pause");
-        User::LeaveIfError(iController.Stop());
-    }
-    else
-    {
-        User::LeaveIfError(pauseError);
-// wait only in HW
-#ifndef __WINS__
-        LOG( EJavaMMAPI, EInfo, "CMMAAudioRecorder::StopRecordL Stopped waiting");
-        // wait for playback complete event
-        if (!iWait->IsStarted())
-        {
-            iWait->Start();
-        }
-        User::LeaveIfError(iError);
-#endif
-    }
-
-
-    // prime controller and set position back to end (autorewind in controller)
-    User::LeaveIfError(iController.Prime());
-
-    TTimeIntervalMicroSeconds position(0);
-    User::LeaveIfError(iController.GetDuration(position));
-    User::LeaveIfError(iController.SetPosition(position));
-}
-
-void CMMAAudioRecorder::GetDuration(TInt64* aDuration)
-{
-    // Return -1 in realized state in order to pass END_OF_MEDIA
-    // tests in TCK. MMFPlayerbase would return 0.
-    if (iState == ERealized)
-    {
-        *aDuration = KTimeUnknown;
-    }
-    else
-    {
-        CMMAMMFPlayerBase::GetDuration(aDuration);
-    }
-}
-
-void CMMAAudioRecorder::DeallocateL()
-{
-    // set control to be reopened since
-    // deallocate closes it
-    if (iState == EPrefetched)
-    {
-        iResetController = ETrue;
-    }
-    CMMAMMFPlayerBase::DeallocateL();
-}
-
-void CMMAAudioRecorder::ResetL()
-{
-    iResetController = ETrue;
-}
-
-const TInt KMMASymbianControllerLimit = 4096 + 44; // buffer size + header
-_LIT(KSymbian, "Symbian");
-
-TInt CMMAAudioRecorder::SetRecordSizeLimitL(TInt aSize)
-{
-    iRecordSizeLimit = aSize;
-
-    // Wav and AU controller (supplied from symbian) is recording in 4kb buffers
-    // this controller does not record at all if size is smaller than 4kb and
-    // goes even in wierd state.
-    LOG1( EJavaMMAPI, EInfo, "CMMAAudioRecorder::SetRecordSizeLimitL Supplier = %S", iSupplier.Ptr());
-    if ((iSupplier == KSymbian) &&
-            (aSize < KMMASymbianControllerLimit))
-    {
-        iRecordSizeLimit = KMMASymbianControllerLimit;
-    }
-
-    // normal case is that recordsize is set just before starting
-    if (iState == EStarted)
-    {
-        LOG1( EJavaMMAPI, EInfo, "CMMAAudioRecorder::SetRecordSizeLimitL Setting while playing limit: %d", iRecordSizeLimit);
-        // trying to set max file size while recording
-        User::LeaveIfError(
-            iAudioRecordControllerCustomCommands.SetMaxFileSize(iRecordSizeLimit));
-    }
-    return iRecordSizeLimit;
-}
-
-void CMMAAudioRecorder::HandleEvent(const TMMFEvent& aEvent)
-{
-    ELOG1( EJavaMMAPI, "CMMAAudioRecorder::HandleEvent event error: %d", aEvent.iErrorCode);
-    
-    if (KErrEof == aEvent.iErrorCode)
-    	{
-    	iEOFReached = ETrue;
-    	}
-    // if we are waiting event
-    if (iWait->IsStarted())
-    {
-        iError = aEvent.iErrorCode;
-        iWait->AsyncStop();
-        return;
-    }
-    TMMFEvent event = aEvent;
-    if ((event.iEventType == KMMFEventCategoryPlaybackComplete) &&
-            ((event.iErrorCode == KErrNone) ||
-             (event.iErrorCode == KErrEof)))
-    {
-        // Prime controller after playback complete, in order to get position/duration
-        event.iErrorCode = iController.Prime();
-    }
-    if (iObserver)
-    {
-        iObserver->HandleEvent(event);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaaudiorecorderfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating audio recorder
-*
-*/
-
-
-//  INCLUDE FILES
-#include "cmmaaudiorecorderfactory.h"
-#include "cmmaaudiorecordcontrol.h"
-#include "cmmammfresolver.h"
-
-_LIT(KCaptureProtocol, "capture");
-_LIT(KAudioRecord, "audio");
-_LIT(KContentTypeAudioMp4NotIncluded, "audio/mp4");
-
-CMMAAudioRecorderFactory* CMMAAudioRecorderFactory::NewLC(TInt aMIDletSuiteID)
-{
-    CMMAAudioRecorderFactory* pFactory =
-        new(ELeave) CMMAAudioRecorderFactory(aMIDletSuiteID);
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-
-CMMAAudioRecorderFactory::CMMAAudioRecorderFactory(TInt aMIDletSuiteID)
-{
-    iMIDletSuiteID = aMIDletSuiteID;
-}
-
-
-CMMAAudioRecorderFactory::~CMMAAudioRecorderFactory()
-{
-    delete iSettings;
-}
-
-CMMAPlayer* CMMAAudioRecorderFactory::CreatePlayerL(const TDesC&)
-{
-    // record player cannot be created from content-type, since this is used only
-    // when we have also data
-    return NULL;
-}
-
-
-CMMAPlayer* CMMAAudioRecorderFactory::CreatePlayerL(const TDesC8&)
-{
-    // record player cannot be created with header data
-    return NULL;
-}
-
-CMMAPlayer* CMMAAudioRecorderFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    // settings ownership transferred to audiorecorder
-    CMMAAudioSettings* tmpSettings = iSettings;
-    iSettings = NULL;
-    CMMAAudioRecorder* recorder = CMMAAudioRecorder::NewLC(aResolver,
-                                  tmpSettings,
-                                  iMIDletSuiteID);
-
-
-
-    CMMAAudioRecordControl* audioRecordControl = CMMAAudioRecordControl::NewL(recorder);
-    CleanupStack::PushL(audioRecordControl);
-    recorder->AddControlL(audioRecordControl);
-    CleanupStack::Pop(audioRecordControl);
-
-    CleanupStack::Pop(recorder);
-
-    return recorder;
-}
-
-
-void CMMAAudioRecorderFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeAudio));
-}
-
-void CMMAAudioRecorderFactory::PreparePluginSelectionParametersL(
-    CMMAMMFResolver* aResolver,
-    CMMFFormatSelectionParameters* aFormatSelection)
-{
-    aResolver->SetRequiredRecordFormatSupportL(*aFormatSelection);
-}
-
-CMMAPlayer* CMMAAudioRecorderFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& aParameters)
-{
-    // check that locator is capture:://audio
-    if ((aProtocol != KCaptureProtocol) ||
-            (aMiddlePart != KAudioRecord))
-    {
-        return NULL;
-    }
-
-    // validate properties
-    CMMAAudioSettings* settings =
-        TMMAParameterValidator::ValidateAudioPropertiesL(aParameters);
-    delete iSettings;
-    iSettings = settings;
-
-    // Find controller with content-type
-    return CMMAMMFPlayerFactory::CreatePlayerL(*iSettings->iContentType);
-}
-
-void CMMAAudioRecorderFactory::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aProtocolArray)
-{
-    // Support for MP4 recording disabled: All features cannot
-    // be supported for MP4 capture at the moment (e.g. pause)
-    if (IsSupportedContentTypeL(aContentType) &&
-            (aContentType != KContentTypeAudioMp4NotIncluded))
-    {
-        aProtocolArray.AppendL(KMMACaptureProtocol);
-    }
-}
-
-void CMMAAudioRecorderFactory::GetSupportedContentTypesL(
-    const TDesC& aProtocol,
-    CDesC16Array& aMimeTypeArray)
-{
-    // protocol is empty string all types must be returned.
-    if (IsSupportedProtocolL(aProtocol) ||
-            (aProtocol == KNullDesC))
-    {
-        // get supported types from MMF
-        CMMAMMFPlayerFactory::GetSupportedContentTypesL(aProtocol,
-                aMimeTypeArray);
-
-        // "audio/mp4" content type must not be supported
-        // for capture protocol
-        if (aProtocol == KCaptureProtocol)
-        {
-            TInt position(0);
-            TInt err = aMimeTypeArray.Find(KContentTypeAudioMp4NotIncluded, position);
-            if (err == KErrNone)
-            {
-                aMimeTypeArray.Delete(position);
-                aMimeTypeArray.Compress();
-            }
-        }
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaaudiovolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#include <logger.h>
-#include "cmmaaudiovolumecontrol.h"
-#include "cmmaaudioplayer.h"
-
-
-CMMAAudioVolumeControl::CMMAAudioVolumeControl(CMMAAudioPlayer* aPlayer)
-        : CMMAVolumeControl(aPlayer),
-        iAudioPlayDeviceCommands(aPlayer->Controller())
-{
-}
-
-void CMMAAudioVolumeControl::ConstructL()
-{
-    ConstructBaseL();
-}
-
-EXPORT_C CMMAAudioVolumeControl* CMMAAudioVolumeControl::NewL(CMMAAudioPlayer* aPlayer)
-{
-    CMMAAudioVolumeControl* self = new(ELeave)CMMAAudioVolumeControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-
-void CMMAAudioVolumeControl::DoSetLevelL(TInt aLevel)
-{
-    TInt maxVolume = 0;
-    User::LeaveIfError(iAudioPlayDeviceCommands.GetMaxVolume(maxVolume));
-    // aLevel is the desired volume in range 0..100
-    User::LeaveIfError(iAudioPlayDeviceCommands.SetVolume(
-                           aLevel * maxVolume / KMMAVolumeMaxLevel));
-}
-
-TInt CMMAAudioVolumeControl::DoGetLevelL()
-{
-    TInt maxVolume = 0;
-    User::LeaveIfError(iAudioPlayDeviceCommands.GetMaxVolume(maxVolume));
-    __ASSERT_DEBUG(maxVolume != 0, User::Invariant());
-    TInt volume = 0;
-    User::LeaveIfError(iAudioPlayDeviceCommands.GetVolume(volume));
-    // result is in range 0..100
-    return (volume * KMMAVolumeMaxLevel / maxVolume);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmabitmapwindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2002 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 abstract class implements MMMADisplayWindow functionality
-*                in CFbsBitmap based displays.
-*
-*/
-
-
-//  Include Files
-#include <logger.h>
-#include <bitdev.h>
-#include <AknIconUtils.h>
-#include "cmmabitmapwindow.h"
-
-// Destructor (virtual by CBase)
-CMMABitmapWindow::~CMMABitmapWindow()
-{
-    delete iBitmap;
-    delete iBitmapDevice;
-    delete iBitmapContext;
-}
-
-CMMABitmapWindow* CMMABitmapWindow::NewL()
-{
-    CMMABitmapWindow* self = new(ELeave)CMMABitmapWindow();
-    return self;
-}
-
-CMMABitmapWindow::CMMABitmapWindow():
-        iDrawRect(0, 0, 0, 0),
-        iClientRect(0, 0, 0, 0)
-{
-}
-
-void CMMABitmapWindow::SetDestinationBitmapL(CFbsBitmap* aBitmap)
-{
-    CFbsBitmap* bitmap = new(ELeave)CFbsBitmap();
-    CleanupStack::PushL(bitmap);
-    User::LeaveIfError(bitmap->Duplicate(aBitmap->Handle()));
-
-    // create context for bitmap
-    CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(aBitmap);
-    CleanupStack::PushL(bitmapDevice);
-
-
-    CGraphicsContext* bitmapContext = NULL;
-    User::LeaveIfError(bitmapDevice->CreateContext(bitmapContext));
-
-    CleanupStack::Pop(bitmapDevice);   // bitmapDevice
-    CleanupStack::Pop(bitmap);   // bitmap
-
-    delete iBitmap;
-    iBitmap = bitmap;
-    delete iBitmapDevice;
-    iBitmapDevice = bitmapDevice;
-    delete iBitmapContext;
-    iBitmapContext = bitmapContext;
-
-    if (iDrawRect.IsEmpty())
-    {
-        iDrawRect.SetSize(iBitmap->SizeInPixels());
-    }
-}
-
-void CMMABitmapWindow::DrawFrameL(const CFbsBitmap* aBitmap)
-{
-    if (iBitmap)
-    {
-        // leave in this function will panic thread
-        CFbsBitmap* bitmap = new(ELeave)CFbsBitmap();
-        CleanupStack::PushL(bitmap);
-        User::LeaveIfError(bitmap->Duplicate(aBitmap->Handle()));
-        // set incoming bitmap display mode to 16MA
-        if (EColor16MU == bitmap->DisplayMode())
-        {
-            bitmap->SetDisplayMode(EColor16MA);
-        }
-        AknIconUtils::ScaleBitmapL(iDrawRect, iBitmap, bitmap);
-        CleanupStack::PopAndDestroy(bitmap);
-    }
-}
-
-void CMMABitmapWindow::SetDrawRect(const TRect& aRect)
-{
-    iDrawRect = aRect;
-}
-
-void CMMABitmapWindow::SetDrawRectThread(const TRect& aRect)
-{
-    // Bitmap window's rect can be set in any thread.
-    SetDrawRect(aRect);
-}
-
-const TRect& CMMABitmapWindow::DrawRect()
-{
-    return iDrawRect;
-}
-
-TSize CMMABitmapWindow::WindowSize()
-{
-    if (!iBitmap)
-    {
-        // bitmap not ready returning currently set draw rect
-        return iDrawRect.Size();
-    }
-    return iBitmap->SizeInPixels();
-}
-
-void CMMABitmapWindow::SetPosition(const TPoint& /*aPosition*/)
-{
-    // ignored, this is done by framework
-}
-
-void CMMABitmapWindow::SetVisible(TBool /*aVisible*/, TBool /*aUseEventServer*/)
-{
-    // ignored, this is done by framework
-}
-
-void CMMABitmapWindow::SetWindowRect(const TRect& aRect ,MMMADisplay::TThreadType /*aThreadType*/)
-{
-    iClientRect = aRect;
-}
-
-const TRect& CMMABitmapWindow::WindowRect()
-{
-    return iClientRect;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmacameraplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,669 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing camera.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <fbs.h>
-#include "cmmacameraplayer.h"
-#include "tmmaparametervalidator.h"
-#include "mmmadisplay.h"
-#include "cmmacamerasound.h"
-
-#if defined( __WINS__ )
-#include <w32std.h>
-#endif
-
-// CONSTANTS
-_LIT8(KImageJpegMime, "image/jpeg");
-_LIT8(KJpegMime, "jpeg");
-_LIT(KVideoControlName, "VideoControl");
-
-CMMACameraPlayer* CMMACameraPlayer::NewLC(TInt aCameraIndex)
-{
-    CMMACameraPlayer* self = new(ELeave) CMMACameraPlayer;
-    CleanupStack::PushL(self);
-    self->ConstructL(aCameraIndex);
-    return self;
-}
-
-CMMACameraPlayer::~CMMACameraPlayer()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMACameraPlayer::~CMMACameraPlayer");
-
-    // Free (duplicated) UI camera resources first.
-    // Window is not able to send any
-    // callback requests to UI from now.
-    if (iWindow)
-    {
-        iWindow->SetDisplay(NULL);
-    }
-
-    if (iCamera)
-    {
-        iCamera->CancelCaptureImage();
-        iCamera->Release();
-        delete iCamera;
-    }
-
-    delete iSnapshotEncoded;
-    delete iSnapshotBitmap;
-    delete iRealizeWait;
-
-    if (iDisplay && iDisplay->HasContainer())
-    {
-        // Window will delete itself
-        // after all pending events are processed
-        // (lazy delete)
-       // iDisplay->UIGetCallback(
-       //     *iWindow, CMMACameraWindow::EDestroyWindow);
-    }
-    else
-    {
-        delete iWindow;
-    }
-    iWindow = NULL;
-}
-
-
-CMMACameraPlayer::CMMACameraPlayer():
-        iDisplay(NULL),
-        iSourceSizeIndex(KErrNotFound),
-        iStartTime(KErrNotFound)
-{
-    iStopViewFinder = ETrue;
-}
-
-
-void CMMACameraPlayer::ConstructL(TInt aCameraIndex)
-{
-    CMMAPlayer::ConstructL();
-
-    if (aCameraIndex >= CCamera::CamerasAvailable())
-    {
-        // image capture is not supported
-        User::Leave(KErrNotFound);
-    }
-
-    iCamera = CCamera::NewL(*this, aCameraIndex);
-
-    iWindow = CMMACameraWindow::NewL(iCamera->Handle());
-
-    TCameraInfo cameraInfo;
-    iCamera->CameraInfo(cameraInfo);
-
-    if (cameraInfo.iNumImageSizesSupported < 1)
-    {
-        // image capture is not supported
-        User::Leave(KErrNotFound);
-    }
-
-    // default snapshot size
-    iSourceSizeIndex = cameraInfo.iNumImageSizesSupported - 1;
-
-    iRealizeWait = new(ELeave)CRealizeWait;
-}
-
-TInt64 CMMACameraPlayer::CurrentTime()
-{
-    TTime time;
-    time.HomeTime();
-    return time.Int64();
-}
-
-void CMMACameraPlayer::ResolveViewFinderSizeL(TSize& aSize)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMACameraPlayer::ResolveViewFinderSizeL");
-
-    TSize resultSize;
-
-    // The only way to find out the size is to start the view finder
-    // with a proper size (screen size).
-
-    ResolveScreenSizeL(resultSize);
-
-    // StartViewFinderBitmapsL changes resultSize to
-    // the used view finder size.
-    // Used to get the source size only.
-    iCamera->StartViewFinderBitmapsL(resultSize);
-
-    // Bitmap viewfinder is not used anymore.
-    iCamera->StopViewFinder();
-
-    aSize = resultSize;
-}
-
-void CMMACameraPlayer::ResolveScreenSizeL(TSize& aSize)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMACameraPlayer::ResolveScreenSizeL");
-
-#if defined( __WINS__ )
-    TSize size(0,0);
-    RWsSession ws;
-
-    if (ws.Connect() == KErrNone)
-    {
-        CleanupClosePushL(ws);
-
-        CWsScreenDevice* wsScreenDevice = new(ELeave)CWsScreenDevice(ws);
-        CleanupStack::PushL(wsScreenDevice);
-
-        User::LeaveIfError(wsScreenDevice->Construct());
-
-        size = wsScreenDevice->SizeInPixels();
-
-        CleanupStack::PopAndDestroy(2);    // wsScreenDevice, ws.Close()
-    }
-
-    aSize = size;
-
-#else
-    TScreenInfoV01 info;
-    TPckgBuf< TScreenInfoV01 > buf(info);
-
-    UserSvr::ScreenInfo(buf);
-    info = buf();
-
-    aSize = info.iScreenSize;
-#endif
-}
-
-void CMMACameraPlayer::ResolveCaptureSizes(const CCamera::TFormat aFormat,
-        const TInt aNumImageSizesSupported,
-        const TSize& aRequestSize,
-        TSize& aSourceSize,
-        TInt& aSourceIndex,
-        TInt& aLargestIndex)
-{
-    // Largest image size
-    TSize largestSize;
-    // Index to largest image size
-    TInt largestSizeIndex = 0;
-    // Source size
-    TSize sourceSize;
-    // Default source size index not set
-    TInt sourceSizeIndex = KErrNotFound;
-    // Temporary size for iterating capture sizes
-    TSize tmpSize;
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::ResolveCaptureSizes: aFormat = 0x%x", aFormat);
-
-    // go through all supported sizes.
-    // Notice: Capture sizes are assumed to be in order from smaller to larger sizes
-    for (TInt i = 0; i < aNumImageSizesSupported; i++)
-    {
-        iCamera->EnumerateCaptureSizes(tmpSize,
-                                       i,
-                                       aFormat);
-
-        LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::ResolveCaptureSizes: tmpSize.iWidth = %d", tmpSize.iWidth);
-        LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::ResolveCaptureSizes: tmpSize.iHeight = %d", tmpSize.iHeight);
-
-        // Check if current is the largest
-        if ((largestSize.iWidth < tmpSize.iWidth) &&
-                (largestSize.iHeight < tmpSize.iHeight))
-        {
-            largestSize = tmpSize;
-            largestSizeIndex = i;
-        }
-
-        // If wanted size is smaller than tmpSize we can use it
-        if ((aRequestSize.iWidth <= tmpSize.iWidth) &&
-                (aRequestSize.iHeight <= tmpSize.iHeight))
-        {
-            sourceSize = tmpSize;
-            sourceSizeIndex = i;
-        }
-    }
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::ResolveCaptureSizes: sourceSizeIndex = %d", sourceSizeIndex);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::ResolveCaptureSizes: largestSizeIndex = %d", largestSizeIndex);
-
-    aSourceSize = sourceSize;
-    aSourceIndex = sourceSizeIndex;
-    aLargestIndex = largestSizeIndex;
-}
-
-void CMMACameraPlayer::StartL()
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMACameraPlayer:StartL iState %d", iState);
-
-    // start can't be called to not ready player
-    if (iState == EPrefetched)
-    {
-        // camera passes ready images through
-        // ViewFinderFrameReady method
-
-        // set time when started
-        iStartTime = CurrentTime();
-
-        // inform java side
-        ChangeState(EStarted);
-
-        TInt64 time;
-        GetMediaTime(&time);
-
-        // Notify the camera window
-        // about the status change
-        iWindow->SetStarted(ETrue);
-
-        // inform java side
-        PostLongEvent(CMMAPlayerEvent::EStarted, time);
-    }
-    PostActionCompletedStart();    
-    PostActionCompleted(KErrNone);   // java start return
-}
-
-void CMMACameraPlayer::StopL(TBool aPostEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMACameraPlayer::StopL", iState);
-    if (iState == EStarted)
-    {
-        TInt64 time;
-        GetMediaTime(&time);   // add played time to media time
-
-        if (iStopViewFinder && iWindow->ViewFinderActive())
-        {
-            iWindow->SetStarted(EFalse);
-        }
-        iStartTime = KErrNotFound;
-
-        if (aPostEvent)
-        {
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-    }
-}
-
-void CMMACameraPlayer::DeallocateL()
-{
-    // If player is started when deallocate is called,
-    // player is stopped from java side -> state is changed to
-    // prefetched.
-    // In prefetched state only reserved resource is
-    // camera reserve( released with iCamera->Release() )
-    // In realized state no resources have been reserved.
-    // CHANGED: not releasing camera anymore, since it is already
-    // done in realized state
-    if (iState == EPrefetched)
-    {
-        ChangeState(ERealized);
-    }
-}
-
-
-void CMMACameraPlayer::RealizeL()
-{
-    iCamera->Reserve();
-    // this lock will be released when power on is completed (or error)
-    if (!iRealizeWait->IsStarted())
-    {
-        iRealizeWait->Start();
-    }
-    User::LeaveIfError(iRealizeWait->iError);
-    CMMAPlayer::RealizeL();
-}
-
-
-void CMMACameraPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::PrefetchL");
-    // nothing to do here
-    ChangeState(EPrefetched);
-    PostActionCompleted(KErrNone);
-}
-
-
-void CMMACameraPlayer::GetDuration(TInt64* aDuration)
-{
-    // camera viewer has no duration.
-    *aDuration = KTimeUnknown;
-}
-
-
-void CMMACameraPlayer::SetMediaTimeL(TInt64* /*aTime*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::SetMediaTimeL ");
-    // with camera media time is not supported.
-}
-
-
-void CMMACameraPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    if (iState == EStarted)
-    {
-        // add play time to media time
-        iMediaTime += CurrentTime() - iStartTime;
-        // set new start time
-        iStartTime = CurrentTime();
-    }
-
-    // set value to parameter
-    (*aMediaTime) = iMediaTime;
-}
-
-void CMMACameraPlayer::CloseL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::CloseL()");
-
-    // cancel all activity
-    iCamera->CancelCaptureImage();
-
-    // Stop and release UI Camera instance
-    iWindow->SetDisplay(NULL);
-
-    // we don't need reserve camera anymore
-    iCamera->Release();
-
-    CMMAPlayer::CloseL();
-}
-
-const TDesC& CMMACameraPlayer::Type()
-{
-    return KMMACameraPlayer;
-}
-
-// MCameraObserver
-void CMMACameraPlayer::ReserveComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMACameraPlayer::ReserveComplete %d", aError);
-    if (aError == KErrNone)
-    {
-        // camera will notify completion with PowerOnComplete method.
-        iCamera->PowerOn();
-    }
-    else
-    {
-        // release lock and store error. State doesn't change.
-        iRealizeWait->iError = aError;
-        iRealizeWait->AsyncStop();
-    }
-
-}
-
-void CMMACameraPlayer::PowerOnComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMACameraPlayer::PowerOnComplete %d", aError);
-
-    TSize viewFinderSize;
-    TInt error = aError;
-
-    if (error == KErrNone)
-    {
-        // The view finder size must be known after prefetching.
-        TRAP(error, ResolveViewFinderSizeL(viewFinderSize));
-    }
-
-    if (error == KErrNone)
-    {
-        iSize = viewFinderSize;
-
-        if (iDisplay)
-        {
-            iDisplay->SourceSizeChanged(iSize);
-            NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-        }
-    }
-
-    iRealizeWait->iError = error;
-    iRealizeWait->AsyncStop();
-}
-
-void CMMACameraPlayer::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
-{
-    // Empty implementation of an interface method.
-    // DirectViewFinder is used
-    // instead of BitmapViewFinder
-}
-
-void CMMACameraPlayer::ImageReady(CFbsBitmap* aBitmap,
-                                  HBufC8* aData,
-                                  TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMACameraPlayer::ImageReady %d", aError);
-
-    // This method should never be called,
-    // unless we are taking snapshot
-    __ASSERT_DEBUG(iSnapshotStatus, User::Invariant());
-
-    __ASSERT_DEBUG(!iSnapshotBitmap, User::Invariant());
-    __ASSERT_DEBUG(!iSnapshotEncoded, User::Invariant());
-
-    if (aError == KErrNone)
-    {
-        // this class has ownership of the bitmap until
-        // snapshot bitmap is got from this class.
-        iSnapshotBitmap = aBitmap;
-        iSnapshotEncoded = aData;
-    }
-
-    // notify the caller, error code or KErrNone
-    User::RequestComplete(iSnapshotStatus, aError);
-    iWindow->SetStarted(ETrue);
-    // Status is not needed anymore
-    // and this class don't own the status.
-    iSnapshotStatus = NULL;
-}
-
-void CMMACameraPlayer::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/,
-                                        TInt /*aError*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::FrameBufferReady");
-    // this callback will never be called
-    // Asserted in debug build to be sure.
-    __ASSERT_DEBUG(EFalse, User::Invariant());
-}
-
-void CMMACameraPlayer::SetDisplayL(MMMADisplay* aDisplay)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::SetDisplay");
-
-    // now it is ready to draw
-    iDisplay = aDisplay;
-
-    // Passes display into iWindow.
-    // Allocates all resources needed to use a camera DirectViewFinder.
-    iWindow->SetDisplay(aDisplay);
-
-    iDisplay->SetWindowL(iWindow);
-
-    // Set view finder size to the display only if the view finder
-    // size has been resolved.
-    if (iSize != TSize(0, 0))
-    {
-        iDisplay->SourceSizeChanged(iSize);
-        NotifyWithStringEvent(CMMAPlayerEvent::ESizeChanged, KVideoControlName);
-    }
-}
-
-TSize CMMACameraPlayer::SourceSize()
-{
-    return iSize;
-}
-
-MMMASnapshot::TEncoding CMMACameraPlayer::TakeSnapshotL(TRequestStatus* aStatus,
-        const TSize& aSize,
-        const CMMAImageSettings& aSettings)
-{
-    __ASSERT_DEBUG(!iSnapshotStatus, User::Invariant());
-    __ASSERT_DEBUG(!iSnapshotBitmap, User::Invariant());
-    __ASSERT_DEBUG(!iSnapshotEncoded, User::Invariant());
-
-    // snapshots can not be taken if player is not realized
-    if (iState < ERealized)
-    {
-        User::Leave(KErrNotReady);
-    }
-    // save status which will be notified
-    iSnapshotStatus = aStatus;
-
-    // changing status to pending
-    *iSnapshotStatus = KRequestPending;
-
-    // Source size not set in the beginning
-    TSize sourceSize;
-
-    // Use default if size is not specified.
-    TInt sourceSizeIndex = iSourceSizeIndex;
-
-    // Largest image size index
-    TInt largestSizeIndex = 0;
-
-    // Get camera characteristics
-    TCameraInfo cameraInfo;
-    iCamera->CameraInfo(cameraInfo);
-
-    // Set default snapshot encoding type
-    TEncoding encoding = EBitmap;
-
-    // Set default image capture format
-    CCamera::TFormat format = CCamera::EFormatFbsBitmapColor16M;
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::TakeSnapshotL: cameraInfo.iImageFormatsSupported = 0x%x", cameraInfo.iImageFormatsSupported);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::TakeSnapshotL: cameraInfo.iNumImageSizesSupported = %d", cameraInfo.iNumImageSizesSupported);
-
-    // Check if size was set in Java
-    if (aSize.iWidth != KErrNotFound &&
-            aSize.iHeight != KErrNotFound)
-    {
-        // Determine if jpeg capture was requested
-        if ((*aSettings.iMimeType == KJpegMime) ||
-                (*aSettings.iMimeType == KImageJpegMime))
-        {
-            // Shortcut for supported image formats
-            TUint32 imageFormats = cameraInfo.iImageFormatsSupported;
-
-            // Jpeg subtype constants
-            _LIT8(KJpegJfif, "jfif");
-            _LIT8(KJpegExif, "exif");
-
-            // Resolve requested jpeg subtype from settings and camerainfo
-            if ((imageFormats & CCamera::EFormatJpeg) &&
-                    (*aSettings.iType == KJpegJfif))
-            {
-                // JFIF JPEG
-                format = CCamera::EFormatJpeg;
-                encoding = EEncoded;
-            }
-            else if ((imageFormats & CCamera::EFormatExif) &&
-                     (*aSettings.iType == KJpegExif))
-            {
-                // EXIF JPEG
-                format =  CCamera::EFormatExif;
-                encoding = EEncoded;
-            }
-        }
-
-        // Try to resolve nearest source size to the one requested,
-        // except for the JFIF and EXIF jpeg subtypes the match has
-        // to be exact otherwise non-encode capture format will be
-        // used
-        ResolveCaptureSizes(format,
-                            cameraInfo.iNumImageSizesSupported,
-                            aSize,
-                            sourceSize,
-                            sourceSizeIndex,
-                            largestSizeIndex);
-
-        // Format was either of the jpeg formats and requested size
-        // didn't match the source size
-        if ((format >= CCamera::EFormatJpeg &&
-                format <= CCamera::EFormatExif) &&
-                (aSize != sourceSize))
-        {
-            // Try again with an non-encoded format
-            format = CCamera::EFormatFbsBitmapColor16M;
-            encoding = EBitmap;
-            ResolveCaptureSizes(format,
-                                cameraInfo.iNumImageSizesSupported,
-                                aSize,
-                                sourceSize,
-                                sourceSizeIndex,
-                                largestSizeIndex);
-        }
-
-        if (sourceSizeIndex == KErrNotFound)
-        {
-            // If correct index was not found use the largest.
-            sourceSizeIndex = largestSizeIndex;
-        }
-    }
-    // else use default iSourceSizeIndex and default image capture format
-
-    iCamera->PrepareImageCaptureL(format,
-                                  sourceSizeIndex);
-
-    // play sound when capturing image
-    CMMACameraSound::PlayImageCaptureSoundL();
-
-    // start capture, ImageReady will be called when ready
-    iWindow->SetStarted(EFalse);
-
-    iCamera->CaptureImage();
-		
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::TakeSnapshotL: format = 0x%x", format);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::TakeSnapshotL: sourceSizeIndex = %d", sourceSizeIndex);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayer::TakeSnapshotL: encoding = %d", encoding);
-
-    // Inform caller which snapshot encoding was ultimately used
-    return encoding;
-}
-
-CFbsBitmap* CMMACameraPlayer::SnapshotBitmap()
-{
-    CFbsBitmap* bitmap = iSnapshotBitmap;
-
-    // ownership transfers to the caller
-    iSnapshotBitmap = NULL;
-    return bitmap;
-}
-
-HBufC8* CMMACameraPlayer::SnapshotEncoded()
-{
-    HBufC8* encoded = iSnapshotEncoded;
-
-    // ownership transfers to the caller
-    iSnapshotEncoded = NULL;
-    return encoded;
-}
-
-void CMMACameraPlayer::NotifyWithStringEvent(
-    CMMAPlayerEvent::TEventType aEventType,
-    const TDesC& aStringEventData)
-{
-    PostStringEvent(aEventType, aStringEventData);
-}
-
-MMMASnapshot* CMMACameraPlayer::SnapshoterL()
-{
-    return this;
-}
-
-TInt CMMACameraPlayer::CameraHandle()
-{
-    return iCamera->Handle();
-}
-
-void CMMACameraPlayer::SetViewFinderMode(TBool aStopViewFinder)
-{
-    iStopViewFinder = aStopViewFinder;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmacameraplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating camera players.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <e32std.h>
-#include <logger.h>
-
-#include "cmmacameraplayerfactory.h"
-#include "cmmacameraplayer.h"
-#include "cmmavideocontrol.h"
-#include "cmmavideorecordcontrol.h"
-#include "cmmastoptimecontrol.h"
-#include "cmmaplayerproperties.h"
-#include "cmmammfresolver.h"
-
-_LIT(KDefaultVideo, "video");
-//is the main camera
-_LIT(KDevcamZero,  "devcam0");
-// the secondary camera
-_LIT(KDevcamOne,  "devcam1");
-
-_LIT(KEncodingProperty, "encoding");
-
-_LIT(KVideoMp4MimeType, "video/mp4");
-_LIT(KVideoH264MimeType, "video/H264");
-
-CMMACameraPlayerFactory* CMMACameraPlayerFactory::NewLC()
-{
-    CMMACameraPlayerFactory* pFactory =
-        new(ELeave) CMMACameraPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-
-CMMACameraPlayerFactory::CMMACameraPlayerFactory()
-{
-}
-
-
-CMMACameraPlayerFactory::~CMMACameraPlayerFactory()
-{
-    delete iAudioSettings;
-}
-
-CMMAPlayer* CMMACameraPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayerFactory::CreatePlayerL( aResolver )+");
-    CMMACameraPlayer* player = CMMACameraPlayer::NewLC(iCameraIndex);
-
-    /* Add VideoControl */
-    CMMAVideoControl* videoControl = new(ELeave)CMMAVideoControl(player);
-
-    CleanupStack::PushL(videoControl);
-    player->AddControlL(videoControl);
-    CleanupStack::Pop(videoControl);
-
-    /* Add RecordControl */
-    CMMAVideoRecordControl* videoRecordControl =
-        CMMAVideoRecordControl::NewL(player,
-                                     aResolver,
-                                     iVideoSettings,
-                                     iAudioSettings,
-                                     player->CameraHandle());
-    CleanupStack::PushL(videoRecordControl);
-    player->AddControlL(videoRecordControl);
-    // ownership transfered to player
-    CleanupStack::Pop(videoRecordControl);
-
-    // With record control view finder can't be stopped,
-    // because it can not be restarted.
-    player->SetViewFinderMode(EFalse);
-
-    CleanupStack::Pop(player);
-    return player;
-}
-
-
-void CMMACameraPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeVideo));
-}
-
-void CMMACameraPlayerFactory::PreparePluginSelectionParametersL(
-    CMMAMMFResolver* aResolver,
-    CMMFFormatSelectionParameters* aFormatSelection)
-{
-    // We are creating record type player
-    aResolver->SetRequiredRecordFormatSupportL(*aFormatSelection);
-}
-
-CMMAPlayer* CMMACameraPlayerFactory::CreatePlayerL(const TDesC&)
-{
-    // record player cannot be created from conten-type, since this is used only
-    // when we have also data
-    return NULL;
-}
-
-
-CMMAPlayer* CMMACameraPlayerFactory::CreatePlayerL(const TDesC8&)
-{
-    // record player cannot be created with header data
-    return NULL;
-}
-
-CMMAPlayer* CMMACameraPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& aParameters)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraPlayerFactory::CreatePlayerL aParameters = %S", aParameters.Ptr());
-    // check that locator is capture:://audio
-    if (aProtocol != KMMACaptureProtocol)
-    {
-        return NULL;
-    }
-
-    iCameraIndex = KErrNotFound;
-
-    // If the device supports multiple cameras then "capture://devcam0" is the
-    // main camera pointing outwards from the user. "capture://devcam1" is the
-    // secondary camera pointing e.g. towards the user. "capture://video" is
-    // the default camera locator pointing to the same camera as "devcam0"
-    if ((aMiddlePart == KDefaultVideo) ||
-            (aMiddlePart == KDevcamZero))
-    {
-        // First camera
-        iCameraIndex = 0;
-    }
-    else if (aMiddlePart == KDevcamOne)
-    {
-        // Second camera.
-        iCameraIndex = 1;
-    }
-    else
-    {
-        // not supported type
-        return NULL;
-    }
-
-    CMMAAudioSettings* audioSettings = new(ELeave) CMMAAudioSettings;
-    audioSettings->iDataType = KMMFFourCCCodeNULL;
-    delete iAudioSettings;
-    iAudioSettings = audioSettings;
-
-    if (aParameters.Length() == 0)
-    {
-        // getting defaults from validator
-        iVideoSettings = TMMAParameterValidator::ValidateVideoPropertiesL(aParameters);
-    }
-    else
-    {
-        // we accept either video or mixed parameters, so properties must contain encoding 2 times for mixed and
-        // 1 time for video.
-        // making tmp des without first "encoding"
-        TInt lengthWithoutEncoding = aParameters.Length() - KEncodingProperty().Length();
-        if (lengthWithoutEncoding < 0)
-        {
-            User::Leave(KErrArgument);
-        }
-        TPtrC tmp = aParameters.Right(lengthWithoutEncoding);
-        // finding second "encoding"
-        TInt videoPropertiesStartPos = tmp.Find(KEncodingProperty);
-        if (videoPropertiesStartPos == KErrNotFound)
-        {
-            // there is not another encoding, so assuming that there is only video parameters
-            iVideoSettings = TMMAParameterValidator::ValidateVideoPropertiesL(aParameters);
-        }
-        else
-        {
-            // there is mixed parameters
-            videoPropertiesStartPos += KEncodingProperty().Length();
-
-            // skipping '&' char
-            TPtrC audioProperties = aParameters.Left(videoPropertiesStartPos - 1);
-            TPtrC videoProperties = aParameters.Mid(videoPropertiesStartPos);
-            iVideoSettings = TMMAParameterValidator::ValidateVideoPropertiesL(videoProperties);
-
-            CMMAAudioSettings* audioSettings = TMMAParameterValidator::ValidateAudioPropertiesL(audioProperties);
-            delete iAudioSettings;
-            iAudioSettings = audioSettings;
-        }
-    }
-
-    // if wanted video capture encoding is H264, we must create player with video/mp4
-    // because mmf doesn't have controller for H264
-    if (iVideoSettings.iEncoding.Compare(KVideoH264MimeType) == 0)
-    {
-        return CMMAMMFPlayerFactory::CreatePlayerL(KVideoMp4MimeType);
-    }
-
-    // Find controller with content-type
-    return CMMAMMFPlayerFactory::CreatePlayerL(iVideoSettings.iEncoding);
-}
-
-void CMMACameraPlayerFactory::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aProtocolArray)
-{
-    if (IsSupportedContentTypeL(aContentType))
-    {
-        aProtocolArray.AppendL(KMMACaptureProtocol);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmacamerawindow.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,977 +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:  This class implements MMMADisplayWindow functionality
-*                for Camera viewfinder usage.
-*
-*/
-
-
-//  Include Files
-#include <eikenv.h>
-#include <gdi.h>
-#include <logger.h>
-#include <AknsUtils.h>
-#include <AknsDrawUtils.h>
-#include "cmmacanvasdisplay.h"
-#include "logger.h"
-
-class CMMACanvasDisplay;
-
-//#include <cameraapp.mbg>
-
-// Used for iDisplay member
-
-#include "cmmacamerawindow.h"
-
-// Camera viewfinder start delay
-const TInt KStarterTimeout = 100000; //100 msecs
-
-// Margin of icon displayed instead of viewfinder in case of error
-const TInt KErrorIconMargin = 5; //5 pixels
-
-
-_LIT(KCameraAppBitmapFile, "z:\\resource\\apps\\cameraapp.mif");
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::NewL
-// Two-phased constructor.
-// Use this method to create a CMMACameraWindow instance.
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow* CMMACameraWindow::NewL(TInt aCameraHandle)
-{
-    CMMACameraWindow* self = new(ELeave)CMMACameraWindow(aCameraHandle);
-    return self;
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::~CMMACameraWindow
-// Destructor.
-// NOTE: iUICamera have to be deleted by ReleaseUiResources() called
-//       from UI thread
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow::~CMMACameraWindow()
-{
-    // It's not allowed to delete any nonsharable object here.
-    // This must be done in Destroy().
-    // If the iDisplay is set,
-    // instance should be deleted by sending
-    // event from UI to be received by MUiEventConsumer.
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ViewFinderActive
-// Gets an information if the viewfinder is started.
-// ---------------------------------------------------------------------------
-//
-TBool CMMACameraWindow::ViewFinderActive()
-{
-    return iUICamera && iViewFinderVisible;
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetStarted
-// Notifies window about Started state change.
-// If started, tries to start viewfinder.
-// If not started, stops viewfinder.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetStarted(TBool aStarted)
-{
-    iStarted = aStarted;
-    if (iDisplay)
-    {
-        if (iStarted)
-        {
-          //  iDisplay->UIGetCallback(
-          //      *this, CMMACameraWindow::EShowViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetStarted : before GetCallbackInUiThread + EShowViewFinder");
-            iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EShowViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetStarted : before GetCallbackInUiThread  - EShowViewFinder");
-        }
-        else
-        {
-         //   iDisplay->UIGetCallback(
-         //       *this, CMMACameraWindow::EHideViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetStarted : before GetCallbackInUiThread + EHideViewFinder");
-            iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EHideViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetStarted : before GetCallbackInUiThread  - EHideViewFinder");
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetDisplay
-// Sets iDisplay used to invoke callbacks from UI thread.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDisplay(MMMADisplay *aDisplay)
-{
-    if (iDisplay != aDisplay)
-    {
-        if (iDisplay)
-        {
-            // Clear the resources created within the old Display
-            //iDisplay->UIGetCallback(
-            //    *this, CMMACameraWindow::EDeleteViewFinder);
-
-
-            // instead make a call to java, shift to ui thread and call ReleaseUiResources() method in UI thread
-
-            // here jobject and jclass is valid since the flow is first creat CMMACanvasDisplay and then
-            // call setdeisplay of cameraplayer
-            /*iJavaDisplayObject = iDisplay->GetJavaDisplayObject();
-            iJavaDisplayClass = iDisplay->GetJavaDisplayClass();
-            iJni = iDisplay->GetJNIEnv();
-
-             jmethodID releaseUiResourceID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "releaseUiResource",
-                                         "()I");
-
-             iJni->CallIntMethod(iJavaDisplayObject,releaseUiResourceID);*/
-             //MMAPI UI 3.x req.
-			       LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetDisplay : before GetCallbackInUiThread +");
-             iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EDeleteViewFinder);
-             LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetDisplay : before GetCallbackInUiThread  -");
-        }
-
-        // Set the new Display
-        iDisplay = aDisplay;
-
-        if (iDisplay)
-        {
-            // Get a DSA resources for the new Display
-        //    iDisplay->UIGetDSAResources(*this, MMMADisplay::EMmaThread);
-
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDestinationBitmapL
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDestinationBitmapL(CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-    LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetDestinationBitmapL");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::DrawFrameL
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::DrawFrameL(const CFbsBitmap* /*aBitmap*/)
-{
-    // Ignored, this window will not be used for actual drawing
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDrawRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDrawRect(const TRect& aRect)
-{
-    // MMAPI thread
-    LOG2(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::SetDrawRect TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::SetDrawRect BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    iDrawRect = aRect;
-
-    if (iDisplay)
-    {
-        //iDisplay->UIGetCallback(*this, CMMACameraWindow::EResetViewFinder);
-        LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetDisplay : before GetCallbackInUiThread + EResetViewFinder");
-        iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EResetViewFinder);
-        LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetDisplay : before GetCallbackInUiThread  - EResetViewFinder");
-
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetDrawRectThread
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetDrawRectThread(const TRect& aRect)
-{
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACameraWindow::SetDrawRectThread TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACameraWindow::SetDrawRectThread BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    // Note: Runs in UI thread only
-
-    // Bitmap window's rect can be set in any thread.
-    if (iDrawRect != aRect)
-    {
-        iDrawRect = aRect;
-
-        // Stop and start ViewFinder to update position
-        ResetViewFinder();
-    }
-
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::DrawRect
-//
-// ---------------------------------------------------------------------------
-//
-const TRect& CMMACameraWindow::DrawRect()
-{
-    return iDrawRect;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::WindowSize
-//
-// ---------------------------------------------------------------------------
-//
-TSize CMMACameraWindow::WindowSize()
-{
-    return iDrawRect.Size();
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetPosition
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetPosition(const TPoint& aPosition)
-{
-    // Note: Runs in UI thread only
-    SetDrawRectThread(TRect(aPosition, iDrawRect.Size()));
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetVisible
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetVisible(TBool aVisible, TBool aUseEventServer)
-{
-    iVisible = aVisible;
-
-    if (aUseEventServer)
-    {
-        // We are in UI thread now.
-        SetViewFinderVisibility(aVisible);
-    }
-    else
-    {
-        // MMAPI thread
-        if (iDisplay)
-        {
-            if (aVisible)
-            {
-               // iDisplay->UIGetCallback(
-                //    *this, CMMACameraWindow::EShowViewFinder);
-                LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetVisible : before GetCallbackInUiThread - EShowViewFinder");
-                iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EShowViewFinder);
-                LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetVisible : before GetCallbackInUiThread  - EShowViewFinder");
-            }
-            else
-            {
-               // iDisplay->UIGetCallback(
-               //     *this, CMMACameraWindow::EHideViewFinder);
-                LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetVisible : before GetCallbackInUiThread - EHideViewFinder");
-                iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EHideViewFinder);
-                LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetVisible : before GetCallbackInUiThread  - EHideViewFinder");
-            }
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetWindowRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetWindowRect(
-    const TRect& aRect,
-    MMMADisplay::TThreadType aThreadType)
-{
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACameraWindow::SetWindowRect TL:%d,%d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACameraWindow::SetWindowRect BR:%d,%d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    if (iClientRect != aRect)
-    {
-        iClientRect = aRect;
-
-        if (aThreadType == MMMADisplay::EUiThread)
-        {
-            ResetViewFinder();
-        }
-        else
-        {
-          //  iDisplay->UIGetCallback(
-          //      *this, CMMACameraWindow::EResetViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetWindowRect : before GetCallbackInUiThread + EResetViewFinder");
-            iDisplay->GetCallbackInUiThread((TInt)CMMACameraWindow::EHideViewFinder);
-            LOG(EJavaMMAPI,EInfo,"CMMACameraWindow::SetWindowRect : before GetCallbackInUiThread  - EResetViewFinder");
-        }
-    }
-
-
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::WindowRect
-//
-// ---------------------------------------------------------------------------
-//
-const TRect& CMMACameraWindow::WindowRect()
-{
-    return iClientRect;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::GetDisplayWindowType
-//
-// ---------------------------------------------------------------------------
-//
-MMMADisplayWindow::TDisplayWindowType
-CMMACameraWindow::GetDisplayWindowType() const
-{
-    return EDisplayWindowTypeIsCamera;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::IsVisible
-//
-// ---------------------------------------------------------------------------
-//
-TBool CMMACameraWindow::IsVisible() const
-{
-    return iVisible;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::ContainerSet
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ContainerSet()
-{
-    // We are in UI thread now
-
-    // Container was probably not set when
-    // iDisplay was set,
-    // we can now try get the DSA stuff again
-    if (!iUICamera && iDisplay)
-    {
-        // Get a DSA stuff for the new Display
-       // iDisplay->UIGetDSAResources(*this, MMMADisplay::EUiThread);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::ContainerDestroyed
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ContainerDestroyed()
-{
-    // We are in UI thread now
-    ReleaseUiResources();
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ReserveComplete
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ReserveComplete(TInt aError)
-{
-    LOG1(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::ReserveComplete %d", aError);
-
-    if (aError == KErrNone)
-    {
-        // camera will notify completion with PowerOnComplete method.
-        iUICamera->PowerOn();
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::PowerOnComplete
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::PowerOnComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMACameraWindow::PowerOnComplete %d", aError);
-
-    if (aError == KErrNone)
-    {
-        iCameraPowerOn = ETrue;
-        SetViewFinderVisibility(ETrue);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ViewFinderFrameReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
-{
-    // Empty implementation of the interface method
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::ViewFinderFrameReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::ImageReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ImageReady(CFbsBitmap* /*aBitmap*/,
-                                  HBufC8* /*aData*/,
-                                  TInt /*aError*/)
-{
-    // Empty implementation of the interface method
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::ImageReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MCameraObserver
-// CMMACameraWindow::FrameBufferReady
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::FrameBufferReady(MFrameBuffer* /*aFrameBuffer*/,
-                                        TInt /*aError*/)
-{
-    // Empty implementation of the interface method
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::FrameBufferReady");
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MDirectScreenAccess.
-// CMMACameraWindow::AbortNow
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::AbortNow(
-    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
-{
-    SetViewFinderVisibility(EFalse);
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MDirectScreenAccess.
-// CMMACameraWindow::Restart
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::Restart(
-    RDirectScreenAccess::TTerminationReasons /*aReasons*/)
-{
-    SetViewFinderVisibility(ETrue);
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::CMMACameraWindow
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CMMACameraWindow::CMMACameraWindow(TInt aCameraHandle):
-        iVisible(EFalse),
-        iStarted(EFalse),
-        iViewFinderVisible(EFalse),
-        iCameraPowerOn(EFalse),
-        iDrawRect(0, 0, 0, 0),
-        iClientRect(0, 0, 0, 0),
-        iCameraHandle(aCameraHandle),
-        iUICamera(NULL),
-        iDisplay(NULL),
-        iStarterTimer(NULL),
-        iDirectAccess(NULL),
-        iErrorIconBitmap(NULL),
-        iErrorIconMaskBitmap(NULL),
-        iRWindowRect(0, 0, 0, 0)
-{
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::UIStartViewFinder
-// Creates UI Camera.
-// This CCamera instance is duplicated from handle given to the constructor.
-// Have to be called from the thread which UI Camera will be controlled from.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::UIStartViewFinder(
-    RWsSession &aWs,
-    CWsScreenDevice &aScreenDevice,
-    RWindowBase &aWindow)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::UIStartViewFinder");
-
-    iWs = &aWs;
-    iScreenDevice = &aScreenDevice;
-    iWindow = &aWindow;
-
-    if (!iUICamera)
-    {
-        TRAPD(error, iUICamera =
-                  CCamera::NewDuplicateL(*this, iCameraHandle));
-
-        ELOG1( EJavaMMAPI, 
-            "MMA::CMMACameraWindow::UIStartViewFinder - NewDuplicateL %d",
-            error);
-
-        if (error == KErrNone)
-        {
-            iUICamera->Reserve();
-        }
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::SetViewFinderVisibility
-// If UI Camera have been created, it starts/hides the DirectViewFinder.
-// Have to be called from UI thread in which iUICamera instance was created.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetViewFinderVisibility(TBool aVisible)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMACameraWindow::SetViewFinderVisibility - %d",
-              aVisible);
-
-    if (!iUICamera || !iCameraPowerOn || iViewFinderVisible == aVisible)
-    {
-        return;
-    }
-
-    if (aVisible)
-    {
-        // Viewfinder is going to start
-        if (!iVisible || !iStarted)
-        {
-            return;
-        }
-
-        iViewFinderVisible = ETrue;
-
-        if (!iStarterTimer)
-        {
-            // If starter timer haven't been created yet, create an instance
-            TRAPD(
-                timerErr,
-                iStarterTimer = CPeriodic::NewL(CActive::EPriorityIdle));
-
-            if (timerErr != KErrNone)
-            {
-             ELOG1( EJavaMMAPI, 
-            "MMA::CMMACameraWindow::SetViewFinderVisibility - timer error = %d",
-            timerErr);	
-                __ASSERT_DEBUG(EFalse, User::Invariant());
-            }
-        }
-
-        if (!iStarterTimer->IsActive())
-        {
-            iStarterTimer->Start(
-                KStarterTimeout,
-                0,
-                TCallBack(StarterTimerCallback, this));
-        }
-    }
-    else
-    {
-        // Viewfinder is going to be cancelled
-        LOG(EJavaMMAPI,EInfo,
-            "MMA::CMMACameraWindow::SetViewFinderVisibility - Stopping VF");
-
-        if (iStarterTimer && iStarterTimer->IsActive())
-        {
-            // Cancel the running starter timer
-            iStarterTimer->Cancel();
-        }
-
-        if (iUICamera->ViewFinderActive())
-        {
-            iUICamera->StopViewFinder();
-        }
-        if (iDirectAccess->IsActive())
-        {
-            iDirectAccess->Cancel();
-        }
-
-        iViewFinderVisible = EFalse;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::StarterTimerCallback
-// Executed at the expiry of the iStartedTimer.
-// ---------------------------------------------------------------------------
-//
-TInt CMMACameraWindow::StarterTimerCallback(TAny* aThis)
-{
-    CMMACameraWindow* self = static_cast<CMMACameraWindow*>(aThis);
-    ASSERT(self);
-
-    self->StartViewFinder();
-
-    // We don't want to run the callback again
-    return EFalse;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MMMADisplayWindow
-// CMMACameraWindow::SetRWindowRect
-//
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::SetRWindowRect(const TRect& aRect,
-                                      MMMADisplay::TThreadType aThreadType)
-{
-    ELOG2( EJavaMMAPI, 
-            "MID::CMMACameraWindow::SetRWindowRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-	ELOG2( EJavaMMAPI, 
-            "MID::CMMACameraWindow::SetRWindowRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);	   	
-    iRWindowRect = aRect;
-
-    if (MMMADisplay::EMmaThread == aThreadType)
-    {
-        if (iDisplay)
-        {
-            //iDisplay->UIGetCallback(*this,
-           //                         CMMACameraWindow::EResetViewFinder);
-        }
-    }
-    else if (MMMADisplay::EUiThread == aThreadType)
-    {
-        ResetViewFinder();
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::StartViewFinder
-// Starts viewfinder.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::StartViewFinder()
-{
-    LOG(EJavaMMAPI,EInfo," < StartViewFinder");
-
-    ASSERT(iUICamera);
-    ASSERT(iCameraPowerOn);
-    ASSERT(iStarted);
-
-    iStarterTimer->Cancel();
-
-    // align client rect to RWindow, viewfinder
-    // display co-ordinates is w.r.t to RWindow
-    TRect relativeClientRect;
-    relativeClientRect = iClientRect;
-    relativeClientRect.Move(-iRWindowRect.iTl);
-
-    // Set the drawing area
-    TRect drawRect(iDrawRect);
-    drawRect.Move(relativeClientRect.iTl);
-
-    LOG2( EJavaMMAPI, EInfo, 
-        "MMA::CMMACameraWindow::StartViewFinder - Starting VF TL:%d,%d",
-        drawRect.iTl.iX,
-        drawRect.iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, 
-        "MMA::CMMACameraWindow::StartViewFinder - Starting VF BR:%d,%d",
-        drawRect.iBr.iX,
-        drawRect.iBr.iY);
-
-    TRAPD(vfError, iUICamera->StartViewFinderDirectL(
-              *iWs, *iScreenDevice, *iWindow, drawRect));
-
-    if (vfError == KErrNone)
-    {
-        LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::StartViewFinder - Start OK");
-    }
-    else
-    {
-        LOG1( EJavaMMAPI, EInfo, 
-            "MMA::CMMACameraWindow::StartViewFinder()  - \
-StartViewFinderDirectL error=%d", vfError);
-
-        TRAP_IGNORE(DrawViewFinderErrorL(vfError, drawRect));
-    }
-
-    LOG(EJavaMMAPI,EInfo," > StartViewFinder");
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::DrawViewFinderError()
-// Draws the error message to specified area.
-// Used in cases when viewfinder is unable to start.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::DrawViewFinderErrorL(
-    const TInt /*aError*/,
-    const TRect& aDrawRect)
-{
-
-    ASSERT(iDirectAccess);
-    TInt dcError = KErrNone;
-    if (!iDirectAccess->IsActive())
-    {
-        TRAP(dcError, iDirectAccess->StartL());
-    }
-
-    TRect drawRect(aDrawRect);
-
-    if (dcError == KErrNone)
-    {
-        drawRect.Intersection(iClientRect);
-        drawRect.Move(-iWindow->AbsPosition());
-
-        CFbsBitGc* directGc = iDirectAccess->Gc();
-        directGc->SetClippingRect(drawRect);
-        directGc->SetBrushColor(TRgb(128,128,128));
-        directGc->SetPenColor(TRgb(128,0,0));
-        directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
-        directGc->SetPenStyle(CGraphicsContext::ESolidPen);
-        directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
-        directGc->DrawRect(drawRect);
-
-        if (!iErrorIconBitmap || !iErrorIconMaskBitmap)
-        {
-            if (iErrorIconBitmap)
-            {
-                delete iErrorIconBitmap;
-                iErrorIconBitmap = NULL;
-            }
-
-            if (iErrorIconMaskBitmap)
-            {
-                delete iErrorIconMaskBitmap;
-                iErrorIconMaskBitmap = NULL;
-            }
-/*
-            AknsUtils::CreateIconL(
-                AknsUtils::SkinInstance(),
-                KAknsIIDQgnIndiCam4Camera,
-                iErrorIconBitmap,
-                iErrorIconMaskBitmap,
-                KCameraAppBitmapFile,
-                EMbmCameraappQgn_indi_cam4_camera,
-                EMbmCameraappQgn_indi_cam4_camera_mask
-            );
-            */
-        }
-
-        //TRect iconRect
-        drawRect.iTl.iX += KErrorIconMargin;
-        drawRect.iTl.iY += KErrorIconMargin;
-        drawRect.iBr.iX -= KErrorIconMargin;
-        drawRect.iBr.iY -= KErrorIconMargin;
-
-        if (iErrorIconBitmap->SizeInPixels() != drawRect.Size())
-        {
-            AknIconUtils::SetSize(iErrorIconBitmap, drawRect.Size());
-            AknIconUtils::SetSize(iErrorIconMaskBitmap, drawRect.Size());
-        }
-
-        directGc->BitBltMasked(
-            drawRect.iTl, iErrorIconBitmap,
-            TRect(iErrorIconBitmap->SizeInPixels()),
-            iErrorIconMaskBitmap, EFalse);
-
-        iDirectAccess->ScreenDevice()->Update();
-    }
-
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ReleaseUiResources()
-// Stops the DirectViewFinder and deletes UI Camera instance
-// Have to be called from UI thread in which UI Camera
-// have been created before the CMMACameraWindow instance
-// is deleted.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ReleaseUiResources()
-{
-    if (iUICamera)
-    {
-        SetViewFinderVisibility(EFalse);
-        // iStarterTimer is cancelled by previous call
-        // it can be deleted now
-        delete iStarterTimer;
-        iStarterTimer = NULL;
-        iUICamera->Release();
-        delete iUICamera;
-        iUICamera = NULL;
-        iCameraPowerOn = EFalse;
-        iDirectAccess->Cancel();
-        delete iDirectAccess;
-        iDirectAccess = NULL;
-        delete iErrorIconBitmap;
-        iErrorIconBitmap = NULL;
-        delete iErrorIconMaskBitmap;
-        iErrorIconMaskBitmap = NULL;
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::ResetViewFinder
-// Resets (stops and starts) viewfinder
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::ResetViewFinder()
-{
-
-    if (iStarterTimer && !iStarterTimer->IsActive() && iStarted)
-    {
-        SetViewFinderVisibility(EFalse);
-        SetViewFinderVisibility(ETrue);
-    }
-}
-
-
-// ---------------------------------------------------------------------------
-// CMMACameraWindow::Destroy
-// Deletes this object.
-// ---------------------------------------------------------------------------
-//
-void CMMACameraWindow::Destroy()
-{
-    // Delete itself
-    delete this;
-}
-
-
-// ---------------------------------------------------------------------------
-// From class MUiEventConsumer.
-// CMMACameraWindow::MdcDSAResourcesCallback
-// Callback to iDisplay->UIGetDSAResources().
-// Invoked asynchronously from UI Event Server thread.
-// ---------------------------------------------------------------------------
-//
-/*void CMMACameraWindow::MdcDSAResourcesCallback(
-    RWsSession &aWs,
-    CWsScreenDevice &aScreenDevice,
-    RWindowBase &aWindow)
-{
-    TRAPD(error, iDirectAccess = CDirectScreenAccess::NewL(aWs,
-                                 aScreenDevice,
-                                 aWindow,
-                                 *this));
-    LOG1(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::MdcDSAResourcesCallback, error = %d", error);
-    if (KErrNone != error)
-    {
-        return;
-    }
-    this->UIStartViewFinder(aWs, aScreenDevice, aWindow);
-}
-*/
-
-// ---------------------------------------------------------------------------
-// From class MUiEventConsumer.
-// CMMACameraWindow::MdcUICallback
-// Callback to iDisplay->UIGetCallback().
-// Invoked asynchronously from UI Event Server thread.
-// ---------------------------------------------------------------------------
-//
-
-void CMMACameraWindow::UICallback(TInt aCallbackId)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::MdcUICallback");
-
-    switch (aCallbackId)
-    {
-    case EDeleteViewFinder:
-        ReleaseUiResources();
-        break;
-    case EHideViewFinder:
-        SetViewFinderVisibility(EFalse);
-        break;
-    case EShowViewFinder:
-        SetViewFinderVisibility(ETrue);
-        break;
-    case EResetViewFinder:
-        ResetViewFinder();
-        break;
-    case EDestroyWindow:
-        Destroy();
-        break;
-    }
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmacanvasdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +0,0 @@
-/*
-* 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"
-* 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:  Draws to Canvas.
-*
-*/
-
-
-//  Include Files
-#include <logger.h>
-//#include <lcdui.h> // MMIDCanvas
-
-#ifdef EXTENDED_LCDUI_CANVAS
-#include <MMIDCanvasExtended.h>
-#endif
-
-#include "cmmacanvasdisplay.h"
-#include "cmmabitmapwindow.h"
-#include "mmafunctionserver.h"
-
-// CONSTRUCTION
-// Static constructor, leaves pointer to cleanup-stack
-CMMACanvasDisplay* CMMACanvasDisplay::NewLC(MMAFunctionServer* aEventSource, jobject obj/*MMIDCanvas* aCanvas*/)
-{
-	CMMACanvasDisplay* self =
-        new(ELeave) CMMACanvasDisplay(aEventSource, obj/*aCanvas*/);
-
-    CleanupStack::PushL(self);
-    self->Construct(aEventSource,obj);
-    return self;
-}
-
-// Destructor (virtual by CBase)
-CMMACanvasDisplay::~CMMACanvasDisplay()
-{
-}
-
-CMMACanvasDisplay::CMMACanvasDisplay(MMAFunctionServer* aEventSource ,jobject aJavaDisplayRef)
-{
-	/*
-iJni = aEventSource->getValidJniEnv();
-javaDisplayObject = iJni->NewGlobalRef(javadisplayref);
-javaDisplayClass = iJni->GetObjectClass(javaDisplayObject);
-*/
-}
-
-
-/*
-void CMMACanvasDisplay::SourceSizeChanged(const TSize& aSourceSize)
-{
-    LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SourceSizeChanged");
-
-    #ifdef RD_JAVA_NGA_ENABLED
-    if ( iWindow )
-			{
-    	iWindow->SetVideoCropRegion( TRect( iUserRect.iTl, aSourceSize ) );
-    	}
-    #endif
-
-    iSourceSize = aSourceSize;
-    jmethodID getDisplayWidthID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "getDisplayWidth",
-                                         "()I");
-
-    jmethodID getDisplayHeightID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "getDisplayHeight",
-                                         "()I");
-
-
-     TInt x =  iJni->CallIntMethod(iJavaDisplayObject,getDisplayWidthID);
-     TInt y = iJni->CallIntMethod(iJavaDisplayObject,getDisplayHeightID);
-
-   // TSize fullScreenSize(100,100);    // TO-Do remove hardcoded with the relevent one
-	LOG2(EJavaMMAPI,EInfo,"CMMACanvasdisplay.cpp : SourceSizeChanged () fullScreenSize is x = %d ,y = %d ",x,y);
-	// get the ScreenSize from canvas in java
-    TSize canvasSize(x, y);
-    fullScreenSize = canvasSize;
-    TBool sourceIsBigger = (aSourceSize.iWidth > fullScreenSize.iWidth ||
-                            aSourceSize.iHeight > fullScreenSize.iHeight);
-
-    if (sourceIsBigger)
-    {
-        // Source is larger than display area.
-        // Shrink draw are to fit in display.
-        iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
-    }
-    else
-    {
-        // source is smaller than display area
-        iWindow->SetDrawRect(TRect(iUserRect.iTl, iSourceSize));
-    }
-
-    SetClippingRegion();
-
-    if (iUserRect.IsEmpty())
-    {
-        // Java side hasn't set size.
-        iUserRect = iWindow->DrawRect();
-
-        if (!sourceIsBigger)
-        {
-            // Addjusting rect to top left corner.
-            iUserRect = TRect(iUserRect.Size());
-        }
-    }
-}
-
-*/
-
-void CMMACanvasDisplay::SetFullScreenL(TBool aFullScreen)
-{
-	LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL +");
-    iFullScreen = aFullScreen;
-    if (iContainerVisible)
-    {
-        RemoveClippingRegion();
-
-        if (aFullScreen)
-        {
-            // use new scaled rect
-            // iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
-            iWindow->SetDrawRectThread(ScaleToFullScreen(fullScreenSize, iSourceSize));
-		}
-        else
-        {
-			// use size set from java
-            //iWindow->SetDrawRect(iUserRect);
-            iWindow->SetDrawRectThread(iUserRect);
-        }
-
-        AddClippingRegion();
-    }
-    LOG(EJavaMMAPI,EInfo,"CMMACanvasDisplay::SetFullScreenL +");
-}
-
-void CMMACanvasDisplay::SetWindowL(MMMADisplayWindow* aWindow)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMACanvasDisplay::SetWindowL");
-    CMMADisplay::SetWindowL(aWindow);
-    if (!iWindow)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMACanvasDisplay::SetWindowL: NULL window, returning");
-        return;
-    }
-	/*
-    CFbsBitmap* bitmap = iCanvas->FrameBuffer();
-
-    __ASSERT_DEBUG(bitmap,
-                   User::Panic(_L("Canvas has no bitmap"),
-                               KErrNotFound));
-
-    iWindow->SetDestinationBitmapL(bitmap);
-
-    // Check that container exists
-    User::LeaveIfNull(iDirectContainer);
-
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACanvasDisplay::SetWindowL iDirectContainer->MdcContentBounds() TL %d %d", iDirectContainer->MdcContentBounds().iTl.iX, iDirectContainer->MdcContentBounds().iTl.iY);
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMACanvasDisplay::SetWindowL iDirectContainer->MdcContentBounds() BR %d %d", iDirectContainer->MdcContentBounds().iBr.iX, iDirectContainer->MdcContentBounds().iBr.iY);
-	*/
-	LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::before calling  BoundRect");
-	TRect boundrect = BoundRect();
-    iWindow->SetWindowRect(boundrect/*iDirectContainer->MdcContentBounds()*/, MMMADisplay::EMmaThread);
-
-    #ifdef RD_JAVA_NGA_ENABLED
-    //iWindow->SetRWindowRect( iDirectContainer->MdcContainerWindowRect(),
-    //                         MMMADisplay::EMmaThread );
-	iWindow->SetRWindowRect( boundrect,
-     							MMMADisplay::EMmaThread );
-    #endif
-    
-    SetClippingRegion();
-}
-
-
-
-TRect& CMMACanvasDisplay::BoundRect()
-{
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect +");
-  jmethodID getBoundRectID = iJni->GetMethodID(
-	                                         iJavaDisplayClass,
-	                                         "getBoundRect",
-                                         "()V");
-
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect --1");
-  // set the value to java,so that we can access those from array
-  iJni->CallVoidMethod(iJavaDisplayObject,getBoundRectID);
-  jfieldID field = iJni->GetFieldID(iJavaDisplayClass, "displayboundarr", "[I");
-  if(field == NULL)
-  {
-	  // handle error
-  }
-  /* Read the instance field s */
-  jintArray javaboundinfoarr = (jintArray)iJni->GetObjectField(iJavaDisplayObject, field);
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect --2");
-  jint* nativeboundinfoarr = iJni->GetIntArrayElements(javaboundinfoarr, NULL);
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect --3");
-    if (!nativeboundinfoarr)
-    {    // outputBuffer was already allocated
-        iJni->ReleaseIntArrayElements(javaboundinfoarr, nativeboundinfoarr, JNI_ABORT);
-        // return invalid rect.
-        TRect rect(0,0,0,0);
-        return rect;
-    }
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect --4");
-// create TRect
-  TInt xcoordinate = nativeboundinfoarr[0];
-  TInt ycoordinate = nativeboundinfoarr[1];
-  TInt width = nativeboundinfoarr[2];
-  TInt height = nativeboundinfoarr[3];
-  LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() co-ordinate of topleftcorner is x = %d,y =%d",xcoordinate,ycoordinate);
-  LOG2(EJavaMMAPI,EInfo,"CMMACanvasDisplay: BoundRect() size of bound rect is width = %d,height =%d",width,height);
-  TPoint topleft(xcoordinate,ycoordinate);
-  TSize rectsize(width,height);
-  TRect boundRect(topleft,rectsize);
-  iJni->ReleaseIntArrayElements(javaboundinfoarr, nativeboundinfoarr, JNI_COMMIT);
-   LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::BoundRect -");
-  return boundRect;
-}
-
-// ask java side peer about the container rect size
-// currently assuming the boundrect and containerrect will be same in case of canvas
-TRect& CMMACanvasDisplay::ContainerWindowRect()
-{
-
-  return BoundRect();
-
-}
-
-
-void CMMACanvasDisplay::SetDisplayLocationL(const TPoint& aPosition)
-{
-    // Move iUserRect top left corner to aPosition.
-    TSize size(iUserRect.Size());
-    iUserRect.iTl = aPosition;
-    iUserRect.SetSize(size);
-
-    if (iContainerVisible && !iFullScreen && iWindow)
-    {
-        iWindow->SetDrawRect(iUserRect);
-        SetClippingRegion();
-    }
-    else
-    {
-        iResetDrawRect = ETrue;
-    }
-}
-
-TPoint CMMACanvasDisplay::DisplayLocation()
-{
-    if (iWindow && iFullScreen)
-    {
-        return iWindow->DrawRect().iTl;
-    }
-    else
-    {
-        return iUserRect.iTl;
-    }
-}
-
-
-
-
-
-/*
-void CMMACanvasDisplay::MdcContentBoundsChanged(const TRect& aRect)
-{
-    LOG2(EJavaMMAPI,EInfo,"MID::CMMACanvasDisplay::MdcContentBoundsChanged aRect TL %d %d",
-               aRect.iTl.iX, aRect.iTl.iY);
-    LOG2(EJavaMMAPI,EInfo,"MID::CMMACanvasDisplay::MdcContentBoundsChanged aRect BR %d %d",
-               aRect.iBr.iX, aRect.iBr.iY);
-
-    if (iWindow)
-    {
-        // Set new rect to window.
-        iWindow->SetWindowRect(aRect, MMMADisplay::EUiThread);
-
-        if (iFullScreen)
-        {
-            TRect fullRect = ScaleToFullScreen(iCanvas->ContentSize(),
-                                               iSourceSize);
-
-            // use SetDrawRectThread because this code is executed
-            // in lcdui thread
-            iWindow->SetDrawRectThread(fullRect);
-        }
-        else
-        {
-            // move to user defined position.
-            iWindow->SetPosition(iUserRect.iTl);
-        }
-    }
-    SetClippingRegion();
-}
-*/
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2002 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 is base interface for all controls.
-*
-*/
-
-
-//  INCLUDE FILES
-#include "cmmacontrol.h"
-
-const TDesC* CMMAControl::ClassNameJni(CMMAControl* aControl)
-{
-    return &aControl->ClassName();
-}
-
-void CMMAControl::StaticSetHandle(CMMAControl* aControl,
-                                  jobject aControlObject)
-{
-    aControl->SetHandle(aControlObject);
-}
-
-EXPORT_C const TDesC& CMMAControl::PublicClassName() const
-{
-    return ClassName();
-}
-
-inline void CMMAControl::SetHandle(jobject aControlObject)
-{
-    iControlObject = aControlObject;
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmadeleterefevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadeleterefevent.h"
-
-CMMADeleteRefEvent::CMMADeleteRefEvent(jobject aDeleteRefObject):
-        CMMAEvent(EDisposableEvent)
-{
-    iDeleteRefObject = aDeleteRefObject;
-}
-
-// from CJavaEvent
-void CMMADeleteRefEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADeleteRefEvent::Dispatch");
-    aJni.DeleteGlobalRef(iDeleteRefObject);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmadisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,752 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements MMMADisplay
-*
-*/
-
-
-//  Include Files
-#include "logger.h"
-
-#include "cmmadisplay.h"
-#include "mmmadisplaywindow.h"
-
-// temporary
-#include <w32std.h>
-
-// Destructor (virtual by CBase)
-CMMADisplay::~CMMADisplay()
-{
-/*
-    if (iDirectContainer)
-    {
-        // Remove clip rect if set
-        if (!iClipRect.IsEmpty())
-        {
-            LOG(EJavaMMAPI,EInfo,"CMMADisplay::~CMMADisplay(): Removing clip rect");
-            iDirectContainer->MdcRemoveContentBounds(iClipRect);
-        }
-
-        // Remove this object from MDirectContainer
-        iDirectContainer->MdcRemoveContent(this);
-    }
-    */
-}
-
-
-CMMADisplay::CMMADisplay():
-        iVisible(ETrue),
-        iFullScreen(EFalse),
-        iContainerVisible(ETrue),
-        iIsForeground(ETrue),
-        iResetDrawRect(EFalse)
-{
-}
-
-void CMMADisplay::Construct(MMAFunctionServer* eventSource , jobject javadisplayref)
-{
-	iEventSource = eventSource;
-	iJni = iEventSource->getValidJniEnv();
-	iJavaDisplayObject = iJni->NewGlobalRef(javadisplayref);
-	iJavaDisplayClass = iJni->GetObjectClass(iJavaDisplayObject);
-    // Components must have direct content.
-   /* __ASSERT_LOG(EJavaMMAPI,EInfo,"aDirectContainer, User::Invariant());
-
-    // Not owned
-    iDirectContainer = aDirectContainer;
-
-    // Get component visibility. Later visibility changes will
-    // be informed through MDirectContent observer.
-    iContainerVisible = iDirectContainer->MdcContainerVisibility();
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::Construct iContainerVisible = %d", iContainerVisible);
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::Construct iVisible = %d", iVisible);
-
-    // Add this MDirectContent to the MDirectContainer. Cannot fail.
-    iDirectContainer->MdcAddContent(this);
-    */
-}
-
-TRect CMMADisplay::ScaleToFullScreen(const TSize& aFullScreenSize,
-                                     const TSize& aSourceSize)
-{
-	LOG(EJavaMMAPI,EInfo,"CMMADisplay::ScaleToFullScreen() +");
-    if ((aSourceSize.iWidth == 0) &&
-            (aSourceSize.iHeight == 0))
-    {
-        // Avoid divide by zero.
-        return TRect();
-    }
-
-    // Width or height will be full size.
-    TRect drawRect(TPoint(0, 0),
-                   aFullScreenSize);
-
-    // Smaller dimension scale ratio will be scaled.
-    // Changed to area calculation to avoid reals and dimension
-    // with smaller area will be scaled.
-    TInt vDif((aFullScreenSize.iWidth - aSourceSize.iWidth)
-              * aFullScreenSize.iHeight);
-    TInt hDif((aFullScreenSize.iHeight - aSourceSize.iHeight)
-              * aFullScreenSize.iWidth);
-
-    TPoint position(0, 0);
-
-    // Check which side to scale to fullscreen size.
-    if (hDif > vDif)
-    {
-        // Width is full screen width.
-        // Scale height with aspect ratio.
-        drawRect.iBr.iY = aFullScreenSize.iWidth * aSourceSize.iHeight
-                          / aSourceSize.iWidth;
-        // move rect middle of the screen
-        position.iY = (aFullScreenSize.iHeight - drawRect.iBr.iY) / 2;
-    }
-    else
-    {
-        // Height is full screen height.
-        // Scale width with aspect ratio.
-        drawRect.iBr.iX = aFullScreenSize.iHeight * aSourceSize.iWidth
-                          / aSourceSize.iHeight;
-        // move rect middle of the screen
-        position.iX = (aFullScreenSize.iWidth - drawRect.iBr.iX) / 2;
-    }
-
-    drawRect.Move(position);
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::ScaleToFullScreen() -");
-    return drawRect;
-}
-
-// from MMMADisplay
-void CMMADisplay::DrawFrameL(const CFbsBitmap* aBitmap)
-{
-    // This method is called only if bitmap is used.
-    // Runs in mmapi thread
-    if (iVisible && iWindow /*&& iDirectContainer*/)
-    {
-        iWindow->DrawFrameL(aBitmap);
-        //iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
-    }
-}
-
-void CMMADisplay::SetClippingRegion()
-{
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion");
-
-    if (!iWindow ||
-            (iWindow->GetDisplayWindowType() == MMMADisplayWindow::EDisplayWindowTypeIsBitmap) ||
-            iClipRect == iWindow->DrawRect() && iContainerVisible && iVisible)
-    {
-    	 LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion before return");
-    	     return;
-    }
-
-    TBool refreshScreen(EFalse);
-    // Remove first the current clip rect if set
-   LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: iClipRect = %d X %d",iClipRect.Width(),iClipRect.Height());
-    if (!iClipRect.IsEmpty())
-    {
-        LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: Removing old rect");
-        //iDirectContainer->MdcRemoveContentBounds(iClipRect);
-        iClipRect.SetRect(0, 0, 0, 0);
-        refreshScreen = ETrue;
-    }
-    // If visible then set a new clip rect
-    if (iVisible && iContainerVisible)
-    {
-    	LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if (iVisible && iContainerVisible)");
-        iClipRect = iWindow->DrawRect();
-        LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if (iVisible && iContainerVisible)iClipRect = %d X %d",iClipRect.Width(),iClipRect.Height());
-        if (!iClipRect.IsEmpty())
-        {
-            LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: Adding new rect");
-            // Add new clipping rect
-         //   iDirectContainer->MdcAddContentBounds(iClipRect);
-         SetContentBoundToJavaControl(iClipRect);
-            refreshScreen = ETrue;
-        }
-    }
-    if (refreshScreen)
-    {
-    	LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion: inside if(refreshScreen)");
-        // refresh screen
-       // iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
-        RefreshJavaControl(iWindow->WindowRect());
-    }
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetClippingRegion -");
-}
-
-void CMMADisplay::RemoveClippingRegion()
-{
-    // Called in mmapi thread
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::RemoveClippingRegion");
-
-    if (!iWindow ||
-            (iWindow->GetDisplayWindowType() == MMMADisplayWindow::EDisplayWindowTypeIsBitmap))
-    {
-        return;
-    }
-    // Remove first the current clip rect if set
-    if (!iClipRect.IsEmpty())
-    {
-        LOG(EJavaMMAPI,EInfo,"CMMADisplay::RemoveClippingRegion: Removing old rect");
-        //iDirectContainer->MdcRemoveContentBounds(iClipRect);
-        RemoveContentBoundFromJavaControl(iClipRect);
-        iClipRect.SetRect(0, 0, 0, 0);
-        // refresh screen
-        //iDirectContainer->MdcFlushContainer(iWindow->WindowRect());
-        RefreshJavaControl(iWindow->WindowRect());
-    }
-}
-
-void CMMADisplay::AddClippingRegion()
-{
-    // Called in mmapi thread
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion");
-		LOG2(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion iClipRect width = %d height = %d", iClipRect.Width() , iClipRect.Height());
-		  
-    if (!iWindow ||
-            (iWindow->GetDisplayWindowType() ==
-             MMMADisplayWindow::EDisplayWindowTypeIsBitmap) ||
-            iClipRect == iWindow->DrawRect())
-    {
-        return;
-    }
-    // If visible then set a new clip rect
-    if (iVisible)
-    {
-        iClipRect = iWindow->DrawRect();
-        if (!iClipRect.IsEmpty())
-        {
-            LOG(EJavaMMAPI,EInfo,"CMMADisplay::AddClippingRegion: Adding new rect");
-            // Add new clipping rect
-          // iDirectContainer->MdcAddContentBounds(iClipRect);
-          SetContentBoundToJavaControl(iClipRect);
-            // refresh screen
-           // iDirectContainer->MdcFlushContainer(
-           //     iWindow->WindowRect());
-           RefreshJavaControl(iWindow->WindowRect());
-        }
-    }
-}
-
-// from MMMADisplay
-TSize CMMADisplay::DisplaySize()
-{
-    if (iWindow && iFullScreen)
-    {
-        return iWindow->DrawRect().Size();
-    }
-    else
-    {
-        return iUserRect.Size();
-    }
-}
-
-// from MMMADisplay
-void CMMADisplay::SetDisplaySizeL(const TSize& aSize)
-{
-    // user rect contains size set from java.
- iUserRect.SetSize(aSize);
- LOG2(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetDisplaySizeL iUserRect = %d X %d", iUserRect.Width() ,iUserRect.Height());
-    // Size change has no effect if fullscreen mode is on.
-    // New size could be used when fullscreen is turned off.
-    if (iContainerVisible && !iFullScreen && iWindow)
-    {
-    	 	LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
-        RemoveClippingRegion();
-        LOG2(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetDisplaySizeL iUserRect after removingClipRegion = %d X %d", iUserRect.Width() ,iUserRect.Height());
-        iWindow->SetDrawRect(iUserRect);
-        AddClippingRegion();
-        LOG2(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetDisplaySizeL iUserRect after AddingClipRegion = %d X %d", iUserRect.Width() ,iUserRect.Height());
-    }
-    else
-    {
-    	 LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
-        iResetDrawRect = ETrue;
-    }
-}
-
-// from MMMADisplay
-void CMMADisplay::SetVisible(TBool aValue)
-{
-    iVisible = aValue;
-    // Window may be set visible only if container is on screen,
-
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetVisible + iContainerVisible = %d", iContainerVisible);
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetVisible iVisible = %d", iVisible);
-    if (!iIsForeground)
-    {
-        LOG(EJavaMMAPI,EInfo,"MID::CMMADisplay::SetVisible - iIsForeground = 0");
-        return;
-    }
-    // if not it can not be set visible.
-    if (iWindow && iContainerVisible)
-    {
-       // iWindow->SetVisible(aValue, EFalse);
-       //MMAPI UI 3.x req. (had to comment above line and add below line which excutes in FS thread)
-        iWindow->SetVisible(aValue, ETrue);
-        SetClippingRegion();
-    }
-}
-
-
-void CMMADisplay::SetContainerVisibility(TBool aValue)
-{
-	iContainerVisible = aValue;
-	// TODO : delete the below check once implementation is done as it is used only for testing purpose
-	if(iContainerVisible)
-	LOG(EJavaMMAPI,EInfo,"CMMADisplay:SetContainerVisibility(): Container is visible ");
-	else
-	LOG(EJavaMMAPI,EInfo,"CMMADisplay:SetContainerVisibility(): Container is not visible ");
-
-	HandleContainerVisibilityChanged(aValue);
-}
-// from MMMADisplay
-void CMMADisplay::SetWindowL(MMMADisplayWindow* aWindow)
-{
-    // Sets new window. Ownership is not transferred.
-    iWindow = aWindow;
-}
-
-// from MMMADisplay
-MMMADisplayWindow* CMMADisplay::Window()
-{
-    return iWindow;
-}
-
-TBool CMMADisplay::IsVisible()
-{
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::IsVisible iContainerVisible = %d", iContainerVisible);
-    LOG1(EJavaMMAPI,EInfo,"MID::CMMADisplay::IsVisible iVisible = %d", iVisible);
-    // display is visible if container is on screen and
-    // java side has set it visible
-    return iVisible && iContainerVisible;
-}
-
-TBool CMMADisplay::IsFullScreen()
-{
-    return iFullScreen;
-}
-
-TBool CMMADisplay::HasContainer()
-{
-   // return iDirectContainer != NULL;
-   return EFalse;   // temporary
-}
-
-
-void CMMADisplay::HandleContainerVisibilityChanged( TBool aVisible )
-    {
-    LOG1(EJavaMMAPI,EInfo, "CMMADisplay::HandleContainerVisibilityChanged aVisible = %d",
-      					                                            aVisible );
-    if(!iIsForeground && aVisible)
-        {
-        LOG(EJavaMMAPI,EInfo," CMMADisplay::HandleContainerVisibilityChanged Condition 1 ");
-        return;
-        }
-
-    LOG(EJavaMMAPI,EInfo," CMMADisplay::HandleContainerVisibilityChanged After condition1");
-
-    if (iWindow)
-    {
-        // midlet comes to foreground (0 to 1 transition),
-        // Allow turn on or turn off based on aVisible
-        if (aVisible != iWindow->IsVisible())
-        {
-            // Allow
-            LOG(EJavaMMAPI,EInfo,"MID::CMMADisplay::MdcContainerVisibilityChanged Allow ");
-        }
-        else if( iContainerVisible == aVisible )
-        {
-            LOG(EJavaMMAPI,EInfo,"MID::CMMADisplay::MdcContainerVisibilityChanged iContainerVisible == aVisible ");
-            // if state is not changed, we do not need to do it again
-            return;
-        }
-    }
-
-    LOG(EJavaMMAPI,EInfo,"MID::CMMADisplay::MdcContainerVisibilityChanged After condition2");
-
-    if (iWindow)
-    {
-        LOG(EJavaMMAPI,EInfo,"MID::CMMADisplay::MdcContainerVisibilityChanged iWindow is valid ");
-        // change is only needed if java side has set display visible or
-        // if container loses focus
-        if (!iContainerVisible || iVisible)
-        {
-            if (iResetDrawRect && aVisible && !iFullScreen)
-            {
-                iWindow->SetDrawRectThread(iUserRect);
-                iResetDrawRect = EFalse;
-            }
-            if (iIsForeground)
-            {
-                iWindow->SetVisible(aVisible);
-            }
-            SetClippingRegion();
-        }
-    }
-}
-
-/*
-
-void CMMADisplay::MdcItemContentRectChanged(const TRect& aContentRect,
-        const TRect& aScreenRect)
-{
-    // To be overwritten if used
-    __ASSERT_LOG(EJavaMMAPI,EInfo,"EFalse, User::Invariant());
-}
-
-void CMMADisplay::MdcContainerWindowRectChanged(const TRect&
-	                                              #ifdef RD_JAVA_NGA_ENABLED
-	                                               aRect
-	                                              #endif
-	                                              )
-    {
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerWindowRectChanged +");
-
-    #ifdef RD_JAVA_NGA_ENABLED
-    if( iWindow )
-    	{
-    	LOG(EJavaMMAPI,EInfo,"CMMADisplay::MdcContainerWindowRectChanged, SetRWindowRect");
-    	iWindow->SetRWindowRect(aRect, MMMADisplay::EUiThread);
-    	}
-    #endif
-    }
-void CMMADisplay::MdcContainerDestroyed()
-{
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMADisplay::MdcContainerDestroyed");
-
-    if (iWindow)
-    {
-        iWindow->ContainerDestroyed();
-    }
-
-    iDirectContainer = NULL;
-}
-
-
-void CMMADisplay::MdcAbortDSA()
-{
-    if (iWindow)
-    {
-        iWindow->AbortDSA();
-    }
-}
-
-
-void CMMADisplay::MdcResumeDSA()
-{
-    if (iWindow)
-    {
-        iWindow->ResumeDSA();
-    }
-}
-
-void CMMADisplay::UIGetCallback(
-    MUiEventConsumer& aConsumer,
-    TInt aCallbackId)
-{
-    if (iDirectContainer)
-    {
-        iDirectContainer->MdcGetUICallback(aConsumer, aCallbackId);
-    }
-}
-*/
-
-
-void CMMADisplay::GetCallbackInUiThread(TInt placeholder)
-{
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread +");
-
-
-
-
-
-
-
-
-	 jmethodID getCallBackMethodID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "GetCallbackInUiThread",
-                                         "(I)V");
-   // LOG1(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread getCallBackMethodID = %d",getCallBackMethodID);
-    iJni->CallVoidMethod(iJavaDisplayObject,getCallBackMethodID,placeholder);
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::GetCallbackInUiThread -");
-}
-
-void CMMADisplay::CalledBackInUiThread(TInt placeholder)
-{
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::CalledBackInUiThread +");
-		iWindow->UICallback(placeholder);
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::CalledBackInUiThread -");
-
-}
-
-void CMMADisplay::SourceSizeChanged(TInt aJavaControlWidth, TInt aJavaControlHeight)
-	{
-		LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged(aSourceSize,aJavaControlWidth,aJavaControlHeight) + aJavaControlWidth = %d ,aJavaControlHeight = %d",aJavaControlWidth,aJavaControlHeight);
-		iSourceSize = SourceSize();
-		LOG2(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged(aSourceSize,aJavaControlWidth,aJavaControlHeight) + sourcesize = %d X %d",iSourceSize.iWidth , iSourceSize.iHeight);
-		#ifdef RD_JAVA_NGA_ENABLED
-    if ( iWindow )
-			{
-    	iWindow->SetVideoCropRegion( TRect( iUserRect.iTl, iSourceSize ) );
-    	}
-    #endif
-
-    // size of canvas in java
-    TSize canvasSize(aJavaControlWidth, aJavaControlHeight);
-    fullScreenSize = canvasSize;
-    TBool sourceIsBigger = (iSourceSize.iWidth > fullScreenSize.iWidth ||
-                            iSourceSize.iHeight > fullScreenSize.iHeight);
-
-    if (sourceIsBigger)
-    {
-        // Source is larger than display area.
-        // Shrink draw are to fit in display.
-        iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
-    }
-    else
-    {
-        // source is smaller than display area
-        iWindow->SetDrawRect(TRect(iUserRect.iTl, iSourceSize));
-    }
-
-    SetClippingRegion();
-
-    if (iUserRect.IsEmpty())
-    {
-        // Java side hasn't set size.
-        iUserRect = iWindow->DrawRect();
-
-        if (!sourceIsBigger)
-        {
-            // Addjusting rect to top left corner.
-            iUserRect = TRect(iUserRect.Size());
-        }
-    }
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged(aSourceSize,aJavaControlWidth,aJavaControlHeight) -");
-	}
-
-void CMMADisplay::SetWindowResources(QWidget* qtWidget)
-	{
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetWindowResources +");
-		CCoeControl* control = 0;
-		if(qtWidget && qtWidget ->winId())
-			{
-				control = reinterpret_cast<CCoeControl*>(qtWidget->winId());
-			}
-
-		CCoeEnv *coeEnv = control->ControlEnv();
-		RWsSession * iWs = &(coeEnv->WsSession());
-		CWsScreenDevice* iScreenDevice = coeEnv->ScreenDevice();
-    RWindowBase* window = static_cast<RWindowBase*>(control->DrawableWindow());
-    if (!iWindow)
-    {
-       return;
-    }
-     iWindow->ProcureWindowResourcesFromQWidget(iWs,iScreenDevice,window);
-     LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetWindowResources -");
-	}
-
-
-void CMMADisplay::SetForeground(TBool aForeground, TBool aUseEventServer)
-{
-    LOG1(EJavaMMAPI,EInfo,"MMA::CMMADisplay::SetForeground %d", aForeground);
-    iIsForeground = aForeground;
-
-    if (aForeground)
-    {
-        if (iContainerVisible && !iWindow->IsVisible())
-        {
-            iWindow->SetVisible(ETrue, aUseEventServer);
-        }
-    }
-    else
-    {
-        if (iWindow->IsVisible())
-        {
-            iWindow->SetVisible(EFalse, aUseEventServer);
-        }
-    }
-}
-
-TSize CMMADisplay::SourceSize()
-	{
-		LOG(EJavaMMAPI,EInfo,"CMMADisplay::SetSourceSizeToDisplay ");
-		 return iUiPlayer->SourceSize();
-	}
-	
-void CMMADisplay::SetUIPlayer(MMMAGuiPlayer* player)
-	{
-		iUiPlayer = player;
-	}
-
-	
-void CMMADisplay::SourceSizeChanged(const TSize& aSourceSize)
-{
-    LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged");
-    
-		#ifdef RD_JAVA_NGA_ENABLED
-    if ( iWindow )
-			{
-    	iWindow->SetVideoCropRegion( TRect( iUserRect.iTl, aSourceSize ) );
-    	}
-    #endif
-
-    iSourceSize = aSourceSize;
-    jmethodID getDisplayWidthID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "getDisplayWidth",
-                                         "()I");
-
-    jmethodID getDisplayHeightID = iJni->GetMethodID(
-                                         iJavaDisplayClass,
-                                         "getDisplayHeight",
-                                         "()I");
-
-
-    TInt x =  iJni->CallIntMethod(iJavaDisplayObject,getDisplayWidthID);
-    TInt y = iJni->CallIntMethod(iJavaDisplayObject,getDisplayHeightID);
-		LOG2(EJavaMMAPI,EInfo,"CMMADisplay.cpp : SourceSizeChanged () fullScreenSize is x = %d ,y = %d ",x,y);
-		// get the ScreenSize from canvas in java
-    TSize canvasSize(x, y);
-    fullScreenSize = canvasSize;
-    TBool sourceIsBigger = (aSourceSize.iWidth > fullScreenSize.iWidth ||
-                            aSourceSize.iHeight > fullScreenSize.iHeight);
-
-    if (sourceIsBigger)
-    {
-        // Source is larger than display area.
-        // Shrink draw are to fit in display.
-        iWindow->SetDrawRect(ScaleToFullScreen(fullScreenSize, iSourceSize));
-    }
-    else
-    {
-        // source is smaller than display area
-        iWindow->SetDrawRect(TRect(iUserRect.iTl, iSourceSize));
-    }
-
-    SetClippingRegion();
-
-    if (iUserRect.IsEmpty())
-    {
-        // Java side hasn't set size.
-        iUserRect = iWindow->DrawRect();
-
-        if (!sourceIsBigger)
-        {
-            // Addjusting rect to top left corner.
-            iUserRect = TRect(iUserRect.Size());
-        }
-    }
-}
-
-
-
-void CMMADisplay::SetDisplayPosition(TInt uiControlLocationX,TInt uiControlLocationY,TInt	videoControlLocationX,TInt videoControlLocationY)
-{
-	 	LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged + ");
-		TPoint point(videoControlLocationX ,videoControlLocationY);
-		//calling derived class fuction
-	 	SetDisplayLocationL(point);
-	  LOG(EJavaMMAPI,EInfo,"CMMADisplay::SourceSizeChanged - ");
-}
-
-
-void CMMADisplay::ResetJavaRectObject(const TRect& aRect)
-	{
-	LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject +");
-	JNIEnv* validJni = iEventSource->getValidJniEnv();
-  jmethodID setRectID = validJni->GetMethodID(
-	                                         iJavaDisplayClass,
-	                                         "setRect",
-                                         "()V");
-
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --1");
-  // set the value to java,so that we can access those from array
-  jfieldID field = validJni->GetFieldID(iJavaDisplayClass, "rectDimension", "[I");
-  if(field == NULL)
-  {
-	  // handle error
-  }
-  /* Write to the instance fields */
-  jintArray javaDimensionarr = (jintArray)validJni->GetObjectField(iJavaDisplayObject, field);
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --2");
-  jint* nativeRectDimensionArr = validJni->GetIntArrayElements(javaDimensionarr, NULL);
-  LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --3");
-    if (!nativeRectDimensionArr)
-    {    // inputBuffer was already allocated
-        validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, JNI_ABORT);
-        LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject Error in resetting rect dimension to java");
-        return;
-    }
-  nativeRectDimensionArr[0] = aRect.iTl.iX;
-  nativeRectDimensionArr[1] = aRect.iTl.iY;;
-  nativeRectDimensionArr[2] = aRect.Width();
-  nativeRectDimensionArr[3] = aRect.Height();
-   // Now the dimension array in java is updated hence reset the java rect
-   validJni->CallVoidMethod(iJavaDisplayObject,setRectID);
-    
-   validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, JNI_COMMIT);
-   LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject -");
-}
-
-
-void CMMADisplay::SetContentBoundToJavaControl(const TRect& aRect)
-	{
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::SetContentBoundToJavaControl +");
-		JNIEnv* validJni = iEventSource->getValidJniEnv();
-		// Reset the java rect
-		ResetJavaRectObject(aRect);
-		jmethodID setContentBoundID = validJni->GetMethodID(
-	                                         iJavaDisplayClass,
-	                                         "setContentBound",
-                                         "()V");
-    // call java function                                     
-		validJni->CallVoidMethod(iJavaDisplayObject,setContentBoundID);
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::SetContentBoundToJavaControl -");
-	}
-	
-void CMMADisplay::RemoveContentBoundFromJavaControl(const TRect& aRect)
-	{
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RemoveContentBoundFromJavaControl +");
-		JNIEnv* validJni = iEventSource->getValidJniEnv();
-		// Reset the java rect
-		ResetJavaRectObject(aRect);
-		jmethodID removeContentBoundID = validJni->GetMethodID(
-	                                         iJavaDisplayClass,
-	                                         "removeContentBound",
-                                         "()V");
-    // call java function                                     
-		validJni->CallVoidMethod(iJavaDisplayObject,removeContentBoundID);
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RemoveContentBoundFromJavaControl -");
-	}	
-	
-void CMMADisplay::RefreshJavaControl(const TRect& aRect)
-	{
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RefreshJavaControl +");
-		JNIEnv* validJni = iEventSource->getValidJniEnv();
-		// Reset the java rect
-		//ResetJavaRectObject(aRect);
-		jmethodID redrawControlID = validJni->GetMethodID(
-	                                         iJavaDisplayClass,
-	                                         "redrawControl",
-                                         "()V");
-    // call java function                                     
-		validJni->CallVoidMethod(iJavaDisplayObject,redrawControlID);
-		LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::RefreshJavaControl -");
-	}		
-	
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmadurationupdater.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Send update duration event if needed when player state changes
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadurationupdater.h"
-
-CMMADurationUpdater* CMMADurationUpdater::NewL(CMMAPlayer& aPlayer)
-{
-    CMMADurationUpdater* self = new(ELeave) CMMADurationUpdater(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-CMMADurationUpdater::CMMADurationUpdater(CMMAPlayer& aPlayer)
-        : iPlayer(aPlayer), iDuration(KErrNotFound), iSecondStart(EFalse)
-{
-}
-
-void CMMADurationUpdater::ConstructL()
-{
-    iPlayer.AddStateListenerL(this);
-}
-
-CMMADurationUpdater::~CMMADurationUpdater()
-{
-    iPlayer.RemoveStateListener(this);
-}
-
-void CMMADurationUpdater::StateChanged(TInt aState)
-{
-    TInt64 duration = 0;
-    iPlayer.GetDuration(&duration);
-
-    if ((duration >= KErrNotFound) && (duration != iDuration))
-    {
-        // Send DURATION_UPDATED
-        iDuration = duration;
-        iPlayer.PostLongEvent(CMMAPlayerEvent::EDurationUpdated, iDuration);
-    }
-    else if (duration == KErrNotFound && aState == CMMAPlayer::EStarted && !iSecondStart)
-    {
-        // for medias whose duration is unknown (e.g. streaming audio amr)
-        // must post EDurationUpdated event with duration -1 in first start
-        iPlayer.PostLongEvent(CMMAPlayerEvent::EDurationUpdated, iDuration);
-        iSecondStart = ETrue;
-    }
-
-    if (aState == CMMAPlayer::ERealized)
-    {
-        iSecondStart = EFalse;
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaevent.h"
-
-CMMAEvent::CMMAEvent(jobject aNotifyObject,
-                     jmethodID aHandleEventMethod,
-                     TDisposability aDisposable):
-        iListenerObject(aNotifyObject),
-        iHandleEventMethod(aHandleEventMethod)
-{
-}
-
-
-CMMAEvent::CMMAEvent(TDisposability /*aDisposable*/)
-{
-}
-
-
-void CMMAEvent::SetEventData(TInt aEventData)
-{
-    iEventData = aEventData;
-}
-
-
-// from CJavaEvent
-void CMMAEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEvent::Dispatch iEventData=%d", iEventData);
-
-    aJni.CallVoidMethod(iListenerObject,
-                        iHandleEventMethod,
-                        iEventData);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaframepositioningcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Abstract base class for FramePositioningControl
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmaplayer.h"
-#include "cmmaframepositioningcontrol.h"
-
-CMMAFramePositioningControl::CMMAFramePositioningControl(CMMAPlayer* aPlayer)
-        : iPlayer(aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::CMMAFramePositioningControl");
-}
-
-CMMAFramePositioningControl::~CMMAFramePositioningControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::~CMMAFramePositioningControl");
-}
-
-const TDesC& CMMAFramePositioningControl::ClassName() const
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::ClassName");
-    return KMMAFramePositioningControlName;
-}
-
-TInt CMMAFramePositioningControl::ClampMediaTime(TInt64& aMediaTime)
-{
-    TInt64 duration = 0;
-    iPlayer->GetDuration(&duration);
-    if (duration < 0)
-    {
-        return KErrNotFound;
-    }
-
-    if (aMediaTime > duration)
-    {
-        aMediaTime = duration;
-    }
-    else if (aMediaTime < 0)
-    {
-        aMediaTime = 0;
-    }
-    return KErrNone;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaitemdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* 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"
-* 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:  Bitmap display that draws to the Java CustomItem's bitmap.
-*
-*/
-
-
-//  Include Files
-#include <logger.h>
-//#include <lcdui.h>
-
-#include "cmmaitemdisplay.h"
-#include "cmmabitmapwindow.h"
-
-// CONSTRUCTION
-// Static constructor, leaves pointer to cleanup-stack
-CMMAItemDisplay* CMMAItemDisplay::NewLC(/*MMIDCustomItem* aCustomItem*/)
-{
-    CMMAItemDisplay* self = new(ELeave) CMMAItemDisplay(/*aCustomItem*/);
-    CleanupStack::PushL(self);
-   // self->Construct(/*&(aCustomItem->DirectContainer())*/);
-    return self;
-}
-
-
-// Destructor (virtual by CBase)
-CMMAItemDisplay::~CMMAItemDisplay()
-{
-}
-
-
-CMMAItemDisplay::CMMAItemDisplay(/*MMIDCustomItem* aCustomItem*/)
-        //: iItem(aCustomItem)
-{
-    iVisible = ETrue; // Item is visible at startup
-}
-
-void CMMAItemDisplay::SizeChangedL(CMMAItemDisplay* aDisplay,
-                                   TInt /*aWidth*/,
-                                   TInt /*aHeight*/)
-// currently width and height is ignored
-// may be used later to layout the image.
-{
-	/*
-    if (aDisplay->iWindow)
-    {
-        CFbsBitmap* bitmap = aDisplay->iItem->FrameBuffer();
-        aDisplay->iWindow->SetDestinationBitmapL(bitmap);
-    }
-    */
-}
-
-void CMMAItemDisplay::SetFullScreenL(TBool aFullScreen)
-{
-    iFullScreen = aFullScreen;
-    if (!iWindow)
-    {
-        return;
-    }
-    if (aFullScreen)
-    {
-        // switch to fullscreen
-        iWindow->SetDrawRect(ScaleToFullScreen(
-                                 iWindow->WindowSize(), iSourceSize));
-    }
-    else
-    {
-        // switch to normal screen
-        iWindow->SetDrawRect(iUserRect);
-    }
-}
-
-void CMMAItemDisplay::SetWindowL(MMMADisplayWindow* aWindow)
-{
-    CMMADisplay::SetWindowL(aWindow);
-    if (!iWindow)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAItemDisplay::SetWindowL: NULL window, returning");
-        return;
-    }
-    iSourceSize = iWindow->WindowSize();
-   /* CFbsBitmap* bitmap = iItem->FrameBuffer();
-
-    if (bitmap)
-    {
-        iWindow->SetDestinationBitmapL(bitmap);
-    }
-   */
-}
-
-void CMMAItemDisplay::SetDisplayLocationL(const TPoint& /*aPosition*/)
-{
-    // In item( USE_GUI_PRIMITIVE ) mode, this call will be ignored.
-}
-
-
-TPoint CMMAItemDisplay::DisplayLocation()
-{
-    // Java Item's location is always 0, 0
-    return TPoint(0, 0);
-}
-
-void CMMAItemDisplay::SourceSizeChanged(const TSize& aSourceSize)
-{
-    LOG1(EJavaMMAPI,EInfo,"MMA::CMMAItemDisplay::SourceSizeChanged %d",
-              aSourceSize.iWidth);
-    LOG1(EJavaMMAPI,EInfo,"MMA::CMMAItemDisplay::SourceSizeChanged %d",
-              aSourceSize.iHeight);
-
-	#ifdef RD_JAVA_NGA_ENABLED
-	if ( iWindow )
-	{
-	iWindow->SetVideoCropRegion( TRect( iUserRect.iTl, aSourceSize ) );
-	}
-	#endif
-
-    iSourceSize = aSourceSize;
-
-    if (iWindow)
-    {
-        TRect clientRect(iUserRect.iTl, aSourceSize);
-
-        iWindow->SetDrawRect(clientRect);
-        // Setting initial window size if not already set, actual size will
-        // be set in MdcItemContentRectChanged()
-        if (iWindow->WindowSize() == TSize())
-        {
-            iWindow->SetWindowRect(clientRect, MMMADisplay::EMmaThread);
-        }
-    }
-
-    SetClippingRegion();
-
-    if (iUserRect.IsEmpty())
-    {
-        // Java side hasn't set size.
-        iUserRect.SetSize(iSourceSize);
-    }
-}
-
-void CMMAItemDisplay::StaticSourceSize(CMMAItemDisplay* aDisplay,
-                                       TSize* aSize)
-{
-    *aSize = aDisplay->iUserRect.Size();
-}
-
-/*void CMMAItemDisplay::MdcItemContentRectChanged(const TRect& aContentRect,
-        const TRect& aScreenRect)
-{
-    if (iWindow)
-    {
-        // Change windows rect.
-        iWindow->SetWindowRect(aScreenRect, MMMADisplay::EUiThread);
-        TRect drawRect = aContentRect;
-        drawRect.Move(- aScreenRect.iTl);
-        iWindow->SetDrawRectThread(drawRect);
-    }
-    SetClippingRegion();
-}
-*/
-/*void CMMAItemDisplay::MdcContentBoundsChanged(const TRect& aRect)
-{
-    // Do nothing in Item display
-}
-*/
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmametadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2002 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 interface is for getting metadata from a media.
-*
-*/
-
-
-//  INCLUDE FILES
-#include "cmmametadatacontrol.h"
-
-
-_LIT(KControlName, "MetaDataControl");
-
-
-CMMAMetaDataControl::CMMAMetaDataControl()
-{
-    // Nothing, OK.
-}
-
-void CMMAMetaDataControl::StaticKeysCountL(CMMAMetaDataControl* aMetaDataControl, TInt *aCount)
-{
-    *aCount = aMetaDataControl->KeyCountL();
-}
-
-void CMMAMetaDataControl::StaticKeyL(CMMAMetaDataControl* aMetaDataControl, HBufC** aKey, TInt aIndex)
-{
-    *aKey = aMetaDataControl->KeyL(aIndex);
-}
-
-void CMMAMetaDataControl::StaticKeyValueL(
-    CMMAMetaDataControl* aMetaDataControl,
-    HBufC** aValue,
-    TDesC* aKey)
-{
-    /* Just pass the call through to the real implementation. The ownership of the returned data
-     * is received from the implementation and passed to the caller as well.
-     *
-     */
-    *aValue = aMetaDataControl->KeyValueL(*aKey);
-}
-
-const TDesC& CMMAMetaDataControl::ClassName() const
-{
-    return KControlName;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidicontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a MIDIControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32math.h>
-
-#include "cmmamidicontrol.h"
-#include "cmmamidiplayer.h"
-
-namespace
-{
-const TReal KMMAMIDIVolumeConversionConstant = 40;
-const TReal KMMADecibelToMidiVolumeConversionPowerBase = 10;
-//const TTimeIntervalMicroSeconds32 KMMAMIDIVolumeChangeTimeout = 2000000;
-const TInt KMMAMIDIVolumeChangeTimeout = 2000000;
-const TReal KMMAMIDIMinimumVolumeDecibels = -130;
-// For channel volume change message:
-const TUint8 KMIDIControlChangeEvent = 0xB0;
-const TUint8 KMIDIControlMainVolume = 0x07;
-}
-
-CMMAMIDIControl* CMMAMIDIControl::NewL(CMMAMIDIPlayer* aPlayer)
-{
-    CMMAMIDIControl* self = new(ELeave)CMMAMIDIControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAMIDIControl::CMMAMIDIControl(CMMAMIDIPlayer* aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::CMMAMIDIControl");
-    iPlayer = aPlayer;
-}
-
-CMMAMIDIControl::~CMMAMIDIControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::~CMMAMIDIControl +");
-    delete iVolumeEventWait;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::~CMMAMIDIControl -");
-}
-
-void CMMAMIDIControl::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::ConstructL +");
-    iVolumeEventWait = CChannelVolumeEventWait::NewL();
-    iPlayer->addObserverL(this);
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::ConstructL -");
-}
-
-const TDesC& CMMAMIDIControl::ClassName() const
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIControl::ClassName");
-    return KMIDIControlName;
-}
-
-TInt CMMAMIDIControl::ChannelVolumeL(TInt aChannel)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: ChannelVolumeL + aChannel=%d", aChannel);
-
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-
-    // If engine is not processing events, current
-    // volume cannot be known for sure.
-    TMidiState engineState = midi->State();
-#ifdef RD_JAVA_TMIDISTATECHANGE
-    if ((engineState == EMidiStateClosedDisengaged) ||
-            (engineState == EMidiStateOpenDisengaged))
-#else
-    if ((engineState == EClosedDisengaged) ||
-            (engineState == EOpenDisengaged))
-#endif
-    {
-        return KErrNotFound;
-    }
-
-    // This calculation might be slow on hardware, since
-    // following equation must be calculated using TReals:
-    //
-    // p1 = 10^(dB/40) * p0, where:
-    // p1 is target midi volume,
-    // p0 is reference value (maximum midi volume, 127)
-    // dB is volume value in Decibels from MidiClientUtility
-
-    TReal32 volume = midi->ChannelVolumeL(aChannel);
-    if (volume < KMMAMIDIMinimumVolumeDecibels)
-    {
-        volume = KMMAMIDIMinimumVolumeDecibels;
-    }
-    TReal exponent = volume / KMMAMIDIVolumeConversionConstant;
-    TReal targetVal = 0;
-
-    // calculate midi volume value
-    User::LeaveIfError(
-        Math::Pow(
-            targetVal,
-            KMMADecibelToMidiVolumeConversionPowerBase,
-            exponent));
-
-    // multiply by reference value
-    targetVal *= KMAXVolume;
-
-    // round value to zero decimals
-    User::LeaveIfError(Math::Round(targetVal, targetVal, 0));
-
-    // clamp to bounds
-    TInt retVal = (int) targetVal;
-    if (retVal < 0)
-    {
-        retVal  = 0;
-    }
-    else if (retVal > KMAXVolume)
-    {
-        retVal = KMAXVolume;
-    }
-
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: ChannelVolumeL - retVal=%d", retVal);
-    return retVal;
-}
-
-void CMMAMIDIControl::SetChannelVolumeL(TInt aChannel, TInt aVolume)
-{
-    LOG2( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SetChannelVolumeL + aChannel=%d aVolume=%d", aChannel, aVolume);
-
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-
-    // Change is done with shortMidiEvent so midi volume -> decibel
-    // calculation is avoided (would be needed for midi client api
-    // SetChannelVolumeL method)
-
-    TBuf8<3> volumeChangeMessage;
-    // range is checked before
-    TUint8 channel = (KMIDIControlChangeEvent | (TUint8)aChannel);
-    volumeChangeMessage.Append(channel);
-    volumeChangeMessage.Append(KMIDIControlMainVolume);
-    volumeChangeMessage.Append((TUint8)aVolume);
-    SendMIDIEventL(&volumeChangeMessage);
-
-    TMidiState engineState = midi->State();
-
-    // If engine is not processing, we do not have to
-    // wait until change is done.
-#ifdef RD_JAVA_TMIDISTATECHANGE
-    if (!((engineState == EMidiStateClosedDisengaged) ||
-            (engineState == EMidiStateOpenDisengaged)))
-#else
-    if (!((engineState == EClosedDisengaged) ||
-            (engineState == EOpenDisengaged)))
-#endif
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SetChannelVolumeL: ExecuteL ->");
-        iVolumeEventWait->StartWait(aChannel);
-        LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SetChannelVolumeL: ExecuteL <-");
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SetChannelVolumeL -");
-}
-
-void CMMAMIDIControl::SetProgramL(TInt aChannel,
-                                  TInt aBank,
-                                  TInt aProgram)
-{
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-
-    // Program means instrument.
-    midi->SetInstrumentL(aChannel, aBank, aProgram);
-}
-
-TInt CMMAMIDIControl::SendMIDIEventL(const TDesC8* aData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SendMIDIEventL +");
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-
-    // SendMessageL only processes first message in the descriptor,
-    // so we need to send blocks of data as many times as needed.
-
-    TInt dataLength = aData->Length();
-    TInt dataSent = 0;
-    while (dataSent < dataLength)
-    {
-        // Delegate event directly to the native implementation
-        // which checks the validity.
-        TPtrC8 nextBlock = aData->Right(dataLength - dataSent);
-        dataSent += midi->SendMessageL(nextBlock);
-    }
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SendMIDIEventL: sent %d bytes", dataSent);
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: SendMIDIEventL -");
-    return dataSent;
-}
-
-TInt CMMAMIDIControl::ReInitializeMidiL(const TDesC8* aData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: ReInitializeMidiL + ");
-    iPlayer->ReInitializeMidiEngineL(aData);
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIControl: ReInitializeMidiL - ");
-    return KErrNone;
-}
-
-void CMMAMIDIControl::MmcuoStateChanged(TMidiState /*aOldState*/,
-                                        TMidiState /*aNewState*/,
-                                        const TTimeIntervalMicroSeconds& /*aTime*/,
-                                        TInt /*aError*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoTempoChanged(TInt /*aMicroBeatsPerMinute*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoVolumeChanged(TInt aChannel, TReal32 /*aVolumeInDecibels*/)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAMIDIControl:: MmcuoVolumeChanged + aChannel=%d", aChannel);
-    if (iVolumeEventWait)
-    {
-        iVolumeEventWait->HandleVolumeChangedEvent(aChannel);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl:: MmcuoVolumeChanged -");
-}
-
-void CMMAMIDIControl::MmcuoMuteChanged(TInt /*aChannel*/,TBool /*aMuted*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& /*aMicroSeconds*/,TInt64 /*aMicroBeats*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoMetaDataEntryFound(const TInt /*aMetaDataEntryId*/,const TTimeIntervalMicroSeconds& /*aPosition*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& /*aMessage*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoPolyphonyChanged(TInt /*aNewPolyphony*/)
-{
-}
-
-void CMMAMIDIControl::MmcuoInstrumentChanged(TInt /*aChannel*/,TInt /*aBankId*/,TInt /*aInstrumentId*/)
-{
-}
-
-CMMAMIDIControl::CChannelVolumeEventWait* CMMAMIDIControl::CChannelVolumeEventWait::NewL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::NewL");
-    CChannelVolumeEventWait* self = new(ELeave) CChannelVolumeEventWait();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-void CMMAMIDIControl::CChannelVolumeEventWait::ConstructL()
-{
-    iWait = new(ELeave) CActiveSchedulerWait();
-    iTimer = CTimeOutTimer::NewL(CActive::EPriorityStandard, *this);
-}
-
-CMMAMIDIControl::CChannelVolumeEventWait::CChannelVolumeEventWait()
-{
-}
-
-CMMAMIDIControl::CChannelVolumeEventWait::~CChannelVolumeEventWait()
-{
-    delete iTimer;
-    delete iWait;
-}
-
-void CMMAMIDIControl::CChannelVolumeEventWait::TimerExpired()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::TimerExpired +");
-    if (iWait->IsStarted())
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::TimerExpired - cancelling wait");
-        iWait->AsyncStop();
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::TimerExpired -");
-}
-
-void CMMAMIDIControl::CChannelVolumeEventWait::StartWait(TInt aChannel)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::StartWait aChannel=%d", aChannel);
-    iChannel = aChannel;
-
-    if (!iWait->IsStarted())
-    {
-        iTimer->After(KMMAMIDIVolumeChangeTimeout);
-        iWait->Start();
-    }
-}
-
-void CMMAMIDIControl::CChannelVolumeEventWait::StopWait()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::StopWait");
-    if (iWait->IsStarted())
-    {
-        iTimer->Cancel();
-        iWait->AsyncStop();
-    }
-}
-
-void CMMAMIDIControl::CChannelVolumeEventWait::HandleVolumeChangedEvent(TInt aChannel)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAMIDIControl::CChannelVolumeEventWait::HandleVolumeChangedEvent aChannel=%d", aChannel);
-    if (iChannel == aChannel)
-    {
-        StopWait();
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidimetadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMAMIDIMetaDataControl is a concrete class for getting
-*                metadata from midi engine.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmamidimetadatacontrol.h"
-
-CMMAMIDIMetaDataControl::CMMAMIDIMetaDataControl(
-    CMMAMIDIPlayer* aPlayer)
-        : iPlayer(aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMIDIMetaDataControl constructor called.");
-}
-
-TInt CMMAMIDIMetaDataControl::KeyCountL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIMetaDataControl::KeyCountL");
-    TInt entries = iPlayer->MidiClient()->NumberOfMetaDataEntriesL();
-    return entries;
-}
-
-HBufC* CMMAMIDIMetaDataControl::KeyL(TInt aIndex)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIMetaDataControl::KeyL");
-    CMMFMetaDataEntry* currEntry =
-        iPlayer->MidiClient()->GetMetaDataEntryL(aIndex);
-    CleanupStack::PushL(currEntry);
-    HBufC* key = currEntry->Name().AllocL();
-    CleanupStack::PopAndDestroy(); // currEntry
-    return key;
-}
-
-
-/*
- * Get the value of given midi metadata key. The ownership of the created value
- * (descriptor) is passed to the caller.
- */
-HBufC* CMMAMIDIMetaDataControl::KeyValueL(const TDesC& aKey)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIMetaDataControl::KeyValueL");
-
-    HBufC* retVal = NULL;
-    CMMFMetaDataEntry* currEntry = NULL;
-
-    TInt nEntries = iPlayer->MidiClient()->NumberOfMetaDataEntriesL();
-
-    for (TInt i = 0; i < nEntries; ++i)
-    {
-        currEntry = iPlayer->MidiClient()->GetMetaDataEntryL(i);
-
-        if (0 == aKey.Compare(currEntry->Name()))
-        {
-            CleanupStack::PushL(currEntry);
-            retVal = currEntry->Value().AllocL();
-            CleanupStack::PopAndDestroy(); // currEntry
-            break;
-        }
-
-        delete currEntry;
-    }
-
-    User::LeaveIfNull(retVal);
-    return retVal;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidipitchcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a PitchControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmamidipitchcontrol.h"
-#include "cmmamidiplayer.h"
-
-CMMAMIDIPitchControl* CMMAMIDIPitchControl::NewL(CMMAMIDIPlayer* aPlayer)
-{
-    CMMAMIDIPitchControl* self = new(ELeave) CMMAMIDIPitchControl(aPlayer);
-    return self;
-}
-
-CMMAMIDIPitchControl::CMMAMIDIPitchControl(CMMAMIDIPlayer* aPlayer)
-{
-    iPlayer = aPlayer;
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIPitchControl::CMMAMIDIPitchControl");
-}
-
-CMMAMIDIPitchControl::~CMMAMIDIPitchControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIPitchControl::~CMMAMIDIPitchControl");
-}
-
-const TDesC& CMMAMIDIPitchControl::ClassName() const
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIPitchControl::ClassName");
-    return KMIDIPitchControlName;
-}
-
-
-TInt CMMAMIDIPitchControl::PitchL()
-{
-    return iPlayer->MidiClient()->PitchTranspositionCentsL();
-}
-
-TInt CMMAMIDIPitchControl::SetPitchL(TInt aPitch)
-{
-    TInt pitch = aPitch;
-    if (aPitch > KMIDIPitchControlMaxPitch)
-    {
-        pitch = KMIDIPitchControlMaxPitch;
-    }
-    else if (aPitch < KMIDIPitchControlMinPitch)
-    {
-        pitch = KMIDIPitchControlMinPitch;
-    }
-    iPlayer->MidiClient()->SetPitchTranspositionL(pitch);
-
-    return PitchL();            // return the actual Pitch
-}
-
-// this method is intentionally left leaving to allow leaving implementation in the future
-TInt CMMAMIDIPitchControl::MaxPitchL()
-{
-    return KMIDIPitchControlMaxPitch;
-}
-
-// this method is intentionally left leaving to allow leaving implementation in the future
-TInt CMMAMIDIPitchControl::MinPitchL()
-{
-    return KMIDIPitchControlMinPitch;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidiplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,590 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for MIDI.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmffile.h>
-#include <logger.h>
-#include <e32base.h>
-#include <AudioPreference.h>
-
-#include "cmmamidiplayer.h"
-#include "mmmadisplay.h"
-
-const TInt KErrorMessageSize = 32;
-_LIT(KErrDefaultError, "Symbian OS Error: %d");
-const TInt KMidiDefaultBank = 0x3c80;
-const TInt KMidiDrumBank = 0x3c7c;
-const TInt KMidiDrumChannel = 9;
-const TInt KMidiChannels = 16;
-const TInt KMidiDefaultInstrument = 1;
-
-CMMAMIDIPlayer* CMMAMIDIPlayer::NewLC(const TDesC& aContentType,
-                                      TFileName aFileName)
-{
-    CMMAMIDIPlayer* self = new(ELeave) CMMAMIDIPlayer(aFileName);
-    CleanupStack::PushL(self);
-    self->ConstructL(aContentType);
-    return self;
-}
-
-CMMAMIDIPlayer::~CMMAMIDIPlayer()
-{
-    CloseClientUtility();
-    // new function added to CMMAPlayer delete the controls before the destruction of iMidi.
-    DeleteControls();
-    delete iMidi;
-    delete iActiveSchedulerWait;
-    iObservers.Close();
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMIDIPlayer::~CMMAMIDIPlayer");
-}
-
-void CMMAMIDIPlayer::ConstructL(const TDesC& aContentType)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIPlayer::ConstructL");
-    iContentType = aContentType.AllocL();
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-    iMidi = CMidiClientUtility::NewL(*this, KAudioPriorityRecording,
-                                     KMMAMIDIPriorityPreference, ETrue);
-
-    CMMAPlayer::ConstructL();
-}
-
-CMMAMIDIPlayer::CMMAMIDIPlayer(TFileName aFileName):
-        iFileName(aFileName),
-        iMediaTime(KTimeUnknown), iStartedEventTime(0)
-{
-}
-
-EXPORT_C CMidiClientUtility* CMMAMIDIPlayer::MidiClient() const
-{
-    return iMidi;
-}
-
-
-void CMMAMIDIPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDIPlayer::RealizeL");
-    CMMAPlayer::RealizeL();
-}
-
-void CMMAMIDIPlayer::PrefetchL()
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAMIDIPlayer::PrefetchL stream count %d", iSourceStreams.Count());
-    if (iFileName != KNullDesC)
-    {
-        iMidi->OpenFile(iFileName);
-    }
-    else if (iSourceStreams.Count() == 0)
-    {
-        // We have no data, but need to initialize the player
-        // Preparing all channels
-        for (TInt i = 0; i < KMidiChannels; i++)
-        {
-            iMidi->SetInstrumentL(i, KMidiDefaultBank,
-                                  KMidiDefaultInstrument);
-        }
-
-        // Setting drums to channel 10
-        iMidi->SetInstrumentL(KMidiDrumChannel, KMidiDrumBank,
-                              KMidiDefaultInstrument);
-
-        // Start it immediately in order to get MIDIControl work without
-        // calling the start. This is how reference implementation works.
-        iMidi->Play();
-    }
-    else
-    {
-        // Created with content, audio player will initialize controller
-        // and data source.
-        iSourceStreams[ 0 ]->ReadAllL();
-    }
-}
-
-//
-// This method is called when CMMASourceStreamReader finished reading
-// initiated in PrefetchL
-//
-void CMMAMIDIPlayer::ReadCompletedL(TInt aStatus, const TDesC8& aData)
-{
-    if (aStatus < KErrNone)
-    {
-        PostActionCompleted(aStatus);
-    }
-    else
-    {
-        // we're not finished yet
-        iMidi->OpenDes(aData);      //wait for MMidiClientUtilityObserver::MmcuoStateChanged
-    }
-}
-
-void CMMAMIDIPlayer::DeallocateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: DeallocateL +");
-    if (iState == EPrefetched)
-    {
-        CloseClientUtility();
-        ResetSourceStreams();
-        ChangeState(ERealized);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: DeallocateL -");
-}
-
-void CMMAMIDIPlayer::StartL()
-{
-    iMediaTime = KTimeUnknown;
-
-    // Player is already started if this player is constructed with
-    // device://midi locator.
-    TBool isDeviceMidi = (iSourceStreams.Count() == 0 &&
-                          iFileName == KNullDesC);
-    if (!isDeviceMidi)
-    {
-        iMidi->Play();
-    }
-
-    // inform java side
-    PostLongEvent(CMMAPlayerEvent::EStarted, iStartedEventTime);
-    ChangeState(EStarted);
-
-    // To achieve similar functionality as reference implementation,
-    // END_OF_MEDIA must be sent right after Start on device://midi.
-    if (isDeviceMidi)
-    {
-        PostLongEvent(CMMAPlayerEvent::EEndOfMedia, iStartedEventTime);
-        ChangeState(EPrefetched);
-    }
-    PostActionCompletedStart();
-    //PostActionCompleted(KErrNone);   // java start return
-}
-
-void CMMAMIDIPlayer::StopL(TBool aPostEvent)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer::StopL");
-    if (iState == EStarted)
-    {
-        TInt64 time;
-        GetMediaTime(&time);
-        iStartedEventTime = time;
-
-        // do the stop only if we are playing some content
-        if ((iSourceStreams.Count() > 0) ||
-                (iFileName != KNullDesC))
-        {
-            // should actually pause!!!
-            iMidi->Stop(TTimeIntervalMicroSeconds(0));
-        }
-
-        if (aPostEvent)
-        {
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-    }
-}
-
-void CMMAMIDIPlayer::GetDuration(TInt64* aDuration)
-{
-    // Special case for device://midi
-    if ((iSourceStreams.Count() == 0) &&
-            (iFileName == KNullDesC))
-    {
-        iDuration = KErrNone;
-    }
-    else if (iDuration == KTimeUnknown)
-    {
-        TRAPD(err, iDuration = iMidi->DurationMicroSecondsL().Int64());
-        if (err != KErrNone)
-        {
-            // Duration was not available.
-            iDuration = KTimeUnknown;
-        }
-    }
-
-    *aDuration = iDuration;
-}
-
-void CMMAMIDIPlayer::SetMediaTimeL(TInt64* aTime)
-{
-    TTimeIntervalMicroSeconds position(*aTime);
-    iMidi->SetPositionMicroSecondsL(position);
-
-    // Reset cached media time, because actual set position may be
-    // something else than aTime.
-    iMediaTime = KTimeUnknown;
-
-    // Inform about the position change to the StateListeners
-    ChangeState(iState);
-
-    // Get the actual media time
-    GetMediaTime(aTime);
-
-    iStartedEventTime = iMediaTime;
-}
-
-void CMMAMIDIPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    // Special case for device://midi
-    if ((iSourceStreams.Count() == 0) &&
-            (iFileName == KNullDesC))
-    {
-        iMediaTime = KErrNone;
-    }
-    else if (iMediaTime == KTimeUnknown || iState == EStarted)
-    {
-        TTimeIntervalMicroSeconds position(0);
-        TRAPD(error, position = iMidi->PositionMicroSecondsL());
-
-        if (error == KErrNone)
-        {
-            TInt64 newTime = position.Int64();
-
-            // Sanity check for media time going backwards or beyond the
-            // duration.
-            // Some native controls may return zero media time for
-            // a few moments just before playback will complete.
-            if (newTime < iMediaTime ||
-                    (iDuration > 0 && newTime > iDuration))
-            {
-                GetDuration(&iMediaTime);
-            }
-            else
-            {
-                // set return value
-                iMediaTime = newTime;
-            }
-        }
-        else
-        {
-            // media time cannot be get
-            iMediaTime = KTimeUnknown;
-        }
-    }
-    *aMediaTime = iMediaTime;
-}
-
-void CMMAMIDIPlayer::ReInitializeMidiEngineL(const TDesC8* aMidiSequence)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIPlayer: ReInitializeMidiEngineL: + ");
-
-    CloseClientUtility();
-
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: ReInitializeMidiEngineL: Opening descriptor");
-
-    iMidi->OpenDes(*aMidiSequence);
-    // Wait until asynchronous OpenDes call has completed
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    ChangeState(EPrefetched);
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDIPlayer: ReInitializeMidiEngineL: - ");
-}
-
-void CMMAMIDIPlayer::addObserverL(MMidiClientUtilityObserver* aObserver)
-{
-    iObservers.AppendL(aObserver);
-}
-
-void CMMAMIDIPlayer::CloseL()
-{
-    CMMAPlayer::CloseL();
-    CloseClientUtility();
-}
-
-const TDesC& CMMAMIDIPlayer::Type()
-{
-    return KMMAMIDIPlayer;
-}
-
-void CMMAMIDIPlayer::PlayCompleteL(TInt aError)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: PlayCompleteL +");
-    ELOG1( EJavaMMAPI, "MMA: CMMAMidiPlayer: PlayCompleteL: Error=%d", aError);
-    TInt64 duration;
-    GetDuration(&duration);
-    iMediaTime = duration;
-    iStartedEventTime = 0;
-
-    iMidi->Stop(TTimeIntervalMicroSeconds(0));
-
-    // go back to prefetched state
-    ChangeState(EPrefetched);   // ready to play again
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, duration);
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: PlayCompleteL -");
-}
-
-void CMMAMIDIPlayer::MmcuoStateChanged(TMidiState aOldState,
-                                       TMidiState aNewState,
-                                       const TTimeIntervalMicroSeconds& aTime,
-                                       TInt aError)
-{
-    TInt err = aError;
-
-    ELOG3( EJavaMMAPI, "MMA: CMMAMIDIPlayer: MmcuoStateChanged: Old=%d, New=%d, Error=%d",
-               aOldState,
-               aNewState,
-               err);
-    // Closing the utility or reinitialising
-#ifdef RD_JAVA_TMIDISTATECHANGE
-    if (iActiveSchedulerWait->IsStarted() &&
-            ((aNewState == EMidiStateClosedDisengaged) ||
-             (aNewState == EMidiStateOpenDisengaged) ||
-             (aNewState == EMidiStateClosedEngaged)))
-#else
-    if (iActiveSchedulerWait->IsStarted() &&
-            ((aNewState == EClosedDisengaged) ||
-             (aNewState == EOpenDisengaged) ||
-             (aNewState == EClosedEngaged)))
-#endif
-    {
-        iActiveSchedulerWait->AsyncStop();
-    }
-    // changing from realized to prefetched state
-#ifdef RD_JAVA_TMIDISTATECHANGE
-    else if ((iState == ERealized) &&
-             (aOldState == EMidiStateClosedDisengaged) &&
-             ((aNewState == EMidiStateOpenDisengaged) ||
-              (aNewState == EMidiStateClosedEngaged) ||
-              (aNewState == EMidiStateClosedDisengaged)))
-#else
-    else if ((iState == ERealized) &&
-             (aOldState == EClosed) &&
-             ((aNewState == EOpen) || (aNewState == EClosedEngaged) ||
-              (aNewState == EClosed)))     // EClosed is EClosedDisengaged
-#endif
-    {
-        if (aError == KErrNone)
-        {
-            // prefetch succeed
-            ChangeState(EPrefetched);
-        }
-        // else state remains realized
-
-        // inform java
-        PostActionCompleted(aError);
-        err = KErrNone; // don't report the error again
-    }
-#ifdef RD_JAVA_TMIDISTATECHANGE
-    else if ((aOldState == EMidiStateOpenPlaying) &&
-             (aNewState == EMidiStateOpenEngaged) &&
-             (iState == EStarted))
-#else
-    else if ((aOldState == EPlaying) &&
-             (aNewState == EOpenEngaged) &&
-             (iState == EStarted))
-#endif
-    {
-        // If iState is not EStarted PlayCompleteL may not be called because
-        // player may be already stopped.
-
-        // playing completed
-        TRAPD(playErr, PlayCompleteL(aError));
-        if (playErr != KErrNone)
-        {
-            err = playErr;
-        }
-    }
-
-    if (err != KErrNone)
-    {
-        TBuf<KErrorMessageSize> errorMessage;
-        errorMessage.Format(KErrDefaultError, err);
-        PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        if (iActiveSchedulerWait->IsStarted())
-        {
-            iActiveSchedulerWait->AsyncStop();
-        }
-    }
-
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoStateChanged(aOldState, aNewState, aTime, aError);
-    }
-
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDIPlayer: MmcuoStateChanged: midi state %d",
-              iMidi->State());
-}
-
-void CMMAMIDIPlayer::MmcuoTempoChanged(TInt aMicroBeatsPerMinute)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoTempoChanged(aMicroBeatsPerMinute);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoVolumeChanged(aChannel, aVolumeInDecibels);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoMuteChanged(TInt aChannel,TBool aMuted)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoMuteChanged(aChannel, aMuted);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoSyncUpdate(aMicroSeconds, aMicroBeats);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoMetaDataEntryFound(aMetaDataEntryId, aPosition);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aMessage)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoMipMessageReceived(aMessage);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoPolyphonyChanged(TInt aNewPolyphony)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoPolyphonyChanged(aNewPolyphony);
-    }
-}
-
-void CMMAMIDIPlayer::MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId)
-{
-    // notify observers
-    TInt count = iObservers.Count();
-    for (TInt i = 0; i < count; i++)
-    {
-        iObservers[ i ]->MmcuoInstrumentChanged(aChannel, aBankId, aInstrumentId);
-    }
-}
-
-void CMMAMIDIPlayer::CloseClientUtility()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: CloseClientUtility +");
-    if (iMidi &&
-            iActiveSchedulerWait &&
-#ifdef RD_JAVA_TMIDISTATECHANGE
-            (iMidi->State() != EMidiStateClosedDisengaged))
-#else
-            (iMidi->State() != EClosed))
-#endif
-    {
-        // Have to stop midi before closing,
-        // this case is for device://midi
-#ifdef RD_JAVA_TMIDISTATECHANGE
-        if (iMidi->State() == EMidiStateClosedEngaged)
-#else
-        if (iMidi->State() == EClosedEngaged)
-#endif
-        {
-            iMidi->Stop(TTimeIntervalMicroSeconds(0));
-            if (!iActiveSchedulerWait->IsStarted())
-            {
-                iActiveSchedulerWait->Start();
-            }
-        }
-        else
-        {
-            // Calling Close and Stop or Stop and Close should
-            // always lead to EClosed state.
-
-            // From EOpenEngaged or EOpenPlaying to EClosedEngaged
-            // or from EOpenDisengaged to EClosedDisengaged
-            iMidi->Close();
-            if (!iActiveSchedulerWait->IsStarted())
-            {
-                iActiveSchedulerWait->Start();
-            }
-
-            LOG1( EJavaMMAPI, EInfo, "State after Close: %d", iMidi->State());
-
-            // If not in EClosedDisengaged yet
-#ifdef RD_JAVA_TMIDISTATECHANGE
-            if (iMidi->State() != EMidiStateClosedDisengaged)
-#else
-            if (iMidi->State() != EClosed)
-#endif
-            {
-                // From EClosedEngaged to EClosedDisengaged
-                iMidi->Stop(TTimeIntervalMicroSeconds(0));
-                if (!iActiveSchedulerWait->IsStarted())
-                {
-                    iActiveSchedulerWait->Start();
-                }
-                LOG1( EJavaMMAPI, EInfo, "State after Stop: %d", iMidi->State());
-            }
-        }
-        LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: CloseClientUtility: State after close: %d", iMidi->State());
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: CloseClientUtility -");
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidiplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating MIDI player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmamidiplayerfactory.h"
-#include "cmmamidiplayer.h"
-#include "cmmamidivolumecontrol.h"
-#include "cmmamidistoptimecontrol.h"
-#include "cmmamidicontrol.h"
-#include "cmmamiditempocontrol.h"
-#include "cmmamidipitchcontrol.h"
-#include "cmmammfresolver.h"
-#include "cmmamidimetadatacontrol.h"
-
-
-_LIT(KMMAMidi, "midi");
-_LIT(KDeviceMidiContentType, "audio/midi");
-
-CMMAMIDIPlayerFactory* CMMAMIDIPlayerFactory::NewLC()
-{
-    CMMAMIDIPlayerFactory* pFactory =
-        new(ELeave) CMMAMIDIPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAMIDIPlayerFactory::CMMAMIDIPlayerFactory()
-{
-}
-
-
-CMMAMIDIPlayerFactory::~CMMAMIDIPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAMIDIPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    // if we get this far then MIDI is supported
-    HBufC* contentType = aResolver->ContentType();
-    HBufC* tmpFileName = aResolver->FileNameOwnership();
-    TFileName fileName;
-    if (tmpFileName)
-    {
-        fileName.Copy(tmpFileName->Des());
-    }
-    else
-    {
-        fileName = KNullDesC;
-    }
-    delete tmpFileName;
-    CMMAPlayer* player = CreateMidiFilePlayerL(*contentType, fileName);
-    return player;
-}
-
-
-void CMMAMIDIPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeMidi));
-}
-
-CMMAPlayer* CMMAMIDIPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& aProperties)
-{
-    CMMAPlayer* player = NULL;
-    if ((aProtocol == KMMADeviceProtocol) &&
-            (aMiddlePart == KMMAMidi))
-    {
-        // locator was device://midi
-        player = CreateMidiSynthPlayerL(KDeviceMidiContentType);
-    }
-    else
-    {
-        // other locator, if it is midi file CMMAMMFPlayerFactory
-        // calls CreatePlayerL( CMMAMMFResolver* aResolver ) method.
-        player = CMMAMMFPlayerFactory::CreatePlayerL(aProtocol,
-                 aMiddlePart,
-                 aProperties);
-    }
-    return player;
-}
-
-void CMMAMIDIPlayerFactory::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aProtocolArray)
-{
-    if (IsSupportedContentTypeL(aContentType))
-    {
-        aProtocolArray.AppendL(KMMADeviceProtocol);
-    }
-}
-
-CMMAPlayer* CMMAMIDIPlayerFactory::CreateMidiFilePlayerL(const TDesC& aContentType,
-        TFileName aFileName)
-{
-    CMMAMIDIPlayer* player = CMMAMIDIPlayer::NewLC(aContentType, aFileName);
-
-    CMMAMIDIVolumeControl* volumeControl = CMMAMIDIVolumeControl::NewL(player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-    CMMAMIDIStopTimeControl* stopTimeControl = CMMAMIDIStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    CMMAMIDIControl* midiControl = CMMAMIDIControl::NewL(player);
-    CleanupStack::PushL(midiControl);
-    player->AddControlL(midiControl);
-    CleanupStack::Pop(midiControl);
-
-    CMMAMIDITempoControl* tempoControl = CMMAMIDITempoControl::NewL(player);
-    CleanupStack::PushL(tempoControl);
-    player->AddControlL(tempoControl);
-    CleanupStack::Pop(tempoControl);
-
-    CMMAMIDIPitchControl* pitchControl = CMMAMIDIPitchControl::NewL(player);
-    CleanupStack::PushL(pitchControl);
-    player->AddControlL(pitchControl);
-    CleanupStack::Pop(pitchControl);
-
-#ifdef __MMA_METADATA_CONTROL__
-    CMMAMIDIMetaDataControl* metaDataControl =
-        new(ELeave) CMMAMIDIMetaDataControl(player);
-    CleanupStack::PushL(metaDataControl);
-    player->AddControlL(metaDataControl);
-    CleanupStack::Pop(metaDataControl);
-#endif // __MMA_METADATA_CONTROL__
-
-    CleanupStack::Pop(player);
-    return player;
-}
-
-CMMAPlayer* CMMAMIDIPlayerFactory::CreateMidiSynthPlayerL(const TDesC& aContentType)
-{
-    CMMAMIDIPlayer* player = CMMAMIDIPlayer::NewLC(aContentType, KNullDesC());
-
-    CMMAMIDIVolumeControl* volumeControl = CMMAMIDIVolumeControl::NewL(player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-    CMMAMIDIControl* midiControl = CMMAMIDIControl::NewL(player);
-    CleanupStack::PushL(midiControl);
-    player->AddControlL(midiControl);
-    CleanupStack::Pop(midiControl);
-
-    CMMAMIDIPitchControl* pitchControl = CMMAMIDIPitchControl::NewL(player);
-    CleanupStack::PushL(pitchControl);
-    player->AddControlL(pitchControl);
-    CleanupStack::Pop(pitchControl);
-
-    CleanupStack::Pop(player);
-    return player;
-}
-
-//  END OF FILE
-
--- a/javauis/mmapi_qt/baseline/src/cmmamidistoptimecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32std.h>
-
-#include "cmmamidistoptimecontrol.h"
-#include "cmmaplayer.h"
-
-CMMAMIDIStopTimeControl* CMMAMIDIStopTimeControl::NewL(CMMAPlayer* aPlayer)
-{
-    CMMAMIDIStopTimeControl* control =
-        new(ELeave) CMMAMIDIStopTimeControl(aPlayer);
-    CleanupStack::PushL(control);
-    // calls base class ConstructL
-    control->ConstructL();
-    CleanupStack::Pop(); // control
-    return control;
-}
-
-
-CMMAMIDIStopTimeControl::~CMMAMIDIStopTimeControl()
-{
-}
-
-CMMAMIDIStopTimeControl::CMMAMIDIStopTimeControl(CMMAPlayer* aPlayer)
-        : CMMAStopTimeControl(aPlayer)
-{
-}
-
-
-void CMMAMIDIStopTimeControl::StopAtTimeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDIStopTimeControl::StopAtTime");
-
-    // Stop the player only when it's playing
-    if (iPlayer->State() == CMMAPlayer::EStarted)
-    {
-        TInt64 time;
-        iPlayer->GetMediaTime(&time);
-        if (time >= 0 && time < iStopTime)
-        {
-            LOG1( EJavaMMAPI, EInfo, "MMA:CMMAMIDIStopTimeControl::StopAtTime - Called %dms too early",
-                      I64INT((time - iStopTime)/1000));
-            StartTimer(time);
-            return;
-        }
-
-        TInt64 stopTime;
-
-        iPlayer->StopL(EFalse);
-        iPlayer->SetMediaTimeL(&iStopTime);
-        iPlayer->GetMediaTime(&stopTime);
-
-        // Inform the player that it's "stopped at time"
-        iPlayer->PostLongEvent(CMMAPlayerEvent::EStoppedAtTime, stopTime);
-
-        iStopTime = iNoTimer; // Timer is reseted
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamiditempocontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a TempoControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmamiditempocontrol.h"
-#include "cmmamidiplayer.h"
-
-static const TInt KMicroBeatsInMiliBeat = 1000;
-static const TInt KMMAMIDIMinimumTempo = 10000;
-static const TInt KMMAMIDIMaximumTempo = 300000;
-static const TInt KMMAMIDIDefaultTempoInMicroBeats = 120000000;
-_LIT(KMMAMidiTempoStateChangedError, "Tempo error in state change");
-
-CMMAMIDITempoControl* CMMAMIDITempoControl::NewL(CMMAMIDIPlayer* aPlayer)
-{
-    CMMAMIDITempoControl* self = new(ELeave) CMMAMIDITempoControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAMIDITempoControl::CMMAMIDITempoControl(CMMAMIDIPlayer* aPlayer)
-{
-    iPlayer = aPlayer;
-    iTempo = KMMAMIDIDefaultTempoInMicroBeats;
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDITempoControl::CMMAMIDITempoControl");
-}
-
-CMMAMIDITempoControl::~CMMAMIDITempoControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDITempoControl::~CMMAMIDITempoControl");
-}
-
-inline void CMMAMIDITempoControl::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDITempoControl::ConstructL");
-
-    iPlayer->addObserverL(this);
-    iPlayer->AddStateListenerL(this);
-}
-
-const TDesC& CMMAMIDITempoControl::ClassName() const
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMIDITempoControl::ClassName");
-    return KMIDITempoControlName;
-}
-
-
-TInt CMMAMIDITempoControl::TempoL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDITempoControl: TempoL");
-
-    return iTempo / KMicroBeatsInMiliBeat;
-}
-
-TInt CMMAMIDITempoControl::SetTempoL(TInt aTempo)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMIDITempoControl: SetTempoL");
-    TInt tempo = aTempo;
-    if (tempo < KMMAMIDIMinimumTempo)
-    {
-        tempo = KMMAMIDIMinimumTempo;
-    }
-    if (tempo > KMMAMIDIMaximumTempo)
-    {
-        tempo = KMMAMIDIMaximumTempo;
-    }
-
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDITempoControl: SetTempoL: setting tempo %d",
-              tempo);
-
-    // Convert tempo to micro-beats.
-    tempo *= KMicroBeatsInMiliBeat;
-
-    // Set the tempo to the midi client if the player state is not REALIZED.
-    // (Tempo cannot be set to the midi client if the player
-    // has not been prefetched).
-    if (iPlayer->State() != CMMAPlayer::ERealized)
-    {
-        CMidiClientUtility* midi = iPlayer->MidiClient();
-        midi->SetTempoL(tempo);
-        tempo = iPlayer->MidiClient()->TempoMicroBeatsPerMinuteL();
-    }
-
-    iTempo = tempo;
-
-    LOG1( EJavaMMAPI, EInfo, "MMA: CMMAMIDITempoControl: SetTempoL: Tempo set: %d",
-              tempo / KMicroBeatsInMiliBeat);
-
-    return tempo / KMicroBeatsInMiliBeat;
-}
-
-TInt CMMAMIDITempoControl::SetRateL(TInt aRate)
-{
-    TInt rate = aRate;
-    TInt maxRate = MaxRateL();
-    TInt minRate = MinRateL();
-
-    if (rate > maxRate)
-    {
-        rate = maxRate;
-    }
-    else if (rate < minRate)
-    {
-        rate = minRate;
-    }
-    iPlayer->MidiClient()->SetPlaybackRateL(rate);
-    return RateL();         // return the actual tempo
-}
-
-TInt CMMAMIDITempoControl::RateL()
-{
-    return iPlayer->MidiClient()->PlaybackRateL();
-}
-
-TInt CMMAMIDITempoControl::MaxRateL()
-{
-    return iPlayer->MidiClient()->MaxPlaybackRateL();
-}
-
-TInt CMMAMIDITempoControl::MinRateL()
-{
-    return iPlayer->MidiClient()->MinPlaybackRateL();
-}
-
-void CMMAMIDITempoControl::StateChanged(TInt aState)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAMIDITempoControl:: StateChanged, state = %d", aState);
-
-    // If tempo was set when the player was in REALIZED state, set the tempo
-    // now when the player has been prefetched.
-    if ((aState == CMMAPlayer::EPrefetched) &&
-            (iTempo != KMMAMIDIDefaultTempoInMicroBeats))
-    {
-        CMidiClientUtility* midi = iPlayer->MidiClient();
-        TRAPD(err, midi->SetTempoL(iTempo));
-
-        ELOG1( EJavaMMAPI, "CMMAMIDITempoControl:: StateChanged, err = %d", err);
-
-        if (err != KErrNone)
-        {
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError,
-                                     KMMAMidiTempoStateChangedError);
-        }
-    }
-    else if (aState == CMMAPlayer::ERealized)
-    {
-        // If the player was deallocated, set the tempo to the default value.
-        iTempo = KMMAMIDIDefaultTempoInMicroBeats;
-    }
-}
-void CMMAMIDITempoControl::MmcuoStateChanged(TMidiState /*aOldState*/,
-        TMidiState /*aNewState*/,
-        const TTimeIntervalMicroSeconds& /*aTime*/,
-        TInt /*aError*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoTempoChanged(TInt aMicroBeatsPerMinute)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMIDITempoControl:: MmcuoTempoChanged");
-
-    iTempo = aMicroBeatsPerMinute;
-}
-
-void CMMAMIDITempoControl::MmcuoVolumeChanged(TInt /*aChannel*/,TReal32 /*aVolumeInDecibels*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoMuteChanged(TInt /*aChannel*/,TBool /*aMuted*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& /*aMicroSeconds*/,TInt64 /*aMicroBeats*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoMetaDataEntryFound(const TInt /*aMetaDataEntryId*/,const TTimeIntervalMicroSeconds& /*aPosition*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& /*aMessage*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoPolyphonyChanged(TInt /*aNewPolyphony*/)
-{
-}
-
-void CMMAMIDITempoControl::MmcuoInstrumentChanged(TInt /*aChannel*/,TInt /*aBankId*/,TInt /*aInstrumentId*/)
-{
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmamidivolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#include <logger.h>
-#include "cmmamidivolumecontrol.h"
-#include "cmmamidiplayer.h"
-
-CMMAMIDIVolumeControl::CMMAMIDIVolumeControl(CMMAMIDIPlayer* aPlayer)
-        : CMMAVolumeControl(aPlayer)
-{
-    iPlayer = aPlayer;
-}
-
-void CMMAMIDIVolumeControl::ConstructL()
-{
-    ConstructBaseL();
-}
-
-CMMAMIDIVolumeControl* CMMAMIDIVolumeControl::NewL(CMMAMIDIPlayer* aPlayer)
-{
-    CMMAMIDIVolumeControl* self = new(ELeave)CMMAMIDIVolumeControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-void CMMAMIDIVolumeControl::DoSetLevelL(TInt aLevel)
-{
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-    TInt maxVolume = midi->MaxVolumeL();
-    midi->SetVolumeL(aLevel * maxVolume / KMMAVolumeMaxLevel);
-}
-
-TInt CMMAMIDIVolumeControl::DoGetLevelL()
-{
-    CMidiClientUtility* midi = iPlayer->MidiClient();
-    // result is in range 0..100
-    return (midi->VolumeL() * KMMAVolumeMaxLevel / midi->MaxVolumeL());
-}
-
-
-//  END OF FILE
-
--- a/javauis/mmapi_qt/baseline/src/cmmammfplayerbase.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmfdes.h>
-#include <AudioPreference.h>
-#include <logger.h>
-#include "cmmammfplayerbase.h"
-#include "cmmammfresolver.h"
-
-
-CMMAMMFPlayerBase::~CMMAMMFPlayerBase()
-{
-    // First delete the control and then close the controller
-    // Added after AudioOutputControl
-    DeleteControls();
-    if (iControllerInfos)
-    {
-        iControllerInfos->ResetAndDestroy();
-    }
-    delete iControllerInfos;
-
-    if (iEventMonitor)
-    {
-        iEventMonitor->Cancel();
-    }
-
-    iController.Close();
-
-    delete iEventMonitor;
-
-    delete iFileName;
-}
-
-
-CMMAMMFPlayerBase::CMMAMMFPlayerBase(
-    CMMAMMFResolver* aResolver) :
-        iMediaTime(KTimeUnknown), iStartedEventTime(0)
-{
-    // implementation array ownership is transferred
-    iControllerInfos = aResolver->ImplementationsOwnership();
-
-    // content type ownership is transferred
-    iContentType = aResolver->ContentTypeOwnership();
-
-    // file name ownership is transferred
-    iFileName = aResolver->FileNameOwnership();
-}
-
-
-void CMMAMMFPlayerBase::ConstructL()
-{
-    CMMAPlayer::ConstructL();
-
-    // Create an event monitor
-    iEventMonitor =
-        CMMFControllerEventMonitor::NewL(*this, iController);
-}
-
-
-EXPORT_C RMMFController& CMMAMMFPlayerBase::Controller()
-{
-    return iController;
-}
-
-EXPORT_C TInt CMMAMMFPlayerBase::DoOpen(TUid aSourceUid,
-                                        const TDesC8& aSourceData,
-                                        TUid aSinkUid,
-                                        const TDesC8& aSinkData,
-                                        TMMFPrioritySettings aPrioritySettings)
-{
-    // Make sure any existing controller is closed.
-    iEventMonitor->Cancel();
-    iController.Close();
-
-    // Try opening and configuring each controller in turn
-    TInt error = KErrNotSupported;
-    TInt index = 0;
-
-    // Try controllers until found a good controller or out of list
-    while ((error != KErrNone) &&
-            (index < iControllerInfos->Count()))
-    {
-        // Open the controller
-        error = iController.Open((*iControllerInfos)[ index ]->Uid(),
-                                 aPrioritySettings, ETrue);
-
-        // If the controller was opened without error, start receiving events from it.
-        if (!error)
-        {
-            iEventMonitor->Start();
-
-            // Add the data source to the controller.
-            error = iController.AddDataSource(aSourceUid, aSourceData);
-        }
-
-        // Add the data sink
-        if (!error)
-        {
-            error = iController.AddDataSink(aSinkUid, aSinkData);
-        }
-
-        // If an error occurred in any of the above, close the controller.
-        if (error)
-        {
-            iEventMonitor->Cancel();
-            iController.Close();
-        }
-
-        index++;
-    }
-
-    return error;
-}
-
-TBool CMMAMMFPlayerBase::IsFilePlayer()
-{
-    if (iFileName != NULL)
-    {
-        return ETrue;
-    }
-    return EFalse;
-}
-
-void CMMAMMFPlayerBase::StartL()
-{
-	LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StartL +");
-    iMediaTime = KTimeUnknown;
-    User::LeaveIfError(iController.Play());
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StartL after iController.Play() ");
-    // inform java side
-    ChangeState(EStarted);
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StartL after ChangeState ");	 
-     PostLongEvent(CMMAPlayerEvent::EStarted, iStartedEventTime);
-    PostActionCompletedStart();
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StartL after PostLongEvent ");	
-      
-//    PostActionCompleted(KErrNone);   // java start return
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StartL after PostActionCompleted ");	
-}
-
-void CMMAMMFPlayerBase::StopL(TBool aPostEvent)
-{
-    if (iState == EStarted)
-    {
-        TInt64 time;
-        GetMediaTime(&time);
-        iStartedEventTime = time;
-
-        TInt err = KErrNone;
-        // AAC controller does not support multiple
-        // calls to pause but leave with KErrNotReady.
-        // That error is dismissed as player should
-        // be paused already in that case.
-        if (time == 0)
-        {
-            LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StopL: Position is zero, stopping");
-            // Normally pause would be called, but if
-            // current time is zero, Stop is called instead.
-            // This is done because video playback breaks
-            // if pause is called between events
-            // KMMFEventCategoryVideoLoadingStarted and
-            // KMMFEventCategoryVideoLoadingCompleted
-            // (no wurther events are delivered altough
-            // playback continues fine).
-            // However calling Stop is tolerated in that
-            // situation.
-            err = iController.Stop();
-            if (err == KErrNone)
-            {
-                err = iController.Prime();
-            }
-        }
-        else
-        {
-            LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::StopL: Position not zero, pausing");
-            err = iController.Pause();
-        }
-
-        if ((err != KErrNone) && (err != KErrNotReady))
-        {
-            ELOG1( EJavaMMAPI, "CMMAMMFPlayerBase::StopL: pause/stop failed %d, leaving", err);
-            User::Leave(err);
-        }
-
-        if (aPostEvent)
-        {
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-    }
-}
-
-
-void CMMAMMFPlayerBase::DeallocateL()
-{
-    if (iState == EPrefetched)
-    {
-        // release all resources
-        if (iEventMonitor)
-        {
-            iEventMonitor->Cancel();
-        }
-
-        // Change state first to enable AMMS to delete Effect API classes
-        ChangeState(ERealized);
-        iController.Stop();
-        ResetSourceStreams();
-    }
-}
-
-
-EXPORT_C void CMMAMMFPlayerBase::GetDuration(TInt64* aDuration)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetDuration ");
-    if (iDuration == KTimeUnknown)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetDuration Time unknown ");
-        TTimeIntervalMicroSeconds duration;
-        TInt err = iController.GetDuration(duration);
-        if (!err)
-        {
-            iDuration = duration.Int64();
-        }
-    }
-    *aDuration = iDuration;
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetDuration - ");
-}
-
-void CMMAMMFPlayerBase::SetMediaTimeL(TInt64* aTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::SetMediaTimeL");
-
-    // Negative values are not checked here
-    // because it's done already in Java side.
-
-    // Get clip duration
-    TTimeIntervalMicroSeconds duration;
-    User::LeaveIfError(iController.GetDuration(duration));
-    LOG1( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::SetMediaTimeL iController.GetDuration=%d", duration.Int64());
-
-    TTimeIntervalMicroSeconds position;
-
-    // If the desired media time is beyond the duration,
-    // the time is set to the end of the media.
-    if (*aTime > duration.Int64())
-    {
-        position = duration;
-    }
-    else
-    {
-        position = *aTime;
-    }
-
-    TBool paused = EFalse;
-    TInt err = KErrNone;
-
-    if (iState == EStarted)
-    {
-        paused = ETrue;
-        User::LeaveIfError(err = iController.Pause());
-        ELOG1( EJavaMMAPI, "CMMAMMFPlayerBase::SetMediaTimeL after iController.Pause = %d", err);
-    }
-
-    if (err == KErrNone)
-    {
-        // The controller must be in the PRIMED or PLAYING state
-        User::LeaveIfError(err = iController.SetPosition(position));
-        ELOG1( EJavaMMAPI, "CMMAMMFPlayerBase::SetMediaTimeL iController.SetPosition() = %d", err);
-    }
-
-    // Reset cached media time, because actual set position may be
-    // something else than aTime.
-    iMediaTime = KTimeUnknown;
-
-    // Inform about the position change to the StateListeners
-    ChangeState(iState);
-
-    // Get the actual media time
-    GetMediaTime(aTime);
-
-    iStartedEventTime = iMediaTime;
-
-    if (err == KErrNone)
-    {
-        if (paused == (TBool)ETrue)
-        {
-            User::LeaveIfError(err = iController.Play());
-            ELOG1( EJavaMMAPI, "CMMAMMFPlayerBase::SetMediaTimeL iController.Play() = %d", err);
-        }
-    }
-
-    if (err != KErrNone)
-    {
-        User::Leave(err);
-    }
-}
-
-void CMMAMMFPlayerBase::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime +");
-    TTimeIntervalMicroSeconds position(0);
-
-    if (iMediaTime == KTimeUnknown || iState == EStarted)
-    {
-        // The controller must be in the PRIMED or PLAYING state
-        TInt error(iController.GetPosition(position));
-
-        if (error == KErrNone)
-        {
-            TInt64 newTime = position.Int64();
-            LOG1( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime iController.GetPosition : %d", newTime);
-
-            // Sanity check for media time going backwards or beyond the
-            // duration.
-            // Some native controls may return zero media time for
-            // a few moments just before playback will complete.
-            if (newTime < iMediaTime ||
-                    (iDuration > 0 && newTime > iDuration))
-            {
-                LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime.GetDuration ");
-                GetDuration(&iMediaTime);
-            }
-            else
-            {
-                LOG( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime.else ");
-                // set return value
-                iMediaTime = newTime;
-            }
-        }
-        else
-        {
-            LOG1( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime: error=%d, returning TIME_UNKNOWN", error);
-            // cannot get media time
-            iMediaTime = KTimeUnknown;
-        }
-    }
-    *aMediaTime = iMediaTime;
-    LOG1( EJavaMMAPI, EInfo, "CMMAMMFPlayerBase::GetMediaTime - %d", *aMediaTime);
-}
-
-void CMMAMMFPlayerBase::CloseL()
-{
-    CMMAPlayer::CloseL();
-    if (iEventMonitor)
-    {
-        iEventMonitor->Cancel();
-    }
-    // First delete the control and then close the controller
-    // Added after AudioOutputControl
-    iController.Stop();
-    delete iEventMonitor;
-    iEventMonitor = NULL;
-}
-
-void CMMAMMFPlayerBase::HandleEvent(const TMMFEvent& /*aEvent*/)
-{
-    // empty implementation
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmammfplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,292 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating MMF-based players.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <badesca.h>
-#include <logger.h>
-
-#ifndef RD_JAVA_OMA_DRM_V2
-#include <DRMCommon.h>
-#endif // RD_JAVA_OMA_DRM_V2
-
-#include "cmmammfplayerfactory.h"
-#include "cmmammfresolver.h"
-
-// CONSTANTS
-// Granularity used to create initial arrays.
-const TInt KGranularity = 8;
-_LIT(KContentTypePacketSrcNotIncluded, "application/x-ext-packetsrc");
-
-EXPORT_C CMMAMMFPlayerFactory::CMMAMMFPlayerFactory()
-{
-}
-
-EXPORT_C CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory()
-{
-}
-
-CMMAPlayer* CMMAMMFPlayerFactory::CreatePlayerL(const TDesC& aContentType)
-{
-    return CreatePlayerL(aContentType, NULL);
-}
-
-CMMAPlayer* CMMAMMFPlayerFactory::CreatePlayerL(const TDesC& aContentType,
-        const TDesC* aFileName)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL content type = %S",
-              aContentType.Ptr());
-    CMMFFormatSelectionParameters* fSelect =
-        CMMFFormatSelectionParameters::NewLC();
-
-    // MMF needs 8bit data
-    HBufC8* contentType = HBufC8::NewLC(aContentType.Length());
-    contentType->Des().Copy(aContentType);
-
-    // Match to mime/content type
-    fSelect->SetMatchToMimeTypeL(*contentType);
-
-    CMMAPlayer* player = CreatePlayerL(fSelect, aFileName);
-
-    CleanupStack::PopAndDestroy(contentType);
-    CleanupStack::PopAndDestroy(fSelect);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL content type ok");
-    return player;
-}
-
-CMMAPlayer* CMMAMMFPlayerFactory::CreatePlayerL(const TDesC& aProtocol,
-        const TDesC& aMiddlePart,
-        const TDesC&)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL aMiddlePart = %S",
-              aMiddlePart.Ptr());
-    CMMFFormatSelectionParameters* fSelect =
-        CMMFFormatSelectionParameters::NewLC();
-
-    // Match to file name, using only middle part of the locator
-    fSelect->SetMatchToFileNameL(aMiddlePart);
-
-    CMMAPlayer* player = NULL;
-    if (aProtocol == KMMAFileProtocol)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAMMFPlayerFactory::CreatePlayerL creating file player");
-        player = CreatePlayerL(fSelect, &aMiddlePart);
-
-#ifndef RD_JAVA_OMA_DRM_V2
-        // if opening is failed, it might be DRM file, trying it
-        if (!player)
-        {
-            player = TryOpenDRMFileL(aMiddlePart);
-        }
-#endif // RD_JAVA_OMA_DRM_V2
-
-    }
-    else
-    {
-        player = CreatePlayerL(fSelect, NULL);
-    }
-
-    CleanupStack::PopAndDestroy(fSelect);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL aMiddlePart ok");
-    return player;
-}
-
-#ifndef RD_JAVA_OMA_DRM_V2
-CMMAPlayer* CMMAMMFPlayerFactory::TryOpenDRMFileL(const TDesC& aFileName)
-{
-    // we are most likely going to play this file
-    ContentAccess::TIntent intent = ContentAccess::EPlay;
-
-    CContent* contentObj = CContent::NewL(aFileName);
-    CleanupStack::PushL(contentObj);
-    CData* dataObj = contentObj->OpenContentL(intent);
-    CleanupStack::PushL(dataObj);
-    User::LeaveIfError(dataObj->EvaluateIntent(intent));
-    TBuf8<KMaxName> mimeType;
-    CMMAPlayer* player = NULL;
-    if (dataObj->GetMimeTypeL(mimeType))
-    {
-        // we use 16bit mimeType
-        HBufC* mimeTypeBuf = HBufC::NewLC(mimeType.Length());
-        mimeTypeBuf->Des().Copy(mimeType);
-        player = CreatePlayerL(*mimeTypeBuf, &aFileName);
-        CleanupStack::PopAndDestroy(mimeTypeBuf);
-    }
-    CleanupStack::PopAndDestroy(2); //dataObj, contentObj
-    return player;
-}
-#endif // RD_JAVA_OMA_DRM_V2
-
-CMMAPlayer* CMMAMMFPlayerFactory::CreatePlayerL(const TDesC8& aHeaderData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL header data +");
-    CMMFFormatSelectionParameters* fSelect =
-        CMMFFormatSelectionParameters::NewLC();
-
-    // Match to header data
-    fSelect->SetMatchToHeaderDataL(aHeaderData);
-
-    CMMAPlayer* player = CreatePlayerL(fSelect);
-
-    CleanupStack::PopAndDestroy(fSelect);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAMMFPlayerFactory::CreatePlayerL header data -");
-    return player;
-}
-
-void CMMAMMFPlayerFactory::GetSupportedContentTypesL(const TDesC& aProtocol,
-        CDesC16Array& aMimeTypeArray)
-{
-    // check that this is supported protocol
-    if (!IsSupportedProtocolL(aProtocol))
-    {
-        return;
-    }
-
-    CMMFFormatSelectionParameters* fSelect =
-        CMMFFormatSelectionParameters::NewLC();
-
-    CMMAMMFResolver* cSelect =
-        CMMAMMFResolver::NewLC();
-
-    PreparePluginSelectionParametersL(cSelect, fSelect);
-
-    // Set the media ids
-    RArray<TUid> mediaIds;
-    CleanupClosePushL(mediaIds);
-    MediaIdsL(mediaIds);
-    cSelect->SelectionParameters()->SetMediaIdsL(mediaIds, MediaIdMatchType());
-
-    cSelect->GetSupportedContentTypesL(aMimeTypeArray);
-
-    // Content type application/x-ext-packetsrc must not be supported,
-    // thus it is removed from the list of supported content types
-    TInt position(0);
-    TInt err = aMimeTypeArray.Find(KContentTypePacketSrcNotIncluded, position);
-    if (err == KErrNone)
-    {
-        aMimeTypeArray.Delete(position);
-        aMimeTypeArray.Compress();
-    }
-
-    CleanupStack::PopAndDestroy(); // mediaIds
-    CleanupStack::PopAndDestroy(cSelect);
-    CleanupStack::PopAndDestroy(fSelect);
-}
-
-EXPORT_C CMMAPlayer* CMMAMMFPlayerFactory::CreatePlayerL(CMMFFormatSelectionParameters* aFormatSelect,
-        const TDesC* aFileName)
-{
-    CMMAMMFResolver* cSelect =
-        CMMAMMFResolver::NewLC();
-    cSelect->SetFileNameL(aFileName);
-
-    PreparePluginSelectionParametersL(cSelect,
-                                      aFormatSelect);
-
-    // Set the media ids
-    RArray<TUid> mediaIds;
-    CleanupClosePushL(mediaIds);
-    MediaIdsL(mediaIds);
-    cSelect->SelectionParameters()->SetMediaIdsL(
-        mediaIds, MediaIdMatchType());
-
-    cSelect->ListImplementationsL();
-    CMMAPlayer* player = NULL;
-
-    // check that did we get any hits
-    if (cSelect->Implementations()->Count() > 0)
-    {
-        // Call actual factory to create player
-        player = CreatePlayerL(cSelect);
-    }
-
-    CleanupStack::PopAndDestroy(); // mediaIds
-    CleanupStack::PopAndDestroy(cSelect);
-    return player;
-}
-
-void CMMAMMFPlayerFactory::GetSupportedProtocolsL(const TDesC& aContentType,
-        CDesC16Array& aProtocolArray)
-{
-    // Check that this is supported content type
-    if (!IsSupportedContentTypeL(aContentType))
-    {
-        return;
-    }
-    aProtocolArray.AppendL(KMMAHttpProtocol);
-    aProtocolArray.AppendL(KMMAHttpsProtocol);
-    aProtocolArray.AppendL(KMMAFileProtocol);
-}
-
-TBool CMMAMMFPlayerFactory::IsSupportedProtocolL(const TDesC& aProtocol)
-{
-    // With null desc we are getting all
-    if (aProtocol == KNullDesC)
-    {
-        return ETrue;
-    }
-    CDesC16ArraySeg* protocols = new(ELeave) CDesC16ArraySeg(KGranularity);
-    CleanupStack::PushL(protocols);
-    GetSupportedProtocolsL(KNullDesC, *protocols);
-    TInt pos = KErrNotFound;
-    // Find returns 0 if there contentType is found
-    TBool retValue = (protocols->Find(aProtocol, pos) == 0);
-    CleanupStack::PopAndDestroy(protocols);
-    return retValue;
-}
-
-TBool CMMAMMFPlayerFactory::IsSupportedContentTypeL(const TDesC& aContentType)
-{
-    // With null desc we are getting all
-    if (aContentType == KNullDesC)
-    {
-        return ETrue;
-    }
-
-    // Content type application/x-ext-packetsrc
-    // must not be supported at the moment.
-    if (aContentType == KContentTypePacketSrcNotIncluded)
-    {
-        return EFalse;
-    }
-
-    CDesC16ArraySeg* contentTypes = new(ELeave) CDesC16ArraySeg(KGranularity);
-    CleanupStack::PushL(contentTypes);
-    GetSupportedContentTypesL(KNullDesC, *contentTypes);
-    TInt pos = KErrNotFound;
-    // Find returns 0 if there contentType is found
-    TBool retValue = (contentTypes->Find(aContentType, pos) == 0);
-    CleanupStack::PopAndDestroy(contentTypes);
-    return retValue;
-}
-
-EXPORT_C void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(
-    CMMAMMFResolver* aResolver,
-    CMMFFormatSelectionParameters* aFormatSelection)
-{
-    // Play type is default
-    aResolver->SetRequiredPlayFormatSupportL(*aFormatSelection);
-}
-
-
-CMMFPluginSelectionParameters::TMediaIdMatchType
-CMMAMMFPlayerFactory::MediaIdMatchType()
-{
-    // We are now getting only Audio Controllers
-    return CMMFPluginSelectionParameters::EAllowOnlySuppliedMediaIds;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmammfratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements generic RateControl functionality.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmammfratecontrol.h"
-
-namespace
-{
-const TInt KErrorMessageSize = 32;
-_LIT(KErrDefaultError, "Symbian OS Error: %d");
-}
-
-CMMAMMFRateControl* CMMAMMFRateControl::NewL(CMMAMMFPlayerBase* aPlayer)
-{
-    CMMAMMFRateControl* self = new(ELeave) CMMAMMFRateControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAMMFRateControl::~CMMAMMFRateControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMMFRateControl::~CMMAMMFRateControl");
-}
-
-CMMAMMFRateControl::CMMAMMFRateControl(CMMAMMFPlayerBase* aPlayer) :
-        iPlayer(aPlayer), iCurrentRate(KMMADefaultRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMMFRateControl::CMMAMMFRateControl");
-}
-
-void CMMAMMFRateControl::ConstructL()
-{
-    iPlayer->AddStateListenerL(this);
-}
-
-void CMMAMMFRateControl::StateChanged(TInt aState)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMMFRateControl::StateChanged");
-    if (aState == CMMAPlayer::EStarted && iCurrentRate == KMMAMinRate)
-    {
-        RMMFController& controller = iPlayer->Controller();
-        TInt err = controller.Pause();
-        if ((err != KErrNone) && (err != KErrNotReady))
-        {
-            ELOG1( EJavaMMAPI, "CMMAMMFRateControl::StateChanged: Pause error %d", err);
-            TBuf<KErrorMessageSize> errorMessage;
-            errorMessage.Format(KErrDefaultError, err);
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-        }
-    }
-}
-
-TInt CMMAMMFRateControl::SetRateL(TInt aRate)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAMMFRateControl::SetRateL");
-    RMMFController& controller = iPlayer->Controller();
-
-    TInt newRate;
-    if (aRate <= KMMAMinRate)
-    {
-        newRate = KMMAMinRate;
-    }
-    else
-    {
-        newRate = KMMADefaultRate;
-    }
-
-    if ((iPlayer->State() == CMMAPlayer::EStarted) &&
-            (newRate != iCurrentRate))
-    {
-        if (newRate == KMMAMinRate)
-        {
-            TInt err = controller.Pause();
-            if ((err != KErrNone) && (err != KErrNotReady))
-            {
-                User::Leave(err);
-            }
-        }
-        else
-        {
-            User::LeaveIfError(controller.Play());
-        }
-    }
-    iCurrentRate = newRate;
-    return iCurrentRate;
-}
-
-TInt CMMAMMFRateControl::RateL()
-{
-    return iCurrentRate;
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmammfresolver.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing sounds
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-
-#include "cmmammfresolver.h"
-#include "apgcli.h"
-#include "apmrec.h"
-
-
-#include "hxmetadatautil.h"
-_LIT8(KMimetypeRM, "audio/x-pn-realaudio");
-_LIT(KRVMimeType1, "video/x-pn-realvideo");
-_LIT(KRVMimeType2, "video/x-realvideo");
-_LIT(KRVMimeType3, "video/vnd.rn-realvideo");
-
-
-// CONSTANTS
-
-CMMAMMFResolver* CMMAMMFResolver::NewLC()
-{
-    CMMAMMFResolver* self = new(ELeave)CMMAMMFResolver();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-void CMMAMMFResolver::ListImplementationsL()
-{
-    iControllerSelection->ListImplementationsL(*iImplementations);
-    if (iImplementations->Count() > 0)
-    {
-        ResolveContentTypeL();
-    }
-}
-
-RMMFControllerImplInfoArray* CMMAMMFResolver::Implementations()
-{
-    // ImplementationsOwnership method must not be called before this
-    __ASSERT_DEBUG(iImplementations, User::Invariant());
-    return iImplementations;
-}
-
-RMMFControllerImplInfoArray* CMMAMMFResolver::ImplementationsOwnership()
-{
-    // ImplementationsOwnership method must not be called many times
-    __ASSERT_DEBUG(iImplementations, User::Invariant());
-
-    RMMFControllerImplInfoArray* implementations = iImplementations;
-    iImplementations = NULL; // ownership is transferred
-    return implementations;
-}
-
-HBufC* CMMAMMFResolver::ContentTypeOwnership()
-{
-    HBufC* ct = iContentType;
-    iContentType = NULL;
-    return ct;
-}
-
-HBufC* CMMAMMFResolver::ContentType()
-{
-    return iContentType;
-}
-
-void CMMAMMFResolver::SetFileNameL(const TDesC* aFileName)
-{
-    HBufC* fn = NULL;
-    if (aFileName)
-    {
-        fn = aFileName->AllocL();
-    }
-    delete iFileName;
-    iFileName = fn;
-}
-
-HBufC* CMMAMMFResolver::FileNameOwnership()
-{
-    HBufC* fn = iFileName;
-    iFileName = NULL;
-    return fn;
-}
-
-void CMMAMMFResolver::ResolveContentTypeL()
-{
-    LOG( EJavaMMAPI, EInfo, "+ CMMAMMFResolver::ResolveContentTypeL()");
-    CMMFFormatSelectionParameters* fSelect = iRequiredPlayFormatSupport;
-    if (!fSelect)
-    {
-        fSelect = iRequiredRecordFormatSupport;
-    }
-    // if there is no play or record formats this object is not
-    // initialized correctly.
-    __ASSERT_DEBUG(fSelect, User::Invariant());
-
-    CMMFFormatSelectionParameters::TMatchDataType type =
-        fSelect->MatchDataType();
-
-    // if there is no implementation this method must not be called.
-    __ASSERT_DEBUG(iImplementations->Count() > 0, User::Invariant());
-    const RMMFFormatImplInfoArray* formats =
-        Formats((*iImplementations)[ 0 ]);
-
-    HBufC8* contentType = NULL;
-    TInt formatsCount = formats->Count();
-
-    if (type == CMMFFormatSelectionParameters::EMatchMimeType)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - EMatchMimeType");
-        // The match was based on a mime type.
-        contentType = fSelect->MatchData().AllocLC();
-    }
-    else if (type == CMMFFormatSelectionParameters::EMatchFileExtension)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - EMatchFileExtension");
-        // The match was based on a file extension.
-        RApaLsSession ls;
-        TInt error;
-        error = ls.Connect();
-        TDataRecognitionResult result;
-        error = ls.RecognizeData(*iFileName, KNullDesC8, result);
-        ls.Close();
-
-        if (iFileName && (iFileName->Right(3).Compare(KRaFileExtension()) == 0))
-        {
-            contentType = KMimetypeRM().AllocLC();
-        }
-        else if (iFileName && (iFileName->Right(3).Compare(KRmFileExtension()) == 0) &&
-                 !(IsRealVideoTypeL(*iFileName)))
-        {
-            contentType = KMimetypeRM().AllocLC();
-        }
-        else if (!error && (result.iConfidence >= CApaDataRecognizerType::EProbable))
-        {
-            LOG1( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - Confidence : %d", result.iConfidence);
-            contentType = result.iDataType.Des8().AllocLC();
-        }
-
-
-        else
-        {
-            // The probability is less, hence matching is done based on legacy style
-            for (TInt format = 0; (format < formatsCount) &&
-                    !contentType; format++)
-            {
-                const CMMFFormatImplementationInformation* info = (*formats)[ format ];
-                if (info->SupportsFileExtension(fSelect->MatchData()))
-                {
-                    if (info->SupportedMimeTypes().Count() > 0)
-                    {
-                        contentType = info->SupportedMimeTypes()[ 0 ].AllocLC();
-                    }
-                }
-            }
-        }
-    }
-    else if (type == CMMFFormatSelectionParameters::EMatchHeaderData)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - EMatchHeaderData");
-        // The match was on a header data.
-        RApaLsSession ls;
-        TInt error;
-        error = ls.Connect();
-        TDataRecognitionResult result;
-        error = ls.RecognizeData(KNullDesC, fSelect->MatchData() , result);
-        ls.Close();
-        if (!error && (result.iConfidence >= CApaDataRecognizerType::EProbable))
-        {
-            contentType = result.iDataType.Des8().AllocLC();
-        }
-        else
-        {
-            // The probability is less, hence matching is done based on legacy style
-            for (TInt format = 0; (format < formatsCount) &&
-                    !contentType; format++)
-            {
-                CMMFFormatImplementationInformation* info = (*formats)[ format ];
-                if (info->SupportsHeaderDataL(fSelect->MatchData()))
-                {
-                    if (info->SupportedMimeTypes().Count() > 0)
-                    {
-                        contentType = info->SupportedMimeTypes()[ 0 ].AllocLC();
-                    }
-                }
-            }
-        }
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - KErrNotSupported");
-        // EMatchAny is not supported
-        User::Leave(KErrNotSupported);
-    }
-
-    // iContentType remains NULL if content type was not found.
-    if (contentType)
-    {
-        LOG1( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - contentType : %s", contentType->Des().PtrZ());
-
-        HBufC* ct = HBufC::NewL(contentType->Length());
-        (ct->Des()).Copy(*contentType);
-        CleanupStack::PopAndDestroy(contentType);
-        delete iContentType;
-        iContentType = ct;
-    }
-    else
-    {
-        //This situation should never occur
-        LOG( EJavaMMAPI, EInfo, "CMMAMMFResolver::ResolveContentTypeL - contentType = NULL");
-        User::Leave(KErrUnknown);
-    }
-    LOG( EJavaMMAPI, EInfo, "- CMMAMMFResolver::ResolveContentTypeL()");
-}
-
-
-TBool CMMAMMFResolver::IsRealVideoTypeL(const TDesC& aFileName)
-{
-    TBool result = EFalse;
-
-    CHXMetaDataUtility *putil;
-    putil = CHXMetaDataUtility::NewL();
-    CleanupStack::PushL(putil);
-    TRAPD(err, putil->OpenFileL(aFileName));
-    ELOG1( EJavaMMAPI, "MMA:CMMAMMFResolver::IsRealVideoTypeL, err = %d", err);
-
-    if (err != KErrNone)
-    {
-        CleanupStack::Pop(putil);
-        putil->ResetL();
-        delete putil;
-        return EFalse;
-    }
-
-    TUint count = 0;
-    putil->GetMetaDataCount(count);
-
-    TUint i;
-    HXMetaDataKeys::EHXMetaDataId  id;
-
-    for (i = 0; i < count; i++)
-    {
-        HBufC* pDes = NULL;
-
-        putil->GetMetaDataAt(i, id, pDes);
-
-        if (id == HXMetaDataKeys::EHXMimeType)
-        {
-            if (IsRealMimeTypeSupported(*pDes))
-            {
-                result = ETrue;
-            }
-        }
-    }
-
-    CleanupStack::Pop(putil);
-
-    putil->ResetL();
-    delete putil;
-
-    return result;
-}
-
-
-TBool CMMAMMFResolver::IsRealMimeTypeSupported(const TDesC& aMimeType)
-{
-    TBool match = EFalse;
-
-    if (!aMimeType.Compare(KRVMimeType1()))
-    {
-        match = ETrue;
-        return match;
-    }
-    if (!aMimeType.Compare(KRVMimeType2()))
-    {
-        match = ETrue;
-        return match;
-    }
-    if (!aMimeType.Compare(KRVMimeType3()))
-    {
-        match = ETrue;
-        return match;
-    }
-
-    return match;
-}
-
-
-void CMMAMMFResolver::GetSupportedContentTypesL(CDesC16Array& aMimeTypeArray)
-{
-    iControllerSelection->ListImplementationsL(*iImplementations);
-
-    TInt impCount = iImplementations->Count();
-    for (TInt i = 0; i < impCount; i++)
-    {
-        const RMMFFormatImplInfoArray* formats = Formats((*iImplementations)[ i ]);
-        TInt formatsCount(formats->Count());
-        for (TInt format = 0; format < formatsCount; format++)
-        {
-            const CMMFFormatImplementationInformation* info = (*formats)[ format ];
-            const CDesC8Array& supportedMimes = info->SupportedMimeTypes();
-            TInt mimeCount = supportedMimes.Count();
-            for (TInt mime = 0; mime < mimeCount; mime++)
-            {
-                // must convert from 8 bits to 16 bits
-                HBufC* tmpBuf = HBufC::NewLC(supportedMimes[ mime ].Length());
-                tmpBuf->Des().Copy(supportedMimes[ mime ]);
-                aMimeTypeArray.AppendL(*tmpBuf);
-                CleanupStack::PopAndDestroy(tmpBuf);
-            }
-        }
-    }
-}
-
-
-void CMMAMMFResolver::SetRequiredPlayFormatSupportL(
-    CMMFFormatSelectionParameters& aRequiredSupport)
-{
-    iControllerSelection->SetRequiredPlayFormatSupportL(aRequiredSupport);
-    iRequiredPlayFormatSupport = &aRequiredSupport;
-}
-
-void CMMAMMFResolver::SetRequiredRecordFormatSupportL(
-    CMMFFormatSelectionParameters& aRequiredSupport)
-{
-    iControllerSelection->SetRequiredRecordFormatSupportL(aRequiredSupport);
-    iRequiredRecordFormatSupport = &aRequiredSupport;
-}
-
-const RMMFFormatImplInfoArray* CMMAMMFResolver::Formats(CMMFControllerImplementationInformation* aImplementation)
-{
-    const RMMFFormatImplInfoArray* formats = NULL;
-    if (iRequiredPlayFormatSupport)
-    {
-        formats = &(aImplementation->PlayFormats());
-    }
-    else
-    {
-        // if there is no play or record formats this object is not
-        // initialized correctly.
-        __ASSERT_DEBUG(iRequiredRecordFormatSupport, User::Invariant());
-
-        formats = &(aImplementation->RecordFormats());
-    }
-    return formats;
-}
-
-CMMFControllerPluginSelectionParameters*
-CMMAMMFResolver::SelectionParameters()
-{
-    return iControllerSelection;
-}
-
-CMMAMMFResolver::~CMMAMMFResolver()
-{
-    if (iImplementations)
-    {
-        iImplementations->ResetAndDestroy();
-    }
-    delete iImplementations;
-    delete iContentType;
-    delete iControllerSelection;
-    delete iFileName;
-}
-
-
-CMMAMMFResolver::CMMAMMFResolver()
-{
-}
-
-
-void CMMAMMFResolver::ConstructL()
-{
-    iImplementations = new(ELeave)RMMFControllerImplInfoArray();
-    iControllerSelection = CMMFControllerPluginSelectionParameters::NewL();
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaoutputstream.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class to handle OutputStream operations.
-*
-*/
-
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-#include "cmmaoutputstream.h"
-#include "mmmaeventposter.h"
-#include "cmmaoutputstreamevent.h"
-
-// CONSTANTS
-const TInt KMMACommit = -10000; // indicates native started commit
-
-CMMAOutputStream* CMMAOutputStream::NewL(JNIEnv* aJNIEnv,
-        MMMAEventPoster* aEventPoster,
-        jobject aJavaOutputStreamWriter
-                                        )
-{
-    CMMAOutputStream* self = CMMAOutputStream::NewLC(aJNIEnv,
-                             aEventPoster,
-                             aJavaOutputStreamWriter
-                                                    );
-    CleanupStack::Pop();
-    return self;
-}
-
-
-CMMAOutputStream* CMMAOutputStream::NewLC(JNIEnv* aJNIEnv,
-        MMMAEventPoster* aEventPoster,
-        jobject aJavaOutputStreamWriter
-                                         )
-{
-    CMMAOutputStream* self = new(ELeave) CMMAOutputStream(aEventPoster);
-    CleanupStack::PushL(self);
-    self->ConstructL(aJNIEnv, aJavaOutputStreamWriter);
-    return self;
-}
-
-
-void CMMAOutputStream::CreateL(CMMAOutputStream** aOutputStream,
-																MMAFunctionServer* aEventServer,
-                               JNIEnv* aJniEnv,
-                               MMMAEventPoster* aEventPoster,
-                               jobject aJavaOutputStreamWriter)
-{
-
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
- 	aJniEnv = aEventServer->getValidJniEnv();
-
-    *aOutputStream = NewL(aJniEnv, aEventPoster, aJavaOutputStreamWriter);
-}
-
-
-CMMAOutputStream::~CMMAOutputStream()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAOutputStream::~");
-
-    // If write event is in the event server, it cannot be deleted.
-    // Thus set the event to be deleted when event dispatch is called.
-    if (iWriteEvent &&
-            iWriteEvent->State() == CMMAOutputStreamEvent::EMMAEventActive)
-    {
-        iWriteEvent->SetState(CMMAOutputStreamEvent::EMMADeleteEvent);
-    }
-    else
-    {
-        delete iWriteEvent;
-    }
-
-    delete iData;
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAOutputStream::~ OK");
-}
-
-
-// Default constructor
-CMMAOutputStream::CMMAOutputStream(MMMAEventPoster* aEventPoster)
-        : iEventSource(aEventPoster),
-        iPtr(NULL, 0)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAOutputStream constructed");
-}
-
-
-void CMMAOutputStream::ConstructL(JNIEnv* aJNIEnv,
-                                  jobject aJavaOutputStreamWriter)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAOutputStream::ConstructL()");
-
-    // void write( int aLength, int aStatus ) method in OutputStreamWriter
-    jmethodID classMethodID =
-        aJNIEnv->GetMethodID(
-            aJNIEnv->GetObjectClass(aJavaOutputStreamWriter),
-            "write",
-            "(II)V");
-    if (!classMethodID)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAOutputStream::ConstructL: Cannot find java method");
-        User::Panic(_L("Java method write(II)V not found"), KErrGeneral);
-    }
-
-    iWriteEvent = new(ELeave) CMMAOutputStreamEvent(classMethodID,
-            aJavaOutputStreamWriter);
-}
-
-void CMMAOutputStream::ReadDataL(TUint8* aOutputData,
-                                 TInt* aBufferSize,
-                                 TInt* aReadStatus)
-{
-    if (!iData)
-    {
-        User::Leave(KErrNotReady);
-    }
-
-    // Status code to be returned
-    TInt status = KErrNone;
-
-    TPtr8 buffer(aOutputData, *aBufferSize);
-    LOG1( EJavaMMAPI, EInfo, " MMA::CMMAOutputStream::ReadDataL SIZE BEFORE READL %d", buffer.Length());
-    LOG1( EJavaMMAPI, EInfo, " MMA::CMMAOutputStream::ReadDataL BYTES AVAILABLE %d", iPtr.Length());
-
-    // Bytes available in native buffer
-    TInt bytesAvailable = iPtr.Length();
-
-    // Maximum size that can be written to Java buffer
-    TInt outputMaxLength = buffer.MaxLength();
-
-    // Length that can be written
-    TInt writeLength = 0;
-
-    if (outputMaxLength < bytesAvailable)
-    {
-        // Not all bytes can be written Java buffer
-        writeLength = outputMaxLength;
-
-        // Java need to read more data
-        status = EMoreData;
-    }
-    else
-    {
-        // All bytes can be written to Java buffer
-        writeLength = bytesAvailable;
-
-        // All data is copied
-        status = ECompleted;
-    }
-
-    // Copy maximum number of bytes to Java buffer
-    buffer.Copy(iPtr.Left(writeLength));
-    *aBufferSize = buffer.Length();
-
-    // Move pointer to next read position.
-    iPtr = iPtr.Mid(writeLength);
-
-    LOG1( EJavaMMAPI, EInfo, " MMA::CMMAOutputStream::ReadDataL SIZE AFTER READL %d", buffer.Length());
-    LOG1( EJavaMMAPI, EInfo, " MMA::CMMAOutputStream::ReadDataL RETURN %d", status);
-    LOG1( EJavaMMAPI, EInfo, " MMA::CMMAOutputStream::ReadDataL dataLeft %d", iPtr.Length());
-
-    if (iPtr.Length() == 0)
-    {
-        // All data is read and buffer is not needed anymore.
-        delete iData;
-        iData = NULL;
-    }
-    *aReadStatus = status;
-}
-
-void CMMAOutputStream::WriteL(const TDesC8& aData)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAOutputStream::WriteL data size = %d", aData.Size());
-    if (iData)
-    {
-        // Previous data was not readed from the stream.
-        User::Leave(KErrNotReady);
-    }
-
-    if (aData.Length() > 0)
-    {
-        // Take a copy of new data.
-        HBufC8* data = aData.AllocL();
-        delete iData;
-        iData = data;
-        iPtr.Set(iData->Des());
-
-        // Set java event
-        LOG1( EJavaMMAPI, EInfo, "CMMAOutputStream::WriteL: available data: %d", iData->Length());
-        iWriteEvent->SetLength(iData->Length());
-        iWriteEvent->SetStatus(EMoreData);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAOutputStream::WriteL Zero length data");
-        iWriteEvent->SetLength(0);
-        iWriteEvent->SetStatus(ECompleted);
-    }
-    iEventSource->PostEvent(iWriteEvent, CMMAEvent::ENotifyPriority);
-}
-
-void CMMAOutputStream::Commit()
-{
-    iWriteEvent->SetLength(0);
-    iWriteEvent->SetStatus(KMMACommit);
-    iEventSource->PostEvent(iWriteEvent, CMMAEvent::ENotifyPriority);
-}
-
-//  END OF FILE
-
--- a/javauis/mmapi_qt/baseline/src/cmmaoutputstreamevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#include <logger.h>
-
-#include "cmmaoutputstreamevent.h"
-
-
-CMMAOutputStreamEvent::CMMAOutputStreamEvent(jmethodID aHandleEventMethod,
-        jobject aNotifyObject)
-        : CMMAEvent(EReusableEvent),
-        iHandleEventMethod(aHandleEventMethod),
-        iListenerObject(aNotifyObject)
-{
-    iState = EMMAEventNotActive;
-}
-
-void CMMAOutputStreamEvent::SetLength(TInt aLength)
-{
-    iLength = aLength;
-    iState = EMMAEventActive;
-}
-
-
-void CMMAOutputStreamEvent::SetStatus(TInt aStatus)
-{
-    iStatus = aStatus;
-    iState = EMMAEventActive;
-}
-
-void CMMAOutputStreamEvent::SetState(CMMAOutputStreamEvent::TMMAOutputStreamState aState)
-{
-    iState = aState;
-}
-
-CMMAOutputStreamEvent::TMMAOutputStreamState CMMAOutputStreamEvent::State()
-{
-    return iState;
-}
-
-void CMMAOutputStreamEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG2( EJavaMMAPI, EInfo, "CMMAOutputStreamEvent::Dispatch, len=%d status=%d-",
-               iLength, iStatus);
-
-    if (iState == EMMAEventActive)
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iLength,
-                            iStatus);
-        iState = EMMAEventNotActive;
-    }
-    else if (iState == EMMADeleteEvent)
-    {
-        // This is done because some
-        // event may still exist in the event server when
-        // the sender has been deleted.
-
-        delete this;
-    }
-    // else event is not active
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is base class for all players.
-*
-*/
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-#include "cmmaplayer.h"
-#include "mmafunctionserver.h"
-#include "cmmadurationupdater.h"
-#include "cmmavolumecontrol.h"
-
-// CONSTANTS
-_LIT(KPanicOutOfMem, "out of memory");
-
-#ifdef _DEBUG // Needed only in ASSER_DEBUG statements.
-_LIT(KPanicMethod, "method not found");
-#endif
-
-CMMAPlayer::~CMMAPlayer()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAPlayer::~CMMAPlayer()");
-
-    iSourceStreams.ResetAndDestroy();
-    if (iControls.Count() > 0)
-        iControls.ResetAndDestroy();
-    iStateListeners.Reset();
-    delete iActionCompletedEvent;
-    delete iOOMErrorEvent;
-    delete iDurationUpdater;
-    delete iContentType;
-}
-
-
-CMMAPlayer::CMMAPlayer():
-        iRepeatNumberOfTimes(0),
-        iRepeatForever(EFalse),
-        iRepeatCount(0),
-        iDuration(KTimeUnknown),
-        iState(EUnrealized)
-{
-}
-
-
-void CMMAPlayer::ConstructL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ConstructL + ");
-    iDurationUpdater = CMMADurationUpdater::NewL(*this);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ConstructL - ");
-}
-
-
-void CMMAPlayer::StaticAddSourceStreamL(JNIEnv* aJniEnv,
-                                        CMMAPlayer* aPlayer,
-                                        MMAFunctionServer* aEventSource,
-                                        jobject aReader,
-                                        CMMASourceStream** aSourceStream)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticAddSourceStreamL +");
-
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-     aJniEnv = aEventSource-> getValidJniEnv();
-
-    *aSourceStream = aPlayer->AddSourceStreamL(aJniEnv,
-                     aEventSource,
-                     aReader);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticAddSourceStreamL -");
-}
-
-
-
-void CMMAPlayer::StaticSetPlayerListenerObjectL(CMMAPlayer* aPlayer,
-		MMAFunctionServer* aEventsource,
-        jobject aListenerObject,
-        JNIEnv* aJni,
-        MMMAEventPoster* aPoster)
-{
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticSetPlayerListenerObjectL +");
-
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-     aJni = aEventsource-> getValidJniEnv();
-
-    aPlayer->SetPlayerListenerObjectL(aListenerObject, aJni, aPoster);
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticSetPlayerListenerObjectL -");
-}
-
-
-void CMMAPlayer::StaticInitPlayerL(CMMAPlayer* aPlayer,
-								   MMAFunctionServer* aEventsource,
-                                   jobject aPlayerObject,
-                                   JNIEnv* aJni)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticInitPlayerL +");
-
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
- 	aJni = aEventsource-> getValidJniEnv();
-
-    jmethodID actionCompletedMethod = aJni->GetMethodID(
-                                          aJni->GetObjectClass(aPlayerObject),
-                                          "actionCompleted",
-                                          "(I)V");
-                                          
-    jmethodID actionCompletedFileMethod = aJni->GetMethodID(
-                                          aJni->GetObjectClass(aPlayerObject),
-                                          "actionCompletedFile",
-                                          "()V");    
-                                          
-    jmethodID actionCompletedStartMethod = aJni->GetMethodID(
-                                          aJni->GetObjectClass(aPlayerObject),
-                                          "actionCompletedStart",
-                                          "()V");                                                                                 
-
-    // Sanity Check, something is really wrong if methods cannot be found
-    __ASSERT_DEBUG(actionCompletedMethod,
-                   User::Panic(KPanicMethod, KErrGeneral));
-
-    aPlayer->iActionCompletedEvent = new(ELeave) CMMAEvent(
-        aPlayerObject,
-        actionCompletedMethod,
-        CMMAEvent::EReusableEvent);
-            
-    aPlayer->iActionCompletedFileEvent = new(ELeave) CMMAEvent(
-        aPlayerObject,
-        actionCompletedFileMethod,
-        CMMAEvent::EReusableEvent);     
-            
-    aPlayer->iActionCompletedStartEvent = new(ELeave) CMMAEvent(
-        aPlayerObject,
-        actionCompletedStartMethod,
-        CMMAEvent::EReusableEvent);
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticInitPlayerL -");
-}
-
-CMMAControl* CMMAPlayer::StaticControl(CMMAPlayer* aPlayer, TInt aIndex)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::StaticControl +");
-    return aPlayer->Control(aIndex);
-
-}
-
-
-void CMMAPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::RealizeL +");
-    ChangeState(ERealized);
-
-}
-
-
-void CMMAPlayer::CloseL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::CloseL ");
-    ChangeState(EClosed);
-    PostObjectEvent(CMMAPlayerEvent::EClosed, NULL);   
-}
-
-
-void CMMAPlayer::GetDuration(TInt64* aDuration)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::GetDuration ");
-    *aDuration = iDuration;
-}
-
-
-void CMMAPlayer::SetMediaTimeL(TInt64* aTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::SetMediaTimeL ");
-    *aTime = KErrNotSupported;
-}
-
-void CMMAPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::GetMediaTime ");
-    *aMediaTime = KErrNotSupported;
-}
-
-
-EXPORT_C void CMMAPlayer::SetLoopCount(TInt aCount)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::SetLoopCount ");
-    iRepeatForever = (aCount == KJavaRepeatForever);
-    iRepeatNumberOfTimes = aCount;
-    iRepeatCount = 0;
-}
-
-HBufC* CMMAPlayer::ContentType() const
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ContentType ");
-    return iContentType;
-}
-
-void CMMAPlayer::SetPlayerListenerObjectL(jobject aListenerObject,
-        JNIEnv* aJni,
-        MMMAEventPoster* aEventPoster)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::SetPlayerListenerObjectL +");
-    iListenerObject = aListenerObject;
-    iEventPoster = aEventPoster;
-
-    jclass listenerClass = aJni->GetObjectClass(aListenerObject);
-
-    iPostEvent = aJni->GetMethodID(
-                     listenerClass,
-                     "postEvent",
-                     "(Ljava/lang/String;Ljava/lang/Object;)V");
-
-    iPostObjectEvent = aJni->GetMethodID(listenerClass,
-                                         "postObjectEvent",
-                                         "(ILjava/lang/Object;)V");
-
-    iPostLongEvent = aJni->GetMethodID(listenerClass,
-                                       "postLongEvent",
-                                       "(IJ)V");
-
-    iPostStringEvent = aJni->GetMethodID(listenerClass,
-                                         "postStringEvent",
-                                         "(ILjava/lang/String;)V");
-
-    iPostControlEvent = aJni->GetMethodID(listenerClass,
-                                          "postControlEvent",
-                                          "(ILjava/lang/String;)V");
-
-
-    // Sanity Check, something is really wrong if methods cannot be found
-    __ASSERT_DEBUG(iPostEvent &&
-                   iPostObjectEvent &&
-                   iPostLongEvent &&
-                   iPostStringEvent &&
-                   iPostControlEvent,
-                   User::Panic(KPanicMethod, KErrGeneral));
-
-    iOOMErrorEvent = new(ELeave) CMMAPlayerEvent(iListenerObject,
-            iPostStringEvent,
-            CMMAEvent::EReusableEvent);
-    iOOMErrorEvent->SetStringEventL(CMMAPlayerEvent::EError,
-                                    KPanicOutOfMem);
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::SetPlayerListenerObjectL -");
-}
-
-
-EXPORT_C TInt CMMAPlayer::ControlCount()
-{
-    return iControls.Count();
-}
-
-
-EXPORT_C CMMAControl* CMMAPlayer::Control(TInt aIndex)
-{
-    return iControls[ aIndex ];
-}
-
-void CMMAPlayer::RefreshControls()
-{
-
-    for (TInt index = 0; index < iControls.Count(); index++)
-    {
-        CMMAControl* control = iControls[ index ];
-        control->RefreshControl();
-    }
-
-}
-
-EXPORT_C  void CMMAPlayer::AddStateListenerL(MMMAPlayerStateListener* aListener)
-{
-	LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::AddStateListenerL +");
-	TInt err = iStateListeners.Append(aListener);
-	LOG1( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::AddStateListenerL - err = %d ",err);
-		User::LeaveIfError(err);
-    //User::LeaveIfError(iStateListeners.Append(aListener));
-
-}
-
-EXPORT_C void CMMAPlayer::RemoveStateListener(MMMAPlayerStateListener* aListener)
-{
-
-    TInt index = iStateListeners.Find(aListener);
-
-    if (index != KErrNotFound)
-    {
-        iStateListeners.Remove(index);
-    }
-
-}
-
-const TDesC& CMMAPlayer::Type()
-{
-    // by default player has not the type
-    return KNullDesC;
-}
-
-void CMMAPlayer::SetContentType(HBufC* aContentType)
-{
-
-    delete iContentType;
-    iContentType = aContentType;
-
-}
-
-void CMMAPlayer::ResetSourceStreams()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ResetSourceStreams +");
-    int sourceStreamsCount = iSourceStreams.Count();
-    for (int i = 0; i < sourceStreamsCount; i++)
-    {
-        iSourceStreams[ i ]->ResetData();
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ResetSourceStreams -");
-}
-
-EXPORT_C void CMMAPlayer::AddControlL(CMMAControl* aControl)
-{
-
-    User::LeaveIfError(iControls.Append(aControl));
-
-}
-
-void CMMAPlayer::PostLongEvent(CMMAPlayerEvent::TEventType aEventType,
-                               const TInt64& aLongEventData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostLongEvent ");
-    if (!iListenerObject || !iEventPoster)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostLongEvent No listener");
-        // return since player is not ready for posting any events and is not initialized
-        return;
-    }
-
-    CMMAPlayerEvent* playerEvent = new CMMAPlayerEvent(iListenerObject,
-            iPostLongEvent);
-    if (!playerEvent)
-    {
-        // creation of player event failed, informing Java
-        iEventPoster->PostEvent(iOOMErrorEvent);
-        return;
-    }
-    playerEvent->SetLongEvent(aEventType, aLongEventData);
-
-    // event poster takes ownership of event
-    iEventPoster->PostEvent(playerEvent);
-}
-
-
-EXPORT_C void CMMAPlayer::PostStringEvent(CMMAPlayerEvent::TEventType aEventType,
-        const TDesC& aStringEventData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostStringEvent ");
-    if (!iListenerObject || !iEventPoster)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostStringEvent No listener");
-        // return since player is not ready for posting any events and is not initialized
-        return;
-    }
-
-    CMMAPlayerEvent* playerEvent = new CMMAPlayerEvent(iListenerObject,
-            iPostStringEvent);
-    if (!playerEvent)
-    {
-        // creation of player event failed, informing Java
-        iEventPoster->PostEvent(iOOMErrorEvent);
-        return;
-    }
-
-    TRAPD(err, playerEvent->SetStringEventL(aEventType, aStringEventData));
-    if (err != KErrNone)
-    {
-        // string setting failed, informing Java
-        iEventPoster->PostEvent(iOOMErrorEvent);
-        return;
-    }
-
-    // event poster takes ownership of event
-    iEventPoster->PostEvent(playerEvent);
-}
-
-
-EXPORT_C void CMMAPlayer::PostObjectEvent(CMMAPlayerEvent::TEventType aEventType,
-        const jobject aEventData)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostObjectEvent ");
-
-    if (!iListenerObject || !iEventPoster)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostObjectEvent No listener");
-        // return since player is not ready for posting any events and is not initialized
-        return;
-    }
-
-    CMMAPlayerEvent* playerEvent = new CMMAPlayerEvent(iListenerObject,
-            iPostObjectEvent);
-
-    if (!playerEvent)
-    {
-        // creation of player event failed, informing Java
-        iEventPoster->PostEvent(iOOMErrorEvent);
-        return;
-    }
-
-    TRAPD(err, playerEvent->SetObjectEventL(aEventType, aEventData));
-    if (err != KErrNone)
-    {
-        // creation of player event failed, informing Java
-        iEventPoster->PostEvent(iOOMErrorEvent);
-        return;
-    }
-
-    // event poster takes ownership of event
-    iEventPoster->PostEvent(playerEvent);
-}
-
-EXPORT_C CMMASourceStream* CMMAPlayer::AddSourceStreamL(JNIEnv* aJNIEnv,
-        MMAFunctionServer* aEventSource,
-        jobject aReader)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::AddSourceStreamL ");
-    CMMASourceStream* sourceStream = CMMASourceStream::NewL(aJNIEnv,
-                                     aEventSource,
-                                     aReader,
-                                     this);
-
-    CleanupStack::PushL(sourceStream);
-    User::LeaveIfError(iSourceStreams.Append(sourceStream));
-    CleanupStack::Pop(); // sourceStream
-    return sourceStream;
-}
-
-
-void CMMAPlayer::PostActionCompleted(TInt aError)
-{
-	LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostActionCompleted ");
-    iActionCompletedEvent->SetEventData(aError);
-    iEventPoster->PostEvent(iActionCompletedEvent,
-                            CMMAEvent::ENotifyPriority);
-}
-
-void CMMAPlayer::PostActionCompletedFile()
-{
-	LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostActionCompleted ");
-   // iActionCompletedFileEvent->SetEventData(aError);
-    iEventPoster->PostEvent(iActionCompletedFileEvent,
-                            CMMAEvent::ENotifyPriority);
-}
-
-
-void CMMAPlayer::PostActionCompletedStart()
-{
-	   LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::PostActionCompleted ");
-    iEventPoster->PostEvent(iActionCompletedStartEvent,
-                            CMMAEvent::ENotifyPriority);
-}
-
-void CMMAPlayer::ChangeState(TPlayerState aState)
-{
-    iState = aState;
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ChangeState - iStateListeners count is %d", iStateListeners.Count());
-    for (TInt i(0); i<iStateListeners.Count(); i++)
-    {
-        iStateListeners[ i ]->StateChanged(aState);
-    }
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ChangeState - State changed to %d", iState);
-}
-
-void CMMAPlayer::ReadCompletedL(TInt /*aStatus*/, const TDesC8& /*aData*/)
-{
-    // empty implementation
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAPlayer::ReadCompletedL ");
-}
-void CMMAPlayer:: DeleteControls()
-{
-    if (iControls.Count() > 0)
-    {
-        iControls.ResetAndDestroy();
-    }
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaplayerevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaplayerevent.h"
-#include "mmapiutils.h"
-#include "s60commonutils.h"
-using namespace java::util;
-
-
-CMMAPlayerEvent::CMMAPlayerEvent(jobject aNotifyObject,
-                                 jmethodID aHandleEventMethod,
-                                 TDisposability aDisposable):
-        CMMAEvent(aNotifyObject, aHandleEventMethod, aDisposable)
-{
-}
-
-CMMAPlayerEvent::~CMMAPlayerEvent()
-{
-    //delete iStringEventType;
-    delete iStringEventData;
-}
-
-void CMMAPlayerEvent::SetObjectEventL(TEventType aEventType,
-                                      const jobject aEventData)
-{
-    iEventType = aEventType;
-    iObjectEventData = aEventData;
-    iEventParams = EObject;
-}
-
-void CMMAPlayerEvent::SetLongEvent(TEventType aEventType,
-                                   const TInt64& aEventData)
-{
-    iEventType = aEventType;
-    iLongEventData = aEventData;
-    iEventParams = ELong;
-}
-
-void CMMAPlayerEvent::SetStringEventL(TEventType aEventType,
-                                      const TDesC& aEventData)
-{
-  //  __ASSERT_DEBUG(iStringEventData == NULL, User::Invariant());
-    iEventType = aEventType;
-    iStringEventData = aEventData.AllocL();
-    iEventParams = EString;
-}
-
-void CMMAPlayerEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAPlayerEvent::Dispatch type=%d", iEventType);
-    if (aJni.IsSameObject(iListenerObject, 0))
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA::CMMAPlayerEvent::Dispatch EVENT_NOT_VALID type=%d", iEventType);
-        return;
-    }
-    switch (iEventParams)
-    {
-    case ENormal:
-    {
-        jstring javaString = S60CommonUtils::NativeToJavaString(aJni, *iStringEventType);
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            javaString,
-                            iObjectEventData);
-        break;
-    }
-    case ELong:
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iEventType,
-                            iLongEventData);
-        break;
-    }
-    case EString:
-    {
-        jstring javaString = S60CommonUtils::NativeToJavaString(aJni, *iStringEventData);
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iEventType,
-                            javaString);
-        break;
-    }
-    case EObject:
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iEventType,
-                            iObjectEventData);
-        break;
-    }
-    default:
-    {
-        // cannot occur
-        __ASSERT_DEBUG(EFalse, User::Invariant());
-    }
-    }
-
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaplayerproperties.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,381 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for storing and parsing properties
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "cmmaplayerproperties.h"
-
-const TInt KPropertyNameEndChar = '=';
-const TInt KPropertyEndChar = '&';
-const TInt KDefaultGranularity = 8;
-
-CMMAPlayerProperties* CMMAPlayerProperties::NewL(const TDesC& aProperties,
-        MMMAParameterRule& aRule)
-{
-    CMMAPlayerProperties* props = new(ELeave) CMMAPlayerProperties(aProperties, aRule);
-    return props;
-}
-
-CMMAPlayerProperties::~CMMAPlayerProperties()
-{
-}
-
-
-CMMAPlayerProperties::CMMAPlayerProperties(const TDesC& aProperties, MMMAParameterRule& aRule) :
-        iProperties(aProperties),
-        iRule(aRule)
-{
-}
-
-TBool CMMAPlayerProperties::GetProperty(const TDesC& aKey,
-                                        TInt& aValue) const
-{
-    return iRule.FindProperty(aKey, aValue);
-}
-
-TBool CMMAPlayerProperties::GetProperty(const TDesC& aKey, TPtrC& aValue) const
-{
-    return iRule.FindProperty(aKey, aValue);
-}
-
-TBool CMMAPlayerProperties::Compare(const TDesC& aKey, const TDesC& aValue) const
-{
-    return iRule.Compare(aKey, aValue);
-}
-
-TBool CMMAPlayerProperties::Compare(const TDesC& aKey, const TInt& aValue) const
-{
-    return iRule.Compare(aKey, aValue);
-}
-
-// Parse property values: "key=value&key2=value2&..."
-void CMMAPlayerProperties::ValidateL() const
-{
-    // Empty properties are valid
-    if (iProperties.Length() == 0)
-    {
-        return;
-    }
-    TInt pos = 0;
-    while (pos != KErrNotFound)
-    {
-        // Getting everything from 'pos' to end and finding '&'
-        TPtrC property = iProperties.Mid(pos);
-        TInt valueEndPos = property.Locate(KPropertyEndChar);
-
-        if (valueEndPos != KErrNotFound)
-        {
-            // This is not last property, clipping remaining chars
-            property.Set(iProperties.Mid(pos, valueEndPos));
-        }
-
-        TInt keyEndPos = property.Locate(KPropertyNameEndChar);
-        // if we are getting KErrNotFound then properties is not valid
-        if (keyEndPos == KErrNotFound)
-        {
-            User::Leave(KErrArgument);
-        }
-
-        // "key=value"
-        TPtrC propertyKey(property.Left(keyEndPos));
-        TPtrC propertyValue(property.Mid(keyEndPos + 1));
-
-        // check is the pair valid, leave if not
-        // check also that this key was expected, leave if not
-        TPtrC tmp;
-        TInt tmpInt;
-        if (!iRule.ValidateAndStoreL(propertyKey, propertyValue) ||
-                !(iRule.FindProperty(propertyKey, tmp) ||
-                  iRule.FindProperty(propertyKey, tmpInt)))
-        {
-            User::Leave(KErrArgument);
-        }
-
-        // prepare for next token or mark end
-        if (valueEndPos != KErrNotFound)
-        {
-            pos += valueEndPos + 1;
-        }
-        else
-        {
-            pos = valueEndPos;
-        }
-    }
-}
-
-
-CMMAParameterRuleSet* CMMAParameterRuleSet::NewLC()
-{
-    CMMAParameterRuleSet* self = new(ELeave)CMMAParameterRuleSet();
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-CMMAParameterRuleSet::~CMMAParameterRuleSet()
-{
-    if (iRules)
-    {
-        iRules->Reset();
-        delete iRules;
-    }
-}
-
-CMMAParameterRuleSet::CMMAParameterRuleSet()
-{
-}
-
-void CMMAParameterRuleSet::ConstructL()
-{
-    iRules = new(ELeave)CArrayPtrSeg< MMMAParameterRule >(KDefaultGranularity);
-}
-
-#define LOOPUNTILRULE( endRule ) \
-    TInt rules = iRules->Count(); \
-    TInt i( 0 ); \
-    while( ( i < rules ) && \
-           endRule ) \
-        { \
-        i++; \
-        }
-
-TBool CMMAParameterRuleSet::ValidateAndStoreL(const TDesC& aKey, const TDesC& aValue)
-{
-    LOOPUNTILRULE(iRules->At(i)->ValidateAndStoreL(aKey, aValue));
-    // if loop has ended before end then some validation has failed.
-    return (i == rules);
-}
-
-TBool CMMAParameterRuleSet::Compare(const TDesC& aKey, const TDesC& aValue)
-{
-    LOOPUNTILRULE(!iRules->At(i)->Compare(aKey, aValue));
-    // if loop has ended before end then key-value pair has been found
-    return (i != rules);
-}
-
-TBool CMMAParameterRuleSet::Compare(const TDesC& aKey, const TInt aValue)
-{
-    LOOPUNTILRULE(!iRules->At(i)->Compare(aKey, aValue));
-    // if loop has ended before end then key-value pair has been found
-    return (i != rules);
-}
-
-TBool CMMAParameterRuleSet::FindProperty(const TDesC& aKey, TPtrC& aValue)
-{
-    LOOPUNTILRULE(!iRules->At(i)->FindProperty(aKey, aValue));
-    // if loop has ended before end then key has been found
-    return (i != rules);
-}
-
-TBool CMMAParameterRuleSet::FindProperty(const TDesC& aKey, TInt& aValue)
-{
-    LOOPUNTILRULE(!iRules->At(i)->FindProperty(aKey, aValue));
-    // if loop has ended before end then key has been found
-    return (i != rules);
-}
-
-void CMMAParameterRuleSet::AppendRuleL(MMMAParameterRule* aRule)
-{
-    iRules->AppendL(aRule);
-}
-
-TMMAParameterRuleBase::TMMAParameterRuleBase(const TDesC& aKey) :
-        iKey(aKey),
-        iAssigned(EFalse)
-{}
-
-TBool TMMAParameterRuleBase::ValidateAndStoreL(const TDesC& aKey, const TDesC& aValue)
-{
-    if ((aKey.Length() == 0) ||
-            (aValue.Length() == 0))
-    {
-        // key or value length is zero, fail
-        User::Leave(KErrArgument);
-    }
-
-    TBool isValid = ETrue;
-    // this is same key as in rule
-    if (iKey.Compare(aKey) == 0)
-    {
-        //if this key is already assigned then there is same key more than once
-        if (iAssigned)
-        {
-            User::Leave(KErrArgument);
-        }
-        isValid = ValidateValueL(aValue);
-
-        // if it was valid we mark this key as assigned
-        if (isValid)
-        {
-            iAssigned = ETrue;
-        }
-    }
-    return isValid;
-}
-
-TBool TMMAParameterRuleBase::Compare(const TDesC& /*aKey*/, const TDesC& /*aValue*/)
-{
-    // by default we do not found this key
-    return EFalse;
-}
-
-TBool TMMAParameterRuleBase::Compare(const TDesC& /*aKey*/, const TInt /*aValue*/)
-{
-    // by default we do not found this key
-    return EFalse;
-}
-
-TBool TMMAParameterRuleBase::FindProperty(const TDesC& /*aKey*/, TPtrC& /*aValue*/)
-{
-    // by default we do not found this key
-    return EFalse;
-}
-
-TBool TMMAParameterRuleBase::FindProperty(const TDesC& /*aKey*/, TInt& /*aValue*/)
-{
-    // by default we do not found this key
-    return EFalse;
-}
-
-TMMAParameterRuleInt::TMMAParameterRuleInt(const TDesC& aKey) :
-        TMMAParameterRuleBase(aKey),
-        iUpperLimit(KMaxTInt),
-        iLowerLimit(KMinTInt)
-{}
-
-TMMAParameterRuleInt::TMMAParameterRuleInt(const TDesC& aKey,
-        const TInt aLowerLimit) :
-        TMMAParameterRuleBase(aKey),
-        iUpperLimit(KMaxTInt),
-        iLowerLimit(aLowerLimit)
-{}
-
-TMMAParameterRuleInt::TMMAParameterRuleInt(const TDesC& aKey,
-        const TInt aLowerLimit,
-        const TInt aUpperLimit) :
-        TMMAParameterRuleBase(aKey),
-        iUpperLimit(aUpperLimit),
-        iLowerLimit(aLowerLimit)
-{}
-
-TBool TMMAParameterRuleInt::ValidateValueL(const TDesC& aValue)
-{
-    TLex lex(aValue);
-    TInt valueInt = 0;
-    if ((lex.Val(valueInt) != KErrNone) ||
-            !lex.Eos())
-    {
-        User::Leave(KErrArgument);
-    }
-    if ((valueInt < iLowerLimit) ||
-            (valueInt > iUpperLimit))
-    {
-        // value is not valid
-        return EFalse;
-    }
-    else
-    {
-        // value is valid, store it
-        iValue = valueInt;
-        return ETrue;
-    }
-}
-
-TBool TMMAParameterRuleInt::Compare(const TDesC& aKey, const TInt aValue)
-{
-    TBool match = EFalse;
-    if (iAssigned &&
-            (iKey.Compare(aKey) == 0) &&
-            (aValue == iValue))
-    {
-        match = ETrue;
-    }
-    return match;
-}
-
-TBool TMMAParameterRuleInt::FindProperty(const TDesC& aKey, TInt& aValue)
-{
-    TBool match = EFalse;
-    if (iAssigned &&
-            iKey.Compare(aKey) == 0)
-    {
-        aValue = iValue;
-        match = ETrue;
-    }
-    return match;
-}
-
-TMMAParameterRuleDes::TMMAParameterRuleDes(const TDesC& aKey) :
-        TMMAParameterRuleBase(aKey),
-        iValidValues(NULL),
-        iArraySize(0)
-{}
-
-TMMAParameterRuleDes::TMMAParameterRuleDes(const TDesC& aKey,
-        const TMMAStaticStrArray* aValidValues,
-        const TInt aArraySize) :
-        TMMAParameterRuleBase(aKey),
-        iValidValues(aValidValues),
-        iArraySize(aArraySize)
-{}
-
-TBool TMMAParameterRuleDes::ValidateValueL(const TDesC& aValue)
-{
-    TInt i = 0;
-    while ((i < iArraySize) &&
-            aValue.Compare(iValidValues[i]()) != 0)
-    {
-        i++;
-    }
-    // if there is not valid values then we treat every value as valid
-    if (iValidValues &&
-            (i == iArraySize))
-    {
-        // there was no hit
-        return EFalse;
-    }
-
-    // find match or every value is valid, storing
-    iValue.Set(aValue);
-    return ETrue;
-}
-
-TBool TMMAParameterRuleDes::Compare(const TDesC& aKey, const TDesC& aValue)
-{
-    TBool match = EFalse;
-    if (iAssigned &&
-            (iKey.Compare(aKey) == 0) &&
-            (iValue.Compare(aValue) == 0))
-    {
-        match = ETrue;
-    }
-    return match;
-}
-
-TBool TMMAParameterRuleDes::FindProperty(const TDesC& aKey, TPtrC& aValue)
-{
-    TBool match = EFalse;
-    if (iAssigned &&
-            iKey.Compare(aKey) == 0)
-    {
-        aValue.Set(iValue);
-        match = ETrue;
-    }
-    return match;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmaratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements generic RateControl functionality.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-
-#include "cmmaratecontrol.h"
-
-CMMARateControl::CMMARateControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARateControl::CMMARateControl");
-}
-
-CMMARateControl::~CMMARateControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARateControl::~CMMARateControl");
-}
-
-const TDesC& CMMARateControl::ClassName() const
-{
-    return KMMARateControlName;
-}
-
-TInt CMMARateControl::MaxRateL()
-{
-    return KMMADefaultRate;
-}
-
-TInt CMMARateControl::MinRateL()
-{
-    return KMMAMinRate;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmarecordcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a RecordControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include "cmmarecordcontrol.h"
-#include "cmmaplayer.h"
-
-
-_LIT(KControlName, "RecordControl");
-
-CMMARecordControl::CMMARecordControl(CMMAPlayer* aPlayer):
-        iState(ERecordUninitialized),
-        iPlayer(aPlayer),
-        iStartTime(0)
-{
-}
-
-
-CMMARecordControl::~CMMARecordControl()
-{
-    iRecordPauseTimer.Cancel();
-    iRecordPauseTimer.Close();
-
-    if (iPlayer)
-    {
-        iPlayer->RemoveStateListener(this);
-    }
-
-    delete iOutputStream;
-
-    iFile.Close();
-    iFs.Delete(iFilename);
-    iFs.Close();
-}
-
-void CMMARecordControl::WaitForPauseL(const TInt64& aMediaTime)
-{
-    // reusing time variable
-    TInt64 time = iStartTime - aMediaTime + KMinRecordPauseInterval;
-    iStartTime = 0;
-    LOG1( EJavaMMAPI, EInfo, "CMMARecordControl::WaitForPauseL wait time = %d", (TInt)time);
-    // if time > 0, time between record and pause is smaller than
-    // KMinRecordPauseInterval and we have to wait.
-    if (time > 0)
-    {
-        TRequestStatus status;
-        iRecordPauseTimer.Cancel();
-        iRecordPauseTimer.After(status, I64INT(time));
-        User::WaitForRequest(status);
-        // Status ignored because recording must be stopped.
-    }
-}
-
-void CMMARecordControl::ConstructL()
-{
-    User::LeaveIfError(iRecordPauseTimer.CreateLocal());
-
-    User::LeaveIfError(iFs.Connect());
-
-    // create temporary file for recording
-    User::LeaveIfError(iFile.Temp(iFs,
-                                  KMMARecordTempDirectory,
-                                  iFilename,
-                                  EFileRead | EFileWrite | EFileShareAny));
-
-    iPlayer->AddStateListenerL(this);
-}
-
-void CMMARecordControl::StartRecordL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::StartRecordL+");
-
-    // Initialize needs to be done only once after setRecordLocation or
-    // setRecordStream and before commit or reset. Although startRecord can be
-    // called several times in the process, the initialization must happen
-    // only in the first call to startRecord
-    if (iState == ERecordUninitialized)
-    {
-        InitializeL();
-    }
-
-    iState = ERecordStandBy;
-    // calling next state if player is already started
-    NextStateL(iPlayer->State());
-
-    iPlayer->GetMediaTime(&iStartTime);
-    iPlayer->PostLongEvent(CMMAPlayerEvent::ERecordStarted, iStartTime);
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::StartRecordL-");
-}
-
-
-void CMMARecordControl::StopRecordL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::StopRecordL+");
-    if (iState == ERecordRecording)
-    {
-        NextStateL(iPlayer->State());
-    }
-
-    iState = ERecordInitialized;
-
-    // ask mediatime again for more accurate value
-    TInt64 time;
-    iPlayer->GetMediaTime(&time);
-    iPlayer->PostLongEvent(CMMAPlayerEvent::ERecordStopped, time);
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::StopRecordL-");
-}
-
-
-void CMMARecordControl::CommitL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::CommitL+");
-    // reset the recorder if already initialized
-    if (iState > ERecordUninitialized)
-    {
-        DoResetL();
-    }
-    else
-    {
-        // not even initialized yet, just inform java
-        iOutputStream->WriteL(KNullDesC8);
-        return;
-    }
-    iState = ERecordUninitialized;
-
-    // Create buffer for file context
-    TInt fileSize;
-    User::LeaveIfError(iFile.Size(fileSize));
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::CommitL size in bytes = %d", fileSize);
-
-    HBufC8* data = HBufC8::NewLC(fileSize);
-
-    // Read file context
-    TPtr8 dataPtr = data->Des();
-    TInt pos(0);
-    User::LeaveIfError(iFile.Seek(ESeekStart, pos));
-    User::LeaveIfError(iFile.Read(dataPtr));
-    User::LeaveIfError(iFile.SetSize(0));
-    User::LeaveIfError(iFile.Flush());
-
-    // Write whole video data to stream
-    iOutputStream->WriteL(dataPtr);
-    CleanupStack::PopAndDestroy(data);
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::CommitL-");
-}
-
-
-void CMMARecordControl::ResetL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::ResetL+");
-    // reset the recorder if already initialized
-    if (iState > ERecordUninitialized)
-    {
-        DoResetL();
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::DoResetL done");
-        iState = ERecordUninitialized;
-
-        // Empty file that it can be reused
-        User::LeaveIfError(iFile.SetSize(0));
-        User::LeaveIfError(iFile.Flush());
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::ResetL-");
-}
-
-void CMMARecordControl::SetRecordStream(CMMAOutputStream* aStream)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::SetRecordStream");
-    __ASSERT_DEBUG(aStream, User::Panic(
-                       _L("CMMAVideoRecordControl:: Stream is NULL."),
-                       KErrArgument));
-    delete iOutputStream;
-    iOutputStream = aStream;
-}
-
-
-HBufC* CMMARecordControl::GetContentTypeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::GetContentTypeL");
-    return iPlayer->ContentType();
-}
-
-const TDesC& CMMARecordControl::ClassName() const
-{
-    return KControlName;
-}
-
-void CMMARecordControl::StateChanged(TInt aState)
-{
-    TRAPD(err, NextStateL(aState));
-    if (err)
-    {
-        Error(err);
-    }
-}
-
-void CMMARecordControl::Error(TInt aErrorCode)
-{
-    ELOG1( EJavaMMAPI, "MMA:CMMARecordControl::Error %d", aErrorCode);
-    TBuf<KRecordErrorMessageSize> errorMessage;
-    errorMessage.Format(KMMARecordErrorMsg, aErrorCode);
-    iPlayer->PostStringEvent(CMMAPlayerEvent::ERecordError,
-                             errorMessage);
-}
-
-void CMMARecordControl::HandleRecordSizeLimit()
-{
-    // commit the stream
-    iOutputStream->Commit();
-    TInt64 time;
-    iPlayer->GetMediaTime(&time);
-    iPlayer->PostLongEvent(CMMAPlayerEvent::ERecordStopped, time);
-}
-
-void CMMARecordControl::NextStateL(TInt aPlayerState)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL Player state = %d", aPlayerState);
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL internal state = %d", iState);
-    switch (iState)
-    {
-    case ERecordUninitialized:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: case ERecordUninitialized");
-        // This is the initial state.
-        // To getinto this state, commit or reset must be called
-        // To get out of this state startRecord must be called
-
-        break;
-    }
-    case ERecordInitialized:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: case ERecordInitialized");
-        // To get into this state stopRecord must be called.
-        // To get out of this state startRecord, commit or reset must be
-        // called
-        break;
-    }
-    case ERecordStandBy:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: case ERecordStandBy");
-        // To get into this state startRecord must be called.
-        // To get out of this state stopRecord, commit or reset must be
-        // called, or state of the Player must change to STARTED
-
-
-        // start the actual recording if player is started
-        if (aPlayerState == CMMAPlayer::EStarted)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: ERecordStandBy -> ERecordRecording");
-            DoStartRecordL();
-            iState = ERecordRecording;
-        }
-        break;
-    }
-    case ERecordRecording:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: case ERecordRecording");
-
-        // To get into this state startRecord must have been called and
-        // the Player must be in STARTED state.
-        // To get out of this state, stopRecord, commit or reset must be
-        // called or the Player must change to a state other than STARTED
-        TInt64 time;
-        iPlayer->GetMediaTime(&time);
-        WaitForPauseL(time);
-        DoStopRecordL();
-        iState = ERecordStandBy;
-        break;
-    }
-    default:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMARecordControl::NextStateL: case default - code should not reach here!!");
-        __ASSERT_DEBUG(KErrGeneral, User::Invariant());   // This will newer occur
-        break;
-    }
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmasnapshot.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class takes snapshot and resizes bitmap if needed.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmasnapshot.h"
-#include "mmmaguiplayer.h"
-#include "mmmasnapshotreadycallback.h"
-#include "mmmasnapshot.h"
-
-// CONSTANTS
-const TInt KIgnoreSize = -1;
-
-
-// CONSTRUCTION
-CMMASnapshot* CMMASnapshot::NewL(MMMAGuiPlayer* aGuiPlayer,
-                                 MMMASnapshotReadyCallback& aCallBack)
-{
-    CMMASnapshot* self = new(ELeave) CMMASnapshot(aGuiPlayer,
-            aCallBack);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(); // self
-    return self;
-}
-
-CMMASnapshot::~CMMASnapshot()
-{
-    if (iScaler)
-    {
-        iScaler->Cancel();
-        delete iScaler;
-    }
-    if (iEncoder)
-    {
-        iEncoder->Cancel();
-        delete iEncoder;
-    }
-    delete iBitmap;
-    delete iBuffer;
-    delete iSettings;
-}
-
-void CMMASnapshot::ConstructL()
-{
-    CActiveScheduler::Add(this);
-    iScaler = CBitmapScaler::NewL();
-}
-
-CMMASnapshot::CMMASnapshot(MMMAGuiPlayer* aGuiPlayer,
-                           MMMASnapshotReadyCallback& aCallBack):
-        CActive(EPriorityStandard),
-        iEncoding(MMMASnapshot::EBitmap),
-        iCallBack(aCallBack),
-        iState(EIdle)
-{
-    iGUIPlayer = aGuiPlayer;
-}
-
-void CMMASnapshot::TakeSnapShotL(const TDesC& aProperties)
-{
-    // snapshot sequence is not finished
-    __ASSERT_DEBUG(iState == EIdle, User::Invariant());
-    // image buffer must be taken with ImageBuffer before taking new snapshot
-    __ASSERT_DEBUG(iBuffer == NULL, User::Invariant());
-
-    CMMAImageSettings* settings
-    = TMMAParameterValidator::ValidateImagePropertiesL(aProperties);
-    CleanupStack::PushL(settings);
-
-    delete iSettings;
-    CleanupStack::Pop(settings);
-    iSettings = settings;
-
-    // take snapshot from player. RunL is called when image is ready
-    // or error occures
-    iState = ETakingSnapshot;
-    TSize snapshotSize(iSettings->iWidth, iSettings->iHeight);
-    iEncoding = iGUIPlayer->SnapshoterL()->TakeSnapshotL(&iStatus,
-                snapshotSize,
-                *iSettings);
-    SetActive();
-}
-
-HBufC8* CMMASnapshot::ImageBuffer()
-{
-    // this must not be called when snapshot sequence is running
-    __ASSERT_DEBUG(iState == EIdle, User::Invariant());
-    HBufC8* buffer = iBuffer;
-    // caller takes ownership of the buffer
-    iBuffer = NULL;
-    return buffer;
-}
-
-void CMMASnapshot::ResizeL()
-{
-    iState = EResizing;
-    TSize imageSize(iBitmap->SizeInPixels());
-    if (iSettings->iWidth != KIgnoreSize)
-    {
-        imageSize.iWidth = iSettings->iWidth;
-    }
-    if (iSettings->iHeight != KIgnoreSize)
-    {
-        imageSize.iHeight = iSettings->iHeight;
-    }
-    if (imageSize == iBitmap->SizeInPixels())
-    {
-        // no user resizing needed, continue sequence
-        EncodeL();
-    }
-    else
-    {
-        iScaler->Scale(&iStatus, *iBitmap, imageSize, EFalse);
-        SetActive();
-    }
-}
-
-void CMMASnapshot::EncodeL()
-{
-    // CImageEncoder cannot be reused, so have to make it every time
-    CImageEncoder* encoder = CImageEncoder::DataNewL(iBuffer, *iSettings->iMimeType);
-    delete iEncoder;
-    iEncoder = encoder;
-
-    iState = EEncoding;
-    iEncoder->Convert(&iStatus, *iBitmap, iSettings->iImageData);
-    SetActive();
-}
-
-void CMMASnapshot::Completed(TInt aError)
-{
-    iStatus = aError;
-    iCallBack.SnapshotReady();
-}
-
-void CMMASnapshot::RunL()
-{
-    if (iStatus != KErrNone)
-    {
-        // Error has occured, inform java side and change state
-        iState = EIdle;
-        Completed(iStatus.Int());
-        return;
-    }
-
-    switch (iState)
-    {
-    case ETakingSnapshot:
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA::CMMASnapshot::RunL: iEncoding = %d", iEncoding);
-        if (iEncoding == MMMASnapshot::EEncoded)
-        {
-            // take encoded image from player.
-            // Ownership transfers to this class.
-            iBuffer = iGUIPlayer->SnapshoterL()->SnapshotEncoded();
-            if (!iBuffer)
-            {
-                // error has occured with taking image
-                Completed(KErrNotFound);
-            }
-            // Image is ready, update internal state and inform listener
-            // Encoded images are not resized
-            iState = EIdle;
-            Completed(KErrNone);
-        }
-        else
-        {
-            // take bitmap from player.
-            // Ownership transfers to this class.
-            iBitmap = iGUIPlayer->SnapshoterL()->SnapshotBitmap();
-            if (!iBitmap)
-            {
-                // error has occured with taking image
-                Completed(KErrNotFound);
-            }
-            // Continue to next state
-            ResizeL();
-        }
-        break;
-    }
-    case EResizing:
-    {
-        // Continue to next state
-        EncodeL();
-        break;
-    }
-    case EEncoding:
-    {
-        delete iEncoder;
-        iEncoder = NULL;
-
-        delete iBitmap;
-        iBitmap = NULL;
-        iState = EIdle;
-        // encoding is ready, inform listener
-        Completed(KErrNone);
-        break;
-    }
-    default:
-    {
-        // unknown state
-        __ASSERT_DEBUG(EFalse, User::Invariant());
-    }
-    }
-}
-
-TInt CMMASnapshot::RunError(TInt aError)
-{
-    // Reset state
-    iState = EIdle;
-    // Pass error code to observer
-    Completed(aError);
-
-    return KErrNone;
-}
-
-void CMMASnapshot::DoCancel()
-{
-    // snapshot taking cannot be cancelled
-    if (iScaler)
-    {
-        iScaler->Cancel();
-    }
-    if (iEncoder)
-    {
-        iEncoder->Cancel();
-    }
-    iState = EIdle;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmasnapshotevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmasnapshotevent.h"
-#include "mmapiutils.h"
-
-CMMASnapshotEvent::CMMASnapshotEvent(jobject aNotifyObject,
-                                     jmethodID aHandleEventMethod,
-                                     TInt aError,
-                                     HBufC8* aImageBuffer,
-                                     TDisposability aDisposable):
-        CMMAEvent(aNotifyObject,
-                  aHandleEventMethod,
-                  aDisposable)
-{
-    iEventData = aError;
-    iImageBuffer = aImageBuffer;
-}
-
-CMMASnapshotEvent::~CMMASnapshotEvent()
-{
-    // image buffer need to be deleted if
-    // event server hasn't sent this event before
-    // middlet is destroyed
-    delete iImageBuffer;
-}
-
-void CMMASnapshotEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMASnapshotEvent::Dispatch");
-
-    // create java byte array
-    jbyteArray byteArray;
-    if (iImageBuffer)
-    {
-        byteArray = aJni.NewByteArray(iImageBuffer->Size());
-        if (byteArray)
-        {
-            MMAPIUtils::CopyToJava(aJni,
-                                   *iImageBuffer,
-                                   byteArray,
-                                   0,
-                                   iImageBuffer->Size());
-        }
-    }
-    else
-    {
-        byteArray = aJni.NewByteArray(0);
-    }
-
-    if (!byteArray)
-    {
-        delete iImageBuffer;
-        iImageBuffer = NULL; // otherwise double delete in destructor
-
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMASnapshotEvent::Dispatch - Failed to create ByteArray");
-        return;
-    }
-
-
-    aJni.CallVoidMethod(iListenerObject,
-                        iHandleEventMethod,
-                        iEventData,
-                        byteArray);
-
-    delete iImageBuffer;
-    iImageBuffer = NULL; // otherwise double delete in destructor
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmasourcestream.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class for reading data from Java SourceStream to native side
-*
-*/
-
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-#include "mmafunctionserver.h"
-#include "cmmasourcestream.h"
-#include "cmmasourcestreamevent.h"
-#include "mmmasourcestreamlistener.h"
-
-const TInt KBufferSize = 4096; // data is read from java in 4k pieces
-
-// CONSTRUCTION
-CMMASourceStream* CMMASourceStream::NewL(JNIEnv* aJNIEnv,
-        MMMAEventPoster* aEventPoster,
-        jobject aJavaSourceStream,
-        MMMASourceStreamListener* aListener
-                                        )
-{
-    CMMASourceStream* self = CMMASourceStream::NewLC(aJNIEnv,
-                             aEventPoster,
-                             aJavaSourceStream,
-                             aListener);
-    CleanupStack::Pop();
-    return self;
-}
-
-
-CMMASourceStream* CMMASourceStream::NewLC(JNIEnv* aJNIEnv,
-        MMMAEventPoster* aEventPoster,
-        jobject aJavaSourceStream,
-        MMMASourceStreamListener* aListener
-                                         )
-{
-    CMMASourceStream* self = new(ELeave) CMMASourceStream(aEventPoster,
-            aListener);
-    CleanupStack::PushL(self);
-    self->ConstructL(aJNIEnv, aJavaSourceStream);
-    return self;
-}
-
-
-CMMASourceStream::~CMMASourceStream()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMASourceStream::~");
-    delete iData;
-    delete iReadEvent;
-}
-
-
-// Default constructor
-CMMASourceStream::CMMASourceStream(MMMAEventPoster* aEventPoster,
-                                   MMMASourceStreamListener* aListener)
-        : iEventPoster(aEventPoster), iListener(aListener)
-{
-}
-
-
-void CMMASourceStream::ConstructL(JNIEnv* aJNIEnv,
-                                  jobject aJavaSourceStream)
-{
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-    aJNIEnv = iEventPoster->getValidJniEnv();
-    jmethodID classMethodID =
-        aJNIEnv->GetMethodID(aJNIEnv->GetObjectClass(aJavaSourceStream),
-                             "read",
-                             "(II)V");
-    if (!classMethodID)
-    {
-        User::Leave(KErrNoMemory);
-    }
-	LOG( EJavaMMAPI, EInfo, "CMMASourceStream::ConstructL , jmethodId found");  
-	jobject apeer =  aJNIEnv->NewGlobalRef(aJavaSourceStream);  
-    iReadEvent = new(ELeave) CMMASourceStreamEvent(classMethodID,
-            apeer);
-}
-
-
-void CMMASourceStream::WriteL(const TUint8* aData,
-                              TInt aLength,
-                              TInt aState)
-{
-	  LOG1( EJavaMMAPI, EInfo, "MMA::CMMASourceStream::WriteL() %d",aState);
-    if (aState < KErrNone)
-    {
-    	LOG( EJavaMMAPI, EInfo, "MMA::CMMASourceStream::WriteL  : 1");
-        // Inform listener on error case
-        iListener->ReadCompletedL(aState, KNullDesC8());
-        return;
-    }
-
-
-    if ((iData->Size() + aLength) > iData->Des().MaxSize())
-    {
-        // if data doesn't fit, reallocate more
-        HBufC8* reallocated = iData->ReAlloc(iData->Des().MaxSize() + KBufferSize);
-        if (!reallocated)  // realloc failed
-        {
-            // probably too much data read, so freeing used memory
-            delete iData;
-            iData = NULL;
-            iListener->ReadCompletedL(KErrNoMemory, KNullDesC8());
-            return;
-        }
-        iData = reallocated;
-    }
-
-    // java returns length -1 when completed
-    if (aLength > 0)
-    {
-        iData->Des().Append(aData, aLength);
-    }
-
-    TInt currentRead = iData->Size() - iBufferPosition;
-
-    if ((aState == ECompleted) ||
-            (currentRead == iReadLength))
-    {
-        if (iReadLength == KMMAReadAllData)
-        {
-            iListener->ReadCompletedL(aState, *iData);
-        }
-        else
-        {
-            TPtrC8 data = iData->Mid(iBufferPosition, currentRead);
-            iListener->ReadCompletedL(aState, data);
-        }
-    }
-    else
-    {
-        // phase ready, inform the Player
-        if (iReadLength == KMMAReadAllData)
-        {
-            iReadEvent->SetLength(KBufferSize);
-        }
-        else
-        {
-            iReadEvent->SetLength(iReadLength - currentRead);
-        }
-
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMASourceStream::WriteL completed");
-}
-
-void CMMASourceStream::ReadL(TInt aLength)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMASourceStream::ReadL(%d)", aLength);
-
-    __ASSERT_DEBUG(iData != NULL, User::Invariant());
-
-    PrepareReadL();
-
-    iBufferPosition = iData->Size();
-    iReadLength = aLength;
-
-    iReadEvent->SetLength(aLength);
-
-    // data has been requested, note will be sent
-    iEventPoster->PostEvent(iReadEvent, CMMAEvent::ENotifyPriority);
-}
-
-
-void CMMASourceStream::ReadAllL()
-{
-    // not reading again if iData already has data
-    if (iData == NULL)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMASourceStream::ReadAllL: Buffer empty, reading from java");
-        CreateDataBufferL(KBufferSize);
-        ReadL(KMMAReadAllData);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMASourceStream::ReadAllL: Buffer not empty, ->ReadCompleteL");
-        iListener->ReadCompletedL(ECompleted, *iData);
-    }
-}
-
-void CMMASourceStream::PrepareReadL()
-{
-}
-
-void CMMASourceStream::ResetData()
-{
-    delete iData;
-    iData = NULL;
-}
-
-void CMMASourceStream::CreateDataBufferL(TInt aBufferSize)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMASourceStream::CreateDataBufferL +");
-    __ASSERT_DEBUG(iData == NULL, User::Invariant());
-
-    iData = HBufC8::NewL(aBufferSize);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmasourcestreamevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-#include <logger.h>
-
-#include "cmmasourcestreamevent.h"
-
-
-CMMASourceStreamEvent::CMMASourceStreamEvent(
-    jmethodID aHandleEventMethod,
-    jobject aNotifyObject):
-        CMMAEvent(EReusableEvent),
-        iHandleEventMethod(aHandleEventMethod),
-        iListenerObject(aNotifyObject)
-{
-}
-
-
-void CMMASourceStreamEvent::SetLength(TInt aLength)
-{
-    iLength = aLength;
-}
-
-
-
-void CMMASourceStreamEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMASourceStreamEvent:Dispatch len=%d", iLength);
-    aJni.CallVoidMethod(iListenerObject,
-                        iHandleEventMethod,
-                        iLength);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmastoptimecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for stoptime controlling
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32std.h>
-
-#include "cmmastoptimecontrol.h"
-#include "cmmaplayer.h"
-
-
-_LIT(KControlName, "StopTimeControl");
-
-_LIT(KMMAStopTimeControlError, "StopTimeControl Symbian OS error: %d");
-const TInt KMMAStopTimeControlErrorLength = 50;
-
-CMMAStopTimeControl::CStopTimer* CMMAStopTimeControl::CStopTimer::NewL(
-    CMMAStopTimeControl* aControl)
-{
-    CStopTimer* self = new(ELeave) CStopTimer(aControl);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-
-CMMAStopTimeControl::CStopTimer::CStopTimer(CMMAStopTimeControl* aControl)
-        : CTimer(CActive::EPriorityStandard)
-{
-    iControl = aControl;
-}
-
-
-void CMMAStopTimeControl::CStopTimer::ConstructL()
-{
-    CTimer::ConstructL();
-    CActiveScheduler::Add(this);
-}
-
-
-void CMMAStopTimeControl::CStopTimer::RunL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl:CStopTimer:RunL timer triggered");
-    iControl->StopAtTimeL();
-}
-
-const TDesC& CMMAStopTimeControl::ClassName() const
-{
-    return KControlName;
-}
-
-
-CMMAStopTimeControl* CMMAStopTimeControl::NewL(CMMAPlayer* aPlayer)
-{
-    CMMAStopTimeControl* control =
-        new(ELeave) CMMAStopTimeControl(aPlayer);
-    CleanupStack::PushL(control);
-    control->ConstructL();
-    CleanupStack::Pop(); // control
-    return control;
-}
-
-
-CMMAStopTimeControl::~CMMAStopTimeControl()
-{
-    delete iTimer;
-}
-
-
-CMMAStopTimeControl::CMMAStopTimeControl(CMMAPlayer* aPlayer)
-        : iPlayer(aPlayer), iNoTimer((MAKE_TINT64(KMaxTInt, KMaxTUint)))
-{
-    iStopTime = iNoTimer;
-}
-
-
-void CMMAStopTimeControl::ConstructL()
-{
-    iTimer = CStopTimer::NewL(this);
-    iPlayer->AddStateListenerL(this);
-}
-
-
-void CMMAStopTimeControl::StaticGetStopTime(CMMAStopTimeControl* aControl,
-        TInt64* aTime)
-{
-    aControl->GetStopTime(*aTime);
-}
-
-
-void CMMAStopTimeControl::StaticSetStopTimeL(CMMAStopTimeControl* aControl,
-        TInt64* aTime)
-{
-    aControl->SetStopTimeL(*aTime);
-}
-
-
-void CMMAStopTimeControl::StopAtTimeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl::StopAtTime");
-
-    // Stop the player only when it's playing
-    if (iPlayer->State() == CMMAPlayer::EStarted)
-    {
-        TInt64 time;
-        iPlayer->GetMediaTime(&time);
-        if (time >= 0 && time < iStopTime)
-        {
-            LOG1( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl::StopAtTime - Called %dms too early",
-                      I64INT((time - iStopTime)/1000));
-            StartTimer(time);
-            return;
-        }
-
-        TInt64 stopTime;
-
-        // MediaTime is known
-        if (time >= 0)
-        {
-            LOG1( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl::StopAtTime - called %dms late", I64INT((time - iStopTime)/1000));
-            stopTime = time;
-        }
-        else
-        {
-            // Use the requested time
-            stopTime = iStopTime;
-        }
-
-        iPlayer->StopL(EFalse);
-
-        // Inform the player that it's "stopped at time"
-        iPlayer->PostLongEvent(CMMAPlayerEvent::EStoppedAtTime, stopTime);
-
-        iStopTime = iNoTimer; // Timer is reseted
-    }
-}
-
-
-/**
- * Get stop time, in microseconds
- */
-void CMMAStopTimeControl::GetStopTime(TInt64& aTime)
-{
-    aTime = iStopTime;
-}
-
-
-/**
- * Set stop time, in microseconds
- * @param aTime is iNoTimer if the timer should be reseted
- */
-void CMMAStopTimeControl::SetStopTimeL(const TInt64& aTime)
-{
-    iStopTime = aTime;
-
-    if (aTime != iNoTimer)
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl:SetStopTime(%dms)",
-                  I64INT(aTime / 1000));
-
-        if (iPlayer->State() == CMMAPlayer::EStarted)
-        {
-            TInt64 currentTime(0);
-            iPlayer->GetMediaTime(&currentTime);
-
-            StartTimer(currentTime);
-        }
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl:SetStopTime(RESET)");
-
-        iTimer->Cancel();
-    }
-}
-
-
-/*
- * Start timer
- * @param aCurrentTime current position of the player
- */
-void CMMAStopTimeControl::StartTimer(const TInt64& aCurrentTime)
-{
-    // StopTime is defined
-    TInt64 time = iStopTime - aCurrentTime;
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAStopTimeControl:StartTimer timer started; time=%dms",
-              I64INT(time / 1000));
-    iTimer->Cancel();
-
-    if (time >= 0)
-    {
-        // Value is too large to represent with TInt
-        // use the biggest possible value instead
-        if (I64HIGH(time) != 0 || I64INT(time) < 0)
-        {
-            time = KMaxTInt;
-        }
-
-        iTimer->After(TTimeIntervalMicroSeconds32(I64INT(time)));
-    }
-    else
-    {
-        // Stop the player immediatelly
-        TRAPD(err,  StopAtTimeL());
-        if (err != KErrNone)
-        {
-            TBuf< KMMAStopTimeControlErrorLength > errorMsg;
-            errorMsg.Format(KMMAStopTimeControlError, err);
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError,
-                                     errorMsg);
-        }
-    }
-}
-
-
-void CMMAStopTimeControl::StateChanged(TInt aState)
-{
-    switch ((CMMAPlayer::TPlayerState) aState)
-    {
-    case CMMAPlayer::EStarted:
-    {
-        if (iStopTime != iNoTimer)
-        {
-            // (Re)start the timer
-            TInt64 time;
-            iPlayer->GetMediaTime(&time);
-
-            StartTimer(time);
-        }
-        break;
-    }
-    case CMMAPlayer::ERealized:
-    case CMMAPlayer::EPrefetched:
-    case CMMAPlayer::EClosed:
-    {
-        // Player is not running anymore
-        iTimer->Cancel();
-        break;
-    }
-    default:
-    {
-        // other states are ignored
-    }
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideocontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,486 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a VideoControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-//#include <lcdui.h>
-
-#include <JniEnvWrapper.h>
-
-#include "com_nokia_microedition_media_control_VideoControl.h"
-
-#include "cmmavideocontrol.h"
-#include "cmmacameraplayer.h"
-#include "mmmaeventposter.h"
-#include "cmmacanvasdisplay.h"
-#include "cmmaitemdisplay.h"
-#include "cmmasnapshotevent.h"
-#include "mmmaguiplayer.h"
-#include "cmmasnapshot.h"
-#include "mmmadisplaywindow.h"
-#include "cmmaplayerproperties.h"
-#include "cmmadcdisplay.h"
-#include "cmmavideocontrol.h"
-
-_LIT(KControlName, "VideoControl");
-
-EXPORT_C CMMAVideoControl::CMMAVideoControl(MMMAGuiPlayer* aGuiPlayer):
-        CMMAControl()
-{
-    iGuiPlayer = aGuiPlayer;
-    iIsForeground = 1;
-
-    iDisplay = 0;
-}
-
-EXPORT_C CMMAVideoControl::~CMMAVideoControl()
-{
-    delete iDisplay;
-
-    // Event server takes event ownership
-    if (iEventPoster)
-    {
-        if(iDeleteRefEvent)
-        {
-            iEventPoster->PostEvent(iDeleteRefEvent);
-        }
-    }
-    if (iSnapshot)
-    {
-        iSnapshot->Cancel();
-        delete iSnapshot;
-    }
-}
-
-
-void CMMAVideoControl::ConstructL(CMMAVideoControl* aControl,
-                                  jobject aControlObject,
-                                  MMAFunctionServer* aEventSource,
-                                  JNIEnv* aJni,
-                                  MMMAEventPoster* aEventPoster/*,
-                                  CMIDToolkit* aToolkit*/) // mobitv fix // 3.x QT based UI
-{
-
-
-
-
-
-    aControl->iListenerObject = aControlObject;
-    aControl->iJni = aEventSource->getValidJniEnv();
-    aControl->iEventPoster = aEventPoster;
-
-    // snapshot ready method. Created here because jni cannot be used later.
-    aControl->iSnapshotReadyMethod = aJni->GetMethodID(
-                                         aJni->GetObjectClass(aControlObject),
-                                         "snapshotReady",
-                                         "(I[B)V");
-
-    aControl->iSnapshot = CMMASnapshot::NewL(aControl->iGuiPlayer,
-                          *aControl);
-   // aControl->RegisterForegroundListenerL(aToolkit);   // 3.x QT based UI
-}
-/*   // 3.x QT based UI
-// mobitv fix`
-void CMMAVideoControl::RegisterForegroundListenerL(CMIDToolkit* aToolkit)
-{
-    LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListener + ");
-
-    // Initialize IsForeground to true, we might have already missed the event (HandleForegroundL), events before observer registration
-    iIsForeground = ETrue;
-
-
-    iToolkit = aToolkit;
-
-    if (iToolkit)
-    {
-        LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListenerL : iToolkit->Env(); +");
-        iMidEnv = iToolkit->Env();
-        LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListenerL : iToolkit->Env(); -");
-    }
-
-    if (iMidEnv)
-    {
-        LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListenerL : iMidEnv->AddObserverL + ");
-        // register for getting the foreground change event
-        iMidEnv->AddObserverL(*this);
-        LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListenerL : iMidEnv->AddObserverL - ");
-    }
-
-    LOG(EJavaMMAPI,EInfo,"CMMAVideoControl::RegisterForegroundListenerL - ");
-}
-*/
-void CMMAVideoControl::StaticInitL(CMMAVideoControl* aControl,
-								   jobject javaDisplayRef,
-								   MMAFunctionServer* aEventSource,
-                                   TInt* aDisplayHandle,
-                                   CMMAEvent* aDeleteRefEvent)
-{
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticInitL +");
-
-    aControl->iDeleteRefEvent = aDeleteRefEvent;
-
-     CMMACanvasDisplay* canvasDisplay =
-	            CMMACanvasDisplay::NewLC(aEventSource,javaDisplayRef);
-	  aControl->iDisplay = canvasDisplay;
-	  CleanupStack::Pop(canvasDisplay);
-      *aDisplayHandle = reinterpret_cast<TInt>(canvasDisplay);
-
-
-/*    MMIDComponent::TType componentType = aComponent->Type();
-    switch (componentType)
-    {
-    case MMIDComponent::ECustomItem:
-    {
-        //MMIDCustomItem  // end of // 3.x QT based UI
-       // MMIDCustomItem* customItem =
-         //   reinterpret_cast< MMIDCustomItem* >(aComponent);
-
-        CMMAItemDisplay* itemDisplay =
-            CMMAItemDisplay::NewLC(customItem);
-
-        aControl->iDisplay = itemDisplay;
-        CleanupStack::Pop(itemDisplay);
-        *aDisplayHandle = JavaMakeHandle(itemDisplay);
-        break;
-    }
-    case MMIDComponent::ECanvas:
-    {
-        //MMIDCanvas
-        MMIDCanvas* canvas = reinterpret_cast< MMIDCanvas* >(aComponent);
-
-        CMMACanvasDisplay* canvasDisplay =
-            CMMACanvasDisplay::NewLC(canvas);
-
-        aControl->iDisplay = canvasDisplay;
-        CleanupStack::Pop(canvasDisplay);
-        *aDisplayHandle = JavaMakeHandle(canvasDisplay);
-        break;
-    }
-    default:
-    {
-        // other component types are not supported
-        User::Leave(KErrNotSupported);
-    }
-
-    }*/
-
-    aControl->iGuiPlayer->SetDisplayL(aControl->iDisplay);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticInitL - ");
-}
-
-
-void CMMAVideoControl::SetDisplayHandleToJavaPeer(MMAFunctionServer* eventSource ,jobject aJavaVideoControlPeer)
-{
-	JNIEnv* validJNI = eventSource->getValidJniEnv();
-	
-	jmethodID jmid = validJNI->GetMethodID( validJNI->GetObjectClass(aJavaVideoControlPeer),
-                                         "setNativeDisplayHandleToJavaPeer",
-                                         "(I)V");
-   // DEBUG_INT("CMMADisplay::GetCallbackInUiThread getCallBackMethodID = %d",getCallBackMethodID); 
-   TInt handle = reinterpret_cast<TInt>(iDisplay);                                    
-  validJNI->CallVoidMethod(aJavaVideoControlPeer,jmid,handle);
-  iGuiPlayer->SetDisplayL(iDisplay);
-}
-
-void CMMAVideoControl::StaticInitDynamicModeL(
-    CMMAVideoControl* aVideoControl,
-    TInt* aContentHandle,
-    MMAFunctionServer* aEventSource,
-    jobject aGUIObject,
-    CMMAEvent* aDeleteRefEvent)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA::CMMAVideoControl::StaticInitDynamicModeL+");
-    aVideoControl->iDeleteRefEvent = aDeleteRefEvent;
-
-    CMMADCDisplay* dcDisplay = CMMADCDisplay::NewLC(aVideoControl->iGuiPlayer,
-                               aEventSource,
-                               aGUIObject);
-
-    MMMADirectContent* content = dcDisplay;
-    *aContentHandle = reinterpret_cast< TInt >(content);
-    aVideoControl->iDisplay = dcDisplay;
-    aVideoControl->iGuiPlayer->SetDisplayL(aVideoControl->iDisplay);
-    CleanupStack::Pop(dcDisplay);
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticInitDynamicModeL-");
-}
-
-void CMMAVideoControl::StaticGetPropertyL(CMMAVideoControl* aControl,
-        TInt aPropertyType,
-        TInt* aReturnValue)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticGetPropertyL property %d",
-              aPropertyType);
-
-// MMAPI UI 3.x req.
-// remove the below return; once  display is implemented in java
- return;
-
-
-    MMMADisplay* display = aControl->iDisplay;
-
-    if (aPropertyType != com_nokia_microedition_media_control_VideoControl_PROPERTY_SOURCE_WIDTH &&
-            aPropertyType != com_nokia_microedition_media_control_VideoControl_PROPERTY_SOURCE_HEIGHT &&
-            !display)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticGetPropertyL not initialized yet");
-        // init is not done yet, returning 0
-        *aReturnValue = 0;
-        return;
-    }
-
-    switch (aPropertyType)
-    {
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_DISPLAY_WIDTH:
-    {
-        *aReturnValue = display->DisplaySize().iWidth;
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_DISPLAY_HEIGHT:
-    {
-        *aReturnValue = display->DisplaySize().iHeight;
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_DISPLAY_X:
-    {
-        *aReturnValue = display->DisplayLocation().iX;
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_DISPLAY_Y:
-    {
-        *aReturnValue = display->DisplayLocation().iY;
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_SOURCE_WIDTH:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticGetPropertyL get source width");
-        *aReturnValue = aControl->iGuiPlayer->SourceSize().iWidth;
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_PROPERTY_SOURCE_HEIGHT:
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticGetPropertyL get source height");
-        *aReturnValue = aControl->iGuiPlayer->SourceSize().iHeight;
-        break;
-    }
-    default:
-    {
-        *aReturnValue = KErrNotFound;
-        User::Leave(KErrNotFound);
-        break;
-    }
-    }
-}
-
-
-void CMMAVideoControl::StaticSetPropertyL(CMMAVideoControl* aControl,
-        TInt aPropertyType,
-        TInt aPropertyA,
-        TInt aPropertyB)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticSetPropertyL property type %d",
-              aPropertyType);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticSetPropertyL a property %d",
-              aPropertyA);
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticSetPropertyL b property %d",
-              aPropertyB);
-// MMAPI UI 3.x req.
-// remove the below return; once  display is implemented in java
- return;
-
-    MMMADisplay* display = aControl->iDisplay;
-
-    __ASSERT_DEBUG(display != NULL,
-                   User::Panic(_L("display not initialized"), KErrNotReady));
-
-    switch (aPropertyType)
-    {
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_SIZE:
-    {
-        TSize displaySize(aPropertyA, aPropertyB);
-        display->SetDisplaySizeL(displaySize);
-
-        // inform java side
-        if (!display->IsFullScreen())
-        {
-            aControl->iGuiPlayer->NotifyWithStringEvent(
-                CMMAPlayerEvent::ESizeChanged, KControlName);
-        }
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_LOCATION:
-    {
-        TPoint displayLocation(aPropertyA, aPropertyB);
-        display->SetDisplayLocationL(displayLocation);
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_VISIBLE_TRUE:
-    {
-        display->SetVisible(ETrue);
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_VISIBLE_FALSE:
-    {
-        display->SetVisible(EFalse);
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_FULLSCREEN_TRUE:
-    {
-        // store old user rect to determine if SIZE_CHANGED event
-        // has to be delivered when full screen mode is turned off.
-        aControl->iOldDisplaySize = display->DisplaySize();
-
-        display->SetFullScreenL(ETrue);
-        break;
-    }
-    case com_nokia_microedition_media_control_VideoControl_SET_DISPLAY_FULLSCREEN_FALSE:
-    {
-        display->SetFullScreenL(EFalse);
-
-        // Send SIZE_CHANGED event when fullscreen is turned off if
-        // size of the video display has changed. Possible position
-        // change is however disregarded
-        if (aControl->iOldDisplaySize != display->DisplaySize())
-        {
-            aControl->iGuiPlayer->NotifyWithStringEvent(
-                CMMAPlayerEvent::ESizeChanged, KControlName);
-        }
-
-        break;
-    }
-    default:
-    {
-        User::Leave(KErrNotFound);
-        break;
-    }
-    }
-}
-
-
-void CMMAVideoControl::TakeSnapShotL(CMMAVideoControl* aControl,
-                                     const TDesC* aProperties)
-{
-    __ASSERT_DEBUG(
-        aControl,
-        User::Panic(_L("CMMAVideoControl::TakeSnapShotL CMMAVideoControl is NULL"),
-                    KErrArgument)
-    );
-
-    ASSERT(aProperties);
-    aControl->iSnapshot->TakeSnapShotL(*aProperties);
-}
-
-EXPORT_C void CMMAVideoControl::SnapshotReady()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::SnapshotReady()");
-
-    // now this class owns the buffer
-    HBufC8* imageBuffer = iSnapshot->ImageBuffer();
-    // Use standard new to avoid useless trap.
-    CMMASnapshotEvent* event =
-        new CMMASnapshotEvent(iListenerObject,
-                              iSnapshotReadyMethod,
-                              iSnapshot->iStatus.Int(),
-                              imageBuffer,
-                              CMMAEvent::EDisposableEvent);
-    if (event)
-    {
-        // ok, ownership of buffer transfered to event
-
-        // event poster takes the ownership of the event
-        iEventPoster->PostEvent(event, CMMAEvent::ENotifyPriority);
-    }
-    else
-    {
-        // we own the buffer
-        delete imageBuffer;
-    }
-}
-
-EXPORT_C const TDesC& CMMAVideoControl::ClassName() const
-{
-    return KControlName;
-}
-TBool CMMAVideoControl::IsForeground()
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoControl::IsForeground() %d",iIsForeground);
-
-    return iIsForeground;
-}
-
-void CMMAVideoControl::StaticSetForegroundL(CMMAVideoControl* aControl,
-        TInt aForeground)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticSetForegroundL + aForeground %d",
-              aForeground);
-
-    __ASSERT_DEBUG(
-        aControl,
-        User::Panic(_L("MMA::CMMAVideoControl::StaticSetForegroundL : CMMAVideoControl is NULL"),
-                    KErrArgument)
-    );
-
-    if (aControl)
-    {
-        aControl->SetForeground(aForeground, EFalse);
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoControl::StaticSetForegroundL - ");
-}
-
-/*   // 3.x QT based UI
-// Implement MMIDEnvObserver
-
-void CMMAVideoControl::HandleSwitchOnL(TBool aSwitchOn)
-{
-    // Dummy implementation, no intent to do anything
-}
-*/
-/**
- * Handles the case when the MIDlet is brought to the foreground.
- */
-
-/*
-void CMMAVideoControl::HandleForegroundL(TBool aForeground)
-{
-
-    SetForeground(aForeground, ETrue);
-
-}
-
-*/
-void CMMAVideoControl::SetForeground(TBool aForeground, TBool aUseEventServer)
-{
-    iIsForeground = aForeground;
-    if (iDisplay)
-    {
-        iDisplay->SetForeground(iIsForeground, aUseEventServer);
-    }
-}
-
-
-/**
- * Handles a change to resources which are shared accross the environment.
- */
-/*
-void CMMAVideoControl::HandleResourceChangeL(TInt aType)
-{
-    // Dummy implementation, no intent to do anything
-}
-*/  // end of // 3.x QT based UI
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideoframepositioningcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,284 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements FramePositioningControl for video player
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-#include <e32math.h>
-
-#include "cmmavideoframepositioningcontrol.h"
-
-namespace
-{
-const TInt32 KMMAFramePosMicroSecMultiplier = 1000000;
-}
-
-CMMAVideoFramePositioningControl*
-CMMAVideoFramePositioningControl::NewL(CMMAVideoPlayer* aPlayer)
-{
-    CMMAVideoFramePositioningControl* self =
-        new(ELeave) CMMAVideoFramePositioningControl(aPlayer);
-    return self;
-
-}
-CMMAVideoFramePositioningControl::
-CMMAVideoFramePositioningControl(CMMAVideoPlayer* aPlayer)
-        : CMMAFramePositioningControl(aPlayer), iPlayer(aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoFramePositioningControl::CMMAVideoFramePositioningControl");
-}
-
-CMMAVideoFramePositioningControl::~CMMAVideoFramePositioningControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoFramePositioningControl::~CMMAVideoFramePositioningControl");
-}
-
-TInt CMMAVideoFramePositioningControl::SeekL(TInt aFrameNumber)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::SeekL, aFrameNumber: %d", aFrameNumber);
-
-    RMMFController& controller = iPlayer->Controller();
-
-    // Controller is paused before changing position to increase
-    // accuracy
-    TBool playerStarted = EFalse;
-    if (iPlayer->State() == CMMAPlayer::EStarted)
-    {
-        playerStarted = ETrue;
-    }
-
-    if (playerStarted)
-    {
-        User::LeaveIfError(controller.Pause());
-    }
-
-    // Frame number must be positive
-    TInt frameNumber = aFrameNumber;
-    if (frameNumber < 0)
-    {
-        frameNumber = 0;
-    }
-
-    // Find out framerate of video
-    TReal32 frameRate = 0;
-    GetAndCheckFrameRateL(frameRate);
-
-    // Calculate new media time
-    TReal tempReal = ((TReal32)frameNumber *
-                      KMMAFramePosMicroSecMultiplier) / frameRate;
-    User::LeaveIfError(Math::Round(tempReal, tempReal, 0));
-    TInt64 newMediaTime = tempReal;
-
-    // New media time is clamped to duration
-    TInt err = ClampMediaTime(newMediaTime);
-    // Clamp fails if duration of content is not known.
-    // Two additional resorts are (in preferred order):
-    // 1) Return current frame position if it can be calculated.
-    // 2) Or seek to 0.
-
-    // First resort
-    if (err != KErrNone)
-    {
-        iPlayer->GetMediaTime(&newMediaTime);
-        // Second resort
-        if (newMediaTime < 0)
-        {
-            newMediaTime = 0;
-        }
-    }
-    iPlayer->SetMediaTimeL(&newMediaTime);
-    // Error condition
-    if (newMediaTime < KErrNotFound)
-    {
-        User::Leave(KErrNotFound);
-    }
-
-    // Calculate actually set frame number
-    tempReal = (((TReal32)newMediaTime / KMMAFramePosMicroSecMultiplier) *
-                (TReal32) frameRate);
-    User::LeaveIfError(Math::Round(tempReal, tempReal, 0));
-
-    // Restart controller
-    if (playerStarted)
-    {
-        User::LeaveIfError(controller.Play());
-    }
-
-    return tempReal;
-}
-
-TInt CMMAVideoFramePositioningControl::SkipL(TInt aFramesToSkip)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::SkipL, aFramesToSkip: %d", aFramesToSkip);
-
-    RMMFController& controller = iPlayer->Controller();
-
-    // Controller is paused before changing position to increase
-    // accuracy
-    TBool playerStarted = EFalse;
-    if (iPlayer->State() == CMMAPlayer::EStarted)
-    {
-        playerStarted = ETrue;
-    }
-
-    if (playerStarted)
-    {
-        User::LeaveIfError(controller.Pause());
-    }
-
-    // Find out framerate of video
-    TReal32 frameRate = 0;
-    GetAndCheckFrameRateL(frameRate);
-
-    // Find out current media time
-    TInt64 currentMediaTime = 0;
-    iPlayer->GetMediaTime(&currentMediaTime);
-
-    // Error condition
-    if (currentMediaTime < KErrNone)
-    {
-        User::Leave(KErrNotFound);
-    }
-
-    // Find out current frame number
-    TReal tempReal =
-        ((TReal32) currentMediaTime / KMMAFramePosMicroSecMultiplier) *
-        frameRate;
-    User::LeaveIfError(Math::Round(tempReal, tempReal, 0));
-    TInt currentFrameNumber = tempReal;
-
-    // Calculate new media time
-    TInt64 newMediaTime = currentMediaTime +
-                          (((TReal32) aFramesToSkip / frameRate) * KMMAFramePosMicroSecMultiplier);
-
-    // New media time is clamped to duration
-    TInt err = ClampMediaTime(newMediaTime);
-
-    // If clamping fails, no frames are skipped
-    TInt framesSkipped = 0;
-    if (err == KErrNone)
-    {
-        iPlayer->SetMediaTimeL(&newMediaTime);
-        // Error condition
-        if (newMediaTime < KErrNone)
-        {
-            User::Leave(KErrNotFound);
-        }
-
-        // Calculate actual amount of frames skipped
-        tempReal = ((((TReal32) newMediaTime / KMMAFramePosMicroSecMultiplier) *
-                     (TReal32) frameRate) - currentFrameNumber);
-
-        User::LeaveIfError(Math::Round(tempReal, tempReal, 0));
-        framesSkipped = tempReal;
-    }
-
-    // Restart controller
-    if (playerStarted)
-    {
-        User::LeaveIfError(controller.Play());
-    }
-
-    return framesSkipped;
-}
-
-void CMMAVideoFramePositioningControl::MapFrameToTimeL(TInt aFrameNumber, TInt64* aMediaTime)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::MapFrameToTimeL, aFrameNumber: %d", aFrameNumber);
-    // Find out framerate of video
-    TReal32 frameRate = 0;
-    GetAndCheckFrameRateL(frameRate);
-
-    // Find out frame mediatime
-    TInt64 frameMediaTime =
-        ((TReal32)aFrameNumber / (TReal32)frameRate) *
-        KMMAFramePosMicroSecMultiplier;
-
-    TInt64 duration;
-    iPlayer->GetDuration(&duration);
-
-    if (frameMediaTime < 0)
-    {
-        frameMediaTime = KErrNotFound;
-    }
-    else if (frameMediaTime > duration)
-    {
-        frameMediaTime = KErrNotFound;
-        // With some medias last frame media time is few hundred microsec's
-        // over duration. This is because framerate is not accurate.
-        // If given frame number is last frame and frameMediaTime > duration,
-        // return duration
-        // Find out last frame
-        TReal lastFrame = (frameRate * (TReal32)duration) /
-                          KMMAFramePosMicroSecMultiplier;
-        User::LeaveIfError(Math::Round(lastFrame, lastFrame, 0));
-        if (aFrameNumber == lastFrame)
-        {
-            frameMediaTime = duration;
-        }
-    }
-    *aMediaTime = frameMediaTime;
-}
-
-TInt CMMAVideoFramePositioningControl::MapTimeToFrameL(TInt64* aMediaTime)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::MapTimeToFrameL, aMediaTime: %d", *aMediaTime);
-    TInt64 mediaTime = *aMediaTime;
-
-    // If given media time is < 0 or > duration, cannot map time to frame
-    // conversion fails, -1 is returned
-    TInt64 duration;
-    iPlayer->GetDuration(&duration);
-    if (mediaTime > duration || mediaTime < 0)
-    {
-        return KErrNotFound;
-    }
-
-    // Find out framerate of video
-    TReal32 frameRate = 0;
-    GetAndCheckFrameRateL(frameRate);
-
-    // Calculate frame number from media time
-    TReal tempReal = (TInt)((TReal64)(mediaTime * frameRate) /
-                            KMMAFramePosMicroSecMultiplier);
-    User::LeaveIfError(Math::Round(tempReal, tempReal, 0));
-
-    return tempReal;
-}
-
-
-void CMMAVideoFramePositioningControl::GetAndCheckFrameRateL(
-    TReal32& aFrameRate)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::GetAndCheckFrameRateL");
-    RMMFVideoControllerCustomCommands customCommands =
-        RMMFVideoControllerCustomCommands(iPlayer->Controller());
-
-    User::LeaveIfError(customCommands.GetFrameRate(aFrameRate));
-    LOG1( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::GetAndCheckFrameRateL, aFrameRate: %d", aFrameRate);
-    if (aFrameRate <= 0)
-    {
-        // zero framerate is not accepted because cannot
-        // divide by zero. Negative framerate is not
-        // acceptable aswell.
-        LOG( EJavaMMAPI, EInfo, "CMMAVideoFramePositioningControl::GetAndCheckFrameRateL: invalid framerate");
-        User::Leave(KErrNotFound);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideoplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating video player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideoplayerfactory.h"
-#include "cmmastoptimecontrol.h"
-#include "cmmavideoplayer.h"
-#include "cmmavideocontrol.h"
-#include "cmmaaudiovolumecontrol.h"
-#include "cmmammfresolver.h"
-#include "cmmavideoframepositioningcontrol.h"
-#include "cmmammfratecontrol.h"
-
-
-// audio content type
-_LIT(KMMAAudio, "audio");
-// Length of KMMAAudio descriptor
-const TInt KMMAAudioLength = 5;
-
-CMMAVideoPlayerFactory* CMMAVideoPlayerFactory::NewLC()
-{
-    CMMAVideoPlayerFactory* pFactory =
-        new(ELeave) CMMAVideoPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-CMMAVideoPlayerFactory::CMMAVideoPlayerFactory()
-{
-}
-
-
-CMMAVideoPlayerFactory::~CMMAVideoPlayerFactory()
-{
-}
-
-#ifdef RD_JAVA_OMA_DRM_V2
-CMMAPlayer* CMMAVideoPlayerFactory::CreatePlayerWithFileL(const TDesC& aContentType,
-        const TDesC* aFileName)
-{
-    iFileName = aFileName;
-    return CMMAMMFPlayerFactory::CreatePlayerL(aContentType);
-}
-#endif // RD_JAVA_OMA_DRM_V2
-
-CMMAPlayer* CMMAVideoPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    HBufC* cType = aResolver->ContentType();
-
-    // Video player may not accept audio content types.
-    if (cType &&
-            cType->Length() >= KMMAAudioLength &&
-            (aResolver->ContentType()->Mid(0, KMMAAudioLength) == KMMAAudio))
-    {
-        return NULL;
-    }
-
-#ifdef RD_JAVA_OMA_DRM_V2
-    if (iFileName)
-    {
-        aResolver->SetFileNameL(iFileName);
-        iFileName = NULL;
-    }
-#endif // RD_JAVA_OMA_DRM_V2
-
-    CMMAVideoPlayer* player = CMMAVideoPlayer::NewLC(aResolver);
-
-    CMMAVideoControl* videoControl = new(ELeave) CMMAVideoControl(player);
-    CleanupStack::PushL(videoControl);
-    player->AddControlL(videoControl);
-    CleanupStack::Pop(videoControl);
-
-    CMMAAudioVolumeControl* audioVolumeControl = CMMAAudioVolumeControl::NewL(player);
-    CleanupStack::PushL(audioVolumeControl);
-    player->AddControlL(audioVolumeControl);
-    CleanupStack::Pop(audioVolumeControl);
-
-    CMMAStopTimeControl* stopTimeControl = CMMAStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    // FramePositioningControl is only supported for file locator
-    if (player->IsFilePlayer())
-    {
-        CMMAVideoFramePositioningControl* framePositioningControl =
-            CMMAVideoFramePositioningControl::NewL(player);
-        CleanupStack::PushL(framePositioningControl);
-        player->AddControlL(framePositioningControl);
-        CleanupStack::Pop(framePositioningControl);
-    }
-
-    CMMAMMFRateControl* rateControl = CMMAMMFRateControl::NewL(player);
-    CleanupStack::PushL(rateControl);
-    player->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-
-
-    CleanupStack::Pop(); // player
-    return player;
-}
-
-
-void CMMAVideoPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeVideo));
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeAudio));
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideorecordcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,374 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is a RecordControl.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideorecordcontrol.h"
-#include "cmmaplayer.h"
-#include "cmmammfresolver.h"
-#include "cmmacamerasound.h"
-
-const TInt KUnlimitedSize = KMaxTInt32;
-
-const TReal32 KNoUserDefinedFps = -1;
-const TInt KNoUserDefinedSize = -1;
-const TInt KNoUserDefinedRecordSize = -1;
-
-_LIT(KVideoMp4MimeType, "video/mp4");
-_LIT(KVideoH264MimeType, "video/H264");
-
-_LIT8(KMimeTypeMPEG4VSPL3, "video/mp4v-es; profile-level-id=3");
-_LIT8(KMimeTypeH264AVCBPL12, "video/H264; profile-level-id=42800C");     // Level 1.2
-
-CMMAVideoRecordControl* CMMAVideoRecordControl::NewL(CMMAPlayer* aPlayer,
-        CMMAMMFResolver* aResolver,
-        const TMMAVideoSettings& aVideoSettings,
-        CMMAAudioSettings* aAudioSettings,
-        TInt aCameraHandle)
-{
-    CMMAVideoRecordControl* self =
-        new(ELeave)CMMAVideoRecordControl(aPlayer,
-                                          aCameraHandle);
-    CleanupStack::PushL(self);
-
-    // SetContentType takes ownership
-    aPlayer->SetContentType(aResolver->ContentTypeOwnership());
-    self->ConstructL(*aResolver->Implementations(),
-                     aVideoSettings,
-                     aAudioSettings);
-
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAVideoRecordControl::CMMAVideoRecordControl(CMMAPlayer* aPlayer,
-        TInt aCameraHandle):
-        CMMARecordControl(aPlayer),
-        iRecordSizeLimit(KNoUserDefinedRecordSize)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::CMMAVideoRecordControl");
-
-    __ASSERT_DEBUG(aCameraHandle > 0, User::Panic(
-                       _L("CMMAVideoRecordControl::Invalid camera"),
-                       KErrArgument));
-    __ASSERT_DEBUG(aPlayer, User::Panic(
-                       _L("CMMAVideoRecordControl::Invalid player"),
-                       KErrArgument));
-    iCameraHandle = aCameraHandle;
-}
-
-CMMAVideoRecordControl::~CMMAVideoRecordControl()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::~CMMAVideoRecordControl");
-
-    delete iActiveSchedulerWait;
-
-    if (iRecorder)
-    {
-        iRecorder->Close();
-        delete iRecorder;
-    }
-}
-
-void CMMAVideoRecordControl::ConstructL(
-    RMMFControllerImplInfoArray& aControllerInfos,
-    const TMMAVideoSettings& aVideoSettings,
-    CMMAAudioSettings* aAudioSettings)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::ConstructL +");
-    CMMARecordControl::ConstructL();
-
-    iVideoSettings = aVideoSettings;
-
-    iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
-
-    iRecorder = CVideoRecorderUtility::NewL(*this, EMdaPriorityMin, EMdaPriorityPreferenceNone);
-
-    TUid videoControllerUid = KNullUid;
-    TUid videoFormatUid = KNullUid;
-
-    HBufC8* encoding;
-    // if wanted video encoding is H264, we must find format uid for video/mp4
-    // and set encoding later because mmf doesn't have controller for video/H264
-    if (!(iVideoSettings.iEncoding.Compare(KVideoH264MimeType) == 0))
-    {
-        encoding = HBufC8::NewLC(iVideoSettings.iEncoding.Length());
-        encoding->Des().Copy(iVideoSettings.iEncoding);
-    }
-    else
-    {
-        encoding = HBufC8::NewLC(KVideoMp4MimeType().Length());
-        encoding->Des().Copy(KVideoMp4MimeType());
-    }
-
-    // Go through controller infos to find format UID
-    TInt controllerCount = aControllerInfos.Count();
-    for (TInt cIndex = 0; cIndex < controllerCount; cIndex++)
-    {
-        const RMMFFormatImplInfoArray infoArray =
-            aControllerInfos[ cIndex ]->RecordFormats();
-
-        // Find correct format uid
-        TInt formatCount = infoArray.Count();
-        for (TInt formatIndex = 0; formatIndex < formatCount; formatIndex++)
-        {
-            if (infoArray[ formatIndex ]->SupportsMimeType(*encoding))
-            {
-                // Uids will be used to open controller
-                videoFormatUid = infoArray[ formatIndex ]->Uid();
-                videoControllerUid = aControllerInfos[ cIndex ]->Uid();
-            }
-        }
-    }
-    CleanupStack::PopAndDestroy(encoding);
-
-    if (videoFormatUid == KNullUid ||
-            videoControllerUid == KNullUid)
-    {
-        // Controller and / or format for mime was not found.
-        User::Leave(KErrNotSupported);
-    }
-
-    iFile.Close();
-    iRecorder->OpenFileL(iFilename,
-                         iCameraHandle,
-                         videoControllerUid,
-                         videoFormatUid,
-                         KNullDesC8,
-                         aAudioSettings->iDataType);
-
-    // wait until MvruoOpenComplete is called
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    User::LeaveIfError(iError);
-
-    // if wanted video encoding is mp4, set it
-    if (iVideoSettings.iEncoding.Compare(KVideoMp4MimeType) == 0)
-    {
-        iRecorder->SetVideoTypeL(KMimeTypeMPEG4VSPL3);
-        // audio encoding with mp4 is AAC by default
-        iRecorder->SetAudioTypeL(KMMFFourCCCodeAAC);
-    }
-
-    // if wanted video encoding is H264, set it
-    if (iVideoSettings.iEncoding.Compare(KVideoH264MimeType) == 0)
-    {
-        iRecorder->SetVideoTypeL(KMimeTypeH264AVCBPL12);
-        // audio encoding with mp4 is AAC by default
-        iRecorder->SetAudioTypeL(KMMFFourCCCodeAAC);
-    }
-
-    // setting size if it is set by user
-    TSize videoSize;
-    iRecorder->GetVideoFrameSizeL(videoSize);
-    if (iVideoSettings.iHeight != KNoUserDefinedSize)
-    {
-        videoSize.iHeight = iVideoSettings.iHeight;
-    }
-
-    if (iVideoSettings.iWidth != KNoUserDefinedSize)
-    {
-        videoSize.iWidth = iVideoSettings.iWidth;
-    }
-    iRecorder->SetVideoFrameSizeL(videoSize);
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::ConstructL()-");
-}
-
-void CMMAVideoRecordControl::InitializeL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::InitializeL()");
-    iRecorder->Prepare();
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    User::LeaveIfError(iError);
-
-    // setting frame rate if it is set by user
-    // record utility must be prepared to do this
-    if (iVideoSettings.iFps != KNoUserDefinedFps)
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::InitializeL() SetVideoFrameRateL = %d", iVideoSettings.iFps);
-        iRecorder->SetVideoFrameRateL(iVideoSettings.iFps);
-    }
-
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::InitializeL()-");
-}
-
-void CMMAVideoRecordControl::DoStartRecordL()
-{
-    // if reset is called then file is reopened, closing it in order to prevent
-    // KErrInUse
-    iFile.Close();
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoRecordControl::DoStartRecordL() err=%d", iError);
-    User::LeaveIfError(iError);
-
-    // play sound when recording starts
-    CMMACameraSound::PlayVideoRecordSoundL();
-
-    // Set recordsize limit if needed
-    if (iRecordSizeLimit != KNoUserDefinedRecordSize)
-    {
-        DoSetRecordSizeLimitL(iRecordSizeLimit);
-    }
-
-    iRecorder->Record();
-}
-
-void CMMAVideoRecordControl::DoStopRecordL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::DoStopRecordL");
-    // Just paused that recording can continue
-    iRecorder->PauseL();
-}
-
-void CMMAVideoRecordControl::DoResetL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::ResetL");
-    TInt err = iRecorder->Stop();
-    // returns KErrCompletion when recording is finished when size limit is reached
-    // and KErrAlreadyExists if we have created file (ignoring both)
-    if ((err != KErrCompletion) &&
-            (err != KErrAlreadyExists))
-    {
-        User::LeaveIfError(err);
-    }
-    TBool isOpen(EFalse);
-    err = iFs.IsFileOpen(iFilename, isOpen);
-    if (!isOpen && (err != KErrNotFound))
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::ResetL - Opening file");
-        // opening file for resetting (or commit)
-        User::LeaveIfError(iFile.Open(iFs, iFilename, EFileRead |
-                                      EFileWrite |
-                                      EFileShareAny));
-    }
-    else if (err == KErrNotFound)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::ResetL - Recreating file");
-        // record utility deletes file if nothing is recorded, creating it again
-        User::LeaveIfError(iFile.Create(iFs,
-                                        iFilename,
-                                        EFileRead |
-                                        EFileWrite |
-                                        EFileShareAny));
-    }
-    else
-    {
-        User::LeaveIfError(err);
-    }
-}
-
-void CMMAVideoRecordControl::DoSetRecordSizeLimitL(TInt aSize)
-{
-    if (aSize == KUnlimitedSize)
-    {
-        iRecorder->SetMaxClipSizeL(KMMFNoMaxClipSize);
-    }
-    else
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::DoSetRecordSizeLimitL %d", aSize);
-        iRecorder->SetMaxClipSizeL(aSize);
-    }
-    // reset local value
-    iRecordSizeLimit = KNoUserDefinedRecordSize;
-    // have to reprepare after setting clipsize
-    iRecorder->Prepare();
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    User::LeaveIfError(iError);
-}
-
-TInt CMMAVideoRecordControl::SetRecordSizeLimitL(TInt aSize)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoRecordControl::SetRecordSizeLimitL %d", aSize);
-
-    // if already recording, try to set immediately
-    if (iState == ERecordRecording)
-    {
-        DoSetRecordSizeLimitL(aSize);
-    }
-    else
-    {
-        // set record size limit when recording is started
-        iRecordSizeLimit = aSize;
-    }
-    return aSize;
-}
-
-void CMMAVideoRecordControl::MvruoOpenComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoRecordControl::MvruoOpenComplete aError = %d", aError);
-
-    // Error situation is handled in ConstructL,
-    iError = aError;
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->AsyncStop();
-    }
-}
-
-void CMMAVideoRecordControl::MvruoPrepareComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoRecordControl::MvruoPrepareComplete aError = %d", aError);
-    // Error situation is handled in InitializeL
-    iError = aError;
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->AsyncStop();
-    }
-}
-
-void CMMAVideoRecordControl::MvruoRecordComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoRecordControl::MvruoRecordComplete aError = %d", aError);
-
-    // iState = ERecordComplete
-
-    if ((aError == KErrNone) ||
-            (aError == KErrCompletion))  // Size limit reached
-    {
-        if (aError == KErrCompletion)
-        {
-            HandleRecordSizeLimit();
-        }
-    }
-    else
-    {
-        Error(aError);
-    }
-}
-
-
-void CMMAVideoRecordControl::MvruoEvent(const TMMFEvent& aEvent)
-{
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoRecordControl::MvruoEvent event error code = %d", aEvent.iErrorCode);
-    // Only error situations needs to be considered.
-    if (aEvent.iErrorCode != KErrNone)
-    {
-        Error(aEvent.iErrorCode);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideourlplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,317 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing video.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <mmf/server/mmfurl.h>
-#include <es_enum.h>
-#include <logger.h>
-
-#include "cmmavideourlplayer.h"
-#include "mmmadisplay.h"
-#include "cmmasourcestream.h"
-
-const TUid KUrlSourceUid = { KMmfUidUrlSource };
-_LIT(KMMALiveStreamMetaDataKeyword, "LiveStream");
-_LIT(KMMALiveStreamMetaDataValue, "1");
-
-CMMAVideoUrlPlayer* CMMAVideoUrlPlayer::NewLC(
-    CMMAMMFResolver* aResolver,
-    const TDesC& aUrl)
-{
-    CMMAVideoUrlPlayer* self = new(ELeave) CMMAVideoUrlPlayer(
-        aResolver);
-    CleanupStack::PushL(self);
-    self->ConstructL(aUrl);
-    return self;
-}
-
-EXPORT_C CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer()
-{
-    iConnection.Close();
-    iSocketServ.Close();
-    delete iUrl;
-    delete iPlayerDelegate;
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::ConstructL(const TDesC& aUrl)
-{
-    CMMAVideoPlayer::ConstructL();
-    iUrl = aUrl.AllocL();
-
-    User::LeaveIfError(iSocketServ.Connect());
-    User::LeaveIfError(iConnection.Open(iSocketServ));
-}
-
-EXPORT_C CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(
-    CMMAMMFResolver* aResolver):
-        CMMAVideoPlayer(aResolver)
-{
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::DeallocateL()
-{
-    __ASSERT_DEBUG(iPlayerDelegate != NULL, User::Invariant());
-    delete iPlayerDelegate;
-    iPlayerDelegate = NULL;
-    CMMAMMFPlayerBase::DeallocateL();
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::CloseL()
-{
-    // Do not call the CMMAVideoPlayer CloseL because it deletes
-    // file source stream.
-    CMMAAudioPlayer::CloseL();
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::StartL()
-{
-    __ASSERT_DEBUG(iPlayerDelegate != NULL, User::Invariant());
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoUrlPlayer::StartL() +");
-    iPlayerDelegate->StartL();
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoUrlPlayer::StartL() -");
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::StopL(TBool aPostEvent)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::StopL ");
-    __ASSERT_DEBUG(iPlayerDelegate != NULL, User::Invariant());
-    iPlayerDelegate->StopL(aPostEvent);
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::GetMediaTime +");
-    if (iPlayerDelegate)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::GetMediaTime .iPlayerDelegate->GetMediaTime ");
-        iPlayerDelegate->GetMediaTime(aMediaTime);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::GetMediaTime Not found ");
-        *aMediaTime = KErrNotFound;
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::GetMediaTime -");
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::RealizeL()
-{
-    CMMAPlayer::RealizeL(); // Changes state to ERealized
-}
-
-
-EXPORT_C void CMMAVideoUrlPlayer::PrefetchL()
-{
-    const TUint KConnectionTreshold(1);
-    TUint connectIap((TUint)KUseDefaultIap);
-    TUint connectionCount(0);
-    User::LeaveIfError(iConnection.EnumerateConnections(connectionCount));
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::PrefetchL: connectionCount = %d", connectionCount);
-    if (connectionCount == KConnectionTreshold)
-    {
-        // One active connection - find it and try using it
-        FindActiveIap(connectionCount, connectIap);
-    }
-    // else No active connections try using the default one
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::PrefetchL: connectIap = %d", connectIap);
-
-    CMMFUrlParams* urlCfg = CMMFUrlParams::NewLC(*iUrl, (TInt)connectIap);
-    CBufFlat* urlCfgBuffer = urlCfg->ExternalizeToCBufFlatLC();
-
-    // Store current thread priority to give
-    // more CPU time to Java threads i.e. this
-    // is work around for not locking the Java
-    // thread while RTSP connection is being
-    // opened
-    iOrigPriority = RThread().Priority();
-
-    // player priority settings
-    TMMFPrioritySettings prioritySettings;
-    prioritySettings.iPriority = EMdaPriorityMax;
-    prioritySettings.iPref = EMdaPriorityPreferenceTimeAndQuality;
-    prioritySettings.iState = EMMFStatePlaying;
-
-    User::LeaveIfError(DoOpen(KUrlSourceUid,
-                              urlCfgBuffer->Ptr(0),
-                              KUidMmfAudioOutput,
-                              KNullDesC8,
-                              prioritySettings));
-
-    User::LeaveIfError(iController.Prime());
-
-    CleanupStack::PopAndDestroy(urlCfgBuffer);
-    CleanupStack::PopAndDestroy(urlCfg);
-
-    // Prefetch will be completed in HandleEvent method.
-    // Next event KMMFEventCategoryVideoOpenComplete will be handled in
-    // CMMAVideoPlayer.
-}
-
-void CMMAVideoUrlPlayer::FindActiveIap(const TUint aConnectionCount, TUint& aActiveIap)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::FindActiveIap: aConnectionCount = %d +", aConnectionCount);
-
-    TPckgBuf<TConnectionInfo> connectionInfo;
-    for (TUint i = 1; i <= aConnectionCount; ++i)
-    {
-        if (iConnection.GetConnectionInfo(i, connectionInfo) == KErrNone)
-        {
-            aActiveIap = connectionInfo().iIapId;
-            break;
-        }
-    }
-
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::FindActiveIap: aActiveIap = %d -", aActiveIap);
-}
-
-TBool CMMAVideoUrlPlayer::IsLiveStreamL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoUrlPlayer::IsLiveStream: Checking if this is a live stream..");
-
-    CMMFMetaDataEntry* currEntry = NULL;
-
-    TInt nEntries = 0;
-    User::LeaveIfError(iController.GetNumberOfMetaDataEntries(nEntries));
-
-    for (TInt i = 0; i < nEntries; ++i)
-    {
-        currEntry = iController.GetMetaDataEntryL(i);
-
-        if ((0 == currEntry->Name().Compare(KMMALiveStreamMetaDataKeyword)) &&
-                (0 == currEntry->Value().Compare(KMMALiveStreamMetaDataValue)))
-        {
-            LOG( EJavaMMAPI, EInfo, "CMMAVideoUrlPlayer::IsLiveStream: Stream is a live stream");
-            delete currEntry;
-            return ETrue;
-        }
-
-        delete currEntry;
-    }
-
-    LOG( EJavaMMAPI, EInfo, "CMMAVideoUrlPlayer::IsLiveStream: Not a live stream");
-    return EFalse;
-}
-
-EXPORT_C void CMMAVideoUrlPlayer::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::HandleEvent 0x%X", aEvent.iEventType.iUid);
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoUrlPlayer::HandleEvent error code: %d", aEvent.iErrorCode);
-    RThread currentThread;
-
-    if (iPlayerDelegate != NULL)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::HandleEvent: iPlayerDelegate != NULL");
-        iPlayerDelegate->HandleEvent(aEvent);
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::HandleEvent: else");
-
-        __ASSERT_DEBUG(iPlayerDelegate == NULL, User::Invariant());
-        TInt err = aEvent.iErrorCode;
-
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::HandleEvent: currentThread.Priority() I = %d", currentThread.Priority());
-
-        // Lower thread priority to give more CPU time to Java-threads
-        // i.e. current thread has one increment higher priority than
-        // EPriorityNormal
-        if (aEvent.iEventType == KMMFEventCategoryVideoOpenComplete &&
-                err == KErrNone)
-        {
-            currentThread.SetPriority(EPriorityNormal);
-        }
-
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::HandleEvent: currentThread.Priority() II = %d", currentThread.Priority());
-
-        if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
-        {
-            // Restore original thread priority
-            currentThread.SetPriority(iOrigPriority);
-            LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::HandleEvent: currentThread.Priority() III = %d", currentThread.Priority());
-
-            // NotCompleteVideoError is not considered as an error condition, instead it indicates
-            // that some elements of the media cannot be played (e.g. video OR audio)
-            if (err != KErrNone && err != KNotCompleteVideoError)
-            {
-                CompletePrefetch(err);
-                return;
-            }
-
-            // Find out of this is a live stream
-            TBool liveStream = EFalse;
-            TRAP(err, liveStream = IsLiveStreamL());
-
-            if (err != KErrNone)
-            {
-                CompletePrefetch(err);
-                return;
-            }
-
-            if (liveStream)
-            {
-                TRAP(err, iPlayerDelegate =
-                         CMMAVideoUrlPlayerLiveStreamDelegate::NewL(*this));
-            }
-            else
-            {
-                iPlayerDelegate = new CMMAVideoUrlPlayerClipStreamDelegate(*this);
-                err = iPlayerDelegate ? KErrNone : KErrNoMemory;
-            }
-
-            if (err != KErrNone)
-            {
-                // could not create delegate
-                CompletePrefetch(err);
-                return;
-            }
-
-            iPlayerDelegate->HandleEvent(aEvent);
-        }
-        else
-        {
-            // All other events.
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAVideoUrlPlayer::HandleEvent: Calling CMMAVideoPlayer::HandleEvent()");
-            CMMAVideoPlayer::HandleEvent(aEvent);
-        }
-    }
-}
-
-void CMMAVideoUrlPlayer::HandleEventToParent(const TMMFEvent& aEvent)
-{
-    CMMAVideoPlayer::HandleEvent(aEvent);
-}
-
-// ----------------------------------------------------------------------------
-//
-// CMMAVideoUrlPlayerClipStreamDelegate
-//
-// ----------------------------------------------------------------------------
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerDelegate::
-CMMAVideoUrlPlayerDelegate(CMMAVideoUrlPlayer& aPlayer) :
-        iPlayer(aPlayer)
-{
-    // Nothing to be done.
-}
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerDelegate::~CMMAVideoUrlPlayerDelegate()
-{
-    // Nothing to be done.
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideourlplayerclipstreamdelegate.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2002 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:  Player delegate to handle RTSP live streaming
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideourlplayer.h"
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::
-CMMAVideoUrlPlayerClipStreamDelegate(CMMAVideoUrlPlayer& aPlayer) :
-        CMMAVideoUrlPlayerDelegate(aPlayer)
-{
-    // Nothing to be done.
-}
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::~CMMAVideoUrlPlayerClipStreamDelegate()
-{
-    // Nothing to be done.
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::StartL()
-{
-    iPlayer.CMMAMMFPlayerBase::StartL();
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::StopL(TBool aPostEvent)
-{
-    if (iPlayer.iState == EStarted)
-    {
-        User::LeaveIfError(iPlayer.iController.Pause());
-
-        if (aPostEvent)
-        {
-            TInt64 time;
-            iPlayer.GetMediaTime(&time);
-            iPlayer.PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-        // go back to prefetched state
-        iPlayer.ChangeState(EPrefetched);
-    }
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::GetMediaTime(TInt64* aMediaTime)
-{
-    iPlayer.CMMAMMFPlayerBase::GetMediaTime(aMediaTime);
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerClipStreamDelegate::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent %d", aEvent.iEventType.iUid);
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent error code: %d", aEvent.iErrorCode);
-
-    TInt err = aEvent.iErrorCode;
-
-    if ((aEvent.iEventType == KMMFEventCategoryVideoLoadingComplete) &&
-            (iPlayer.iState == ERealized))
-    {
-        // Call pause only when doing prefetch.
-        // Loading complete will come also when looping.
-        if (err == KErrNone)
-        {
-            err = iPlayer.iController.Pause();
-        }
-
-        // VideoLoadingComplete-event only completes prefetch sequence
-        // for non-live streams.
-        iPlayer.CompletePrefetch(err);
-    }
-    else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
-    {
-        // going to prefetch state, after Play
-        // KMMFEventCategoryVideoLoadingComplete event will be received
-
-        if (err == KErrNone)
-        {
-            iPlayer.PrepareDisplay();
-
-            // Buffering is done only for non-live streams.
-            err = iPlayer.iController.Play();
-        }
-
-        // For non-live streams: if error is other than
-        // KErrNone, then complete prefetch.
-        if (err != KErrNone)
-        {
-            // prefetch didn't succeed
-            iPlayer.CompletePrefetch(err);
-        }
-    }
-    else
-    {
-        // All other events.
-        iPlayer.HandleEventToParent(aEvent);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideourlplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating video player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideourlplayerfactory.h"
-#include "cmmavideourlplayer.h"
-#include "cmmavideocontrol.h"
-#include "cmmaaudiovolumecontrol.h"
-#include "cmmammfratecontrol.h"
-
-//  CONSTANTS
-const TInt KDefaultGranularity = 8;
-_LIT(KProtocolRtsp, "rtsp");
-_LIT(KRtspMimeType, "application/sdp");
-
-_LIT(KAudioXPnRmMimeType, "application/x-pn-realmedia");
-_LIT(KAudioRmMimeType, "application/vnd.rn-realmedia");
-_LIT(KAudio3gppMimeType, "audio/3gpp");
-_LIT(KAudio3gpp2MimeType, "audio/3gpp2");
-_LIT(KAudioAmrMimeType, "audio/amr");
-_LIT(KAudioMp4MimeType, "audio/mp4");
-_LIT(KAudioMp4LatmMimeType, "audio/mp4-latm");
-_LIT(KAudioQcelpMimeType, "audio/qcelp");
-_LIT(KAudioVndQcelpMimeType, "audio/vnd.qcelp");
-_LIT(KVideo3GppMimeType, "video/3gpp");
-_LIT(KVideo3Gpp2MimeType, "video/3gpp2");
-_LIT(KVideoMp4MimeType, "video/mp4");
-
-_LIT(KProtocolSeparator, "://");
-_LIT(KParameterSeparator, "?");
-
-CMMAVideoUrlPlayerFactory::CMMAVideoUrlPlayerFactory()
-{
-}
-
-
-CMMAVideoUrlPlayerFactory* CMMAVideoUrlPlayerFactory::NewLC()
-{
-    CMMAVideoUrlPlayerFactory* pFactory =
-        new(ELeave) CMMAVideoUrlPlayerFactory();
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-
-CMMAVideoUrlPlayerFactory::~CMMAVideoUrlPlayerFactory()
-{
-    delete iUrl;
-}
-
-
-CMMAPlayer* CMMAVideoUrlPlayerFactory::CreatePlayerL(const TDesC& /*aContentType*/)
-{
-    // Only creating with locator is supported
-    return NULL;
-}
-CMMAPlayer* CMMAVideoUrlPlayerFactory::CreatePlayerL(const TDesC& aProtocol,
-        const TDesC& aMiddlePart,
-        const TDesC& aParameters)
-{
-    // Is it rtsp:// protocol
-    if (aProtocol != KProtocolRtsp)
-    {
-        return NULL;
-    }
-    CMMFFormatSelectionParameters* fSelect =
-        CMMFFormatSelectionParameters::NewLC();
-
-    // combining the locator
-    HBufC* remadeLocator = HBufC::NewLC(aProtocol.Length() +
-                                        KProtocolSeparator().Length() +
-                                        aMiddlePart.Length() +
-                                        KParameterSeparator().Length() +
-                                        aParameters.Length());
-    TPtr loc = remadeLocator->Des();
-    loc.Append(aProtocol);
-    loc.Append(KProtocolSeparator);
-    loc.Append(aMiddlePart);
-    if (aParameters != KNullDesC)
-    {
-        loc.Append(KParameterSeparator);
-        loc.Append(aParameters);
-    }
-    delete iUrl;
-    iUrl = remadeLocator;
-    CleanupStack::Pop(remadeLocator);
-
-    // RTSP URLs without file extension:
-    // In case of file extensionless RTSP URL a predefined mime type
-    // is used to select controller. It is assumed that this mime
-    // type selects the controller that is capable to play any file
-    // extensionless RTSP URLs.
-    // To determine whether there is a file extension, it is checked whether
-    // there is a dot at all or if there is a slash after last dot in the
-    // URL. If there is a slash after last dot or if there is no dot at all,
-    // then there is no file extension.
-    TInt dotPos = aMiddlePart.LocateReverse('.');
-    TInt slashPos = aMiddlePart.LocateReverse('/');
-    if ((dotPos == KErrNotFound) || (slashPos > dotPos))
-    {
-        HBufC8* mimeBuf = HBufC8::NewLC(KRtspMimeType().Length());
-        TPtr8 mimePtr = mimeBuf->Des();
-        mimePtr.Copy(KRtspMimeType());
-        fSelect->SetMatchToMimeTypeL(mimePtr);
-        CleanupStack::PopAndDestroy(mimeBuf);
-    }
-    else
-    {
-        // Match to file name, using only middle part of the locator
-        fSelect->SetMatchToUriL(loc);
-    }
-
-    CMMAPlayer* player = CMMAMMFPlayerFactory::CreatePlayerL(fSelect);
-
-    CleanupStack::PopAndDestroy(fSelect);
-    return player;
-}
-
-CMMAPlayer* CMMAVideoUrlPlayerFactory::CreatePlayerL(
-    const TDesC8& /*aHeaderData*/)
-{
-    // We do not try to match headerdata
-    return NULL;
-}
-
-
-void CMMAVideoUrlPlayerFactory::GetSupportedContentTypesL(
-    const TDesC& aProtocol,
-    CDesC16Array& aMimeTypes)
-{
-    if ((aProtocol == KNullDesC) ||
-            (aProtocol == KProtocolRtsp))
-    {
-        aMimeTypes.AppendL(KAudio3gppMimeType);
-        aMimeTypes.AppendL(KAudio3gpp2MimeType);
-        aMimeTypes.AppendL(KAudioAmrMimeType);
-        aMimeTypes.AppendL(KAudioMp4MimeType);
-        aMimeTypes.AppendL(KAudioMp4LatmMimeType);
-        aMimeTypes.AppendL(KAudioQcelpMimeType);
-        aMimeTypes.AppendL(KAudioVndQcelpMimeType);
-        aMimeTypes.AppendL(KVideo3GppMimeType);
-        aMimeTypes.AppendL(KVideo3Gpp2MimeType);
-        aMimeTypes.AppendL(KVideoMp4MimeType);
-        aMimeTypes.AppendL(KAudioRmMimeType);
-        aMimeTypes.AppendL(KAudioXPnRmMimeType);
-        // plus RTSP content types
-        aMimeTypes.AppendL(KRtspMimeType);
-    }
-}
-
-
-void CMMAVideoUrlPlayerFactory::GetSupportedProtocolsL(
-    const TDesC& aContentType,
-    CDesC16Array& aProtocolArray)
-{
-    CDesC16ArraySeg* supportedCTs
-    = new(ELeave) CDesC16ArraySeg(KDefaultGranularity);
-    CleanupStack::PushL(supportedCTs);
-    GetSupportedContentTypesL(KNullDesC, *supportedCTs);
-    TInt ignore(0);
-    if ((supportedCTs->Find(aContentType, ignore) == 0) ||
-            (aContentType == KNullDesC))
-    {
-        aProtocolArray.AppendL(KProtocolRtsp);
-    }
-    CleanupStack::PopAndDestroy(supportedCTs);
-}
-
-CMMAPlayer* CMMAVideoUrlPlayerFactory::CreatePlayerL(
-    CMMAMMFResolver* aResolver)
-{
-    CMMAVideoUrlPlayer* player = CMMAVideoUrlPlayer::NewLC(aResolver,
-                                 *iUrl);
-
-    CMMAVideoControl* videoControl = new(ELeave) CMMAVideoControl(player);
-    CleanupStack::PushL(videoControl);
-    player->AddControlL(videoControl);
-    CleanupStack::Pop(videoControl);
-
-    CMMAAudioVolumeControl* audioVolumeControl = CMMAAudioVolumeControl::NewL(player);
-    CleanupStack::PushL(audioVolumeControl);
-    player->AddControlL(audioVolumeControl);
-    CleanupStack::Pop(audioVolumeControl);
-
-    CMMAMMFRateControl* rateControl = CMMAMMFRateControl::NewL(player);
-    CleanupStack::PushL(rateControl);
-    player->AddControlL(rateControl);
-    CleanupStack::Pop(rateControl);
-
-    CleanupStack::Pop(); // player
-    return player;
-}
-
-void CMMAVideoUrlPlayerFactory::MediaIdsL(RArray<TUid>& aMediaIds)
-{
-    User::LeaveIfError(aMediaIds.Append(KUidMediaTypeVideo));
-}
-
-CMMFPluginSelectionParameters::TMediaIdMatchType
-CMMAVideoUrlPlayerFactory::MediaIdMatchType()
-{
-    // We are now getting only Audio Controllers
-    return CMMFPluginSelectionParameters::EAllowOtherMediaIds;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavideourlplayerlivestreamdelegate.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Player delegate to handle RTSP live streaming
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmavideourlplayer.h"
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate*
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::NewL(CMMAVideoUrlPlayer& aPlayer)
-{
-    CMMAVideoUrlPlayerLiveStreamDelegate* self =
-        new(ELeave) CMMAVideoUrlPlayerLiveStreamDelegate(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::
-CMMAVideoUrlPlayerLiveStreamDelegate(CMMAVideoUrlPlayer& aPlayer) :
-        CMMAVideoUrlPlayerDelegate(aPlayer), iMediaStartTime(0),
-        iStoppedAtTime(0)
-{
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::ConstructL()
-{
-    iActiveSchedulerWait = new(ELeave)CActiveSchedulerWait;
-}
-
-CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::~CMMAVideoUrlPlayerLiveStreamDelegate()
-{
-    delete iActiveSchedulerWait;
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::StartL()
-{
-    // start can't be called to not ready player
-    ASSERT(iPlayer.iState == EPrefetched);
-
-
-    iPlayer.PrefetchL();
-
-    // Refresh all controls again after second prefetch
-    iPlayer.RefreshControls();
-
-    // Completed in VideoPrepareComplete-event
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StartL() ASW Start1");
-        iActiveSchedulerWait->Start();
-    }
-
-    // Prime() is called sometimes twice since it's needed also when
-    // restarting the playing
-    User::LeaveIfError(iPlayer.iController.Prime());
-    User::LeaveIfError(iPlayer.iController.Play());
-
-    // Completed in VideoLoadingComplete-event
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StartL() ASW Start2");
-        iActiveSchedulerWait->Start();
-    }
-    iPlayer.PostActionCompleted(KErrNone);   // java start return
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::StopL(TBool aPostEvent)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StopL");
-    if (iPlayer.iState == EStarted)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StopL : Started ");
-        GetMediaTime(&iStoppedAtTime);
-        if (aPostEvent)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StopL : Postevent ");
-            iPlayer.PostLongEvent(CMMAPlayerEvent::EStopped, iStoppedAtTime);
-        }
-        // go back to prefetched state
-        iPlayer.ChangeState(EPrefetched);
-
-        // Call stop instead of Pause as per the suggestions from helix
-        // Pause has no meaning for live streaming
-        iPlayer.iController.Stop();
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: StopL - ");
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::GetMediaTime +");
-    if (iPlayer.iState == EStarted)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::GetMediaTime Started Playerbase call");
-        iPlayer.CMMAMMFPlayerBase::GetMediaTime(aMediaTime);
-        *aMediaTime -= iMediaStartTime;
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::GetMediaTime Stopped");
-        *aMediaTime = iStoppedAtTime;
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::GetMediaTime -");
-}
-
-void CMMAVideoUrlPlayer::CMMAVideoUrlPlayerLiveStreamDelegate::HandleEvent(const TMMFEvent& aEvent)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: HandleEvent %d", aEvent.iEventType.iUid);
-    ELOG1( EJavaMMAPI, "MMA:CMMAVideoUrlPlayer: Live stream: HandleEvent error code: %d", aEvent.iErrorCode);
-
-    TInt err = aEvent.iErrorCode;
-
-    if ((aEvent.iEventType == KMMFEventCategoryVideoLoadingComplete) &&
-            (iPlayer.iState == EPrefetched))
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoLoadingComplete +");
-        if (err == KErrNone)
-        {
-            TTimeIntervalMicroSeconds position(0);
-            TInt error(iPlayer.iController.GetPosition(position));
-            if (error == KErrNone)
-            {
-                iMediaStartTime = position.Int64();
-            }
-
-            // inform java side. Always start playback from zero for
-            // live stream.
-            iPlayer.PostLongEvent(CMMAPlayerEvent::EStarted, 0);
-
-            // Buffering takes a long time, so player state is not changed
-            // until playback really starts.
-            iPlayer.ChangeState(EStarted);
-        }
-        if (iActiveSchedulerWait->IsStarted())
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoLoadingComplete ASW Stop");
-            iActiveSchedulerWait->AsyncStop();
-        }
-        if (err != KErrNone)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoLoadingComplete Error Inform Parent");
-            iPlayer.HandleEventToParent(aEvent);
-        }
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoLoadingComplete -");
-    }
-    else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPrepareComplete +");
-        // going to prefetch state, after Play
-        // KMMFEventCategoryVideoLoadingComplete event will be received
-
-        if (err == KErrNone)
-        {
-            iPlayer.PrepareDisplay();
-        }
-
-        // For live streams: complete prefetch.
-        // if activeschedulerwait is started, then
-        // do not complete prefetch as we are here
-        // as a result of calling StartL and not for
-        // PrefetchL.
-        if (!(iActiveSchedulerWait->IsStarted()))
-        {
-            iPlayer.CompletePrefetch(err);
-        }
-
-        if (iActiveSchedulerWait->IsStarted())
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPrepareComplete ASW Stop");
-            iActiveSchedulerWait->AsyncStop();
-        }
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPrepareComplete -");
-    }
-    else if (aEvent.iEventType == KMMFEventCategoryVideoPlayerGeneralError)
-    {
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPlayerGeneralError +");
-        // For live streams: KMMFEventCategoryVideoPlayerGeneralError means helix is closed
-        // side if player is in prefetched state.
-        if (iActiveSchedulerWait->IsStarted())
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPlayerGeneralError ASW Stop");
-            iActiveSchedulerWait->AsyncStop();
-        }
-
-        // usually error condition -45 (KErrSessionClosed) or -33 (KErrTimedOut)
-        if (err != KErrNone)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPlayerGeneralError Inform Parent");
-            iPlayer.HandleEventToParent(aEvent);
-        }
-        LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoPlayerGeneralError -");
-    }
-    else
-    {
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: + 0x%X", aEvent.iEventType.iUid);
-        // For live streams: KErrSessionClosed is not posted to Java
-        // side if player is in prefetched state.
-        if ((iPlayer.iState != EPrefetched) ||
-                (aEvent.iErrorCode != KErrSessionClosed))
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: Error Inform Parent");
-            // All other events.
-            iPlayer.HandleEventToParent(aEvent);
-        }
-        LOG1( EJavaMMAPI, EInfo, "MMA:CMMAVideoUrlPlayer: Live stream: - 0x%X", aEvent.iEventType.iUid);
-    }
-
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/cmmavolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for volume setting
-*
-*/
-
-
-//  INCLUDE FILES
-
-#include "cmmavolumecontrol.h"
-#include "cmmaplayer.h"
-#include <logger.h>
-
-_LIT(KMMAVolumeErrorMsg, "Can't set volume level");
-
-const TInt KMMAJavaSoundIndex = 0;
-const TInt KMMAGlobalVolumeSoundIndex = 2;
-
-void CMMAVolumeControl::StaticSetLevelL(CMMAVolumeControl* aVolumeControl,
-                                        TInt aLevel)
-{
-    // Java level is the first
-    aVolumeControl->SetVolumeLevelL(KMMAJavaSoundIndex, aLevel);
-}
-
-void CMMAVolumeControl::StaticGetLevelL(CMMAVolumeControl* aVolumeControl,
-                                        TInt* aLevel)
-{
-    // Java level is the first
-    aVolumeControl->GetVolumeLevelL(KMMAJavaSoundIndex, aLevel);
-}
-
-
-CMMAVolumeControl::CMMAVolumeControl(CMMAPlayer* aPlayer)
-        : iPlayer(aPlayer), iLevel(KMMAVolumeMaxLevel)
-{
-}
-
-
-CMMAVolumeControl::~CMMAVolumeControl()
-{
-    iLevels.Close();
-}
-
-
-void CMMAVolumeControl::ConstructBaseL()
-{
-    iPlayer->AddStateListenerL(this);
-
-    // Add level for java, will set in StaticSetLevelL method.
-    // In constructor iLevels array is empty and Java level will be the first,
-    // KMMAJavaSoundIndex.
-    AddLevelL();
-
-    iLevel = CalculateLevel();
-
-    // The default value is not yet known. Volume control may change the
-    // volume of the controller before it has been retrieved so when the
-    // state of the player is changed the Java volume is retrieved from
-    // the controller.
-    iLevels[ KMMAJavaSoundIndex ] = KErrNotFound;
-}
-
-const TDesC& CMMAVolumeControl::ClassName() const
-{
-    return KMMAVolumeControlName;
-}
-
-void CMMAVolumeControl::SetLevelL(TInt aLevel)
-{
-    // Level cannot be set to derived control if player is not prefetched.
-    if (iPlayer->State() > CMMAPlayer::ERealized)
-    {
-        DoSetLevelL(aLevel);
-    }
-    iLevel = aLevel;
-}
-
-void CMMAVolumeControl::StateChanged(TInt aState)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVolumeControl::StateChanged - state %d", aState);
-    // Set the volume if the player is prefetched
-    if (aState == CMMAPlayer::EPrefetched)
-    {
-        TRAPD(error,
-        {
-            // Get the default value for the Java sound level
-            if (iLevels[ KMMAJavaSoundIndex ] == KErrNotFound)
-            {
-                iLevels[ KMMAJavaSoundIndex ] = DoGetLevelL();
-                iLevel = CalculateLevel();
-            }
-            SetLevelL(iLevel);
-
-        });
-        if (error != KErrNone)
-        {
-            iPlayer->PostStringEvent(CMMAPlayerEvent::EError,
-                                     KMMAVolumeErrorMsg);
-        }
-    }
-
-    // Level is already set for Global Volume so no need to set it again
-    // Notify the initial global volume value to java
-    // Notify only if STATE == CMMAPlayer::ERealized
-    // Error ID AKUR-7G69Q5 GLOBAL VOLUME EVENT CR
-    if (aState == CMMAPlayer::ERealized)
-    {
-        if ((iLevels.Count() - 1) == KMMAGlobalVolumeSoundIndex)
-        {
-            LOG( EJavaMMAPI, EInfo, "MMA::CMMAVolumeControl::StateChanged : Post GLOBAL VOL EVENT  ");
-            if (iLevels[ KMMAGlobalVolumeSoundIndex ] != KErrNotFound)
-            {
-                LOG1( EJavaMMAPI, EInfo, "MMA::CMMAVolumeControl::StateChanged : Post complete Val = %d ",iLevels[ KMMAGlobalVolumeSoundIndex ]);
-                iPlayer->PostLongEvent(CMMAPlayerEvent::ENOKIA_EXTERNAL_VOLUME_EVENT,
-                                       iLevels[ KMMAGlobalVolumeSoundIndex ]);
-            }
-        }
-    }
-}
-
-void CMMAVolumeControl::RefreshVolume()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVolumeControl::RefreshVolume ++ ");
-    TRAPD(error,
-    {
-        // Get the default value for the Java sound level
-        if (iLevels[ KMMAJavaSoundIndex ] == KErrNotFound)
-        {
-            iLevels[ KMMAJavaSoundIndex ] = DoGetLevelL();
-            iLevel = CalculateLevel();
-        }
-        SetLevelL(iLevel);
-
-    });
-
-    if (error != KErrNone)
-    {
-        iPlayer->PostStringEvent(CMMAPlayerEvent::EError,
-                                 KMMAVolumeErrorMsg);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMAVolumeControl::RefreshVolume -- ");
-}
-
-void CMMAVolumeControl::RefreshControl()
-{
-    RefreshVolume();
-}
-
-EXPORT_C TInt CMMAVolumeControl::AddLevelL()
-{
-    User::LeaveIfError(iLevels.Append(KMMAVolumeMaxLevel));
-
-    // New level is the last element
-    return iLevels.Count() - 1;
-}
-
-EXPORT_C void CMMAVolumeControl::SetVolumeLevelL(TInt aLevelIndex,
-        TInt aVolumeLevel)
-{
-    LOG2( EJavaMMAPI, EInfo, "CMMAVolumeControl::SetVolumeLevelL - setting index %d, level %d",
-               aLevelIndex, aVolumeLevel);
-    if (0 >= iLevels.Count() ||  iLevels.Count() > 3)
-    {
-        return ;
-    }
-    TInt oldVolumeLevel = iLevels[ aLevelIndex ];
-    iLevels[ aLevelIndex ] = aVolumeLevel;
-    SetLevelL(CalculateLevel());
-
-    // send event if level is really changed
-    if ((aLevelIndex == KMMAJavaSoundIndex) &&
-            (aVolumeLevel != oldVolumeLevel))
-    {
-        iPlayer->PostObjectEvent(CMMAPlayerEvent::EVolumeChanged,
-                                 iControlObject);
-    }
-
-    // send event if global volume level is really changed
-    // Error ID AKUR-7G69Q5 GLOBAL VOLUME EVENT CR
-    if ((aLevelIndex == KMMAGlobalVolumeSoundIndex) &&
-            (aVolumeLevel != oldVolumeLevel))
-    {
-
-        iPlayer->PostLongEvent(CMMAPlayerEvent::ENOKIA_EXTERNAL_VOLUME_EVENT,
-                               iLevels[ aLevelIndex ]);
-    }
-}
-
-void CMMAVolumeControl::GetVolumeLevelL(TInt aLevelIndex,
-                                        TInt* aVolumeLevel)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAVolumeControl::GetVolumeLevelL - level index %d", aLevelIndex);
-
-    // Return max volume if the default Java volume level is not yet known
-    if (aLevelIndex == KMMAJavaSoundIndex &&
-            iLevels[ KMMAJavaSoundIndex ] == KErrNotFound)
-    {
-        *aVolumeLevel = KMMAVolumeMaxLevel;
-        return;
-    }
-
-    *aVolumeLevel = iLevels[ aLevelIndex ];
-
-    LOG1( EJavaMMAPI, EInfo, "CMMAVolumeControl::GetVolumeLevelL - level %d", *aVolumeLevel);
-}
-
-TInt CMMAVolumeControl::CalculateLevel()
-{
-    TInt levelCount = iLevels.Count();
-
-    // 64 bit integer must be used to have more than 4 levels.
-    TInt64 level = KMMAVolumeMaxLevel;
-    TInt64 sum = 1;
-
-    // All levels in the array are percentage of the max volume (0..100).
-    // Actual sound level will be multiplying all levels.
-    for (TInt i = 0; i < levelCount; i++)
-    {
-        // If the level is not known it is expected to be max volume
-        level = (iLevels[ i ] == KErrNotFound ?
-                 level * KMMAVolumeMaxLevel :
-                 level * iLevels[ i ]);
-        sum *= KMMAVolumeMaxLevel;
-    }
-    return level / sum;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/controlcontainer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2002 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 file contains ControlContainer JNI functions
-*
-*/
-
-#include <logger.h>
-#include "com_nokia_microedition_media_ControlContainer.h"
-
-#include "cmmaplayer.h"
-#include "cmmacontrol.h"
-#include "s60commonutils.h"
-
-using namespace java::util;
-
-//#include "mmapiutils.h"
-//#include "jutils.h"
-
-
-/**
- * JNI function
- */
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_ControlContainer__1getControlClassName
-(JNIEnv* aJni, jclass,
- jint aControlHandle)
-{
-    CMMAControl* control =
-        reinterpret_cast< CMMAControl* >(aControlHandle);
-
-    const TDesC& className = control->ClassName();
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::ControlContainer.cpp::getControlClassName name = %S",
-              className.Ptr());
-
-    // Create Java String from class name and return it
-    return (className == KNullDesC) ? NULL : S60CommonUtils::NativeToJavaString(*aJni, className);
-}
-
-/**
- * JNI function
- */
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_ControlContainer__1getPublicControlClassName
-(JNIEnv* aJni, jclass,
- jint aControlHandle)
-{
-    CMMAControl* control =
-        reinterpret_cast< CMMAControl* >(aControlHandle);
-
-    const TDesC& className = control->PublicClassName();
-
-    LOG1( EJavaMMAPI, EInfo, "MMA::ControlContainer.cpp::getPublicControlClassName name = %S",
-              className.Ptr());
-
-    // Create Java String from class name and return it
-    return (className == KNullDesC) ? NULL : S60CommonUtils::NativeToJavaString(*aJni, className);
-}
-
-/**
- * JNI function
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_ControlContainer__1getControlsCount
-(JNIEnv*, jclass,
- jint aPlayerHandle)
-{
-    CMMAPlayer* player =
-        reinterpret_cast< CMMAPlayer *>(aPlayerHandle);
-    LOG1( EJavaMMAPI, EInfo, "MMA::ControlContainer.cpp::getControlsCount count = %d",
-              player->ControlCount());
-    return player->ControlCount();
-}
-
-/**
- * JNI function
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_ControlContainer__1getControlHandle
-(JNIEnv*, jclass,
- jint aPlayerHandle, jint aControlIndex)
-{
-    CMMAPlayer* player =
-        reinterpret_cast< CMMAPlayer *>(aPlayerHandle);
-
-    // Get control and make Java handle
-    return reinterpret_cast<TInt>(player->Control(aControlIndex));
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/controlimpl.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAControl
-*
-*/
-
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-
-#include "com_nokia_microedition_media_control_ControlImpl.h"
-#include "mmafunctionserver.h"
-#include "cmmacontrol.h"
-
-/*
- * Class:     com_nokia_microedition_media_control_ControlImpl
- * Method:    _setHandle
- */
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_ControlImpl__1setHandle
-(JNIEnv* aJni, jclass , jint aEventSource, jint aControlHandle, jobject aControlObject)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAControl* control =
-        reinterpret_cast< CMMAControl* >(aControlHandle);
-    jobject controlObject = aJni->NewWeakGlobalRef(aControlObject);
-
-    eventSource->ExecuteV(&CMMAControl::StaticSetHandle,
-                          control, controlObject);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/display.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#include "logger.h"
-#include "com_nokia_microedition_media_control_BaseDisplay.h"
-#include "cmmadisplay.h"
-
-/*
- * Class:     com_nokia_microedition_media_control_BaseDisplay
- * Method:    _setVisible
- * Signature: (IIZ)I
- */
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_BaseDisplay__1nativeMethodCallInUiThread
-  (JNIEnv *, jobject, jint nativeDisplayHandle, jint nativeFunctionID)
-  {
-   LOG(EJavaMMAPI,EInfo,"JNI_Display.cpp : nativeMethodCallInUiThread +");
-	 CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
-   display ->CalledBackInUiThread(nativeFunctionID);
-   LOG(EJavaMMAPI,EInfo,"JNI_Display.cpp : nativeMethodCallInUiThread -");
-  }
-
--- a/javauis/mmapi_qt/baseline/src/framepositioningcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAFramePositioningControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_FramePositioningControl.h"
-#include "mmafunctionserver.h"
-#include "cmmaframepositioningcontrol.h"
-#include <logger.h>
-
-/**
- * Local function which can be used to call CMMAFramePositioningControl class methods.
- * Type of of the function pointer must be
- * TInt CMMAFramePositioningControl::aFunc( TInt )
- *
- * @param aFramePositioningControl CMMAFramePositioningControl pointer.
- * @param aFuncL Pointer to the CMMAFramePositioningControl method.
- * @param aParam Parameter value for aFuncL method.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntFuncIntL(CMMAFramePositioningControl* aFramePositioningControl,
-                               TInt(CMMAFramePositioningControl::*aFuncL)(TInt aParam),
-                               TInt aParam,
-                               TInt* aReturnValue)
-{
-    // call TInt CMMAFramePositioningControl::aFunc( TInt ) method.
-    *aReturnValue = (aFramePositioningControl->*aFuncL)(aParam);
-}
-
-//
-// JNI functions. Prototypes are generated and commented in Java class
-// com_nokia_microedition_media_control_FramePositioningControl
-//
-
-/**
- * JNI function from com.nokia.microedition.media.control.FramePositioningControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_FramePositioningControl__1seek
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aFrameNumber)
-{
-    LOG( EJavaMMAPI, EInfo, "FramePositioningControl__1seek");
-
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    CMMAFramePositioningControl* FramePositioningControl =
-        reinterpret_cast< CMMAFramePositioningControl* >(aControlHandle);
-
-    // Will leave on error. Otherwise returnValue contains frame number
-    // to which the implementation has seeked.
-    TInt returnValue = 0;
-    TInt error = eventSource->ExecuteTrap(&ReturnIntFuncIntL,
-                                          FramePositioningControl,
-                                          &CMMAFramePositioningControl::SeekL,
-                                          aFrameNumber,
-                                          &returnValue);
-   LOG1( EJavaMMAPI, EInfo, "FramePositioningControl__1seek error= %d",error);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.FramePositioningControl
- */
-JNIEXPORT jintArray JNICALL
-Java_com_nokia_microedition_media_control_FramePositioningControl__1skip
-(JNIEnv* aJniEnv,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jintArray aValues)
-{
-    LOG( EJavaMMAPI, EInfo, "FramePositioningControl__1skip");
-
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAFramePositioningControl* FramePositioningControl =
-        reinterpret_cast< CMMAFramePositioningControl* >(aControlHandle);
-
-    TInt value[ 2 ];
-    aJniEnv->GetIntArrayRegion(aValues, 0, 2, &value[ 0 ]);
-
-    // Will leave on error. Otherwise returnValue contains number of frames
-    // skipped.
-    value[ 1 ] = eventSource->ExecuteTrap(&ReturnIntFuncIntL,
-                                          FramePositioningControl,
-                                          &CMMAFramePositioningControl::SkipL,
-                                          value[ 0 ],
-                                          &value[ 0 ]);
-
-    if (aValues)
-    {
-        aJniEnv->SetIntArrayRegion(aValues, 0, 2, &value[ 0 ]);
-    }
-
-    return aValues;
-}
-
-/**
- * Local function which can be used to call CMMAFramePositioningControl class methods.
- * Type of of the function pointer must be
- * void CMMAFramePositioningControl::aFunc( TInt, TInt64* )
- *
- * @param aFramePositioningControl CMMAFramePositioningControl pointer.
- * @param aFuncL Pointer to the CMMAFramePositioningControl method.
- * @param aParam Parameter value for aFuncL
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void VoidFuncInt64L(CMMAFramePositioningControl* aFramePositioningControl,
-                            void (CMMAFramePositioningControl::*aFuncL)(
-                                TInt aParam,
-                                TInt64* aReturnValue),
-                            TInt aParam,
-                            TInt64* aReturnValue)
-{
-    // call void CMMAFramePositioningControl::aFunc( TInt, TInt64 ) method.
-    (aFramePositioningControl->*aFuncL)(aParam, aReturnValue);
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.FramePositioningControl
- */
-JNIEXPORT jlong JNICALL
-Java_com_nokia_microedition_media_control_FramePositioningControl__1mapFrameToTime
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aFrameNumber)
-{
-    LOG( EJavaMMAPI, EInfo, "FramePositioningControl__1mapFrameToTime");
-
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-		reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-    
-	CMMAFramePositioningControl* FramePositioningControl =
-        reinterpret_cast< CMMAFramePositioningControl* >(aControlHandle);
-
-    // Will leave on error. Media time of frame in question.
-    TInt64 returnValue(0);
-    TInt error = eventSource->ExecuteTrap(&VoidFuncInt64L,
-                                          FramePositioningControl,
-                                          &CMMAFramePositioningControl::MapFrameToTimeL,
-                                          aFrameNumber,
-                                          &returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * Local function which can be used to call CMMAFramePositioningControl class methods.
- * Type of of the function pointer must be
- * TInt CMMAFramePositioningControl::aFunc( TInt64* )
- *
- * @param aFramePositioningControl CMMAFramePositioningControl pointer.
- * @param aFuncL Pointer to the CMMAFramePositioningControl method.
- * @param aParam Parameter value for aFuncL method.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntFuncInt64L(CMMAFramePositioningControl* aFramePositioningControl,
-                                 TInt(CMMAFramePositioningControl::*aFuncL)(TInt64* aParam),
-                                 TInt64* aParam,
-                                 TInt* aReturnValue)
-{
-    // call TInt CMMAFramePositioningControl::aFunc() method.
-    *aReturnValue = (aFramePositioningControl->*aFuncL)(aParam);
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.FramePositioningControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_FramePositioningControl__1mapTimeToFrame
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jlong aMediaTime)
-{
-    LOG( EJavaMMAPI, EInfo, "FramePositioningControl__1mapFrameToTime");
-
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    CMMAFramePositioningControl* FramePositioningControl =
-        reinterpret_cast< CMMAFramePositioningControl* >(aControlHandle);
-
-    // Will leave on error. Media time of frame in question.
-    TInt returnValue = 0;
-    TInt error = eventSource->ExecuteTrap(&ReturnIntFuncInt64L,
-                                          FramePositioningControl,
-                                          &CMMAFramePositioningControl::MapTimeToFrameL,
-                                          &aMediaTime,
-                                          &returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/itemdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAItemDisplay
-*
-*/
-
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-#include "com_nokia_microedition_media_control_VideoItem.h"
-#include "mmafunctionserver.h"
-#include "cmmaitemdisplay.h"
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoItem__1sizeChanged
-(JNIEnv*, jobject,
- jint aEventSourceHandle,
- jint aDisplayHandle,
- jint aWidth,
- jint aHeight)
-{
-    CMMAItemDisplay* itemDisplay = reinterpret_cast< CMMAItemDisplay* >(aDisplayHandle);
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    __ASSERT_DEBUG(itemDisplay != NULL,
-                   User::Panic(_L("itemdisplay::control is null"),
-                               KErrArgument));
-    __ASSERT_DEBUG(eventSource != NULL,
-                   User::Panic(_L("itemdisplay::eventsource is null"),
-                               KErrArgument));
-
-    TInt err = eventSource->ExecuteTrap(&CMMAItemDisplay::SizeChangedL,
-                                        itemDisplay,
-                                        aWidth,
-                                        aHeight);
-
-    return err;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoItem__1getMinContentWidth
-(JNIEnv*, jobject,
- jint aEventSourceHandle,
- jint aDisplayHandle)
-{
-    CMMAItemDisplay* itemDisplay = reinterpret_cast< CMMAItemDisplay* >(aDisplayHandle);
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    TSize size;
-    eventSource->ExecuteV(CMMAItemDisplay::StaticSourceSize,
-                          itemDisplay,
-                          (TSize*)&size);
-    return size.iWidth;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoItem__1getMinContentHeight
-(JNIEnv*, jobject,
- jint aEventSourceHandle,
- jint aDisplayHandle)
-{
-    CMMAItemDisplay* itemDisplay = reinterpret_cast< CMMAItemDisplay *>(aDisplayHandle);
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    TSize size;
-    eventSource->ExecuteV(CMMAItemDisplay::StaticSourceSize,
-                          itemDisplay,
-                          (TSize*)&size);
-    return size.iHeight;
-}
-
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoItem__1getPrefContentHeight
-(JNIEnv*, jobject,
- jint aEventSourceHandle,
- jint aDisplayHandle,
- jint /*aTentative*/)  // tentative value is ignored because current
-// implementation returns always -1
-{
-    CMMAItemDisplay* itemDisplay = reinterpret_cast< CMMAItemDisplay* >(aDisplayHandle);
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    TSize size;
-    eventSource->ExecuteV(CMMAItemDisplay::StaticSourceSize,
-                          itemDisplay,
-                          (TSize*)&size);
-    return size.iHeight;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoItem__1getPrefContentWidth
-(JNIEnv*, jobject,
- jint aEventSourceHandle,
- jint aDisplayHandle,
- jint /*aTentative*/)  // tentative value is ignored because current
-// implementation returns always -1
-{
-    CMMAItemDisplay* itemDisplay = reinterpret_cast< CMMAItemDisplay *>(aDisplayHandle);
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    TSize size;
-    eventSource->ExecuteV(CMMAItemDisplay::StaticSourceSize,
-                          itemDisplay,
-                          (TSize*)&size);
-    return size.iWidth;
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/managerimpl.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has ManagerImpl JNI functions
-*
-*/
-
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-#include "com_nokia_microedition_media_ManagerImpl.h"
-#include "cmmamanager.h"
-#include "cmmaplayer.h"
-#include "jstringutils.h"
-#include "s60commonutils.h"
-using namespace java::util;
-
-const TInt KMMADefaultArrayGranularity = 8;
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_ManagerImpl__1dispose
-(JNIEnv* aJni, jobject, jint aEventSourceHandle)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA::ManagerImpl dispose");
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    delete eventSource; 
-}
-
-LOCAL_C void ReleaseEventSource(MMAFunctionServer* aEventSource)
-{
-    aEventSource->Release();
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_ManagerImpl__1release
-(JNIEnv*, jobject, jint aEventSourceHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::ManagerImpl release");
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    eventSource->ExecuteV(&ReleaseEventSource,
-                          eventSource);
-}
-
-/*
- * Class:     javax_microedition_media_Manager
- * Method:    _createManager
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_ManagerImpl__1createManager
-(JNIEnv*, jobject, jint aEventSourceHandle, jint aMIDletSuiteID)
-{
-	MMAFunctionServer* eventSource =  reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CMMAManager* manager = NULL;
-    TInt error = eventSource->ExecuteTrap(&CMMAManager::StaticCreateManagerL,
-                                          &manager,
-                                          aMIDletSuiteID);
-    ELOG1( EJavaMMAPI, "MMA::ManagerImpl createManager StaticCreateManagerL %d",
-              error);
-    if (error != KErrNone)
-    {
-        return error;
-    }
-
-    TInt managerHandle( reinterpret_cast<TInt>(manager));
-
-    error = eventSource->ExecuteTrap(MMAFunctionServer::StaticAddObjectFromHandleL,
-                                     eventSource,
-                                     managerHandle);
-
-    ELOG1( EJavaMMAPI, "MMA::ManagerImpl createManager StaticAddObjectFromHandleL %d",
-              error);
-
-    if (error != KErrNone)
-    {
-        // Adding manager to event source failed.
-        delete manager;
-
-        // Error code will be returned to java
-        managerHandle = error;
-    }
-    LOG1( EJavaMMAPI, EInfo, "MMA::ManagerImpl createManager %d",
-              managerHandle);
-    return managerHandle;
-}
-
-
-LOCAL_C void InvokeConstructSvrL(MMAFunctionServer* aEventSource)
-{
-    aEventSource->ConstructSvrL();
-}
-
-/*
- * Class:     javax_microedition_media_Manager
- * Method:    _getEventSource
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_ManagerImpl__1createEventSource
-(JNIEnv* aJni, jobject aPeer)
-{
-    TInt eventSourceHandle = MMAFunctionServer::NewL(*aJni, aPeer);
-    if (eventSourceHandle > KErrNone)
-    {
-        MMAFunctionServer* eventSource =
-            reinterpret_cast< MMAFunctionServer* >(eventSourceHandle);
-
-        // third phase construction
-        TInt error = eventSource->ExecuteTrap(&InvokeConstructSvrL,
-                                              eventSource);
-        if (error != KErrNone)
-        {
-            eventSourceHandle = error;
-        }
-    }
-    LOG1( EJavaMMAPI, EInfo, "MMA::ManagerImpl createEventSource %d",
-              eventSourceHandle);
-    return eventSourceHandle;
-}
-
-/**
- * Local function which can be used to call CMMAManager class methods.
- * Type of of the function pointer must be
- * void CMMAManager::aFuncL( RPointerArray< HBufC >&, const TDesC& )
- * Java String array will be created and set to aArray variable.
- *
- * @param aManager CMMAManager instance.
- * @param aFuncL Pointer to the CMMAManager method.
- * @param aJni Used to create an array.
- * @param aArray Values got from aFuncL will be copied to this array.
- * @param aParam Parameter that will be passed to aFuncL method.
- */
-LOCAL_C void GetObjectArrayL(MMAFunctionServer* aEventSource,
-    CMMAManager* aManager,
-    void (CMMAManager::*aFuncL)(const TDesC&,
-                                CDesC16Array&),
-    JNIEnv* aJni,
-    jobjectArray* aArray,
-    const TDesC* aParam)
-{
-    // Temporary descriptor array to be copied to Java array.
-    CDesC16ArrayFlat* values = new(ELeave) CDesC16ArrayFlat(
-        KMMADefaultArrayGranularity);
-    CleanupStack::PushL(values);
-
-    // Call void CMMAManager::aFuncL( const TDesC&, RPointerArray< HBufC >& )
-    // method. Method can leave.
-    // Elements of the array will be owned by this method.
-    (aManager->*aFuncL)(*aParam, *values);
-
-    // JNI interface pointer can't be passed to different thread, so
-    // it is needed to get valid JNI interface pointer for Event Server thread
-  	aJni =aEventSource->getValidJniEnv();
-
-    // Create new java String array and copy values from the values array
-    *aArray = MMAPIUtils::CopyToNewJavaStringArrayL(*aJni, *values);
-    CleanupStack::PopAndDestroy(values);
-}
-
-
-/*
- * Class:     javax_microedition_media_Manager
- * Method:    _getSupportedContentTypes
- * Signature: (II)[[B
- */
-JNIEXPORT jobjectArray JNICALL Java_com_nokia_microedition_media_ManagerImpl__1getSupportedContentTypes
-(JNIEnv* aJni,
- jclass,
- jint aEventSourceHandle,
- jint aManagerHandle,
- jstring aProtocol)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer * >(aEventSourceHandle);
-    CMMAManager* manager = reinterpret_cast< CMMAManager *>(aManagerHandle);
-
-    jobjectArray contentTypes = NULL;
-
-    // Create descritor from Java String.
-    // JStringUtils is derived from TPtrC16 and is save to cast to TDesC
-    JStringUtils tmp(*aJni, aProtocol);
-    const TDesC* protocol = &tmp;
-    if (aProtocol == NULL)
-    {
-        protocol = &KNullDesC;
-    }
-
-    // Call manager->GetSupportedContentTypesL and create Java array.
-    TInt err = eventSource->ExecuteTrap(&GetObjectArrayL,
-    																	  eventSource,
-                                        manager,
-                                        &CMMAManager::GetSupportedContentTypesL,
-                                        aJni,
-                                        &contentTypes,
-                                        protocol);
-
-    if (err != KErrNone)
-    {
-        // Something failed. Returning NULL, because contentTypes array may not
-        // be complete. contentTypes array is left for carbage collertor,
-        // because it can't be released.
-        return NULL;
-    }
-    return contentTypes;
-}
-
-/*
- * Class:     javax_microedition_media_Manager
- * Method:    _getSupportedProtocols
- * Signature: (II)[[B
- */
-JNIEXPORT jobjectArray JNICALL Java_com_nokia_microedition_media_ManagerImpl__1getSupportedProtocols
-(JNIEnv* aJni,
- jclass,
- jint aEventSourceHandle,
- jint aManagerHandle,
- jstring aContentType)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-    CMMAManager* manager = reinterpret_cast< CMMAManager *>(aManagerHandle);
-
-    jobjectArray protocols = NULL;
-
-    // Create descritor from Java String.
-    // JStringUtils is derived from TPtrC16 and is save to cast to TDesC
-    JStringUtils tmp(*aJni, aContentType);
-    const TDesC* contentType = &tmp;
-    if (aContentType == NULL)
-    {
-        contentType = &KNullDesC;
-    }
-
-    // Call manager->GetSupportedProtocolsL and create Java array.
-    TInt err = eventSource->ExecuteTrap(&GetObjectArrayL,
-    																		eventSource,
-                                        manager,
-                                        &CMMAManager::GetSupportedProtocolsL,
-                                        aJni,
-                                        &protocols,
-                                        contentType);
-    if (err != KErrNone)
-    {
-        // Something failed. Returning NULL, because contentTypes array may not
-        // be complete. contentTypes array is left for carbage collertor,
-        // because it can't be released.
-        return NULL;
-    }
-    return protocols;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/metadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAMetaDataControl
-*
-*/
-
-
-#include <logger.h>
-#include "com_nokia_microedition_media_control_MetaDataControl.h"
-
-#include "mmafunctionserver.h"
-#include "cmmametadatacontrol.h"
-#include "s60commonutils.h"
-#include "jstringutils.h"
-using namespace java::util;
-    
-//#include "mmapiutils.h"
-
-
-/* ...getKeyCount
- *
- * Returns the number of metadata keys or symbian error code
- */
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_MetaDataControl__1getKeysCount
-(JNIEnv* /*aJniEnv*/, jobject, jint aEventSourceHandle, jint aMetaDataControlHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    CMMAMetaDataControl* metaDataControl =
-        reinterpret_cast< CMMAMetaDataControl* >(aMetaDataControlHandle);
-
-    TInt keys;
-    TInt err = eventSource->ExecuteTrap(&CMMAMetaDataControl::StaticKeysCountL, metaDataControl, &keys);
-
-    return err == KErrNone ? keys : err;
-}
-
-
-/* ... getKey
- *
- * Get the key name at the given index from the actual native implementation. If no key is available,
- * return null.
- *
- * The ownership of the native data is received from the actual native implementation.
- * The data is duplicated to the Java side and the native data is destroyed here.
- */
-
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_control_MetaDataControl__1getKey
-(JNIEnv* aJniEnv, jobject, jint aEventSourceHandle, jint aMetaDataControlHandle, jint aIndex)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMAMetaDataControl* metaDataControl =
-        reinterpret_cast< CMMAMetaDataControl* >(aMetaDataControlHandle);
-
-    HBufC* key = NULL;
-    jstring javaStr = NULL;
-
-    TInt err = eventSource->ExecuteTrap(&CMMAMetaDataControl::StaticKeyL, metaDataControl, &key, aIndex);
-
-    if (err == KErrNone)
-    {
-        javaStr = S60CommonUtils::NativeToJavaString(*aJniEnv, key->Des());
-    }
-    delete key;
-
-    return javaStr;
-}
-
-/* ...getKeyValue
- *
- * Get the value of the given key from the actual native implementation. If no key is available,
- * return null (as specified in the MetaDataControl interface).
- *
- * The ownership of the native data is received from the actual native implementation.
- * The data is duplicated to the Java side and the native data is destroyed here.
- */
-
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_control_MetaDataControl__1getKeyValue
-(JNIEnv* aJniEnv, jobject, jint aEventSourceHandle, jint aMetaDataControlHandle, jstring aKey)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMetaDataControl* metaDataControl =
-        reinterpret_cast< CMMAMetaDataControl* >(aMetaDataControlHandle);
-
-    HBufC* value = NULL;
-    JStringUtils key(*aJniEnv, aKey);
-
-    TInt retVal = eventSource->ExecuteTrap(
-                      &CMMAMetaDataControl::StaticKeyValueL,
-                      metaDataControl,
-                      &value,
-                      (TDesC*) &key);
-
-    jstring retString = NULL;
-
-    if (KErrNone == retVal)
-    {
-        retString = S60CommonUtils::NativeToJavaString(*aJniEnv, *value);
-    }
-
-    delete value;
-
-    return retString;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/midicontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAMIDIControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_MIDIControl.h"
-#include "mmafunctionserver.h"
-#include "cmmamidicontrol.h"
-#include <logger.h>
-
-/**
- * Local function which is used to call CMMAMIDIControl class method.
- * Type of of the function pointer must be
- * void CMMAMIDIControl::aFunc( TInt, TInt, TInt )
- *
- * @param aMIDIControl CMMAMIDIControl pointer.
- * @param aFunc Pointer to the CMMAMIDIControl method.
- * @param aParam1 Parameter passed to the aFunc.
- * @param aParam2 Parameter passed to the aFunc.
- * @param aParam3 Parameter passed to the aFunc.
- */
-LOCAL_C void ReturnVoidParam3IntFuncL(
-    CMMAMIDIControl* aMIDIControl,
-    void (CMMAMIDIControl::*aFuncL)(TInt, TInt, TInt),
-    TInt aParam1,
-    TInt aParam2,
-    TInt aParam3)
-{
-    // call TInt CMMAMIDIControl::aFunc( TInt, TInt, TInt ) method.
-    (aMIDIControl->*aFuncL)(aParam1, aParam2, aParam3);
-}
-
-/**
- * Implements generated JNI function prototype.
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_MIDIControl__1setProgram
-(
-    JNIEnv*,
-    jobject,
-    jint aControlHandle,
-    jint aEventSourceHandle,
-    jint aChannel,
-    jint aBank,
-    jint aProgram)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDIControl* midiControl =
-        reinterpret_cast< CMMAMIDIControl *>(aControlHandle);
-
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnVoidParam3IntFuncL,
-                                     midiControl,
-                                     &CMMAMIDIControl::SetProgramL,
-                                     aChannel,
-                                     aBank,
-                                     aProgram);
-
-    return error;
-}
-
-/**
- * Local function which is used to call CMMAMIDIControl class method.
- * Type of of the function pointer must be
- * TInt CMMAMIDIControl::aFunc( TInt )
- *
- * @param aMIDIControl CMMAMIDIControl pointer.
- * @param aFunc Pointer to the CMMAMIDIControl method.
- * @param aData Parameter passed to the aFunc.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntParamIntFuncL(
-    CMMAMIDIControl* aMIDIControl,
-    TInt(CMMAMIDIControl::*aFuncL)(TInt aData),
-    TInt aData,
-    TInt* aReturnValue)
-{
-    // call TInt CMMAMIDIControl::aFunc( TDesC* aData ) method.
-    *aReturnValue = (aMIDIControl->*aFuncL)(aData);
-}
-
-/**
- * Implements generated JNI function prototype.
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_MIDIControl__1getChannelVolume
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aChannel)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-    CMMAMIDIControl* midiControl =
-        reinterpret_cast< CMMAMIDIControl *>(aControlHandle);
-
-
-    TInt returnValue = 0;
-    TInt error;
-
-    error = eventSource->ExecuteTrap(&ReturnIntParamIntFuncL,
-                                     midiControl,
-                                     &CMMAMIDIControl::ChannelVolumeL,
-                                     aChannel,
-                                     &returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * Local function which is used to call CMMAMIDIControl class method.
- * Type of of the function pointer must be
- * void CMMAMIDIControl::aFunc( TInt, TInt )
- *
- * @param aMIDIControl CMMAMIDIControl pointer.
- * @param aFunc Pointer to the CMMAMIDIControl method.
- * @param aParam1 Parameter passed to the aFunc.
- * @param aParam2 Parameter passed to the aFunc.
- */
-LOCAL_C void ReturnVoidParamIntIntFuncL(
-    CMMAMIDIControl* aMIDIControl,
-    void (CMMAMIDIControl::*aFuncL)(TInt, TInt),
-    TInt aParam1,
-    TInt aParam2)
-{
-    // call TInt CMMAMIDIControl::aFunc( TInt, TInt ) method.
-    (aMIDIControl->*aFuncL)(aParam1, aParam2);
-}
-
-/**
- * Implements generated JNI function prototype.
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_MIDIControl__1setChannelVolume
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aChannel,
- jint aVolume)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDIControl* midiControl =
-        reinterpret_cast< CMMAMIDIControl *>(aControlHandle);
-
-    TInt error = eventSource->ExecuteTrap(&ReturnVoidParamIntIntFuncL,
-                                          midiControl,
-                                          &CMMAMIDIControl::SetChannelVolumeL,
-                                          aChannel,
-                                          aVolume);
-
-    return error;
-}
-
-/**
- * Local function which can be used to call CMMAMIDIControl class methods.
- * Type of of the function pointer must be
- * TInt CMMAMIDIControl::aFunc( TDesC* aData )
- *
- * @param aMIDIControl CMMAMIDIControl pointer.
- * @param aFunc Pointer to the CMMAMIDIControl method.
- * @param aData Parameter passed to the aFunc.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void SendMIDIEventFuncL(
-    CMMAMIDIControl* aMIDIControl,
-    TInt(CMMAMIDIControl::*aFuncL)(const TDesC8* aData),
-    const TDesC8* aData,
-    TInt* aReturnValue)
-{
-    // call TInt CMMAMIDIControl::aFunc( TDesC* aData ) method.
-    *aReturnValue = (aMIDIControl->*aFuncL)(aData);
-}
-
-/**
- * Implements generated JNI function prototype.
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_MIDIControl__1sendMidiEvent
-(JNIEnv* aJni,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jbyteArray aData,
- jint aOffset,
- jint aLength)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMAMIDIControl* midiControl =
-        reinterpret_cast< CMMAMIDIControl* >(aControlHandle);
-
-    // Get pointer to Java data
-    jbyte* data = aJni->GetByteArrayElements(aData, NULL);
-
-    // Assert only in debug builds, array size must be checked in Java.
-    __ASSERT_DEBUG(aJni->GetArrayLength(aData) >= aOffset + aLength &&
-                   aOffset >= 0 &&
-                   aLength > 0,
-                   User::Invariant());
-
-    // Create descriptor from Java data starting from offset
-    jbyte* tempJbyte = &data[ aOffset ];
-    TUint8* tempPtr = (TUint8*) tempJbyte;
-    TPtrC8 dataPtr(tempPtr, aLength);
-
-    TInt returnValue = 0;
-
-    TInt err = eventSource->ExecuteTrap(&SendMIDIEventFuncL,
-                                        midiControl,
-                                        &CMMAMIDIControl::SendMIDIEventL,
-                                        (const TDesC8*)(&dataPtr),
-                                        &returnValue);
-
-    // Java bytes are not needed anymore
-    aJni->ReleaseByteArrayElements(aData, data, 0);
-
-    if (err != KErrNone)
-    {
-        // return error code to Java
-        returnValue = err;
-    }
-
-    return returnValue;
-}
-
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_MIDIControl__1reInitializeMidi
-(JNIEnv* aJni,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jbyteArray aMidiSequence,
- jint aOffset,
- jint aLength)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMAMIDIControl* midiControl =
-        reinterpret_cast<  CMMAMIDIControl* >(aControlHandle);
-
-    // Assert only in debug builds, array size must be checked in Java.
-    __ASSERT_DEBUG(aJni->GetArrayLength(aMidiSequence) >= aOffset + aLength &&
-                   aOffset >= 0 &&
-                   aLength > 0,
-                   User::Invariant());
-
-    // Get pointer to Java data
-    jbyte* data = aJni->GetByteArrayElements(aMidiSequence, NULL);
-
-    // Create descriptor from Java data starting from offset
-    jbyte* tempJbyte = &data[ aOffset ];
-    TUint8* tempPtr = (TUint8*) tempJbyte;
-    TPtrC8 dataPtr(tempPtr, aLength);
-
-    // SendMIDIEventFuncL has suitable enough footprint for this call too.
-    // Return value is not used but needs to be there for method footprint.
-
-    TInt returnValue = 0;
-    TInt err = eventSource->ExecuteTrap(&SendMIDIEventFuncL,
-                                        midiControl,
-                                        &CMMAMIDIControl::ReInitializeMidiL,
-                                        (const TDesC8*)(&dataPtr),
-                                        &returnValue);
-
-    // Release Java bytes
-    aJni->ReleaseByteArrayElements(aMidiSequence, data, 0);
-    return err;
-}
-
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/mmafunctionserver.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class provides CJavaEventSource services
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h> // DEBUG
-#include <coemain.h>
-#include <eikenv.h>
-
-#include "mmafunctionserver.h"
-#include "cmmaevent.h"
-#include "cmmaplayer.h"
-#include "mmmaplayerinstanceobserver.h"
-#ifdef RD_JAVA_VOLUME_CONTROL
-#include "cmmaglobalvolume.h"
-#endif // RD_JAVA_VOLUME_CONTROL
-
-MMAFunctionServer::MMAFunctionServer(JNIEnv& aJni, jobject aPeer): java::util::FunctionServer("JavaMMAPIFunctionServer")
-{
-	LOG( EJavaMMAPI, EInfo, "++MMAFunctionServer::MMAFunctionServer");
-    createServerToNewThread();
-    attachToVm(aJni, aPeer);
-    mVmAttached = true;
-    iServer = reinterpret_cast<java::util::FunctionServer*>(this);
-}
-
-MMAFunctionServer::~MMAFunctionServer()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::~MMAFunctionServer()");
-        if (mVmAttached)
-        {
-            detachFromVm();
-        }
-        stopServer();
-#ifdef RD_JAVA_VOLUME_CONTROL
-    delete iGlobalVolume;
-#endif // RD_JAVA_VOLUME_CONTROL
-}
-
-TInt MMAFunctionServer::NewL(JNIEnv& aJni, jobject aPeer)
-{
-	
-	MMAFunctionServer* self = 	new(ELeave) MMAFunctionServer(aJni,aPeer);
-	self->ConstructL(aJni,aPeer);
-	return reinterpret_cast<TInt>(self);
-}
-void MMAFunctionServer::ConstructL(JNIEnv& aJni,
-                                 jobject aPeer
-                                 )
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::ConstructL +");
-    aJni.GetJavaVM(&iJavaVM); // Get pointer to VM
-    LOG( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::ConstructL -");
-}
-
-java::util::FunctionServer* MMAFunctionServer::getFunctionServer() const
-{
-	LOG( EJavaMMAPI, EInfo, "++getFunctionServer1");
-    JELOG2(EJavaMMAPI);
-    return iServer;
-}
-JNIEnv* MMAFunctionServer::getValidJniEnv()
-    {
-        JELOG2(EJavaLocation);
-        return mJniEnv;
-    }
-jobject MMAFunctionServer::getPeer()
-    {
-        return mJavaPeerObject;
-    }
-
-void MMAFunctionServer::ConstructSvrL()
-{
-    // creating fbs session
-    User::LeaveIfError(RFbsSession::Connect());
-    iFbsSessionConnected = ETrue;
-    LOG( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::ConstructSvrL ok");
-}
-
-EXPORT_C void MMAFunctionServer::StaticAddObjectFromHandleL(
-    MMAFunctionServer* aEventSource,
-    TInt aHandle)
-{
-    aEventSource->AddObjectFromHandleL(aHandle);
-}
-
-void MMAFunctionServer::AddPlayerL(CMMAPlayer* aPlayer)
-{
-    if (iInstanceObserver)
-    {
-        iInstanceObserver->AddPlayerNotifyL(aPlayer);
-    }
-#ifdef RD_JAVA_VOLUME_CONTROL
-    if (iGlobalVolume)
-    {
-        iGlobalVolume->AddPlayerL(aPlayer);
-    }
-#endif // RD_JAVA_VOLUME_CONTROL
-    TInt err = iPlayers.Append(aPlayer);
-
-    if (err != KErrNone)
-    {
-        // There was no memory to add new player to array,
-        // player must be removed from instance observer.
-        if (iInstanceObserver)
-        {
-            iInstanceObserver->RemovePlayerNotify(aPlayer);
-        }
-#ifdef RD_JAVA_VOLUME_CONTROL
-        if (iGlobalVolume)
-        {
-            iGlobalVolume->RemovePlayer(aPlayer);
-        }
-#endif // RD_JAVA_VOLUME_CONTROL
-        User::Leave(err);
-    }
-}
-
-void MMAFunctionServer::DisposePlayer(CMMAPlayer* aPlayer)
-{
-    TInt index = iPlayers.Find(aPlayer);
-    if (index != KErrNotFound)
-    {
-        if (iInstanceObserver)
-        {
-            iInstanceObserver->RemovePlayerNotify(aPlayer);
-        }
-#ifdef RD_JAVA_VOLUME_CONTROL
-        if (iGlobalVolume)
-        {
-            iGlobalVolume->RemovePlayer(aPlayer);
-        }
-#endif // RD_JAVA_VOLUME_CONTROL
-        delete iPlayers[ index ];
-
-        // remove object from list
-        iPlayers.Remove(index);
-    }
-}
-
-EXPORT_C void MMAFunctionServer::SetPlayerInstanceObserver(
-    MMMAPlayerInstanceObserver* aObserver)
-{
-    iInstanceObserver = aObserver;
-}
-
-EXPORT_C RPointerArray< CMMAPlayer >& MMAFunctionServer::Players()
-{
-    return iPlayers;
-}
-
-void MMAFunctionServer::Release()
-{
-    // If player instance observer is added to event source, remove all
-    // players from observer before deleting those.
-    if (iInstanceObserver)
-    {
-        for (TInt i = 0; i < iPlayers.Count(); i++)
-        {
-            iInstanceObserver->RemovePlayerNotify(iPlayers[ i ]);
-#ifdef RD_JAVA_VOLUME_CONTROL
-            if (iGlobalVolume)
-            {
-                iGlobalVolume->RemovePlayer(iPlayers[ i ]);
-            }
-#endif // RD_JAVA_VOLUME_CONTROL
-        }
-    }
-
-    iPlayers.ResetAndDestroy();
-}
-
-void MMAFunctionServer::AddObjectFromHandleL(TInt aHandle)
-{
-	User::LeaveIfError(iObjects.Append(reinterpret_cast< CBase* >(aHandle)));
-}
-
-
-void MMAFunctionServer::FinalizeSvr()
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::FinalizeSvr() object count = %d",
-              iObjects.Count());
-    LOG1( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::FinalizeSvr() player count = %d",
-              iPlayers.Count());
-
-    // After object array alements are deleted all external references to
-    // player objects are removed and player array can be deleted.
-    iObjects.ResetAndDestroy();
-    iPlayers.ResetAndDestroy();
-
-    if (iFbsSessionConnected)
-    {
-        RFbsSession::Disconnect();
-        iFbsSessionConnected = EFalse;
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::MMAFunctionServer::FinalizeSvr() ok");
-}
-
-
-void MMAFunctionServer::PostEvent(CMMAEvent* aEvent, TInt /*aPriority*/)
-{
-   LOG( EJavaMMAPI, EInfo, "MMAFunctionServer::PostEvent");
-   aEvent->Dispatch(*mJniEnv);
-}
-
-CMMAPlayer* MMAFunctionServer::FindPlayer(TInt aPlayerHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "MMAFunctionServer::FindPlayer");
-    CMMAPlayer* player = reinterpret_cast< CMMAPlayer* >(aPlayerHandle);
-    TInt index = iPlayers.Find(player);
-    if (index != KErrNotFound)
-    {
-        player = iPlayers[ index ];
-        LOG( EJavaMMAPI, EInfo, "MMAFunctionServer::FindPlayer: player found");
-    }
-    else
-    {
-        LOG( EJavaMMAPI, EInfo, "MMAFunctionServer::FindPlayer: player not found");
-        player = NULL;
-    }
-    return player;
-}
-#ifdef RD_JAVA_VOLUME_CONTROL
-void MMAFunctionServer::SetGlobalVolume(CMMAGlobalVolume* aGlobalVolume)
-{
-    delete iGlobalVolume;
-    iGlobalVolume = aGlobalVolume;
-}
-#endif // RD_JAVA_VOLUME_CONTROL
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/nativeplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has NativePlayerFactory JNI functions
-*
-*/
-
-#include <logger.h>
-
-#include "com_nokia_microedition_media_NativePlayerFactory.h"
-#include "cmmamanager.h"
-#include "cmmaplayer.h"
-
-#include "s60commonutils.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-/**
- * Adds player to event source. If player could not be created
- * handle KErrNone indicates in Java side that there wasn't suitable factory.
- */
-LOCAL_C void HandleCreatePlayerL(CMMAPlayer* aPlayer,
-                                 MMAFunctionServer* aEventSource,
-                                 TInt* aHandle)
-{
-    if (aPlayer)
-    {
-        // Player was created, add it to event source
-        CleanupStack::PushL(aPlayer);
-        aEventSource->AddPlayerL(aPlayer);
-        *aHandle = reinterpret_cast<TInt>(aPlayer);
-        CleanupStack::Pop(aPlayer);
-    }
-    else
-    {
-        // Data was not supported and there is no error.
-        // Return KErrNone to java side
-        *aHandle = KErrNone;
-    }
-}
-
-/**
- * Local function that calls CMMAManager's CreatePlayerL method.
- */
-LOCAL_C void CreatePlayerHeaderDataL(CMMAManager* aManager,
-                                     MMAFunctionServer* aEventSource,
-                                     const TDesC8* aHeaderData,
-                                     TInt* aHandle)
-{
-    HandleCreatePlayerL(aManager->CreatePlayerL(*aHeaderData),
-                        aEventSource,
-                        aHandle);
-}
-
-/**
- * JNI function from NativePlayerFactory class.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_NativePlayerFactory__1createPlayerHeaderData
-(JNIEnv* aJni, jclass,
- jint aEventSourceHandle, jint aManagerHandle,
- jbyteArray aHeaderData)
-{
-    // Development time check.
-    __ASSERT_DEBUG((aEventSourceHandle > 0) && (aManagerHandle > 0), User::Invariant());
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-    CMMAManager* manager = reinterpret_cast< CMMAManager *>(aManagerHandle);
-
-    // Returning just KErrNone if there is no header data
-    TInt playerHandle = KErrNone;
-    if (aHeaderData)
-    {
-        // Get pointer to Java header data
-        jbyte* data = aJni->GetByteArrayElements(aHeaderData, NULL);
-        // if data is null Java data could not be obtained to native and
-        // KErrNoMemory is returned to Java
-        if (!data)
-        {
-            return KErrNoMemory;
-        }
-
-        TInt headerDataLength = aJni->GetArrayLength(aHeaderData);
-        TPtrC8 headerData((TUint8*)data, headerDataLength);
-        TInt err = eventSource->ExecuteTrap(&CreatePlayerHeaderDataL,
-                                            manager,
-                                            eventSource,
-                                            (const TDesC8*)&headerData,
-                                            &playerHandle);
-
-        // release bytes got with GetByteArrayElements
-        aJni->ReleaseByteArrayElements(aHeaderData,
-                                       data,
-                                       0);
-        if (err != KErrNone)
-        {
-            // Leave occured return error code to Java
-            playerHandle = err;
-            ELOG1( EJavaMMAPI, "MMA::NativePlayerFactory createPlayerHeaderData err %d",
-                      playerHandle);
-        }
-    }
-    return playerHandle;
-}
-
-/**
- * Local function that calls CMMAManager's CreatePlayerL method.
- */
-LOCAL_C void CreatePlayerLocatorL(CMMAManager* aManager,
-                                  MMAFunctionServer* aEventSource,
-                                  const TDesC* aProtocol,
-                                  const TDesC* aMiddlePart,
-                                  const TDesC* aParameters,
-                                  TInt* aHandle)
-{
-    HandleCreatePlayerL(aManager->CreatePlayerL(*aProtocol,
-                        *aMiddlePart,
-                        *aParameters),
-                        aEventSource,
-                        aHandle);
-}
-
-/**
- * JNI function from NativePlayerFactory class.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_NativePlayerFactory__1createPlayerLocator
-(JNIEnv* aJni, jclass,
- jint aEventSourceHandle, jint aManagerHandle,
- jstring aProtocol, jstring aMiddlePart, jstring aParameters)
-{
-    // Development time check.
-    __ASSERT_DEBUG((aEventSourceHandle > 0) && (aManagerHandle > 0), User::Invariant());
-
-    MMAFunctionServer* eventSource =
-    	reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    CMMAManager* manager = reinterpret_cast< CMMAManager *>(aManagerHandle);
-
-    // Get Java strings to native
-    JStringUtils protocol(*aJni, aProtocol);
-    JStringUtils middlePart(*aJni, aMiddlePart);
-
-    // If Java parameters is null, empty descriptor will be given to
-    // CreatePlayerL method.
-    TPtrC parameters(KNullDesC);
-    JStringUtils* tmp = NULL;
-    if (aParameters != NULL)
-    {
-        tmp = new JStringUtils(*aJni, aParameters);
-        if (tmp)
-        {
-            parameters.Set(*tmp);
-        }
-        else
-        {
-            // failed to create string
-            return KErrNoMemory;
-        }
-    }
-
-    TInt playerHandle = KErrNoMemory;
-    TInt err = eventSource->ExecuteTrap(&CreatePlayerLocatorL,
-                                        manager,
-                                        eventSource,
-                                        (const TDesC*)&protocol,
-                                        (const TDesC*)&middlePart,
-                                        (const TDesC*)&parameters,
-                                        &playerHandle);
-    delete tmp;
-    if (err != KErrNone)
-    {
-        // Leave occured return error code to Java
-        playerHandle = err;
-        ELOG1( EJavaMMAPI, "MMA::NativePlayerFactory createPlayerLocator err %d",
-                  playerHandle);
-    }
-    return playerHandle;
-}
-
-/**
- * Local function that calls CMMAManager's CreatePlayerL method.
- */
-LOCAL_C void CreatePlayerContentTypeL(CMMAManager* aManager,
-                                      MMAFunctionServer* aEventSource,
-                                      const TDesC* aContentType,
-                                      TInt* aHandle)
-{
-    HandleCreatePlayerL(aManager->CreatePlayerL(*aContentType),
-                        aEventSource,
-                        aHandle);
-}
-
-/**
- * JNI function from NativePlayerFactory class.
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_NativePlayerFactory__1createPlayerContentType
-(JNIEnv* aJni, jclass,
- jint aEventSourceHandle, jint aManagerHandle,
- jstring aContentType)
-{
-    // Development time check.
-    __ASSERT_DEBUG((aEventSourceHandle > 0) && (aManagerHandle > 0), User::Invariant());
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-    CMMAManager* manager = reinterpret_cast< CMMAManager* >(aManagerHandle);
-
-    JStringUtils contentType(*aJni, aContentType);
-    TInt playerHandle = KErrNoMemory;
-    TInt err = eventSource->ExecuteTrap(&CreatePlayerContentTypeL,
-                                        manager,
-                                        eventSource,
-                                        (const TDesC*)&contentType,
-                                        &playerHandle);
-    if (err != KErrNone)
-    {
-        // Leave occured return error code to Java
-        playerHandle = err;
-        ELOG1( EJavaMMAPI, "MMA::NativePlayerFactory createPlayerContentType err %d",
-                  playerHandle);
-    }
-    return playerHandle;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/outputstreamwriter.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAOutputStream
-*
-*/
-
-
-//#include "jutils.h"
-//#include "mmapiutils.h"
-#include "com_nokia_microedition_media_protocol_OutputStreamWriter.h"
-#include "cmmaoutputstream.h"
-#include "mmafunctionserver.h"
-
-// If eventsource is already disposed, then do nothing
-#define CHECK_HANDLE(x, j) { if ( !( x ) || ( ( x )->Players().Count() == 0 ) ) { return ( j ); } }
-
-LOCAL_C void ReadDataL(MMAFunctionServer* aEventSource,
-                       TInt aPlayer,
-                       CMMAOutputStream* aOutputStream,
-                       TUint8* aOutputBuffer,
-                       TInt* aOutputBufferSize,
-                       TInt* aReadStatus)
-{
-    if (!aEventSource->FindPlayer(aPlayer))
-    {
-        // Native object was already deleted
-        User::Leave(KErrBadHandle);
-    }
-
-    aOutputStream->ReadDataL(aOutputBuffer, aOutputBufferSize, aReadStatus);
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_protocol_OutputStreamWriter__1readData
-(JNIEnv* aJni, jclass, jint aOutputStream, jint aEventSource,
- jbyteArray aOutputBuffer, jintArray aOutputBufferSize, jint aLength, jint aPlayerHandle)
-{
-    MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSource);
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    CMMAOutputStream* outputStream = reinterpret_cast< CMMAOutputStream* >(aOutputStream);
-
-    TInt readStatus;
-    jbyte* outputBuffer = aJni->GetByteArrayElements(aOutputBuffer, NULL);
-
-    // NULL is returned if there is not enough memory
-    if (!outputBuffer)
-    {
-        return KErrNoMemory;
-    }
-
-    jint* outputBufferSize = aJni->GetIntArrayElements(aOutputBufferSize, NULL);
-    if (!outputBufferSize)
-    {
-        // outputBuffer was already allocated
-        aJni->ReleaseByteArrayElements(aOutputBuffer, outputBuffer, JNI_ABORT);
-        return KErrNoMemory;
-    }
-
-    *outputBufferSize = aLength; // size of the buffer
-
-    TInt err = eventSource->ExecuteTrap(ReadDataL,
-                                        eventSource,
-                                        aPlayerHandle,
-                                        outputStream,
-                                        (TUint8*) outputBuffer,
-                                        outputBufferSize, // returns readed size
-                                        &readStatus);
-
-    aJni->ReleaseByteArrayElements(aOutputBuffer, outputBuffer, JNI_COMMIT);
-    aJni->ReleaseIntArrayElements(aOutputBufferSize, outputBufferSize, JNI_COMMIT);
-
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    // Tells if there's more data available or not
-    return readStatus;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/pitchcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAPitchControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_PitchControl.h"
-#include "mmafunctionserver.h"
-#include "cmmamidipitchcontrol.h"
-#include <logger.h>
-
-static const int KPitchOffset = 1000000;
-
-/**
- * Local function which can be used to call CMMAPitchControl class methods.
- * Type of of the function pointer must be
- * TInt CMMAPitchControl::aFunc( TInt aData )
- *
- * @param aPitchControl CMMAPitchControl pointer.
- * @param aFunc Pointer to the CMMAPitchControl method.
- * @param aData Parameter to passed to the aFunc method
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntParamIntFuncL(CMMAMIDIPitchControl* aPitchControl,
-                                    TInt(CMMAMIDIPitchControl::*aFuncL)(TInt),
-                                    TInt aData,
-                                    TInt* aReturnValue)
-{
-    // call TInt CMMAPitchControl::aFunc( TInt aData ) method.
-    *aReturnValue = (aPitchControl->*aFuncL)(aData);
-}
-
-/**
- * Local function which can be used to call CMMAPitchControl class methods.
- * Type of of the function pointer must be
- * TInt CMMAPitchControl::aFunc()
- *
- * @param aPitchControl CMMAPitchControl pointer.
- * @param aFunc Pointer to the CMMAPitchControl method.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntFuncL(CMMAMIDIPitchControl* aPitchControl,
-                            TInt(CMMAMIDIPitchControl::*aFuncL)(),
-                            TInt* aReturnValue)
-{
-    // call TInt CMMAPitchControl::aFunc() method.
-    *aReturnValue = (aPitchControl->*aFuncL)();
-}
-
-//
-// JNI functions. Prototypes are generated and commented in Java class
-// com_nokia_microedition_media_control_PitchControl
-//
-
-/**
- * JNI function from com.nokia.microedition.media.control.PitchControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_PitchControl__1setPitch
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aPitch)  // parameter boundary is checked in Java side.
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDIPitchControl* PitchControl =
-        reinterpret_cast< CMMAMIDIPitchControl *>(aControlHandle);
-
-    // Value returned from SetPitch method will be assigned to returnValue.
-    TInt returnValue = 0;
-
-    // Setting Pitch will not leave, it just assigns default
-    // value to the returnValue variable.
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntParamIntFuncL,
-                                     PitchControl,
-                                     &CMMAMIDIPitchControl::SetPitchL,
-                                     aPitch,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "PitchControl__1setPitch return value %d", returnValue);
-
-    return (error == KErrNone) ? (returnValue+KPitchOffset) : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.PitchControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_PitchControl__1getMinPitch
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMAMIDIPitchControl* PitchControl =
-        reinterpret_cast< CMMAMIDIPitchControl* >(aControlHandle);
-
-    TInt returnValue = 0;
-
-    // Get value or the default.
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     PitchControl,
-                                     &CMMAMIDIPitchControl::MinPitchL,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "PitchControl__1setPitch return value %d", returnValue);
-
-    return (error == KErrNone) ? (returnValue+KPitchOffset) : error;
-}
-
-
-/**
- * JNI function from com.nokia.microedition.media.control.PitchControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_PitchControl__1getMaxPitch
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDIPitchControl* PitchControl =
-        reinterpret_cast< CMMAMIDIPitchControl* >(aControlHandle);        
-
-    TInt returnValue = 0;
-    TInt error;
-
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     PitchControl,
-                                     &CMMAMIDIPitchControl::MaxPitchL,
-                                     &returnValue);
-    LOG1( EJavaMMAPI, EInfo, "PitchControl__1getMaxRate return value %d", returnValue);
-
-    return (error == KErrNone) ? (returnValue+KPitchOffset) : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.PitchControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_PitchControl__1getPitch
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDIPitchControl* PitchControl =
-        reinterpret_cast< CMMAMIDIPitchControl* >(aControlHandle);
-
-    TInt returnValue = 0;
-    TInt error;
-
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     PitchControl,
-                                     &CMMAMIDIPitchControl::PitchL,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "PitchControl__1getPitch return value %d", returnValue);
-
-    return (error == KErrNone) ? (returnValue+KPitchOffset) : error;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/player.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,547 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAPlayer
-*
-*/
-
-
-//#include <jutils.h>
-#include "com_nokia_microedition_media_PlayerImpl.h"
-
-#include "mmafunctionserver.h"
-#include "cmmaplayer.h"
-#include "s60commonutils.h"
-#include <logger.h>
-
-using namespace java::util;
-
-// If eventsource is already disposed, then do nothing
-#define CHECK_HANDLE(x, j) { if ( !( x ) || ( ( x )->Players().Count() == 0 ) ) { return ( j ); } }
-/*
- *  Wrappers for calling non static methods
- */
-
-TInt VoidFunc(TInt aPlayer, MMAFunctionServer* aEventSource,
-              TInt(CMMAPlayer::*aFunc)())
-{
-    CMMAPlayer* p = aEventSource->FindPlayer(aPlayer);
-    if (p)
-    {
-        return (p->*aFunc)();
-    }
-    else
-    {
-        return KErrBadHandle;
-    }
-}
-
-void BoolFuncL(TInt aPlayer, MMAFunctionServer* aEventSource,
-               void(CMMAPlayer::*aFunc)(TBool),
-               TBool aValue)
-{
-    CMMAPlayer* p = aEventSource->FindPlayer(aPlayer);
-    if (p)
-    {
-        (p->*aFunc)(aValue);
-    }
-    // ignore call if player is not found
-}
-
-void VVoidFuncL(TInt aPlayer, MMAFunctionServer* aEventSource, void(CMMAPlayer::*aFunc)())
-{
-    CMMAPlayer* p = aEventSource->FindPlayer(aPlayer);
-    if (p)
-    {
-        (p->*aFunc)();
-    }
-    // ignore call if player is not found
-}
-
-void IntFunc(TInt aPlayer,
-             MMAFunctionServer* aEventSource,
-             void(CMMAPlayer::*aFunc)(TInt),
-             TInt aData)
-{
-    CMMAPlayer* p = aEventSource->FindPlayer(aPlayer);
-    if (p)
-    {
-        (p->*aFunc)(aData);
-    }
-    // ignore call if player is not found
-}
-
-void TInt64Func(TInt aPlayer, MMAFunctionServer* aEventSource,
-                void(CMMAPlayer::*aFunc)(TInt64* aData),
-                TInt64* aData)
-{
-    CMMAPlayer* p = aEventSource->FindPlayer(aPlayer);
-    if (p)
-    {
-        (p->*aFunc)(aData);
-    }
-    else
-    {
-        *aData = KErrBadHandle;
-    }
-}
-
-
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _createPlayer
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1initPlayer
-(JNIEnv* aJni,
- jobject aObject,
- jobject aListenerObject,
- jint aEventSourceHandle,
- jint aPlayerHandle)
-{
-	LOG(EJavaMMAPI,EInfo,"jni_PlayerImpl__1initPlayer Enter...   1");
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    CMMAPlayer* player = reinterpret_cast< CMMAPlayer* >(aPlayerHandle);
-
-    // init player
-    jobject playerObject = aJni->NewWeakGlobalRef(aObject);
-LOG(EJavaMMAPI,EInfo,"jni_PlayerImpl__1initPlayer Enter...   5");    
-    TInt err = eventSource->ExecuteTrap(&CMMAPlayer::StaticInitPlayerL,
-                                        player,
-                                        eventSource,
-                                        playerObject,
-                                        eventSource->getValidJniEnv());
-    if (err != KErrNone)
-    {
-        aJni->DeleteWeakGlobalRef((jweak)playerObject);
-        return err;
-    }
-
-    // set player listener
-    jobject playerListener = aJni->NewWeakGlobalRef(aListenerObject);
-    err = eventSource->ExecuteTrap(&CMMAPlayer::StaticSetPlayerListenerObjectL,
-                                   player,
-                                   eventSource,
-                                   playerListener,
-                                   eventSource->getValidJniEnv(),
-                                   (MMMAEventPoster*)eventSource);
-    if (err != KErrNone)
-    {
-        aJni->DeleteWeakGlobalRef((jweak)playerListener);
-    }
-    return err;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _start
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1start
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-	LOG( EJavaMMAPI, EInfo, "jni_PlayerImpl__1start...");
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-	CHECK_HANDLE(eventSource, KErrNone);
-    TInt err = eventSource->ExecuteTrap(&VVoidFuncL,
-                                        aPlayer,
-                                        eventSource,
-                                        &CMMAPlayer::StartL);
-       LOG1(EJavaMMAPI,EInfo,"jni_PlayerImpl__1start Enter... 3, err = %d",err);
-    // complete java side request in case of leave.
-    if (err != KErrNone)
-    {
-        CMMAPlayer* p = eventSource->FindPlayer(aPlayer);
-        p->PostActionCompleted(err);   // java start return
-    }
-
-    return err;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _stop
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1stop
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt err = eventSource->ExecuteTrap(&BoolFuncL,
-                                        aPlayer,
-                                        eventSource,
-                                        &CMMAPlayer::StopL,
-                                        (TBool)ETrue);
-    return err;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _close
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1close
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    // if eventsource is already disposed, then do nothing
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-	LOG( EJavaMMAPI, EInfo, "jni_Player.cpp__1close before &CMMAPlayer::CloseL");
-    TInt err = eventSource->ExecuteTrap(&VVoidFuncL,
-                                        aPlayer,
-                                        eventSource,
-                                        &CMMAPlayer::CloseL);
-    ELOG1( EJavaMMAPI, "jni_Player.cpp__1close %d", err);
-    return err;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _prefetch
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1prefetch
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    ELOG( EJavaMMAPI, "jni_Player.cpp__1prefetch ");
-    MMAFunctionServer* eventSource =
-        //JavaUnhand< MMAFunctionServer >(aEventSource);
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt err = eventSource->ExecuteTrap(&VVoidFuncL, aPlayer,
-                                        eventSource,
-                                        &CMMAPlayer::PrefetchL);
-                                            
-  ELOG1( EJavaMMAPI, "jni_Player.cpp__1prefetch %d", err);
-                                              
-    return err;
-}
-
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _realize
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1realize
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt err = eventSource->ExecuteTrap(&VVoidFuncL,
-                                        aPlayer, eventSource,
-                                        &CMMAPlayer::RealizeL);
-    return err;
-}
-
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _setLoopCount
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1setLoopCount
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer, jint aLoopCount)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    eventSource->ExecuteV(&IntFunc,
-                          aPlayer, eventSource,
-                          &CMMAPlayer::SetLoopCount,
-                          aLoopCount);
-    return KErrNone;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _duration
- * Signature: (II)J
- */
-JNIEXPORT jlong JNICALL Java_com_nokia_microedition_media_PlayerImpl__1duration
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt64 duration(0);
-
-    TInt err = eventSource->ExecuteTrap(&TInt64Func,
-                                        aPlayer, eventSource,
-                                        &CMMAPlayer::GetDuration,
-                                        &duration);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    return *reinterpret_cast< jlong* >(&duration);
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _setMediaTime
- * Signature: (IIJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_nokia_microedition_media_PlayerImpl__1setMediaTime
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer, jlong aNow)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-
-    TInt64 time = *reinterpret_cast< TInt64* >(&aNow);
-
-    TInt err = eventSource->ExecuteTrap(&TInt64Func,
-                                        aPlayer, eventSource,
-                                        &CMMAPlayer::SetMediaTimeL,
-                                        &time);
-
-    if (err != KErrNone)
-    {
-        ELOG1( EJavaMMAPI, "MMA::Java_com_nokia_microedition_media_PlayerImpl__1setMediaTime error %d ",
-                  err);
-        return err;
-    }
-    return *reinterpret_cast< jlong* >(&time);
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _deallocate
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1deallocate
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt err = eventSource->ExecuteTrap(&VVoidFuncL,
-                                        aPlayer, eventSource,
-                                        &CMMAPlayer::DeallocateL);
-    return err;
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _getMediaTime
- * Signature: (II)J
- */
-JNIEXPORT jlong JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getMediaTime
-(JNIEnv*, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    TInt64 mediaTime(0);
-
-    TInt err = eventSource->ExecuteTrap(&TInt64Func, aPlayer,
-                                        eventSource,
-                                        &CMMAPlayer::GetMediaTime,
-                                        &mediaTime);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    return *reinterpret_cast< jlong* >(&mediaTime);
-}
-
-/*
- * Class:     com_nokia_microedition_media_PlayerImpl
- * Method:    _getState
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getState
-(JNIEnv *, jclass, jint aEventSource, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-LOG(EJavaMMAPI,EInfo,"MMA::Java_com_nokia_microedition_media_PlayerImpl__1getState before finding player ");
-    CMMAPlayer* player = eventSource->FindPlayer(aPlayer);
-LOG(EJavaMMAPI,EInfo,"MMA::Java_com_nokia_microedition_media_PlayerImpl__1getState after finding player ");
-    TInt state = CMMAPlayer::EClosed;
-    if (player != NULL)
-    {
-        state = player->State();
-    }
-
-LOG1(EJavaMMAPI,EInfo,"MMA::Java_com_nokia_microedition_media_PlayerImpl__1getState state %d ",
-                  state);
-    return state;
-}
-
-/*
- *
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1addSourceStream
-(JNIEnv* aJni, jclass, jint aEventSource, jint aPlayer, jobject aReader)
-{
-    MMAFunctionServer* eventSource =
-       reinterpret_cast< MMAFunctionServer *>(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    CMMAPlayer* player = eventSource->FindPlayer(aPlayer);
-    CMMASourceStream* sourceStream;
-
-    jobject readerRef = aJni->NewWeakGlobalRef(aReader);
-
-    TInt err = KErrNotFound;
-    if (player != NULL)
-    {
-        err = eventSource->ExecuteTrap(&CMMAPlayer::StaticAddSourceStreamL,
-                                       eventSource->getValidJniEnv(),
-                                       player,
-                                       eventSource,
-                                       readerRef,
-                                       &sourceStream);
-    }
-    if (err != KErrNone)
-    {
-        aJni->DeleteWeakGlobalRef((jweak)readerRef);
-        return err;
-    }
-    return reinterpret_cast<TInt>(sourceStream);
-}
-
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getControlsCount
-(JNIEnv*, jclass, jint aEventSourceHandle, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-       reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-
-    TInt count = eventSource->Execute(&VoidFunc,
-                                      aPlayer, eventSource,
-                                      &CMMAPlayer::ControlCount);
-    return count;
-}
-
-
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getControlClassName
-(JNIEnv* aJniEnv, jclass, jint aEventSourceHandle, jint aControlHandle)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAControl* control = reinterpret_cast< CMMAControl* >(aControlHandle);
-
-    const TDesC* name = eventSource->Execute(CMMAControl::ClassNameJni,
-                        control);
-    return S60CommonUtils::NativeToJavaString(*aJniEnv, *name);
-}
-
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getControlHandle
-(JNIEnv*, jclass, jint aEventSourceHandle, jint aPlayer, jint aIndex)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    CMMAPlayer* player = eventSource->FindPlayer(aPlayer);
-    CMMAControl* control = NULL;
-    if (player)
-    {
-        control = eventSource->Execute(CMMAPlayer::StaticControl,
-                                       player,
-                                       aIndex);
-    }
-    else
-    {
-        return KErrBadHandle;
-    }
-
-    return reinterpret_cast<TInt>(control);
-}
-
-LOCAL_C void DisposePlayer(MMAFunctionServer* aEventSource,
-                           TInt aPlayer)
-{
-    CMMAPlayer* player = aEventSource->FindPlayer(aPlayer);
-    if (player)
-    {
-        aEventSource->DisposePlayer(player);
-    }
-    // else already disposed
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_microedition_media_PlayerImpl__1dispose
-(JNIEnv*, jclass, jint aEventSourceHandle, jint aPlayer)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    // if eventsource is already disposed, then do nothing
-    if (!eventSource || eventSource->IsDisposed())
-    {
-        return;
-    }
-
-    eventSource->ExecuteV(&DisposePlayer,
-                          eventSource,
-                          aPlayer);
-}
-
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_PlayerImpl__1getContentType
-(JNIEnv* aJni, jclass,
- jint aPlayerHandle)
-{
-    CMMAPlayer* player = reinterpret_cast< CMMAPlayer* >(aPlayerHandle);
-    jstring contentType = NULL;
-
-    // if content type is null, we just return NULL to Java
-    if (player->ContentType())
-    {
-        // need to create Java String object
-        contentType = S60CommonUtils::NativeToJavaString(*aJni, *player->ContentType());
-    }
-    return contentType;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/ratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMARateControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_RateControl.h"
-#include "mmafunctionserver.h"
-#include "cmmaratecontrol.h"
-#include <logger.h>
-
-//
-// Wrapper functions which are needed in event source execution.
-// If method to be called can leave ExecuteTrap must be used,
-// otherwise Execute and ExecuteV can be used.
-//
-//
-
-/**
- * Local function which can be used to call CMMARateControl class methods.
- * Type of of the function pointer must be
- * TInt CMMARateControl::aFunc( TInt aData )
- *
- * @param aRateControl CMMARateControl pointer.
- * @param aFunc Pointer to the CMMARateControl method.
- * @param aData Parameter to passed to the aFunc method
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntParamIntFuncL(CMMARateControl* aRateControl,
-                                    TInt(CMMARateControl::*aFuncL)(TInt),
-                                    TInt aData,
-                                    TInt* aReturnValue)
-{
-    // call TInt CMMARateControl::aFunc( TInt aData ) method.
-    *aReturnValue = (aRateControl->*aFuncL)(aData);
-}
-
-/**
- * Local function which can be used to call CMMARateControl class methods.
- * Type of of the function pointer must be
- * TInt CMMARateControl::aFunc()
- *
- * @param aRateControl CMMARateControl pointer.
- * @param aFunc Pointer to the CMMARateControl method.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntFuncL(CMMARateControl* aRateControl,
-                            TInt(CMMARateControl::*aFuncL)(),
-                            TInt* aReturnValue)
-{
-    // call TInt CMMARateControl::aFunc() method.
-    *aReturnValue = (aRateControl->*aFuncL)();
-}
-
-//
-// JNI functions. Prototypes are generated and commented in Java class
-// com_nokia_microedition_media_control_RateControl
-//
-
-/**
- * JNI function from com.nokia.microedition.media.control.RateControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_RateControl__1getMinRate
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARateControl* RateControl =
-        reinterpret_cast< CMMARateControl *>(aControlHandle);
-
-    TInt returnValue = 0;
-
-    // Get value or the default.
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     RateControl,
-                                     &CMMARateControl::MinRateL,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "RateControl__1getMinRate return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.RateControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_RateControl__1getRate
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARateControl* RateControl =
-        reinterpret_cast< CMMARateControl *>(aControlHandle);
-
-
-    TInt returnValue = 0;
-
-    // Get actual rate or the default value to the returnValue.
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     RateControl,
-                                     &CMMARateControl::RateL,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "RateControl__1getRate return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.RateControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_RateControl__1setRate
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aRate)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-	  reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARateControl* RateControl =
-        reinterpret_cast< CMMARateControl *>(aControlHandle);
-
-    // Return value will be actual rate set or default value if rate is not
-    // available.
-    TInt returnValue = 0;
-
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntParamIntFuncL,
-                                     RateControl,
-                                     &CMMARateControl::SetRateL,
-                                     aRate,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "RateControl__1setRate return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.RateControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_RateControl__1getMaxRate
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARateControl* RateControl =
-        reinterpret_cast< CMMARateControl *>(aControlHandle);
-
-    TInt returnValue = 0;
-    TInt error;
-
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     RateControl,
-                                     &CMMARateControl::MaxRateL,
-                                     &returnValue);
-    LOG1( EJavaMMAPI, EInfo, "RateControl__1getMaxRate return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/recordcontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMARecordControl
-*
-*/
-
-
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-#include "com_nokia_microedition_media_control_RecordControl.h"
-#include "mmafunctionserver.h"
-#include "cmmarecordcontrol.h"
-#include "s60commonutils.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-
-void VVoidFuncL(CMMARecordControl* aControl, void(CMMARecordControl::*aFunc)())
-{
-    (aControl->*aFunc)();
-}
-
-void TIntFuncL(CMMARecordControl* aControl, TInt(CMMARecordControl::*aFunc)(TInt),
-               TInt* aReturnValue)
-{
-    *aReturnValue = (aControl->*aFunc)(*aReturnValue);
-}
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    int _startRecord( int aEventSourceHandle, int aRecordControlHandle );
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1startRecord
-(JNIEnv *, jclass, jint aEventSourceHandle, jint aRecordControlHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1startRecord");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl* >(aRecordControlHandle);
-
-    return eventSource->ExecuteTrap(&VVoidFuncL,
-                                    recordControl,
-                                    &CMMARecordControl::StartRecordL);
-}
-
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    int _stopRecord( int aEventSourceHandle, int aRecordControlHandle );
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1stopRecord
-(JNIEnv *, jclass, jint aEventSourceHandle, jint aRecordControlHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1stopRecord");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl* >(aRecordControlHandle);
-
-    return eventSource->ExecuteTrap(&VVoidFuncL,
-                                    recordControl,
-                                    &CMMARecordControl::StopRecordL);
-}
-
-void CMMAOutputStreamFunc(void(CMMARecordControl::*aFunc)(CMMAOutputStream*),CMMARecordControl* aControl, 
-                          CMMAOutputStream* aOutputStream)
-{
-    (aControl->*aFunc)(aOutputStream);
-}
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1setRecordStream
-(JNIEnv *aJni, jclass, jint aEventSourceHandle, jint aRecordControlHandle, jobject aOutputWriter)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1setRecordStream");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl* >(aRecordControlHandle);
-
-    jobject writerRef = aJni->NewWeakGlobalRef(aOutputWriter);
-    CMMAOutputStream* outputStream;
-
-    TInt err = eventSource->ExecuteTrap(CMMAOutputStream::CreateL,
-                                        &outputStream,
-                                        eventSource,
-                                        aJni,
-                                        (MMMAEventPoster*)eventSource,
-                                        writerRef);
-
-    if (err == KErrNone)
-    {
-        eventSource->ExecuteV(&CMMAOutputStreamFunc,
-                              &CMMARecordControl::SetRecordStream,
-                              	recordControl,
-                              outputStream);
-
-        return reinterpret_cast<TInt>(outputStream);
-    }
-    else
-    {
-        aJni->DeleteWeakGlobalRef((jweak)writerRef);
-        return err;
-    }
-}
-
-void HBufCFunc(CMMARecordControl* aControl, HBufC*(CMMARecordControl::*aFunc)(),
-               HBufC** aBuf)
-{
-    *aBuf = (aControl->*aFunc)();
-}
-
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    String _getContentType( int aEventSourceHandle, int aRecordControlHandle );
- * Signature: (II)I
- */
-JNIEXPORT jstring JNICALL Java_com_nokia_microedition_media_control_RecordControl__1getContentType
-(JNIEnv *aJniEnv, jclass, jint aEventSourceHandle, jint aRecordControlHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1getContentType");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl* >(aRecordControlHandle);
-
-    const HBufC* contentType = NULL;
-    eventSource->ExecuteTrap(&HBufCFunc,
-                             recordControl,
-                             &CMMARecordControl::GetContentTypeL,
-                             (HBufC**)&contentType);
-
-    if (contentType != NULL)
-    {
-        return S60CommonUtils::NativeToJavaString(*aJniEnv, *contentType);
-    }
-    // ContentType is not known (Player not started?)
-    return S60CommonUtils::NativeToJavaString(*aJniEnv, KNullDesC);
-}
-
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    int _commit( int aEventSourceHandle, int aRecordControlHandle );
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1commit
-(JNIEnv *, jclass, jint aEventSourceHandle, jint aRecordControlHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1commit");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl* >(aRecordControlHandle);
-
-    return eventSource->ExecuteTrap(&VVoidFuncL,
-                                    recordControl,
-                                    &CMMARecordControl::CommitL);
-}
-
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    int _setRecordSizeLimit( int aEventSourceHandle, int aRecordControlHandle, int aSize );
- * Signature: (III)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1setRecordSizeLimit
-(JNIEnv *, jclass, jint aEventSourceHandle, jint aRecordControlHandle, jint aSize)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1setRecordSizeLimit");
-
-    MMAFunctionServer* eventSource =
-		reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl *>(aRecordControlHandle);
-
-    TInt err = eventSource->ExecuteTrap(&TIntFuncL,
-                                        recordControl,
-                                        &CMMARecordControl::SetRecordSizeLimitL,
-                                        &aSize);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    // return size of the set record size
-    return aSize;
-}
-
-/*
- * Class:     com_nokia_microedition_media_RecordControl
- * Method:    int _reset( int aEventSourceHandle, int aRecordControlHandle );
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_RecordControl__1reset
-(JNIEnv *, jclass, jint aEventSourceHandle, jint aRecordControlHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_RecordControl__1reset");
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMARecordControl* recordControl =
-        reinterpret_cast< CMMARecordControl *>(aRecordControlHandle);
-
-    return eventSource->ExecuteTrap(&VVoidFuncL,
-                                    recordControl,
-                                    &CMMARecordControl::ResetL);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/rmmatempfile.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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:
-*
-*/
-//  INCLUDE FILES
-
-#include "rmmatempfile.h"
-
-RMMATempFile::RMMATempFile()
-{
-    iFileHandle = KErrNone;
-    iMidletSuiteID = KErrNotFound;
-}
-
-void RMMATempFile::ConnectL()
-{
-    User::Leave(KErrNotSupported);
-}
-
-void RMMATempFile::CreateL()
-{
-    User::Leave(KErrNotSupported);
-}
-
-RFile& RMMATempFile::File()
-{
-    return iFile;
-}
-
-void RMMATempFile::SetMIDletSuiteID(TInt aMidletSuiteID)
-{
-    iMidletSuiteID = aMidletSuiteID;
-}
-
-void RMMATempFile::Close()
-{
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/sourcestreamreader.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMASourceStream
-*
-*/
-
-
-//#include "jutils.h"
-//#include "mmapiutils.h"
-#include "com_nokia_microedition_media_protocol_SourceStreamReader.h"
-#include "cmmasourcestream.h"
-#include "mmafunctionserver.h"
-
-// If eventsource is already disposed, then do nothing
-#define CHECK_HANDLE(x, j) { if ( !( x ) || ( ( x )->Players().Count() == 0 ) ) { return ( j ); } }
-LOCAL_C void WriteDataL(TInt aSourceStream,
-                        TInt aPlayer,
-                        MMAFunctionServer* aEventSource,
-                        const TUint8* aData,
-                        TInt aLength,
-                        TInt aState)
-{
-    if (!aEventSource->FindPlayer(aPlayer))
-    {
-        // Native object was already deleted
-        User::Leave(KErrBadHandle);
-    }
-    CMMASourceStream* sourceStream =
-    	reinterpret_cast< CMMASourceStream *>(aSourceStream);
-
-    sourceStream->WriteL(aData, aLength, aState);
-    LOG( EJavaMMAPI, EInfo, "jni SourceStreamReader.cpp: WriteDataL() -");
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_protocol_SourceStreamReader__1write
-(JNIEnv* aJni, jclass, jint aSourceStream, jint aEventSource,
- jbyteArray aData, jint aLength, jint aState, jint aPlayerHandle)
-{
-	 LOG( EJavaMMAPI, EInfo, "SourceStreamReaderjni_write");
-    MMAFunctionServer* eventSource =
-		reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CHECK_HANDLE(eventSource, KErrNone);
-
-    jbyte* data = aJni->GetByteArrayElements(aData, NULL);
-	LOG2( EJavaMMAPI, EInfo, "SourceStreamReaderjni_write , length = %d,state = %d",(TInt)aLength,(TInt)aState);
-    TInt err = eventSource->ExecuteTrap(&WriteDataL,
-                                        aSourceStream,
-                                        aPlayerHandle,
-                                        eventSource,
-                                        (const TUint8*)data,
-                                        aLength,
-                                        aState);
-    ELOG1( EJavaMMAPI, "SourceStreamReaderjni_write , err = %d",err);
-    aJni->ReleaseByteArrayElements(aData, data, JNI_ABORT);
-    return err;
-}
-
-// END OF FILE
--- a/javauis/mmapi_qt/baseline/src/stoptimecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAStopTimeControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-#include "com_nokia_microedition_media_control_StopTimeControl.h"
-#include "mmafunctionserver.h"
-#include "cmmastoptimecontrol.h"
-
-
-JNIEXPORT jlong JNICALL Java_com_nokia_microedition_media_control_StopTimeControl__1getStopTime
-(JNIEnv *, jclass , jint aEventSource, jint aControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAStopTimeControl* control =
-        reinterpret_cast< CMMAStopTimeControl* >(aControl);
-
-    TInt64 time(0);
-    eventSource->ExecuteV(CMMAStopTimeControl::StaticGetStopTime,
-                          control,
-                          &time);
-
-    return *reinterpret_cast< jlong* >(&time);
-}
-
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_StopTimeControl__1setStopTime
-(JNIEnv *, jclass , jint aEventSource, jint aControl, jlong aTime)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAStopTimeControl* control =
-        reinterpret_cast< CMMAStopTimeControl* >(aControl);
-
-    TInt64 time;
-    time = *((TInt64*)&aTime);     // convert 'long long' to TInt64
-
-    TInt err = eventSource->ExecuteTrap(CMMAStopTimeControl::StaticSetStopTimeL,
-                                        control,
-                                        &time);
-
-    return err;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/tempocontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMATempoControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_TempoControl.h"
-#include "mmafunctionserver.h"
-#include "cmmamiditempocontrol.h"
-#include <logger.h>
-
-//
-// Wrapper functions which are needed in event source execution.
-// If method to be called can leave ExecuteTrap must be used,
-// otherwise Execute and ExecuteV can be used.
-//
-//
-
-/**
- * Local function which can be used to call CMMATempoControl class methods.
- * Type of of the function pointer must be
- * TInt CMMATempoControl::aFunc( TInt aData )
- *
- * @param aTempoControl CMMATempoControl pointer.
- * @param aFunc Pointer to the CMMATempoControl method.
- * @param aData Parameter to passed to the aFunc method
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntParamIntFuncL(CMMAMIDITempoControl* aTempoControl,
-                                    TInt(CMMAMIDITempoControl::*aFuncL)(TInt),
-                                    TInt aData,
-                                    TInt* aReturnValue)
-{
-    // call TInt CMMATempoControl::aFunc( TInt aData ) method.
-    *aReturnValue = (aTempoControl->*aFuncL)(aData);
-}
-
-/**
- * Local function which can be used to call CMMATempoControl class methods.
- * Type of of the function pointer must be
- * TInt CMMATempoControl::aFunc()
- *
- * @param aTempoControl CMMATempoControl pointer.
- * @param aFunc Pointer to the CMMATempoControl method.
- * @param aReturnValue The return value of the aFunc will
- *                     be assigned to this parameter.
- */
-LOCAL_C void ReturnIntFuncL(CMMAMIDITempoControl* aTempoControl,
-                            TInt(CMMAMIDITempoControl::*aFuncL)(),
-                            TInt* aReturnValue)
-{
-    // call TInt CMMATempoControl::aFunc() method.
-    *aReturnValue = (aTempoControl->*aFuncL)();
-}
-
-//
-// JNI functions. Prototypes are generated and commented in Java class
-// com_nokia_microedition_media_control_TempoControl
-//
-
-/**
- * JNI function from com.nokia.microedition.media.control.TempoControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_TempoControl__1setTempo
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle,
- jint aTempo)  // parameter boundary is checked in Java side.
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-    CMMAMIDITempoControl* tempoControl =
-        reinterpret_cast< CMMAMIDITempoControl* >(aControlHandle);
-
-    // Value returned from SetTempo method will be assigned to returnValue.
-    TInt returnValue = 0;
-
-    // Setting tempo will not leave, it just assigns default
-    // value to the returnValue variable.
-    TInt error;
-    error = eventSource->ExecuteTrap(&ReturnIntParamIntFuncL,
-                                     tempoControl,
-                                     &CMMAMIDITempoControl::SetTempoL,
-                                     aTempo,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "TempoControl__1setTempo return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-
-/**
- * JNI function from com.nokia.microedition.media.control.TempoControl
- */
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_control_TempoControl__1getTempo
-(JNIEnv*,
- jobject,
- jint aControlHandle,
- jint aEventSourceHandle)
-{
-    // Get pointer to native event source.
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    CMMAMIDITempoControl* tempoControl =
-        reinterpret_cast< CMMAMIDITempoControl* >(aControlHandle);
-
-    TInt returnValue = 0;
-    TInt error;
-
-    error = eventSource->ExecuteTrap(&ReturnIntFuncL,
-                                     tempoControl,
-                                     &CMMAMIDITempoControl::TempoL,
-                                     &returnValue);
-
-    LOG1( EJavaMMAPI, EInfo, "TempoControl__1getTempo return value %d", returnValue);
-
-    return (error == KErrNone) ? returnValue : error;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/tmmaparametervalidator.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,628 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for storing and parsing properties
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <mmfformatimplementationuids.hrh>
-#include <mmfcontrollerimplementationuids.hrh>
-#include "cmmaplayerproperties.h"
-#include <mmfcontrollerpluginresolver.h>
-
-
-#include "tmmaparametervalidator.h"
-
-// CONSTANTS
-
-// AUDIO PARAMETERS
-_LIT(KPropertyEncoding,     "encoding");
-_LIT(KPropertyEncodingPcm,  "pcm");     // Wav
-_LIT(KPropertyEncodingAmr,  "amr");     // Amr
-_LIT(KPropertyEncodingGsm,  "gsm");
-_LIT(KPropertyEncodingUlaw, "ulaw");    // Au
-_LIT(KPropertyEncodingAlaw, "alaw");
-_LIT(KPropertyEncodingRaw,  "raw");     // Raw pcm
-_LIT(KPropertyEncodingNone,  "");       // empty string
-
-_LIT(KContentTypeWav, "audio/wav");
-_LIT(KContentTypeAu,  "audio/au");
-_LIT(KContentTypeAmr, "audio/amr");
-_LIT(KContentTypeRaw, "audio/raw");
-
-// Format used if not specified in locator
-_LIT(KDefaultAudioRecordContentType, "audio/wav");
-
-_LIT(KPropertyRate,         "rate");
-_LIT(KPropertyBits,         "bits");
-_LIT(KPropertyChannels,     "channels");
-
-_LIT(KPropertyEndian,       "endian");
-MMA_PARAMETER_STR(KPropertyEndianLittle, "little");
-MMA_PARAMETER_STR(KPropertyEndianBig,    "big");
-MMA_PARAMETER_ARRAY(KValidEndianValues)
-{
-    {
-        &KPropertyEndianLittle
-    }, {&KPropertyEndianBig}
-};
-
-_LIT(KPropertySigned,       "signed");
-MMA_PARAMETER_STR(KPropertySignedSigned, "signed");
-MMA_PARAMETER_STR(KPropertySignedUnsigned, "unsigned");
-MMA_PARAMETER_ARRAY(KValidSignedValues)
-{
-    {
-        &KPropertySignedSigned
-    }, {&KPropertySignedUnsigned}
-};
-
-// VIDEO PARAMETERS
-_LIT(KPropertyFps,         "fps");
-_LIT(KPropertyWidth,       "width");
-_LIT(KPropertyHeight,      "height");
-
-const TInt KSizeNotSet = -1;
-
-// Format used if not specified in locator
-_LIT(KDefaultVideoRecordContentType, "video/3gpp");
-
-//IMAGE PARAMETERS
-_LIT(KPropertyType,             "type");
-MMA_PARAMETER_STR(KPropertyJfif,  "jfif");
-MMA_PARAMETER_STR(KPropertyExif,  "exif");
-MMA_PARAMETER_ARRAY(KValidTypes)
-{
-    {
-        &KPropertyJfif
-    }, {&KPropertyExif}
-};
-
-_LIT(KFormatPng, "png");
-_LIT(KFormatJpg, "jpeg");   // not "jpg"
-_LIT(KFormatGif, "gif");
-_LIT(KFormatBmp, "bmp");
-_LIT(KContentTypePng, "image/png");
-_LIT(KContentTypeJpg, "image/jpeg");
-_LIT(KContentTypeJpg2,"image/jpg");
-_LIT(KContentTypeGif, "image/gif");
-_LIT(KContentTypeBmp, "image/bmp");
-
-_LIT(KPropertyColor, "colors");
-MMA_PARAMETER_STR(KPropertyRGB888,  "rgb888");
-MMA_PARAMETER_STR(KPropertyRGB444,  "rgb444");
-MMA_PARAMETER_STR(KPropertyGray16,  "gray16");
-MMA_PARAMETER_STR(KPropertyGray8,   "gray8");
-
-_LIT(KPropertyQuality, "quality");
-const TInt KDefaultQuality = 75; // digged out from ICL source
-const TInt KDefaultBpp = 24;
-const TInt KDefaultBpp444 = 12;
-const TInt KDefaultBppGray16 = 16;
-const TInt KDefaultBppGray8 = 8;
-const TInt KNoUserDefinedQuality = -1;
-const TReal32 KNoUserDefinedFps = -1;
-
-// CMMAImageSettings container destructor
-CMMAImageSettings::~CMMAImageSettings()
-{
-    delete iMimeType;
-    delete iType;
-    delete iImageData;
-}
-
-CMMAAudioSettings::~CMMAAudioSettings()
-{
-    delete iContentType;
-}
-
-CMMAAudioSettings *TMMAParameterValidator::ValidateAudioPropertiesL(const TDesC& aProperties)
-{
-    CMMAAudioSettings* settings = new(ELeave) CMMAAudioSettings;
-    CleanupStack::PushL(settings);
-
-    CMMAParameterRuleSet* rules = CMMAParameterRuleSet::NewLC();
-
-    // "bits" must be between 0 - 24
-    TMMAParameterRuleInt bitsRule(KPropertyBits, 0, 24);
-    rules->AppendRuleL(&bitsRule);
-
-    // "rate" must be positive
-    TMMAParameterRuleInt rateRule(KPropertyRate, 1);
-    rules->AppendRuleL(&rateRule);
-
-    // "channels" must be 1 or 2
-    TMMAParameterRuleInt channelsRule(KPropertyChannels, 1, 2);
-    rules->AppendRuleL(&channelsRule);
-
-    // "signed" must be "signed" or "unsigned"
-    TMMAParameterRuleDes signedRule(KPropertySigned, KValidSignedValues,
-                                    MMA_PARAMETER_ARRAY_SIZE(KValidSignedValues));
-    rules->AppendRuleL(&signedRule);
-
-    // "endian" must be "little" or "big"
-    TMMAParameterRuleDes endianRule(KPropertyEndian, KValidEndianValues,
-                                    MMA_PARAMETER_ARRAY_SIZE(KValidEndianValues));
-    rules->AppendRuleL(&endianRule);
-
-    // "encoding" must be one of valid values
-    TMMAParameterRuleDes encodingRule(KPropertyEncoding);
-    rules->AppendRuleL(&encodingRule);
-
-    CMMAPlayerProperties* properties = CMMAPlayerProperties::NewL(aProperties, *rules);
-    CleanupStack::PushL(properties);
-
-    // validating properties
-    properties->ValidateL();
-
-    TInt bits = KDefaultBits;
-    properties->GetProperty(KPropertyBits, bits);
-
-    settings->iRate = KDefaultRate;
-    properties->GetProperty(KPropertyRate, settings->iRate);
-
-    settings->iChannels = KDefaultChannels;
-    properties->GetProperty(KPropertyChannels, settings->iChannels);
-
-
-    // Normally encoders are not streamable
-    settings->iStreamableFormat = EFalse;
-
-    // signed=signed/unsigned (default is unsigned for 8bit, signed for 16bit)
-    TBool dataSigned = EFalse;
-    if (properties->Compare(KPropertyBits, 16))
-    {
-        dataSigned = ETrue;
-    }
-
-    if (properties->Compare(KPropertySigned, KPropertySignedSigned()))
-    {
-        dataSigned = ETrue;
-    }
-    else if (properties->Compare(KPropertySigned, KPropertySignedUnsigned()))
-    {
-        dataSigned = EFalse;
-    }
-
-    // little by default
-    TBool endianLittle = ETrue;
-    if (properties->Compare(KPropertyEndian, KPropertyEndianBig()))
-    {
-        endianLittle = EFalse;
-    }
-
-    settings->iDataType = KMMFFourCCCodeNULL;
-
-    // encoding specific
-
-    TPtrC encoding(NULL, 0);
-    properties->GetProperty(KPropertyEncoding, encoding);
-
-    if ((encoding == KPropertyEncodingAmr()) ||
-            (encoding == KPropertyEncodingGsm()))
-    {
-        // AMR format
-        encoding.Set(KContentTypeAmr());
-    }
-
-    else if (encoding == KPropertyEncodingUlaw())
-    {
-        // AU format, ulaw codec
-        encoding.Set(KContentTypeAu());
-        settings->iDataType = KMMFFourCCCodeMuLAW;
-    }
-
-    else if (encoding == KPropertyEncodingAlaw())
-    {
-        // AU format, alaw codec
-        encoding.Set(KContentTypeAu());
-        settings->iDataType = KMMFFourCCCodeALAW;
-    }
-
-    else if (encoding == KPropertyEncodingPcm())
-    {
-        // wav format
-        encoding.Set(KContentTypeWav());
-    }
-
-    else if (encoding == KPropertyEncodingRaw())
-    {
-        // raw format, default codec
-        encoding.Set(KContentTypeRaw());
-    }
-
-    else if ((encoding == KPropertyEncodingNone()))     // this is the default case
-    {
-        encoding.Set(KDefaultAudioRecordContentType());
-    }
-
-    settings->iContentType = encoding.AllocL();
-
-
-    // wav specific
-    if (*settings->iContentType == KContentTypeWav())
-    {
-        if (bits == 8)
-        {
-            settings->iDataType = KMMFFourCCCodePCMU8;
-        }
-
-        else if (bits == 16)
-        {
-            settings->iDataType = KMMFFourCCCodePCM16;
-        }
-
-        else if (bits != KDefaultBits)
-        {
-            User::Leave(KErrNotSupported);
-        }
-    }
-
-    // raw specific
-    if (*settings->iContentType == KContentTypeRaw())
-    {
-        if (bits == 8)
-        {
-            if (dataSigned)
-            {
-                settings->iDataType = KMMFFourCCCodePCM8;
-            }
-            else
-            {
-                settings->iDataType = KMMFFourCCCodePCMU8;
-            }
-        }
-
-        else if (bits == 16)
-        {
-            if (endianLittle)
-            {
-                if (dataSigned)
-                {
-                    settings->iDataType = KMMFFourCCCodePCM16;
-                }
-                else
-                {
-                    settings->iDataType = KMMFFourCCCodePCMU16;
-                }
-            }
-            else // Big endian
-            {
-                if (dataSigned)
-                {
-                    settings->iDataType = KMMFFourCCCodePCM16B;
-                }
-                else
-                {
-                    settings->iDataType = KMMFFourCCCodePCMU16B;
-                }
-            }
-        }
-
-        else if (bits != KDefaultBits) // bits not 8 or 16
-        {
-            User::Leave(KErrNotSupported);
-        }
-
-        settings->iEncoding = TUid::Uid(KMmfUidFormatRAWWrite);
-        settings->iController = TUid::Uid(KMmfUidControllerAudio);
-    }
-
-
-    CleanupStack::PopAndDestroy(2);   // rules, properties
-    CleanupStack::Pop(settings);
-    return settings;
-}
-
-TMMAVideoSettings TMMAParameterValidator::ValidateVideoPropertiesL(const TDesC& aProperties)
-{
-    CheckEncodingL(aProperties);
-    TMMAVideoSettings settings;
-    CMMAParameterRuleSet* rules = CMMAParameterRuleSet::NewLC();
-
-    // "fps" is real, taking it as string and validating later
-    TMMAParameterRuleDes fpsRule(KPropertyFps);
-    rules->AppendRuleL(&fpsRule);
-
-    // "width" must be positive
-    TMMAParameterRuleInt widthRule(KPropertyWidth, 1);
-    rules->AppendRuleL(&widthRule);
-
-    // "height" must be positive
-    TMMAParameterRuleInt heightRule(KPropertyHeight, 1);
-    rules->AppendRuleL(&heightRule);
-
-    // "encoding" can be anything in this point (actual validation will be done by MMF)
-    TMMAParameterRuleDes encodingRule(KPropertyEncoding);
-    rules->AppendRuleL(&encodingRule);
-
-    CMMAPlayerProperties* properties = CMMAPlayerProperties::NewL(aProperties, *rules);
-    CleanupStack::PushL(properties);
-
-    // validating properties
-    properties->ValidateL();
-
-    properties->GetProperty(KPropertyWidth, settings.iWidth = KSizeNotSet);
-    properties->GetProperty(KPropertyHeight, settings.iHeight = KSizeNotSet);
-
-    TPtrC fps;
-    settings.iFps = KNoUserDefinedFps;
-    if (properties->GetProperty(KPropertyFps, fps))
-    {
-        TLex lex(fps);
-        TReal32 fpsReal;
-        // try to get fps value from string
-        TInt err = lex.Val(fpsReal);
-        if (err == KErrNone)
-        {
-            // Check if there other characters after
-            // number ( 34xxx )
-            if (!lex.Eos() ||
-                    (fpsReal <= 0))
-            {
-                User::Leave(KErrArgument);
-            }
-            else
-            {
-                settings.iFps = fpsReal;
-            }
-        }
-        else if (err == KErrNoMemory)
-        {
-            User::Leave(KErrNoMemory);
-        }
-        else
-        {
-            // value is not available
-            User::Leave(KErrArgument);
-        }
-    }
-
-    settings.iEncoding.Set(KDefaultVideoRecordContentType());
-    properties->GetProperty(KPropertyEncoding, settings.iEncoding);
-
-    CleanupStack::PopAndDestroy(2);   // rules, properties
-    return settings;
-}
-
-CMMAImageSettings* TMMAParameterValidator::ValidateImagePropertiesL(const TDesC& aProperties)
-{
-    CMMAImageSettings* settings = new(ELeave)CMMAImageSettings;
-    CleanupStack::PushL(settings);
-
-    CMMAParameterRuleSet* rules = CMMAParameterRuleSet::NewLC();
-
-    // "width" must be positive
-    TMMAParameterRuleInt widthRule(KPropertyWidth, 1);
-    rules->AppendRuleL(&widthRule);
-
-    // "height" must be positive
-    TMMAParameterRuleInt heightRule(KPropertyHeight, 1);
-    rules->AppendRuleL(&heightRule);
-
-    // "encoding" final validation is done with image encoder
-    TMMAParameterRuleDes encodingRule(KPropertyEncoding);
-    rules->AppendRuleL(&encodingRule);
-
-    // "color" can be anything in this point, it will be validated later
-    TMMAParameterRuleDes colorRule(KPropertyColor);
-    rules->AppendRuleL(&colorRule);
-
-    // "type" must be "jfif" or "exif"
-    TMMAParameterRuleDes typeRule(KPropertyType, KValidTypes,
-                                  MMA_PARAMETER_ARRAY_SIZE(KValidTypes));
-    rules->AppendRuleL(&typeRule);
-
-    // "quality" must be between 0 and 100
-    TMMAParameterRuleInt qualityRule(KPropertyQuality, 0, 100);
-    rules->AppendRuleL(&qualityRule);
-
-    CMMAPlayerProperties* properties = CMMAPlayerProperties::NewL(aProperties, *rules);
-    CleanupStack::PushL(properties);
-
-    // validating properties
-    properties->ValidateL();
-
-    properties->GetProperty(KPropertyWidth, settings->iWidth = KSizeNotSet);
-    properties->GetProperty(KPropertyHeight, settings->iHeight = KSizeNotSet);
-
-    // do not set quality if user has not defined it
-    TInt quality = KNoUserDefinedQuality;
-    properties->GetProperty(KPropertyQuality, quality);
-
-    TPtrC encoding;
-    if (properties->Compare(KPropertyEncoding, KFormatPng) ||
-            properties->Compare(KPropertyEncoding, KContentTypePng))
-    { //PNG
-        settings->iMimeType = CreateHBufC8FromUnicodeL(KContentTypePng);
-        TPngEncodeData* imageData = new(ELeave)TPngEncodeData();
-        imageData->iBitsPerPixel = KDefaultBpp;
-        imageData->iColor = ETrue;
-        imageData->iPaletted = EFalse;
-        imageData->iLevel = TPngEncodeData::EDefaultCompression;
-
-        CleanupStack::PushL(imageData);
-        TPtrC color;
-        if (properties->Compare(KPropertyColor, KPropertyRGB888()))
-        {
-            // default
-        }
-        else if (properties->Compare(KPropertyColor, KPropertyRGB444()))
-        {
-            imageData->iBitsPerPixel = KDefaultBpp444;
-        }
-        else if (properties->Compare(KPropertyColor, KPropertyGray16()))
-        {
-            imageData->iBitsPerPixel = KDefaultBppGray16;
-            imageData->iColor = EFalse;
-        }
-        else if (properties->Compare(KPropertyColor, KPropertyGray8()))
-        {
-            imageData->iBitsPerPixel = KDefaultBppGray8;
-            imageData->iColor = EFalse;
-        }
-        else if (properties->GetProperty(KPropertyColor, color))
-        {
-            // not valid color parameter
-            User::Leave(KErrArgument);
-        }
-        settings->iImageData = CFrameImageData::NewL();
-        User::LeaveIfError(settings->iImageData->AppendFrameData(imageData));
-        // CFrameImageData took ownership of imageData
-        CleanupStack::Pop(imageData);
-
-        // png quality setting not supported, "type" is only for jpeg.
-        TPtrC tmp;
-        if (quality != KNoUserDefinedQuality ||
-                properties->GetProperty(KPropertyType, tmp)
-           )
-        {
-            User::Leave(KErrArgument);
-        }
-    }
-    else if (properties->Compare(KPropertyEncoding, KFormatJpg) ||
-             properties->Compare(KPropertyEncoding, KContentTypeJpg) ||
-             properties->Compare(KPropertyEncoding, KContentTypeJpg2))
-    { // JPG
-        settings->iMimeType = CreateHBufC8FromUnicodeL(KContentTypeJpg);
-        if (properties->Compare(KPropertyType, KPropertyJfif()))
-        {
-            settings->iType = CreateHBufC8FromUnicodeL(KPropertyJfif());
-        }
-        else if (properties->Compare(KPropertyType, KPropertyExif()))
-        {
-            settings->iType = CreateHBufC8FromUnicodeL(KPropertyExif());
-        }
-        else
-        {
-            settings->iType = CreateHBufC8FromUnicodeL(KPropertyExif());
-        }
-
-        TJpegImageData* imageData = new(ELeave)TJpegImageData();
-        CleanupStack::PushL(imageData);
-        imageData->iQualityFactor = KDefaultQuality;
-        imageData->iSampleScheme = TJpegImageData::EColor444;
-        if (quality != KNoUserDefinedQuality)
-        {
-            imageData->iQualityFactor = quality;
-        }
-        settings->iImageData = CFrameImageData::NewL();
-        User::LeaveIfError(settings->iImageData->AppendImageData(imageData));
-        // CFrameImageData took ownership of imageData
-        CleanupStack::Pop(imageData);
-
-        TPtrC tmp;
-        // jpg encoders colors cannot be configured,
-        // notice that if there was "type" defined it must be "jfif"
-        // and encoder will check that anyway.
-        if (properties->GetProperty(KPropertyColor, tmp))
-        {
-            User::Leave(KErrArgument);
-        }
-    }
-    else if (properties->Compare(KPropertyEncoding, KFormatGif) ||
-             properties->Compare(KPropertyEncoding, KContentTypeGif))
-    {//GIF
-        settings->iMimeType = CreateHBufC8FromUnicodeL(KContentTypeGif);
-        TPtrC tmp;
-        // gif encoder is not configurable
-        if (properties->GetProperty(KPropertyColor, tmp) ||
-                properties->GetProperty(KPropertyType, tmp)  ||
-                quality != KNoUserDefinedQuality)
-        {
-            User::Leave(KErrArgument);
-        }
-    }
-    else if (properties->Compare(KPropertyEncoding, KFormatBmp) ||
-             properties->Compare(KPropertyEncoding, KContentTypeBmp))
-    {//BMP
-        settings->iMimeType = CreateHBufC8FromUnicodeL(KContentTypeBmp);
-        TBmpImageData* imageData = new(ELeave)TBmpImageData();
-        CleanupStack::PushL(imageData);
-        imageData->iBitsPerPixel = KDefaultBpp;
-        TPtrC color;
-        if (properties->Compare(KPropertyColor, KPropertyRGB888()))
-        {
-            // default
-        }
-        else if (properties->Compare(KPropertyColor, KPropertyRGB444()))
-        {
-            imageData->iBitsPerPixel = KDefaultBpp444;
-        }
-        else if (properties->GetProperty(KPropertyColor, color))
-        {
-            // not valid color parameter
-            User::Leave(KErrArgument);
-        }
-
-        settings->iImageData = CFrameImageData::NewL();
-        User::LeaveIfError(settings->iImageData->AppendImageData(imageData));
-        // CFrameImageData took ownership of imageData
-        CleanupStack::Pop(imageData);
-
-        //  quality not supported, "type" is only for jpg
-        TPtrC tmp;
-        if (quality != KNoUserDefinedQuality ||
-                properties->GetProperty(KPropertyType, tmp))
-        {
-            User::Leave(KErrArgument);
-        }
-    }
-    else if (properties->GetProperty(KPropertyEncoding, encoding))
-    { // OTHER POSSIBLE TYPE
-        // trying to create encoder with only content/mime-type
-        settings->iMimeType = CreateHBufC8FromUnicodeL(encoding);
-
-        // No extra parameters, only content-type
-        TPtrC tmp;
-        if (properties->GetProperty(KPropertyColor, tmp) ||
-                properties->GetProperty(KPropertyType, tmp) ||
-                quality != KNoUserDefinedQuality)
-        {
-            User::Leave(KErrArgument);
-        }
-    }
-    else // default: we had empty properties string
-    {
-        settings->iMimeType = CreateHBufC8FromUnicodeL(KContentTypePng);
-    }
-    CleanupStack::PopAndDestroy(properties);
-    CleanupStack::PopAndDestroy(rules);
-    CleanupStack::Pop(settings);
-    return settings;
-}
-
-void TMMAParameterValidator::CheckEncodingL(const TDesC& aProperties)
-{
-    TInt encodingPos = aProperties.Find(KPropertyEncoding);
-    // empty properties is valid and
-    // encoding must be first parameter and must exist every time
-    if ((aProperties.Length() > 0) &&
-            ((encodingPos == KErrNotFound) ||
-             (encodingPos != 0)))
-    {
-        User::Leave(KErrArgument);
-    }
-}
-
-HBufC8* TMMAParameterValidator::CreateHBufC8FromUnicodeL(const TDesC& aDes)
-{
-    HBufC8* tmp = HBufC8::NewL(aDes.Length());
-    tmp->Des().Copy(aDes);
-    return tmp;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/videocontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,311 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAVideoControl
-*
-*/
-
-
-//#include <jutils.h>
-//#include <lcdui.h>
-#include "com_nokia_microedition_media_control_VideoControl.h"
-#include "mmafunctionserver.h"
-#include "cmmavideocontrol.h"
-//#include "CMIDToolkit.h"
-#include "cmmadeleterefevent.h"
-#include <logger.h>
-
-#include <JniEnvWrapper.h>
-
-//#include <mswtclient.h>
-//#include <swtcliententry.h>
-#include "s60commonutils.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1construct
-(JNIEnv* aJni, jobject aControlObject, jint aControlHandle,
- jint aEventSourceHandle, jint aToolkitHandle)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1construct + ");
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl* >(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
-
-    __ASSERT_DEBUG(videoControl,
-                   User::Panic(_L("videocontrol::control is null"),
-                               KErrArgument));
-    __ASSERT_DEBUG(eventSource,
-                   User::Panic(_L("videocontrol::eventsource is null"),
-                               KErrArgument));
-
-    // reference must be done, that events can sent to java side
-    jobject controlObject = aJni->NewWeakGlobalRef(aControlObject);
-
-   // CMIDToolkit* ptoolkit = JavaUnhand< CMIDToolkit >(aToolkitHandle);
-   
-    //JNIENV_TO_VM(aJni);
-    TInt error = eventSource->ExecuteTrap(&CMMAVideoControl::ConstructL,
-                                          videoControl,
-                                          controlObject,
-                                          eventSource,
-                                          eventSource->getValidJniEnv(), //Passes JavaVM*, not JNIEnv*.
-                                          (MMMAEventPoster*)eventSource/*,
-                                          ptoolkit*/);
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1construct - ");
-    return error;
-}
-
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1setDisplayProperty
-(JNIEnv*, jobject, jint aControlHandle, jint aEventSourceHandle,
- jint aPropertyA, jint aPropertyB, jint aPropertyType)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1setDisplayProperty");
-
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl* >(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    __ASSERT_DEBUG(videoControl,
-                   User::Panic(_L("videocontrol::control is null"),
-                               KErrArgument));
-    __ASSERT_DEBUG(eventSource,
-                   User::Panic(_L("videocontrol::eventsource is null"),
-                               KErrArgument));
-
-    TInt error(eventSource->ExecuteTrap(&CMMAVideoControl::StaticSetPropertyL,
-                                        videoControl,
-                                        aPropertyType,
-                                        aPropertyA,
-                                        aPropertyB));
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1setDisplayProperty -");
-    return error;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1getControlProperty
-(JNIEnv*, jobject, jint aControlHandle, jint aEventSourceHandle,
- jint aPropertyType)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1getControlProperty");
-
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl* >(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    __ASSERT_DEBUG(videoControl,
-                   User::Panic(_L("videocontrol::control is null"),
-                               KErrArgument));
-    __ASSERT_DEBUG(eventSource,
-                   User::Panic(_L("videocontrol::evetnsource is null"),
-                               KErrArgument));
-    TInt returnValue(KErrNone);
-
-    TInt error(eventSource->ExecuteTrap(&CMMAVideoControl::StaticGetPropertyL,
-                                        videoControl,
-                                        aPropertyType,
-                                        &returnValue));
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1getControlProperty - ");
-    if (error == KErrNone)
-    {
-        return returnValue;
-    }
-    return error;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1getSnapshot
-(JNIEnv* aJni, jobject, jint aControlHandle, jint aEventSourceHandle,
- jstring aProperties)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1getSnapshot + ");
-
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl* >(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    __ASSERT_DEBUG(videoControl,
-                   User::Panic(_L("videocontrol::control is null"),
-                               KErrArgument));
-    __ASSERT_DEBUG(eventSource,
-                   User::Panic(_L("videocontrol::evetnsource is null"),
-                               KErrArgument));
-
-    JStringUtils properties(*aJni, aProperties);
-    TInt error(eventSource->ExecuteTrap(&CMMAVideoControl::TakeSnapShotL,
-                                        videoControl,
-                                        (const TDesC*)&properties));
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1getSnapshot - ");
-    return error;
-}
-
-/**
- * Initializes dynamic display mode
- * @return handle to MMMADirectContent or error code
- */
-LOCAL_C jint InitDynamicMode(MMAFunctionServer* aEventSource,
-                             CMMAVideoControl* aVideoControl,
-                             jobject aGUIObject,
-                             CMMAEvent* aDeleteRefEvent)
-{
-    TInt contentHandle = 0;
-    TInt error = aEventSource->ExecuteTrap(
-                     &CMMAVideoControl::StaticInitDynamicModeL,
-                     aVideoControl,
-                     &contentHandle,
-                     aEventSource,
-                     aGUIObject,
-                     aDeleteRefEvent);
-
-    // if init failed return error code
-    if (error != KErrNone)
-    {
-        contentHandle = error;
-    }
-    return contentHandle;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1initDisplayMode
-(JNIEnv* aJni, jobject aJavaVideoControl, jint aControlHandle, jint aEventSourceHandle,
- jobject aJavaDisplayObj, jobject aComponent)
-{
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1initDisplayMode +");
-    LOG1( EJavaMMAPI, EInfo, "aControlHandle = %d", aControlHandle);
-    LOG1( EJavaMMAPI, EInfo, "aEventSourceHandle = %d", aEventSourceHandle);
-//    LOG1( EJavaMMAPI, EInfo, "aComponentHandle = %d", aComponentHandle);
-
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl* >(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-        
-    jobject javaVideoControlPeer = aJni->NewWeakGlobalRef(aJavaVideoControl);
-
-    // Reference need to created to the component that component won't be deleted
-    // before display associated to it.
-    jobject componentRef = aJni->NewGlobalRef(aComponent);
-    if (componentRef == NULL)
-    {
-        return KErrNoMemory;
-    }
-    // Component reference need to be deleted in controls destructor. Created here to
-    // be sure that reference can be deleted. .
-    CMMAEvent* deleteRefEvent = new CMMADeleteRefEvent(componentRef);
-    // Cleanup stack is not needed, because static init takes the ownership and
-    // cannot leave before that.
-    if (!deleteRefEvent)
-    {
-        aJni->DeleteGlobalRef(componentRef);
-        return KErrNoMemory;
-    }
-
-// for javaside display object  // TODO:  delete this object after its not required in destructor of control
-
-	// Reference need to created to the component that component won't be deleted
-    // before display associated to it.
-    jobject javaDisplayRef = aJni->NewGlobalRef(aJavaDisplayObj);
-    if (javaDisplayRef == NULL)
-    {
-        return KErrNoMemory;
-    }
-
-    /*// other modes has component
-    if (aComponentHandle == 0)
-    {
-        return InitDynamicMode(eventSource,
-                               videoControl,
-                               componentRef,
-                               deleteRefEvent);
-    }
-	*/
-  //  MMIDComponent* component = JavaUnhand< MMIDComponent >(aComponentHandle);
-
-
-    __ASSERT_DEBUG(videoControl,
-                   User::Panic(_L("videocontrol::control is null"),
-                               KErrArgument));
-//    __ASSERT_DEBUG(component,
-//                   User::Panic(_L("videocontrol::component is null"),
-//                               KErrArgument));
-    __ASSERT_DEBUG(eventSource,
-                   User::Panic(_L("videocontrol::eventsource is null"),
-                               KErrArgument));
-    TInt handle(0);
-
-    TInt error(eventSource->ExecuteTrap(&CMMAVideoControl::StaticInitL,
-                                        videoControl,
-                                        javaDisplayRef,
-                                        eventSource,
-                                        &handle,
-                                        deleteRefEvent));
-    LOG( EJavaMMAPI, EInfo, "Java_com_nokia_microedition_media_control_VideoControl__1initDisplayMode - ");
-    if (error == KErrNone)
-    {
-        return handle;
-    }
-    return error;
-}
-
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_media_control_VideoControl__1setForeground
-(JNIEnv* /*aJni*/, jobject, jint aControlHandle, jint aEventSourceHandle, jint aIsForeground)
-{
-    LOG1( EJavaMMAPI, EInfo, "_1setForeground + FOREGROUND = %d",aIsForeground);
-    CMMAVideoControl* videoControl =
-        reinterpret_cast< CMMAVideoControl *>(aControlHandle);
-
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    TInt handle(0);
-    TInt error(eventSource->ExecuteTrap(&CMMAVideoControl::StaticSetForegroundL,
-                                        videoControl,
-                                        aIsForeground));
-    if (error == KErrNone)
-    {
-        LOG( EJavaMMAPI, EInfo, "_1setForeground -");
-        return handle;
-    }
-
-    LOG( EJavaMMAPI, EInfo, "_1setForeground -");
-    return error;
-}
-JNIEXPORT jboolean JNICALL Java_com_nokia_microedition_media_control_VideoControl__1isESWT
-(JNIEnv *, jobject)
-{/*
-    MSwtClient* client = NULL;
-    TRAP_IGNORE(client = SWT::CreateClientL());
-
-    if (!client)
-    {
-        return false; // LCDUI midlet running
-    }
-    else
-    {
-        delete client;
-        client = NULL;
-        return true;  // eSWT midlet running
-    }
-*/
-    // enable above code once you have support for eswt in 3.2.3, it is already enable for 5.0
-return false;
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/baseline/src/volumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class has JNI wrappers for CMMAVolumeControl
-*
-*/
-
-//#include <jutils.h>
-//#include "mmapiutils.h"
-
-#include "com_nokia_microedition_media_control_VolumeControl.h"
-#include "mmafunctionserver.h"
-#include "cmmavolumecontrol.h"
-
-
-/*
- * Class:     com_nokia_microedition_media_control_VolumeControl
- * Method:    _setLevel
- * Signature: (III)I
- */
-
-JNIEXPORT int JNICALL Java_com_nokia_microedition_media_control_VolumeControl__1setLevel
-(JNIEnv *, jclass , jint aEventSource, jint aVolumeControl, jint aLevel)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAVolumeControl* volumeControl =
-        reinterpret_cast< CMMAVolumeControl* >(aVolumeControl);
-
-    TInt error = eventSource->ExecuteTrap(&CMMAVolumeControl::StaticSetLevelL,
-                                          volumeControl,
-                                          aLevel);
-    return error;
-}
-
-/*
- * Class:     com_nokia_microedition_media_control_VolumeControl
- * Method:    _getLevel
- * Signature: (II)I
- */
-
-JNIEXPORT int JNICALL Java_com_nokia_microedition_media_control_VolumeControl__1getLevel
-(JNIEnv *, jclass , jint aEventSource, jint aVolumeControl)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast< MMAFunctionServer* >(aEventSource);
-
-    CMMAVolumeControl* volumeControl =
-        reinterpret_cast< CMMAVolumeControl* >(aVolumeControl);
-
-    TInt level(0);
-    TInt error = eventSource->ExecuteTrap(&CMMAVolumeControl::StaticGetLevelL,
-                                          volumeControl, &level);
-    if (error == KErrNone)
-    {
-        return level;
-    }
-    return error;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="javamobilemedia" default="deploy" basedir=".">
-
-  <import file="../../../build/utilities.xml"/>
-
- 
-  <!-- Needed by the utilities.xml. See the description form the utilities.xml
-       file -->
-
-  <target name="compile">
-    <omj.javac classpath="${classpath}:${compile.result.root}/eswtqt/classes/first:${compile.result.root}/openlcdui/classes/first:${compile.result.root}/javautils/classes/first"/>
-  </target>
-
-<!-- conditional compilation variation depending upon the platform
--->
-  <target name="init.component.properties">
-    <condition property="java.src.paths" value="../baseline/javasrc:../volumekeys/javasrc:../baseline/javasrc.emc" else="../baseline/javasrc:../volumekeys/javasrc:../baseline/javasrc.mmf">
-      <isset property="RD_JAVA_HTTP_EMC_ENABLED"/>
-    </condition>
-    <echo message="java.src.paths = ${java.src.paths}"/>
-  </target>
-  
-    <condition property="javah.classnames" value="com.nokia.microedition.media.BufferDataSource,
-                   com.nokia.microedition.media.BufferSourceStream,
-                   com.nokia.microedition.media.ConnectorDataSource,
-                   com.nokia.microedition.media.ControlContainer,
-                   com.nokia.microedition.media.HttpDataSource,
-                   com.nokia.microedition.media.InputStreamDataSource,
-                   com.nokia.microedition.media.InputStreamSeekControl,
-                   com.nokia.microedition.media.InputStreamSourceStream,
-                   com.nokia.microedition.media.InternalPlayer,
-                   com.nokia.microedition.media.Locator,
-                   com.nokia.microedition.media.ManagerImpl,
-                   com.nokia.microedition.media.MMAInvokeListener,
-                   com.nokia.microedition.media.NativePlayerFactory,
-                   com.nokia.microedition.media.PlayerBase,
-                   com.nokia.microedition.media.PlayerImpl,
-                   com.nokia.microedition.media.PlayerListenerImpl,
-                   com.nokia.microedition.media.PlugIn,
-                   com.nokia.microedition.media.SeekControl,
-                   com.nokia.microedition.media.Setup,
-                   com.nokia.microedition.media.SourcePlayer,
-                   com.nokia.microedition.media.SystemTimeBase,
-                   com.nokia.microedition.media.control.ControlImpl,
-                   com.nokia.microedition.media.control.FramePositioningControl,
-                   com.nokia.microedition.media.control.MetaDataControl,
-                   com.nokia.microedition.media.control.MIDIControl,
-                   com.nokia.microedition.media.control.MMACanvasDisplay,
-                   com.nokia.microedition.media.control.BaseDisplay,
-                   com.nokia.microedition.media.control.MMAGUIFactory,
-                   com.nokia.microedition.media.control.PitchControl,
-                   com.nokia.microedition.media.control.RateControl,
-                   com.nokia.microedition.media.control.RecordControl,
-                   com.nokia.microedition.media.control.StopTimeControl,
-                   com.nokia.microedition.media.control.TempoControl,
-                   com.nokia.microedition.media.control.VideoControl,
-                   com.nokia.microedition.media.control.VideoItem,
-                   com.nokia.microedition.media.control.VolumeControl,
-                   com.nokia.microedition.media.protocol.capture.audio.Protocol,
-                   com.nokia.microedition.media.protocol.capture.devcam0.Protocol,
-                   com.nokia.microedition.media.protocol.capture.devcam1.Protocol,
-                   com.nokia.microedition.media.protocol.capture.video.Protocol,
-                   com.nokia.microedition.media.protocol.capture.Protocol,
-                   com.nokia.microedition.media.protocol.device.midi.Protocol,
-                   com.nokia.microedition.media.protocol.device.tone.Protocol,
-                   com.nokia.microedition.media.protocol.device.Protocol,
-                   com.nokia.microedition.media.protocol.file.Protocol,
-                   com.nokia.microedition.media.protocol.http.Protocol,
-                   com.nokia.microedition.media.protocol.https.Protocol,
-                   com.nokia.microedition.media.protocol.rtsp.Protocol,
-                   com.nokia.microedition.media.protocol.ConnectorProtocol,
-                   com.nokia.microedition.media.protocol.NativeBase,
-                   com.nokia.microedition.media.protocol.OutputStreamWriter,
-                   com.nokia.microedition.media.protocol.Protocol,
-                   com.nokia.microedition.media.protocol.ProtocolFactory,
-                   com.nokia.microedition.media.protocol.ProtocolPackage,
-                   com.nokia.microedition.media.protocol.SeekThread,
-                   com.nokia.microedition.media.protocol.SourceStreamReader,
-                   com.nokia.microedition.media.tone.BlockEndEvent,
-                   com.nokia.microedition.media.tone.BlockStartEvent,
-                   com.nokia.microedition.media.tone.Event,
-                   com.nokia.microedition.media.tone.EventList,
-                   com.nokia.microedition.media.tone.MidiSequence,
-                   com.nokia.microedition.media.tone.MidiSequenceException,
-                   com.nokia.microedition.media.tone.MidiToneConstants,
-                   com.nokia.microedition.media.tone.PlayBlockEvent,
-                   com.nokia.microedition.media.tone.PlayToneImpl,
-                   com.nokia.microedition.media.tone.RepeatEvent,
-                   com.nokia.microedition.media.tone.ToneEvent,
-                   com.nokia.microedition.media.tone.TonePlayer,
-                   com.nokia.microedition.media.tone.ToneSequence,
-                   com.nokia.microedition.media.tone.VolumeEvent,
-                   com.nokia.microedition.volumekeys.ForegroundListener,
-                   com.nokia.microedition.media.protocol.EMCSourceInfo" 
-                   else="com.nokia.microedition.media.BufferDataSource,
-                   com.nokia.microedition.media.BufferSourceStream,
-                   com.nokia.microedition.media.ConnectorDataSource,
-                   com.nokia.microedition.media.ControlContainer,
-                   com.nokia.microedition.media.HttpDataSource,
-                   com.nokia.microedition.media.InputStreamDataSource,
-                   com.nokia.microedition.media.InputStreamSeekControl,
-                   com.nokia.microedition.media.InputStreamSourceStream,
-                   com.nokia.microedition.media.InternalPlayer,
-                   com.nokia.microedition.media.Locator,
-                   com.nokia.microedition.media.ManagerImpl,
-                   com.nokia.microedition.media.MMAInvokeListener,
-                   com.nokia.microedition.media.NativePlayerFactory,
-                   com.nokia.microedition.media.PlayerBase,
-                   com.nokia.microedition.media.PlayerImpl,
-                   com.nokia.microedition.media.PlayerListenerImpl,
-                   com.nokia.microedition.media.PlugIn,
-                   com.nokia.microedition.media.SeekControl,
-                   com.nokia.microedition.media.Setup,
-                   com.nokia.microedition.media.SourcePlayer,
-                   com.nokia.microedition.media.SystemTimeBase,
-                   com.nokia.microedition.media.control.ControlImpl,
-                   com.nokia.microedition.media.control.FramePositioningControl,
-                   com.nokia.microedition.media.control.MetaDataControl,
-                   com.nokia.microedition.media.control.MIDIControl,
-                   com.nokia.microedition.media.control.MMAGUIFactory,
-                   com.nokia.microedition.media.control.PitchControl,
-                   com.nokia.microedition.media.control.RateControl,
-                   com.nokia.microedition.media.control.RecordControl,
-                   com.nokia.microedition.media.control.StopTimeControl,
-                   com.nokia.microedition.media.control.TempoControl,
-                   com.nokia.microedition.media.control.VideoControl,
-                   com.nokia.microedition.media.control.VideoItem,
-                   com.nokia.microedition.media.control.VolumeControl,
-                   com.nokia.microedition.media.protocol.capture.audio.Protocol,
-                   com.nokia.microedition.media.protocol.capture.devcam0.Protocol,
-                   com.nokia.microedition.media.protocol.capture.devcam1.Protocol,
-                   com.nokia.microedition.media.protocol.capture.video.Protocol,
-                   com.nokia.microedition.media.protocol.capture.Protocol,
-                   com.nokia.microedition.media.protocol.device.midi.Protocol,
-                   com.nokia.microedition.media.protocol.device.tone.Protocol,
-                   com.nokia.microedition.media.protocol.device.Protocol,
-                   com.nokia.microedition.media.protocol.file.Protocol,
-                   com.nokia.microedition.media.protocol.http.Protocol,
-                   com.nokia.microedition.media.protocol.https.Protocol,
-                   com.nokia.microedition.media.protocol.rtsp.Protocol,
-                   com.nokia.microedition.media.protocol.ConnectorProtocol,
-                   com.nokia.microedition.media.protocol.NativeBase,
-                   com.nokia.microedition.media.protocol.OutputStreamWriter,
-                   com.nokia.microedition.media.protocol.Protocol,
-                   com.nokia.microedition.media.protocol.ProtocolFactory,
-                   com.nokia.microedition.media.protocol.ProtocolPackage,
-                   com.nokia.microedition.media.protocol.SeekThread,
-                   com.nokia.microedition.media.protocol.SourceStreamReader,
-                   com.nokia.microedition.media.tone.BlockEndEvent,
-                   com.nokia.microedition.media.tone.BlockStartEvent,
-                   com.nokia.microedition.media.tone.Event,
-                   com.nokia.microedition.media.tone.EventList,
-                   com.nokia.microedition.media.tone.MidiSequence,
-                   com.nokia.microedition.media.tone.MidiSequenceException,
-                   com.nokia.microedition.media.tone.MidiToneConstants,
-                   com.nokia.microedition.media.tone.PlayBlockEvent,
-                   com.nokia.microedition.media.tone.PlayToneImpl,
-                   com.nokia.microedition.media.tone.RepeatEvent,
-                   com.nokia.microedition.media.tone.ToneEvent,
-                   com.nokia.microedition.media.tone.TonePlayer,
-                   com.nokia.microedition.media.tone.ToneSequence,
-                   com.nokia.microedition.media.tone.VolumeEvent,
-                   com.nokia.microedition.volumekeys.ForegroundListener,
-                   com.nokia.microedition.volumekeys.LCDUIForegroundListener">
-      <isset property="RD_JAVA_HTTP_EMC_ENABLED"/>
-    </condition>
-  	
- 
-  <target name="system.properties">
-    <properties>
-        audio.encodings=:mobilemedia.DynamicPropertyHandler
-        supports.video.capture=:mobilemedia.DynamicPropertyHandler
-        video.encodings=:mobilemedia.DynamicPropertyHandler
-        microedition.media.version=1.2
-        supports.audio.capture=true
-        supports.mixing=true
-        supports.recording=true
-        video.snapshot.encodings=encoding=png encoding=jpeg encoding=image/png encoding=image/jpeg encoding=image/jpg encoding=image/gif encoding=image/bmp
-    </properties>
-
-  </target>
-
-  <target name="create.internal.api.jar">
-    <omj.internal.apis includes="com/nokia/microedition/media/control/ControlImpl.class,
-                                 com/nokia/microedition/media/control/MMAGUIFactory.class"/>
-  </target>
-
-</project>
--- a/javauis/mmapi_qt/build/bwins/javamobilemediau.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-EXPORTS
-	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-	?SetLoopCount@CMMAPlayer@@UAEXH@Z @ 2 NONAME ; void CMMAPlayer::SetLoopCount(int)
-	?PostObjectEvent@CMMAPlayer@@QAEXW4TEventType@CMMAPlayerEvent@@PAV_jobject@@@Z @ 3 NONAME ; void CMMAPlayer::PostObjectEvent(enum CMMAPlayerEvent::TEventType, class _jobject *)
-	?PrefetchFileL@CMMAEMCAudioPlayer@@MAEXXZ @ 4 NONAME ; void CMMAEMCAudioPlayer::PrefetchFileL(void)
-	?AddControlL@CMMAPlayer@@UAEXPAVCMMAControl@@@Z @ 5 NONAME ; void CMMAPlayer::AddControlL(class CMMAControl *)
-	?NotifyWithStringEvent@CMMAVideoPlayer@@UAEXW4TEventType@CMMAPlayerEvent@@ABVTDesC16@@@Z @ 6 NONAME ; void CMMAVideoPlayer::NotifyWithStringEvent(enum CMMAPlayerEvent::TEventType, class TDesC16 const &)
-	?PostStringEvent@CMMAPlayer@@QAEXW4TEventType@CMMAPlayerEvent@@ABVTDesC16@@@Z @ 7 NONAME ; void CMMAPlayer::PostStringEvent(enum CMMAPlayerEvent::TEventType, class TDesC16 const &)
-	?SnapshotEncoded@CMMAVideoPlayer@@UAEPAVHBufC8@@XZ @ 8 NONAME ; class HBufC8 * CMMAVideoPlayer::SnapshotEncoded(void)
-	?DoOpen@CMMAMMFPlayerBase@@MAEHVTUid@@ABVTDesC8@@01VTMMFPrioritySettings@@@Z @ 9 NONAME ; int CMMAMMFPlayerBase::DoOpen(class TUid, class TDesC8 const &, class TUid, class TDesC8 const &, class TMMFPrioritySettings)
-	?StaticControl@CMMAPlayer@@SAPAVCMMAControl@@PAV1@H@Z @ 10 NONAME ; class CMMAControl * CMMAPlayer::StaticControl(class CMMAPlayer *, int)
-	?Type@CMMAVideoPlayer@@MAEABVTDesC16@@XZ @ 11 NONAME ; class TDesC16 const & CMMAVideoPlayer::Type(void)
-	??0CMMAEMCAudioVolumeControl@@IAE@AAVCMMAEMCAudioPlayer@@@Z @ 12 NONAME ; CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(class CMMAEMCAudioPlayer &)
-	?PublicClassName@CMMAControl@@UBEABVTDesC16@@XZ @ 13 NONAME ; class TDesC16 const & CMMAControl::PublicClassName(void) const
-	?PostActionCompletedStart@CMMAPlayer@@QAEXXZ @ 14 NONAME ; void CMMAPlayer::PostActionCompletedStart(void)
-	?Controller@CMMAMMFPlayerBase@@QAEAAVRMMFController@@XZ @ 15 NONAME ; class RMMFController & CMMAMMFPlayerBase::Controller(void)
-	?PrefetchDataL@CMMAAudioPlayer@@MAEXABVTDesC8@@@Z @ 16 NONAME ; void CMMAAudioPlayer::PrefetchDataL(class TDesC8 const &)
-	??0CMMAVideoUrlPlayer@@IAE@PAVCMMAMMFResolver@@@Z @ 17 NONAME ; CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(class CMMAMMFResolver *)
-	?CloseL@CMMAVideoUrlPlayer@@UAEXXZ @ 18 NONAME ; void CMMAVideoUrlPlayer::CloseL(void)
-	?SnapshotBitmap@CMMAVideoPlayer@@UAEPAVCFbsBitmap@@XZ @ 19 NONAME ; class CFbsBitmap * CMMAVideoPlayer::SnapshotBitmap(void)
-	?NewL@CTimeOutTimer@@SAPAV1@HAAVMTimeOutNotify@@@Z @ 20 NONAME ; class CTimeOutTimer * CTimeOutTimer::NewL(int, class MTimeOutNotify &)
-	?StartL@CMMAVideoUrlPlayer@@UAEXXZ @ 21 NONAME ; void CMMAVideoUrlPlayer::StartL(void)
-	?ReadCompletedL@CMMAEMCAudioPlayer@@UAEXHABVTDesC8@@@Z @ 22 NONAME ; void CMMAEMCAudioPlayer::ReadCompletedL(int, class TDesC8 const &)
-	?NewL@CMMAEMCAudioVolumeControl@@SAPAV1@AAVCMMAEMCAudioPlayer@@@Z @ 23 NONAME ; class CMMAEMCAudioVolumeControl * CMMAEMCAudioVolumeControl::NewL(class CMMAEMCAudioPlayer &)
-	?HandleEvent@CMMAVideoUrlPlayer@@MAEXABVTMMFEvent@@@Z @ 24 NONAME ; void CMMAVideoUrlPlayer::HandleEvent(class TMMFEvent const &)
-	?ConstructL@CMMAVideoUrlPlayer@@IAEXABVTDesC16@@@Z @ 25 NONAME ; void CMMAVideoUrlPlayer::ConstructL(class TDesC16 const &)
-	?SetDisplayL@CMMAVideoPlayer@@UAEXPAVMMMADisplay@@@Z @ 26 NONAME ; void CMMAVideoPlayer::SetDisplayL(class MMMADisplay *)
-	?TakeSnapshotL@CMMAVideoPlayer@@UAE?AW4TEncoding@MMMASnapshot@@PAVTRequestStatus@@ABVTSize@@ABVCMMAImageSettings@@@Z @ 27 NONAME ; enum MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(class TRequestStatus *, class TSize const &, class CMMAImageSettings const &)
-	?StaticAddObjectFromHandleL@MMAFunctionServer@@SAXPAV1@H@Z @ 28 NONAME ; void MMAFunctionServer::StaticAddObjectFromHandleL(class MMAFunctionServer *, int)
-	?SnapshotReady@CMMAVideoControl@@UAEXXZ @ 29 NONAME ; void CMMAVideoControl::SnapshotReady(void)
-	?CreatePlayerL@CMMAMMFPlayerFactory@@MAEPAVCMMAPlayer@@PAVCMMFFormatSelectionParameters@@PBVTDesC16@@@Z @ 30 NONAME ; class CMMAPlayer * CMMAMMFPlayerFactory::CreatePlayerL(class CMMFFormatSelectionParameters *, class TDesC16 const *)
-	?PlayCompleteL@CMMAEMCAudioPlayer@@MAEXH@Z @ 31 NONAME ; void CMMAEMCAudioPlayer::PlayCompleteL(int)
-	?NewL@CMMAAudioVolumeControl@@SAPAV1@PAVCMMAAudioPlayer@@@Z @ 32 NONAME ; class CMMAAudioVolumeControl * CMMAAudioVolumeControl::NewL(class CMMAAudioPlayer *)
-	?PrefetchDataL@CMMAEMCAudioPlayer@@MAEXABVTDesC8@@@Z @ 33 NONAME ; void CMMAEMCAudioPlayer::PrefetchDataL(class TDesC8 const &)
-	?HandlePlaybackCompleteL@CMMAAudioPlayer@@UAEXXZ @ 34 NONAME ; void CMMAAudioPlayer::HandlePlaybackCompleteL(void)
-	?RemoveStateListener@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 35 NONAME ; void CMMAPlayer::RemoveStateListener(class MMMAPlayerStateListener *)
-	??0CMMAEMCAudioPlayer@@IAE@PAVCMMAEMCResolver@@@Z @ 36 NONAME ; CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(class CMMAEMCResolver *)
-	?MidiClient@CMMAMIDIPlayer@@QBEPAVCMidiClientUtility@@XZ @ 37 NONAME ; class CMidiClientUtility * CMMAMIDIPlayer::MidiClient(void) const
-	??1CMMAVideoUrlPlayer@@UAE@XZ @ 38 NONAME ; CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer(void)
-	?ErrorPlaybackComplete@CMMAAudioPlayer@@UAEXH@Z @ 39 NONAME ; void CMMAAudioPlayer::ErrorPlaybackComplete(int)
-	??1CMMAEMCAudioPlayer@@UAE@XZ @ 40 NONAME ; CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer(void)
-	?MMFactory@CMMAEMCPlayerBase@@QAEPAVCMultimediaFactory@multimedia@@XZ @ 41 NONAME ; class multimedia::CMultimediaFactory * CMMAEMCPlayerBase::MMFactory(void)
-	?Players@MMAFunctionServer@@QAEAAV?$RPointerArray@VCMMAPlayer@@@@XZ @ 42 NONAME ; class RPointerArray<class CMMAPlayer> & MMAFunctionServer::Players(void)
-	?PreparePluginSelectionParametersL@CMMAMMFPlayerFactory@@MAEXPAVCMMAMMFResolver@@PAVCMMFFormatSelectionParameters@@@Z @ 43 NONAME ; void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(class CMMAMMFResolver *, class CMMFFormatSelectionParameters *)
-	?PostActionCompleted@CMMAPlayer@@QAEXH@Z @ 44 NONAME ; void CMMAPlayer::PostActionCompleted(int)
-	?RealizeL@CMMAVideoUrlPlayer@@UAEXXZ @ 45 NONAME ; void CMMAVideoUrlPlayer::RealizeL(void)
-	?SetPlayerInstanceObserver@MMAFunctionServer@@QAEXPAVMMMAPlayerInstanceObserver@@@Z @ 46 NONAME ; void MMAFunctionServer::SetPlayerInstanceObserver(class MMMAPlayerInstanceObserver *)
-	?SetPlayerListenerObjectL@CMMAVideoPlayer@@UAEXPAV_jobject@@PAUJNIEnv_@@PAVMMMAEventPoster@@@Z @ 47 NONAME ; void CMMAVideoPlayer::SetPlayerListenerObjectL(class _jobject *, struct JNIEnv_ *, class MMMAEventPoster *)
-	?RealizeL@CMMAEMCAudioPlayer@@UAEXXZ @ 48 NONAME ; void CMMAEMCAudioPlayer::RealizeL(void)
-	?ControlCount@CMMAPlayer@@QAEHXZ @ 49 NONAME ; int CMMAPlayer::ControlCount(void)
-	?DoSetLevelL@CMMAEMCAudioVolumeControl@@UAEXH@Z @ 50 NONAME ; void CMMAEMCAudioVolumeControl::DoSetLevelL(int)
-	?PlayCompleteL@CMMAAudioPlayer@@MAEXH@Z @ 51 NONAME ; void CMMAAudioPlayer::PlayCompleteL(int)
-	?SourceSize@CMMAVideoPlayer@@UAE?AVTSize@@XZ @ 52 NONAME ; class TSize CMMAVideoPlayer::SourceSize(void)
-	?SnapshoterL@CMMAVideoPlayer@@UAEPAVMMMASnapshot@@XZ @ 53 NONAME ; class MMMASnapshot * CMMAVideoPlayer::SnapshoterL(void)
-	?GetDuration@CMMAMMFPlayerBase@@UAEXPA_J@Z @ 54 NONAME ; void CMMAMMFPlayerBase::GetDuration(long long *)
-	?AddPlayerFactoryL@CMMAManager@@QAEXPAVMMMAPlayerFactory@@@Z @ 55 NONAME ; void CMMAManager::AddPlayerFactoryL(class MMMAPlayerFactory *)
-	??0CMMAVideoControl@@QAE@PAVMMMAGuiPlayer@@@Z @ 56 NONAME ; CMMAVideoControl::CMMAVideoControl(class MMMAGuiPlayer *)
-	?ClassName@CMMAVideoControl@@UBEABVTDesC16@@XZ @ 57 NONAME ; class TDesC16 const & CMMAVideoControl::ClassName(void) const
-	??1CMMAMMFPlayerFactory@@UAE@XZ @ 58 NONAME ; CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory(void)
-	?SetVolumeLevelL@CMMAVolumeControl@@QAEXHH@Z @ 59 NONAME ; void CMMAVolumeControl::SetVolumeLevelL(int, int)
-	?PostActionCompletedFile@CMMAPlayer@@QAEXXZ @ 60 NONAME ; void CMMAPlayer::PostActionCompletedFile(void)
-	?DoGetLevelL@CMMAEMCAudioVolumeControl@@UAEHXZ @ 61 NONAME ; int CMMAEMCAudioVolumeControl::DoGetLevelL(void)
-	?ReadCompletedL@CMMAVideoPlayer@@MAEXHABVTDesC8@@@Z @ 62 NONAME ; void CMMAVideoPlayer::ReadCompletedL(int, class TDesC8 const &)
-	?Type@CMMAEMCAudioPlayer@@UAEABVTDesC16@@XZ @ 63 NONAME ; class TDesC16 const & CMMAEMCAudioPlayer::Type(void)
-	?GetMediaTime@CMMAVideoUrlPlayer@@UAEXPA_J@Z @ 64 NONAME ; void CMMAVideoUrlPlayer::GetMediaTime(long long *)
-	?DeallocateL@CMMAVideoUrlPlayer@@UAEXXZ @ 65 NONAME ; void CMMAVideoUrlPlayer::DeallocateL(void)
-	??0CMMAMMFPlayerFactory@@QAE@XZ @ 66 NONAME ; CMMAMMFPlayerFactory::CMMAMMFPlayerFactory(void)
-	?AddStateListenerL@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 67 NONAME ; void CMMAPlayer::AddStateListenerL(class MMMAPlayerStateListener *)
-	?StreamControl@CMMAEMCPlayerBase@@QAEPAVMStreamControl@multimedia@@XZ @ 68 NONAME ; class multimedia::MStreamControl * CMMAEMCPlayerBase::StreamControl(void)
-	?PrefetchFileL@CMMAAudioPlayer@@MAEXXZ @ 69 NONAME ; void CMMAAudioPlayer::PrefetchFileL(void)
-	?PrefetchL@CMMAVideoUrlPlayer@@UAEXXZ @ 70 NONAME ; void CMMAVideoUrlPlayer::PrefetchL(void)
-	?AddLevelL@CMMAVolumeControl@@QAEHXZ @ 71 NONAME ; int CMMAVolumeControl::AddLevelL(void)
-	?ConstructL@CMMAEMCAudioPlayer@@IAEXXZ @ 72 NONAME ; void CMMAEMCAudioPlayer::ConstructL(void)
-	?Control@CMMAPlayer@@QAEPAVCMMAControl@@H@Z @ 73 NONAME ; class CMMAControl * CMMAPlayer::Control(int)
-	?PrefetchL@CMMAEMCAudioPlayer@@UAEXXZ @ 74 NONAME ; void CMMAEMCAudioPlayer::PrefetchL(void)
-	?StopL@CMMAVideoUrlPlayer@@UAEXH@Z @ 75 NONAME ; void CMMAVideoUrlPlayer::StopL(int)
-	??1CMMAVideoControl@@UAE@XZ @ 76 NONAME ; CMMAVideoControl::~CMMAVideoControl(void)
-	?AddSourceStreamL@CMMAPlayer@@MAEPAVCMMASourceStream@@PAUJNIEnv_@@PAVMMAFunctionServer@@PAV_jobject@@@Z @ 77 NONAME ; class CMMASourceStream * CMMAPlayer::AddSourceStreamL(struct JNIEnv_ *, class MMAFunctionServer *, class _jobject *)
-
--- a/javauis/mmapi_qt/build/dc_exports.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Exports for direct content subsystem
-*
-*/
-
-
-#ifndef __MULTIMEDIA11_DC_EXPORTS_INF__
-#define __MULTIMEDIA11_DC_EXPORTS_INF__
-
-PRJ_EXPORTS
-
-../baseline/inc/mmmacontainer.h                     |../../../javauis/inc/mmmacontainer.h
-../baseline/inc/mmmadirectcontent.h                 |../../../javauis/inc/mmmadirectContent.h
-
-#endif
--- a/javauis/mmapi_qt/build/eabi/javamobilemediau.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-EXPORTS
-	_Z10jni_lookupPKc @ 1 NONAME
-	_ZN10CMMAPlayer11AddControlLEP11CMMAControl @ 2 NONAME
-	_ZN10CMMAPlayer12ControlCountEv @ 3 NONAME
-	_ZN10CMMAPlayer12SetLoopCountEi @ 4 NONAME
-	_ZN10CMMAPlayer15PostObjectEventEN15CMMAPlayerEvent10TEventTypeEP8_jobject @ 5 NONAME
-	_ZN10CMMAPlayer15PostStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 6 NONAME
-	_ZN10CMMAPlayer16AddSourceStreamLEP7JNIEnv_P17MMAFunctionServerP8_jobject @ 7 NONAME
-	_ZN10CMMAPlayer17AddStateListenerLEP23MMMAPlayerStateListener @ 8 NONAME
-	_ZN10CMMAPlayer19RemoveStateListenerEP23MMMAPlayerStateListener @ 9 NONAME
-	_ZN10CMMAPlayer7ControlEi @ 10 NONAME
-	_ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 11 NONAME
-	_ZN13CTimeOutTimer4NewLEiR14MTimeOutNotify @ 12 NONAME
-	_ZN15CMMAAudioPlayer13PlayCompleteLEi @ 13 NONAME
-	_ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 14 NONAME
-	_ZN15CMMAAudioPlayer13PrefetchFileLEv @ 15 NONAME
-	_ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 16 NONAME
-	_ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 17 NONAME
-	_ZN15CMMAVideoPlayer10SourceSizeEv @ 18 NONAME
-	_ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 19 NONAME
-	_ZN15CMMAVideoPlayer11SnapshoterLEv @ 20 NONAME
-	_ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 21 NONAME
-	_ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 22 NONAME
-	_ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 23 NONAME
-	_ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 24 NONAME
-	_ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 25 NONAME
-	_ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 26 NONAME
-	_ZN15CMMAVideoPlayer4TypeEv @ 27 NONAME
-	_ZN16CMMAVideoControl13SnapshotReadyEv @ 28 NONAME
-	_ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 29 NONAME
-	_ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 30 NONAME
-	_ZN16CMMAVideoControlD0Ev @ 31 NONAME
-	_ZN16CMMAVideoControlD1Ev @ 32 NONAME
-	_ZN16CMMAVideoControlD2Ev @ 33 NONAME
-	_ZN17CMMAEMCPlayerBase13StreamControlEv @ 34 NONAME
-	_ZN17CMMAEMCPlayerBase9MMFactoryEv @ 35 NONAME
-	_ZN17CMMAMMFPlayerBase10ControllerEv @ 36 NONAME
-	_ZN17CMMAMMFPlayerBase11GetDurationEPx @ 37 NONAME
-	_ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 38 NONAME
-	_ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 39 NONAME
-	_ZN17CMMAVolumeControl9AddLevelLEv @ 40 NONAME
-	_ZN17MMAFunctionServer25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 41 NONAME
-	_ZN17MMAFunctionServer26StaticAddObjectFromHandleLEPS_i @ 42 NONAME
-	_ZN17MMAFunctionServer7PlayersEv @ 43 NONAME
-	_ZN18CMMAEMCAudioPlayer10ConstructLEv @ 44 NONAME
-	_ZN18CMMAEMCAudioPlayer13PlayCompleteLEi @ 45 NONAME
-	_ZN18CMMAEMCAudioPlayer13PrefetchDataLERK6TDesC8 @ 46 NONAME
-	_ZN18CMMAEMCAudioPlayer13PrefetchFileLEv @ 47 NONAME
-	_ZN18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 48 NONAME
-	_ZN18CMMAEMCAudioPlayer4TypeEv @ 49 NONAME
-	_ZN18CMMAEMCAudioPlayer8RealizeLEv @ 50 NONAME
-	_ZN18CMMAEMCAudioPlayer9PrefetchLEv @ 51 NONAME
-	_ZN18CMMAEMCAudioPlayerC1EP15CMMAEMCResolver @ 52 NONAME
-	_ZN18CMMAEMCAudioPlayerC2EP15CMMAEMCResolver @ 53 NONAME
-	_ZN18CMMAEMCAudioPlayerD0Ev @ 54 NONAME
-	_ZN18CMMAEMCAudioPlayerD1Ev @ 55 NONAME
-	_ZN18CMMAEMCAudioPlayerD2Ev @ 56 NONAME
-	_ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 57 NONAME
-	_ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 58 NONAME
-	_ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 59 NONAME
-	_ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 60 NONAME
-	_ZN18CMMAVideoUrlPlayer5StopLEi @ 61 NONAME
-	_ZN18CMMAVideoUrlPlayer6CloseLEv @ 62 NONAME
-	_ZN18CMMAVideoUrlPlayer6StartLEv @ 63 NONAME
-	_ZN18CMMAVideoUrlPlayer8RealizeLEv @ 64 NONAME
-	_ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 65 NONAME
-	_ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 66 NONAME
-	_ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 67 NONAME
-	_ZN18CMMAVideoUrlPlayerD0Ev @ 68 NONAME
-	_ZN18CMMAVideoUrlPlayerD1Ev @ 69 NONAME
-	_ZN18CMMAVideoUrlPlayerD2Ev @ 70 NONAME
-	_ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 71 NONAME
-	_ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 72 NONAME
-	_ZN20CMMAMMFPlayerFactoryC2Ev @ 73 NONAME
-	_ZN20CMMAMMFPlayerFactoryD0Ev @ 74 NONAME
-	_ZN20CMMAMMFPlayerFactoryD1Ev @ 75 NONAME
-	_ZN20CMMAMMFPlayerFactoryD2Ev @ 76 NONAME
-	_ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 77 NONAME
-	_ZN25CMMAEMCAudioVolumeControl11DoGetLevelLEv @ 78 NONAME
-	_ZN25CMMAEMCAudioVolumeControl11DoSetLevelLEi @ 79 NONAME
-	_ZN25CMMAEMCAudioVolumeControl4NewLER18CMMAEMCAudioPlayer @ 80 NONAME
-	_ZN25CMMAEMCAudioVolumeControlC1ER18CMMAEMCAudioPlayer @ 81 NONAME
-	_ZN25CMMAEMCAudioVolumeControlC2ER18CMMAEMCAudioPlayer @ 82 NONAME
-	_ZNK11CMMAControl15PublicClassNameEv @ 83 NONAME
-	_ZNK14CMMAMIDIPlayer10MidiClientEv @ 84 NONAME
-	_ZNK16CMMAVideoControl9ClassNameEv @ 85 NONAME
-	_ZTI10CMMAPlayer @ 86 NONAME
-	_ZTI11CMMAControl @ 87 NONAME
-	_ZTI13CTimeOutTimer @ 88 NONAME
-	_ZTI14CMMAMIDIPlayer @ 89 NONAME
-	_ZTI16CMMAVideoControl @ 90 NONAME
-	_ZTI17CMMAMMFPlayerBase @ 91 NONAME
-	_ZTI17CMMAStreamRequest @ 92 NONAME
-	_ZTI17CMMAVolumeControl @ 93 NONAME
-	_ZTI17MMAFunctionServer @ 94 NONAME
-	_ZTI18CHXMetaDataUtility @ 95 NONAME
-	_ZTI18CMMAVideoUrlPlayer @ 96 NONAME
-	_ZTI20CMMAMMFPlayerFactory @ 97 NONAME
-	_ZTI26CPlaybackCompletedCallback @ 98 NONAME
-	_ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 99 NONAME
-	_ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 100 NONAME
-	_ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 101 NONAME
-	_ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 102 NONAME
-	_ZTIN19CMMAStopTimeControl10CStopTimerE @ 103 NONAME
-	_ZTV10CMMAPlayer @ 104 NONAME
-	_ZTV11CMMAControl @ 105 NONAME
-	_ZTV13CTimeOutTimer @ 106 NONAME
-	_ZTV14CMMAMIDIPlayer @ 107 NONAME
-	_ZTV16CMMAVideoControl @ 108 NONAME
-	_ZTV17CMMAMMFPlayerBase @ 109 NONAME
-	_ZTV17CMMAStreamRequest @ 110 NONAME
-	_ZTV17CMMAVolumeControl @ 111 NONAME
-	_ZTV17MMAFunctionServer @ 112 NONAME
-	_ZTV18CHXMetaDataUtility @ 113 NONAME
-	_ZTV18CMMAVideoUrlPlayer @ 114 NONAME
-	_ZTV20CMMAMMFPlayerFactory @ 115 NONAME
-	_ZTV26CPlaybackCompletedCallback @ 116 NONAME
-	_ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 117 NONAME
-	_ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 118 NONAME
-	_ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 119 NONAME
-	_ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 120 NONAME
-	_ZTVN19CMMAStopTimeControl10CStopTimerE @ 121 NONAME
-	_ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 122 NONAME
-	_ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 123 NONAME
-	_ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 124 NONAME
-	_ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 125 NONAME
-	_ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 126 NONAME
-	_ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 127 NONAME
-	_ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 128 NONAME
-	_ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 129 NONAME
-	_ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 130 NONAME
-	_ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 131 NONAME
-	_ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 132 NONAME
-	_ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 133 NONAME
-	_ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 134 NONAME
-	_ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 135 NONAME
-	_ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 136 NONAME
-	_ZThn4_N18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 137 NONAME
-	_ZThn4_N18CMMAEMCAudioPlayerD0Ev @ 138 NONAME
-	_ZThn4_N18CMMAEMCAudioPlayerD1Ev @ 139 NONAME
-	_ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 140 NONAME
-	_ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 141 NONAME
-	_ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 142 NONAME
-	_ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 143 NONAME
-	_ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 144 NONAME
-	_ZThn8_N16CMMAVideoControlD0Ev @ 145 NONAME
-	_ZThn8_N16CMMAVideoControlD1Ev @ 146 NONAME
-
--- a/javauis/mmapi_qt/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +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: 
-*
-*/
-PRJ_EXPORTS
-#include <platform_paths.hrh>
-#include "dc_exports.inf"
-
-../camerasound/data/CamcorderJavaCapture.wav		/epoc32/release/winscw/udeb/z/system/sounds/digital/CamcorderJavaCapture.wav
-../camerasound/data/CamcorderJavaCapture.wav		/epoc32/release/winscw/urel/z/system/sounds/digital/CamcorderJavaCapture.wav
-../camerasound/data/CamcorderJavaCapture.wav		/epoc32/release/armv5/udeb/z/system/sounds/digital/CamcorderJavaCapture.wav
-../camerasound/data/CamcorderJavaCapture.wav		/epoc32/release/armv5/urel/z/system/sounds/digital/CamcorderJavaCapture.wav
-
-../camerasound/data/CamcorderJavaStart.wav			/epoc32/release/winscw/udeb/z/system/sounds/digital/CamcorderJavaStart.wav
-../camerasound/data/CamcorderJavaStart.wav			/epoc32/release/winscw/urel/z/system/sounds/digital/CamcorderJavaStart.wav
-../camerasound/data/CamcorderJavaStart.wav			/epoc32/release/armv5/udeb/z/system/sounds/digital/CamcorderJavaStart.wav
-../camerasound/data/CamcorderJavaStart.wav			/epoc32/release/armv5/urel/z/system/sounds/digital/CamcorderJavaStart.wav
-
-// Generic configuration interface for mobilemedia cenrep settings  
-// mobilemedia_102828A1 implementation specifics for cenrep data
-../conf/mobilemedia.confml          APP_LAYER_CONFML(mobilemedia.confml)
-../conf/mobilemedia_102828A1.crml   APP_LAYER_CRML(mobilemedia_102828A1.crml)
\ No newline at end of file
--- a/javauis/mmapi_qt/build/javamobilemedia.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TARGET=javamobilemedia
-TEMPLATE=lib
-CONFIG += omj java stl
-
-include(../../../inc/build_defines.pri)
-
-DEFINES += RD_JAVA_VOLUME_CONTROL
-DEFINES += RD_JAVA_OMA_DRM_V2
-
-INCLUDEPATH +=  /epoc32/include/mmf/common \              
-#              ../animated_gif/inc \
-                ../baseline/inc \
-                ../src_drmv2/inc \
-                ../directcontent/inc \
-                ../camerasound/inc \
-                ../volumekeys/inc \
-                ../audiostreaming/inc \
-                /epoc32/include/mw/Qt \
-								../utils/inc 
-								
-#								 ../../remconobserver_akn/inc \
-              
-SOURCES +=  ../baseline/src/*.cpp \
- #           ../animated_gif/src/*.cpp \
-            ../camerasound/src/*.cpp \
-            ../directcontent/src/*.cpp \
-            ../src_drmv2/src/*.cpp \
-            ../volumekeys/src/*.cpp \
-            ../audiostreaming/src/*.cpp \
-	    ../utils/src/*.cpp
-            
-contains(PROJECT_DEFINES,RD_JAVA_HTTP_EMC_ENABLED) {
-        INCLUDEPATH +=  ../baseline/inc.emc \
-        ../audiostreaming/inc.emc
-        
-        SOURCES += ../baseline/src.emc/*.cpp \
-         ../audiostreaming/src.emc/*.cpp
-         
-        LIBS += -lEnhancedMediaClient \
-        -lMetaDataUtility \
-        -lapmime\
-        -lapgrfx \
-				-lapmime \
-				-lflogger 
-				
-}
-else{
-			  INCLUDEPATH +=  ../baseline/inc.mmf  \
-        ../audiostreaming/inc.mmf
-        
-			  SOURCES += ../baseline/src.mmf/*.cpp \
-			  ../audiostreaming/src.mmf/*.cpp
-}
-
-contains(PROJECT_DEFINES,RD_JAVA_NGA_ENABLED) {
-				INCLUDEPATH +=  ../baseline/inc.nga
-        
-        SOURCES += ../baseline/src.nga/*.cpp
-        
-        LIBS += -lmediaclientvideodisplay
-}
-else {
-				INCLUDEPATH +=  ../baseline/inc.dsa
-        
-        SOURCES += ../baseline/src.dsa/*.cpp
-}
-
-LIBS += -lAknIcon \
-        -laknskins \
-        -laknskinsrv \
-        -lapgrfx \
-        -lapmime \
-        -lBitmapTransforms \
-        -lDRMHelper \
-        -lDrmAudioPlayUtility \
-        -lImageConversion \
-        -lIHL \
-        -lMMFControllerFramework \
-        -lMediaClientAudio \
-        -lMmfStandardCustomCommands \
-#        -lRemConCoreApi \
-#        -lRemConInterfaceBase \
-        -lbafl \
-        -lbitgdi \
-        -lcaf \
-        -lcafutils \
-        -lcentralrepository \
-        -lcone \
-        -lecam \
-        -lecom \
-        -leswtqt \
-        -lefsrv \
-        -leikcoctl \
-        -leikcore \ 
-        -lesock \
-        -leuser \
-        -lfbscli \
-        -lflogger \
-        -lmediaclientvideo \
-        -lmidiclient \
-        -lws32 \
-        -lhxmetadatautil \
-        -lQtGui \
-        
- #     -ljavaremconobserver \
-
-
-!contains(PROJECT_DEFINES,RD_JAVA_HTTP_EMC_ENABLED) {
-    defBlock = "deffile ./~/javamobilemedia_5_0.def"
-}
-
-include(../../../build/omj.pri)
Binary file javauis/mmapi_qt/camerasound/data/CamcorderJavaCapture.wav has changed
Binary file javauis/mmapi_qt/camerasound/data/CamcorderJavaStart.wav has changed
--- a/javauis/mmapi_qt/camerasound/inc/cmmacamerasound.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to play sound from file.
-*
-*/
-
-
-#ifndef CMMACAMERASOUND_H
-#define CMMACAMERASOUND_H
-
-//  INCLUDES
-#include <mdaaudiosampleplayer.h>
-
-// CLASS DECLARATION
-/**
-* This class is used to play sound from file.
-*/
-NONSHARABLE_CLASS(CMMACameraSound) : public CBase,
-        public MMdaAudioPlayerCallback
-{
-public: // Constructor and destructor
-
-    /**
-    * Two-phased constructor.
-    */
-    static CMMACameraSound* NewLC();
-
-    /**
-    * Destructor.
-    */
-    virtual ~CMMACameraSound();
-
-
-public: // New functions
-
-    /**
-     * Plays sound from a file when capturing a image.
-     */
-    static void PlayImageCaptureSoundL();
-
-    /**
-    * Plays sound from a file when video recording starts.
-    */
-    static void PlayVideoRecordSoundL();
-
-protected: // New functions
-
-    /**
-    * Plays sound from a file.
-    * @param aFileName - The full path name of the file
-    *                    containing the audio data.
-    */
-    void PlaySoundL(const TDesC& aFileName);
-
-
-public: // from MMdaAudioPlayerCallback
-
-    void MapcInitComplete(TInt aError,
-                          const TTimeIntervalMicroSeconds& /*aDuration*/);
-
-    void MapcPlayComplete(TInt aError);
-
-
-private: // Constructors
-
-    /**
-    * C++ default constructor.
-    */
-    CMMACameraSound();
-
-    /**
-    * By default Symbian 2nd phase constructor is private.
-    */
-    void ConstructL();
-
-private: //Data
-
-    CActiveSchedulerWait* iActiveSchedulerWait; // owned
-
-    TInt iError;
-};
-
-#endif // CMMACAMERASOUND_H
-
-// End of File
--- a/javauis/mmapi_qt/camerasound/src/cmmacamerasound.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to play sound from file
-*
-*/
-
-
-
-// INCLUDE FILES
-#include    "cmmacamerasound.h"
-
-#include    <mdaaudiosampleplayer.h>
-#include <logger.h>
-#include <AudioPreference.h>
-
-//CONSTANTS
-_LIT(KMMASnapshotSound, "Z:\\System\\Sounds\\Digital\\CamcorderJavaCapture.wav");
-_LIT(KMMAVideoSound, "Z:\\System\\Sounds\\Digital\\CamcorderJavaStart.wav");
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CMMACameraSound::CMMACameraSound
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CMMACameraSound::CMMACameraSound()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CMMACameraSound::NewLC
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CMMACameraSound* CMMACameraSound::NewLC()
-{
-    CMMACameraSound* self = new(ELeave) CMMACameraSound;
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    return self;
-}
-
-
-// Destructor
-CMMACameraSound::~CMMACameraSound()
-{
-    delete iActiveSchedulerWait;
-}
-
-// -----------------------------------------------------------------------------
-// CMMACameraSound::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CMMACameraSound::ConstructL()
-{
-    iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
-}
-
-// -----------------------------------------------------------------------------
-// PlayImageCaptureSoundL()
-// -----------------------------------------------------------------------------
-//
-void CMMACameraSound::PlayImageCaptureSoundL()
-{
-    CMMACameraSound* cameraSound = NewLC();
-    cameraSound->PlaySoundL(KMMASnapshotSound());
-    CleanupStack::PopAndDestroy(cameraSound);
-}
-
-// -----------------------------------------------------------------------------
-// PlayVideoRecordSoundL()
-// -----------------------------------------------------------------------------
-//
-void CMMACameraSound::PlayVideoRecordSoundL()
-{
-    CMMACameraSound* cameraSound = NewLC();
-    cameraSound->PlaySoundL(KMMAVideoSound());
-    CleanupStack::PopAndDestroy(cameraSound);
-}
-
-// -----------------------------------------------------------------------------
-// PlaySoundL()
-// -----------------------------------------------------------------------------
-//
-void CMMACameraSound::PlaySoundL(const TDesC& aFileName)
-{
-    iError = KErrNone;
-    CMdaAudioPlayerUtility* player =
-        CMdaAudioPlayerUtility::NewFilePlayerL(
-            aFileName, *this, KAudioPriorityVideoRecording,
-            TMdaPriorityPreference(KAudioPrefCamera), NULL);
-    CleanupStack::PushL(player);
-
-    //wait until init is completed
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    //leave if there was error in init
-    User::LeaveIfError(iError);
-
-    player->Play();
-    //wait until play is completed
-    if (!iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->Start();
-    }
-    //leave if there was error in play
-    User::LeaveIfError(iError);
-
-    //close player
-    player->Close();
-    CleanupStack::PopAndDestroy(player);
-}
-
-void CMMACameraSound::MapcInitComplete(TInt aError,
-                                       const TTimeIntervalMicroSeconds& /*aDuration*/)
-{
-    iError = aError;
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->AsyncStop();
-    }
-}
-
-void CMMACameraSound::MapcPlayComplete(TInt aError)
-{
-    iError = aError;
-    if (iActiveSchedulerWait->IsStarted())
-    {
-        iActiveSchedulerWait->AsyncStop();
-    }
-}
-
-//  End of File
Binary file javauis/mmapi_qt/conf/mobilemedia.confml has changed
Binary file javauis/mmapi_qt/conf/mobilemedia_102828A1.crml has changed
--- a/javauis/mmapi_qt/directcontent/inc/cmmadcdisplay.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef CMMADCDISPLAY_H
-#define CMMADCDISPLAY_H
-
-//  INCLUDES
-#include "mmmadisplay.h"
-#include "mmmadirectcontent.h"
-#include "cmmadisplay.h"
-
-//  CONSTANTS
-
-//  FORWARD DECLARATIONS
-class MMMAGuiPlayer;
-class MMMADisplayWindow;
-class MMMAContainer;
-class MMAFunctionServer;
-class CMMADCRepaintEvent;
-
-//  CLASS DECLARATION
-/**
-* This class is used with dynamic display mode to render direct content
-* using direct container.
-*/
-NONSHARABLE_CLASS(CMMADCDisplay):
-        public CMMADisplay,
-        public MMMADirectContent
-{
-public:
-    /**
-     * Creates new instance.
-     * @param aPlayer provides content
-     */
-    static CMMADCDisplay* NewLC(MMMAGuiPlayer* aPlayer,
-    MMAFunctionServer* aEventSource,
-    jobject aGUIObject);
-    virtual ~CMMADCDisplay();
-
-public: // From MMMADisplay
-    void DrawFrameL(const CFbsBitmap* aBitmap);
-    void SetDisplaySizeL(const TSize& aSize);
-    void SetDisplayLocationL(const TPoint& aPosition);
-    TPoint DisplayLocation();
-    void SetFullScreenL(TBool aFullScreen);
-    void SourceSizeChanged(const TSize& aSourceSize);
-    TBool IsVisible();
-
-    /**
-     * Gets notification that there is container to draw assigned
-     *
-     * @return ETrue if container have been set
-     *         EFalse if container is not set
-     */
-    virtual TBool HasContainer();
-
-    /**
-     * Gets resources necessary to start DirectScreenAccess
-     * Doesn't run in mmapi event server thread!
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aThreadType" Indicates the thread type (ESWT or MMAPI)
-     */
-    void UIGetDSAResources(
-        MUiEventConsumer& aConsumer,
-        MMMADisplay::TThreadType aThreadType);
-
-    /**
-     * Invokes a callback in ESWT thread
-     *
-     * @since S60 v5.0
-     * @param "aConsumer" A consumer of callback
-     * @param "aCallbackId" A number identifying the callback
-     */
-    void UIGetCallback(MUiEventConsumer& aConsumer, TInt aCallbackId);
-
-public: // From MMMADirectContent
-    void MdcContainerVisibilityChanged(TBool aVisible);
-    void MdcContentRectChanged(const TRect& aContentRect,
-                               const TRect& aClipRect);
-    void MdcContainerWindowRectChanged(const TRect& aRect);
-    void MdcContainerDestroyed();
-    void MdcSetContainer(MMMAContainer* aContainer);
-    CFbsBitmap* MdcFrameBuffer() const;
-    TSize MdcSourceSize();
-
-public: // From CMMADisplay
-    void MdcContentBoundsChanged(const TRect& aRect);
-
-private: // new methods
-    /**
-     * Creates bitmap when bitmap mode is used
-     * @return error code
-     */
-    TInt InitBitmapMode();
-
-    static void SetDrawRectL(CMMADCDisplay* aDisplay,
-                             TSize* aSize);
-
-    CMMADCDisplay(MMMAGuiPlayer* aPlayer,
-                  MMAFunctionServer* aEventSource,
-                  jobject aGUIObject);
-private: // data
-
-    // Not own.
-    MMMAContainer* iContainer;
-
-    // Own.
-    CFbsBitmap* iBitmap;
-
-    // Not own
-    MMAFunctionServer* iEventSource;
-
-    // direct content java object
-    jobject iGUIObject;
-
-    // Own
-    CMMADCRepaintEvent* iRepaint;
-
-    // Not own
-    MMMAGuiPlayer* iPlayer;
-};
-
-#endif // CMMADCDISPLAY_H
--- a/javauis/mmapi_qt/directcontent/inc/cmmadcfullscreenevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content fullscreen event.
-*
-*/
-
-
-#ifndef CMMADCFULLSCREENEVENT_H
-#define CMMADCFULLSCREENEVENT_H
-
-//#include <mevents.h>
-#include "cmmaevent.h"
-
-
-//  CLASS DECLARATION
-/**
-* This class is used to send direct content fullscreen event.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMADCFullScreenEvent): public CMMAEvent
-{
-public:
-    /**
-     * Default constructor.
-     * @param aGUIObject Java object to set fullscreen status
-     * @param aFullScreen Indicates whether or not to render in full
-     * screen mode
-     */
-    CMMADCFullScreenEvent(jobject aGUIObject, TBool aFullScreen);
-
-private: // from CJavaEvent
-    /**
-     * @param aJni JNI environment
-     */
-    void Dispatch(JNIEnv& aJni);
-};
-
-#endif // CMMADCFULLSCREENEVENT_H
--- a/javauis/mmapi_qt/directcontent/inc/cmmadcinvalidateevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content invalidate event
-*
-*/
-
-
-#ifndef CMMADCINVALIDATEEVENT_H
-#define CMMADCINVALIDATEEVENT_H
-
-//#include <mevents.h>
-#include "cmmaevent.h"
-
-
-//  CLASS DECLARATION
-/**
-* This class is used to send direct content invalidate event.
-*
-*/
-NONSHARABLE_CLASS(CMMADCInvalidateEvent): public CMMAEvent
-{
-public:
-    /**
-     * Constructor.
-     * @param aGUIObject Java object to invalidate
-     * @param aSize New size for direct content
-     */
-    CMMADCInvalidateEvent(jobject aGUIObject, TSize aSize);
-
-private: // from CJavaEvent
-    /**
-     * @param aJni JNI environment
-     */
-    void Dispatch(JNIEnv& aJni);
-
-private:
-    // New size to set
-    TSize iSize;
-};
-
-#endif // CMMADCINVALIDATEEVENT_H
--- a/javauis/mmapi_qt/directcontent/inc/cmmadcrepaintevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content repaint event.
-*
-*/
-
-
-#ifndef CMMADCREPAINTEVENT_H
-#define CMMADCREPAINTEVENT_H
-
-//#include <mevents.h>
-#include "cmmaevent.h"
-
-
-//  CLASS DECLARATION
-/**
-* This class is used to send direct content repaint event.
-*
-*/
-NONSHARABLE_CLASS(CMMADCRepaintEvent): public CMMAEvent
-{
-public:
-    /**
-     * Default constructor.
-     * @param aGUIObject Java object to call.
-     */
-    CMMADCRepaintEvent(jobject aGUIObject);
-
-    /**
-     * @return true if this event is active and may not be sent
-     */
-    TBool IsActive();
-
-    /**
-     * Sets this event active and IsActive will return true.
-     * IsActive methos will return false after this event is dispatched.
-     */
-    void SetActive();
-
-private: // from CJavaEvent
-    /**
-     * @param aJni JNI environment
-     */
-    void Dispatch(JNIEnv& aJni);
-
-};
-
-#endif // CMMADCREPAINTEVENT_H
--- a/javauis/mmapi_qt/directcontent/src/cmmadcdisplay.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +0,0 @@
-/*
-* 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-//  Include Files
-#include <e32def.h>
-#include <fbs.h>
-#include <logger.h>
-
-#include "cmmaplayerevent.h"
-#include "mmmaguiplayer.h"
-#include "mmmadisplaywindow.h"
-#include "cmmadcdisplay.h"
-#include "mmmacontainer.h"
-#include "mmafunctionserver.h"
-#include "cmmadcrepaintevent.h"
-#include "cmmadcfullscreenevent.h"
-#include "cmmadcinvalidateevent.h"
-
-// CONSTRUCTION
-// Static constructor, leaves pointer to cleanup-stack
-CMMADCDisplay* CMMADCDisplay::NewLC(MMMAGuiPlayer* aPlayer,
-                                    MMAFunctionServer* aEventSource,
-                                    jobject aGUIObject)
-{
-    CMMADCDisplay* self =
-        new(ELeave) CMMADCDisplay(aPlayer, aEventSource, aGUIObject);
-    CleanupStack::PushL(self);
-    self->iRepaint = new(ELeave) CMMADCRepaintEvent(aGUIObject);
-    return self;
-}
-
-// Destructor (virtual by CBase)
-CMMADCDisplay::~CMMADCDisplay()
-{
-    if (iContainer)
-    {
-        iContainer->MdcRemoveContent();
-    }
-    delete iBitmap;
-    delete iRepaint;
-}
-
-// interface MMMADisplay
-void CMMADCDisplay::DrawFrameL(const CFbsBitmap* aBitmap)
-{
-    // This method is called only if bitmap is used.
-    TInt err = InitBitmapMode();
-
-    if (iVisible && iWindow &&
-            iContainer && iContainer->MdcContainerVisibility() &&
-            err == KErrNone)
-    {
-        iWindow->DrawFrameL(aBitmap);
-
-        // container will draw bitmap obtained with MdcFrameBuffer method
-        if (!iRepaint->IsActive())
-        {
-            iRepaint->SetActive();
-            iEventSource->PostEvent(iRepaint, CMMAEvent::EEventPriority);
-        }
-    }
-}
-
-// interface MMMADisplay
-void CMMADCDisplay::SetDisplaySizeL(const TSize& aSize)
-{
-    LOG2( EJavaMMAPI, EInfo, "CMMADCDisplay::SetDisplaySizeL w %d h %d",
-               aSize.iWidth, aSize.iHeight);
-    // user rect contains size set from java.
-    iUserRect.SetSize(aSize);
-
-    if (iContainer)
-    {
-        CMMADCInvalidateEvent* event =
-            new(ELeave)CMMADCInvalidateEvent(iGUIObject, aSize);
-        iEventSource->PostEvent(event, CMMAEvent::EEventPriority);
-    }
-}
-
-// interface MMMADisplay
-void CMMADCDisplay::SetDisplayLocationL(const TPoint& /*aPosition*/)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADCDisplay::SetDisplayLocationL");
-    // This method only works when the USE_DIRECT_VIDEO mode is set.
-    // In USE_GUI_PRIMITIVE mode, this call will be ignored.
-}
-
-// interface MMMADisplay
-TPoint CMMADCDisplay::DisplayLocation()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADCDisplay::DisplayLocation");
-    // This method returns always (0,0),
-    // because SetDisplayLocationL call is ignored.
-    return TPoint(0, 0);
-}
-
-// interface MMMADisplay
-void CMMADCDisplay::SetFullScreenL(TBool aFullScreen)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMADCDisplay::SetFullScreenL %d", aFullScreen);
-    // This method tries to set eSWT Widget size to its parent size.
-    // If real full screen mode is needed parent Composite must be in
-    // fullscreen mode (for example with MobileShell's setFullScreenMode method).
-    if (iContainer)
-    {
-        CMMADCFullScreenEvent* event =
-            new(ELeave)CMMADCFullScreenEvent(iGUIObject, aFullScreen);
-        iEventSource->PostEvent(event, CMMAEvent::EEventPriority);
-    }
-}
-
-// interface MMMADisplay
-void CMMADCDisplay::SourceSizeChanged(const TSize& aSourceSize)
-{
-    LOG2( EJavaMMAPI, EInfo, "CMMADCDisplay::SourceSizeChanged %d %d",
-               aSourceSize.iWidth,
-               aSourceSize.iHeight);
-
-#ifdef RD_JAVA_NGA_ENABLED
-    if (iWindow)
-    {
-        TPoint topLeft(0, 0);
-        iWindow->SetVideoCropRegion(TRect(topLeft,aSourceSize));
-    }
-#endif
-
-    if (iWindow)
-    {
-        TRect tmp(TPoint(0, 0), aSourceSize);
-        iWindow->SetDrawRect(tmp);
-        iWindow->SetWindowRect(tmp,MMMADisplay::EMmaThread);
-
-        // set visibility without using event server because this is called
-        // from MMA thread
-        if (iContainer)
-        {
-            if (iContainer->MdcContainerVisibility())
-            {
-                iWindow->SetVisible(ETrue, EFalse);
-            }
-        }
-    }
-}
-
-// interface MMMADisplay
-TBool CMMADCDisplay::IsVisible()
-{
-    TBool visible = EFalse;
-    if (iContainer)
-    {
-        visible = iContainer->MdcContainerVisibility();
-    }
-    // else invisible
-
-    // return true if both are visible
-    return iVisible && visible;
-}
-
-
-// interface MMMADisplay
-TBool CMMADCDisplay::HasContainer()
-{
-    return iContainer != NULL;
-}
-
-
-// interface MMMADirectContent
-void CMMADCDisplay::MdcContainerVisibilityChanged(TBool aVisible)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcContainerVisibilityChanged aVisible %d",
-              aVisible);
-    if (iWindow)
-    {
-        iWindow->SetVisible(aVisible && iVisible);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcContainerVisibilityChanged OK");
-}
-
-// interface MMMADirectContent
-void CMMADCDisplay::MdcContentRectChanged(const TRect& aContentRect,
-        const TRect& aParentRect)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADCDisplay::MdcContentRectChanged");
-    if (iWindow)
-    {
-        TSize size = aContentRect.Size();
-        iWindow->SetDrawRectThread(TRect(size));
-        TInt err = iEventSource->ExecuteTrap(CMMADCDisplay::SetDrawRectL,
-                                             this,
-                                             &size);
-        if (err == KErrNone)
-        {
-            // bitmap window ignores window rect and position
-            iWindow->SetWindowRect(aParentRect,MMMADisplay::EUiThread);
-            iWindow->SetPosition(aContentRect.iTl - aParentRect.iTl);
-        }
-    }
-}
-
-void CMMADCDisplay::MdcContainerWindowRectChanged(const TRect&
-#ifdef RD_JAVA_NGA_ENABLED
-        aRect
-#endif
-                                                 )
-{
-	LOG( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcContainerWindowRectChanged");
-
-#ifdef RD_JAVA_NGA_ENABLED
-    if (iWindow)
-    {
-        iWindow->SetRWindowRect(aRect, MMMADisplay::EUiThread);
-    }
-#endif
-}
-
-// interface MMMADirectContent
-void CMMADCDisplay::MdcContainerDestroyed()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADCDisplay::MdcContainerDestroyed");
-    if (iContainer)
-    {
-        iContainer->MdcRemoveContent();
-    }
-
-    iContainer = NULL;
-    if (iWindow)
-    {
-        iWindow->SetVisible(EFalse);
-        iWindow->ContainerDestroyed();
-    }
-}
-
-// interface MMMADirectContent
-void CMMADCDisplay::MdcSetContainer(MMMAContainer* aContainer)
-{
-    iContainer = aContainer;
-    TSize sourceSize = iPlayer->SourceSize();
-    LOG2( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcSetContainer source size %d %d",
-               sourceSize.iWidth, sourceSize.iHeight);
-    aContainer->MdcInvalidate(sourceSize);
-    if (iWindow)
-    {
-        // Notify window that container has been set
-        iWindow->ContainerSet();
-
-        TRect controlRect;
-        TRect parentRect;
-        iContainer->MdcGetContentRect(controlRect, parentRect);
-
-        // bitmap window ignores window rect and position
-        iWindow->SetWindowRect(parentRect,MMMADisplay::EUiThread);
-        iWindow->SetPosition(controlRect.iTl - parentRect.iTl);
-
-        LOG1( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcSetContainer container visible %d",
-                  aContainer->MdcContainerVisibility());
-        LOG1( EJavaMMAPI, EInfo, "CMMADCDisplay::MdcSetContainer content visible %d",
-                  iVisible);
-
-        iWindow->SetVisible(aContainer->MdcContainerVisibility() &&
-                            iVisible);
-    }
-}
-
-// interface MMMADirectContent
-CFbsBitmap* CMMADCDisplay::MdcFrameBuffer() const
-{
-    return iBitmap;
-}
-
-// interface MMMADirectContent
-TSize CMMADCDisplay::MdcSourceSize()
-{
-    return iPlayer->SourceSize();
-}
-
-void CMMADCDisplay::MdcContentBoundsChanged(const TRect& /*aRect*/)
-{
-}
-
-void CMMADCDisplay::UIGetDSAResources(
-    MUiEventConsumer& aConsumer,
-    MMMADisplay::TThreadType aThreadType)
-{
-    if (iContainer)
-    {
-        iContainer->MdcGetDSAResources(aConsumer, aThreadType);
-    }
-}
-
-void CMMADCDisplay::UIGetCallback(
-    MUiEventConsumer& aConsumer,
-    TInt aCallbackId)
-{
-    if (iContainer)
-    {
-        iContainer->MdcGetUICallback(aConsumer, aCallbackId);
-    }
-}
-
-TInt CMMADCDisplay::InitBitmapMode()
-{
-    TInt errCode = KErrNone;
-    // If there is no bitmap, create one and set it to window
-    if (!iBitmap && iWindow)
-    {
-        iBitmap = new CFbsBitmap;
-        if (iBitmap)
-        {
-            errCode = iBitmap->Create(iPlayer->SourceSize(),
-                                      EColor16MA);
-        }
-        else
-        {
-            errCode = KErrNoMemory;
-        }
-
-        if (errCode == KErrNone)
-        {
-            TRAP(errCode,
-                 iWindow->SetDestinationBitmapL(iBitmap));
-        }
-    }
-    return errCode;
-}
-
-void CMMADCDisplay::SetDrawRectL(CMMADCDisplay* aDisplay, TSize* aSize)
-{
-    if (aDisplay->iBitmap)
-    {
-        User::LeaveIfError(aDisplay->iBitmap->Resize(*aSize));
-        aDisplay->iWindow->SetDestinationBitmapL(aDisplay->iBitmap);
-    }
-}
-
-CMMADCDisplay::CMMADCDisplay(MMMAGuiPlayer* aPlayer,
-                             MMAFunctionServer* aEventSource,
-                             jobject aGUIObject)
-{
-    iPlayer = aPlayer;
-    iEventSource = aEventSource;
-    iGUIObject = aGUIObject;
-    // GUI_PRIMITIVE is visible by default.
-    iVisible = ETrue;
-}
-
-// END OF FILE
--- a/javauis/mmapi_qt/directcontent/src/cmmadcfullscreenevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content fullscreen event.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadcfullscreenevent.h"
-
-CMMADCFullScreenEvent::CMMADCFullScreenEvent(jobject aGUIObject, TBool aFullScreen):
-        CMMAEvent(EDisposableEvent)
-{
-    iListenerObject = aGUIObject;
-    iEventData = aFullScreen;
-}
-
-// from CJavaEvent
-void CMMADCFullScreenEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADCFullScreenEvent::Dispatch");
-    iHandleEventMethod = aJni.GetMethodID(aJni.GetObjectClass(iListenerObject),
-                                          "setFullScreen",
-                                          "(Z)V");
-    if (iHandleEventMethod &&
-            (aJni.IsSameObject(iListenerObject, 0) == JNI_FALSE))
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iEventData);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/directcontent/src/cmmadcinvalidateevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content invalidate event
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadcinvalidateevent.h"
-
-CMMADCInvalidateEvent::CMMADCInvalidateEvent(jobject aGUIObject,
-        TSize aSize):
-        CMMAEvent(EDisposableEvent)
-{
-    iListenerObject = aGUIObject;
-    iSize = aSize;
-}
-
-// from CJavaEvent
-void CMMADCInvalidateEvent::Dispatch(JNIEnv& aJni)
-{
-    LOG2( EJavaMMAPI, EInfo, "MMA::CMMADCInvalidateEvent::Dispatch w=%d h=%d",
-               iSize.iWidth,
-               iSize.iHeight);
-
-    iHandleEventMethod = aJni.GetMethodID(aJni.GetObjectClass(iListenerObject),
-                                          "invalidate",
-                                          "(II)V");
-
-    // IsSameObject method will return true if iListenerObject has disappeared
-    if (iHandleEventMethod &&
-            aJni.IsSameObject(iListenerObject, 0) == JNI_FALSE)
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod,
-                            iSize.iWidth,
-                            iSize.iHeight);
-    }
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/directcontent/src/cmmadcrepaintevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to send direct content repaint event.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadcrepaintevent.h"
-
-CMMADCRepaintEvent::CMMADCRepaintEvent(jobject aGUIObject):
-        CMMAEvent(EReusableEvent)
-{
-    iListenerObject = aGUIObject;
-    iEventData = KErrNone;
-}
-
-TBool CMMADCRepaintEvent::IsActive()
-{
-    return iEventData != KErrNone;
-}
-
-void CMMADCRepaintEvent::SetActive()
-{
-    iEventData = KErrInUse;
-}
-
-// from CJavaEvent
-void CMMADCRepaintEvent::Dispatch(JNIEnv& aJni)
-{
-    // create method id if not allready created
-    if (!iHandleEventMethod)
-    {
-        iHandleEventMethod = aJni.GetMethodID(aJni.GetObjectClass(iListenerObject),
-                                              "repaint",
-                                              "()V");
-    }
-
-    // There is internal error if method cannot be found
-    __ASSERT_DEBUG(iHandleEventMethod, User::Invariant());
-
-    // IsSameObject method will return true if iListenerObject has disappeared
-    if (iHandleEventMethod &&
-            aJni.IsSameObject(iListenerObject, 0) == JNI_FALSE)
-    {
-        aJni.CallVoidMethod(iListenerObject,
-                            iHandleEventMethod);
-    }
-
-    // IsActive will return EFalse after this
-    iEventData = KErrNone;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/src_drmv2/inc/cmmadrmaudioplayer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for playing MIDI.
-*
-*/
-
-
-#ifndef CMMADRMAUDIOPLAYER_H
-#define CMMADRMAUDIOPLAYER_H
-
-//  INCLUDES
-#include "cmmaaudioplayer.h"
-#include <DrmAudioSamplePlayer.h>
-#include <e32base.h>
-
-// CONSTANTS
-_LIT(KMMADRMPlayer, "DRMPlayer");
-
-// FORWARD DECLARATIONS
-class MMAFunctionServer;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for playing DRM Audio.
-*
-*/
-
-NONSHARABLE_CLASS(CMMADRMAudioPlayer): public CMMAPlayer,
-        public MDrmAudioPlayerCallback
-
-{
-public: // Construction
-    static CMMADRMAudioPlayer* NewLC(const TDesC& aContentType,
-    TFileName aFileName);
-
-    //   Destructor
-    ~CMMADRMAudioPlayer();
-
-protected:
-    //   C++ constructor
-    CMMADRMAudioPlayer(TFileName aFileName);
-    void ConstructL(const TDesC& aContentType);
-
-public: // new methods
-    CDrmPlayerUtility* DRMUtility() const;
-
-public: // from CMMAPlayer
-    void StartL();
-    void StopL(TBool aPostEvent);
-    void RealizeL();
-    void PrefetchL();
-    void DeallocateL();
-    void GetDuration(TInt64* aDuration);
-    void SetMediaTimeL(TInt64* aTime);
-    void GetMediaTime(TInt64* aMediaTime);
-    void CloseL();
-    const TDesC& Type();
-
-public: // from CMMAPlayer
-    void PlayCompleteL(TInt aError);
-
-public: // from MDrmAudioPlayerCallback
-    void MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
-    void MdapcPlayComplete(TInt aError);
-
-protected:
-    void CloseClientUtility();
-    void ErrorPlaybackComplete(TInt aError);
-
-private: // Data
-    CDrmPlayerUtility* iUtility;
-
-    TFileName iFileName;
-};
-
-#endif // CMMADRMAUDIOPLAYER_H
--- a/javauis/mmapi_qt/src_drmv2/inc/cmmadrmmetadatacontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMADRMMetaDataControl is a concrete class for getting
-*                metadata from drm files.
-*
-*/
-
-
-#ifndef CMMADRMMETADATACONTROL_H
-#define CMMADRMMETADATACONTROL_H
-
-//  INCLUDES
-#include <mmfcontroller.h>
-
-#include "cmmadrmaudioplayer.h"
-#include "cmmametadatacontrol.h"
-
-//  CLASS DECLARATION
-/**
-*   This is a concrete class for getting metadata from drm files.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMADRMMetaDataControl): public CMMAMetaDataControl
-{
-public:
-    CMMADRMMetaDataControl(CMMADRMAudioPlayer* aPlayer);
-
-protected: // from CMMAMetaDataControl
-
-    TInt KeyCountL();
-    HBufC* KeyL(TInt aIndex);
-
-    HBufC* KeyValueL(const TDesC& aKey);
-
-private:
-    /**
-     * Used to query metadata
-     */
-    CMMADRMAudioPlayer* iPlayer;
-};
-
-#endif // CMMADRMMETADATACONTROL_H
--- a/javauis/mmapi_qt/src_drmv2/inc/cmmadrmplayerfactory.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating DRM v2 players.
-*
-*/
-
-
-#ifndef CMMADRMPLAYERFACTORY_H
-#define CMMADRMPLAYERFACTORY_H
-
-//  INCLUDES
-#include "mmmaplayerfactory.h"
-#include "cmmavideoplayerfactory.h"
-
-class CMMAMMFResolver;
-
-//  CLASS DECLARATION
-/**
-*   This class is used for creating DRM players.
-*
-*
-*/
-NONSHARABLE_CLASS(CMMADRMPlayerFactory): public CBase, public MMMAPlayerFactory
-{
-public: // Constructor and destructor
-    static CMMADRMPlayerFactory* NewLC(CMMAVideoPlayerFactory* aVideoPlayerFactory);
-
-    CMMADRMPlayerFactory(CMMAVideoPlayerFactory* aVideoPlayerFactory);
-
-    ~CMMADRMPlayerFactory();
-
-public: // From MMMAPlayerFactory
-    CMMAPlayer* CreatePlayerL(const TDesC& aContentType);
-
-    CMMAPlayer* CreatePlayerL(const TDesC& aProtocol,
-                              const TDesC& aMiddlePart,
-                              const TDesC& aParameters);
-
-    CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData);
-
-    void GetSupportedContentTypesL(const TDesC& aProtocol,
-                                   CDesC16Array& aMimeTypeArray);
-
-    void GetSupportedProtocolsL(const TDesC& aContentType,
-                                CDesC16Array& aProtocolArray);
-
-protected:
-    void UpdateRightsL(TInt aError,
-                       const TDesC& aFileName);
-
-    CMMAPlayer* CreateAudioPlayerL(const TDesC& aContentType,
-                                   const TDesC& aFileName);
-
-    CMMAPlayer* CreateVideoPlayerL(const TDesC& aContentType,
-                                   const TDesC& aFileName);
-
-
-private: //data
-    CMMAVideoPlayerFactory* iVideoPlayerFactory;
-
-};
-
-#endif // CMMADRMPLAYERFACTORY_H
--- a/javauis/mmapi_qt/src_drmv2/inc/cmmadrmratecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements RateControl for DRMv2 audio player.
-*
-*/
-
-
-#ifndef CMMADRMRATECONTROL_H
-#define CMMADRMRATECONTROL_H
-
-//  INTERNAL INCLUDES
-#include "cmmaratecontrol.h" // base class
-#include "cmmadrmaudioplayer.h"
-
-//  CLASS DECLARATION
-/**
-*   This class implements RateControl for DRMv2 audio player.
-*
-*/
-NONSHARABLE_CLASS(CMMADRMRateControl): public CMMARateControl,
-        public MMMAPlayerStateListener
-{
-public:
-
-    static CMMADRMRateControl* NewL(CMMADRMAudioPlayer* aPlayer);
-
-    /**
-     * Destructor.
-     */
-    ~CMMADRMRateControl();
-
-protected:
-
-    /**
-     * Constructor.
-     */
-    CMMADRMRateControl(CMMADRMAudioPlayer* aPlayer);
-
-    void ConstructL();
-
-public: // from MMMAPlayerStateListener
-    virtual void StateChanged(TInt aState);
-
-public: // New methods
-    /**
-     * @param aRate Rate to set in "milli-percentage"..
-     * @return Actual rate set.
-     */
-    virtual TInt SetRateL(TInt aRate);
-
-    /**
-     * @return The current playback rate in "milli-percentage".
-     */
-    virtual TInt RateL();
-
-
-private: // Member data
-
-    /**
-     * Used to obtain RMMFController reference to stop/start
-     * playback.
-     */
-    CMMADRMAudioPlayer* iPlayer;
-
-    /**
-     * Hold current rate value.
-     */
-    TInt iCurrentRate;
-
-};
-
-#endif // CMMADRMRATECONTROL_H
--- a/javauis/mmapi_qt/src_drmv2/inc/cmmadrmvolumecontrol.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to audio player
-*
-*/
-
-
-#ifndef CMMADRMVOLUMECONTROL_H
-#define CMMADRMVOLUMECONTROL_H
-
-#include "cmmavolumecontrol.h"
-
-class CMMADRMAudioPlayer;
-
-//  CLASS DEFINITION
-/*
------------------------------------------------------------------------------
-
-    DESCRIPTION
-    This class is used for setting volume to DRM audio player
-
------------------------------------------------------------------------------
-*/
-NONSHARABLE_CLASS(CMMADRMVolumeControl): public CMMAVolumeControl
-{
-public:
-    static CMMADRMVolumeControl* NewL(CMMADRMAudioPlayer* aPlayer);
-
-protected:
-    CMMADRMVolumeControl(CMMADRMAudioPlayer* aPlayer);
-    void ConstructL();
-
-
-public: // from CMMAVolumeControl
-    void DoSetLevelL(TInt aLevel);
-    TInt DoGetLevelL();
-
-private:
-    CMMADRMAudioPlayer* iPlayer;
-};
-
-#endif // CMMADRMVOLUMECONTROL_H
--- a/javauis/mmapi_qt/src_drmv2/src/cmmadrmaudioplayer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for MIDI.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-#include <e32base.h>
-#include <AudioPreference.h>
-
-#include "cmmadrmaudioplayer.h"
-#include "mmmadisplay.h"
-
-const TInt KErrorMessageSize = 32;
-const TInt64 KDurationUnknown = -1;
-const TInt KMediaStartTime = 0;
-const TInt KMediaTimeDurationTreshold = 100000;
-
-_LIT(KErrDefaultError, "Symbian OS Error: %d");
-
-CMMADRMAudioPlayer* CMMADRMAudioPlayer::NewLC(const TDesC& aContentType,
-        TFileName aFileName)
-{
-    CMMADRMAudioPlayer* self = new(ELeave) CMMADRMAudioPlayer(aFileName);
-    CleanupStack::PushL(self);
-    self->ConstructL(aContentType);
-    return self;
-}
-
-CMMADRMAudioPlayer::~CMMADRMAudioPlayer()
-{
-    CloseClientUtility();
-    delete iUtility;
-
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMAudioPlayer::~CMMADRMAudioPlayer ");
-}
-
-void CMMADRMAudioPlayer::ConstructL(const TDesC& aContentType)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADRMAudioPlayer::ConstructL");
-    // Only file based sources are supported with DRM
-    if (iFileName == KNullDesC)
-    {
-        User::Leave(KErrNotSupported);
-    }
-    iContentType = aContentType.AllocL();
-    iUtility = CDrmPlayerUtility::NewL(*this, KAudioPriorityRealOnePlayer,
-                                       (TMdaPriorityPreference) KAudioPrefRealOneLocalPlayback);
-
-    CMMAPlayer::ConstructL();
-}
-
-CMMADRMAudioPlayer::CMMADRMAudioPlayer(TFileName aFileName):
-        CMMAPlayer(),
-        iFileName(aFileName)
-{
-}
-
-CDrmPlayerUtility* CMMADRMAudioPlayer::DRMUtility() const
-{
-    return iUtility;
-}
-
-
-void CMMADRMAudioPlayer::RealizeL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADRMAudioPlayer::RealizeL");
-    CMMAPlayer::RealizeL();
-}
-
-void CMMADRMAudioPlayer::PrefetchL()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMADRMAudioPlayer::PrefetchL");
-    // Prefetch will be completed in init callback
-    iUtility->OpenFileL(iFileName);
-}
-
-void CMMADRMAudioPlayer::DeallocateL()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: DeallocateL +");
-    if (iState == EPrefetched)
-    {
-        CloseClientUtility();
-        ChangeState(ERealized);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMAMidiPlayer: DeallocateL -");
-}
-
-void CMMADRMAudioPlayer::StartL()
-{
-    // start can't be called to not ready player
-    ASSERT(iState == EPrefetched);
-
-    TInt64 time = TInt64(KMediaStartTime);
-
-    // Media time is not fetched using GetMediaTime
-    // Because it adjusts the result if it is close
-    // to duration.
-
-    TTimeIntervalMicroSeconds position(KMediaStartTime);
-    User::LeaveIfError(iUtility->GetPosition(position));
-
-    time = position.Int64();
-
-    TInt64 duration;
-    GetDuration(&duration);
-    if ((duration > 0) && (time > duration - KMediaTimeDurationTreshold))
-    {
-        time = KMediaStartTime;
-        iUtility->SetPosition(time);
-    }
-
-    iUtility->Play();
-    PostActionCompletedStart();
-    // inform java side
-    PostActionCompleted(KErrNone);   // java start return
-    PostLongEvent(CMMAPlayerEvent::EStarted, time);
-    ChangeState(EStarted);
-}
-
-void CMMADRMAudioPlayer::StopL(TBool aPostEvent)
-{
-    if (iState == EStarted)
-    {
-        User::LeaveIfError(iUtility->Pause());
-
-        if (aPostEvent)
-        {
-            TInt64 time;
-            GetMediaTime(&time);
-            PostLongEvent(CMMAPlayerEvent::EStopped, time);
-        }
-        // go back to prefetched state
-        ChangeState(EPrefetched);
-    }
-}
-
-void CMMADRMAudioPlayer::GetDuration(TInt64* aDuration)
-{
-    if (iState < EPrefetched)
-    {
-        *aDuration = KDurationUnknown;
-    }
-    else
-    {
-        *aDuration = iUtility->Duration().Int64();
-    }
-}
-
-void CMMADRMAudioPlayer::SetMediaTimeL(TInt64* aTime)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMADRMAudioPlayer::SetMediaTimeL + aTime: %d", *aTime);
-    // Duration is needed so we do not try to set media time
-    // too far away. If duration is not known, setting media time
-    // is not allowed.
-
-    TInt64 duration = TInt64(KMediaStartTime);
-    GetDuration(&duration);
-    if (duration < KErrNone)
-    {
-        // If duration is not known, we will leave with suitable code.
-        User::Leave(KErrNotSupported);
-    }
-
-    // Check if desired media time is past media duration and
-    // set it to duration in that case. Negative values are not
-    // checked here because it's done already in Java side.
-
-    // If media time is attempted to set to duration, then
-    // it is set close to duration. This way
-    // when utility is then started, end of media event
-    // will come soon after. This is not indicated to Java
-    // side but instead returned that the media time was
-    // set to duration.
-
-    TTimeIntervalMicroSeconds position;
-    if (*aTime >= duration)
-    {
-        *aTime = duration;
-        position = duration - KMediaTimeDurationTreshold;
-    }
-    else
-    {
-        position = *aTime;
-    }
-
-    iUtility->SetPosition(position);
-
-    // Inform about the position change to the StateListeners
-    ChangeState(iState);
-
-    // Get the actual media time
-    GetMediaTime(aTime);
-}
-
-void CMMADRMAudioPlayer::GetMediaTime(TInt64* aMediaTime)
-{
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMADRMAudioPlayer::GetMediaTime + aMediaTime: %d", *aMediaTime);
-    TTimeIntervalMicroSeconds position;
-    TInt64 duration = TInt64(KMediaStartTime);
-
-    // Error code discarded on purpose
-    GetDuration(&duration);
-
-    TInt error(iUtility->GetPosition(position));
-    if (error == KErrNone)
-    {
-        // set return value
-        *aMediaTime = position.Int64();
-        //if duration is unknown and position 0, player is realized and
-        //we can not know media time
-        if ((duration == KDurationUnknown) && (position == 0))
-        {
-            *aMediaTime = KTimeUnknown;
-        }
-    }
-    else
-    {
-        // media time cannot be get
-        *aMediaTime = KTimeUnknown;
-    }
-
-    // Second part of the set media time workaround.
-    // If position is close to duration, then media
-    // time of duration is returned instead.
-
-    // If the duration is zero or not known
-    // then this adjustment is not done.
-    if ((duration > KErrNone) &&
-            (*aMediaTime >= duration - KMediaTimeDurationTreshold))
-    {
-        *aMediaTime = duration;
-    }
-    LOG1( EJavaMMAPI, EInfo, "MMA::CMMADRMAudioPlayer::GetMediaTime - aMediaTime: %d", *aMediaTime);
-}
-
-void CMMADRMAudioPlayer::CloseL()
-{
-    CMMAPlayer::CloseL();
-    CloseClientUtility();
-}
-
-const TDesC& CMMADRMAudioPlayer::Type()
-{
-    return KMMADRMPlayer;
-}
-
-void CMMADRMAudioPlayer::PlayCompleteL(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA: CMMADRMAudioPlayer: PlayCompleteL: Error=%d", aError);
-    TInt64 time;
-    GetDuration(&time);
-
-    // Send 'Stopped' only when stop() is called.
-    PostLongEvent(CMMAPlayerEvent::EEndOfMedia, time);
-
-    ChangeState(EPrefetched);   // ready to play again
-
-    if (aError == KErrNone)
-    {
-        iRepeatCount++;
-
-        if (iRepeatForever || iRepeatCount < iRepeatNumberOfTimes)
-        {
-            StartL();
-        }
-        else
-        {
-            iRepeatCount = 0;
-            TTimeIntervalMicroSeconds position(time);
-            iUtility->SetPosition(position);
-        }
-    }
-    else
-    {
-        // error has occured, setting correct number of
-        // repeats for next start
-        SetLoopCount(iRepeatNumberOfTimes);
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMADRMAudioPlayer: PlayCompleteL -");
-}
-
-void CMMADRMAudioPlayer::MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMADRMAudioPlayer::MdapcInitComplete: aError = %d", aError);
-    if (!aError)
-    {
-        ChangeState(EPrefetched);
-    }
-    PostActionCompleted(aError);
-}
-
-void CMMADRMAudioPlayer::MdapcPlayComplete(TInt aError)
-{
-    if (aError)
-    {
-        ErrorPlaybackComplete(aError);
-    }
-    else
-    {
-        TRAPD(error, PlayCompleteL(KErrNone));
-        if (error)
-        {
-            ErrorPlaybackComplete(error);
-        }
-    }
-}
-
-void CMMADRMAudioPlayer::CloseClientUtility()
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMADRMAudioPlayer: CloseClientUtility +");
-    if (iUtility)
-    {
-        iUtility->Close();
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMADRMAudioPlayer: CloseClientUtility -");
-}
-
-void CMMADRMAudioPlayer::ErrorPlaybackComplete(TInt aError)
-{
-    ELOG1( EJavaMMAPI, "MMA::CMMADRMAudioPlayer::ErrorPlaybackComplete: aError = %d", aError);
-    TBuf<KErrorMessageSize> errorMessage;
-    errorMessage.Format(KErrDefaultError, aError);
-    PostStringEvent(CMMAPlayerEvent::EError, errorMessage);
-
-    CloseClientUtility();
-    ChangeState(ERealized);
-}
-//  END OF FILE
--- a/javauis/mmapi_qt/src_drmv2/src/cmmadrmmetadatacontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 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:  CMMADRMMetaDataControl is a concrete class for getting
-*                metadata from DRM files.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmadrmmetadatacontrol.h"
-
-CMMADRMMetaDataControl::CMMADRMMetaDataControl(
-    CMMADRMAudioPlayer* aPlayer)
-        : iPlayer(aPlayer)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMMetaDataControl constructor called.");
-}
-
-TInt CMMADRMMetaDataControl::KeyCountL()
-{
-    TInt entries;
-    User::LeaveIfError(iPlayer->DRMUtility()->GetNumberOfMetaDataEntries(entries));
-    return entries;
-}
-
-HBufC* CMMADRMMetaDataControl::KeyL(TInt aIndex)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMADRMMetaDataControl::KeyL");
-    CMMFMetaDataEntry* currEntry =
-        iPlayer->DRMUtility()->GetMetaDataEntryL(aIndex);
-    CleanupStack::PushL(currEntry);
-    HBufC* key = currEntry->Name().AllocL();
-    CleanupStack::PopAndDestroy(); // currEntry
-    return key;
-}
-
-
-/*
- * Get the value of given drm metadata key. The ownership of the created value
- * (descriptor) is passed to the caller.
- */
-HBufC* CMMADRMMetaDataControl::KeyValueL(const TDesC& aKey)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA: CMMADRMMetaDataControl::KeyValueL");
-
-    HBufC* retVal = NULL;
-    CMMFMetaDataEntry* currEntry = NULL;
-
-    TInt nEntries;
-    User::LeaveIfError(iPlayer->DRMUtility()->GetNumberOfMetaDataEntries(nEntries));
-
-    for (TInt i = 0; i < nEntries; ++i)
-    {
-        currEntry = iPlayer->DRMUtility()->GetMetaDataEntryL(i);
-
-        if (0 == aKey.Compare(currEntry->Name()))
-        {
-            CleanupStack::PushL(currEntry);
-            retVal = currEntry->Value().AllocL();
-            CleanupStack::PopAndDestroy(); // currEntry
-            break;
-        }
-
-        delete currEntry;
-    }
-
-    User::LeaveIfNull(retVal);
-    return retVal;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/src_drmv2/src/cmmadrmplayerfactory.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for creating DRM v2 player.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include <DRMCommon.h>
-#include <DRMHelper.h>
-#include <caf/stringattributeset.h>
-
-#include "cmmadrmplayerfactory.h"
-#include "cmmadrmaudioplayer.h"
-#include "cmmadrmvolumecontrol.h"
-#include "cmmastoptimecontrol.h"
-#include "cmmadrmmetadatacontrol.h"
-#include "cmmadrmratecontrol.h"
-#include "cmmavideoplayer.h"
-
-_LIT(KMMAAudio, "audio");
-// this (get from caf) cannot be recognized is it audio or video
-_LIT(KMMARMCafMimeType, "application/vnd.rn-realmedia");
-// drm v2 file suffix
-_LIT(KMMADRMv2SuffixODF, "odf");
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::NewLC
-// ---------------------------------------------------------------------------
-//
-CMMADRMPlayerFactory* CMMADRMPlayerFactory::NewLC(CMMAVideoPlayerFactory* aVideoPlayerFactory)
-{
-    CMMADRMPlayerFactory* pFactory =
-        new(ELeave) CMMADRMPlayerFactory(aVideoPlayerFactory);
-    CleanupStack::PushL(pFactory);
-    return pFactory;
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CMMADRMPlayerFactory
-// ---------------------------------------------------------------------------
-//
-CMMADRMPlayerFactory::CMMADRMPlayerFactory(CMMAVideoPlayerFactory* aVideoPlayerFactory)
-        :iVideoPlayerFactory(aVideoPlayerFactory)
-{
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::~CMMADRMPlayerFactory
-// ---------------------------------------------------------------------------
-//
-CMMADRMPlayerFactory::~CMMADRMPlayerFactory()
-{
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CreatePlayerL
-// ---------------------------------------------------------------------------
-//
-CMMAPlayer* CMMADRMPlayerFactory::CreatePlayerL(const TDesC& /*aContentType*/)
-{
-    // only file is supported
-    return NULL;
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CreatePlayerL
-// ---------------------------------------------------------------------------
-//
-CMMAPlayer* CMMADRMPlayerFactory::CreatePlayerL(
-    const TDesC& aProtocol,
-    const TDesC& aMiddlePart,
-    const TDesC& /*aProperties*/)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreatePlayerL +");
-    CMMAPlayer* player = NULL;
-    if (aProtocol == KMMAFileProtocol)
-    {
-        // we are most likely going to play this file
-        ContentAccess::TIntent intent = ContentAccess::EPlay;
-
-        ContentAccess::CContent* contentObj = ContentAccess::CContent::NewL(aMiddlePart);
-        CleanupStack::PushL(contentObj);
-
-        ContentAccess::CData* dataObj = NULL;
-        TRAPD(openContentErr, dataObj = contentObj->OpenContentL(intent));
-        CleanupStack::PushL(dataObj);
-
-        ELOG1( EJavaMMAPI, "MMA::CMMADRMPlayerFactory::CreatePlayerL openContentErr: %d", openContentErr);
-        if (KErrCA_LowerLimit <= openContentErr && openContentErr <= KErrCA_UpperLimit)
-        {
-            // handle error, possible update rights
-            UpdateRightsL(openContentErr, aMiddlePart);
-            User::Leave(openContentErr);
-        }
-        else
-        {
-            User::LeaveIfError(openContentErr);
-        }
-
-        ContentAccess::RStringAttributeSet stringAttributeSet;
-        CleanupClosePushL(stringAttributeSet);
-        stringAttributeSet.AddL(ContentAccess::EMimeType);
-
-        User::LeaveIfError(dataObj->GetStringAttributeSet(stringAttributeSet));
-
-        TBuf<KMaxName> mimeType;
-        TInt err = stringAttributeSet.GetValue(ContentAccess::EMimeType, mimeType);
-        if (err == KErrNone)
-        {
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreatePlayerL, no err, mime type = %S", mimeType.PtrZ());
-            // we use 16bit mimeType
-            HBufC* mimeTypeBuf = HBufC::NewLC(mimeType.Length());
-            mimeTypeBuf->Des().Copy(mimeType);
-
-            if (((mimeTypeBuf->Length() >= KMMAAudio().Length()) &&
-                    (mimeTypeBuf->Left(KMMAAudio().Length()) == KMMAAudio)) ||
-                    ((KErrNone == mimeTypeBuf->Compare(KMMARMCafMimeType)) &&
-                     (aMiddlePart.Right(KMMADRMv2SuffixODF().Length()) ==
-                      KMMADRMv2SuffixODF())))
-            {
-                // if content-type starts with "audio" or
-                // if it's KMMARMCafMimeType and file suffix is ODF
-                // then create audio player
-                player = CreateAudioPlayerL(*mimeTypeBuf, aMiddlePart);
-            }
-            else
-            {
-                // otherwise try video player
-                player = CreateVideoPlayerL(*mimeTypeBuf, aMiddlePart);
-            }
-            CleanupStack::PopAndDestroy(mimeTypeBuf);
-        }
-        else
-        {
-            ELOG1( EJavaMMAPI, "MMA::CMMADRMPlayerFactory::CreatePlayerL get mime err: %d", err);
-            LOG1( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreatePlayerL mime type = %S", mimeType.PtrZ());
-            User::Leave(err);
-        }
-        CleanupStack::PopAndDestroy(3); //dataObj, contentObj, stringAttributeSet
-    }
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreatePlayerL -");
-    return player;
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CreatePlayerL
-// ---------------------------------------------------------------------------
-//
-CMMAPlayer* CMMADRMPlayerFactory::CreatePlayerL(const TDesC8& /*aHeaderData*/)
-{
-    // only file is supported
-    return NULL;
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::GetSupportedContentTypesL
-// ---------------------------------------------------------------------------
-//
-void CMMADRMPlayerFactory::GetSupportedContentTypesL(const TDesC& /*aProtocol*/,
-        CDesC16Array& /*aMimeTypeArray*/)
-{
-    // DRM Supports same content-types as others, no need to add
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::GetSupportedProtocolsL
-// ---------------------------------------------------------------------------
-//
-void CMMADRMPlayerFactory::GetSupportedProtocolsL(
-    const TDesC& /*aContentType*/,
-    CDesC16Array& /*aProtocolArray*/)
-{
-    // DRM Supports same protocols as others, no need to add
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::UpdateRightsL
-// ---------------------------------------------------------------------------
-//
-void CMMADRMPlayerFactory::UpdateRightsL(TInt aError,
-        const TDesC& aFileName)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::UpdateRightsL +");
-    CDRMHelper* helper = CDRMHelper::NewLC();
-    TInt code = helper->HandleErrorL(aError, aFileName);
-    if (code == 0)
-    {
-        User::Leave(aError);
-    }
-    CleanupStack::PopAndDestroy(helper);
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CreateAudioPlayerL
-// ---------------------------------------------------------------------------
-//
-CMMAPlayer* CMMADRMPlayerFactory::CreateAudioPlayerL(const TDesC& aContentType,
-        const TDesC& aFileName)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreateAudioPlayerL +");
-    CMMADRMAudioPlayer* player = CMMADRMAudioPlayer::NewLC(aContentType,
-                                 aFileName);
-
-    CMMADRMVolumeControl* volumeControl = CMMADRMVolumeControl::NewL(player);
-    CleanupStack::PushL(volumeControl);
-    player->AddControlL(volumeControl);
-    CleanupStack::Pop(volumeControl);
-
-    CMMAStopTimeControl* stopTimeControl = CMMAStopTimeControl::NewL(player);
-    CleanupStack::PushL(stopTimeControl);
-    player->AddControlL(stopTimeControl);
-    CleanupStack::Pop(stopTimeControl);
-
-    CMMADRMMetaDataControl* metaDataControl =
-        new(ELeave)CMMADRMMetaDataControl(player);
-    CleanupStack::PushL(metaDataControl);
-    player->AddControlL(metaDataControl);
-    CleanupStack::Pop(metaDataControl);
-
-    CMMADRMRateControl* drmRateControl = CMMADRMRateControl::NewL(player);
-    CleanupStack::PushL(drmRateControl);
-    player->AddControlL(drmRateControl);
-    CleanupStack::Pop(drmRateControl);
-
-    CleanupStack::Pop(player);
-    return player;
-}
-
-// ---------------------------------------------------------------------------
-// CMMADRMPlayerFactory::CreateVideoPlayerL
-// ---------------------------------------------------------------------------
-//
-CMMAPlayer* CMMADRMPlayerFactory::CreateVideoPlayerL(const TDesC& aContentType,
-        const TDesC& aFileName)
-{
-    LOG( EJavaMMAPI, EInfo, "MMA::CMMADRMPlayerFactory::CreateVideoPlayerL +");
-    CMMAPlayer* player =
-        iVideoPlayerFactory->CreatePlayerWithFileL(aContentType, &aFileName);
-
-    return player;
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/src_drmv2/src/cmmadrmratecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class implements generic RateControl functionality.
-*
-*/
-
-
-//  INCLUDE FILES
-#include "logger.h"
-#include <e32base.h>
-
-#include "cmmadrmratecontrol.h"
-
-CMMADRMRateControl* CMMADRMRateControl::NewL(CMMADRMAudioPlayer* aPlayer)
-{
-    CMMADRMRateControl* self = new(ELeave) CMMADRMRateControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMADRMRateControl::~CMMADRMRateControl()
-{
-    LOG(EJavaMMAPI,EInfo,"MMA:CMMADRMRateControl::~CMMADRMRateControl");
-    if (iPlayer)
-    {
-        iPlayer->RemoveStateListener(this);
-    }
-}
-
-CMMADRMRateControl::CMMADRMRateControl(CMMADRMAudioPlayer* aPlayer) :
-        iPlayer(aPlayer), iCurrentRate(KMMADefaultRate)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA:CMMADRMRateControl::CMMADRMRateControl");
-}
-
-void CMMADRMRateControl::ConstructL()
-{
-    iPlayer->AddStateListenerL(this);
-}
-
-void CMMADRMRateControl::StateChanged(TInt aState)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA:CMMADRMRateControl::StateChanged");
-    if (aState == CMMAPlayer::EStarted && iCurrentRate == KMMAMinRate)
-    {
-        iPlayer->DRMUtility()->Stop();
-    }
-}
-
-TInt CMMADRMRateControl::SetRateL(TInt aRate)
-{
-    LOG(EJavaMMAPI,EInfo,"MMA:CMMADRMRateControl::SetRateL");
-    if (aRate <= KMMAMinRate)
-    {
-        iCurrentRate = KMMAMinRate;
-    }
-    else
-    {
-        iCurrentRate = KMMADefaultRate;
-    }
-
-    if (iPlayer->State() == CMMAPlayer::EStarted)
-    {
-        if (iCurrentRate == KMMAMinRate)
-        {
-            iPlayer->DRMUtility()->Stop();
-        }
-        else
-        {
-            iPlayer->DRMUtility()->Play();
-        }
-    }
-    return iCurrentRate;
-}
-
-TInt CMMADRMRateControl::RateL()
-{
-    return iCurrentRate;
-}
-
-
-//  END OF FILE
--- a/javauis/mmapi_qt/src_drmv2/src/cmmadrmvolumecontrol.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for setting volume to DRMv2 audio player
-*
-*/
-
-
-#include "logger.h"
-#include "cmmadrmvolumecontrol.h"
-#include "cmmadrmaudioplayer.h"
-
-CMMADRMVolumeControl::CMMADRMVolumeControl(CMMADRMAudioPlayer* aPlayer)
-        : CMMAVolumeControl(aPlayer)
-{
-    iPlayer = aPlayer;
-}
-
-void CMMADRMVolumeControl::ConstructL()
-{
-    ConstructBaseL();
-}
-CMMADRMVolumeControl* CMMADRMVolumeControl::NewL(CMMADRMAudioPlayer* aPlayer)
-{
-    CMMADRMVolumeControl* self = new(ELeave)CMMADRMVolumeControl(aPlayer);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-}
-
-void CMMADRMVolumeControl::DoSetLevelL(TInt aLevel)
-{
-    CDrmPlayerUtility* utility = iPlayer->DRMUtility();
-    TInt maxVolume = utility->MaxVolume();
-    utility->SetVolume(aLevel * maxVolume / KMMAVolumeMaxLevel);
-}
-
-TInt CMMADRMVolumeControl::DoGetLevelL()
-{
-    CDrmPlayerUtility* utility = iPlayer->DRMUtility();
-    TInt maxVolume = utility->MaxVolume();
-    TInt volume = 0;
-    User::LeaveIfError(utility->GetVolume(volume));
-    // result is in range 0..100
-    return (volume * KMMAVolumeMaxLevel / maxVolume);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/utils/inc/TimeOutTimer.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2003 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:  Timer for comms time-outs
-*
-*/
-
-
-#ifndef TIMEOUTTIMER_H
-#define TIMEOUTTIMER_H
-
-#include <e32base.h>
-#include <e32def.h>
-
-// MTimeOutNotify: used in conjunction with CTimeOutTimer class
-class MTimeOutNotify
-{
-public:
-    virtual void TimerExpired() = 0;
-};
-
-// CTimeOutTimer: timer for comms time-outs
-class CTimeOutTimer : public CTimer
-{
-public:
-    IMPORT_C static CTimeOutTimer* NewL(const TInt aPriority, MTimeOutNotify& aTimeOutNotify);
-    ~CTimeOutTimer();
-
-protected:
-    CTimeOutTimer(const TInt aPriority);
-    void ConstructL(MTimeOutNotify& aTimeOutNotify);
-    virtual void RunL();
-
-private:
-    MTimeOutNotify* iNotify;
-};
-
-#endif // TIMEOUTTIMER_H
-
-//  End of File
--- a/javauis/mmapi_qt/utils/inc/mmapiutils.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#ifndef MMAPIUTILS_H
-#define MMAPIUTILS_H
-#include "jni.h"
-#include "e32base.h"
-#include "BADESCA.H"
-
-class MMAPIUtils
-{
-public:
-    
-    static TInt CopyToJava(JNIEnv& aJni, const TDesC8& aNativeBuffer,
-                                    jbyteArray aJavaBuffer, TInt aOffset, TInt aLength);  
-    static jstring CreateJavaString(JNIEnv& aJni, const TDesC16& aString);
-
-    static jobjectArray CopyToNewJavaStringArrayL(JNIEnv& aJni, const CDesCArray& aNativeArray);
-    
-    static void AddToJavaStringArrayL(JNIEnv& aJni, jobjectArray& aContainer, TInt aPosition, const TDesC& aString);
-};
-
-#endif // MMAPIUTILS_H
--- a/javauis/mmapi_qt/utils/src/TimeOutTimer.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2003 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:  Timer for comms time-outs
-*
-*/
-
-
-#include "TimeOutTimer.h"
-
-CTimeOutTimer::CTimeOutTimer(const TInt aPriority)
-        : CTimer(aPriority)
-{
-}
-
-CTimeOutTimer::~CTimeOutTimer()
-{
-    Cancel();
-}
-
-
-EXPORT_C CTimeOutTimer* CTimeOutTimer::NewL(const TInt aPriority, MTimeOutNotify& aTimeOutNotify)
-{
-    CTimeOutTimer *p = new(ELeave) CTimeOutTimer(aPriority);
-    CleanupStack::PushL(p);
-    p->ConstructL(aTimeOutNotify);
-    CleanupStack::Pop();
-    return p;
-}
-
-void CTimeOutTimer::ConstructL(MTimeOutNotify &aTimeOutNotify)
-{
-    iNotify=&aTimeOutNotify;
-    CTimer::ConstructL();
-    CActiveScheduler::Add(this);
-}
-
-void CTimeOutTimer::RunL()
-// Timer request has completed, so notify the timer's owner
-{
-    iNotify->TimerExpired();
-}
-
-//  End of File
--- a/javauis/mmapi_qt/utils/src/mmapiutils.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-#include "mmapiutils.h"
-#include "s60commonutils.h"
-using namespace java::util;
-    
-enum TJavaArrayPanic
-{
-    EBadOffsetIntoJavaArray,
-    EWritingOverEndOfJavaArray,
-    EBadOffsetIntoJavaArrayForRead,
-    EReadingOverEndOfJavaArray,
-};
-
-
-/**
- * Copies data from the native to the Java array.
- * @return The number of bytes copied.
- */
-TInt MMAPIUtils::CopyToJava(JNIEnv& aJni, const TDesC8& aNativeBuffer,
-                                     jbyteArray aJavaBuffer, TInt aOffset, TInt aLength)
-{
-    __ASSERT_DEBUG(aOffset <= aJni.GetArrayLength(aJavaBuffer),
-                   User::Panic(_L("ArrayUtils"), EBadOffsetIntoJavaArray));
-    __ASSERT_DEBUG(aLength <= aJni.GetArrayLength(aJavaBuffer) - aOffset,
-                   User::Panic(_L("ArrayUtils"), EWritingOverEndOfJavaArray));
-
-    TInt nativeBufferLength = aNativeBuffer.Length();
-    TInt length = (nativeBufferLength < aLength) ? nativeBufferLength : aLength;
-    TUint8* nativeBufferPtr = const_cast<TUint8*>(aNativeBuffer.Ptr());
-    jbyte* jNativeBufferPtr = reinterpret_cast<jbyte*>(nativeBufferPtr);
-    aJni.SetByteArrayRegion(aJavaBuffer, aOffset, length, jNativeBufferPtr);
-    return length;
-}
-
-jobjectArray MMAPIUtils::CopyToNewJavaStringArrayL(JNIEnv& aJni, const CDesCArray& aNativeArray)
-{
-    jclass stringClass = aJni.FindClass("java/lang/String");
-    User::LeaveIfNull(stringClass);
-    //
-    jobjectArray result = aJni.NewObjectArray(aNativeArray.Count(), stringClass, NULL);
-    if (result != NULL)
-    {
-        TPtrC item;
-        for (int i=0; i<aNativeArray.Count(); ++i)
-        {
-            item.Set(aNativeArray[i]);
-            AddToJavaStringArrayL(aJni, result, i, item);
-        }
-    }
-    return result;
-}
-
-void MMAPIUtils::AddToJavaStringArrayL(JNIEnv& aJni, jobjectArray& aContainer, TInt aPosition, const TDesC& aString)
-{
-    jstring javaString = S60CommonUtils::NativeToJavaString(aJni, aString);
-    User::LeaveIfNull(javaString);
-    //
-    aJni.SetObjectArrayElement(aContainer, aPosition, javaString);
-    aJni.DeleteLocalRef(javaString);
-}
--- a/javauis/mmapi_qt/volumekeys/inc/cmmaforeground.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class is used to find out from java is midlet foreground or not
-*
-*/
-
-
-#ifndef CMMAFOREGROUND_H
-#define CMMAFOREGROUND_H
-
-#include <e32base.h>
-
-#include "mmmaeventposter.h"
-#include "cmmadeleterefevent.h"
-#include "cmmaforegroundevent.h"
-
-// xm-radio fix
-//#include "CMIDToolkit.h"
-//#include "lcdui.h"
-
-#include <coemain.h>
-#include <eikenv.h>
-
-//  CLASS DECLARATION
-/**
-*
-* Class is used to find out from java is midlet foreground or not
-*/
-NONSHARABLE_CLASS(CMMAForeground) : public CBase/*, public MMIDEnvObserver, public MCoeForegroundObserver*/
-{
-public:
-
-    /**
-     * Creates and returns a new instance of this class.
-     * @param aEventPoster for posting event to java side
-     * @param aForegroundListener java side foreground object
-     * @param aJavaMethod java side method id
-     * @return New instance from this class.
-     */
-    static CMMAForeground* NewL(MMMAEventPoster* aEventPoster,
-    jobject aForegroundListener,
-    jmethodID aJavaMethod/*,
-    CMIDToolkit* aToolkit*/); // xm-radio fix
-    /**
-     * Destructor.
-     */
-    ~CMMAForeground();
-
-protected:
-
-    /**
-     * C++ constructor
-     */
-    CMMAForeground();
-
-    /**
-     * Second phase constructor
-     * @param aEventPoster for posting event to java side
-     * @param aForegroundListener java side foreground object
-     * @param aJavaMethod java side method id
-     */
-    void ConstructL(MMMAEventPoster* aEventPoster,
-                    jobject aForegroundListener,
-                    jmethodID aJavaMethod/*,
-                    CMIDToolkit* aToolkit*/); // xm-radio fix
-
-public: // New methods
-
-
-    /**
-     * Tells is midlet foreground or not
-     * @return boolean
-     */
-    TBool IsForeground();
-
-    /**
-     * Sets member boolean iIsForeground
-     */
-    void SetForeground(TBool aIsForeground);
-
-public: // from MMIDEnvObserver
-
-  //  void HandleSwitchOnL(TBool /*aSwitchOn*/);
-
-    /**
-     * Handles the case when the MIDlet is brought to the foreground.
-     */
-  //  void HandleForegroundL(TBool /*aForeground*/);
-
-    /**
-     * Handles a change to resources which are shared accross the environment.
-     */
-   // void HandleResourceChangeL(TInt /*aType*/);
-
-public:
-    /** Handles the application coming to the foreground. */
-    void HandleGainingForeground();
-
-    /** Handles the application going into the background. */
-    void HandleLosingForeground();
-
-private: // Member data
-
-    CActiveSchedulerWait* iActiveScheduler; // owned
-    MMMAEventPoster* iEventPoster; // not owned
-    CMMAForegroundEvent* iForegroundEvent; // owned
-
-    //Event is used to destroy reference to associated java object,
-    //when foreground is destroyed.
-    CMMADeleteRefEvent* iDeleteRefEvent; // owned
-
-    jobject iForegroundListener;
-    jmethodID iJavaMethod;
-
-    TBool iIsForeground;
-    // xm-radio fix
-    //CMIDToolkit* iToolkit;
-    //MMIDEnv* iMidEnv;
-};
-
-#endif // CMMAFOREGROUND_H
--- a/javauis/mmapi_qt/volumekeys/inc/cmmaforegroundevent.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-#ifndef CMMAFOREGROUNDEVENT_H
-#define CMMAFOREGROUNDEVENT_H
-
-//  INCLUDES
-#include "cmmaevent.h"
-
-//  CLASS DECLARATION
-/**
-*   This class is used to post events to the java.
-*
-*
-*/
-
-NONSHARABLE_CLASS(CMMAForegroundEvent) : public CMMAEvent
-{
-public: // Construction
-    /**
-     * Constructor.
-     *
-     * @param aNotifyObject java side foreground object
-     * @param aHandleEventMethod  java side method id
-     * @param aDisposable Indicates if this event will be destroyed
-     *                    after dispatch.
-     */
-    CMMAForegroundEvent(jobject aNotifyObject,
-    jmethodID aHandleEventMethod,
-    TDisposability aDisposable = EDisposableEvent);
-
-
-private: // from CMMAEvent
-
-    void Dispatch(JNIEnv& aJni);
-
-};
-
-#endif // CMMAFOREGROUNDEVENT_H
--- a/javauis/mmapi_qt/volumekeys/inc/cmmaglobalvolume.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for global volume
-*
-*/
-
-
-#ifndef CMMAGLOBALVOLUME_H
-#define CMMAGLOBALVOLUME_H
-
-// INTERNAL INCLUDES
-#include "cmmavolumecontrol.h"
-#include "mmmavolumekeyslistener.h"
-
-class CMMAPlayer;
-class CMMAForeground;
-class CRepository;
-class CMMAVolumeKeysListener;
-
-//  CLASS DECLARATION
-/**
- * This class is used for global volume setting
- * @since S60 3.2
- */
-NONSHARABLE_CLASS(CMMAGlobalVolume) : public CBase,
-        public MMMAVolumeKeysListener
-{
-private: // Type definitions
-
-    // Volume control, index and player holder
-    class TMMAPlayerHolder
-    {
-    public:
-        // Volume index
-        TInt iVolumeIndex;
-        // Player which contains the volume control
-        CMMAPlayer* iPlayer;
-        // Volume control from the player
-        CMMAVolumeControl* iVolumeControl;
-    };
-
-public: // Constructor and destructors
-
-    /**
-     * NewL
-     * Creates an instance from this class
-     * @param aForeground Foreground listener. The ownership is transferred
-     *        to this class
-     * @return New instance from this class. The caller takes ownership
-     *         of the returned object
-     */
-    static CMMAGlobalVolume* NewL(CMMAForeground* aForeground);
-
-    /**
-     * Destructor
-     */
-    virtual ~CMMAGlobalVolume();
-
-public: // New methods
-
-    /**
-     * Adds new player for listening global volume. Players which
-     * do not have volume control are simply ignored
-     *
-     * @param aPlayer Player which receives volume key notifications
-     */
-    void AddPlayerL(CMMAPlayer* aPlayer);
-
-    /**
-     * Removes player from listening global volume
-     */
-    void RemovePlayer(CMMAPlayer* aPlayer);
-
-public: // From MMMAVolumeKeysListener
-
-    /**
-     * Handles volume up event
-     */
-    void VolumeUp();
-
-    /**
-     * Handles volume down event
-     */
-    void VolumeDown();
-
-private: // New methods
-
-    /**
-     * Finds volume control from a player
-     *
-     * @param aPlayer Player from which the volume control is searched
-     * @return Volume control instance. NULL is returned if the player
-     *         does not support volume control feature
-     */
-    CMMAVolumeControl* FindVolumeControl(CMMAPlayer* aPlayer);
-
-    /**
-     * Sets volume level for all registered volume controls
-     * @param aLevel New volume level
-     */
-    void SetControlVolumeLevels(TInt aLevel);
-
-private: // Private constructors
-
-    /**
-     * C++ constructor
-     * @param aForeground Foreground listener
-     */
-    CMMAGlobalVolume(CMMAForeground* aForeground);
-
-    /**
-     * Second phase constructor
-     */
-    void ConstructL();
-
-protected: // Data
-
-    // Current global volume level
-    TInt iLevel;
-    // Foreground listener. Owned
-    CMMAForeground* iForeground;
-    // MMA setting repository. Owned
-    CRepository* iSettingsStore;
-    // Volume keys listener. Owned
-    CMMAVolumeKeysListener* iVolumeKeysListener;
-    // Array of volume controls
-    RArray< TMMAPlayerHolder > iControlList;
-};
-
-#endif // CMMAGLOBALVOLUME_H
-
-// End of file
--- a/javauis/mmapi_qt/volumekeys/inc/cmmavolumekeyslistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles the volume keys update events
-*
-*
-*/
-
-
-#ifndef CMMAVOLUMEKEYSLISTENER_H
-#define CMMAVOLUMEKEYSLISTENER_H
-
-// EXTERNAL INCLUDES
-#include <e32base.h>
-/*#include <remconcoreapitargetobserver.h>
-#include <javaremconmanager.h>
-#include <javaremconobserver.h>
-*/
-// INTERNAL INCLUDES
-#include "mmmavolumekeyslistener.h"
-
-// CLASS DECLARATION
-class CRemConInterfaceSelector;
-class CRemConCoreApiTarget;
-
-// CLASS DECLARATION
-/**
- *This class handles the volume keys update events
- *
- */
-NONSHARABLE_CLASS(CMMAVolumeKeysListener) : public CBase/*, public MRemConCoreApiTargetObserver*/
-{
-public:  // Constructors and destructor
-
-    /**
-     * Creates and returns a new instance of this class.
-     * @param aListener Listener for key events
-     */
-    static CMMAVolumeKeysListener* NewL(MMMAVolumeKeysListener* aListener);
-
-    // Destructor
-    ~CMMAVolumeKeysListener();
-
-private:    // Constructors
-
-    // Default constructor
-    CMMAVolumeKeysListener();
-
-    /**
-     * Second phase constructor.
-     * @param aListener Listener for key events
-     */
-    void ConstructL(MMMAVolumeKeysListener* aListener);
-
-public: // New functions
-
-
-    void HandleTimerEvent();
-
-
-    // From MRemConCoreApiTargetObserver
-  /*  void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed,
-                     TRemConCoreApiButtonAction aButtonAct);
-
-    void MrccatoCommand(TRemConCoreApiOperationId aOperationId,
-                        TRemConCoreApiButtonAction aButtonAct);
-
-    void MrccatoTuneFunction(TBool aTwoPart, TUint aMajorChannel,
-                             TUint aMinorChannel,
-                             TRemConCoreApiButtonAction aButtonAct);
-
-    void MrccatoSelectDiskFunction(TUint aDisk,
-                                   TRemConCoreApiButtonAction aButtonAct);
-
-    void MrccatoSelectAvInputFunction(
-        TUint8 aAvInputSignalNumber,
-        TRemConCoreApiButtonAction aButtonAct);
-    void MrccatoSelectAudioInputFunction(
-        TUint8 aAudioInputSignalNumber,
-        TRemConCoreApiButtonAction aButtonAct);
-        
-        */
-
-private:
-
-    /**
-     * TimerCallback
-     * This is the callback function called from timer.
-     */
-    static TInt TimerCallback(TAny* aThis);
-
-private:
-    CRemConInterfaceSelector* iInterfaceSelector; //owned
-    CRemConCoreApiTarget* iCoreTarget; //owned by iInterfaceSelector
-
-    // For getting timer ticks/events, owned
-    CPeriodic* iTimer;
-    // Marks if volume is increased or decreased
-    TBool iUp;
-    // Listener listening events. Used
-    MMMAVolumeKeysListener* iListener;
-   /* CJavaRemConManager *iJavaRemConManager;
-    CJavaRemConObserver *iJavaRemConObserver;
-    */
-};
-
-#endif // CMMAVOLUMEKEYSLISTENER_H
-
-// End of File
--- a/javauis/mmapi_qt/volumekeys/inc/mmaprivatecrkeys.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  MMA private Central Repository uids and keys
-*
-*/
-
-
-#ifndef MMAPRIVATECRKEYS_H
-#define MMAPRIVATECRKEYS_H
-
-// MMA settings store Central Repository uid
-const TUid KCRUidMobileMedia = { 0x102828A1 };
-// Key identifier for Volume level setting
-const TUint32 KMobileMediaVolumeLevel = 0x00000001;
-
-#endif // MMAPRIVATECRKEYS_H
-
-// End of file
--- a/javauis/mmapi_qt/volumekeys/inc/mmmavolumekeyslistener.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The class derived from this class handles the volume keys
-*                update events
-*
-*
-*/
-
-
-
-#ifndef MMMAVOLUMEKEYSLISTENER_H
-#define MMMAVOLUMEKEYSLISTENER_H
-
-#include <e32def.h>
-
-// CLASS DECLARATION
-/**
-*  The class derived from this class handles the volume keys
-*  update events
-*/
-NONSHARABLE_CLASS(MMMAVolumeKeysListener)
-{
-public:  // Constructors and destructor
-
-    //Virtual destructor, public allows delete
-    virtual ~MMMAVolumeKeysListener() {};
-
-public:  // Abstract methods
-    /**
-     * Called when volume key is clicked/pressed up
-     */
-    virtual void VolumeUp() = 0;
-
-    /**
-     * Called when volume key is clicked/pressed down
-     */
-    virtual void VolumeDown() = 0;
-};
-
-#endif // MMMAVOLUMEKEYSLISTENER_H
-
-// End of File
--- a/javauis/mmapi_qt/volumekeys/javasrc/com/nokia/microedition/volumekeys/ForegroundListener.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
- *
-*/
-
-
-// PACKAGE
-package com.nokia.microedition.volumekeys;
-
-// IMPORTS
-import com.nokia.microedition.media.NativeError;
-import java.lang.OutOfMemoryError;
-//import com.nokia.microedition.volumekeys.LCDUIForegroundListener;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import javax.microedition.lcdui.*;
-import org.eclipse.swt.widgets.Display;
-
-
-// for xm-radio fix
-//import com.symbian.midp.runtime.ToolkitInvoker;
-
-// CLASS DESCRIPTION
-/**
- * Provides information about the state of the MIDlet
- */
-public class ForegroundListener implements Listener
-{
-    //private final LCDUIForegroundListener iLCDUIForegroundListener;
-    private final int iForegroundHandle;
-    private final int iEventSourceHandle;
-     // Added for MMAPI UI 3.x
-    private boolean flagForground = true;
-   // private MMAPILCDUIInvokerImpl obj;
-
-    /*
-     * Constructor. Creates Foreground listener
-     * The listener is added to Event source native side
-     */
-    public ForegroundListener(int aEventSourceHandle)
-    {
-        iEventSourceHandle = aEventSourceHandle;
-		 // Added for MMAPI UI 3.x
-        // obj = new MMAPILCDUIInvokerImpl();
-        // obj.AddObservertoDisplay(this);
-         System.out.println("inside ForgroundLIstener constructor before _initialize");
-         iForegroundHandle = _initialize(aEventSourceHandle, this/*, iToolkitHandle*/);
-         System.out.println("inside ForgroundLIstener constructor after _initialize");
-         if (iForegroundHandle < NativeError.KErrNone)
-         {
-            throw new OutOfMemoryError("Foreground initialization failed.");
-         }
-
-
-
-    }
-
-
-public void init()
-{
-final ForegroundListener listener = this;
-System.out.println("inside init()....");
-
-try{
-	 final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-	 System.out.println("inside init()....1");
-
-
-	 			 disp.syncExec(new Runnable() {
-	 			             public void run() {
-	 							org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
-	 			               disp.addFilter(SWT.Activate,listener);
-	 			               disp.addFilter(SWT.Deactivate,listener);
-	 			             }
-		 });
-}
-catch(Exception e)
-{
-	System.out.println("inside init()....exception is " + e.toString());
-}
-
-
-}
-
-
-    //  Added for MMAPI UI 3.x
-
-	    public boolean isForeground()
-	    {
-	   		return flagForground;
-	    }
-
-		/*
-	     * From org.eclipse.swt.widget.Listener interface
-	     * Handling all the event
-	     * Used to filter out the event which can be used for Foreground/Background notification
-	     */
-	    public void handleEvent(Event event)
-	    {
-			System.out.println("ForegroundListener :handle event is called");
-			if(event.type == SWT.Activate)
-			{
-				System.out.println("handle event got a event: not in background");
-				flagForground = true;
-			//	update();
-
-			}
-			else if(event.type == SWT.Deactivate)
-			{
-				System.out.println("handle event got a event: in background");
-				flagForground = false;
-			// update();
-			}
-	}
-
-  /*
-  * Called from handleEvent callback function to notify native about the midlet foreground status
-  */
-    public synchronized void update()
-    {
-		boolean isFg = isForeground();
-		System.out.println("ForegroundListener.java inside update() : before calling native function ");
-       _setForeground(iEventSourceHandle, iForegroundHandle, isFg);
-       System.out.println("ForegroundListener.java inside update() : after calling native function ");
-    }
-
-    private native int _initialize(int aEventSourceHandle,
-                                   Object aForegroundListener/*,
-                                   int atoolkitHandle*/); // xm-radio fix
-
-   private native void _setForeground(int aEventSourceHandle,
-                                       int aForegroundHandle,
-                                       boolean aForeground);
-
-}
-
-// End of File
--- a/javauis/mmapi_qt/volumekeys/src/Foreground.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  JNI implementation for handling midlet foreground status
-*
-*/
-
-
-// EXTERNAL INCLUDES
-//#include <jutils.h>
-#include <logger.h>
-
-//#include <mswtclient.h>
-//#include <swtcliententry.h>
-
-// INTERNAL INCLUDES
-#include "com_nokia_microedition_volumekeys_ForegroundListener.h"
-#include "cmmaforeground.h"
-#include "mmafunctionserver.h"
-#include "cmmaglobalvolume.h"
-
-// for xm-radio fix
-//#include "CMIDToolkit.h"
-
-/**
- * Static delegator function for initialize.
- * @param aReturnHandle Native class object.
- * @param aEventSource Event source handle.
- * @param aForegroundListener ForegroundListener java object.
- * @param aJavaMethod java method ID.
- */
-LOCAL_C void CreateForegroundL(
-    TInt* aReturnHandle,
-    MMAFunctionServer* aEventSource,
-    jobject aForegroundListener,
-    jmethodID aJavaMethod/*,
-    CMIDToolkit* aToolkit*/) // xm-radio fix
-{
-    CMMAForeground* foreground =
-        CMMAForeground::NewL(aEventSource,
-                             aForegroundListener,
-                             aJavaMethod/*,
-                             aToolkit */// xm-radio fix
-                            );
-    CleanupStack::PushL(foreground);
-
-    // Create global volume which handles the volume events
-    CMMAGlobalVolume* globalVolume = CMMAGlobalVolume::NewL(foreground);
-    // Global volume takes the ownership of the foreground listener
-    CleanupStack::Pop(foreground);
-    // Set global volume to MMA event source. The ownership transfers to
-    // MMA event sources as it handles adding and removing players
-    aEventSource->SetGlobalVolume(globalVolume);
-    *aReturnHandle = reinterpret_cast <TInt>(foreground);
-}
-
-/*
- * Class:     com_nokia_microedition_volumekeys_ForegroundListener
- * Method:    _initialize
- * Signature: (ILjava/lang/Object;)I
- */
-JNIEXPORT jint JNICALL Java_com_nokia_microedition_volumekeys_ForegroundListener__1initialize
-(JNIEnv* aJni,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jobject aForegroundListener /*,
- jint aToolkitHandle*/)   // for xm-radio fix
-{
-    MMAFunctionServer* eventSource =
-    	reinterpret_cast< MMAFunctionServer *>(aEventSourceHandle);
-
-    jobject fgListenerObject = NULL;
-    fgListenerObject = aJni->NewWeakGlobalRef(aForegroundListener);
-
-    jclass foregroundListenerClass = aJni->GetObjectClass(fgListenerObject);
-
-    jmethodID javaMethod = aJni->GetMethodID(
-                               foregroundListenerClass,
-                               "update",
-                               "()V");
-
-    TInt foregroundHandle = NULL;
-
-    // xm-radio fix
-    /*
-    CMIDToolkit* ptoolkit = JavaUnhand< CMIDToolkit >(aToolkitHandle);
-*/
-    jint error = eventSource->ExecuteTrap(CreateForegroundL,
-                                          &foregroundHandle,
-                                          eventSource,
-                                          fgListenerObject,
-                                          javaMethod/*,
-                                          ptoolkit*/);  // xm-radio fix
-
-    if (error != KErrNone)
-    {
-        aJni->DeleteGlobalRef(fgListenerObject);
-    }
-
-    return (error != KErrNone) ? error : foregroundHandle;
-}
-
-/**
- * Static delegator function for setforeground
- * @param aCMMAForeground native class.
- * @param aIsForeground boolean is midlet foreground or not.
-
- */
-LOCAL_C void SetForeground(
-    CMMAForeground* aCMMAForeground,
-    TBool aIsForeground)
-{
-    aCMMAForeground->SetForeground(aIsForeground);
-}
-
-/*
-* Class:     com_nokia_microedition_volumekeys_ForegroundListener
-* Method:    _setForeground
-* Signature: (IZ)V
-*/
-JNIEXPORT void JNICALL Java_com_nokia_microedition_volumekeys_ForegroundListener__1setForeground
-(JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aForegroundHandle,
- jboolean aIsForeground)
-{
-    MMAFunctionServer* eventSource =
-        reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
-    CMMAForeground* nativeHandle =
-        reinterpret_cast<CMMAForeground*>(aForegroundHandle);
-
-    eventSource->ExecuteV(SetForeground,
-                          nativeHandle,
-                          (TBool) aIsForeground);
-}
-
-
-/*
-JNIEXPORT jboolean JNICALL Java_com_nokia_microedition_volumekeys_ForegroundListener__1isESWT
-(JNIEnv *, jobject)
-{
-
-
-    MSwtClient* client = NULL;
-    TRAP_IGNORE(client = SWT::CreateClientL());
-
-    if (!client)
-    {
-        return false; // LCDUI midlet running
-    }
-    else
-    {
-        delete client;
-        client = NULL;
-        return true;  // eSWT midlet running
-    }
-}
-
-*/
-//  END OF FILE
--- a/javauis/mmapi_qt/volumekeys/src/cmmaforeground.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Class is used to find out from java is midlet foreground or not
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <e32std.h>
-
-#include "cmmaforeground.h"
-#include "cmmaforegroundevent.h"
-//  INCLUDE FILES
-#include <logger.h>
-
-// xm-radio fix
-//#include "cmidenv.h"
-
-CMMAForeground* CMMAForeground::NewL(MMMAEventPoster* aEventPoster,
-                                     jobject aForegroundListener,
-                                     jmethodID aJavaMethod/* ,
-                                     CMIDToolkit* aToolkit*/)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAForeground::NewL + ");
-    CMMAForeground* self = new(ELeave) CMMAForeground;
-
-    CleanupStack::PushL(self);
-    self->ConstructL(aEventPoster, aForegroundListener, aJavaMethod/*, aToolkit*/);
-    CleanupStack::Pop();
-
-    LOG( EJavaMMAPI, EInfo, "CMMAForeground::NewL - ");
-    return self;
-}
-
-CMMAForeground::~CMMAForeground()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() + ");
-   /* if (iMidEnv)
-    {
-        // unregister for getting the foreground change event
-        LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() : iMidEnv RemoveObserver +");
-        iMidEnv->RemoveObserver(*this);
-        LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() : iMidEnv RemoveObserver -");
-    }
-
-    CEikonEnv* eikEnv = ((CEikonEnv*)CEikonEnv::Static());
-
-    if (eikEnv)
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() : eikEnv RemoveForegroundObserver +");
-        eikEnv->RemoveForegroundObserver(*this);
-        LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() : eikEnv RemoveForegroundObserver -");
-    }
-*/
-    if (iEventPoster && iDeleteRefEvent)
-    {
-        iEventPoster->PostEvent(iDeleteRefEvent);
-    }
-    else
-    {
-        delete iDeleteRefEvent;
-    }
-    delete iForegroundEvent;
-    delete iActiveScheduler;
-    LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() - ");
-}
-
-CMMAForeground::CMMAForeground()
-        : iIsForeground(ETrue) // Initialize IsForeground to true, we might have already missed the event (HandleForegroundL), events before observer registration
-{
-}
-
-void CMMAForeground::ConstructL(MMMAEventPoster* aEventPoster,
-                                jobject aForegroundListener,
-                                jmethodID aJavaMethod /* ,
-                                CMIDToolkit* aToolkit*/) // xm-radio fix
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAForeground::ConstructL + ISFOREGROUND = %d",iIsForeground);
-
-    iActiveScheduler = new(ELeave) CActiveSchedulerWait();
-    iEventPoster = aEventPoster;
-    iForegroundListener = aForegroundListener;
-    iJavaMethod = aJavaMethod;
-
-    iForegroundEvent = new(ELeave) CMMAForegroundEvent(
-        aForegroundListener,
-        aJavaMethod,
-        CMMAEvent::EReusableEvent);
-    iDeleteRefEvent = new(ELeave) CMMADeleteRefEvent(aForegroundListener);
-
-    // xm-radio fix
-    /*
-    iToolkit = aToolkit;
-
-    if (iToolkit)
-    {
-        DEBUG("CMMAForeground::ConstructL : iToolkit->Env(); +");
-        iMidEnv = iToolkit->Env();
-        DEBUG("CMMAForeground::ConstructL : iToolkit->Env(); -");
-    }
-
-    if (iMidEnv)
-    {
-        DEBUG("CMMAForeground::ConstructL : iMidEnv->AddObserverL + ");
-        // register for getting the foreground change event
-        iMidEnv->AddObserverL(*this);
-        DEBUG("CMMAForeground::ConstructL : iMidEnv->AddObserverL - ");
-    }
-
-    CEikonEnv* eikEnv = ((CEikonEnv*)CEikonEnv::Static());
-
-    if (eikEnv)
-    {
-        DEBUG("CMMAForeground::ConstructL - eikAppUi->AddForegroundObserverL() + ");
-        eikEnv->AddForegroundObserverL(*this);
-        DEBUG("CMMAForeground::ConstructL - eikAppUi->AddForegroundObserverL() - ");
-    }
- */
-    LOG( EJavaMMAPI, EInfo, "CMMAForeground::ConstructL - ");
-}
-
-TBool CMMAForeground::IsForeground()
-{
-    LOG2( EJavaMMAPI, EInfo, "THREADID = %d : CMMAForeground::IsForeground : ISFOREGROUND = %d",RThread().Id().Id(),iIsForeground);
-    return iIsForeground;
-}
-
-void CMMAForeground::SetForeground(TBool aIsForeground)
-{
-    iIsForeground = aIsForeground;
-    LOG1( EJavaMMAPI, EInfo, "CMMAForeground::SetForeground - ISFOREGROUND = %d",iIsForeground);
-}
-
-// Implement MMIDEnvObserver
-/*
-void CMMAForeground::HandleSwitchOnL(TBool aSwitchOn)
-{
-    // Dummy implementation, no intent to do anything
-}
-*/
-/**
- * Handles the case when the MIDlet is brought to the foreground.
- */
- /*
-void CMMAForeground::HandleForegroundL(TBool aForeground)
-{
-    LOG1( EJavaMMAPI, EInfo, "CMMAForeground::HandleForegroundL %d", aForeground);
-    iIsForeground = aForeground;
-}
-*/
-/**
- * Handles a change to resources which are shared accross the environment.
- */
-/*void CMMAForeground::HandleResourceChangeL(TInt aType)
-{
-    // Dummy implementation, no intent to do anything
-}
-*/
-// Handles the application coming to the foreground.
-void CMMAForeground::HandleGainingForeground()
-{
-    iIsForeground = ETrue;
-}
-
-// Handles the application going into the background.
-void CMMAForeground::HandleLosingForeground()
-{
-    iIsForeground = EFalse;
-}
-//  End of File
--- a/javauis/mmapi_qt/volumekeys/src/cmmaforegroundevent.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used to post events to the java.
-*
-*/
-
-
-//  INCLUDE FILES
-#include <logger.h>
-
-#include "cmmaforegroundevent.h"
-
-CMMAForegroundEvent::CMMAForegroundEvent(jobject aNotifyObject,
-        jmethodID aHandleEventMethod,
-        TDisposability aDisposable):
-        CMMAEvent(aNotifyObject, aHandleEventMethod, aDisposable)
-{
-
-}
-
-void CMMAForegroundEvent::Dispatch(JNIEnv& aJni)
-{
-    aJni.CallVoidMethod(iListenerObject,
-                        iHandleEventMethod);
-}
-
-//  END OF FILE
--- a/javauis/mmapi_qt/volumekeys/src/cmmaglobalvolume.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class is used for global volume
-*
-*/
-
-
-// CLASS HEADER
-#include "cmmaglobalvolume.h"
-
-// INTERNAL INCLUDES
-#include "cmmaplayer.h"
-#include "cmmaforeground.h"
-#include "cmmavolumekeyslistener.h"
-#include "mmaprivatecrkeys.h"
-
-// EXTERNAL INCLUDES
-#include <centralrepository.h>
-#include <logger.h>
-
-// UNNAMED LOCAL NAMESPACE
-namespace
-{
-// Volume level step size
-const TInt KMMAVolumeLevelStep = 10;
-// Error when setting new volume level for a control
-_LIT(KMMAGlobalVolumeSetError, "Can't set volume level");
-}
-
-
-// ============================ MEMBER FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::NewL
-// ---------------------------------------------------------------------------
-//
-CMMAGlobalVolume* CMMAGlobalVolume::NewL(CMMAForeground* aForeground)
-{
-    CMMAGlobalVolume* self = new(ELeave) CMMAGlobalVolume(aForeground);
-    CleanupStack::PushL(self);
-    self->ConstructL();
-    CleanupStack::Pop(self);
-    return self;
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::~CMMAGlobalVolume
-// ---------------------------------------------------------------------------
-//
-CMMAGlobalVolume::~CMMAGlobalVolume()
-{
-    delete iVolumeKeysListener;
-    //delete iSettingsStore;
-    delete iForeground;
-    iControlList.Close();
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::AddPlayerL
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::AddPlayerL(CMMAPlayer* aPlayer)
-{
-    // Find if the player has a volume control
-    CMMAVolumeControl* control = FindVolumeControl(aPlayer);
-
-    // Ignore adding new player if it does not support volume control
-    if (control)
-    {
-        TMMAPlayerHolder playerHolder;
-        // Create new volume control and level index pair
-        playerHolder.iVolumeControl = control;
-        playerHolder.iVolumeIndex = control->AddLevelL();
-        playerHolder.iPlayer = aPlayer;
-        // Set current volume level for the control
-        control->SetVolumeLevelL(playerHolder.iVolumeIndex, iLevel);
-        // Add created pair to the control list
-        iControlList.AppendL(playerHolder);
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::RemovePlayer
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::RemovePlayer(CMMAPlayer* aPlayer)
-{
-    // Find if the player has a volume control
-    CMMAVolumeControl* control = FindVolumeControl(aPlayer);
-
-    // Ignore adding new player if it does not support volume control
-    if (control)
-    {
-        // Check that if this type of volume control can be found from
-        // the control list and remove it
-        TInt count(iControlList.Count());
-        for (TInt i(0); i < count; i++)
-        {
-            const TMMAPlayerHolder& holder = iControlList[ i ];
-            if (control == holder.iVolumeControl)
-            {
-                iControlList.Remove(i);
-                break;
-            }
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::VolumeUp
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::VolumeUp()
-{
-    LOG1( EJavaMMAPI, EInfo, "THREADID = %d : CMMAGlobalVolume: VolumeUp: +", RThread().Id().Id());
-    // Adjust volume if midlet is in foreground and the volume level value
-    // is not too high, in this case it cannot be set over KMMAVolumeMaxLevel
-    if (iForeground->IsForeground() && (iLevel < KMMAVolumeMaxLevel))
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAGlobalVolume: VolumeUp: Volume up");
-        // Check that the current volume level is not increased too much
-        TInt level =
-            iLevel > (KMMAVolumeMaxLevel - KMMAVolumeLevelStep) ?
-            KMMAVolumeMaxLevel - iLevel : iLevel + KMMAVolumeLevelStep;
-        // Increase level by new value
-        SetControlVolumeLevels(level);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAGlobalVolume: VolumeUp: -");
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::VolumeDown
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::VolumeDown()
-{
-    LOG1( EJavaMMAPI, EInfo, "THREADID = %d : CMMAGlobalVolume: VolumeDown: +", RThread().Id().Id());
-    // Adjust volume if midlet is in foreground and the volume value
-    // is not too low, in this case it cannot be set under zero
-    if (iForeground->IsForeground() && (iLevel > 0))
-    {
-        LOG( EJavaMMAPI, EInfo, "CMMAGlobalVolume: VolumeDown: Volume down");
-        // Check that the currnet volume level is not decreased too much
-        TInt level =
-            iLevel < KMMAVolumeLevelStep ?
-            0 : iLevel - KMMAVolumeLevelStep;
-        // Decrease level by new value
-        SetControlVolumeLevels(level);
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAGlobalVolume: VolumeDown: -");
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::FindVolumeControl
-// ---------------------------------------------------------------------------
-//
-CMMAVolumeControl* CMMAGlobalVolume::FindVolumeControl(CMMAPlayer* aPlayer)
-{
-    TInt count(aPlayer->ControlCount());
-    for (TInt i(0); i < count; i++)
-    {
-        CMMAControl* control = aPlayer->Control(i);
-        // Check that if this control supports volume control
-        if (control->ClassName() == KMMAVolumeControlName)
-        {
-            return static_cast< CMMAVolumeControl* >(control);
-        }
-    }
-    // Does not support volume control
-    return NULL;
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::SetControlVolumeLevels
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::SetControlVolumeLevels(TInt aLevel)
-{
-    TInt count(iControlList.Count());
-    // Adjust volume for all current volume controls associated
-    for (TInt i(0); i < count; i++)
-    {
-        const TMMAPlayerHolder& hdr = iControlList[ i ];
-        // Set new volume level for this control
-        TRAPD(error,
-              hdr.iVolumeControl->SetVolumeLevelL(hdr.iVolumeIndex, aLevel));
-        if (error != KErrNone)
-        {
-            hdr.iPlayer->PostStringEvent(
-                CMMAPlayerEvent::EError,
-                KMMAGlobalVolumeSetError());
-        }
-    }
-
-    iLevel = aLevel;
-    LOG1( EJavaMMAPI, EInfo, 
-        "CMMAGlobalVolume::SetControlVolumeLevels - iLevel = %d", iLevel);
-
-    // Store new volume to MMA global settings. Error cannot be reported
-    // in any sophisticated way so we just have to ignore it. Debug builds
-    // may panic in this case
-    TInt error = iSettingsStore->Set(KMobileMediaVolumeLevel, aLevel);
-    __ASSERT_DEBUG(error == KErrNone, User::Invariant());
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::CMMAGlobalVolume
-// ---------------------------------------------------------------------------
-//
-CMMAGlobalVolume::CMMAGlobalVolume(CMMAForeground* aForeground) :
-        iLevel(KMMAVolumeMaxLevel),
-        iForeground(aForeground)
-{
-}
-
-// ---------------------------------------------------------------------------
-// CMMAGlobalVolume::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CMMAGlobalVolume::ConstructL()
-{
-    iVolumeKeysListener = CMMAVolumeKeysListener::NewL(this);
-    // TO-DO remove TRAP_IGNORE
-   // TRAP_IGNORE(err,iSettingsStore = CRepository::NewL(KCRUidMobileMedia));
-
-    // Get level from the settings store
-    //User::LeaveIfError(iSettingsStore->Get(KMobileMediaVolumeLevel, iLevel));
-}
-
-// End of file
--- a/javauis/mmapi_qt/volumekeys/src/cmmavolumekeyslistener.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles the volume keysupdate events
-*
-*/
-
-
-// INCLUDE FILES
-/*#include <remconcoreapitarget.h>
-#include <remconcoreapitargetobserver.h>
-#include <remconinterfaceselector.h>
-*/
-//#include <aknconsts.h>
-#include <logger.h>
-
-#include "cmmavolumekeyslistener.h"
-
-// CONSTANTS
-
-// Keyboard delays and repeat periods
-//const TInt KFirstTimerExpiryInterval = KAknKeyboardRepeatInitialDelay;
-// For second time onwards ,the duration of the time interval, is below
-// Should not be greater than 1 Minute
-// const TInt KTimerExpiryInterval = KAknStandardKeyboardRepeatRate;
-
-CMMAVolumeKeysListener* CMMAVolumeKeysListener::NewL(MMMAVolumeKeysListener* aListener)
-{
-    CMMAVolumeKeysListener* self = new(ELeave) CMMAVolumeKeysListener();
-    CleanupStack::PushL(self);
-    self->ConstructL(aListener);
-    CleanupStack::Pop();
-    return self;
-}
-
-CMMAVolumeKeysListener::~CMMAVolumeKeysListener()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::~CMMAVolumeKeysListener() +");
-   /* if ((NULL != iJavaRemConObserver) && (NULL != iJavaRemConManager))
-    {
-        iJavaRemConManager->RemoveObserver(*iJavaRemConObserver);
-    }
-
-    if (NULL != iJavaRemConObserver)
-    {
-        delete iJavaRemConObserver;
-        iJavaRemConObserver = NULL;
-    }
-
-    if (NULL != iJavaRemConManager)
-    {
-        delete iJavaRemConManager;
-        iJavaRemConManager = NULL;
-    }
-*/
-    if (NULL != iTimer)
-    {
-        iTimer->Cancel();
-        delete iTimer;
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::~CMMAVolumeKeysListener() -");
-}
-
-CMMAVolumeKeysListener::CMMAVolumeKeysListener()
-{
-}
-
-void CMMAVolumeKeysListener::ConstructL(MMMAVolumeKeysListener* aListener)
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::ConstructL +");
-    /*iJavaRemConObserver = CJavaRemConObserver::NewL(*this);
-    iJavaRemConManager = CJavaRemConManager::NewL();
-    iJavaRemConManager->SetObserverL(*iJavaRemConObserver);
-*/
-    // Timer for implementing Pressed/Released/Clicked feature.
-    iTimer = CPeriodic::NewL(CActive::EPriorityStandard);
-
-    iListener = aListener;
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::ConstructL -");
-}
-
-/*
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoPlay()
-// Called when Play button is pressed/clicked/released
-// ----------------------------------------------------------------------------
-void CMMAVolumeKeysListener::MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-}
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoCommand()
-// This function receives the events when following buttons are press/click/rel
-// - Volume Up , Volume Down
-// ----------------------------------------------------------------------------
-void CMMAVolumeKeysListener::MrccatoCommand(TRemConCoreApiOperationId aOperationId,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-    switch (aOperationId)
-    {
-    case ERemConCoreApiVolumeUp:
-    {
-        iUp = ETrue;
-        switch (aButtonAct)
-        {
-        case ERemConCoreApiButtonPress:
-        {
-            // Start Timer
-            if (!iTimer->IsActive())
-            {
-                // Start Timer
-                iTimer->Start(KFirstTimerExpiryInterval,
-                              KTimerExpiryInterval,
-                              TCallBack(TimerCallback, this));
-            }
-            break;
-        }
-        case ERemConCoreApiButtonRelease:
-        {
-            if (iTimer->IsActive())
-            {
-                iTimer->Cancel();
-            }
-            break;
-        }
-        case ERemConCoreApiButtonClick:
-        {
-            iListener->VolumeUp();
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        }
-        break;
-    }
-    case ERemConCoreApiVolumeDown:
-    {
-        iUp = EFalse;
-        switch (aButtonAct)
-        {
-        case ERemConCoreApiButtonPress:
-        {
-            // Start Timer
-            if (!iTimer->IsActive())
-            {
-                // Start Timer
-                iTimer->Start(KFirstTimerExpiryInterval,
-                              KTimerExpiryInterval,
-                              TCallBack(TimerCallback, this));
-            }
-            break;
-        }
-        case ERemConCoreApiButtonRelease:
-        {
-            if (iTimer->IsActive())
-            {
-                iTimer->Cancel();
-            }
-            break;
-        }
-        case ERemConCoreApiButtonClick:
-        {
-            iListener->VolumeDown();
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        }
-        break;
-    }
-    default:
-    {
-        break;
-    }
-    }
-}
-
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoTuneFunction()
-//
-// ----------------------------------------------------------------------------
-
-void CMMAVolumeKeysListener::MrccatoTuneFunction(TBool aTwoPart,
-        TUint aMajorChannel,
-        TUint aMinorChannel,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-}
-
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoSelectDiskFunction()
-//
-// ----------------------------------------------------------------------------
-void CMMAVolumeKeysListener::MrccatoSelectDiskFunction(TUint aDisk,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-}
-
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoSelectAvInputFunction()
-//
-// ----------------------------------------------------------------------------
-void CMMAVolumeKeysListener::MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-}
-
-// ----------------------------------------------------------------------------
-// void CMMAVolumeKeysListener::MrccatoSelectAudioInputFunction()
-//
-// ----------------------------------------------------------------------------
-void CMMAVolumeKeysListener::MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber,
-        TRemConCoreApiButtonAction aButtonAct)
-{
-}
-
-*/
-// -----------------------------------------------------------------------
-// CMMAVolumeKeysListener::HandleTimerEvent
-// Description: When Timer is expired, this function is called from
-//              callback function.
-// return :
-// -----------------------------------------------------------------------
-//
-void CMMAVolumeKeysListener::HandleTimerEvent()
-{
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::HandleTimerEvent +");
-    if (iUp)
-    {
-        iListener->VolumeUp();
-    }
-    else
-    {
-        iListener->VolumeDown();
-    }
-    LOG( EJavaMMAPI, EInfo, "CMMAVolumeKeysListener::HandleTimerEvent -");
-}
-
-// -----------------------------------------------------------------------
-// CMMAVolumeKeysListener::TimerCallback
-// Description: When Timer is expired, this function is called
-// return :
-// -----------------------------------------------------------------------
-//
-TInt CMMAVolumeKeysListener::TimerCallback(TAny* aThis)
-{
-    CMMAVolumeKeysListener* listener =
-        static_cast< CMMAVolumeKeysListener* >(aThis);
-    listener->HandleTimerEvent();
-    return 0;
-}
-
-//  End of File
--- a/javauis/nokiasound_akn/build/javanokiasound_0x2002DCC4.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/nokiasound_akn/build/javanokiasound_0x2002DCC4.mmp	Tue May 25 12:34:19 2010 +0300
@@ -82,6 +82,18 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -102,10 +114,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/nokiauiapi_qt/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
--->
-
-<project name="javanokiaui" default="deploy" basedir=".">
-
-    <description>
-        Builds Nokiauiapi
-    </description>
-
-    <import file="../../../build/utilities.xml"/>
-
-    <!-- Needed by the utilities.xml. See the description form the utilities.xml
-         file -->
-
-    <property name="java.src.paths" value="../src:../src_j2me"/>
-
-    <target name="compile">
-        <omj.javac classpath="${impl.cldc.jar}"/>
-    </target>
-
-    <property name="javah.classnames" value="com.nokia.mid.ui.internal.OS"/>
-
-    <target name="create.public.api.jar">
-         <omj.public.apis includes="com/nokia/mid/ui/TactileFeedback.class, 
-                                    com/nokia/mid/ui/DeviceControl.class"/>
-    </target>
-
-
-</project>
--- a/javauis/nokiauiapi_qt/build/bwins/javanokiauiu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-
--- a/javauis/nokiauiapi_qt/build/eabi/javanokiauiu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z10jni_lookupPKc @ 1 NONAME
-
--- a/javauis/nokiauiapi_qt/build/nokiauiapiqt.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE=lib
-TARGET=javanokiaui
-CONFIG += omj java
-
-
-QT += core
-
-
-symbian {
-    
-
-    include(../library/nokiauiapi.pri)
-    
-    LIBS += -lcone
-    LIBS += -ltouchfeedback
-
-    
-}
-
-include(../../../build/omj.pri)
-
-
-
-
-
-
-
-
--- a/javauis/nokiauiapi_qt/library/nokiauiapi.pri	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-
-INCLUDEPATH += $$PWD
-DEPENDPATH += $$PWD
-
-SOURCES += os.cpp 
-
--- a/javauis/nokiauiapi_qt/library/os.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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:  This main entry point of Java processes.
-*
-*/
-
-
-
-#include <QWidget>
-#include <coecntrl.h>
-#include <touchfeedback.h>
-#include <com_nokia_mid_ui_internal_OS.h>
-
-static CCoeControl* convertToSymbian(QWidget* window)
-{
-    CCoeControl* control = 0;
-    if (window && window->winId())
-    {
-        control = reinterpret_cast<CCoeControl*>(window->winId());
-    }
-    return control;
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1InstantFeedback
-(JNIEnv *, jclass, jint aStyle)
-{
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        feedback->InstantFeedback(static_cast<TTouchLogicalFeedback>(aStyle));
-    }
-}
-
-JNIEXPORT jboolean JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1TouchFeedbackSupported
-(JNIEnv *, jclass)
-{
-    jboolean enabled = JNI_FALSE;
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        enabled = feedback->TouchFeedbackSupported() ? JNI_TRUE : JNI_FALSE;
-    }
-    return enabled;
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1SetFeedbackArea
-(JNIEnv *, jclass, jint aControl, jint aAreaIndex, jint aX, jint aY, jint aWidth, jint aHeight, jint aStyle)
-{
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        CCoeControl* control = convertToSymbian(reinterpret_cast<QWidget*>(aControl));
-        TRect feedbackRect(aX, aY, aX + aWidth, aY + aHeight);
-        feedback->SetFeedbackArea(control,
-                                  static_cast<TUint32>(aAreaIndex),
-                                  feedbackRect,
-                                  static_cast<TTouchLogicalFeedback>(aStyle),
-                                  ETouchEventStylusDown);
-    }
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1RemoveFeedbackArea
-(JNIEnv *, jclass, jint aControl, jint aAreaIndex)
-{
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        CCoeControl* control = convertToSymbian(reinterpret_cast<QWidget*>(aControl));
-        feedback->RemoveFeedbackArea(control, aAreaIndex);
-    }
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1RemoveFeedbackForControl
-(JNIEnv *, jclass, jint aControl)
-{
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        CCoeControl* control = convertToSymbian(reinterpret_cast<QWidget*>(aControl));
-        feedback->RemoveFeedbackForControl(control);
-    }
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mid_ui_internal_OS_MTouchFeedback_1MoveFeedbackAreaToFirstPriority
-(JNIEnv *, jclass, jint aControl, jint aAreaIndex)
-{
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if (feedback)
-    {
-        CCoeControl* control = convertToSymbian(reinterpret_cast<QWidget*>(aControl));
-        feedback->MoveFeedbackAreaToFirstPriority(control, static_cast<TUint32>(aAreaIndex));
-    }
-}
-
-
-
--- a/javauis/nokiauiapi_qt/src/com/nokia/mid/ui/DeviceControl.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Provides methods for controlling vibrator and screen backlight.
-*
-*/
-
-
-package com.nokia.mid.ui;
-
-import org.eclipse.swt.internal.qt.OS;
-import org.eclipse.swt.widgets.Internal_PackageSupport;
-import org.eclipse.swt.internal.extension.DisplayExtension;
-
-/**
- * <p>
- * DeviceControl provides a collection of methods to control some of the special
- * features available in mobile devices, e.g., vibrator, screen (LCD)
- * backlight, and screen saver appearance.
- * <p>
- * This class is thread safe.
- * @version 1.0
- * @since 1.0
- */
-
-public class DeviceControl
-{
-    // error string for negative duration
-    private static final String ERR_NEGATIVE_DURATION_STRING =
-        "Negative duration";
-    private static int inactivityTime;
-    private static int vibraDuration;
-    private static boolean vibraSupported;
-
-    /**
-     * Private constructor. This class can't be instantiated.
-     */
-    private DeviceControl()
-    {
-    }
-    /**
-     * Function return the time since the last user activity in seconds.
-     * @since 1.4
-     */
-    public static int getUserInactivityTime()
-    {
-        synchronized (DeviceControl.class)
-        {
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        inactivityTime = OS.MobileDevice_getUserInactivityTime(
-                                             Internal_PackageSupport.initializeMobileDevice(
-                                                 Internal_PackageSupport.getDisplayInstance()));
-                    }
-                });
-            }
-        }
-        return inactivityTime;
-    }
-    /**
-     *  Function reset user inactivity time. Thus, if the screen saver should be
-     *  wholly disabled, it is needed to call the function repeatedly for example in a
-     *  separate thread. The delay between two calls should be smaller than
-     *  the time-out of the screensaver (the time-out may be for example 15 seconds
-     *  or more depending on the used device).
-     *  @since 1.4
-     */
-    public static void resetUserInactivityTime()
-    {
-        synchronized (DeviceControl.class)
-        {
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        OS.MobileDevice_resetUserInactivityTime(
-                            Internal_PackageSupport.initializeMobileDevice(
-                                Internal_PackageSupport.getDisplayInstance()));
-                    }
-                });
-            }
-        }
-    }
-
-    /**
-     *  Activates and deactivates lights on the device; the function
-     *  can also be used for preventing screen saver appearance. Parameter
-     *  num indicates the number of the device light to control.
-     *  Currently only one num parameter is specified:
-     *  num value 0 is used for controlling the screen backlight.
-     *  Parameter level is a value between 0-100
-     *  indicating the light brightness. In many implementations
-     *  there in only two levels: lights on and off. Value 0 indicates
-     *  a setting for lights off (monochrome displays) or other
-     *  minimum brightness setting (color displays), all other level
-     *  values (1-100) are used for setting the lights on, possibly
-     *  with different brightness levels depending on the value. A more
-     *  higher level value always results either the same brightness setting
-     *  as a lower one, or a more brighter setting. For many products
-     *  passing values 1-100 will just turn the lights on.
-     *  <p>
-     *  Note: Since in some devices key presses may turn on some device lights,
-     *  the light settings may be changed also by the system.
-     *  <p>
-     *  This function may also be used to prevent screen saver appearance
-     *  (supported in S60 devices starting from S60 3rd Ed FP1,
-     *  except for some early FP1 devices). Calling this function once
-     *  will delay the screen saver appearance but does not disable it permanently.
-     *  Thus, if the screen saver should be wholly disabled,
-     *  it is needed to call the function repeatedly for example in a
-     *  separate thread. The delay between two calls should be smaller than
-     *  the time-out of the screensaver (the time-out may be for example 15 seconds
-     *  or more depending on the used device).
-     *
-     *  @param num is the number or id for light, 0 is used for display
-     *  backlight, other numbers are currently left unspecified
-     *  @param level the lighting level 0-100. 0 means "off" or other
-     *  minimum lighting setting. For many devices greater
-     *  than 0 value just means "light on".
-     *  @throws java.lang.IllegalArgumentException if light num is not
-     *  supported or level is not between 0-100.
-     *  @since 1.0
-     */
-    public static void setLights(int aNum, int aLevel)
-    {
-        synchronized (DeviceControl.class)
-        {
-            if (aNum != 0)
-            {
-                throw new IllegalArgumentException("Light num is not supported");
-            }
-            if (aLevel < 0 || aLevel > 100)
-            {
-                throw(new IllegalArgumentException("Level not between 0 and 100"));
-            }
-            final int level = aLevel;
-
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        OS.MobileDevice_setLight(Internal_PackageSupport.initializeMobileDevice(
-                                                     Internal_PackageSupport.getDisplayInstance()), level);
-                    }
-                });
-            }
-        }
-    }
-
-    /**
-     *  Does flashing lights effect for specific duration.
-     *  This is a generic method for doing implementation specific light
-     *  flashing effect. This could be used as feedback e.g. in games.
-     *  If the device is not capable of doing the effect the method call
-     *  silently returns. In most devices there is at least screen backlight
-     *  and different LEDs that could be used for the effect. There might
-     *  be maximum limit in implementation for the duration: implementation
-     *  stops automatically the effect after maximum duration is reached.
-     *  When the flashing lights effect ends the implementation sets the
-     *  lights back to the light state the device was before the
-     *  method call.
-     *
-     *  @param duration duration in milliseconds the effect should be
-     *  active
-     *  @throws java.lang.IllegalArgumentException if duration < 0
-     *  @since 1.0
-     */
-    public static void flashLights(long aDuration)
-    {
-        synchronized (DeviceControl.class)
-        {
-            if (aDuration < 0)
-            {
-                throw new IllegalArgumentException(ERR_NEGATIVE_DURATION_STRING);
-            }
-
-            final int duration;
-            if (aDuration > java.lang.Integer.MAX_VALUE)
-            {
-                duration = java.lang.Integer.MAX_VALUE;
-            }
-            else
-            {
-                duration =(int)aDuration;
-            }
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        OS.MobileDevice_flashLights(
-                            Internal_PackageSupport.initializeMobileDevice(
-                                Internal_PackageSupport.getDisplayInstance()),duration);
-                    }
-                });
-            }
-        }
-
-    }
-
-    /**
-     *  Activates the vibra device with given duration and frequency.
-     *  Device vibra feedback can be used, for example, as tactile feedback
-     *  effect e.g. in games. The frequency of the vibra device
-     *  can be controlled with freq parameter. The frequency is a logical
-     *  number between 0 to 100, value 100 being the maximum frequency,
-     *  value 0 always means no vibra, value 1 always needs to give some
-     *  effect. If a device doesn't support different frequencies then
-     *  the just frequency allowed by device is used.
-     *  <p>
-     *  Parameter duration is used to indicate duration of vibra
-     *  in milliseconds. Method won't block for the vibra operation.
-     *  There is some maximum limit in implementation for the
-     *  duration. Duration values that exceed this limit result a
-     *  maximum vibration effect.
-     *  <p>
-     *  If the method is called during a previous vibra operation activated
-     *  from this method, the previous vibra operation is stopped and the new
-     *  vibra device is activated with the new given parameters.
-     *  <p>
-     *  IllegalStateException will be thrown if the freq is not 0 and
-     *  if device doesn't allow vibra to be used, for example,
-     *  it is common that when the device is being charged in desk stand or
-     *  there is incoming call that vibra operation is not allowed.
-     *  IllegalStateException will be thrown if there
-     *  is no vibra capability in the device.
-     *  <p>
-     *  Note that if the frequency is 0, and the device doesn't have vibra
-     *  capability IllegalStateException is thrown. This means that method
-     *  call <code>DeviceControl.doVibra(0,0);</code> can be used to detect
-     *  whether vibra is supported (IllegalStateException not thrown)
-     *  or not (IllegalStateException thrown) without any vibra operation
-     *  being done even if it is supported.
-     *  @param freq the frequency of the vibra device. Value 0 can be used
-     *  for detection whether there is vibra device or not. 100 means
-     *  maximum frequency value of specific system. Value 1 must always
-     *  result a minimum non-zero vibra operation.
-     *  @param duration in milliseconds the duration the vibra device is
-     *  active
-     *  @throws java.lang.IllegalStateException For freq values 1-100:
-     *  the use of vibra device isn't allowed or the system doesn't have
-     *  vibra device. For frequency value 0: the device doesn't have vibra
-     *  device.
-     *  @throws java.lang.IllegalArgumentException if duration or freq is
-     *  < 0, or freq is > 100.
-     *  @since 1.0
-     */
-    public static void startVibra(int aFreq, long aDuration)
-    {
-        synchronized (DeviceControl.class)
-        {
-            if ((aFreq < 0) || (aFreq > 100) || (aDuration < 0))
-            {
-                throw new java.lang.IllegalArgumentException();
-
-            }
-            vibraDuration = (int)aDuration;
-            if (aDuration > java.lang.Integer.MAX_VALUE)
-            {
-                vibraDuration = java.lang.Integer.MAX_VALUE;
-            }
-            if (aFreq == 0)
-            {
-                // frequency 0 disables vibration
-                vibraDuration = 0;
-            }
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        vibraSupported = OS.MobileDevice_vibration(
-                                             Internal_PackageSupport.initializeMobileDevice(
-                                                 Internal_PackageSupport.getDisplayInstance()),vibraDuration);
-                    }
-                });
-            }
-            if (!vibraSupported)
-            {
-                throw new java.lang.IllegalStateException();
-            }
-        }
-    }
-
-    /**
-     *  Stops the vibra device. This method is for manually stopping vibra
-     *  operation activated with
-     *  {@link DeviceControl#startVibra(int freq, long duration)}
-     *  method.
-     *  If the vibra device is not active the method silently returns.
-     *  @since 1.0
-     */
-    public static void stopVibra()
-    {
-        synchronized (DeviceControl.class)
-        {
-            if (DisplayExtension.getDisplayInstance() != null)
-            {
-                Internal_PackageSupport.getDisplayInstance().syncExec(new Runnable()
-                {
-                    public void run()
-                    {
-                        vibraSupported = OS.MobileDevice_vibration(
-                                             Internal_PackageSupport.initializeMobileDevice(
-                                                 Internal_PackageSupport.getDisplayInstance()),0);
-                    }
-                });
-            }
-        }
-    }
-
-}
-
-
--- a/javauis/nokiauiapi_qt/src_j2me/com/nokia/mid/ui/TactileFeedback.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +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:
-*
-*/
-
-package com.nokia.mid.ui;
-
-import org.eclipse.swt.widgets.Internal_PackageSupport;
-import com.nokia.mid.ui.internal.OS;
-
-;
-
-/**
- * This class is a Java extension to support tactile feedback (audio, vibra,
- * piezo, etc.) on touch-enabled devices. Tactile feedback is meant to give user
- * more clear feeling of touch events, like tapping and dragging. The actual
- * physical tactile feedback depends on the device tactile feedback
- * implementation, hardware and device settings. A device may implement the
- * feedback with different hardware methods, for example, vibra, audio or piezo
- * hardware.
- * <p>
- * The API supports both LCDUI and eSWT UI toolkits.
- * <p>
- * Using this class is safe when a device does not support tactile feedback. In
- * this case methods of this class can be called but this has no effect.
- * <p>
- * Tactile feedback can be generated in two ways:
- * <ul>
- * <li>By producing direct feedback from the application.</li>
- * <li>By adding feedback areas to area registry, in which case the feedback
- * will be produced by the tactile feedback system automatically when the
- * defined screen area (with defined feedback) is touched.</li>
- * </ul>
- * <p>
- * Direct feedback is given instantly with {@link #directFeedback
- * directFeedback} specifying the feedback type. Direct feedback can be used
- * when the user action is not just a tap in a certain area. For example if the
- * user drags from one menu item to the other the application may give direct
- * feedback to emphasize focus traverse.
- * <p>
- * In case of area registry for eSWT Control, the registry needs to be updated
- * every time when the size or position of a UI component changes, or when e.g.
- * a state of a UI component changes in such way that feedback type also
- * changes. Typically the area update may be implemented in
- * <code>controlMoved</code> and <code>controlResized</code> methods of
- * <code>ControlListener</code> interface.
- * <p>
- * In case of area registry for LCDUI Canvas or CustomItem no further actions
- * are required to update tactile feedback areas when a CustomItem is moved in a
- * Form or when a Canvas is changed due to e.g. orientation switch.
- * <p>
- * There are quite tight latency requirements for tactile feedback, and in most
- * cases feedback should be triggered in less than 30ms from the time when user
- * touched the screen. For the area registry the feedback system is responsible
- * of fulfilling this requirement, but in case of direct feedback it is the
- * responsibility of the user of this API.
- * <p>
- * The tactile feedback has 2 different styles: Basic and Sensitive. Each type
- * is defined in the device settings, not by this API. Each style of feedback is
- * used in different cases. Typically Basic style is used to emphasize the tap
- * event, while Sensitive style is used mostly at dragging operations, to
- * emphasize focus traverse, text selection, etc. Choosing a specific style for
- * each use case in up to developer, however it is good to follow the behavior
- * of native applications.
- * <p>
- * The goal of the API is to enable user-created UI components to have tactile
- * feedback. The UI component types supported by the API are limited to
- * user-defined components only: <code>javax.microedition.lcdui.Canvas</code>,
- * <code>javax.microedition.lcdui.CustomItem</code>,
- * <code>org.eclipse.swt.widgets.Control</code>. Other UI components (i.e. List,
- * TextBox, etc.) get default tactile feedback automatically from the platform.
- *
- * @version 0.001
- * @since 1.2
- */
-
-public class TactileFeedback
-{
-
-    /**
-     * Constant for specifying basic tactile feedback style. Actual style
-     * behaviour is set through device settings.
-     */
-    public static final int FEEDBACK_STYLE_BASIC = 1;
-
-    /**
-     * Constant for specifying sensitive tactile feedback style. Actual style
-     * behaviour is set through device settings.
-     */
-    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 int TYPE_INVALID = 0;
-    private static final int TYPE_ESWT = 1;
-    private static final int TYPE_LCDUI = 2;
-    private static boolean feedbackEnabled;
-
-    /**
-     * Constructs tactile feedback engine object. The object may be used in both
-     * LCDUI and eSWT java UI toolkits. TactileFeedback object must be
-     * constructed before using any tactile feedback methods.
-     */
-    public TactileFeedback()
-    {
-    }
-
-    /**
-     * Triggers direct tactile feedback of the specified style.
-     *
-     * @param style
-     *            The style of the direct feedback. Use predefined values
-     *            FEEDBACK_STYLE_BASIC, FEEDBACK_STYLE_SENSITIVE. Actual style
-     *            behavior is set through device settings.
-     * @throws IllegalArgumentException
-     *             if the style parameter has invalid type.
-     */
-    public void directFeedback(int style) throws IllegalArgumentException
-    {
-        if ((style != FEEDBACK_STYLE_BASIC)
-                && (style != FEEDBACK_STYLE_SENSITIVE))
-            throw new IllegalArgumentException(invalidFeedbackStyleMsg);
-        if (org.eclipse.swt.widgets.Display.getCurrent() == null)
-        {
-            final int fStyle = style;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-                public void run()
-                {
-                    OS.MTouchFeedback_InstantFeedback(fStyle);
-                }
-            });
-
-        }
-        else
-        {
-            OS.MTouchFeedback_InstantFeedback(style);
-        }
-    }
-
-    /**
-     * Queries the device if it supports tactile feedback. It is safe to use
-     * this class even if the device does not support tactile feedback. Methods
-     * of this class can be called but this has no effect.
-     *
-     * @return true if the device supports tactile feedback, false otherwise.
-     */
-    public boolean isTouchFeedbackSupported()
-    {
-        if (org.eclipse.swt.widgets.Display.getCurrent() == null)
-        {
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    feedbackEnabled = OS
-                                      .MTouchFeedback_TouchFeedbackSupported();
-                }
-            });
-        }
-        else
-        {
-            feedbackEnabled = OS.MTouchFeedback_TouchFeedbackSupported();
-        }
-        return feedbackEnabled;
-    }
-
-    /**
-     * Registers area within a UI component for tactile feedback. If areas
-     * overlap then the feedback is given from the last registered area.
-     * {@link #moveFeedbackAreaToFirstPriority moveFeedbackAreaToFirstPriority}
-     * can be used to bring a certain area covered by another area into action.
-     * If an area with specified <code>id</code> is already registered it is
-     * updated. When updating an existing area there is no need to unregister it
-     * before re-registering again with new coordinates and/or feedback style.
-     * The area specified by <code>x</code>, <code>y</code>, <code>width</code>
-     * and <code>height</code> parameters may be located on the screen just
-     * partially.
-     *
-     * <p>
-     * In case of area registry for eSWT Control, the registry needs to be
-     * updated every time when the size or position of a UI component changes,
-     * or when e.g. a state of a UI component changes in such way that feedback
-     * type also changes. Typically the area update may be implemented in
-     * <code>controlMoved</code> and <code>controlResized</code> methods of
-     * <code>ControlListener</code> interface. The update of an area may be
-     * implemented by calling registerFeedbackArea with the same area id but new
-     * coordinates and/or feedback style.
-     * <p>
-     * In case of area registry for LCDUI Canvas or CustomItem no further
-     * actions are required to update tactile feedback areas when a CustomItem
-     * is moved in a Form or when a Canvas is changed due to e.g. orientation
-     * switch.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback registration. Valid
-     *            object types are: <code>javax.microedition.lcdui.Canvas</code>
-     *            , <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the new tactile feedback area to be registered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. Id's do not need to be consecutive numbers.
-     * @param x
-     *            x-coordinate of the top-left corner of tactile feedback
-     *            rectangle to register.
-     * @param y
-     *            y-coordinate of the top-left corner of tactile feedback
-     *            rectangle to register.
-     * @param width
-     *            Width of tactile feedback rectangle to register.
-     * @param height
-     *            Height of tactile feedback rectangle to register.
-     * @param style
-     *            The style of the feedback for specified area. Use predefined
-     *            values <code>FEEDBACK_STYLE_BASIC</code>,
-     *            <code>FEEDBACK_STYLE_SENSITIVE</code>. Actual style behaviour
-     *            is defined through device settings.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     * @throws IllegalArgumentException
-     *             if the style parameter has invalid type.
-     */
-    public void registerFeedbackArea(Object uiObject, int id, int x, int y,
-                                     int width, int height, int style) throws IllegalArgumentException
-    {
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        if ((style != FEEDBACK_STYLE_BASIC)
-                && (style != FEEDBACK_STYLE_SENSITIVE))
-            throw new IllegalArgumentException(invalidFeedbackStyleMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            final int fX = x;
-            final int fY = y;
-            final int fWidth = width;
-            final int fHeight = height;
-            final int fStyle = style;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    OS.MTouchFeedback_SetFeedbackArea(fControlHandle,
-                                                      fId, fX, fY, fWidth, fHeight, fStyle);
-                }
-            });
-        }
-        else
-        {
-            OS.MTouchFeedback_SetFeedbackArea(controlHandle, id, x, y, width,
-                                              height, style);
-        }
-    }
-
-    /**
-     * Unregisters tactile feedback area within a UI component.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the tactile feedback area to be unregistered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. If given id was not registered by
-     *            {@link #registerFeedbackArea registerFeedbackArea} then the
-     *            call has no effect.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void unregisterFeedbackArea(Object uiObject, int id)
-    throws IllegalArgumentException
-    {
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    OS.MTouchFeedback_RemoveFeedbackArea(
-                        fControlHandle, fId);
-                }
-            });
-        }
-        else
-        {
-            OS.MTouchFeedback_RemoveFeedbackArea(controlHandle, id);
-        }
-
-    }
-
-    /**
-     * Removes all tactile feedback for a UI component.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void removeFeedbackForComponent(Object uiObject)
-    {
-        if (isTouchFeedbackSupported() == false)
-            return;
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    OS.MTouchFeedback_RemoveFeedbackForControl(fControlHandle);
-                }
-            });
-        }
-        else
-        {
-            OS.MTouchFeedback_RemoveFeedbackForControl(controlHandle);
-        }
-
-    }
-
-    /**
-     * Moves the specified tactile feedback area to first priority. Priority is
-     * significant in case of overlapping tactile feedback areas. If the tactile
-     * feedback styles of registered areas are different, the feedback from
-     * first-priority area will be given.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the tactile feedback area to be unregistered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. If given id was not registered by
-     *            {@link #registerFeedbackArea registerFeedbackArea} then the
-     *            call has no effect.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void moveFeedbackAreaToFirstPriority(Object uiObject, int id)
-    {
-        if (isTouchFeedbackSupported() == false)
-            return;
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    OS.MTouchFeedback_MoveFeedbackAreaToFirstPriority(
-                        fControlHandle, fId);
-                }
-            });
-        }
-        else
-        {
-            OS.MTouchFeedback_MoveFeedbackAreaToFirstPriority(
-                controlHandle, id);
-        }
-
-    }
-
-
-    private int controlType(Object obj)
-    {
-        if ((obj instanceof javax.microedition.lcdui.Canvas)
-                || (obj instanceof javax.microedition.lcdui.CustomItem))
-        {
-            return TYPE_LCDUI;
-        }
-        else if ((obj instanceof org.eclipse.swt.widgets.Control))
-        {
-            return TYPE_ESWT;
-        }
-        return TYPE_INVALID;
-    }
-
-    private int getControlHandle(Object uiObject)
-    {
-        int controlHandle = 0;
-        org.eclipse.swt.widgets.Control eSwtControl = null;
-        if (uiObject instanceof javax.microedition.lcdui.Canvas
-                || uiObject instanceof javax.microedition.lcdui.CustomItem)
-        {
-            eSwtControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-                          .getEswtControl(uiObject);
-        }
-        else if (uiObject instanceof org.eclipse.swt.widgets.Control)
-        {
-            eSwtControl = (org.eclipse.swt.widgets.Control) uiObject;
-        }
-
-        if (eSwtControl != null)
-        {
-            controlHandle = Internal_PackageSupport.topHandle(eSwtControl);
-        }
-        return controlHandle;
-    }
-
-}
--- a/javauis/nokiauiapi_qt/src_j2se/com/nokia/mid/ui/TactileFeedback.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +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:
-*
-*/
-
-package com.nokia.mid.ui;
-
-import org.eclipse.swt.widgets.Internal_PackageSupport;
-import com.nokia.mid.ui.internal.OS;
-
-;
-
-/**
- * This class is a Java extension to support tactile feedback (audio, vibra,
- * piezo, etc.) on touch-enabled devices. Tactile feedback is meant to give user
- * more clear feeling of touch events, like tapping and dragging. The actual
- * physical tactile feedback depends on the device tactile feedback
- * implementation, hardware and device settings. A device may implement the
- * feedback with different hardware methods, for example, vibra, audio or piezo
- * hardware.
- * <p>
- * The API supports both LCDUI and eSWT UI toolkits.
- * <p>
- * Using this class is safe when a device does not support tactile feedback. In
- * this case methods of this class can be called but this has no effect.
- * <p>
- * Tactile feedback can be generated in two ways:
- * <ul>
- * <li>By producing direct feedback from the application.</li>
- * <li>By adding feedback areas to area registry, in which case the feedback
- * will be produced by the tactile feedback system automatically when the
- * defined screen area (with defined feedback) is touched.</li>
- * </ul>
- * <p>
- * Direct feedback is given instantly with {@link #directFeedback
- * directFeedback} specifying the feedback type. Direct feedback can be used
- * when the user action is not just a tap in a certain area. For example if the
- * user drags from one menu item to the other the application may give direct
- * feedback to emphasize focus traverse.
- * <p>
- * In case of area registry for eSWT Control, the registry needs to be updated
- * every time when the size or position of a UI component changes, or when e.g.
- * a state of a UI component changes in such way that feedback type also
- * changes. Typically the area update may be implemented in
- * <code>controlMoved</code> and <code>controlResized</code> methods of
- * <code>ControlListener</code> interface.
- * <p>
- * In case of area registry for LCDUI Canvas or CustomItem no further actions
- * are required to update tactile feedback areas when a CustomItem is moved in a
- * Form or when a Canvas is changed due to e.g. orientation switch.
- * <p>
- * There are quite tight latency requirements for tactile feedback, and in most
- * cases feedback should be triggered in less than 30ms from the time when user
- * touched the screen. For the area registry the feedback system is responsible
- * of fulfilling this requirement, but in case of direct feedback it is the
- * responsibility of the user of this API.
- * <p>
- * The tactile feedback has 2 different styles: Basic and Sensitive. Each type
- * is defined in the device settings, not by this API. Each style of feedback is
- * used in different cases. Typically Basic style is used to emphasize the tap
- * event, while Sensitive style is used mostly at dragging operations, to
- * emphasize focus traverse, text selection, etc. Choosing a specific style for
- * each use case in up to developer, however it is good to follow the behavior
- * of native applications.
- * <p>
- * The goal of the API is to enable user-created UI components to have tactile
- * feedback. The UI component types supported by the API are limited to
- * user-defined components only: <code>javax.microedition.lcdui.Canvas</code>,
- * <code>javax.microedition.lcdui.CustomItem</code>,
- * <code>org.eclipse.swt.widgets.Control</code>. Other UI components (i.e. List,
- * TextBox, etc.) get default tactile feedback automatically from the platform.
- *
- * @version 0.001
- * @since 1.2
- */
-
-public class TactileFeedback
-{
-
-    /**
-     * Constant for specifying basic tactile feedback style. Actual style
-     * behaviour is set through device settings.
-     */
-    public static final int FEEDBACK_STYLE_BASIC = 1;
-
-    /**
-     * Constant for specifying sensitive tactile feedback style. Actual style
-     * behaviour is set through device settings.
-     */
-    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 int TYPE_INVALID = 0;
-    private static final int TYPE_ESWT = 1;
-    private static final int TYPE_LCDUI = 2;
-    private static boolean feedbackEnabled;
-
-    /**
-     * Constructs tactile feedback engine object. The object may be used in both
-     * LCDUI and eSWT java UI toolkits. TactileFeedback object must be
-     * constructed before using any tactile feedback methods.
-     */
-    public TactileFeedback()
-    {
-    }
-
-    /**
-     * Triggers direct tactile feedback of the specified style.
-     *
-     * @param style
-     *            The style of the direct feedback. Use predefined values
-     *            FEEDBACK_STYLE_BASIC, FEEDBACK_STYLE_SENSITIVE. Actual style
-     *            behavior is set through device settings.
-     * @throws IllegalArgumentException
-     *             if the style parameter has invalid type.
-     */
-    public void directFeedback(int style) throws IllegalArgumentException
-    {
-        if ((style != FEEDBACK_STYLE_BASIC)
-                && (style != FEEDBACK_STYLE_SENSITIVE))
-            throw new IllegalArgumentException(invalidFeedbackStyleMsg);
-        if (org.eclipse.swt.widgets.Display.getCurrent() == null)
-        {
-            final int fStyle = style;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-                public void run()
-                {
-                    //  OS.MTouchFeedback_InstantFeedback(fStyle);
-                }
-            });
-
-        }
-        else
-        {
-            //OS.MTouchFeedback_InstantFeedback(style);
-        }
-    }
-
-    /**
-     * Queries the device if it supports tactile feedback. It is safe to use
-     * this class even if the device does not support tactile feedback. Methods
-     * of this class can be called but this has no effect.
-     *
-     * @return true if the device supports tactile feedback, false otherwise.
-     */
-    public boolean isTouchFeedbackSupported()
-    {
-        if (org.eclipse.swt.widgets.Display.getCurrent() == null)
-        {
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    // feedbackEnabled = OS
-                    //       .MTouchFeedback_TouchFeedbackSupported();
-                }
-            });
-        }
-        else
-        {
-            //  feedbackEnabled = OS.MTouchFeedback_TouchFeedbackSupported();
-        }
-        return feedbackEnabled;
-    }
-
-    /**
-     * Registers area within a UI component for tactile feedback. If areas
-     * overlap then the feedback is given from the last registered area.
-     * {@link #moveFeedbackAreaToFirstPriority moveFeedbackAreaToFirstPriority}
-     * can be used to bring a certain area covered by another area into action.
-     * If an area with specified <code>id</code> is already registered it is
-     * updated. When updating an existing area there is no need to unregister it
-     * before re-registering again with new coordinates and/or feedback style.
-     * The area specified by <code>x</code>, <code>y</code>, <code>width</code>
-     * and <code>height</code> parameters may be located on the screen just
-     * partially.
-     *
-     * <p>
-     * In case of area registry for eSWT Control, the registry needs to be
-     * updated every time when the size or position of a UI component changes,
-     * or when e.g. a state of a UI component changes in such way that feedback
-     * type also changes. Typically the area update may be implemented in
-     * <code>controlMoved</code> and <code>controlResized</code> methods of
-     * <code>ControlListener</code> interface. The update of an area may be
-     * implemented by calling registerFeedbackArea with the same area id but new
-     * coordinates and/or feedback style.
-     * <p>
-     * In case of area registry for LCDUI Canvas or CustomItem no further
-     * actions are required to update tactile feedback areas when a CustomItem
-     * is moved in a Form or when a Canvas is changed due to e.g. orientation
-     * switch.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback registration. Valid
-     *            object types are: <code>javax.microedition.lcdui.Canvas</code>
-     *            , <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the new tactile feedback area to be registered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. Id's do not need to be consecutive numbers.
-     * @param x
-     *            x-coordinate of the top-left corner of tactile feedback
-     *            rectangle to register.
-     * @param y
-     *            y-coordinate of the top-left corner of tactile feedback
-     *            rectangle to register.
-     * @param width
-     *            Width of tactile feedback rectangle to register.
-     * @param height
-     *            Height of tactile feedback rectangle to register.
-     * @param style
-     *            The style of the feedback for specified area. Use predefined
-     *            values <code>FEEDBACK_STYLE_BASIC</code>,
-     *            <code>FEEDBACK_STYLE_SENSITIVE</code>. Actual style behaviour
-     *            is defined through device settings.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     * @throws IllegalArgumentException
-     *             if the style parameter has invalid type.
-     */
-    public void registerFeedbackArea(Object uiObject, int id, int x, int y,
-                                     int width, int height, int style) throws IllegalArgumentException
-    {
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        if ((style != FEEDBACK_STYLE_BASIC)
-                && (style != FEEDBACK_STYLE_SENSITIVE))
-            throw new IllegalArgumentException(invalidFeedbackStyleMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            final int fX = x;
-            final int fY = y;
-            final int fWidth = width;
-            final int fHeight = height;
-            final int fStyle = style;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    //      OS.MTouchFeedback_SetFeedbackArea(fControlHandle,
-                    //            fId, fX, fY, fWidth, fHeight, fStyle);
-                }
-            });
-        }
-        else
-        {
-            //OS.MTouchFeedback_SetFeedbackArea(controlHandle, id, x, y, width,
-            //      height, style);
-        }
-    }
-
-    /**
-     * Unregisters tactile feedback area within a UI component.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the tactile feedback area to be unregistered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. If given id was not registered by
-     *            {@link #registerFeedbackArea registerFeedbackArea} then the
-     *            call has no effect.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void unregisterFeedbackArea(Object uiObject, int id)
-    throws IllegalArgumentException
-    {
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    //  OS.MTouchFeedback_RemoveFeedbackArea(
-                    //        fControlHandle, fId);
-                }
-            });
-        }
-        else
-        {
-            //OS.MTouchFeedback_RemoveFeedbackArea(controlHandle, id);
-        }
-
-    }
-
-    /**
-     * Removes all tactile feedback for a UI component.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void removeFeedbackForComponent(Object uiObject)
-    {
-        if (isTouchFeedbackSupported() == false)
-            return;
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    //    OS.MTouchFeedback_RemoveFeedbackForControl(fControlHandle);
-                }
-            });
-        }
-        else
-        {
-            //OS.MTouchFeedback_RemoveFeedbackForControl(controlHandle);
-        }
-
-    }
-
-    /**
-     * Moves the specified tactile feedback area to first priority. Priority is
-     * significant in case of overlapping tactile feedback areas. If the tactile
-     * feedback styles of registered areas are different, the feedback from
-     * first-priority area will be given.
-     *
-     * @param uiObject
-     *            The UI component for tactile feedback area de-registration.
-     *            Valid object types are:
-     *            <code>javax.microedition.lcdui.Canvas</code>,
-     *            <code>javax.microedition.lcdui.CustomItem</code>,
-     *            <code>org.eclipse.swt.widgets.Control</code>.
-     * @param id
-     *            Id of the tactile feedback area to be unregistered. Id's are
-     *            used to identify particular tactile feedback area within one
-     *            UI component. If given id was not registered by
-     *            {@link #registerFeedbackArea registerFeedbackArea} then the
-     *            call has no effect.
-     * @throws IllegalArgumentException
-     *             if the uiObject parameter has invalid type.
-     */
-    public void moveFeedbackAreaToFirstPriority(Object uiObject, int id)
-    {
-        if (isTouchFeedbackSupported() == false)
-            return;
-
-        int type = controlType(uiObject);
-        if (type == TYPE_INVALID)
-            throw new IllegalArgumentException(invalidControlTypeMsg);
-
-        int controlHandle = getControlHandle(uiObject);
-        if (type == TYPE_LCDUI)
-        {
-            final int fControlHandle = controlHandle;
-            final int fId = id;
-            com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-            .eSWTUIThreadRunnerSyncExec(new Runnable()
-            {
-
-                public void run()
-                {
-                    //     OS.MTouchFeedback_MoveFeedbackAreaToFirstPriority(
-                    //           fControlHandle, fId);
-                }
-            });
-        }
-        else
-        {
-            //  OS.MTouchFeedback_MoveFeedbackAreaToFirstPriority(
-            //                controlHandle, id);
-        }
-
-    }
-
-
-    private int controlType(Object obj)
-    {
-        if ((obj instanceof javax.microedition.lcdui.Canvas)
-                || (obj instanceof javax.microedition.lcdui.CustomItem))
-        {
-            return TYPE_LCDUI;
-        }
-        else if ((obj instanceof org.eclipse.swt.widgets.Control))
-        {
-            return TYPE_ESWT;
-        }
-        return TYPE_INVALID;
-    }
-
-    private int getControlHandle(Object uiObject)
-    {
-        int controlHandle = 0;
-        org.eclipse.swt.widgets.Control eSwtControl = null;
-        if (uiObject instanceof javax.microedition.lcdui.Canvas
-                || uiObject instanceof javax.microedition.lcdui.CustomItem)
-        {
-            eSwtControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker
-                          .getEswtControl(uiObject);
-        }
-        else if (uiObject instanceof org.eclipse.swt.widgets.Control)
-        {
-            eSwtControl = (org.eclipse.swt.widgets.Control) uiObject;
-        }
-
-        if (eSwtControl != null)
-        {
-            controlHandle = Internal_PackageSupport.topHandle(eSwtControl);
-        }
-        return controlHandle;
-    }
-
-}
--- a/javauis/ptivariation_akn/javaptivariation/build/bwins/javaptivariationu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?JavaPtiVariationLibEntryL@@YAXAAVCPtiEngine@@H@Z @ 1 NONAME ; void JavaPtiVariationLibEntryL(class CPtiEngine &, int)
-
--- a/javauis/ptivariation_akn/javaptivariation/build/eabi/javaptivariationu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z25JavaPtiVariationLibEntryLR10CPtiEnginei @ 1 NONAME
-
--- a/javauis/ptivariation_akn/javaptivariation/build/exports.inf	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +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: 
-*
-*/
-
-PRJ_EXPORTS
-../inc/javaptivariation.h		|../../../inc/javaptivariation.h
--- a/javauis/ptivariation_akn/javaptivariation/build/javaptivariation.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE=lib
-TARGET=javaptivariation
-CONFIG += omj  stl
-CONFIG -= qt
-
-LIBS += -lptiengine
-include(../../../../build/omj.pri)
--- a/javauis/ptivariation_akn/javaptivariation/inc/javaptivariation.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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:  ITI enhanced methods to PtiEngine for supporting in java
-*
-*/
-
-
-#ifndef JAVAPTIVARIATION_H
-#define JAVAPTIVARIATION_H
-
-#include <ptiengine.h>
-
-/**
- * Factory
- */
-IMPORT_C void JavaPtiVariationLibEntryL(CPtiEngine& aPtiEngine, TInt aType);
-
-typedef void (*TJavaPtiVariationLibEntry)(CPtiEngine&, TInt);
-
-#endif // JAVAPTIVARIATION_H
--- a/javauis/ptivariation_akn/javaptivariation/src/javaptivariation.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +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:  ITI enhanced methods to PtiEngine for supporting in java
-*
-*/
-
-
-
-
-#include "javaptivariation.h"
-
-
-// ---------------------------------------------------------------------------
-//  Factory method
-//----------------------------------------------------------------------------
-//
-EXPORT_C void JavaPtiVariationLibEntryL(CPtiEngine& aPtiEngine, TInt aType)
-{
-    aPtiEngine.SetKeyboardType((TPtiKeyboardType)aType);
-}
-
--- a/javauis/ptivariation_akn/subsystem.mk	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +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: 
-#
-
-include $(JAVA_SRC_ROOT)/build/Makefile.defs
-COMPONENTS = \
-	javaptivariation/build
-
-include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/javauis/remconobserver_akn/build/javaremconobserver_0x2002DCCA.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/remconobserver_akn/build/javaremconobserver_0x2002DCCA.mmp	Tue May 25 12:34:19 2010 +0300
@@ -79,6 +79,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -99,10 +112,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/runtimeui_akn/build/javaruntimeui_0x2002DCCD.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/runtimeui_akn/build/javaruntimeui_0x2002DCCD.mmp	Tue May 25 12:34:19 2010 +0300
@@ -77,6 +77,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -97,10 +110,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/runtimeui_qt/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="javaruntimeui" default="deploy" basedir=".">
-    <description>
-        Builds Java Runtime UI
-    </description>
-
-  <import file="../../../build/utilities.xml"/>
-
-  <target name="init.component.properties" if="target.s60">
-      <property name="javah.classnames"
-                value="com.nokia.mj.impl.rt.ui.qt.RuntimeUiQt"/>
-  </target>
-
-</project>
--- a/javauis/runtimeui_qt/build/bwins/javaruntimeuiu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
-	?confirmL@RuntimeUiQt@runtimeui@java@@SAHABVTDesC16@@0@Z @ 2 NONAME ; int java::runtimeui::RuntimeUiQt::confirmL(class TDesC16 const &, class TDesC16 const &)
-	?errorL@RuntimeUiQt@runtimeui@java@@SAXABVTDesC16@@00@Z @ 3 NONAME ; void java::runtimeui::RuntimeUiQt::errorL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &)
-
--- a/javauis/runtimeui_qt/build/eabi/javaruntimeuiu.def	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
-	_Z10jni_lookupPKc @ 1 NONAME
-	_ZN4java9runtimeui11RuntimeUiQt6errorLERK7TDesC16S4_S4_ @ 2 NONAME
-	_ZN4java9runtimeui11RuntimeUiQt8confirmLERK7TDesC16S4_ @ 3 NONAME
-
--- a/javauis/runtimeui_qt/build/javaruntimeui.pro	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-TEMPLATE=lib
-TARGET=javaruntimeui
-CONFIG += hb omj java
-
-symbian {
-    DEPENDPATH += ../src.s60
-    INCLUDEPATH += ../src.s60
-    SOURCES += ../src.s60/*.cpp
-    LIBS += -lbafl -lHbCore -lHbWidgets
-}
-
-!symbian {
-    CONFIG += javaonly
-}
-
-
-include(../../../build/omj.pri)
--- a/javauis/runtimeui_qt/javasrc.s60/com/nokia/mj/impl/rt/ui/qt/RuntimeUiQt.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.rt.ui.qt;
-
-import com.nokia.mj.impl.rt.ui.ConfirmData;
-import com.nokia.mj.impl.rt.ui.RuntimeUi;
-import com.nokia.mj.impl.utils.Logger;
-import com.nokia.mj.impl.utils.exception.ExceptionBase;
-import com.nokia.mj.impl.rt.support.Jvm;
-
-/**
- * Runtime UI QT implementation.
- *
- */
-public class RuntimeUiQt extends RuntimeUi
-{
-
-    static
-    {
-        Jvm.loadSystemLibrary("javaruntimeui");
-    }
-
-    /**
-     * Constructor
-     */
-    public RuntimeUiQt()
-    {
-        super();
-    }
-
-    /**
-     * Seeks confirmation from the user.
-     *
-     * @param aAppName     the name of the application on behalf of which the
-     *                     confirmation is requested
-     * @param aConfirmData the data to be confirmed. Unless the user has
-     *                     canceled the confirmation, this data will be filled
-     *                     in with user's answer upon return
-     * @return             true if the user has answered, false if the user has
-     *                     canceled the confirmation
-     */
-    public boolean confirm(String aAppName, ConfirmData aConfirmData)
-    {
-        if (aConfirmData != null)
-        {
-            return _confirm(aAppName, aConfirmData, isIdentified());
-        }
-        else
-        {
-            Logger.LOG(Logger.EJavaRuntime,
-                       Logger.EError, "RuntimeUi: ConfirmData null");
-        }
-        return true;
-    }
-
-    /**
-     * Notifies the user that an error has occurred.
-     * This method must return quickly.
-     *
-     * @param aAppName   the name of the application which generated the error
-     *                   situation
-     * @param aException exception indicating the error reason
-     */
-    public void error(String aAppName, ExceptionBase aException)
-    {
-        if (aException != null)
-        {
-            _error(aAppName, aException.getShortMessage(), aException.getDetailedMessage());
-        }
-        else
-        {
-            Logger.LOG(Logger.EJavaRuntime,
-                       Logger.EError, "RuntimeUi: Error null");
-        }
-    }
-
-    private native boolean _confirm(String aAppName, ConfirmData aConfirmData, boolean aIdentifiedApp);
-    private native void _error(String aAppName, String aShortMessage, String aDetailedMessage);
-}
--- a/javauis/runtimeui_qt/src.s60/jni.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <vector>
-#include "javajniutils.h"
-#include "jstringutils.h"
-#include "runtimeuiqt.h"
-#include "com_nokia_mj_impl_rt_ui_qt_RuntimeUiQt.h"
-
-#include "logger.h"
-
-using namespace java::runtimeui;
-
-JNIEXPORT jboolean JNICALL Java_com_nokia_mj_impl_rt_ui_qt_RuntimeUiQt__1confirm
-(JNIEnv * aEnv, jobject, jstring aAppName, jobject aConfirmData, jboolean /*aIdentified*/)
-{
-    // Identified parameter is not used. It was earlier used to add icon to query header
-    // and that is currently not supported.
-
-    CActiveScheduler* newScheduler = 0;
-
-    if (CActiveScheduler::Current() == 0)
-    {
-        // Create AS as not yet exists.
-        newScheduler = new CActiveScheduler;
-        CActiveScheduler::Install(newScheduler);
-    }
-
-    // unmarshall the JNI parameters
-    JStringUtils appName(*aEnv, aAppName);
-    jclass confirmDataClass = aEnv->GetObjectClass(aConfirmData);
-    jmethodID getQuestionMethod
-    = aEnv->GetMethodID(confirmDataClass,"getQuestion", "()Ljava/lang/String;");
-    jstring jQuestion = (jstring) aEnv->CallObjectMethod(
-                            aConfirmData, getQuestionMethod);
-    JStringUtils question(*aEnv, jQuestion);
-
-    int answer = -1;
-    bool result = false;
-
-    TRAPD(err, answer = RuntimeUiQt::confirmL(appName, question));
-
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaRuntime, "Error while showing confirmation dialog: %d", err);
-    }
-    else
-    {
-        // marshall the answer back to Java
-        jmethodID setAnswerMethod = aEnv->GetMethodID(confirmDataClass,"setAnswer", "(I)V");
-        aEnv->CallVoidMethod(aConfirmData, setAnswerMethod, answer);
-        result = true;
-    }
-
-    delete newScheduler;
-    return result;
-}
-
-JNIEXPORT void JNICALL Java_com_nokia_mj_impl_rt_ui_qt_RuntimeUiQt__1error
-(JNIEnv * aEnv, jobject, jstring aAppName, jstring aShortMsg, jstring aDetailedMsg)
-{
-    CActiveScheduler* newScheduler = 0;
-
-    if (CActiveScheduler::Current() == 0)
-    {
-        // Create AS as not yet exists.
-        newScheduler = new CActiveScheduler;
-        CActiveScheduler::Install(newScheduler);
-    }
-
-    // unmarshall the JNI parameters
-    JStringUtils appName(*aEnv, aAppName);
-    JStringUtils shortMsg(*aEnv, aShortMsg);
-    JStringUtils detailedMsg(*aEnv, aDetailedMsg);
-
-    // delegate the UI implementation to handle the error operation
-    TRAPD(err, RuntimeUiQt::errorL(appName, shortMsg, detailedMsg));
-
-    if (KErrNone != err)
-    {
-        ELOG1(EJavaRuntime, "Error while showing error dialog: %d", err);
-    }
-    delete newScheduler;
-}
--- a/javauis/runtimeui_qt/src.s60/runtimeuiqt.cpp	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: RuntimeUI QT to show error notes and security queries.
-*
-*/
-
-#include "runtimeuiqt.h"
-
-#include <hbdevicemessageboxsymbian.h>
-#include <hbpopup.h>
-
-#include "logger.h"
-
-using namespace java::runtimeui;
-
-OS_EXPORT void RuntimeUiQt::errorL(const TDesC& /*aAppName*/, const TDesC& aShortMsg, const TDesC& aDetailedMsg)
-{
-    CHbDeviceMessageBoxSymbian* messageBox
-    = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
-    CleanupStack::PushL(messageBox);
-
-    messageBox->SetTextL(aShortMsg);
-    messageBox->SetTimeoutL(HbPopup::NoTimeout);
-
-    // Read localised versions instead of hard coded values.
-    _LIT(KOkButtonText, "OK");
-
-    if (aDetailedMsg.Size() > 0)
-    {
-        _LIT(KDetailsButtonText, "Details");
-
-        messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KOkButtonText);
-        messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
-        messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDetailsButtonText);
-        messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
-
-        if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
-        {
-            messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::ERejectButton, EFalse);
-            messageBox->SetTextL(aDetailedMsg);
-            (void)messageBox->ExecL();
-        }
-    }
-    else
-    {
-        messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KOkButtonText);
-        messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
-        (void)messageBox->ExecL();
-    }
-    messageBox->Close();
-    CleanupStack::PopAndDestroy(messageBox);
-}
-
-OS_EXPORT int RuntimeUiQt::confirmL(const TDesC& /*aAppName*/, const TDesC& aQuestion)
-{
-    CHbDeviceMessageBoxSymbian* messageBox
-    = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
-    CleanupStack::PushL(messageBox);
-
-    messageBox->SetTextL(aQuestion);
-    messageBox->SetTimeoutL(HbPopup::NoTimeout);
-
-    // Read localised versions instead of hard coded values.
-    _LIT(KAllowButtonText, "Allow");
-    _LIT(KDenyButtonText, "Deny");
-
-    messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
-    messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
-    messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
-    messageBox->SetButtonL(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
-
-    // by default the answer is Allow
-    int result = 0;
-    if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
-    {
-        // change the answer to Deny
-        result = 1;
-    }
-
-    messageBox->Close();
-    CleanupStack::PopAndDestroy(messageBox);
-    return result;
-}
--- a/javauis/runtimeui_qt/src.s60/runtimeuiqt.h	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef RUNTIME_UI_QT_H
-#define RUNTIME_UI_QT_H
-
-#include "javaosheaders.h"
-#include <vector>
-
-namespace java
-{
-namespace runtimeui
-{
-class RuntimeUiQt
-{
-public:
-    /**
-     * Show error dialog to user. This is blocking call and execution does not proceed until
-     * has pressed OK button.
-     *
-     * @param aAppName Application name error occurred.
-     * @param aShortMesg Short error description.
-     * @param aDetailedMsg Detailed error description.
-     */
-    OS_IMPORT static void errorL(const TDesC& aAppName, const TDesC& aShortMsg, const TDesC& aDetailedMsg);
-
-    /**
-     * Request permission to user. This is blocking call and execution does not proceed until
-     * has accepted or denied the permission.
-     *
-     * @param aAppName Application name requesting confirmation.
-     * @param aQuestion Security question.
-     * @return 1 if user accepts the request, 0 otherwise.
-     */
-    OS_IMPORT static int confirmL(const TDesC& aAppName, const TDesC& aQuestion);
-};
-
-} //end namespace runtimeui
-} //end namespace java
-
-#endif //RUNTIME_UI_QT_H
--- a/javauis/runtimeui_qt/tsrc.s60/build/build.xml	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<!--
-#
-# Copyright (c) 2008-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: 
-#
--->
-
-<project name="runtimeuiqttests" default="deploy.ut" basedir=".">
-
-  <import file="../../../../build/utilities.xml"/>
-
-  <property environment="env"/>
-  <property name="java.src.root" location="${env.JAVA_SRC_ROOT}"/>
-  <property name="java.bin.root" location="${env.JAVA_BIN_ROOT}"/>
-
-  <property name="src.dir" location="../javasrc"/>
-  <property name="build.dir" location="../build"/>
-  <property name="classes.dir" location="${build.dir}/javabuild"/>
-  <property name="installer.jar.filename" value="javainstaller.jar"/>
-  <property name="runtimeuiqttests.jar.filename" value="runtimeuiqttests.jar"/>
-  <property name="utils.jar.filename" value="javacommonutils.jar"/>
-  <property name="logger.jar.filename" value="logger.jar"/>
-  <property name="junit.jar.dir" location="${java.src.root}/tools/junit"/>
-  <property name="junit.jar.filename" value="j2meunit1.1.1.jar"/>
-  <property name="junit.omj.jar.filename" value="j2meunitomj.jar"/>
-
-  <property name="bootclasspath.cdc" location="${java.src.root}/javaruntime/jvm/ibm/j9_23/ibmdelivery/resource/lib/jclCdc11/classes.zip"/>
-
-  <property name="javac.source" value="1.3"/>
-  <property name="javac.target" value="1.3"/>
-
-  <target name="init.my.properties" depends="init.properties">
-    <property name="dist" location="${vm.extension.directory}"/>
-  </target>
-
-  <target name="clean">
-    <delete dir="${classes.dir}"/>
-    <delete file="${dist}/${runtimeuiqttests.jar.filename}"/>
-    <delete file="${dist}/${junit.jar.filename}"/>
-    <delete file="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="compile.ut" depends="init.my.properties">
-    <property name="jars.dir" location="${jarfiles.collect.root}"/>
-    <property name="jars.dir.cdc" location="${jarfiles.collect.cdc.root}"/>
-    <mkdir dir="${classes.dir}"/>
-    <javac source="${javac.source}" target="${javac.target}"
-           destdir="${classes.dir}"
-           bootclasspath="${bootclasspath.cdc}">
-           <classpath>
-               <pathelement
-                 location="${jars.dir.cdc}/${installer.jar.filename}"/>
-               <pathelement location="${impl.cldc.jar}"/>
-               <pathelement location="${impl.cdc.jar}"/>
-               <pathelement location="${public.api.jar}"/>
-               <pathelement location="${platform.api.jar}"/>
-               <pathelement location="${junit.jar.dir}/${junit.jar.filename}"/>
-               <pathelement location="${junit.jar.dir}/${junit.omj.jar.filename}"/>
-           </classpath>
-      <src path="${src.dir}"/>
-    </javac>
-  </target>
-
-  <target name="deploy.ut" depends="compile.ut">
-      <mkdir dir="${dist}"/>
-      <jar destfile="${dist}/${runtimeuiqttests.jar.filename}" basedir="${classes.dir}"/>
-      <copy file="${junit.jar.dir}/${junit.jar.filename}"
-            tofile="${dist}/${junit.jar.filename}"/>
-      <copy file="${junit.jar.dir}/${junit.omj.jar.filename}"
-            tofile="${dist}/${junit.omj.jar.filename}"/>
-  </target>
-
-  <target name="main" depends="clean,run"/>
-
-  <target name="run" depends="deploy.ut">
-      <echo>Running RuntimeUiQtTests</echo>
-      <exec executable="${env.JAVA_BIN_ROOT}/bin/javainstaller">
-          <arg line="test -mainclass=com.nokia.mj.impl.rt.ui.qt.RuntimeUiQtTests"/>
-      </exec>
-  </target>
-</project>
--- a/javauis/runtimeui_qt/tsrc.s60/build/jiut.bat	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-rem Script for running runtimeUiAvkon unit tests from S60 eshell
-javainstaller test -mainclass=com.nokia.mj.impl.rt.ui.qt.RuntimeUiQtTests
--- a/javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/DetailedErrorMessage.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.rt.ui.qt;
-
-import com.nokia.mj.impl.utils.ErrorMessageBase;
-import com.nokia.mj.impl.utils.ResourceLoader;
-import java.util.Hashtable;
-
-public final class DetailedErrorMessage extends ErrorMessageBase
-{
-    public static final int MSG_ID = 1;
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-    /*** ---------------------------- PROTECTED --------------------------- */
-
-    /**
-     * Method for getting message table where key is an Integer value for
-     * the error code, and value is an error message String id.
-     */
-    private static Hashtable iMessageTable = null;
-    protected Hashtable getMessageTable()
-    {
-        if (iMessageTable != null)
-        {
-            return iMessageTable;
-        }
-        Hashtable messageTable = new Hashtable();
-        messageTable.put(new Integer(MSG_ID), "Detailed error message.");
-        iMessageTable = messageTable;
-        return iMessageTable;
-    }
-
-    /**
-     * Method for retrieving the ResourceLoader instance that is used
-     * to localise error messages.
-     */
-    private static ResourceLoader iRes = null;
-    protected ResourceLoader getResourceLoader()
-    {
-        if (iRes == null)
-        {
-            iRes = ResourceLoader.getInstance("", "");
-        }
-        return iRes;
-    }
-
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/RuntimeUiQtTests.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-package com.nokia.mj.impl.rt.ui.qt;
-
-import com.nokia.mj.impl.installer.utils.InstallerMain;
-import com.nokia.mj.impl.utils.exception.ExceptionBase;
-import com.nokia.mj.impl.rt.ui.qt.RuntimeUiQt;
-import com.nokia.mj.impl.rt.ui.RuntimeUi;
-import com.nokia.mj.impl.rt.ui.ConfirmData;
-
-import j2meunit.framework.Test;
-import j2meunit.framework.TestCase;
-import j2meunit.framework.TestMethod;
-import j2meunit.framework.TestSuite;
-
-/**
- * RuntimeUiQt unit tests.
- */
-public class RuntimeUiQtTests extends TestCase implements InstallerMain
-{
-
-    // Begin j2meunit test framework setup
-    public void installerMain(String[] args)
-    {
-        TestSuite suite = new TestSuite(this.getClass().getName());
-
-        suite.addTest(new RuntimeUiQtTests("testQt", new TestMethod()
-        {
-            public void run(TestCase tc)
-            {
-                ((RuntimeUiQtTests)tc).testQt();
-            }
-        }));
-
-        com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
-    }
-
-    public RuntimeUiQtTests()
-    {
-    }
-
-    public RuntimeUiQtTests(String aTestName, TestMethod aTestMethod)
-    {
-        super(aTestName, aTestMethod);
-    }
-
-    public void assertFalse(String aMsg, boolean aCondition)
-    {
-        assertTrue(aMsg, !aCondition);
-    }
-
-    // End j2meunit test framework setup
-
-    protected void setUp()
-    {
-    }
-
-    protected void tearDown()
-    {
-    }
-
-    private void testQt()
-    {
-        doTest(new RuntimeUiQt());
-    }
-
-    private void doTest(RuntimeUi runtimeUi)
-    {
-        System.out.println("+doTest()");
-        // error message with details -> make sure both are available to the user
-        ExceptionBase exc = new ExceptionBase(
-            new ShortErrorMessage(),
-            ShortErrorMessage.MSG_WITH_DETAILS_ID,
-            null, /* no params for short msg */
-            new DetailedErrorMessage(),
-            DetailedErrorMessage.MSG_ID,
-            null /* no params for detailed msg */);
-
-
-        runtimeUi.error("MyApplication", exc);
-
-        // error message with short description only
-        exc = new ExceptionBase(
-            new ShortErrorMessage(),
-            ShortErrorMessage.MSG_WITHOUT_DETAILS_ID,
-            null, /* no params for short msg */
-            null,
-            0,
-            null /* no params for detailed msg */);
-        System.out.println("3");
-
-        runtimeUi.error("MyApplication", exc);
-
-        // Test no crash happen.
-        runtimeUi.error("NullException", null);
-
-
-        boolean answerAvailable = false;
-
-        // Test confirm
-        ConfirmData confirmData = new ConfirmData("Confirm dialog. Select Allow", new String[] {"answerOpt1", "answerOpt2", "answerOption3"}, 1);
-        answerAvailable = runtimeUi.confirm("MyFavouriteAplication", confirmData);
-        assertTrue(answerAvailable && confirmData.getAnswer() == 1);
-
-        confirmData = new ConfirmData("Confirm dialog. Select Deny", new String[] {"answerOpt1", "answerOpt2", "answerOption3"}, 1);
-        answerAvailable = runtimeUi.confirm("MyFavouriteAplication", confirmData);
-        assertTrue(answerAvailable && confirmData.getAnswer() == 0);
-
-        confirmData = new ConfirmData("Null Answer options", null /*Not Supported*/, 1);
-        answerAvailable = runtimeUi.confirm("Null answer options", confirmData);
-        assertTrue(answerAvailable);
-
-        ConfirmData nullConf = null;
-        runtimeUi.confirm("Null Application", nullConf);
-
-        runtimeUi.destroy();
-        System.out.println("-doTest()");
-    }
-}
--- a/javauis/runtimeui_qt/tsrc.s60/javasrc/com/nokia/mj/impl/rt/ui/qt/ShortErrorMessage.java	Tue May 11 16:07:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-package com.nokia.mj.impl.rt.ui.qt;
-
-import com.nokia.mj.impl.utils.ErrorMessageBase;
-import com.nokia.mj.impl.utils.ResourceLoader;
-import java.util.Hashtable;
-
-public final class ShortErrorMessage extends ErrorMessageBase
-{
-    public static final int MSG_WITH_DETAILS_ID = 1;
-    public static final int MSG_WITHOUT_DETAILS_ID = 2;
-
-    /*** ----------------------------- PUBLIC ------------------------------ */
-    /*** ---------------------------- PROTECTED --------------------------- */
-
-    /**
-     * Method for getting message table where key is an Integer value for
-     * the error code, and value is an error message String id.
-     */
-    private static Hashtable iMessageTable = null;
-    protected Hashtable getMessageTable()
-    {
-        if (iMessageTable != null)
-        {
-            return iMessageTable;
-        }
-        Hashtable messageTable = new Hashtable();
-        messageTable.put(new Integer(MSG_WITH_DETAILS_ID), "Short error message. Make sure the details are available as well.");
-        messageTable.put(new Integer(MSG_WITHOUT_DETAILS_ID), "Short error message. Make sure there are no details available.");
-        iMessageTable = messageTable;
-        return iMessageTable;
-    }
-
-    /**
-     * Method for retrieving the ResourceLoader instance that is used
-     * to localise error messages.
-     */
-    private static ResourceLoader iRes = null;
-    protected ResourceLoader getResourceLoader()
-    {
-        if (iRes == null)
-        {
-            iRes = ResourceLoader.getInstance("", "");
-        }
-        return iRes;
-    }
-
-    /*** ----------------------------- PACKAGE ---------------------------- */
-    /*** ----------------------------- PRIVATE ---------------------------- */
-    /*** ----------------------------- NATIVE ----------------------------- */
-}
--- a/javauis/softnotification_akn/build/javasoftnotification_0x2002DCD6.mmp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/softnotification_akn/build/javasoftnotification_0x2002DCD6.mmp	Tue May 25 12:34:19 2010 +0300
@@ -80,6 +80,19 @@
 LIBRARY		libm.lib
 LIBRARY		euser.lib
 LIBRARY		libdl.lib
+LIBRARY		cone.lib
+LIBRARY		eikcore.lib
+LIBRARY		mediaclientaudio.lib
+LIBRARY		eikcoctl.lib
+LIBRARY		eiksrv.lib
+LIBRARY		apparc.lib
+LIBRARY		avkon.lib
+LIBRARY		efsrv.lib
+LIBRARY		charconv.lib
+LIBRARY		ws32.lib
+LIBRARY		hal.lib
+LIBRARY		gdi.lib
+LIBRARY		apgrfx.lib
 
 CAPABILITY		all -tcb 
 
@@ -100,10 +113,6 @@
 
 USERINCLUDE .
 
-#if defined(ARMCC) && !defined(ARMCC_2_2) && !defined(ARMCC_3_1)
-OPTION ARMCC --import_all_vtbl
-#endif
-
 #include <platform_paths.hrh>
 
  APP_LAYER_SYSTEMINCLUDE
--- a/javauis/subsystem.mk	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/subsystem.mk	Tue May 25 12:34:19 2010 +0300
@@ -41,5 +41,8 @@
 include subsystem_qt.mk
 endif
 
+# Declare that release preparation removes subdirectories not in build, except
+# listed special cases
+REMOVE_NOTBUILT_EXCLUDING = inc internal tsrc
 
 include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/javauis/subsystem_qt.mk	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/subsystem_qt.mk	Tue May 25 12:34:19 2010 +0300
@@ -14,6 +14,6 @@
 # Description: Makefile for Qt based components and subsystems
 #
 
-COMPONENTS   += eswt_qt/build lcdui_qt/build runtimeui_qt/build nokiauiapi_qt/build mmapi_qt/build
+COMPONENTS   += eswt_qt/build lcdui_qt/build runtimeui_qt/build nokiauiapi_qt/build mmapi_qt/build amms_qt/build
 
-SYMBIAN_ONLY += mmapi_qt/build
+SYMBIAN_ONLY += mmapi_qt/build amms_qt/build m3g_qt/build
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,24 @@
+<!--
+#
+# 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="FunctionalTestMidlets" default="pack">
+
+    <!-- Get general settings for sub directory. -->
+    <import file="./properties-sub-directory.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,63 @@
+<!--
+#
+# 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="BrowserTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="BrowserTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.browser.BrowserTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="BrowserTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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>
+
+        <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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/SelectLink.htm	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD>
+<TITLE>Two links </TITLE></head>
+
+<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
+
+<p>
+<a href="link1.htm">Link 1</a>
+<br/>
+<a href="link2.htm">Link 2</a>
+<br/>
+There are two links in this page. You can move focus between links. Tapping link will open a new page. 
+</p>
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/SelectLinkBak.htm	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD>
+<TITLE>Two links </TITLE></head>
+
+<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
+
+<p>
+There are two links in this page. You can move focus between links. Tapping link will open a new page. 
+<br/>
+<a href="link1.htm">Link 1</a>
+<br/>
+<a href="link2.htm">Link 2</a>
+</p>
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/link1.htm	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD>
+<TITLE>Link1 </TITLE></head>
+
+<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
+
+<p>
+You came to this page from Link 1.  If you see this page, the test passed.  
+</p>
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/htmlfiles/link2.htm	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD>
+<TITLE>Link2 </TITLE></head>
+
+<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
+
+<p>
+You came to this page from Link 2. If you see this page, the test passed.  
+</p>
+
+</BODY>
+</HTML>
Binary file javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/SmallLabel.jpg has changed
Binary file javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/big.png has changed
Binary file javauis/tsrc/fute/eswt/BrowserTestMidletSuite/res/res/small.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/src/com/nokia/test/java/eswt/browser/BrowserTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,699 @@
+/*
+* 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.test.java.eswt.browser;
+
+import java.io.*;
+import javax.microedition.io.file.*;
+import javax.microedition.io.*;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.browser.LocationListener;
+import org.eclipse.swt.browser.LocationEvent;
+import org.eclipse.swt.browser.ProgressEvent;
+import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.browser.StatusTextEvent;
+import org.eclipse.swt.browser.StatusTextListener;
+import org.eclipse.swt.browser.TitleEvent;
+import org.eclipse.swt.browser.TitleListener;
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class BrowserTestMIDlet_01 extends TestBaseMIDlet implements LocationListener,
+        ProgressListener, StatusTextListener, TitleListener
+{
+
+    Browser browser_top = null;
+    Browser browser_top_right = null;
+    Browser browser_bottom = null;
+    Browser browser_bottom_right = null;
+
+    Command okCMD = null;
+
+    Command browser4 = null;
+    Command browser3 = null;
+    Command browser2 = null;
+    Command browser1 = null;
+    Command showBrowserCMD = null;
+    Command showImageCMD = null;
+    Command showHtmlInFile_LinkCMD = null;
+    Command showHtmlInFile_Link_BackCMD = null;
+    Command showURLCMD = null;
+    Command showBookMarkCMD_1 = null;
+    Command showBookMarkCMD_2 = null;
+    Command showBookMarkCMD_3 = null;
+    Command showBookMarkCMD_4 = null;
+    Command showBookMarkCMD_5 = null;
+    Command showBookMarkCMD_6 = null;
+    Command showBookMarkCMD_7 = null;
+    Command showBookMarkCMD_8 = null;
+
+    Command showhttpsCMD = null;
+    Command showNotAvailableCMD = null;
+    Command backCMD = null;
+    Command forwardCMD = null;
+    Command refreshCMD = null;
+    Command stopCMD = null;
+    Command addLocationListener = null;
+    Command addProgressListener = null;
+    Command addStatusListener = null;
+    Command addTitleListener = null;
+    Command removeLocationListener = null;
+    Command removeProgressListener = null;
+    Command removeStatusListener = null;
+    Command removeTitleListener = null;
+    Image bigimg = null;
+
+    final String testresource_dir = "file:///C:/data/eSWTBrowserTestResorces/";
+    final String bigimagefilename = testresource_dir+"big.png";
+    final String smallimagefilename = testresource_dir+"small.gif";
+    final String labelimagefilename = testresource_dir+"SmallLabel.jpg";
+    final String linkfilename = testresource_dir+"SelectLink.htm";
+    final String firstresultfilename = testresource_dir+"link1.htm";
+    final String secondsresultfilename = testresource_dir+"link2.htm";
+    final String linkbackfilename = testresource_dir+"SelectLinkBak.htm";
+
+    private String[] resource_destination = new String[]
+    {
+        this.bigimagefilename,
+        this.smallimagefilename,
+        this.labelimagefilename,
+        this.linkfilename,
+        this.firstresultfilename,
+        this.secondsresultfilename,
+        this.linkbackfilename
+    };
+    private String[] resource_urls = new String[]
+    {
+        "/res/big.png",
+        "/res/small.gif",
+        "/res/SmallLabel.jpg",
+        "/htmlfiles/SelectLink.htm",
+        "/htmlfiles/link1.htm",
+        "/htmlfiles/link2.htm",
+        "/htmlfiles/SelectLinkBak.htm"
+    };
+    private String[] bookmarks_urls = new String[]
+    {
+        "http://www.s60.com/",
+        "http://elisa.net/",
+        "http://www.eclipse.org/ercp/",
+        "http://www.yahoo.com",
+        "http://www.nokia.com/",
+        "http://www.nokia.fi/",
+        "http://www.wikipedia.org/",
+        "http://java.sun.com/"
+    };
+    private String[] bookmarks = new String[]
+    {
+        "s60.com",
+        "elisa.net",
+        "eclipse.org",
+        "yahoo.com",
+        "nokia.com",
+        "www.nokia.fi",
+        "wikipedia.org",
+        "java.sun.com"
+    };
+    protected void showException(String title,String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText(title);
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+        this.shell.setText("Browser Test");
+        this.shell.setLayout(new FillLayout());
+
+        try
+        {
+            FileConnection dirConnection = (FileConnection)Connector.open(this.testresource_dir, Connector.READ_WRITE);
+            if (!dirConnection.exists())
+            {
+                dirConnection.mkdir();
+                dirConnection.close();
+            }
+            for (int i = 0; i < resource_urls.length; i++)
+            {
+
+                FileConnection fileConnection = (FileConnection)Connector.open(this.resource_destination[i], Connector.READ_WRITE);
+                if (!fileConnection.exists())
+                {
+                    fileConnection.create();
+
+                    this.copyResToFile(this.resource_urls[i], fileConnection);
+
+                    fileConnection.close();
+                }
+            }
+            this.showException("Complete","Resources in folder:"+this.testresource_dir);
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Exception","Resource could not be loaded:"+ex.getMessage());
+
+        }
+
+        // listener adding submenu
+        Command cmdBrowser = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdBrowser.setText("Create Browser");
+
+        this.browser1 = new Command(cmdBrowser,Command.GENERAL, 1);
+        this.browser1.setText("One");
+        this.browser1.addSelectionListener(this);
+
+        this.browser2 = new Command(cmdBrowser,Command.GENERAL, 1);
+        this.browser2.setText("Two");
+        this.browser2.addSelectionListener(this);
+
+        this.browser3 = new Command(cmdBrowser,Command.GENERAL, 1);
+        this.browser3.setText("Three");
+        this.browser3.addSelectionListener(this);
+
+        this.browser4 = new Command(cmdBrowser,Command.GENERAL, 1);
+        this.browser4.setText("Four");
+        this.browser4.addSelectionListener(this);
+
+        this.showBrowserCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showBrowserCMD.setText("Show - HTML");
+        this.showBrowserCMD.addSelectionListener(this);
+
+        this.showImageCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showImageCMD.setText("Show - HTML with image");
+        this.showImageCMD.addSelectionListener(this);
+
+        this.showURLCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showURLCMD.setText("Show - HTTP");
+        this.showURLCMD.addSelectionListener(this);
+
+        this.showhttpsCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showhttpsCMD.setText("Show - HTTPS");
+        this.showhttpsCMD.addSelectionListener(this);
+
+        this.showNotAvailableCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showNotAvailableCMD.setText("Show - Not Available");
+        this.showNotAvailableCMD.addSelectionListener(this);
+
+        this.showHtmlInFile_LinkCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showHtmlInFile_LinkCMD.setText("Show - Link");
+        this.showHtmlInFile_LinkCMD.addSelectionListener(this);
+
+        this.showHtmlInFile_Link_BackCMD = new Command(this.shell, Command.GENERAL, 1);
+        this.showHtmlInFile_Link_BackCMD.setText("Show - Link back");
+        this.showHtmlInFile_Link_BackCMD.addSelectionListener(this);
+
+        // listener adding submenu
+        Command cmdBookmarks = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdBookmarks.setText("Bookmarks");
+
+        for (int i =0; i < this.bookmarks.length; i++)
+        {
+            Command showBookMarkCMD = new Command(cmdBookmarks, Command.GENERAL, 1);
+            showBookMarkCMD.setText(this.bookmarks[i]);
+            showBookMarkCMD.addSelectionListener(this);
+        }
+    }
+
+    private void createBrowsers(int count)
+    {
+
+        switch (count)
+        {
+        case 1:
+            this.shell.setLayout(new FormLayout());
+            this.browser_top = new Browser(this.shell,SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+            this.browser_top.setBounds(10,10,200,300);
+            this.addCommands(browser_top);
+            break;
+        case 2:
+            FillLayout fillLayout = new FillLayout();
+            fillLayout.type = SWT.VERTICAL;
+            this.shell.setLayout(fillLayout);
+            this.browser_top = new Browser(this.shell,SWT.H_SCROLL | SWT.V_SCROLL);
+            this.browser_bottom = new Browser(this.shell, SWT.V_SCROLL);
+            this.addCommands(browser_top);
+            this.addCommands(browser_bottom);
+            break;
+        case 3:
+            FillLayout fillLayout2 = new FillLayout();
+            fillLayout2.type = SWT.VERTICAL;
+            this.shell.setLayout(fillLayout2);
+            this.browser_top = new Browser(this.shell,SWT.H_SCROLL | SWT.V_SCROLL);
+            this.browser_bottom = new Browser(this.shell, SWT.V_SCROLL);
+            this.browser_bottom_right = new Browser(this.shell,SWT.H_SCROLL);
+            this.addCommands(browser_top);
+            this.addCommands(browser_bottom);
+            this.addCommands(browser_bottom_right);
+
+            break;
+        case 4:
+            this.shell.setLayout(new GridLayout(2,true));
+            GridData data = new GridData();
+            data.grabExcessHorizontalSpace = true;
+            data.horizontalAlignment = SWT.CENTER;
+            data.grabExcessVerticalSpace = true;
+            data.verticalAlignment = SWT.CENTER;
+
+            this.browser_top = new Browser(this.shell,SWT.H_SCROLL | SWT.V_SCROLL);
+            this.browser_top.setLayoutData(data);
+            this.browser_top_right = new Browser(this.shell,SWT.BORDER);
+            this.browser_top_right.setLayoutData(data);
+            this.browser_bottom = new Browser(this.shell,SWT.BORDER);
+            this.browser_bottom.setLayoutData(data);
+            this.browser_bottom_right = new Browser(this.shell,SWT.H_SCROLL | SWT.V_SCROLL);
+            this.browser_bottom_right.setLayoutData(data);
+            this.addCommands(browser_top);
+            this.addCommands(browser_top_right);
+            this.addCommands(browser_bottom);
+            this.addCommands(browser_bottom_right);
+        default:
+            break;
+        }
+        this.shell.layout();
+        this.shell.update();
+
+    }
+
+    private void addCommands(Browser browser)
+    {
+        okCMD = new Command(browser, Command.GENERAL, 1);
+        okCMD.setText("Ok");
+        okCMD.addSelectionListener(this);
+
+        backCMD = new Command(browser, Command.GENERAL, 4);
+        backCMD.setText("Previous page");
+        backCMD.addSelectionListener(this);
+        forwardCMD = new Command(browser, Command.GENERAL, 3);
+        forwardCMD.setText("Next page");
+        forwardCMD.addSelectionListener(this);
+        refreshCMD = new Command(browser, Command.GENERAL, 2);
+        refreshCMD.setText("Refresh page");
+        refreshCMD.addSelectionListener(this);
+        stopCMD = new Command(browser, Command.GENERAL, 1);
+        stopCMD.setText("Stop loading");
+        stopCMD.addSelectionListener(this);
+
+        // listener adding submenu
+        Command cmdAddListener = new Command(browser, Command.COMMANDGROUP, 0);
+        cmdAddListener.setText("Add Listener");
+        this.addLocationListener = new Command(cmdAddListener, Command.GENERAL, 0);
+        this.addLocationListener.setText("LocationListener");
+        this.addLocationListener.addSelectionListener(this);
+
+        this.addProgressListener = new Command(cmdAddListener, Command.GENERAL, 0);
+        this.addProgressListener.setText("ProgressListener");
+        this.addProgressListener.addSelectionListener(this);
+
+        this.addStatusListener = new Command(cmdAddListener, Command.GENERAL, 0);
+        this.addStatusListener.setText("StatusTextListener");
+        this.addStatusListener.addSelectionListener(this);
+
+        this.addTitleListener = new Command(cmdAddListener, Command.GENERAL, 0);
+        this.addTitleListener.setText("TitleListener");
+        this.addTitleListener.addSelectionListener(this);
+
+        // listener removing submenu
+        Command cmdRemoveListener = new Command(browser, Command.COMMANDGROUP, 0);
+        cmdRemoveListener.setText("Remove Listener");
+        this.removeLocationListener = new Command(cmdRemoveListener, Command.GENERAL, 0);
+        this.removeLocationListener.setText("LocationListener");
+        this.removeLocationListener.addSelectionListener(this);
+
+        this.removeProgressListener = new Command(cmdRemoveListener, Command.GENERAL, 0);
+        this.removeProgressListener.setText("ProgressListener");
+        this.removeProgressListener.addSelectionListener(this);
+
+        this.removeStatusListener = new Command(cmdRemoveListener, Command.GENERAL, 0);
+        this.removeStatusListener.setText("StatusTextListener");
+        this.removeStatusListener.addSelectionListener(this);
+
+        this.removeTitleListener = new Command(cmdRemoveListener, Command.GENERAL, 0);
+        this.removeTitleListener.setText("TitleListener");
+        this.removeTitleListener.addSelectionListener(this);
+
+    }
+
+    /**
+     * Return currently focused browser.
+     * @return focused browser
+     */
+    private Browser getFocusedBrowser()
+    {
+        Browser result = null;
+
+        Control[] browsers = this.shell.getChildren();
+        for (int i=0; i<browsers.length; i++)
+        {
+            if (browsers[i].isFocusControl())
+            {
+                result = (Browser)(browsers[i]);
+                break;
+            }
+        }
+        return result;
+    }
+
+    public void widgetSelected(SelectionEvent e)
+    {
+
+        if (e.widget == this.okCMD)
+        {
+
+            return;
+        }
+        if (e.widget == this.browser1)
+        {
+            this.createBrowsers(1);
+            return;
+        }
+        if (e.widget == this.browser2)
+        {
+            this.createBrowsers(2);
+            return;
+        }
+        if (e.widget == this.browser3)
+        {
+            this.createBrowsers(3);
+            return;
+        }
+        if (e.widget == this.browser4)
+        {
+            this.createBrowsers(4);
+            return;
+        }
+        if (e.widget == this.showBrowserCMD)
+        {
+
+            this.getFocusedBrowser().setText(
+                "<HTML><HEAD><TITLE>Browser</TITLE></HEAD>HTML in Browser</HTML>");
+            return;
+
+        }
+        if (e.widget == this.showImageCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setText(
+                    "<HTML>" +
+                    "<HEAD><TITLE>Browser</TITLE></HEAD>" +
+                    "<BODY>" +
+                    "HTML in Browser with gif image" +
+                    "<img src="+'"'+this.smallimagefilename+'"'+"/>" +
+                    "And with png image" +
+                    "<img src="+'"'+this.bigimagefilename+'"'+"/>" +
+                    "And with jpg image" +
+                    "<img src="+'"'+this.labelimagefilename+'"'+"/>" +
+                    "</BODY>" +
+                    "</HTML>");
+            }
+            catch (Exception ex)
+            {
+                this.showException("Exception", ex.toString());
+            }
+            return;
+
+        }
+
+        if (e.widget == this.showURLCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setUrl("http://www.google.fi/");
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+
+
+        if (e.widget == this.showhttpsCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setUrl("https://www1.ietf.org/mailman/listinfo/simple");
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.showNotAvailableCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setUrl("http://www.notavailable.fi");
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.showHtmlInFile_LinkCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setUrl(this.linkfilename);
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.showHtmlInFile_Link_BackCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().setUrl(this.linkbackfilename);
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.backCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().back();
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.forwardCMD)
+        {
+
+            try
+            {
+                this.getFocusedBrowser().forward();
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.refreshCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().refresh();
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.stopCMD)
+        {
+            try
+            {
+                this.getFocusedBrowser().stop();
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+                this.showException("Exception", ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.addLocationListener)
+        {
+
+            this.getFocusedBrowser().addLocationListener(this);
+
+            return;
+        }
+        if (e.widget == this.addProgressListener)
+        {
+
+            this.getFocusedBrowser().addProgressListener(this);
+
+            return;
+        }
+        if (e.widget == this.addStatusListener)
+        {
+
+            this.getFocusedBrowser().addStatusTextListener(this);
+
+            return;
+        }
+        if (e.widget == this.addTitleListener)
+        {
+
+            this.getFocusedBrowser().addTitleListener(this);
+
+            return;
+        }
+        if (e.widget == this.removeLocationListener)
+        {
+
+            this.getFocusedBrowser().removeLocationListener(this);
+
+            return;
+        }
+        if (e.widget == this.removeProgressListener)
+        {
+
+            this.getFocusedBrowser().removeProgressListener(this);
+
+            return;
+        }
+        if (e.widget == this.removeStatusListener)
+        {
+
+            this.getFocusedBrowser().removeStatusTextListener(this);
+
+            return;
+        }
+        if (e.widget == this.removeTitleListener)
+        {
+
+            this.getFocusedBrowser().removeTitleListener(this);
+
+            return;
+        }
+        if (e.widget instanceof Command)
+        {
+            String scmd = ((Command) e.widget).getText();
+            for (int i =0; i < this.bookmarks.length; i++)
+            {
+                if (this.bookmarks[i].equals(scmd))
+                {
+
+                    try
+                    {
+                        this.getFocusedBrowser().setUrl(this.bookmarks_urls[i]);
+                    }
+                    catch (Exception ex)
+                    {
+                        ex.printStackTrace();
+                        this.showException("Exception", ex.toString());
+                    }
+                    return;
+                }
+            }
+        }
+        super.widgetSelected(e);
+    }
+
+    public void changed(LocationEvent event)
+    {
+        this.showException("Location - changed",event.location);
+    }
+    public void changing(LocationEvent event)
+    {
+        this.showException("Location - changing",event.location);
+    }
+    public void changed(ProgressEvent event)
+    {
+
+    }
+    public void completed(ProgressEvent event)
+    {
+
+    }
+    public void changed(StatusTextEvent event)
+    {
+        this.showException("Status Text",event.text);
+    }
+    public void changed(TitleEvent event)
+    {
+        this.showException("Title",event.title);
+    }
+
+    public void copyResToFile(String resource, FileConnection destination)
+    {
+        OutputStream output = null;
+        InputStream input = null;
+        try
+        {
+            input = this.getClass().getResourceAsStream(resource);
+            output = destination.openOutputStream();;
+
+            byte[] buffer = new byte[1024];
+
+            int bytesRead = input.read(buffer);
+
+            while (bytesRead >= 0)
+            {
+                output.write(buffer, 0, bytesRead);
+                bytesRead = input.read(buffer);
+            }
+
+            input.close();
+
+            output.close();
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Exception",resource +"could not be loaded:"+ex.getMessage());
+
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/BrowserTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="ButtonTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ButtonTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.button.ButtonTestMIDlet_01"/>
+    <property name="midlet2.name" value="ButtonTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.button.ButtonTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ButtonTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
Binary file javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/SmallLabel.jpg has changed
Binary file javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/ButtonTestMidletSuite/res/res/sphere.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/button/ButtonTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,747 @@
+/*
+* 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.test.java.eswt.button;
+
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the label component
+ * - changing the aligment of label
+ * - changing title & image
+ */
+public class ButtonTestMIDlet_01 extends TestBaseMIDlet
+{
+    /**  push text button */
+    private Button txtButton = null;
+    /**  check button */
+    private Button checkButton = null;
+    /** radio button */
+    private Button radioButton = null;
+    /**  toggle button */
+    private Button toggleButton = null;
+
+    /**  counter button */
+    private Button counterButton = null;
+
+    /** push image button */
+    private Button imgButton = null;
+    /** check image button */
+    private Button imgCheckButton = null;
+    /** radio image button */
+    private Button imgRadioButton = null;
+    /** toggle image button */
+    private Button imgToggleButton = null;
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** trans image */
+    private Image transimg = null;
+
+    private Shell tooltip = null;
+
+    private Button tooltipButton = null;
+    private Button tooltipCloseButton = null;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Button test");
+        this.shell.setLayout(new GridLayout());
+
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Transparent image could not be loaded");
+            this.transimg = null;
+        }
+
+        // text buttons
+
+        // image buttons
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "add" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Add");
+        item.setMenu(menu);
+        // "Push" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Check");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio Group");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Toggle");
+        item.addSelectionListener(this);
+        // "Push" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push-image");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Check-image");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Toggle-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Counter");
+        item.addSelectionListener(this);
+        // "flat" submenu
+        Menu menu2 = new Menu(menu);
+        item = new MenuItem(menu, SWT.CASCADE);
+        item.setText("Flat");
+        item.setMenu(menu2);
+        // "Push" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Push");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Check");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Radio");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Toggle");
+        item.addSelectionListener(this);
+        // "Push" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Push-image");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Check-image");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Radio-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Toggle-image");
+        item.addSelectionListener(this);
+        // "alignment" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Alignment");
+        item.setMenu(menu);
+        // "left" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Left");
+        item.addSelectionListener(this);
+        // "center" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Center");
+        item.addSelectionListener(this);
+        // "right" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Right");
+        item.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "null" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "small" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Small");
+        item.addSelectionListener(this);
+        // "big" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Big");
+        item.addSelectionListener(this);
+        // "trans" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Trans");
+        item.addSelectionListener(this);
+        // "invalid" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Invalid");
+        item.addSelectionListener(this);
+        // "change text" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Change Text");
+        item.addSelectionListener(this);
+        // "default button" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Set as Default Button");
+        item.addSelectionListener(this);
+        // "other shell" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("New Shell");
+        item.addSelectionListener(this);
+        // "Selection" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set Selection");
+        item.setMenu(menu);
+        // "selected" menuitem for "Selection" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Unselect All");
+        item.addSelectionListener(this);
+        // "all" menuitem for "Selection" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Select All");
+        item.addSelectionListener(this);
+        // "Clear" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Clear All");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * Return currently focused button.
+     * @return focused button
+     */
+    private Button getFocusedButton()
+    {
+        Button result = null;
+
+        Control[] buttons = this.shell.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            if (buttons[i].isFocusControl())
+            {
+                result = (Button)buttons[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+    /**
+     * Return currently focused button.
+     * @return focused button
+     */
+    private void changeAlignment(int align)
+    {
+
+        Control[] buttons = this.shell.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            ((Button)buttons[i]).setAlignment(align);
+        }
+    }
+    private void changeSelectionForAll(boolean select)
+    {
+
+        Control[] buttons = this.shell.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            ((Button)buttons[i]).setSelection(select);
+        }
+    }
+    private void clearShell()
+    {
+        Control[] buttons = this.shell.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            buttons[i].dispose();
+        }
+    }
+    private void createToolTip(String msg,Button button)
+    {
+
+        // create a modeless shell with border
+        int style = SWT.NONE;
+
+        if (msg.equals("Push"))
+            style = SWT.APPLICATION_MODAL | SWT.BORDER;
+        else if (msg.equals("Flat Push"))
+            style = SWT.APPLICATION_MODAL | SWT.NO_FOCUS | SWT.DIALOG_TRIM;
+        else if (msg.equals("Toggle"))
+            style = SWT.MODELESS | SWT.DIALOG_TRIM;
+        else if (msg.equals("Flat Toggle"))
+            style = SWT.SHELL_TRIM;
+        else if (msg.equals("Push-image"))
+            style = SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM;
+        else if (msg.equals("Toggle-image"))
+            style = SWT.MODELESS | SWT.BORDER;
+
+
+        this.tooltip = new Shell(this.shell, style);
+        this.tooltip.setLayout(new RowLayout(SWT.VERTICAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        tooltipButton = new Button(this.tooltip,SWT.BORDER|SWT.PUSH);
+        tooltipButton.setText("Maximize");
+        tooltipButton.addSelectionListener(this);
+
+        tooltip.setDefaultButton(tooltipButton);
+
+        if (msg.equals("Toggle"))
+        {
+            tooltipCloseButton = new Button(this.tooltip,SWT.BORDER|SWT.PUSH);
+            tooltipCloseButton.setText("Close");
+            tooltipCloseButton.addSelectionListener(this);
+            tooltip.setDefaultButton(tooltipButton);
+        }
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(10, Display.getCurrent().getBounds().height/2);
+        Menu mainmenu = new Menu(this.tooltip, SWT.BAR);
+        this.tooltip.setMenuBar(mainmenu);
+
+        // "Close" menuitem for shell
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Close");
+        item.addSelectionListener(this);
+
+        // finalize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.open();
+
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Button)
+        {
+            String scmd = ((Button) event.widget).getText();
+            if ("Push".equals(scmd) || "Flat Push".equals(scmd))
+            {
+                this.createToolTip(scmd,(Button)event.widget);
+                this.tooltip.setVisible(true);
+            }
+            else if ("Toggle".equals(scmd) || "Flat Toggle".equals(scmd))
+            {
+                this.createToolTip(scmd,(Button)event.widget);
+                return;
+            }
+            else if ("Maximize".equals(scmd))
+            {
+                this.tooltip.setMaximized(true);
+                this.tooltipButton.setText("Restore");
+                return;
+            }
+            else if ("Restore".equals(scmd))
+            {
+                this.tooltip.setMaximized(false);
+                this.tooltipButton.setText("Maximize");
+                return;
+            }
+            else if (event.widget.equals(this.counterButton))
+            {
+                this.counterButton.setText(this.counterButton.getText()+1);
+                return;
+            }
+            else if (event.widget.equals(this.tooltipCloseButton))
+            {
+                this.tooltip.setVisible(false);
+                this.tooltip.dispose();
+                return;
+            }
+
+            return;
+        }
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Push".equals(scmd) || "Flat Push".equals(scmd) || "Counter".equals(scmd))
+            {
+                if ("Push".equals(scmd))
+                {
+                    this.txtButton = new Button(this.shell, SWT.BORDER|SWT.PUSH);
+                    this.txtButton.setText("Push");
+                }
+                else if ("Counter".equals(scmd))
+                {
+                    this.counterButton = new Button(this.shell, SWT.BORDER|SWT.PUSH);
+                    this.counterButton.setText("0");
+                    this.counterButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                    this.counterButton.addSelectionListener(this);
+                    this.shell.layout();
+                    this.shell.update();
+                    return;
+                }
+                else
+                {
+                    this.txtButton = new Button(this.shell, SWT.BORDER |SWT.FLAT);
+                    this.txtButton.setText("Flat Push");
+                }
+                this.txtButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.txtButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Check".equals(scmd) || "Flat Check".equals(scmd))
+            {
+                if ("Check".equals(scmd))
+                {
+                    this.checkButton = new Button(this.shell, SWT.BORDER|SWT.CHECK);
+                    this.checkButton.setText("Check");
+                }
+                else
+                {
+                    this.checkButton = new Button(this.shell, SWT.BORDER|SWT.CHECK|SWT.FLAT);
+                    this.checkButton.setText("Flat Check");
+                }
+                this.checkButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.checkButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio".equals(scmd) || "Flat Radio".equals(scmd))
+            {
+                if ("Radio".equals(scmd))
+                {
+                    this.radioButton = new Button(this.shell, SWT.BORDER|SWT.RADIO);
+                    this.radioButton.setText("Radio");
+                }
+                else
+                {
+                    this.radioButton = new Button(this.shell, SWT.BORDER|SWT.RADIO|SWT.FLAT);
+                    this.radioButton.setText("Radio");
+                }
+                this.radioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.radioButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio Group".equals(scmd))
+            {
+
+                Button radioButton1 = new Button(this.shell, SWT.BORDER|SWT.RADIO);
+                radioButton1.setText("Item 1");
+                radioButton1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton1.addSelectionListener(this);
+                Button radioButton2 = new Button(this.shell, SWT.BORDER|SWT.RADIO);
+                radioButton2.setText("Item 2");
+                radioButton2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton2.addSelectionListener(this);
+                Button radioButton3 = new Button(this.shell, SWT.BORDER|SWT.RADIO);
+                radioButton3.setText("Item 3");
+                radioButton3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton3.addSelectionListener(this);
+
+                this.shell.layout();
+                this.shell.update();
+                return;
+
+            }
+            else if ("Toggle".equals(scmd) || "Flat Toggle".equals(scmd))
+            {
+                if ("Toggle".equals(scmd))
+                {
+                    this.toggleButton = new Button(this.shell, SWT.BORDER|SWT.TOGGLE);
+                    this.toggleButton.setText("Toggle");
+                }
+                else
+                {
+                    this.toggleButton = new Button(this.shell, SWT.BORDER|SWT.TOGGLE |SWT.FLAT);
+                    this.toggleButton.setText("Flat Toggle");
+                }
+                this.toggleButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.toggleButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Push-image".equals(scmd) || "Flat Push-image".equals(scmd))
+            {
+                if ("Push-image".equals(scmd))
+                {
+                    this.imgButton = new Button(this.shell, SWT.BORDER);
+                    this.imgButton.setImage(this.smallimg);
+                }
+                else
+                {
+                    this.imgButton = new Button(this.shell, SWT.BORDER|SWT.FLAT);
+                    this.imgButton.setImage(this.smallimg);
+                }
+                this.imgButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+                this.imgButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Check-image".equals(scmd) || "Flat Check-image".equals(scmd))
+            {
+                if ("Check-image".equals(scmd))
+                {
+                    this.imgCheckButton = new Button(this.shell, SWT.CHECK);
+                    this.imgCheckButton.setImage(this.smallimg);
+                }
+                else
+                {
+                    this.imgCheckButton = new Button(this.shell, SWT.CHECK|SWT.FLAT);
+                    this.imgCheckButton.setImage(this.smallimg);
+                }
+                this.imgCheckButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgCheckButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio-image".equals(scmd) || "Flat Radio-image".equals(scmd))
+            {
+                if ("Radio-image".equals(scmd))
+                    this.imgRadioButton = new Button(this.shell, SWT.BORDER|SWT.RADIO);
+                else
+                    this.imgRadioButton = new Button(this.shell, SWT.BORDER|SWT.RADIO|SWT.FLAT);
+
+                this.imgRadioButton.setImage(this.smallimg);
+                this.imgRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgRadioButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Toggle-image".equals(scmd) || "Flat Toggle-image".equals(scmd))
+            {
+                if ("Toggle-image".equals(scmd))
+                    this.imgToggleButton = new Button(this.shell, SWT.TOGGLE);
+                else
+                    this.imgToggleButton = new Button(this.shell, SWT.TOGGLE|SWT.FLAT);
+
+                this.imgToggleButton.setImage(this.smallimg);
+                this.imgToggleButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgToggleButton.addSelectionListener(this);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            if ("Left".equals(scmd))
+            {
+                // set left alignment for all buttons
+                this.changeAlignment(SWT.LEFT);
+                return;
+            }
+            if ("Center".equals(scmd))
+            {
+                // set center alignment for all buttons
+                this.changeAlignment(SWT.CENTER);
+                return;
+            }
+            if ("Right".equals(scmd))
+            {
+                // set right alignment for all buttons
+                this.changeAlignment(SWT.RIGHT);
+                return;
+            }
+            if ("Null".equals(scmd))
+            {
+                // change image label to null
+                this.imgButton.setImage(null);
+
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Small".equals(scmd))
+            {
+                // change image label to small image
+                this.imgButton.setImage(this.smallimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Big".equals(scmd))
+            {
+                // change image label to big image
+                this.imgButton.setImage(this.bigimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Trans".equals(scmd))
+            {
+                // change image label to big image
+                this.imgButton.setImage(this.transimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+
+            if ("Invalid".equals(scmd))
+            {
+                // try to change the image label to an invalid image
+                try
+                {
+                    this.imgButton.setImage(new Image(this.display, this.getClass().getResourceAsStream("/res/invalid.png")));
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    this.showException(ex.getMessage());
+                }
+                return;
+            }
+
+            if ("Change Text".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                // query dialog for new label text
+                QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+                dlg.setPromptText("Enter text:", focused.getText());
+                dlg.setMinimum(1);
+                dlg.setMaximum(50);
+                String txt = dlg.open();
+                if (txt != null)
+                    focused.setText(txt);
+                this.shell.update();
+                return;
+            }
+            if ("Set as Default Button".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                this.shell.setDefaultButton(focused);
+                return;
+            }
+            if ("New Shell".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                this.createToolTip("New shell",focused);
+                this.tooltip.setVisible(true);
+                return;
+            }
+            if ("Close".equals(scmd))
+            {
+                this.tooltip.setVisible(false);
+                this.tooltip.dispose();
+                return;
+            }
+            if ("Select All".equals(scmd))
+            {
+                this.changeSelectionForAll(true);
+                return;
+            }
+            if ("Unselect All".equals(scmd))
+            {
+                this.changeSelectionForAll(false);
+                return;
+            }
+            if ("Clear All".equals(scmd))
+            {
+                this.clearShell();
+                return;
+            }
+        }
+        else if (event.widget == this.cmdExit)
+        {
+            // dispose the images before exit
+            if (this.smallimg != null && !this.smallimg.isDisposed())
+                this.smallimg.dispose();
+            if (this.bigimg != null && !this.bigimg.isDisposed())
+                this.bigimg.dispose();
+        }
+        super.widgetSelected(event);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/button/ButtonTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,810 @@
+/*
+* 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.test.java.eswt.button;
+
+import org.eclipse.ercp.swt.mobile.MobileDevice;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.ercp.swt.mobile.Screen;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the label component
+ * - changing the aligment of label
+ * - changing title & image
+ */
+public class ButtonTestMIDlet_02 extends TestBaseMIDlet
+{
+    /**  push text button */
+    private Button txtButton = null;
+    /**  check button */
+    private Button checkButton = null;
+    /** radio button */
+    private Button radioButton = null;
+    /**  toggle button */
+    private Button toggleButton = null;
+
+    /**  counter button */
+    private Button counterButton = null;
+
+    /** push image button */
+    private Button imgButton = null;
+    /** check image button */
+    private Button imgCheckButton = null;
+    /** radio image button */
+    private Button imgRadioButton = null;
+    /** toggle image button */
+    private Button imgToggleButton = null;
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** trans image */
+    private Image transimg = null;
+
+    private Shell tooltip = null;
+
+    private Button tooltipButton = null;
+    private Button tooltipCloseButton = null;
+
+    private ScrolledComposite sc1           = null;
+    private Composite c1                    = null;
+    private Listener focus_listener         = null;
+    private MobileDevice iDevice;
+    private Screen[] iScreen;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Button test");
+        this.shell.setLayout(new GridLayout());
+
+        this.sc1 = new ScrolledComposite(this.shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+        sc1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+        this.c1 = new Composite(sc1, SWT.NONE);
+        sc1.setContent(c1);
+        GridLayout clayout = new GridLayout(1, false);
+        this.c1.setLayout(clayout);
+        c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+
+        iDevice = MobileDevice.getMobileDevice();
+        iScreen = iDevice.getScreens();
+
+        focus_listener = new Listener()
+        {
+            public void handleEvent(Event e)
+            {
+                sc1.showControl((Control)e.widget);
+            }
+        };
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Transparent image could not be loaded");
+            this.transimg = null;
+        }
+
+        // text buttons
+
+        // image buttons
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "add" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Add");
+        item.setMenu(menu);
+        // "Push" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Check");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio Group");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Toggle");
+        item.addSelectionListener(this);
+        // "Push" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push-image");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Check-image");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Radio-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Toggle-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "add" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Counter");
+        item.addSelectionListener(this);
+        // "flat" submenu
+        Menu menu2 = new Menu(menu);
+        item = new MenuItem(menu, SWT.CASCADE);
+        item.setText("Flat");
+        item.setMenu(menu2);
+        // "Push" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Push");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Check");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Radio");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Toggle");
+        item.addSelectionListener(this);
+        // "Push" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Push-image");
+        item.addSelectionListener(this);
+        // "Check" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Check-image");
+        item.addSelectionListener(this);
+        // "Radio" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Radio-image");
+        item.addSelectionListener(this);
+        // "Toggle" menuitem for "Flat" submenu
+        item = new MenuItem(menu2, SWT.PUSH);
+        item.setText("Flat Toggle-image");
+        item.addSelectionListener(this);
+        // "alignment" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Alignment");
+        item.setMenu(menu);
+        // "left" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Left");
+        item.addSelectionListener(this);
+        // "center" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Center");
+        item.addSelectionListener(this);
+        // "right" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Right");
+        item.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "null" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "small" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Small");
+        item.addSelectionListener(this);
+        // "big" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Big");
+        item.addSelectionListener(this);
+        // "trans" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Trans");
+        item.addSelectionListener(this);
+        // "invalid" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Invalid");
+        item.addSelectionListener(this);
+        // "change text" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Change Text");
+        item.addSelectionListener(this);
+        // "default button" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Set as Default Button");
+        item.addSelectionListener(this);
+        // "other shell" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("New Shell");
+        item.addSelectionListener(this);
+        // "Selection" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set Selection");
+        item.setMenu(menu);
+        // "selected" menuitem for "Selection" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Unselect All");
+        item.addSelectionListener(this);
+        // "all" menuitem for "Selection" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Select All");
+        item.addSelectionListener(this);
+        // "Clear" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Clear All");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * Return currently focused button.
+     * @return focused button
+     */
+    private Button getFocusedButton()
+    {
+        Button result = null;
+
+        Control[] buttons = this.c1.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            if (buttons[i].isFocusControl())
+            {
+                result = (Button)buttons[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+    /**
+     * Return currently focused button.
+     * @return focused button
+     */
+    private void changeAlignment(int align)
+    {
+
+        Control[] buttons = this.c1.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            ((Button)buttons[i]).setAlignment(align);
+        }
+    }
+    private void changeSelectionForAll(boolean select)
+    {
+
+        Control[] buttons = this.c1.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            ((Button)buttons[i]).setSelection(select);
+        }
+    }
+    private void clearShell()
+    {
+        Control[] buttons = this.c1.getChildren();
+        for (int i=0; i<buttons.length; i++)
+        {
+            buttons[i].dispose();
+        }
+    }
+    private void createToolTip(String msg,Button button)
+    {
+
+        // create a modeless shell with border
+        int style = SWT.NONE;
+
+        if (msg.equals("Push"))
+            style = SWT.APPLICATION_MODAL | SWT.BORDER;
+        else if (msg.equals("Flat Push"))
+            style = SWT.APPLICATION_MODAL | SWT.NO_FOCUS | SWT.DIALOG_TRIM;
+        else if (msg.equals("Toggle"))
+            style = SWT.MODELESS | SWT.DIALOG_TRIM;
+        else if (msg.equals("Flat Toggle"))
+            style = SWT.SHELL_TRIM;
+        else if (msg.equals("Push-image"))
+            style = SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM;
+        else if (msg.equals("Toggle-image"))
+            style = SWT.MODELESS | SWT.BORDER;
+
+
+        this.tooltip = new Shell(this.shell, style);
+        this.tooltip.setLayout(new RowLayout(SWT.VERTICAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        tooltipButton = new Button(this.tooltip,SWT.BORDER|SWT.PUSH);
+        tooltipButton.setText("Maximize");
+        tooltipButton.addSelectionListener(this);
+
+        tooltip.setDefaultButton(tooltipButton);
+
+        if (msg.equals("Toggle"))
+        {
+            tooltipCloseButton = new Button(this.tooltip,SWT.BORDER|SWT.PUSH);
+            tooltipCloseButton.setText("Close");
+            tooltipCloseButton.addSelectionListener(this);
+            tooltip.setDefaultButton(tooltipButton);
+        }
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(10, Display.getCurrent().getBounds().height/2);
+        Menu mainmenu = new Menu(this.tooltip, SWT.BAR);
+        this.tooltip.setMenuBar(mainmenu);
+
+        // "Close" menuitem for shell
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Close");
+        item.addSelectionListener(this);
+
+        // finalize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.open();
+
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Button)
+        {
+            String scmd = ((Button) event.widget).getText();
+            if ("Push".equals(scmd) || "Flat Push".equals(scmd))
+            {
+                this.createToolTip(scmd,(Button)event.widget);
+                this.tooltip.setVisible(true);
+            }
+            else if ("Toggle".equals(scmd) || "Flat Toggle".equals(scmd))
+            {
+                this.createToolTip(scmd,(Button)event.widget);
+                return;
+            }
+            else if ("Maximize".equals(scmd))
+            {
+                this.tooltip.setMaximized(true);
+                this.tooltipButton.setText("Restore");
+                return;
+            }
+            else if ("Restore".equals(scmd))
+            {
+                this.tooltip.setMaximized(false);
+                this.tooltipButton.setText("Maximize");
+                return;
+            }
+            else if (event.widget.equals(this.counterButton))
+            {
+                this.counterButton.setText(this.counterButton.getText()+1);
+                return;
+            }
+            else if (event.widget.equals(this.tooltipCloseButton))
+            {
+                this.tooltip.setVisible(false);
+                this.tooltip.dispose();
+                return;
+            }
+
+            return;
+        }
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Push".equals(scmd) || "Flat Push".equals(scmd) || "Counter".equals(scmd))
+            {
+                if ("Push".equals(scmd))
+                {
+                    this.txtButton = new Button(this.c1, SWT.BORDER|SWT.PUSH);
+                    this.txtButton.setText("Push");
+                    this.txtButton.addListener(SWT.FocusIn, focus_listener);
+                }
+                else if ("Counter".equals(scmd))
+                {
+                    this.counterButton = new Button(this.c1, SWT.BORDER|SWT.PUSH);
+                    this.counterButton.setText("0");
+                    this.counterButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                    this.counterButton.addSelectionListener(this);
+                    this.counterButton.addListener(SWT.FocusIn, focus_listener);
+                    c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                    c1.layout();
+                    this.shell.layout();
+                    this.shell.update();
+                    return;
+                }
+                else
+                {
+                    this.txtButton = new Button(this.c1, SWT.BORDER |SWT.FLAT);
+                    this.txtButton.setText("Flat Push");
+                    this.txtButton.addListener(SWT.FocusIn, focus_listener);
+                }
+                this.txtButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.txtButton.addSelectionListener(this);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Check".equals(scmd) || "Flat Check".equals(scmd))
+            {
+                if ("Check".equals(scmd))
+                {
+                    this.checkButton = new Button(this.c1, SWT.BORDER|SWT.CHECK);
+                    this.checkButton.setText("Check");
+                }
+                else
+                {
+                    this.checkButton = new Button(this.c1, SWT.BORDER|SWT.CHECK|SWT.FLAT);
+                    this.checkButton.setText("Flat Check");
+                }
+                this.checkButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.checkButton.addSelectionListener(this);
+                this.checkButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio".equals(scmd) || "Flat Radio".equals(scmd))
+            {
+                if ("Radio".equals(scmd))
+                {
+                    this.radioButton = new Button(this.c1, SWT.BORDER|SWT.RADIO);
+                    this.radioButton.setText("Radio");
+                }
+                else
+                {
+                    this.radioButton = new Button(this.c1, SWT.BORDER|SWT.RADIO|SWT.FLAT);
+                    this.radioButton.setText("Radio");
+                }
+                this.radioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.radioButton.addSelectionListener(this);
+                this.radioButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio Group".equals(scmd))
+            {
+
+                Button radioButton1 = new Button(this.c1, SWT.BORDER|SWT.RADIO);
+                radioButton1.setText("Item 1");
+                radioButton1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton1.addSelectionListener(this);
+                Button radioButton2 = new Button(this.c1, SWT.BORDER|SWT.RADIO);
+                radioButton2.setText("Item 2");
+                radioButton2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton2.addSelectionListener(this);
+                Button radioButton3 = new Button(this.c1, SWT.BORDER|SWT.RADIO);
+                radioButton3.setText("Item 3");
+                radioButton3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                radioButton3.addSelectionListener(this);
+                radioButton1.addListener(SWT.FocusIn, focus_listener);
+                radioButton2.addListener(SWT.FocusIn, focus_listener);
+                radioButton3.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+
+            }
+            else if ("Toggle".equals(scmd) || "Flat Toggle".equals(scmd))
+            {
+                if ("Toggle".equals(scmd))
+                {
+                    this.toggleButton = new Button(this.c1, SWT.BORDER|SWT.TOGGLE);
+                    this.toggleButton.setText("Toggle");
+                }
+                else
+                {
+                    this.toggleButton = new Button(this.c1, SWT.BORDER|SWT.TOGGLE |SWT.FLAT);
+                    this.toggleButton.setText("Flat Toggle");
+                }
+                this.toggleButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.toggleButton.addSelectionListener(this);
+                this.toggleButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Push-image".equals(scmd) || "Flat Push-image".equals(scmd))
+            {
+                if ("Push-image".equals(scmd))
+                {
+                    this.imgButton = new Button(this.c1, SWT.BORDER);
+                    this.imgButton.setImage(this.smallimg);
+                }
+                else
+                {
+                    this.imgButton = new Button(this.c1, SWT.BORDER|SWT.FLAT);
+                    this.imgButton.setImage(this.smallimg);
+                }
+                this.imgButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+                this.imgButton.addSelectionListener(this);
+                this.imgButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Check-image".equals(scmd) || "Flat Check-image".equals(scmd))
+            {
+                if ("Check-image".equals(scmd))
+                {
+                    this.imgCheckButton = new Button(this.c1, SWT.CHECK);
+                    this.imgCheckButton.setImage(this.smallimg);
+                }
+                else
+                {
+                    this.imgCheckButton = new Button(this.c1, SWT.CHECK|SWT.FLAT);
+                    this.imgCheckButton.setImage(this.smallimg);
+                }
+                this.imgCheckButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgCheckButton.addSelectionListener(this);
+                this.imgCheckButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Radio-image".equals(scmd) || "Flat Radio-image".equals(scmd))
+            {
+                if ("Radio-image".equals(scmd))
+                    this.imgRadioButton = new Button(this.c1, SWT.BORDER|SWT.RADIO);
+                else
+                    this.imgRadioButton = new Button(this.c1, SWT.BORDER|SWT.RADIO|SWT.FLAT);
+
+                this.imgRadioButton.setImage(this.smallimg);
+                this.imgRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgRadioButton.addSelectionListener(this);
+                this.imgRadioButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            else if ("Toggle-image".equals(scmd) || "Flat Toggle-image".equals(scmd))
+            {
+                if ("Toggle-image".equals(scmd))
+                    this.imgToggleButton = new Button(this.c1, SWT.TOGGLE);
+                else
+                    this.imgToggleButton = new Button(this.c1, SWT.TOGGLE|SWT.FLAT);
+
+                this.imgToggleButton.setImage(this.smallimg);
+                this.imgToggleButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                this.imgToggleButton.addSelectionListener(this);
+                this.imgToggleButton.addListener(SWT.FocusIn, focus_listener);
+                c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+                c1.layout();
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            if ("Left".equals(scmd))
+            {
+                // set left alignment for all buttons
+                this.changeAlignment(SWT.LEFT);
+                return;
+            }
+            if ("Center".equals(scmd))
+            {
+                // set center alignment for all buttons
+                this.changeAlignment(SWT.CENTER);
+                return;
+            }
+            if ("Right".equals(scmd))
+            {
+                // set right alignment for all buttons
+                this.changeAlignment(SWT.RIGHT);
+                return;
+            }
+            if ("Null".equals(scmd))
+            {
+                // change image label to null
+                this.imgButton.setImage(null);
+
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Small".equals(scmd))
+            {
+                // change image label to small image
+                this.imgButton.setImage(this.smallimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Big".equals(scmd))
+            {
+                // change image label to big image
+                this.imgButton.setImage(this.bigimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+            if ("Trans".equals(scmd))
+            {
+                // change image label to big image
+                this.imgButton.setImage(this.transimg);
+                this.shell.layout();
+                this.shell.redraw();
+                this.shell.update();
+                return;
+            }
+
+            if ("Invalid".equals(scmd))
+            {
+                // try to change the image label to an invalid image
+                try
+                {
+                    this.imgButton.setImage(new Image(this.display, this.getClass().getResourceAsStream("/res/invalid.png")));
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    this.showException(ex.getMessage());
+                }
+                return;
+            }
+
+            if ("Change Text".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                // query dialog for new label text
+                QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+                dlg.setPromptText("Enter text:", focused.getText());
+                dlg.setMinimum(1);
+                dlg.setMaximum(50);
+                String txt = dlg.open();
+                if (txt != null)
+                    focused.setText(txt);
+                this.shell.update();
+                return;
+            }
+            if ("Set as Default Button".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                this.shell.setDefaultButton(focused);
+                return;
+            }
+            if ("New Shell".equals(scmd))
+            {
+                Button focused = this.getFocusedButton();
+                this.createToolTip("New shell",focused);
+                this.tooltip.setVisible(true);
+                return;
+            }
+            if ("Close".equals(scmd))
+            {
+                this.tooltip.setVisible(false);
+                this.tooltip.dispose();
+                return;
+            }
+            if ("Select All".equals(scmd))
+            {
+                this.changeSelectionForAll(true);
+                return;
+            }
+            if ("Unselect All".equals(scmd))
+            {
+                this.changeSelectionForAll(false);
+                return;
+            }
+            if ("Clear All".equals(scmd))
+            {
+                this.clearShell();
+                return;
+            }
+        }
+        else if (event.widget == this.cmdExit)
+        {
+            // dispose the images before exit
+            if (this.smallimg != null && !this.smallimg.isDisposed())
+                this.smallimg.dispose();
+            if (this.bigimg != null && !this.bigimg.isDisposed())
+                this.bigimg.dispose();
+        }
+        super.widgetSelected(event);
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,758 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *       Nokia Corporation - S60 implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * A ScrolledComposite provides scrollbars and will scroll its content when the user
+ * uses the scrollbars.
+ *
+ *
+ * <p>There are two ways to use the ScrolledComposite:
+ *
+ * <p>
+ * 1) Set the size of the control that is being scrolled and the ScrolledComposite
+ * will show scrollbars when the contained control can not be fully seen.
+ *
+ * 2) The second way imitates the way a browser would work.  Set the minimum size of
+ * the control and the ScrolledComposite will show scroll bars if the visible area is
+ * less than the minimum size of the control and it will expand the size of the control
+ * if the visible area is greater than the minimum size.  This requires invoking
+ * both setMinWidth(), setMinHeight() and setExpandHorizontal(), setExpandVertical().
+ *
+ * <code><pre>
+ * public static void main (String [] args) {
+ *      Display display = new Display ();
+ *      Color red = display.getSystemColor(SWT.COLOR_RED);
+ *      Color blue = display.getSystemColor(SWT.COLOR_BLUE);
+ *      Shell shell = new Shell (display);
+ *      shell.setLayout(new FillLayout());
+ *
+ *      // set the size of the scrolled content - method 1
+ *      final ScrolledComposite sc1 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      final Composite c1 = new Composite(sc1, SWT.NONE);
+ *      sc1.setContent(c1);
+ *      c1.setBackground(red);
+ *      GridLayout layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c1.setLayout(layout);
+ *      Button b1 = new Button (c1, SWT.PUSH);
+ *      b1.setText("first button");
+ *      c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      // set the minimum width and height of the scrolled content - method 2
+ *      final ScrolledComposite sc2 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      sc2.setExpandHorizontal(true);
+ *      sc2.setExpandVertical(true);
+ *      final Composite c2 = new Composite(sc2, SWT.NONE);
+ *      sc2.setContent(c2);
+ *      c2.setBackground(blue);
+ *      layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c2.setLayout(layout);
+ *      Button b2 = new Button (c2, SWT.PUSH);
+ *      b2.setText("first button");
+ *      sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      Button add = new Button (shell, SWT.PUSH);
+ *      add.setText("add children");
+ *      final int[] index = new int[]{0};
+ *      add.addListener(SWT.Selection, new Listener() {
+ *          public void handleEvent(Event e) {
+ *              index[0]++;
+ *              Button button = new Button(c1, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset size of content so children can be seen - method 1
+ *              c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c1.layout();
+ *
+ *              button = new Button(c2, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset the minimum width and height so children can be seen - method 2
+ *              sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c2.layout();
+ *          }
+ *      });
+ *
+ *      shell.open ();
+ *      while (!shell.isDisposed ()) {
+ *          if (!display.readAndDispatch ()) display.sleep ();
+ *      }
+ *      display.dispose ();
+ * }
+ * </pre></code>
+ *
+ * <dl>
+ * <dt><b>Styles:</b><dd>H_SCROLL, V_SCROLL
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#scrolledcomposite">ScrolledComposite snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ */
+public class ScrolledComposite extends Composite
+{
+
+    Control content;
+    Listener contentListener;
+    Listener filter;
+
+    int minHeight = 0;
+    int minWidth = 0;
+    boolean expandHorizontal = false;
+    boolean expandVertical = false;
+    boolean alwaysShowScroll = false;
+    boolean showFocusedControl = false;
+
+    /**
+     * Constructs a new instance of this class given its parent
+     * and a style value describing its behavior and appearance.
+     * <p>
+     * The style value is either one of the style constants defined in
+     * class <code>SWT</code> which is applicable to instances of this
+     * class, or must be built by <em>bitwise OR</em>'ing together
+     * (that is, using the <code>int</code> "|" operator) two or more
+     * of those <code>SWT</code> style constants. The class description
+     * lists the style constants that are applicable to the class.
+     * Style bits are also inherited from superclasses.
+     * </p>
+     *
+     * @param parent a widget which will be the parent of the new instance (cannot be null)
+     * @param style the style of widget to construct
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+     * </ul>
+     *
+     * @see SWT#H_SCROLL
+     * @see SWT#V_SCROLL
+     * @see #getStyle()
+     */
+    public ScrolledComposite(Composite parent, int style)
+    {
+        super(parent, checkStyle(style));
+        super.setLayout(new ScrolledCompositeLayout());
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setVisible(false);
+            hBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Horizontal Scroll");
+                    hScroll();
+                }
+            });
+        }
+
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setVisible(false);
+            vBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Verical Scroll");
+                    vScroll();
+                }
+            });
+        }
+
+        contentListener = new Listener()
+        {
+            public void handleEvent(Event e)
+            {
+                System.out.print("\nHandle Content change");
+                if (e.type != SWT.Resize) return;
+                layout(false);
+            }
+        };
+
+        filter = new Listener()
+        {
+            public void handleEvent(Event event)
+            {
+                System.out.print("\nFilter Listener");
+                if (event.widget instanceof Control)
+                {
+                    Control control = (Control) event.widget;
+                    if (contains(control)) showControl(control);
+                }
+            }
+        };
+
+        addDisposeListener(new DisposeListener()
+        {
+            public void widgetDisposed(DisposeEvent e)
+            {
+                getDisplay().removeFilter(SWT.FocusIn, filter);
+            }
+        });
+    }
+
+    static int checkStyle(int style)
+    {
+        int mask = SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
+        return style & mask;
+    }
+
+    boolean contains(Control control)
+    {
+        if (control == null || control.isDisposed()) return false;
+
+        Composite parent = control.getParent();
+        while (parent != null && !(parent instanceof Shell))
+        {
+            if (this == parent) return true;
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    /**
+     * Returns the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @return the Always Show Scrollbars flag value
+     */
+    public boolean getAlwaysShowScrollBars()
+    {
+        //checkWidget();
+        return alwaysShowScroll;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available horizontal space.
+     *
+     * @return the receiver's horizontal expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandHorizontal()
+    {
+        checkWidget();
+        return expandHorizontal;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available vertical space.
+     *
+     * @return the receiver's vertical expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandVertical()
+    {
+        checkWidget();
+        return expandVertical;
+    }
+
+    /**
+     * Returns the minimum width of the content control.
+     *
+     * @return the minimum width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinWidth()
+    {
+        checkWidget();
+        return minWidth;
+    }
+
+    /**
+     * Returns the minimum height of the content control.
+     *
+     * @return the minimum height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinHeight()
+    {
+        checkWidget();
+        return minHeight;
+    }
+
+    /**
+     * Get the content that is being scrolled.
+     *
+     * @return the control displayed in the content area
+     */
+    public Control getContent()
+    {
+        //checkWidget();
+        return content;
+    }
+
+    /**
+     * Returns <code>true</code> if the receiver automatically scrolls to a focused child control
+     * to make it visible. Otherwise, returns <code>false</code>.
+     *
+     * @return a boolean indicating whether focused child controls are automatically scrolled into the viewport
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public boolean getShowFocusedControl()
+    {
+        checkWidget();
+        return showFocusedControl;
+    }
+
+    void hScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar hBar = getHorizontalBar();
+        int hSelection = hBar.getSelection();
+        content.setLocation(-hSelection, location.y);
+    }
+    boolean needHScroll(Rectangle contentRect, boolean vVisible)
+    {
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.width -= 2*border;
+        ScrollBar vBar = getVerticalBar();
+        if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
+
+        if (!expandHorizontal && contentRect.width > hostRect.width) return true;
+        if (expandHorizontal && minWidth > hostRect.width) return true;
+        return false;
+    }
+
+    boolean needVScroll(Rectangle contentRect, boolean hVisible)
+    {
+        ScrollBar vBar = getVerticalBar();
+        if (vBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.height -= 2*border;
+        ScrollBar hBar = getHorizontalBar();
+        if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
+
+        if (!expandVertical && contentRect.height > hostRect.height) return true;
+        if (expandVertical && minHeight > hostRect.height) return true;
+        return false;
+    }
+
+    /**
+     * Return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.
+     *
+     * @return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.  If no content has been set, this returns
+     * (0, 0).
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public Point getOrigin()
+    {
+        checkWidget();
+        if (content == null) return new Point(0, 0);
+        Point location = content.getLocation();
+        return new Point(-location.x, -location.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param origin the point on the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     *    <li>ERROR_INVALID_ARGUMENT - value of origin is outside of content
+     * </ul>
+     * @since 2.0
+     */
+    public void setOrigin(Point origin)
+    {
+        setOrigin(origin.x, origin.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param x the x coordinate of the content to appear in the top left corner
+     *
+     * @param y the y coordinate of the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public void setOrigin(int x, int y)
+    {
+        checkWidget();
+        if (content == null) return;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setSelection(x);
+            x = -hBar.getSelection();
+        }
+        else
+        {
+            x = 0;
+        }
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setSelection(y);
+            y = -vBar.getSelection();
+        }
+        else
+        {
+            y = 0;
+        }
+        content.setLocation(x, y);
+    }
+    /**
+     * Set the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @param show true to show the scrollbars even when not required, false to show scrollbars only when required
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setAlwaysShowScrollBars(boolean show)
+    {
+        checkWidget();
+        if (show == alwaysShowScroll) return;
+        alwaysShowScroll = show;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null && alwaysShowScroll) hBar.setVisible(true);
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null && alwaysShowScroll) vBar.setVisible(true);
+        layout(false);
+    }
+
+    /**
+     * Set the content that will be scrolled.
+     *
+     * @param content the control to be displayed in the content area
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setContent(Control content)
+    {
+        System.out.print("\nSetting Content");
+        checkWidget();
+        if (this.content != null && !this.content.isDisposed())
+        {
+            this.content.removeListener(SWT.Resize, contentListener);
+            this.content.setBounds(new Rectangle(-200, -200, 0, 0));
+        }
+
+        this.content = content;
+        ScrollBar vBar = getVerticalBar();
+        ScrollBar hBar = getHorizontalBar();
+        if (this.content != null)
+        {
+            if (vBar != null)
+            {
+                vBar.setMaximum(0);
+                vBar.setThumb(0);
+                vBar.setSelection(0);
+            }
+            if (hBar != null)
+            {
+                hBar.setMaximum(0);
+                hBar.setThumb(0);
+                hBar.setSelection(0);
+            }
+            content.setLocation(0, 0);
+            layout(false);
+            this.content.addListener(SWT.Resize, contentListener);
+        }
+        else
+        {
+            if (hBar != null) hBar.setVisible(alwaysShowScroll);
+            if (vBar != null) vBar.setVisible(alwaysShowScroll);
+        }
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as wide as the
+     * ScrolledComposite when the width of the ScrolledComposite is greater than the
+     * minimum width specified in setMinWidth.  If the ScrolledComposite is less than the
+     * minimum width, the content will not be resized and instead the horizontal scroll bar will be
+     * used to view the entire width.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available horizontal space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandHorizontal(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandHorizontal) return;
+        expandHorizontal = expand;
+        layout(false);
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as tall as the
+     * ScrolledComposite when the height of the ScrolledComposite is greater than the
+     * minimum height specified in setMinHeight.  If the ScrolledComposite is less than the
+     * minimum height, the content will not be resized and instead the vertical scroll bar will be
+     * used to view the entire height.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available vertical space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandVertical(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandVertical) return;
+        expandVertical = expand;
+        layout(false);
+    }
+    /**
+     * Sets the layout which is associated with the receiver to be
+     * the argument which may be null.
+     * <p>
+     * Note: No Layout can be set on this Control because it already
+     * manages the size and position of its children.
+     * </p>
+     *
+     * @param layout the receiver's new layout or null
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setLayout(Layout layout)
+    {
+        checkWidget();
+        return;
+    }
+    /**
+     * Specify the minimum height at which the ScrolledComposite will begin scrolling the
+     * content with the vertical scroll bar.  This value is only relevant if
+     * setExpandVertical(true) has been set.
+     *
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinHeight(int height)
+    {
+        setMinSize(minWidth, height);
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param size the minimum size or null for the default size
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(Point size)
+    {
+        if (size == null)
+        {
+            setMinSize(0, 0);
+        }
+        else
+        {
+            setMinSize(size.x, size.y);
+        }
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param width the minimum width or 0 for default width
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(int width, int height)
+    {
+        checkWidget();
+        if (width == minWidth && height == minHeight) return;
+        minWidth = Math.max(0, width);
+        minHeight = Math.max(0, height);
+        layout(false);
+    }
+    /**
+     * Specify the minimum width at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) has been set.
+     *
+     * @param width the minimum width or 0 for default width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinWidth(int width)
+    {
+        setMinSize(width, minHeight);
+    }
+
+    /**
+     * Configure the receiver to automatically scroll to a focused child control
+     * to make it visible.
+     *
+     * If show is <code>false</code>, show a focused control is off.
+     * By default, show a focused control is off.
+     *
+     * @param show <code>true</code> to show a focused control.
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void setShowFocusedControl(boolean show)
+    {
+        checkWidget();
+        if (showFocusedControl == show) return;
+        Display display = getDisplay();
+        display.removeFilter(SWT.FocusIn, filter);
+        showFocusedControl = show;
+        if (!showFocusedControl) return;
+        display.addFilter(SWT.FocusIn, filter);
+        Control control = display.getFocusControl();
+        if (contains(control)) showControl(control);
+    }
+
+    /**
+     * Scrolls the content of the receiver so that the control is visible.
+     *
+     * @param control the control to be shown
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the control is null</li>
+     *    <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void showControl(Control control)
+    {
+        checkWidget();
+        if (control == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+        if (control.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+        if (!contains(control)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+
+        Rectangle itemRect = getDisplay().map(control.getParent(), this, control.getBounds());
+        Rectangle area = getClientArea();
+        Point origin = getOrigin();
+        if (itemRect.x < 0) origin.x = Math.max(0, origin.x + itemRect.x);
+        if (itemRect.y < 0) origin.y = Math.max(0, origin.y + itemRect.y);
+        if (area.width < itemRect.x + itemRect.width) origin.x = Math.max(0, origin.x + itemRect.x + itemRect.width - area.width);
+        if (area.height < itemRect.y + itemRect.height) origin.y = Math.max(0, origin.y + itemRect.y + itemRect.height - area.height);
+        setOrigin(origin);
+    }
+
+    void vScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar vBar = getVerticalBar();
+        int vSelection = vBar.getSelection();
+        content.setLocation(location.x, -vSelection);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ButtonTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class provides the layout for ScrolledComposite
+ *
+ * @see ScrolledComposite
+ */
+class ScrolledCompositeLayout extends Layout
+{
+
+    boolean inLayout = false;
+    static final int DEFAULT_WIDTH  = 64;
+    static final int DEFAULT_HEIGHT = 64;
+
+    protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache)
+    {
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+        if (sc.content != null)
+        {
+            Point preferredSize = sc.content.computeSize(wHint, hHint, flushCache);
+            Point currentSize = sc.content.getSize();
+            size.x = sc.getExpandHorizontal() ? preferredSize.x : currentSize.x;
+            size.y = sc.getExpandVertical() ? preferredSize.y : currentSize.y;
+        }
+        size.x = Math.max(size.x, sc.minWidth);
+        size.y = Math.max(size.y, sc.minHeight);
+        if (wHint != SWT.DEFAULT) size.x = wHint;
+        if (hHint != SWT.DEFAULT) size.y = hHint;
+        return size;
+    }
+
+    protected boolean flushCache(Control control)
+    {
+        return true;
+    }
+
+    protected void layout(Composite composite, boolean flushCache)
+    {
+        if (inLayout) return;
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        if (sc.content == null) return;
+        ScrollBar hBar = sc.getHorizontalBar();
+        ScrollBar vBar = sc.getVerticalBar();
+        if (hBar != null)
+        {
+            if (hBar.getSize().y >= sc.getSize().y)
+            {
+                return;
+            }
+        }
+        if (vBar != null)
+        {
+            if (vBar.getSize().x >= sc.getSize().x)
+            {
+                return;
+            }
+        }
+        inLayout = true;
+        Rectangle contentRect = sc.content.getBounds();
+        if (!sc.alwaysShowScroll)
+        {
+            boolean hVisible = sc.needHScroll(contentRect, false);
+            boolean vVisible = sc.needVScroll(contentRect, hVisible);
+            if (!hVisible && vVisible) hVisible = sc.needHScroll(contentRect, vVisible);
+            if (hBar != null) hBar.setVisible(hVisible);
+            if (vBar != null) vBar.setVisible(vVisible);
+        }
+        Rectangle hostRect = sc.getClientArea();
+        if (sc.expandHorizontal)
+        {
+            contentRect.width = Math.max(sc.minWidth, hostRect.width);
+        }
+        if (sc.expandVertical)
+        {
+            contentRect.height = Math.max(sc.minHeight, hostRect.height);
+        }
+
+        if (hBar != null)
+        {
+            hBar.setMaximum(contentRect.width);
+            hBar.setThumb(Math.min(contentRect.width, hostRect.width));
+            int hPage = contentRect.width - hostRect.width;
+            int hSelection = hBar.getSelection();
+            if (hSelection >= hPage)
+            {
+                if (hPage <= 0)
+                {
+                    hSelection = 0;
+                    hBar.setSelection(0);
+                }
+                contentRect.x = -hSelection;
+            }
+        }
+
+        if (vBar != null)
+        {
+            vBar.setMaximum(contentRect.height);
+            vBar.setThumb(Math.min(contentRect.height, hostRect.height));
+            int vPage = contentRect.height - hostRect.height;
+            int vSelection = vBar.getSelection();
+            if (vSelection >= vPage)
+            {
+                if (vPage <= 0)
+                {
+                    vSelection = 0;
+                    vBar.setSelection(0);
+                }
+                contentRect.y = -vSelection;
+            }
+        }
+
+        sc.content.setBounds(contentRect);
+        inLayout = false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="CaptionedControlTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="CapControlTestMIDlet01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.captioned.CapControlTestMIDlet01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="CaptionedControlTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/res/big.png has changed
Binary file javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/res/small.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/src/com/nokia/test/java/eswt/captioned/CapControlTestMIDlet01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,1201 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.captioned;
+
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ercp.swt.mobile.CaptionedControl;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.ercp.swt.mobile.ListBox;
+import org.eclipse.ercp.swt.mobile.ListBoxItem;
+import org.eclipse.ercp.swt.mobile.ListView;
+import org.eclipse.ercp.swt.mobile.SortedList;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * A midlet for the CaptionedControl test case set.
+ */
+public class CapControlTestMIDlet01 extends TestBaseMIDlet
+{
+
+    /** Images */
+    private Image imageSMALL    = null;
+    private Image imageBIG      = null;
+
+    /** Setting fields */
+    private Composite settingFields = null;
+    private Text textField          = null;
+    private Text trailField         = null;
+    private Label imageField        = null;
+    private Label controlField      = null;
+
+    /** */
+    private Control control         = null;
+    private CaptionedControl field  = null;
+
+    /** Commands */
+    private Command cmdSetTextDEFINE    = null;
+    private Command cmdSetTextNULL      = null;
+    private Command cmdSetTrailDEFINE   = null;
+    private Command cmdSetTrailNULL     = null;
+    private Command cmdSetImageNULL     = null;
+    private Command cmdSetImageSMALL    = null;
+    private Command cmdSetImageBIG      = null;
+
+    private Command cmdControlLABEL     = null;
+    private Command cmdControlHLINK     = null;
+    private Command cmdControlTEXT      = null;
+    private Command cmdControlCTEXT     = null;
+    private Command cmdControlDATE      = null;
+    private Command cmdControlBUTTON    = null;
+    private Command cmdControlSLIDER    = null;
+    private Command cmdControlPBAR      = null;
+
+    private Command cmdExample = null;
+    private Command cmdCombo    = null;
+    private Command cmdButtons = null;
+    private Command cmdDates = null;
+    private Command cmdLists    = null;
+    private Command cmdListView     = null;
+    private Command cmdSortedLists  = null;
+    private Command cmdTree     = null;
+    private Command cmdTable    = null;
+    private Command cmdClear    = null;
+    private Command cmdCreate   = null;
+    private Command cmdUpdate   = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set title & layout
+        this.shell.setText("Captioned Control Test");
+        this.shell.setLayout(new GridLayout());
+
+        // create setting fields composite
+        this.settingFields = new Composite(this.shell, SWT.NONE);
+        this.settingFields.setLayout(new GridLayout(2, false));
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.FILL;
+        this.settingFields.setLayoutData(data);
+
+        // load images
+        this.imageBIG = new Image(
+            this.display, this.getClass().getResourceAsStream("/big.png"));
+        this.imageSMALL = new Image(
+            this.display, this.getClass().getResourceAsStream("/small.png"));
+
+        // create commands
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdSet.setText("Set");
+
+        // text submennu
+        Command cmdText = new Command(cmdSet, Command.COMMANDGROUP, 3);
+        cmdText.setText("Text");
+
+        this.cmdSetTextDEFINE = new Command(cmdText, Command.GENERAL, 1);
+        this.cmdSetTextDEFINE.setText("define");
+        this.cmdSetTextDEFINE.addSelectionListener(this);
+
+        this.cmdSetTextNULL = new Command(cmdText, Command.GENERAL, 0);
+        this.cmdSetTextNULL.setText("null");
+        this.cmdSetTextNULL.addSelectionListener(this);
+
+        // trailing text submenu
+        Command cmdTrail = new Command(cmdSet, Command.COMMANDGROUP, 2);
+        cmdTrail.setText("Trailing text");
+
+        this.cmdSetTrailDEFINE = new Command(cmdTrail, Command.GENERAL, 1);
+        this.cmdSetTrailDEFINE.setText("define");
+        this.cmdSetTrailDEFINE.addSelectionListener(this);
+
+        this.cmdSetTrailNULL = new Command(cmdTrail, Command.GENERAL, 0);
+        this.cmdSetTrailNULL.setText("null");
+        this.cmdSetTrailNULL.addSelectionListener(this);
+
+        // image submenu
+        Command cmdImage = new Command(cmdSet, Command.COMMANDGROUP, 1);
+        cmdImage.setText("Image");
+
+        this.cmdSetImageSMALL = new Command(cmdImage, Command.GENERAL, 2);
+        this.cmdSetImageSMALL.setText("small");
+        this.cmdSetImageSMALL.addSelectionListener(this);
+
+        this.cmdSetImageBIG = new Command(cmdImage, Command.GENERAL, 1);
+        this.cmdSetImageBIG.setText("big");
+        this.cmdSetImageBIG.addSelectionListener(this);
+
+        this.cmdSetImageNULL = new Command(cmdImage, Command.GENERAL, 0);
+        this.cmdSetImageNULL.setText("null");
+        this.cmdSetImageNULL.addSelectionListener(this);
+
+        // controls submenu
+        Command cmdControl = new Command(cmdSet, Command.COMMANDGROUP, 0);
+        cmdControl.setText("Control");
+        this.cmdControlLABEL = new Command(cmdControl, Command.GENERAL, 7);
+        this.cmdControlLABEL.setText("Label");
+        this.cmdControlLABEL.addSelectionListener(this);
+
+        this.cmdControlHLINK = new Command(cmdControl, Command.GENERAL, 6);
+        this.cmdControlHLINK.setText("HyperLink");
+        this.cmdControlHLINK.addSelectionListener(this);
+
+        this.cmdControlTEXT = new Command(cmdControl, Command.GENERAL, 5);
+        this.cmdControlTEXT.setText("Text");
+        this.cmdControlTEXT.addSelectionListener(this);
+
+        this.cmdControlCTEXT = new Command(cmdControl, Command.GENERAL, 4);
+        this.cmdControlCTEXT.setText("ConstrainedText");
+        this.cmdControlCTEXT.addSelectionListener(this);
+
+        this.cmdControlDATE = new Command(cmdControl, Command.GENERAL, 3);
+        this.cmdControlDATE.setText("DateEditor");
+        this.cmdControlDATE.addSelectionListener(this);
+
+        this.cmdControlBUTTON = new Command(cmdControl, Command.GENERAL, 2);
+        this.cmdControlBUTTON.setText("Button");
+        this.cmdControlBUTTON.addSelectionListener(this);
+
+        this.cmdControlSLIDER = new Command(cmdControl, Command.GENERAL, 1);
+        this.cmdControlSLIDER.setText("Slider");
+        this.cmdControlSLIDER.addSelectionListener(this);
+
+        this.cmdControlPBAR = new Command(cmdControl, Command.GENERAL, 0);
+        this.cmdControlPBAR.setText("ProgressBar");
+        this.cmdControlPBAR.addSelectionListener(this);
+
+        // Clear command
+        this.cmdClear = new Command(this.shell, Command.GENERAL, 1);
+        this.cmdClear.setText("Clear");
+        this.cmdClear.addSelectionListener(this);
+
+
+        // examples submenu
+        Command cmdExampleGroup = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdExampleGroup.setText("Example");
+        // Create Example commands
+        this.cmdExample = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdExample.setText("Text");
+        this.cmdExample.addSelectionListener(this);
+
+        this.cmdCombo = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdCombo.setText("Combo");
+        this.cmdCombo.addSelectionListener(this);
+
+        this.cmdButtons = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdButtons.setText("Buttons");
+        this.cmdButtons.addSelectionListener(this);
+
+        this.cmdDates = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdDates.setText("DateEditor");
+        this.cmdDates.addSelectionListener(this);
+
+        this.cmdLists = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdLists.setText("Lists");
+        this.cmdLists.addSelectionListener(this);
+
+        this.cmdListView = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdListView.setText("ListView");
+        this.cmdListView.addSelectionListener(this);
+
+        this.cmdSortedLists = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdSortedLists.setText("SortedList");
+        this.cmdSortedLists.addSelectionListener(this);
+
+        this.cmdTable = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdTable.setText("Table");
+        this.cmdTable.addSelectionListener(this);
+
+        this.cmdTree = new Command(cmdExampleGroup, Command.GENERAL, 0);
+        this.cmdTree.setText("Tree");
+        this.cmdTree.addSelectionListener(this);
+
+        // Create & Change commands
+        this.cmdCreate = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdCreate.setText("Create");
+        this.cmdCreate.addSelectionListener(this);
+
+        this.cmdUpdate = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdUpdate.setText("Update");
+        this.cmdUpdate.addSelectionListener(this);
+        this.cmdUpdate.setEnabled(false);
+    }
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        // text commands
+        if (event.widget == this.cmdSetTextDEFINE)
+        {
+            if (this.textField == null || this.textField.isDisposed())
+            {
+                // create new Text field
+                this.textField = this.createTextField("Text: ");
+            }
+            if (!this.textField.isEnabled())
+            {
+                // enable the field and clear its content
+                this.textField.setEnabled(true);
+                this.textField.setText("");
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSetTextNULL)
+        {
+            if (this.textField == null || this.textField.isDisposed())
+            {
+                // create new Text field
+                this.textField = this.createTextField("Text: ");
+            }
+            // disable the field
+            this.textField.setText("null");
+            this.textField.setEnabled(false);
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // trailing text commands
+        if (event.widget == this.cmdSetTrailDEFINE)
+        {
+            if (this.trailField == null || this.trailField.isDisposed())
+            {
+                // create new Text field
+                this.trailField = this.createTextField("Trailing text: ");
+            }
+            if (!this.trailField.isEnabled())
+            {
+                // enable the field and clear its content
+                this.trailField.setEnabled(true);
+                this.trailField.setText("");
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSetTrailNULL)
+        {
+            if (this.trailField == null || this.trailField.isDisposed())
+            {
+                // create new Text field
+                this.trailField = this.createTextField("Trailing text: ");
+            }
+            // disable the field
+            this.trailField.setText("null");
+            this.trailField.setEnabled(false);
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // image commands
+        if (event.widget == this.cmdSetImageSMALL)
+        {
+            if (this.imageField == null || this.imageField.isDisposed())
+            {
+                this.imageField = this.createInfoLabel("Image: ", "SMALL");
+            }
+            else
+            {
+                this.imageField.setText("SMALL");
+                this.imageField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSetImageBIG)
+        {
+            if (this.imageField == null || this.imageField.isDisposed())
+            {
+                this.imageField = this.createInfoLabel("Image: ", "BIG");
+            }
+            else
+            {
+                this.imageField.setText("BIG");
+                this.imageField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSetImageNULL)
+        {
+            if (this.imageField == null || this.imageField.isDisposed())
+            {
+                this.imageField = this.createInfoLabel("Image: ", "null");
+            }
+            else
+            {
+                this.imageField.setText("null");
+                this.imageField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // control commands
+        if (event.widget == this.cmdControlLABEL)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField = this.createInfoLabel("Control: ", "Label");
+            }
+            else
+            {
+                this.controlField.setText("Label");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlHLINK)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "HyperLink");
+            }
+            else
+            {
+                this.controlField.setText("HyperLink");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlTEXT)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField = this.createInfoLabel("Control: ", "Text");
+            }
+            else
+            {
+                this.controlField.setText("Text");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlCTEXT)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "ConstrainedText");
+            }
+            else
+            {
+                this.controlField.setText("ConstrainedText");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlDATE)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "DateEditor");
+            }
+            else
+            {
+                this.controlField.setText("DateEditor");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlSLIDER)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "Slider");
+            }
+            else
+            {
+                this.controlField.setText("Slider");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlPBAR)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "ProgressBar");
+            }
+            else
+            {
+                this.controlField.setText("ProgressBar");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdControlBUTTON)
+        {
+            if (this.controlField == null || this.controlField.isDisposed())
+            {
+                this.controlField =
+                    this.createInfoLabel("Control: ", "Button");
+            }
+            else
+            {
+                this.controlField.setText("Button");
+                this.controlField.pack();
+            }
+            //update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Create command
+        if (event.widget == this.cmdCreate)
+        {
+            // create CaptionedControl
+            this.create();
+            this.cmdUpdate.setEnabled(true);
+            this.cmdCreate.setEnabled(false);
+            return;
+        }
+        // Example command
+        if (event.widget == this.cmdExample)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create CaptionedControl
+            this.control = new Text(this.field, SWT.BORDER);
+            Command cmd1 = new Command(this.control, Command.GENERAL, 0);
+            cmd1.setText("Item 1");
+            cmd1.addSelectionListener(this);
+            Command cmd2 = new Command(this.control, Command.GENERAL, 0);
+            cmd2.setText("Item 2");
+            cmd2.addSelectionListener(this);
+            Command cmd3 = new Command(this.control, Command.GENERAL, 0);
+            cmd3.setText("Item 3");
+            cmd3.addSelectionListener(this);
+            this.field.setText("Text");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Buttons command
+        if (event.widget == this.cmdButtons)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // add buttons to captionedcontrol
+            Button check1 = new Button(this.field, SWT.CHECK);
+            check1.setText("option 1");
+            Button check2 = new Button(this.field, SWT.CHECK);
+            check2.setText("option 2");
+            Button check3 = new Button(this.field, SWT.CHECK);
+            check3.setText("option 3");
+
+            this.field.setText("Select option");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+            CaptionedControl radioButtons = new CaptionedControl(this.shell, SWT.NONE);
+            radioButtons.setLayoutData(data);
+            // add buttons to captionedcontrol
+            Button radio = new Button(radioButtons, SWT.RADIO);
+            radio.setText("Good option");
+            Button radio2 = new Button(radioButtons, SWT.RADIO);
+            radio2.setText("Better option");
+            Button radio3 = new Button(radioButtons, SWT.RADIO);
+            radio3.setText("The ultimate option!!!");
+            radioButtons.setText("Select next option");
+            radioButtons.setTrailingText("?!?!");
+            radioButtons.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Combo command
+        if (event.widget == this.cmdCombo)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create Combo in capcontrol
+            Combo combo1 = new Combo(this.field, SWT.BORDER);
+            for (int i = 0; i < 10; i++)
+            {
+                combo1.add("Very very long item in combo "+i);
+            }
+            this.field.setText("Combo with long items");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+
+            CaptionedControl capCombo = new CaptionedControl(this.shell, SWT.NONE);
+            capCombo.setLayoutData(data);
+
+            Combo combo2 = new Combo(capCombo, SWT.BORDER);
+            for (int i = 0; i < 10; i++)
+            {
+                combo2.add("combo item "+i);
+            }
+            capCombo.setText("Combo");
+            capCombo.setTrailingText("?!?!");
+            capCombo.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Combo command
+        if (event.widget == this.cmdDates)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.FILL, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create Combo in capcontrol
+            DateEditor date = new DateEditor(this.field, SWT.BORDER, DateEditor.DATE);
+
+            this.field.setText("DATE");
+            this.field.setTrailingText("today");
+
+
+            CaptionedControl capTime = new CaptionedControl(this.shell, SWT.NONE);
+            capTime.setLayoutData(data);
+
+            DateEditor time = new DateEditor(capTime, SWT.BORDER, DateEditor.TIME);
+
+            capTime.setText("TIME");
+            capTime.setTrailingText("is now");
+
+            CaptionedControl capDateTime = new CaptionedControl(this.shell, SWT.NONE);
+            capDateTime.setLayoutData(data);
+
+            DateEditor datetime = new DateEditor(capDateTime, SWT.BORDER, DateEditor.DATE_TIME);
+
+            capDateTime.setText("DATE_TIME");
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Table command
+        if (event.widget == this.cmdTable)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create table in capcontrol
+            Table table1 = this.createTable(SWT.SINGLE, 3, 2, true, this.field);
+
+            this.field.setText("Single Table");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+
+            CaptionedControl capTable = new CaptionedControl(this.shell, SWT.NONE);
+            capTable.setLayoutData(data);
+
+            // create table in capcontrol
+            Table table2 = this.createTable(SWT.MULTI, 3, 2, true, capTable);
+
+            capTable.setText("Multi Table");
+            capTable.setTrailingText("?!?!");
+            capTable.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Tree command
+        if (event.widget == this.cmdTree)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create table in capcontrol
+            Tree tree1 = this.createTree(SWT.SINGLE, 3, 2, this.field);
+
+            this.field.setText("Single Tree");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+
+            CaptionedControl capTree = new CaptionedControl(this.shell, SWT.NONE);
+            capTree.setLayoutData(data);
+
+            // create table in capcontrol
+            Tree tree2 = this.createTree(SWT.MULTI, 3, 2, capTree);
+
+            capTree.setText("Multi Tree");
+            capTree.setTrailingText("?!?!");
+            capTree.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // Lists command
+        if (event.widget == this.cmdLists)
+        {
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+            // create table in capcontrol
+            List list = new List(this.field,SWT.SINGLE);
+            for (int i = 0; i < 5; i++)
+            {
+                list.add("Item "+i);
+            }
+            this.field.setText("Single List");
+            this.field.setTrailingText("?!?!");
+            this.field.setImage(this.imageSMALL);
+
+            CaptionedControl capListBox = new CaptionedControl(this.shell, SWT.NONE);
+            capListBox.setLayoutData(data);
+
+            // create listBox in capcontrol
+            ListBox listBox = new ListBox(capListBox,SWT.MULTI,ListBox.LB_STYLE_2LINE_ITEM);
+            ListBoxItem[] items = new ListBoxItem[5];
+
+            for (int i = 0; i < items.length; i++)
+            {
+                items[i] = new ListBoxItem("detail "+(i+1),null,"head "+(i+1),null);
+            }
+            listBox.setDataModel(items);
+            capListBox.setText("Multi ListBox");
+            capListBox.setTrailingText("?!?!");
+            capListBox.setImage(this.imageSMALL);
+
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdListView)
+        {
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+
+            CaptionedControl capListview = new CaptionedControl(this.shell, SWT.NONE);
+            capListview.setLayoutData(data);
+            // create listBox in capcontrol
+            ListView listView = new ListView(capListview,SWT.MULTI);
+
+            for (int i = 0; i < 6; i++)
+            {
+                listView.add("Item"+i, null);
+            }
+
+            capListview.setText("Multi ListView");
+            capListview.setTrailingText("?!?!");
+            capListview.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSortedLists)
+        {
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+
+            CaptionedControl capsorted = new CaptionedControl(this.shell, SWT.NONE);
+            capsorted.setLayoutData(data);
+            // create listBox in capcontrol
+            SortedList sortedlist = new SortedList(capsorted,SWT.SINGLE);
+
+            for (int i = 0; i < 6; i++)
+            {
+                sortedlist.add("Item"+i);
+            }
+
+            capsorted.setText("SortedList");
+            capsorted.setTrailingText("?!?!");
+            capsorted.setImage(this.imageSMALL);
+
+            CaptionedControl capsortedfilter = new CaptionedControl(this.shell, SWT.NONE);
+            capsortedfilter.setLayoutData(data);
+            // create listBox in capcontrol
+            SortedList sortedlist2 = new SortedList(capsortedfilter,SWT.SINGLE,SortedList.FILTER);
+
+            for (int i = 0; i < 6; i++)
+            {
+                sortedlist2.add("Item"+i);
+            }
+
+            capsortedfilter.setText("Filter SortedList");
+            capsortedfilter.setTrailingText("?!?!");
+            capsortedfilter.setImage(this.imageSMALL);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Update Command
+        if (event.widget == this.cmdUpdate)
+        {
+            this.update();
+            return;
+        }
+        // Clear command
+        if (event.widget == this.cmdClear)
+        {
+            // dispose setting fields
+            Control[] controls = this.settingFields.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            // dispose captioned control
+            if (this.field != null && !this.field.isDisposed())
+            {
+                this.field.dispose();
+            }
+            // dispose all the controls fields
+            controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            this.cmdUpdate.setEnabled(false);
+            this.cmdCreate.setEnabled(true);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        if (event.widget == this.cmdExit)
+        {
+            // dispose images
+            this.imageSMALL.dispose();
+            this.imageSMALL = null;
+            this.imageBIG.dispose();
+            this.imageBIG = null;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    private Table createTable(int style, int rows, int cols, boolean pack, Composite parent)
+    {
+
+        Table table;
+        if (pack && style == SWT.MULTI)
+        {
+            table = new Table(parent,style|SWT.CHECK);
+        }
+        else
+        {
+            table = new Table(parent,style);
+        }
+
+        final int ROWS = rows;
+        final int COLS = cols;
+        for (int i = 0; i < ROWS; ++i)
+        {
+            new TableItem(table, 0);
+        }
+        for (int c = 0; c < COLS; ++c)
+        {
+            TableColumn column = new TableColumn(table, 0);
+            column.setText("Column " + c);
+            for (int i = 0; i < ROWS; ++i)
+            {
+                table.getItem(i).setText(c, "Item " + c + ", " + i);
+            }
+            if (pack)
+                column.pack();
+            else
+            {
+                column.setWidth((int)(this.shell.getClientArea().width/2));
+                column.setAlignment(SWT.CENTER);
+            }
+        }
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+        table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        if (style == SWT.SINGLE)
+        {
+            table.addSelectionListener(this);
+        }
+        return table;
+    }
+    protected void populateTree(Tree tree,int root,int child)
+    {
+        TreeItem myitem = null, myitem2 = null;
+        int ROOT_ITEM_COUNT = root;
+        int CHILD_ITEM_COUNT = child;
+        for (int i=0; i<ROOT_ITEM_COUNT; i++)
+        {
+            TreeItem iItem = new TreeItem(tree, 0);
+            iItem.setText("Item (0) -" + i);
+            if (i == 2)
+                myitem = iItem;
+            for (int j=0; j<CHILD_ITEM_COUNT; j++)
+            {
+                TreeItem jItem = new TreeItem(iItem, SWT.CHECK);
+                jItem.setText("TreeTreeItem (1) - " + j);
+
+                if (i == 2 && j == 2)
+                    myitem2 = jItem;
+                for (int k=0; k<4; k++)
+                {
+                    TreeItem kItem = new TreeItem(jItem, 0);
+                    kItem.setText("I (2) - " + k);
+
+                    for (int l=0; l<CHILD_ITEM_COUNT; l++)
+                    {
+                        TreeItem lItem = new TreeItem(kItem, 0);
+                        lItem.setText("TreeItem (3) - " + l);
+                    }
+                }
+            }
+        }
+
+    }
+
+    private Tree createTree(int style, int root, int child, Composite parent)
+    {
+
+        Tree tree = null;
+        if (style == SWT.MULTI)
+        {
+            tree = new Tree(parent,style|SWT.CHECK);
+        }
+        else
+        {
+            tree = new Tree(parent,style);
+        }
+
+        this.populateTree(tree,root,child);
+
+        tree.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        tree.addSelectionListener(this);
+        return tree;
+    }
+    /**
+     * Create CaptionedControl field.
+     */
+    private void create()
+    {
+        try
+        {
+            // create new captioned control
+            this.field = new CaptionedControl(this.shell, SWT.NONE);
+            GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
+            data.horizontalSpan = 2;
+            this.field.setLayoutData(data);
+
+            // set text
+            this.setText();
+
+            // set trailling text
+            this.setTrailingText();
+
+            // set image
+            this.setImage();
+
+            // create child control
+            this.control = this.createControl();
+
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.BORDER);
+            msg.setMessage("Exception: " + ex.getMessage());
+            msg.open();
+        }
+    }
+
+    /**
+     * Update ConstrainedControl.
+     */
+    private void update()
+    {
+        try
+        {
+            // set text
+            this.setText();
+
+            // set trailing text
+            this.setTrailingText();
+
+            // set an image
+            this.setImage();
+
+            // create and set control
+            if (this.control != null && !this.control.isDisposed())
+            {
+                this.control.dispose();
+            }
+            this.control = this.createControl();
+
+            // update the field and the shell
+            this.field.pack();
+            this.field.layout();
+            this.field.update();
+            this.shell.layout();
+            this.shell.update();
+
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.BORDER);
+            msg.setMessage("Exception: " + ex.getMessage());
+            msg.open();
+        }
+    }
+
+    /**
+     * Create new child control.
+     * @return created control
+     */
+    private Control createControl()
+    {
+        Control result = null;
+
+        String type = "Label";// default
+        if (this.controlField != null && !this.controlField.isDisposed())
+        {
+            type = this.controlField.getText();
+        }
+        if ("Label".equals(type))
+        {
+            Label control = new Label(this.field, SWT.NONE);
+            control.setText("Label");
+            result = control;
+        }
+        else if ("HyperLink".equals(type))
+        {
+            HyperLink control =
+                new HyperLink(this.field, SWT.NONE, HyperLink.EMAIL);
+            control.setText("hyperlink@foo.com");
+            result = control;
+        }
+        else if ("Text".equals(type))
+        {
+            Text control = new Text(this.field, SWT.BORDER);
+            control.setText("Text");
+            result = control;
+        }
+        else if ("ConstrainedText".equals(type))
+        {
+            ConstrainedText control = new ConstrainedText(this.field,
+                    SWT.BORDER, ConstrainedText.NUMERIC);
+            control.setText("12345");
+            result = control;
+        }
+        else if ("DateEditor".equals(type))
+        {
+            DateEditor control = new DateEditor(this.field, SWT.BORDER);
+            control.setDate(new Date());
+            result = control;
+        }
+        else if ("Button".equals(type))
+        {
+            Button control = new Button(this.field, SWT.PUSH);
+            control.setText("Button");
+            result = control;
+        }
+        else if ("Slider".equals(type))
+        {
+            Slider control = new Slider(this.field, SWT.NONE);
+            control.setMaximum(20);
+            result = control;
+        }
+        else if ("ProgressBar".equals(type))
+        {
+            ProgressBar control = new ProgressBar(this.field, SWT.NONE);
+            control.setMaximum(20);
+            result = control;
+        }
+
+        return result;
+    }
+
+    /**
+     * Create new Text setting field.
+     */
+    private Text createTextField(String title)
+    {
+        Label label = new Label(this.settingFields, SWT.NONE);
+        label.setText(title);
+        label.setLayoutData(
+            new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+
+        Text result = new Text(this.settingFields, SWT.BORDER);
+        result.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        return result;
+    }
+
+    /**
+     * Create info label.
+     */
+    private Label createInfoLabel(String title, String value)
+    {
+        Label label = new Label(this.settingFields, SWT.NONE);
+        label.setText(title);
+        label.setLayoutData(
+            new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+
+        Label result = new Label(this.settingFields, SWT.NONE);
+        result.setText(value);
+        result.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
+
+        return result;
+    }
+
+    /**
+     * Set text.
+     */
+    private void setText()
+    {
+        if (this.textField != null && !this.textField.isDisposed())
+        {
+            if (this.textField.isEnabled())
+            {
+                this.field.setText(this.textField.getText());
+            }
+            else
+            {
+                this.field.setText(null);
+            }
+        }
+    }
+
+    /**
+     * Set trailing text.
+     */
+    private void setTrailingText()
+    {
+        if (this.trailField != null && !this.trailField.isDisposed())
+        {
+            if (this.trailField.isEnabled())
+            {
+                this.field.setTrailingText(this.trailField.getText());
+            }
+            else
+            {
+                this.field.setTrailingText(null);
+            }
+        }
+    }
+
+    /**
+     * Set image.
+     */
+    private void setImage()
+    {
+        if (this.imageField != null && !this.imageField.isDisposed())
+        {
+            if (this.imageField.isEnabled())
+            {
+                String type = this.imageField.getText();
+                if ("SMALL".equals(type))
+                {
+                    this.field.setImage(this.imageSMALL);
+                }
+                if ("BIG".equals(type))
+                {
+                    this.field.setImage(this.imageBIG);
+                }
+                if ("null".equals(type))
+                {
+                    this.field.setImage(null);
+                }
+            }
+            else
+            {
+                this.field.setImage(null);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CaptionedControlTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="ColorDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ColorDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.colordialog.ColorDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ColorDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/src/com/nokia/test/java/eswt/colordialog/ColorDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.colordialog;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.ColorDialog;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.layout.FillLayout;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the colordialog component
+ * - creating colordialog
+ * - navigating in colordialog
+ * - setting and selecting colors from colordialog
+ */
+public class ColorDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** colordialog instance */
+    private ColorDialog cdlg = null;
+    /** canvas instance to change background color */
+    private Canvas canvas = null;
+
+    private Combo textCombo = null;
+    private Button openButton = null;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("ColorDialog");
+
+        this.shell.setLayout(new FillLayout(SWT.VERTICAL));
+        // create canvas, that occupies the whole shell area
+        this.canvas = new Canvas(this.shell, SWT.NONE);
+        this.canvas.setBounds(0,0,this.shell.getClientArea().width,this.shell.getClientArea().height);
+
+        this.textCombo = new Combo(this.shell,SWT.DROP_DOWN | SWT.BORDER);
+        this.textCombo.add("Default title");
+        this.textCombo.add("New title");
+        this.textCombo.add("!#2£$%&{}+?");
+        this.textCombo.add("A very very long title for the dialog");
+        this.textCombo.select(0);
+        this.textCombo.setFocus();
+        this.openButton = new Button(this.shell,SWT.PUSH | SWT.BORDER);
+        this.openButton.setText("Open Dialog");
+        this.openButton.addSelectionListener(this);
+
+        // initialize the colordialog
+        this.cdlg = new ColorDialog(this.shell);
+
+        // "open" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 1);
+        cmd.setText("Open");
+        cmd.addSelectionListener(this);
+        // "set new preset" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Set new preset");
+        cmd.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Button)
+        {
+            this.cdlg.setText(this.textCombo.getText());
+            RGB rgb = this.cdlg.open();
+            if (rgb == null)
+            {
+                // "cancel" or "none" was selected
+                if (this.cdlg.getRGB() == null)
+                    // "none" was selected
+                    this.canvas.setBackground(null);
+            }
+            else
+            {
+                // set the background to the selected color
+                Color color = new Color(this.display, rgb);
+                this.canvas.setBackground(color);
+                color.dispose();
+            }
+            return;
+        }
+        if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Open".equals(scmd))
+            {
+                String comboSelect = this.textCombo.getText();
+                if (!comboSelect.equals("Default title"))
+                {
+                    this.cdlg.setText(comboSelect);
+                }
+//               open the colordialog
+                RGB rgb = this.cdlg.open();
+                if (rgb == null)
+                {
+                    // "cancel" or "none" was selected
+                    if (this.cdlg.getRGB() == null)
+                        // "none" was selected
+                        this.canvas.setBackground(null);
+                }
+                else
+                {
+                    // set the background to the selected color
+                    Color color = new Color(this.display, rgb);
+                    this.canvas.setBackground(color);
+                    color.dispose();
+                }
+                return;
+            }
+            if ("Set new preset".equals(scmd))
+            {
+                // add a new custom color to the colordialog
+                this.cdlg.setRGB(new RGB(131, 153, 177));
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ColorDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ComboTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="ComboTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ComboTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.combo.ComboTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ComboTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ComboTestMidletSuite/src/com/nokia/test/java/eswt/combo/ComboTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,411 @@
+/*
+* 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.test.java.eswt.combo;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class ComboTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    private String[] comboitems = new String[] {"Item 1",
+            "Item 2", "Item 3", "Item 4", "Item 5",
+            "Item 6", "Item 7", "Item 8", "Item 9", "Item 10"
+                                               };
+
+    private String[] longcomboitems = new String[] {"A Very very Long Combo Item 1",
+            "A Very very Long Combo Item 2", "A Very very Long Combo Item 3",
+            "A Very very Long Combo Item 4", "A Very very Long Combo Item 5",
+            "A Very very Long Combo Item 6", "A Very very Long Combo Item 7",
+            "A Very very Long Combo Item 8", "A Very very Long Combo Item 9",
+            "A Very very Long Combo Item 10"
+                                                   };
+
+    private Combo combo = null;
+    private Combo longCombo = null;
+    private Combo verylongCombo = null;
+
+    private Shell testshell = null;
+
+    private int columns;
+
+    private Command cmdAddFirst             = null;
+    private Command cmdAddLast              = null;
+
+    private Command cmdRemove               = null;
+    private Command cmdRemoveAll            = null;
+    private Command cmdRemoveAdded          = null;
+    private Command cmdRemoveAllButFirst    = null;
+
+    private Command cmdClear                = null;
+
+    private Command cmdSetSelected          = null;
+    private Command cmdSetDefaults          = null;
+
+    private Command cmdSetDialog            = null;
+    private Command cmdSetOnTop             = null;
+    private Command cmdSetNoTrim            = null;
+    private Command cmdClose                = null;
+    private Command cmdSetLayout            = null;
+    private Command cmdSetApplicationModal  = null;
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Combo Test");
+        this.shell.setLayout(new GridLayout());
+        columns = 1;
+
+        // create a combo with 10 items
+        combo = new Combo(this.shell, SWT.DROP_DOWN | SWT.BORDER);
+        combo.setText("Simple Combo Control");
+        combo.setItems(comboitems);
+        this.combo.select(this.comboitems.length - 1);
+        this.combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // create a combo with 10 long items
+        longCombo = new Combo(this.shell, SWT.DROP_DOWN);
+        longCombo.setText("Long Combo Control");
+        longCombo.setItems(longcomboitems);
+        this.longCombo.select(0);
+        this.longCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // create a combo with 100 items
+        verylongCombo = new Combo(this.shell, SWT.DROP_DOWN);
+        verylongCombo.setText("Long Combo Control");
+        for (int i=0; i<100; i++)
+        {
+            verylongCombo.add("Combo Item "+i);
+        }
+        this.verylongCombo.select(0);
+        this.verylongCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        this.menuSetup();
+        this.shell.pack();
+        this.shell.layout();
+        this.shell.update();
+    }
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    private void menuSetup()
+    {
+        // create menu commands
+
+        // Add submenu
+        Command add = new Command(this.shell, Command.COMMANDGROUP, 4);
+        add.setText("Add");
+
+        this.cmdAddFirst = new Command(add, Command.GENERAL, 9);
+        this.cmdAddFirst.setText("First");
+        this.cmdAddFirst.addSelectionListener(this);
+
+        this.cmdAddLast = new Command(add, Command.GENERAL, 8);
+        this.cmdAddLast.setText("Last");
+        this.cmdAddLast.addSelectionListener(this);
+
+        // Remove submenu
+        Command removeSubmenu = new Command(this.shell, Command.COMMANDGROUP, 3);
+        removeSubmenu.setText("Remove");
+
+        this.cmdRemove = new Command(removeSubmenu, Command.GENERAL, 0);
+        this.cmdRemove.setText("Selected");
+        this.cmdRemove.addSelectionListener(this);
+
+        this.cmdRemoveAll =
+            new Command(removeSubmenu, Command.GENERAL, 1);
+        this.cmdRemoveAll.setText("All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        this.cmdRemoveAdded = new Command(removeSubmenu, Command.GENERAL, 0);
+        this.cmdRemoveAdded.setText("\"Last Item\"");
+        this.cmdRemoveAdded.addSelectionListener(this);
+
+        this.cmdRemoveAllButFirst =
+            new Command(removeSubmenu, Command.GENERAL, 1);
+        this.cmdRemoveAllButFirst.setText("All but first");
+        this.cmdRemoveAllButFirst.addSelectionListener(this);
+
+        this.cmdClear =
+            new Command(this.shell, Command.GENERAL, 0);
+        this.cmdClear.setText("Clear Selection");
+        this.cmdClear.addSelectionListener(this);
+
+        // Setting submenu
+        Command set = new Command(this.shell, Command.COMMANDGROUP, 2);
+        set.setText("Set");
+
+        this.cmdSetSelected =
+            new Command(set, Command.GENERAL, 0);
+        this.cmdSetSelected.setText("Selected");
+        this.cmdSetSelected.addSelectionListener(this);
+
+        this.cmdSetDefaults =
+            new Command(set, Command.GENERAL, 0);
+        this.cmdSetDefaults.setText("Defaults");
+        this.cmdSetDefaults.addSelectionListener(this);
+
+        this.cmdSetLayout =
+            new Command(this.shell, Command.GENERAL, 0);
+        this.cmdSetLayout.setText("Change column count");
+        this.cmdSetLayout.addSelectionListener(this);
+
+        // location submenu
+        Command parentmenu = new Command(this.shell, Command.COMMANDGROUP, 2);
+        parentmenu.setText("Parent");
+
+        this.cmdSetDialog =
+            new Command(parentmenu, Command.GENERAL, 0);
+        this.cmdSetDialog.setText("Dialog Shell");
+        this.cmdSetDialog.addSelectionListener(this);
+
+        this.cmdSetOnTop =
+            new Command(parentmenu, Command.GENERAL, 0);
+        this.cmdSetOnTop.setText("On Top Shell");
+        this.cmdSetOnTop.addSelectionListener(this);
+
+        this.cmdSetNoTrim =
+            new Command(parentmenu, Command.GENERAL, 0);
+        this.cmdSetNoTrim.setText("No Trim Shell");
+        this.cmdSetNoTrim.addSelectionListener(this);
+
+        this.cmdSetApplicationModal =
+            new Command(parentmenu, Command.GENERAL, 0);
+        this.cmdSetApplicationModal.setText("Application modal Shell");
+        this.cmdSetApplicationModal.addSelectionListener(this);
+    }
+
+    /**
+     * Return currently focused button.
+     * @return focused button
+     */
+    private Combo getFocusedCombo()
+    {
+        Combo result = null;
+
+        Control[] combos = this.shell.getChildren();
+        for (int i=0; i<combos.length; i++)
+        {
+            if (combos[i].isFocusControl())
+            {
+                result = (Combo)combos[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (!(event.widget instanceof Command)) return;
+
+        boolean changed = false;
+        try
+        {
+
+            Combo combo = this.getFocusedCombo();
+
+            // Add commands
+            if (event.widget == this.cmdAddFirst)
+            {
+                combo.add("First Item",0);
+                changed = true;
+            }
+            if (event.widget == this.cmdAddLast)
+            {
+                combo.add("Last Item",0);
+                changed = true;
+            }
+            // Remove commands
+            if (event.widget == this.cmdRemove)
+            {
+
+                if (combo.getSelectionIndex() != -1)
+                {
+                    combo.remove(combo.getSelectionIndex());
+                    changed = true;
+                }
+            }
+            if (event.widget == this.cmdRemoveAll)
+            {
+                combo.removeAll();
+                changed = true;
+            }
+            if (event.widget == this.cmdRemoveAdded)
+            {
+
+                try
+                {
+                    combo.remove("Last Item");
+                    changed = true;
+                }
+                catch (Exception ex)
+                {
+                    // show a messagebox about the exception
+                    this.showException(ex.toString()+": Could not found item");
+                }
+            }
+            if (event.widget == this.cmdRemoveAllButFirst)
+            {
+                if (combo.getVisibleItemCount() > 1)
+                {
+                    combo.remove(1,combo.getVisibleItemCount()-1);
+                    changed = true;
+                }
+            }
+            if (event.widget == this.cmdClear)
+            {
+                combo.clearSelection();
+                changed = true;
+            }
+            if (event.widget == this.cmdSetSelected)
+            {
+                if (combo.getSelectionIndex() > -1)
+                {
+                    combo.setItem(combo.getSelectionIndex(), "This item is set");
+                    changed = true;
+                }
+            }
+            if (event.widget == this.cmdSetDefaults)
+            {
+                combo.setItems(this.comboitems);
+                changed = true;
+            }
+            if (event.widget == this.cmdSetDialog)
+            {
+                // create a combo with 10 long items
+                this.testshell = new Shell(this.shell,SWT.DIALOG_TRIM);
+                this.testshell.setText("Combo in DialogShell");
+                this.testshell.setLayout(new FillLayout());
+                this.testshell.open();
+                Combo dialogCombo = new Combo(this.testshell, SWT.DROP_DOWN);
+                dialogCombo.setText("Dialog Combo Control");
+                dialogCombo.setItems(longcomboitems);
+                this.cmdClose = new Command(this.testshell,Command.EXIT, 0);
+                this.cmdClose.setText("Close");
+                this.cmdClose.addSelectionListener(this);
+
+            }
+            if (event.widget == this.cmdSetOnTop)
+            {
+                // create a combo with 10 long items
+                this.testshell = new Shell(this.shell,SWT.ON_TOP);
+                this.testshell.setLayout(new FillLayout());
+                this.testshell.open();
+                Combo dialogCombo = new Combo(this.testshell, SWT.DROP_DOWN);
+                dialogCombo.setText("OnTop Combo Control");
+                dialogCombo.setItems(longcomboitems);
+                this.cmdClose = new Command(this.testshell,Command.EXIT, 0);
+                this.cmdClose.setText("Close");
+                this.cmdClose.addSelectionListener(this);
+            }
+            if (event.widget == this.cmdSetNoTrim)
+            {
+                // create a combo with 10 long items
+                this.testshell = new Shell(this.shell,SWT.NO_TRIM);
+                this.testshell.setLayout(new FillLayout());
+
+                Combo dialogCombo = new Combo(this.testshell, SWT.DROP_DOWN);
+                dialogCombo.setText("NoTrim Combo Control");
+                dialogCombo.setItems(longcomboitems);
+                this.cmdClose = new Command(this.testshell,Command.EXIT, 0);
+                this.cmdClose.setText("Close");
+                this.cmdClose.addSelectionListener(this);
+                this.testshell.open();
+            }
+            if (event.widget == this.cmdSetApplicationModal)
+            {
+                // create a combo with 10 long items
+                this.testshell = new Shell(this.shell,SWT.APPLICATION_MODAL);
+                this.testshell.setLayout(new FillLayout());
+
+                Combo dialogCombo = new Combo(this.testshell, SWT.DROP_DOWN);
+                dialogCombo.setText("Long Combo Control");
+                dialogCombo.setItems(longcomboitems);
+                this.cmdClose = new Command(this.testshell,Command.EXIT, 0);
+                this.cmdClose.setText("Close");
+                this.cmdClose.addSelectionListener(this);
+                this.testshell.open();
+            }
+            if (event.widget == this.cmdClose)
+            {
+
+                try
+                {
+                    if (this.testshell != null && !this.testshell.isDisposed())
+                        this.testshell.dispose();
+                }
+                catch (Exception ex)
+                {
+                    System.out.println("closing testshell"+ex.getMessage());
+                }
+
+                changed = true;
+            }
+            if (event.widget == this.cmdSetLayout)
+            {
+                GridLayout gridLayout = new GridLayout();
+                if (this.columns == 1)
+                {
+                    gridLayout.numColumns = 2;
+                    this.columns = 2;
+                }
+                else
+                {
+                    gridLayout.numColumns = 1;
+                }
+                this.shell.setLayout(gridLayout);
+                changed = true;
+            }
+        }
+        catch (Exception ex)
+        {
+            this.showException(ex.getMessage());
+        }
+        // update the shell if needed
+        if (changed)
+        {
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ComboTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+            destroyApp(false);
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CommandTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="CommandTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="CommandTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.command.CommandTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="CommandTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CommandTestMidletSuite/src/com/nokia/test/java/eswt/command/CommandTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,525 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.command;
+
+import java.util.Vector;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Button;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ */
+public class CommandTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** Currently created custom commands */
+    private Vector commands = new Vector();
+
+    /** Settings fields */
+    private Label nameLabel               = null;
+    private Text nameField                = null;
+    private Label priorityLabel           = null;
+    private ConstrainedText priorityField = null;
+    private Button button                   = null;
+    /** Currently selected Command and an info label for it */
+    private Command current = null;
+    private Label currentValue = null;
+
+    /** Add commands */
+    private Command cmdAddCOMMANDGROUP = null;
+
+    private Command cmdAddOK        = null;
+    private Command cmdAddSELECT    = null;
+    private Command cmdAddGENERAL   = null;
+    private Command cmdAddDELETE    = null;
+    private Command cmdAddHELP      = null;
+
+    private Command cmdAddSTOP      = null;
+    private Command cmdAddCANCEL    = null;
+    private Command cmdAddBACK      = null;
+    private Command cmdAddEXIT      = null;
+
+    /** Remove commands */
+    private Command cmdRemove        = null;
+    private Command cmdRemoveCurrent = null;
+    private Command cmdRemoveAll     = null;
+
+    /** Params commands */
+    private Command cmdParamName        = null;
+    private Command cmdParamPriority    = null;
+    private Command cmdParamButton      = null;
+    private Command cmdParamsClear      = null;
+
+    /** Edit commands */
+    private Command cmdEdit         = null;
+    private Command cmdSetDefault   = null;
+    private Command cmdDisable      = null;
+    private Command cmdEnable       = null;
+
+    private Command cmdEnableText   = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Command Test");
+        this.shell.setLayout(new GridLayout(2, true));
+
+        // create current fields
+        Label currentLabel = new Label(this.shell, SWT.NONE);
+        currentLabel.setText("Current: ");
+        currentLabel.setLayoutData(
+            new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+
+        this.currentValue = new Label(this.shell, SWT.NONE);
+        this.currentValue.setText("none");
+        this.currentValue.setLayoutData(
+            new GridData(SWT.LEFT, SWT.CENTER, true, false));
+
+        // create commands
+        // Add commands
+        Command cmdAdd = new Command(this.shell, Command.COMMANDGROUP, 5);
+        cmdAdd.setText("Add");
+
+        this.cmdAddOK = new Command(cmdAdd, Command.GENERAL, 9);
+        this.cmdAddOK.setText("OK");
+        this.cmdAddOK.addSelectionListener(this);
+
+        this.cmdAddSELECT = new Command(cmdAdd, Command.GENERAL, 8);
+        this.cmdAddSELECT.setText("SELECT");
+        this.cmdAddSELECT.addSelectionListener(this);
+
+        this.cmdAddGENERAL = new Command(cmdAdd, Command.GENERAL, 7);
+        this.cmdAddGENERAL.setText("GENERAL");
+        this.cmdAddGENERAL.addSelectionListener(this);
+
+        this.cmdAddDELETE = new Command(cmdAdd, Command.GENERAL, 6);
+        this.cmdAddDELETE.setText("DELETE");
+        this.cmdAddDELETE.addSelectionListener(this);
+
+        this.cmdAddHELP = new Command(cmdAdd, Command.GENERAL, 5);
+        this.cmdAddHELP.setText("HELP");
+        this.cmdAddHELP.addSelectionListener(this);
+
+        this.cmdAddSTOP = new Command(cmdAdd, Command.GENERAL, 4);
+        this.cmdAddSTOP.setText("STOP");
+        this.cmdAddSTOP.addSelectionListener(this);
+
+        this.cmdAddCANCEL = new Command(cmdAdd, Command.GENERAL, 3);
+        this.cmdAddCANCEL.setText("CANCEL");
+        this.cmdAddCANCEL.addSelectionListener(this);
+
+        this.cmdAddBACK = new Command(cmdAdd, Command.GENERAL, 2);
+        this.cmdAddBACK.setText("BACK");
+        this.cmdAddBACK.addSelectionListener(this);
+
+        this.cmdAddEXIT = new Command(cmdAdd, Command.GENERAL, 1);
+        this.cmdAddEXIT.setText("EXIT");
+        this.cmdAddEXIT.addSelectionListener(this);
+
+        this.cmdAddCOMMANDGROUP = new Command(cmdAdd, Command.GENERAL, 0);
+        this.cmdAddCOMMANDGROUP.setText("COMMANDGROUP");
+        this.cmdAddCOMMANDGROUP.addSelectionListener(this);
+
+        // Remove commands
+        this.cmdRemove = new Command(this.shell, Command.COMMANDGROUP, 4);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveCurrent = new Command(cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveCurrent.setText("current");
+        this.cmdRemoveCurrent.addSelectionListener(this);
+        this.cmdRemoveCurrent.setEnabled(false);
+
+        this.cmdRemoveAll = new Command(cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveAll.setText("all");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        // Edit commands
+        this.cmdEdit = new Command(this.shell, Command.COMMANDGROUP, 1);
+        this.cmdEdit.setText("Edit");
+        this.cmdEdit.setEnabled(false);
+
+        this.cmdSetDefault = new Command(this.cmdEdit, Command.GENERAL, 2);
+        this.cmdSetDefault.setText("Set Default");
+        this.cmdSetDefault.addSelectionListener(this);
+
+        this.cmdDisable = new Command(this.cmdEdit, Command.GENERAL, 1);
+        this.cmdDisable.setText("Disable");
+        this.cmdDisable.addSelectionListener(this);
+
+        this.cmdEnable = new Command(this.cmdEdit, Command.GENERAL, 0);
+        this.cmdEnable.setText("Enable All");
+        this.cmdEnable.addSelectionListener(this);
+        this.cmdEnable.setEnabled(false);
+
+        this.cmdEnableText = new Command(this.cmdEdit, Command.GENERAL, 0);
+        this.cmdEnableText.setText("Switch Text State");
+        this.cmdEnableText.addSelectionListener(this);
+
+
+        // Params commands
+        Command cmdParams = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdParams.setText("Params");
+
+        this.cmdParamName = new Command(cmdParams, Command.GENERAL, 2);
+        this.cmdParamName.setText("Name");
+        this.cmdParamName.addSelectionListener(this);
+
+        this.cmdParamPriority = new Command(cmdParams, Command.GENERAL, 1);
+        this.cmdParamPriority.setText("Priority");
+        this.cmdParamPriority.addSelectionListener(this);
+
+        this.cmdParamButton = new Command(cmdParams, Command.GENERAL, 1);
+        this.cmdParamButton.setText("Set Button");
+        this.cmdParamButton.addSelectionListener(this);
+
+        this.cmdParamsClear = new Command(cmdParams, Command.GENERAL, 0);
+        this.cmdParamsClear.setText("Clear");
+        this.cmdParamsClear.addSelectionListener(this);
+        this.cmdParamsClear.setEnabled(false);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // Settings commands
+        if (event.widget == this.cmdParamName)
+        {
+            if (this.nameLabel == null || this.nameLabel.isDisposed())
+            {
+                this.nameLabel = new Label(this.shell, SWT.None);
+                this.nameLabel.setText("Name: ");
+                this.nameLabel.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+            }
+            if (this.nameField == null || this.nameField.isDisposed())
+            {
+                this.nameField = new Text(this.shell, SWT.BORDER);
+                this.nameField.setText("Command");
+                this.nameField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            this.cmdParamsClear.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdParamPriority)
+        {
+            if (this.priorityLabel == null || this.priorityLabel.isDisposed())
+            {
+                this.priorityLabel = new Label(this.shell, SWT.None);
+                this.priorityLabel.setText("Priority: ");
+                this.priorityLabel.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+            }
+            if (this.priorityField == null || this.priorityField.isDisposed())
+            {
+                this.priorityField = new ConstrainedText(this.shell,
+                        SWT.BORDER, ConstrainedText.NUMERIC);
+
+                this.priorityField.setText("0");
+                this.priorityField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            this.cmdParamsClear.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdParamButton)
+        {
+
+            if (this.button == null || this.button.isDisposed())
+            {
+                this.button = new Button(this.shell,SWT.BORDER);
+                this.button.setText("Command");
+
+                this.button.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+            }
+            this.cmdParamsClear.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdParamsClear)
+        {
+            this.clearSettings();
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // Add commands
+        if (event.widget == this.cmdAddCOMMANDGROUP)
+        {
+            this.addCommand(Command.COMMANDGROUP);
+            return;
+        }
+        if (event.widget == this.cmdAddOK)
+        {
+            this.addCommand(Command.OK);
+            return;
+        }
+        if (event.widget == this.cmdAddSELECT)
+        {
+            this.addCommand(Command.SELECT);
+            return;
+        }
+        if (event.widget == this.cmdAddGENERAL)
+        {
+            this.addCommand(Command.GENERAL);
+            return;
+        }
+        if (event.widget == this.cmdAddDELETE)
+        {
+            this.addCommand(Command.DELETE);
+            return;
+        }
+        if (event.widget == this.cmdAddHELP)
+        {
+            this.addCommand(Command.HELP);
+            return;
+        }
+        if (event.widget == this.cmdAddSTOP)
+        {
+            this.setExit(false);
+            this.addCommand(Command.STOP);
+            return;
+        }
+        if (event.widget == this.cmdAddCANCEL)
+        {
+            this.setExit(false);
+            this.addCommand(Command.CANCEL);
+            return;
+        }
+        if (event.widget == this.cmdAddBACK)
+        {
+            this.setExit(false);
+            this.addCommand(Command.BACK);
+            return;
+        }
+        if (event.widget == this.cmdAddEXIT)
+        {
+            this.setExit(false);
+            this.addCommand(Command.EXIT);
+            return;
+        }
+
+        // Remove commands
+        if (event.widget == this.cmdRemoveCurrent)
+        {
+            this.removeCommand(this.current);
+            this.current = null;
+            this.currentValue.setText("none");
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdRemoveAll)
+        {
+            while (this.commands.size()>0)
+            {
+                Command cmd = (Command) this.commands.elementAt(0);
+                this.removeCommand(cmd);
+            }
+            this.current = null;
+            this.currentValue.setText("none");
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // Edit commands
+        if (event.widget == this.cmdSetDefault)
+        {
+            if (this.current != null && !this.current.isDisposed())
+            {
+                this.current.setDefaultCommand();
+            }
+            return;
+        }
+        if (event.widget == this.cmdDisable)
+        {
+            if (this.current != null && !this.current.isDisposed())
+            {
+                this.current.setEnabled(false);
+                this.current = null;
+                this.currentValue.setText("none");
+
+                this.cmdEnable.setEnabled(true);
+                this.cmdSetDefault.setEnabled(false);
+                this.cmdDisable.setEnabled(false);
+                this.cmdRemoveCurrent.setEnabled(false);
+
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdEnable)
+        {
+            for (int i=0; i<this.commands.size(); i++)
+            {
+                ((Command)this.commands.elementAt(i)).setEnabled(true);
+            }
+            this.cmdEnable.setEnabled(false);
+            if (this.current == null)
+            {
+                this.cmdEdit.setEnabled(false);
+            }
+            return;
+        }
+        if (event.widget == this.cmdEnableText)
+        {
+            Control[] controls = this.shell.getChildren();
+
+            for (int i=0; i<controls.length; i++)
+            {
+                if (controls[i] instanceof Text)
+                {
+                    controls[i].setEnabled(!controls[i].getEnabled());
+                }
+            }
+
+            return;
+        }
+
+        // Custom commands (set to current)
+        if (event.widget instanceof Command && event.widget != this.cmdExit)
+        {
+            this.setCurrent((Command) event.widget);
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create new command of specified type and add it to the Options menu.
+     * @param type a type of a command to be added
+     * @return created and added command
+     */
+    private Command addCommand(int type)
+    {
+        Command cmd = null;
+        // take priority
+        int priority = 0;
+        if (this.priorityField != null && !this.priorityField.isDisposed())
+        {
+            priority = Integer.parseInt(this.priorityField.getText());
+        }
+        // take name
+        String name = null;
+        if (this.nameField != null && !this.nameField.isDisposed())
+        {
+            name = this.nameField.getText();
+        }
+
+        cmd = new Command(this.shell, type, priority);
+        if (name != null)
+        {
+            cmd.setText(name);
+        }
+
+        cmd.addSelectionListener(this);
+        this.commands.addElement(cmd);
+        this.cmdRemove.setEnabled(true);
+
+        return cmd;
+    }
+
+    /**
+     * Set a custom command to currently selected.
+     * @param cmd currently selected custom command
+     */
+    private void setCurrent(Command cmd)
+    {
+        this.current = cmd;
+        this.currentValue.setText(this.current.getText());
+        this.currentValue.pack();
+
+        this.cmdEdit.setEnabled(true);
+        this.cmdSetDefault.setEnabled(true);
+        this.cmdDisable.setEnabled(true);
+        this.cmdRemoveCurrent.setEnabled(true);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Remove specified custom command.
+     * @param cmd command to be removed
+     */
+    private void removeCommand(Command cmd)
+    {
+        if (this.commands.removeElement(cmd))
+        {
+            cmd.dispose();
+            this.cmdEdit.setEnabled(false);
+            this.cmdRemoveCurrent.setEnabled(false);
+        }
+        if (this.commands.size() == 0)
+        {
+            this.cmdRemove.setEnabled(false);
+        }
+    }
+
+    /**
+     * Dispose the settings field currently presented on the screen.
+     */
+    private void clearSettings()
+    {
+        if (this.nameLabel != null && !this.nameLabel.isDisposed())
+            this.nameLabel.dispose();
+        if (this.nameField != null && !this.nameField.isDisposed())
+            this.nameField.dispose();
+
+        if (this.priorityLabel != null && !this.priorityLabel.isDisposed())
+            this.priorityLabel.dispose();
+        if (this.priorityField != null && !this.priorityField.isDisposed())
+            this.priorityField.dispose();
+
+        this.cmdParamsClear.setEnabled(false);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/CommandTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="ConstrainedTextTestMidlet" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ConstrainedTextTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.constrainedtext.ConstrainedTextTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ConstrainedTextTestMidlet"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/src/com/nokia/test/java/eswt/constrainedtext/ConstrainedTextTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,276 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.constrainedtext;
+
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the constrainedtext component
+ * - caret position in constrainedtext
+ * - commands action in phonebook
+ * - copy & paste in constrainedtext
+ * - creating constrained text
+ * - inserting characters over text limit to constrainedtext
+ * - inserting characters  to constrainedtext control
+ * - setting constrainedtext non-editable
+ */
+public class ConstrainedTextTestMIDlet_01 extends TestBaseMIDlet implements FocusListener
+{
+    /** number inupt */
+    private ConstrainedText numCtext = null;
+    /** decimal input */
+    private ConstrainedText decCtext = null;
+    /** phonenumber input */
+    private ConstrainedText phnCtext = null;
+    /** non-editable test input */
+    private ConstrainedText nonCtext = null;
+    /** "change state" menuitem */
+    private MenuItem mnuChange = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Constrained Text");
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // set up the constrained textfields
+        // label for numeric text field
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Numeric:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // the numeric input field
+        this.numCtext = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.numCtext.setTextLimit(10);
+        this.numCtext.setText(String.valueOf(123));
+        this.numCtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // label for decimal text field
+        label = new Label(this.shell, SWT.NONE);
+        label.setText("Decimal:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // the decimal input field
+        this.decCtext = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.DECIMAL);
+        this.decCtext.setTextLimit(15);
+        this.decCtext.setText(String.valueOf(-1.23));
+        this.decCtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // label for phonenumber text field
+        label = new Label(this.shell, SWT.NONE);
+        label.setText("Phonenumber:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // the phonenumber input field
+        this.phnCtext = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.PHONENUMBER);
+        this.phnCtext.setTextLimit(20);
+        this.phnCtext.setText("+1*P#G");
+        this.phnCtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // label for the non-editable test input field
+        label = new Label(this.shell, SWT.NONE);
+        label.setText("Non-editable:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // the non-editable test input field
+        this.nonCtext = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.nonCtext.setText("7357");
+        this.nonCtext.setEditable(false);
+        this.nonCtext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        this.nonCtext.addFocusListener(this);
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "insert" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Insert");
+        item.setMenu(menu);
+        // ""123"" menuitem for "insert" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"123\"");
+        item.addSelectionListener(this);
+        // ""-1.23"" menuitem for "insert" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"-1.23\"");
+        item.addSelectionListener(this);
+        // ""+1*P#G"" menuitem for "insert" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"+1*P#G\"");
+        item.addSelectionListener(this);
+        // ""test"" menuitem for "insert" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"test\"");
+        item.addSelectionListener(this);
+        // "append" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Append");
+        item.setMenu(menu);
+        // ""123"" menuitem for "append" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"123\"");
+        item.addSelectionListener(this);
+        // ""-1.23"" menuitem for "append" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"-1.23\"");
+        item.addSelectionListener(this);
+        // ""+1*P#G"" menuitem for "append" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"+1*P#G\"");
+        item.addSelectionListener(this);
+        // ""test"" menuitem for "append" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"test\"");
+        item.addSelectionListener(this);
+        // "change state" menuitem
+        this.mnuChange = new MenuItem(mainmenu, SWT.PUSH);
+        this.mnuChange.setText("Change State");
+        this.mnuChange.addSelectionListener(this);
+        // "set position (3)" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Set Position (3)");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * determine the focused input field
+     * @return the focused constrainedtext field
+     */
+    private ConstrainedText getact()
+    {
+        if (this.numCtext.isFocusControl())
+            return this.numCtext;
+        else if (this.decCtext.isFocusControl())
+            return this.decCtext;
+        else if (this.phnCtext.isFocusControl())
+            return this.phnCtext;
+        else
+            return this.nonCtext;
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            ConstrainedText act = this.getact();
+            try
+            {
+                // try to do the selected action
+                if ("\"123\"".equals(scmd))
+                {
+                    scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                    if ("Insert".equals(scmd))
+                        // insert "123" at the i-beam's position
+                        act.insert("123");
+                    else if ("Append".equals(scmd))
+                        // append "123" to the focused field
+                        act.append("123");
+                    return;
+                }
+                if ("\"-1.23\"".equals(scmd))
+                {
+                    scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                    if ("Insert".equals(scmd))
+                        // insert "-1.23" at the i-beam's position
+                        act.insert("-1.23");
+                    else if ("Append".equals(scmd))
+                        // append "-1.23" to the focused field
+                        act.append("-1.23");
+                    return;
+                }
+                if ("\"+1*P#G\"".equals(scmd))
+                {
+                    scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                    if ("Insert".equals(scmd))
+                        // insert "+1*P#G" at the i-beam's position
+                        act.insert("+1*P#G");
+                    else if ("Append".equals(scmd))
+                        // append "+1*P#G" to the focused field
+                        act.append("+1*P#G");
+                    return;
+                }
+                if ("\"test\"".equals(scmd))
+                {
+                    scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                    if ("Insert".equals(scmd))
+                        // insert "test" at the i-beam's position
+                        act.insert("test");
+                    else if ("Append".equals(scmd))
+                        // append "test" to the focused field
+                        act.append("test");
+                    return;
+                }
+                if ("Set Position (3)".equals(scmd))
+                {
+                    // set i-beam's position after the 3rd character
+                    act.setSelection(3);
+                    return;
+                }
+            }
+            catch (Exception ex)
+            {
+                // display the exception
+                MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                msg.setText("Exception");
+                msg.setMessage(ex.getMessage());
+                msg.open();
+                return;
+            }
+            if (event.widget == this.mnuChange)
+            {
+                // change editable / non-editable state of the focused field
+                act.setEditable(!act.getEditable());
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * focuslistener implementation; focus gained
+     */
+    public void focusGained(FocusEvent event)
+    {
+        if (event.widget == this.nonCtext)
+            // disable changing the style of the non-editable test input field
+            this.mnuChange.setEnabled(false);
+    }
+
+    /**
+     * focuslistener implementation; focus lost
+     */
+    public void focusLost(FocusEvent event)
+    {
+        if (event.widget == this.nonCtext)
+            // enable changing the style of other input fields
+            this.mnuChange.setEnabled(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ConstrainedTextTestMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="ControlTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ControlTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.control.ControlTestMIDlet_01"/>
+    <property name="midlet2.name" value="ControlTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.control.ControlTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ControlTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ControlTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,850 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.control;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.events.SelectionEvent;
+
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.MobileDevice;
+import org.eclipse.ercp.swt.mobile.Screen;
+
+import java.util.Date;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * The Midlet tests some base controls such as Label, Button, Combo etc.
+ * The controls are created and added dynamically to a Shell one by one
+ * or all at once. Traversal order and visibility changes are tested also.
+ *
+ */
+public class ControlTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** */
+    private Command cmdAddLabel             = null;
+    private Command cmdAddHyperlink         = null;
+    private Command cmdAddText              = null;
+    private Command cmdAddConstrainedText   = null;
+    private Command cmdAddDateEditor        = null;
+    private Command cmdAddButton            = null;
+    private Command cmdAddCombo             = null;
+    private Command cmdAddSlider            = null;
+    private Command cmdAddProgressBar       = null;
+    private Command cmdAddAll               = null;
+    /** */
+    private Command cmdShowInvisible        = null;
+    private Command cmdEnableDisabled       = null;
+    /** */
+    private Command cmdDisable              = null;
+    private Command cmdDisableSel           = null;
+    private Command cmdDisableAll           = null;
+    /** */
+    private Command cmdSetInvisible         = null;
+    private Command cmdSetInvisibleSel      = null;
+    private Command cmdSetInvisibleAll      = null;
+    /** */
+    private Command cmdRemove               = null;
+    private Command cmdRemoveSelected       = null;
+    private Command cmdRemoveAll            = null;
+
+    private Command cmdResize               = null;
+    private Command cmdStretch              = null;
+    private Command cmdSkew                 = null;
+
+
+    private Command cmdSetToolTip           = null;
+
+    private Command cmdSetMenu              = null;
+    private Command cmdSetPopUpMenu         = null;
+
+    /** new shell instance */
+    private Shell testshell = null;
+
+    private Command cmdShell                = null;
+    //Command for testshell
+    private Command cmdSwitch               = null;
+    private Command cmdClose                = null;
+    private Command cmdOrientation          = null;
+
+    private MobileDevice iDevice;
+    private Screen[] iScreen;
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        if (this.shell != null && !this.shell.isDisposed())
+            this.shell.dispose();
+
+        this.shell = new Shell(this.display, SWT.V_SCROLL);
+        this.shell.setText("Control Test");
+
+        GridLayout layout = new GridLayout(1, false);
+        this.shell.setLayout(layout);
+
+        iDevice = MobileDevice.getMobileDevice();
+        iScreen = iDevice.getScreens();
+        // set the menu
+        this.menuSetup();
+    }
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+    /**
+     *
+     */
+    private void menuSetup()
+    {
+        // create menu commands
+        // Show Invisible command
+        this.cmdShowInvisible = new Command(this.shell, Command.GENERAL, 5);
+        this.cmdShowInvisible.setText("Show Invisible controls");
+        this.cmdShowInvisible.setEnabled(false);
+        this.cmdShowInvisible.addSelectionListener(this);
+
+        // Enable command
+        this.cmdEnableDisabled = new Command(this.shell, Command.GENERAL, 4);
+        this.cmdEnableDisabled.setText("Enable disabled controls");
+        this.cmdEnableDisabled.setEnabled(false);
+        this.cmdEnableDisabled.addSelectionListener(this);
+
+        // Set Invisible submenu
+        this.cmdSetInvisible = new Command(this.shell, Command.COMMANDGROUP, 3);
+        this.cmdSetInvisible.setText("Set Invisible");
+        this.cmdSetInvisible.setEnabled(false);
+
+        this.cmdSetInvisibleSel =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 1);
+        this.cmdSetInvisibleSel.setText("Selected");
+        this.cmdSetInvisibleSel.addSelectionListener(this);
+
+        this.cmdSetInvisibleAll =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 0);
+        this.cmdSetInvisibleAll.setText("All");
+        this.cmdSetInvisibleAll.addSelectionListener(this);
+
+        // Disable submenu
+        this.cmdDisable = new Command(this.shell, Command.COMMANDGROUP, 2);
+        this.cmdDisable.setText("Disable");
+        this.cmdDisable.setEnabled(false);
+
+        this.cmdDisableSel =
+            new Command(this.cmdDisable, Command.GENERAL, 1);
+        this.cmdDisableSel.setText("Selected");
+        this.cmdDisableSel.addSelectionListener(this);
+
+        this.cmdDisableAll =
+            new Command(this.cmdDisable, Command.GENERAL, 0);
+        this.cmdDisableAll.setText("All");
+        this.cmdDisableAll.addSelectionListener(this);
+
+        // Add submenu
+        Command add = new Command(this.shell, Command.COMMANDGROUP, 1);
+        add.setText("Add");
+
+        this.cmdAddLabel = new Command(add, Command.OK, 9);
+        this.cmdAddLabel.setText("Label");
+        this.cmdAddLabel.addSelectionListener(this);
+
+        this.cmdAddHyperlink = new Command(add, Command.OK, 8);
+        this.cmdAddHyperlink.setText("Hyperlink");
+        this.cmdAddHyperlink.addSelectionListener(this);
+
+        this.cmdAddText = new Command(add, Command.OK, 7);
+        this.cmdAddText.setText("Text");
+        this.cmdAddText.addSelectionListener(this);
+
+        this.cmdAddConstrainedText = new Command(add, Command.OK, 6);
+        this.cmdAddConstrainedText.setText("Constrained Text");
+        this.cmdAddConstrainedText.addSelectionListener(this);
+
+        this.cmdAddDateEditor = new Command(add, Command.OK, 5);
+        this.cmdAddDateEditor.setText("Date Editor");
+        this.cmdAddDateEditor.addSelectionListener(this);
+
+        this.cmdAddButton = new Command(add, Command.OK, 4);
+        this.cmdAddButton.setText("Button");
+        this.cmdAddButton.addSelectionListener(this);
+
+        this.cmdAddCombo = new Command(add, Command.OK, 3);
+        this.cmdAddCombo.setText("Combo");
+        this.cmdAddCombo.addSelectionListener(this);
+
+        this.cmdAddSlider = new Command(add, Command.OK, 2);
+        this.cmdAddSlider.setText("Slider");
+        this.cmdAddSlider.addSelectionListener(this);
+
+        this.cmdAddProgressBar = new Command(add, Command.OK, 1);
+        this.cmdAddProgressBar.setText("Progress Bar");
+        this.cmdAddProgressBar.addSelectionListener(this);
+
+        this.cmdAddAll = new Command(add, Command.GENERAL, 0);
+        this.cmdAddAll.setText("All");
+        this.cmdAddAll.addSelectionListener(this);
+
+        // Remove submenu
+        this.cmdRemove = new Command(this.shell, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveSelected =
+            new Command(this.cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveSelected.setText("Selected");
+        this.cmdRemoveSelected.addSelectionListener(this);
+
+        this.cmdRemoveAll =
+            new Command(this.cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveAll.setText("All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        // Resize submenu
+        this.cmdResize = new Command(this.shell, Command.COMMANDGROUP, 0);
+        this.cmdResize.setText("Resize");
+        this.cmdResize.setEnabled(false);
+
+        this.cmdStretch =
+            new Command(this.cmdResize, Command.SELECT, 1);
+        this.cmdStretch.setText("Stretch");
+        this.cmdStretch.addSelectionListener(this);
+
+        this.cmdSkew =
+            new Command(this.cmdResize, Command.SELECT, 0);
+        this.cmdSkew.setText("Skew");
+        this.cmdSkew.addSelectionListener(this);
+
+        this.cmdSetToolTip = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdSetToolTip.setText("Set ToolTip");
+        this.cmdSetToolTip.addSelectionListener(this);
+
+        this.cmdSetMenu = new Command(this.shell, Command.SELECT, 0);
+        this.cmdSetMenu.setText("Set Menu");
+        this.cmdSetMenu.addSelectionListener(this);
+
+        this.cmdSetPopUpMenu = new Command(this.shell, Command.SELECT, 0);
+        this.cmdSetPopUpMenu.setText("Set Pop up Menu");
+        this.cmdSetPopUpMenu.addSelectionListener(this);
+
+        this.cmdShell = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdShell.setText("Show shell");
+        this.cmdShell.addSelectionListener(this);
+
+        this.cmdOrientation = new Command(this.shell, Command.SELECT, 0);
+        this.cmdOrientation.setText("Change orientation");
+        this.cmdOrientation.addSelectionListener(this);
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (!(event.widget instanceof Command || event.widget instanceof MenuItem)) return;
+
+        boolean changed = false;
+
+        if (event.widget instanceof MenuItem)
+        {
+            event.widget.dispose();
+            changed = true;
+        }
+        // Show Invisible command
+        if (event.widget == this.cmdShowInvisible)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setVisible(true);
+            }
+            this.cmdShowInvisible.setEnabled(false);
+            changed = true;
+        }
+        // Enable command
+        if (event.widget == this.cmdEnableDisabled)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setEnabled(true);
+            }
+            this.cmdEnableDisabled.setEnabled(false);
+            changed = true;
+        }
+        // Disable commands
+        if (event.widget == this.cmdDisableSel)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setEnabled(false);
+                this.cmdEnableDisabled.setEnabled(true);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdDisableAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setEnabled(false);
+            }
+            this.cmdEnableDisabled.setEnabled(true);
+            changed = true;
+        }
+        // Set Invisible commands
+        if (event.widget == this.cmdSetInvisibleSel)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setVisible(false);
+                this.cmdShowInvisible.setEnabled(true);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdSetInvisibleAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setVisible(false);
+            }
+            this.cmdShowInvisible.setEnabled(true);
+            changed = true;
+        }
+
+        // Add commands
+        if (event.widget == this.cmdAddLabel)
+        {
+            this.addLabel();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddHyperlink)
+        {
+            this.addHyperlink();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddText)
+        {
+            this.addText();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddConstrainedText)
+        {
+            this.addConstrainedText();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddDateEditor)
+        {
+            this.addDateEditor();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddButton)
+        {
+            this.addButton();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddCombo)
+        {
+            this.addCombo();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddSlider)
+        {
+            this.addSlider();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddProgressBar)
+        {
+            this.addProgressBar();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddAll)
+        {
+            this.addAll();
+            this.cmdSetInvisible.setEnabled(true);
+            this.cmdDisable.setEnabled(true);
+            this.cmdRemove.setEnabled(true);
+            this.cmdResize.setEnabled(true);
+            changed = true;
+        }
+        // Remove commands
+        if (event.widget == this.cmdRemoveSelected)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.dispose();
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdRemoveAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+                changed = true;
+            }
+        }
+        // Resize commands
+        if (event.widget == this.cmdStretch)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                GridData data = new GridData(SWT.FILL,SWT.FILL,true,true);
+                control.setLayoutData(data);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdSkew)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                GridData data = new GridData();
+                data.grabExcessHorizontalSpace = true;
+                data.horizontalAlignment = SWT.CENTER;
+                control.setLayoutData(data);
+                changed = true;
+            }
+
+        }
+        if (event.widget == this.cmdSetToolTip)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setToolTipText(control.toString());
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdShell)
+        {
+            this.createTestShell(SWT.DIALOG_TRIM,"Dialog Shell","Try to tap this. No Tactile Feedback.", "Maximize", true);
+        }
+        if (event.widget == this.cmdSetMenu)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                try
+                {
+                    Menu menu = new Menu(control);
+                    MenuItem item = new MenuItem(menu, SWT.PUSH);
+                    item.setText(control.toString());
+                    item.addSelectionListener(this);
+
+                    control.setMenu(menu);
+                    changed = true;
+                }
+                catch (Exception ex)
+                {
+                    this.showException("Menu could not be created: "+ ex.toString());
+                }
+            }
+        }
+        if (event.widget == this.cmdSetPopUpMenu)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                try
+                {
+                    Menu menu = new Menu(this.shell,SWT.POP_UP);
+                    MenuItem item = new MenuItem(menu, SWT.PUSH);
+                    item.setText("POP "+control.toString());
+                    item.addSelectionListener(this);
+
+                    control.setMenu(menu);
+                    changed = true;
+                }
+                catch (Exception ex)
+                {
+                    this.showException("Menu could not be created: "+ ex.toString());
+                }
+            }
+        }
+        if (event.widget == this.cmdSwitch)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Maximize".equals(scmd))
+            {
+                // maximize the test shell
+                this.cmdSwitch.setText("Restore");
+                this.testshell.setMaximized(true);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Restore".equals(scmd))
+            {
+                // restore the test shell
+                this.cmdSwitch.setText("Maximize");
+                this.testshell.setMaximized(false);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Switch".equals(scmd))
+            {
+                // switch to the original shell
+                this.shell.setActive();
+                this.shell.update();
+                return;
+            }
+        }
+        if (event.widget == this.cmdClose)
+        {
+            // close the test shell
+            this.closeTestShell();
+            return;
+        }
+
+        // update the shell if needed
+        if (changed)
+        {
+            if (this.shell.getChildren().length == 0)
+            {
+                this.cmdSetInvisible.setEnabled(false);
+                this.cmdShowInvisible.setEnabled(false);
+                this.cmdDisable.setEnabled(false);
+                this.cmdEnableDisabled.setEnabled(false);
+                this.cmdRemove.setEnabled(false);
+            }
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        else if (event.widget == this.cmdOrientation)
+        {
+
+            if (iScreen[0].getOrientation() == Screen.LANDSCAPE)
+                this.iScreen[0].setOrientation(Screen.PORTRAIT);
+            else
+                this.iScreen[0].setOrientation(Screen.LANDSCAPE);
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * close the test shell and dispose its controls
+     */
+    private void closeTestShell()
+    {
+        if (this.testshell != null && !this.testshell.isDisposed())
+            this.testshell.dispose();
+    }
+    /**
+     * creates a shell based on the given parameters
+     * @param style the style og the shell
+     * @param title the title of the shell
+     * @param labelStr string for a label on the shell
+     * @param leftCmd string for the left softkey command
+     * @param doPack true if the should be pack()-ed before layout()
+     */
+    private void createTestShell(int style, String title, String labelStr, String leftCmd, boolean doPack)
+    {
+        // create the new shell
+        this.testshell = new Shell(this.shell, style);
+        // set title
+        if (title != null)
+            this.testshell.setText(title);
+        this.testshell.setLayout(new GridLayout());
+        // add a label
+        Label label = new Label(this.testshell, SWT.CENTER);
+        label.setText(labelStr);
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // left softkey command
+        if (leftCmd != null)
+        {
+            this.cmdSwitch = new Command(this.testshell, Command.SELECT, 0);
+            this.cmdSwitch.setText(leftCmd);
+            this.cmdSwitch.addSelectionListener(this);
+        }
+        // "close" right softkey command
+        this.cmdClose = new Command(this.testshell, Command.EXIT, 0);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+        // display the new shell
+        if (doPack)
+            this.testshell.pack();
+        this.testshell.layout();
+        this.testshell.open();
+    }
+
+    /**
+     * Create a Label and add it to current shell.
+     */
+    private void addLabel()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Label:");*/
+        // control
+        Label control = new Label(this.shell, SWT.NONE);
+        control.setText("A Label control");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Hyperlink and add it to current shell.
+     */
+    private void addHyperlink()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Hyperlink:");*/
+        // control
+        HyperLink control = new HyperLink(this.shell, SWT.NONE, HyperLink.EMAIL);
+        control.setText("some.name@foo.com");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Text and add it to current shell.
+     */
+    private void addText()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Text:");*/
+        // control
+        Text control = new Text(this.shell, SWT.BORDER);
+        control.setText("Text field");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a ConstrainedText and add it to current shell.
+     */
+    private void addConstrainedText()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Constrained Text:");*/
+        // control
+        ConstrainedText control =
+            new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.PHONENUMBER);
+        control.setText("+*#0123456789");
+        control.setTextLimit(15);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Slider control and add it to current shell.
+     */
+    private void addSlider()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Slider:");*/
+        // control
+        Slider control = new Slider(this.shell, SWT.HORIZONTAL);
+        control.setMaximum(10);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a DateEditor and add it to current shell.
+     */
+    private void addDateEditor()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        DateEditor control =
+            new DateEditor(this.shell, SWT.BORDER, DateEditor.DATE_TIME);
+        control.setDate(new Date());
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Button and add it to current shell.
+     */
+    private void addButton()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        Button control = new Button(this.shell, SWT.PUSH);
+        control.setText("A Button");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Combo control and add it to current shell.
+     */
+    private void addCombo()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        Combo control =
+            new Combo(this.shell, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
+        control.add("item 1");
+        control.add("item 2");
+        control.add("item 3");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+        control.pack();
+    }
+
+    /**
+     * Create a ProgressBar and add it to current shell.
+     */
+    private void addProgressBar()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        ProgressBar control = new ProgressBar(this.shell, SWT.BORDER | SWT.HORIZONTAL);
+        control.setMaximum(100);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Add all controls at once.
+     */
+    private void addAll()
+    {
+        addLabel();
+        addHyperlink();
+        addText();
+        addConstrainedText();
+        addDateEditor();
+        addButton();
+        addCombo();
+        addSlider();
+        addProgressBar();
+    }
+
+    /**
+     * Return currently focused control.
+     * @return selected control
+     */
+    private Control getSelectedControl()
+    {
+        Control result = null;
+
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            if (controls[i].isFocusControl())
+            {
+                result = controls[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ControlTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,911 @@
+/*
+* 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.test.java.eswt.control;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.events.SelectionEvent;
+
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.ercp.swt.mobile.Command;
+
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+
+
+import com.nokia.mid.ui.TactileFeedback;
+import java.util.Date;
+
+import com.nokia.test.java.eswt.control.CustomControl;
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class ControlTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** */
+    private Command cmdAddLabel             = null;
+    private Command cmdAddHyperlink         = null;
+    private Command cmdAddText              = null;
+    private Command cmdAddConstrainedText   = null;
+    private Command cmdAddDateEditor        = null;
+    private Command cmdAddButton            = null;
+    private Command cmdAddCombo             = null;
+    private Command cmdAddSlider            = null;
+    private Command cmdAddProgressBar       = null;
+    private Command cmdAddCustomControl     = null;
+    private Command cmdAddImageCanvas       = null;
+    private Command cmdAddAll               = null;
+    /** */
+    private Command cmdShowInvisible        = null;
+    private Command cmdEnableDisabled       = null;
+    /** */
+    private Command cmdDisable              = null;
+    private Command cmdDisableSel           = null;
+    private Command cmdDisableAll           = null;
+    /** */
+    private Command cmdSetInvisible         = null;
+    private Command cmdSetInvisibleSel      = null;
+    private Command cmdSetInvisibleAll      = null;
+    /** */
+    private Command cmdRemove               = null;
+    private Command cmdRemoveSelected       = null;
+    private Command cmdRemoveAll            = null;
+
+    private Command cmdResize               = null;
+    private Command cmdStretch              = null;
+    private Command cmdSkew                 = null;
+
+    private Command cmdSetToolTip           = null;
+
+    private Command cmdSetMenu              = null;
+
+    private Command cmdRemoveArea               = null;
+    private Command cmdAddAreas             = null;
+    private Command cmdUnregister1          = null;
+    private Command cmdUnregister2          = null;
+    private Command cmdSwitch           = null;
+    private Command cmdSupported    = null;
+
+    private TactileFeedback tf              = null;
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        try
+        {
+            if (this.shell != null && !this.shell.isDisposed())
+                this.shell.dispose();
+
+            this.shell = new Shell(this.display, SWT.V_SCROLL);
+            this.shell.setText("Control Test 02");
+
+            GridLayout layout = new GridLayout(1, false);
+            this.shell.setLayout(layout);
+
+            this.tf = new TactileFeedback();
+            // set the menu
+            this.menuSetup();
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage(ex.getMessage());
+            mb.open();
+        }
+    }
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+    /**
+     *
+     */
+    private void menuSetup()
+    {
+        // create menu commands
+        // Show Invisible command
+        this.cmdShowInvisible = new Command(this.shell, Command.GENERAL, 5);
+        this.cmdShowInvisible.setText("Show Invisible controls");
+        this.cmdShowInvisible.setEnabled(false);
+        this.cmdShowInvisible.addSelectionListener(this);
+
+        // Enable command
+        this.cmdEnableDisabled = new Command(this.shell, Command.GENERAL, 4);
+        this.cmdEnableDisabled.setText("Enable disabled controls");
+        this.cmdEnableDisabled.setEnabled(false);
+        this.cmdEnableDisabled.addSelectionListener(this);
+
+        // Set Invisible submenu
+        this.cmdSetInvisible = new Command(this.shell, Command.COMMANDGROUP, 3);
+        this.cmdSetInvisible.setText("Set Invisible");
+        this.cmdSetInvisible.setEnabled(false);
+
+        this.cmdSetInvisibleSel =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 1);
+        this.cmdSetInvisibleSel.setText("Selected");
+        this.cmdSetInvisibleSel.addSelectionListener(this);
+
+        this.cmdSetInvisibleAll =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 0);
+        this.cmdSetInvisibleAll.setText("All");
+        this.cmdSetInvisibleAll.addSelectionListener(this);
+
+        // Disable submenu
+        this.cmdDisable = new Command(this.shell, Command.COMMANDGROUP, 2);
+        this.cmdDisable.setText("Disable");
+        this.cmdDisable.setEnabled(false);
+
+        this.cmdDisableSel =
+            new Command(this.cmdDisable, Command.GENERAL, 1);
+        this.cmdDisableSel.setText("Selected");
+        this.cmdDisableSel.addSelectionListener(this);
+
+        this.cmdDisableAll =
+            new Command(this.cmdDisable, Command.GENERAL, 0);
+        this.cmdDisableAll.setText("All");
+        this.cmdDisableAll.addSelectionListener(this);
+
+        // Add submenu
+        Command add = new Command(this.shell, Command.COMMANDGROUP, 1);
+        add.setText("Add");
+
+        this.cmdAddLabel = new Command(add, Command.GENERAL, 9);
+        this.cmdAddLabel.setText("Label");
+        this.cmdAddLabel.addSelectionListener(this);
+
+        this.cmdAddHyperlink = new Command(add, Command.GENERAL, 8);
+        this.cmdAddHyperlink.setText("Hyperlink");
+        this.cmdAddHyperlink.addSelectionListener(this);
+
+        this.cmdAddText = new Command(add, Command.GENERAL, 7);
+        this.cmdAddText.setText("Text");
+        this.cmdAddText.addSelectionListener(this);
+
+        this.cmdAddConstrainedText = new Command(add, Command.GENERAL, 6);
+        this.cmdAddConstrainedText.setText("Constrained Text");
+        this.cmdAddConstrainedText.addSelectionListener(this);
+
+        this.cmdAddDateEditor = new Command(add, Command.GENERAL, 5);
+        this.cmdAddDateEditor.setText("Date Editor");
+        this.cmdAddDateEditor.addSelectionListener(this);
+
+        this.cmdAddButton = new Command(add, Command.GENERAL, 4);
+        this.cmdAddButton.setText("Button");
+        this.cmdAddButton.addSelectionListener(this);
+
+        this.cmdAddCombo = new Command(add, Command.GENERAL, 3);
+        this.cmdAddCombo.setText("Combo");
+        this.cmdAddCombo.addSelectionListener(this);
+
+        this.cmdAddSlider = new Command(add, Command.GENERAL, 2);
+        this.cmdAddSlider.setText("Slider");
+        this.cmdAddSlider.addSelectionListener(this);
+
+        this.cmdAddProgressBar = new Command(add, Command.GENERAL, 1);
+        this.cmdAddProgressBar.setText("Progress Bar");
+        this.cmdAddProgressBar.addSelectionListener(this);
+
+        this.cmdAddCustomControl = new Command(add, Command.GENERAL, 1);
+        this.cmdAddCustomControl.setText("CustomControl");
+        this.cmdAddCustomControl.addSelectionListener(this);
+
+        this.cmdAddImageCanvas = new Command(add, Command.GENERAL, 1);
+        this.cmdAddImageCanvas.setText("ImageCanvas");
+        this.cmdAddImageCanvas.addSelectionListener(this);
+
+        this.cmdAddAll = new Command(add, Command.GENERAL, 0);
+        this.cmdAddAll.setText("All");
+        this.cmdAddAll.addSelectionListener(this);
+
+        // Remove submenu
+        this.cmdRemove = new Command(this.shell, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveSelected =
+            new Command(this.cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveSelected.setText("Selected");
+        this.cmdRemoveSelected.addSelectionListener(this);
+
+        this.cmdRemoveAll =
+            new Command(this.cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveAll.setText("All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        // Resize submenu
+        this.cmdResize = new Command(this.shell, Command.COMMANDGROUP, 0);
+        this.cmdResize.setText("Resize");
+        this.cmdResize.setEnabled(false);
+
+        this.cmdStretch =
+            new Command(this.cmdResize, Command.GENERAL, 1);
+        this.cmdStretch.setText("Stretch");
+        this.cmdStretch.addSelectionListener(this);
+
+        this.cmdSkew =
+            new Command(this.cmdResize, Command.GENERAL, 0);
+        this.cmdSkew.setText("Skew");
+        this.cmdSkew.addSelectionListener(this);
+
+        this.cmdSetToolTip = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdSetToolTip.setText("Set ToolTip");
+        this.cmdSetToolTip.addSelectionListener(this);
+
+        this.cmdSetMenu = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdSetMenu.setText("Set Menu");
+        this.cmdSetMenu.addSelectionListener(this);
+
+        // tactile feedback submenu
+        Command tactile = new Command(this.shell, Command.COMMANDGROUP, 1);
+        tactile.setText("Tactile Feedback");
+
+        this.cmdSwitch = new Command(tactile, Command.GENERAL, 9);
+        this.cmdSwitch.setText("Switch");
+        this.cmdSwitch.addSelectionListener(this);
+
+        this.cmdUnregister1 = new Command(tactile, Command.GENERAL, 8);
+        this.cmdUnregister1.setText("Unregister red area");
+        this.cmdUnregister1.addSelectionListener(this);
+
+        this.cmdUnregister2 = new Command(tactile, Command.GENERAL, 7);
+        this.cmdUnregister2.setText("Unregister blue area");
+        this.cmdUnregister2.addSelectionListener(this);
+
+        this.cmdRemoveArea = new Command(tactile, Command.GENERAL, 6);
+        this.cmdRemoveArea.setText("Remove Tactile Feedback");
+        this.cmdRemoveArea.addSelectionListener(this);
+
+        this.cmdAddAreas = new Command(tactile, Command.GENERAL, 0);
+        this.cmdAddAreas.setText("Add areas");
+        this.cmdAddAreas.addSelectionListener(this);
+
+        this.cmdSupported = new Command(tactile, Command.GENERAL, 0);
+        this.cmdSupported.setText("Is Supported");
+        this.cmdSupported.addSelectionListener(this);
+
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (!(event.widget instanceof Command || event.widget instanceof MenuItem)) return;
+
+        boolean changed = false;
+
+        if (event.widget instanceof MenuItem)
+        {
+            event.widget.dispose();
+            changed = true;
+        }
+        // Show Invisible command
+        if (event.widget == this.cmdShowInvisible)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setVisible(true);
+            }
+            this.cmdShowInvisible.setEnabled(false);
+            changed = true;
+        }
+        // Enable command
+        if (event.widget == this.cmdEnableDisabled)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setEnabled(true);
+            }
+            this.cmdEnableDisabled.setEnabled(false);
+            changed = true;
+        }
+        // Disable commands
+        if (event.widget == this.cmdDisableSel)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setEnabled(false);
+                this.cmdEnableDisabled.setEnabled(true);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdDisableAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setEnabled(false);
+            }
+            this.cmdEnableDisabled.setEnabled(true);
+            changed = true;
+        }
+        // Set Invisible commands
+        if (event.widget == this.cmdSetInvisibleSel)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setVisible(false);
+                this.cmdShowInvisible.setEnabled(true);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdSetInvisibleAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].setVisible(false);
+            }
+            this.cmdShowInvisible.setEnabled(true);
+            changed = true;
+        }
+
+        // Add commands
+        if (event.widget == this.cmdAddLabel)
+        {
+            this.addLabel();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddHyperlink)
+        {
+            this.addHyperlink();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddText)
+        {
+            this.addText();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddConstrainedText)
+        {
+            this.addConstrainedText();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddDateEditor)
+        {
+            this.addDateEditor();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddButton)
+        {
+            this.addButton();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddCombo)
+        {
+            this.addCombo();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddSlider)
+        {
+            this.addSlider();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddProgressBar)
+        {
+            this.addProgressBar();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddCustomControl)
+        {
+            this.addCustomControl();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddImageCanvas)
+        {
+            this.addImageCanvas();
+            this.enableCommands(true);
+            changed = true;
+        }
+        if (event.widget == this.cmdAddAll)
+        {
+            this.addAll();
+            this.enableCommands(true);
+            changed = true;
+        }
+        // Remove commands
+        if (event.widget == this.cmdRemoveSelected)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.dispose();
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdRemoveAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+                changed = true;
+            }
+        }
+        // Resize commands
+        if (event.widget == this.cmdStretch)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                GridData data = new GridData(SWT.FILL,SWT.FILL,true,true);
+                control.setLayoutData(data);
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdSkew)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                GridData data = new GridData();
+                data.grabExcessHorizontalSpace = true;
+                data.horizontalAlignment = SWT.CENTER;
+                control.setLayoutData(data);
+                changed = true;
+            }
+
+        }
+        if (event.widget == this.cmdSetToolTip)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                control.setToolTipText(control.toString());
+                changed = true;
+            }
+        }
+        if (event.widget == this.cmdSetMenu)
+        {
+            Control control = this.getSelectedControl();
+            if (control != null)
+            {
+                try
+                {
+                    Menu menu = new Menu(control);
+                    MenuItem item = new MenuItem(menu, SWT.PUSH);
+                    item.setText(control.toString());
+                    item.addSelectionListener(this);
+
+                    control.setMenu(menu);
+                    changed = true;
+                }
+                catch (Exception ex)
+                {
+                    this.showException("Menu could not be created: "+ ex.toString());
+                }
+            }
+        }
+
+        // update the shell if needed
+        if (changed)
+        {
+            if (this.shell.getChildren().length == 0)
+            {
+                this.enableCommands(false);
+                this.cmdShowInvisible.setEnabled(false);
+                this.cmdEnableDisabled.setEnabled(false);
+            }
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        else if (event.widget == this.cmdAddAreas)
+        {
+            this.addTactileFeedback(this.getSelectedControl());
+        }
+        else if (event.widget == this.cmdRemoveArea)
+        {
+            this.removeFeedback(this.getSelectedControl());
+        }
+        else if (event.widget == this.cmdUnregister1)
+        {
+            this.unregisterArea(this.getSelectedControl(),0);
+        }
+        else if (event.widget == this.cmdUnregister2)
+        {
+            this.unregisterArea(this.getSelectedControl(),1);
+        }
+        else if (event.widget == this.cmdSwitch)
+        {
+            this.switchAreas(this.getSelectedControl());
+        }
+        else if (event.widget == this.cmdSupported)
+        {
+
+            String note = null;
+            if (tf.isTouchFeedbackSupported())
+            {
+                note = "true";
+            }
+            else
+            {
+                note = "false";
+            }
+            // show a messagebox
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Tactile Feedback");
+            mb.setMessage("Is Supported: "+note);
+            mb.open();
+
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create a Label and add it to current shell.
+     */
+    private void enableCommands(boolean state)
+    {
+        this.cmdSetInvisible.setEnabled(state);
+        this.cmdDisable.setEnabled(state);
+        this.cmdRemove.setEnabled(state);
+        this.cmdResize.setEnabled(state);
+
+    }
+    /**
+     * Create a Label and add it to current shell.
+     */
+    private void addLabel()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Label:");*/
+        // control
+        Label control = new Label(this.shell, SWT.NONE);
+        control.setText("A Label control");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Hyperlink and add it to current shell.
+     */
+    private void addHyperlink()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Hyperlink:");*/
+        // control
+        HyperLink control = new HyperLink(this.shell, SWT.NONE, HyperLink.EMAIL);
+        control.setText("some.name@foo.com");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Text and add it to current shell.
+     */
+    private void addText()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Text:");*/
+        // control
+        Text control = new Text(this.shell, SWT.BORDER);
+        control.setText("Text field");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a ConstrainedText and add it to current shell.
+     */
+    private void addConstrainedText()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Constrained Text:");*/
+        // control
+        ConstrainedText control =
+            new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.PHONENUMBER);
+        control.setText("+*#0123456789");
+        control.setTextLimit(15);
+        control.addFocusListener(new FocusListener()
+        {
+            public void focusGained(FocusEvent e)
+            {
+                tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_BASIC);
+            }
+            public void focusLost(FocusEvent e)
+            {
+                tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+            }
+        });
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Slider control and add it to current shell.
+     */
+    private void addSlider()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Slider:");*/
+        // control
+        Slider control = new Slider(this.shell, SWT.HORIZONTAL);
+        control.setMaximum(10);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a DateEditor and add it to current shell.
+     */
+    private void addDateEditor()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        DateEditor control =
+            new DateEditor(this.shell, SWT.BORDER, DateEditor.DATE_TIME);
+        control.setDate(new Date());
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Button and add it to current shell.
+     */
+    private void addButton()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        Button control = new Button(this.shell, SWT.PUSH);
+        control.addFocusListener(new FocusListener()
+        {
+            public void focusGained(FocusEvent e)
+            {
+                tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_BASIC);
+            }
+            public void focusLost(FocusEvent e)
+            {
+                tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+            }
+        });
+        control.setText("A Button");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Combo control and add it to current shell.
+     */
+    private void addCombo()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        Combo control =
+            new Combo(this.shell, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
+        control.add("item 1");
+        control.add("item 2");
+        control.add("item 3");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+        control.pack();
+    }
+
+    /**
+     * Create a ProgressBar and add it to current shell.
+     */
+    private void addProgressBar()
+    {
+        // label
+        /*Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Date Editor:");*/
+        // control
+        ProgressBar control = new ProgressBar(this.shell, SWT.BORDER | SWT.HORIZONTAL);
+        control.setMaximum(100);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+    /**
+     * Create a Custom Control and add it to current shell.
+     */
+    private void addCustomControl()
+    {
+        try
+        {
+            // label
+            /*Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Date Editor:");*/
+            // control
+            CustomControl control = new CustomControl(this.shell);
+            //GridData data = new GridData();
+            GridData data = new GridData(SWT.FILL,SWT.CENTER,true,true);
+            control.setLayoutData(data);
+        }
+        catch (Exception ex)
+        {
+
+            this.showException(ex.getMessage());
+        }
+
+    }
+    private void addImageCanvas()
+    {
+        try
+        {
+            // label
+            /*Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Date Editor:");*/
+            // control
+            ImageCanvas control = new ImageCanvas(this.shell,SWT.NO_BACKGROUND);
+
+            control.setBackground(this.display.getSystemColor(SWT.COLOR_YELLOW));
+            GridData data = new GridData();
+            data.grabExcessHorizontalSpace = true;
+            data.horizontalAlignment = SWT.CENTER;
+            control.setLayoutData(data);
+        }
+        catch (Exception ex)
+        {
+
+            this.showException(ex.getMessage());
+        }
+
+    }
+
+    /**
+     * Add all controls at once.
+     */
+    private void addAll()
+    {
+        addLabel();
+        addHyperlink();
+        addText();
+        addConstrainedText();
+        addDateEditor();
+        addButton();
+        addCombo();
+        addSlider();
+        addProgressBar();
+    }
+
+    /**
+     * Return currently focused control.
+     * @return selected control
+     */
+    private Control getSelectedControl()
+    {
+        Control result = null;
+
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            if (controls[i].isFocusControl())
+            {
+                result = controls[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+
+    private void addTactileFeedback(Control control)
+    {
+
+        tf.registerFeedbackArea(control,0,0,0,control.getBounds().width/2,control.getBounds().height,TactileFeedback.FEEDBACK_STYLE_BASIC);
+        tf.registerFeedbackArea(control,1,control.getBounds().width/2,0,control.getBounds().width,control.getBounds().height,TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+
+    }
+    private void unregisterArea(Control control, int id)
+    {
+        if (control instanceof CustomControl)
+        {
+            CustomControl ctrl = (CustomControl)control;
+            ctrl.unregisterArea(id);
+            control = ctrl;
+        }
+        tf.unregisterFeedbackArea(control,id);
+    }
+    private void removeFeedback(Control control)
+    {
+        if (control instanceof CustomControl)
+        {
+            CustomControl ctrl = (CustomControl)control;
+            ctrl.removeFeedback();
+            control = ctrl;
+        }
+        else
+        {
+            tf.removeFeedbackForComponent(control);
+        }
+    }
+    private void switchAreas(Control control)
+    {
+
+        if (control instanceof CustomControl)
+        {
+            CustomControl ctrl = (CustomControl)control;
+            ctrl.switchAreas();
+            control = ctrl;
+        }
+        else
+        {
+
+            tf.moveFeedbackAreaToFirstPriority(control,1);
+        }
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/CustomControl.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* 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.test.java.eswt.control;
+
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+
+import org.eclipse.swt.widgets.Display;
+
+import com.nokia.mid.ui.TactileFeedback;
+
+
+public class CustomControl extends Composite implements PaintListener, ControlListener, FocusListener, DisposeListener
+{
+
+
+    private Image image;
+    private GC gc;
+    private TactileFeedback tf;
+    private boolean draw_focus;
+
+    /** */
+    protected Display display = null;
+
+    public CustomControl(Composite parent)
+    {
+        super(parent,SWT.NO_BACKGROUND);
+
+        this.display = super.getDisplay();
+        this.draw_focus = true;
+        addPaintListener(this);
+        addControlListener(this);
+        addFocusListener(this);
+        addDisposeListener(this);
+        tf = new TactileFeedback();
+    }
+
+    /**
+     * paintlistener implementation
+     */
+    public void paintControl(PaintEvent event)
+    {
+        //if (this.isEnabled())
+        if (image == null || image.isDisposed())
+        {
+            image = new Image(Display.getCurrent(), getSize().x, getSize().y);
+            gc = new GC(image);
+
+        }
+        if (draw_focus)
+        {
+            gc.drawFocus(image.getBounds().x,image.getBounds().y,image.getBounds().width,image.getBounds().height);
+        }
+
+        gc.setLineStyle(SWT.LINE_SOLID);
+        gc.setLineWidth(5);
+
+        gc.setBackground(this.display.getSystemColor(SWT.COLOR_YELLOW));
+        gc.fillRectangle(image.getBounds().x,image.getBounds().y,image.getBounds().width,image.getBounds().height);
+        //draw  Feedback areas
+        gc.setForeground(this.display.getSystemColor(SWT.COLOR_RED));
+        gc.drawRectangle(image.getBounds().x,image.getBounds().y,(image.getBounds().width/2)+20,image.getBounds().height);
+        gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+        gc.drawRectangle((image.getBounds().width/2),image.getBounds().y,image.getBounds().width,image.getBounds().height);
+
+
+        event.gc.drawImage(image,0,0);
+
+    }
+
+    public void registerTactileFeedback()
+    {
+
+        tf.registerFeedbackArea(this,0,5,0,(this.getSize().x/2)+20,this.getSize().y,TactileFeedback.FEEDBACK_STYLE_BASIC);
+        tf.registerFeedbackArea(this,1,(this.getSize().x/2),0,this.getSize().x-5,this.getSize().y,TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+
+    }
+
+    public void unregisterArea(int id)
+    {
+        tf.unregisterFeedbackArea(this,id);
+
+    }
+    public void removeFeedback()
+    {
+        tf.removeFeedbackForComponent(this);
+    }
+    public void switchAreas()
+    {
+        tf.moveFeedbackAreaToFirstPriority(this,0);
+    }
+
+    public void destroy()
+    {
+        if (image != null && !image.isDisposed())
+        {
+            image.dispose();
+            gc.dispose();
+        }
+    }
+    public void setVisible(boolean visible)
+    {
+        super.setVisible(visible);
+
+        if (visible)
+        {
+            this.registerTactileFeedback();
+        }
+        else
+        {
+            this.removeFeedback();
+        }
+    }
+    public void setEnabled(boolean enable)
+    {
+        super.setEnabled(enable);
+        if (enable)
+        {
+            this.registerTactileFeedback();
+        }
+        else
+        {
+            this.removeFeedback();
+        }
+    }
+
+    public void widgetDisposed(DisposeEvent e)
+    {
+        removeFeedback();
+        destroy();
+    }
+    public void controlResized(ControlEvent e)
+    {
+        destroy();
+        this.registerTactileFeedback();
+        this.update();
+    }
+    public void controlMoved(ControlEvent e)
+    {
+        this.registerTactileFeedback();
+    }
+    public void focusGained(FocusEvent e)
+    {
+        this.draw_focus = true;
+        tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_BASIC);
+    }
+    public void focusLost(FocusEvent e)
+    {
+        this.draw_focus = false;
+        tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/control/ImageCanvas.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* 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.test.java.eswt.control;
+
+import java.util.Vector;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+import com.nokia.mid.ui.TactileFeedback;
+
+
+public class ImageCanvas extends Composite implements ControlListener, DisposeListener, PaintListener, MouseListener, MouseMoveListener
+{
+
+    private Image image;
+    private GC gc;
+    private Point oldMouseXY;
+    private boolean mouseDown = false;
+    private Vector mouseEvents;
+    private TactileFeedback tf;
+
+    public ImageCanvas(Composite parent, int style)
+    {
+        super(parent, style);
+        mouseEvents = new Vector();
+        mouseEvents.ensureCapacity(100);
+        tf = new TactileFeedback();
+        addDisposeListener(this);
+        addPaintListener(this);
+        addMouseListener(this);
+        addMouseMoveListener(this);
+    }
+
+    public void setImage(String imagePath)
+    {
+        destroy();
+    }
+
+
+    public void paintControl(PaintEvent e)
+    {
+        if (image == null || image.isDisposed())
+        {
+            image = new Image(Display.getCurrent(), getSize().x, getSize().y);
+            gc = new GC(image);
+            gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
+        }
+
+        for (int i = 0; i < mouseEvents.size(); ++i)
+        {
+            MouseMoveEvent mouse = (MouseMoveEvent)mouseEvents.elementAt(i);
+            gc.drawLine(mouse.a.x, mouse.a.y, mouse.b.x, mouse.b.y);
+        }
+        mouseEvents.removeAllElements();
+
+        e.gc.drawImage(image, 0, 0);
+    }
+
+    public void controlMoved(ControlEvent e)
+    {
+    }
+
+    public void destroy()
+    {
+        if (image != null && !image.isDisposed())
+        {
+            image.dispose();
+            gc.dispose();
+        }
+    }
+
+    public void controlResized(ControlEvent e)
+    {
+        destroy();
+    }
+
+    public void widgetDisposed(DisposeEvent e)
+    {
+        destroy();
+    }
+
+    public void mouseDoubleClick(MouseEvent e)
+    {
+    }
+
+    public void mouseDown(MouseEvent e)
+    {
+        mouseDown = true;
+        tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_BASIC);
+    }
+
+    public void mouseUp(MouseEvent e)
+    {
+        mouseDown = false;
+        oldMouseXY = null;
+    }
+
+    private class MouseMoveEvent
+    {
+        public MouseMoveEvent(Point a, Point b)
+        {
+            this.a = a;
+            this.b = b;
+        }
+        public Point a;
+        public Point b;
+    }
+
+    public void mouseMove(MouseEvent e)
+    {
+        if (image == null || image.isDisposed() || !mouseDown)
+        {
+            return;
+        }
+        tf.directFeedback(TactileFeedback.FEEDBACK_STYLE_SENSITIVE);
+        Point newMouseXY = new Point(e.x, e.y);
+
+        if (oldMouseXY != null)
+        {
+            mouseEvents.addElement(new MouseMoveEvent(oldMouseXY, newMouseXY));
+            if (mouseEvents.size() == 1)
+            {
+                redraw(0, 0, 20, 20, false);
+            }
+        }
+        oldMouseXY = newMouseXY;
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,758 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *     Nokia Corporation - S60 implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * A ScrolledComposite provides scrollbars and will scroll its content when the user
+ * uses the scrollbars.
+ *
+ *
+ * <p>There are two ways to use the ScrolledComposite:
+ *
+ * <p>
+ * 1) Set the size of the control that is being scrolled and the ScrolledComposite
+ * will show scrollbars when the contained control can not be fully seen.
+ *
+ * 2) The second way imitates the way a browser would work.  Set the minimum size of
+ * the control and the ScrolledComposite will show scroll bars if the visible area is
+ * less than the minimum size of the control and it will expand the size of the control
+ * if the visible area is greater than the minimum size.  This requires invoking
+ * both setMinWidth(), setMinHeight() and setExpandHorizontal(), setExpandVertical().
+ *
+ * <code><pre>
+ * public static void main (String [] args) {
+ *      Display display = new Display ();
+ *      Color red = display.getSystemColor(SWT.COLOR_RED);
+ *      Color blue = display.getSystemColor(SWT.COLOR_BLUE);
+ *      Shell shell = new Shell (display);
+ *      shell.setLayout(new FillLayout());
+ *
+ *      // set the size of the scrolled content - method 1
+ *      final ScrolledComposite sc1 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      final Composite c1 = new Composite(sc1, SWT.NONE);
+ *      sc1.setContent(c1);
+ *      c1.setBackground(red);
+ *      GridLayout layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c1.setLayout(layout);
+ *      Button b1 = new Button (c1, SWT.PUSH);
+ *      b1.setText("first button");
+ *      c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      // set the minimum width and height of the scrolled content - method 2
+ *      final ScrolledComposite sc2 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      sc2.setExpandHorizontal(true);
+ *      sc2.setExpandVertical(true);
+ *      final Composite c2 = new Composite(sc2, SWT.NONE);
+ *      sc2.setContent(c2);
+ *      c2.setBackground(blue);
+ *      layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c2.setLayout(layout);
+ *      Button b2 = new Button (c2, SWT.PUSH);
+ *      b2.setText("first button");
+ *      sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      Button add = new Button (shell, SWT.PUSH);
+ *      add.setText("add children");
+ *      final int[] index = new int[]{0};
+ *      add.addListener(SWT.Selection, new Listener() {
+ *          public void handleEvent(Event e) {
+ *              index[0]++;
+ *              Button button = new Button(c1, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset size of content so children can be seen - method 1
+ *              c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c1.layout();
+ *
+ *              button = new Button(c2, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset the minimum width and height so children can be seen - method 2
+ *              sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c2.layout();
+ *          }
+ *      });
+ *
+ *      shell.open ();
+ *      while (!shell.isDisposed ()) {
+ *          if (!display.readAndDispatch ()) display.sleep ();
+ *      }
+ *      display.dispose ();
+ * }
+ * </pre></code>
+ *
+ * <dl>
+ * <dt><b>Styles:</b><dd>H_SCROLL, V_SCROLL
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#scrolledcomposite">ScrolledComposite snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ */
+public class ScrolledComposite extends Composite
+{
+
+    Control content;
+    Listener contentListener;
+    Listener filter;
+
+    int minHeight = 0;
+    int minWidth = 0;
+    boolean expandHorizontal = false;
+    boolean expandVertical = false;
+    boolean alwaysShowScroll = false;
+    boolean showFocusedControl = false;
+
+    /**
+     * Constructs a new instance of this class given its parent
+     * and a style value describing its behavior and appearance.
+     * <p>
+     * The style value is either one of the style constants defined in
+     * class <code>SWT</code> which is applicable to instances of this
+     * class, or must be built by <em>bitwise OR</em>'ing together
+     * (that is, using the <code>int</code> "|" operator) two or more
+     * of those <code>SWT</code> style constants. The class description
+     * lists the style constants that are applicable to the class.
+     * Style bits are also inherited from superclasses.
+     * </p>
+     *
+     * @param parent a widget which will be the parent of the new instance (cannot be null)
+     * @param style the style of widget to construct
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+     * </ul>
+     *
+     * @see SWT#H_SCROLL
+     * @see SWT#V_SCROLL
+     * @see #getStyle()
+     */
+    public ScrolledComposite(Composite parent, int style)
+    {
+        super(parent, checkStyle(style));
+        super.setLayout(new ScrolledCompositeLayout());
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setVisible(false);
+            hBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Horizontal Scroll");
+                    hScroll();
+                }
+            });
+        }
+
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setVisible(false);
+            vBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Verical Scroll");
+                    vScroll();
+                }
+            });
+        }
+
+        contentListener = new Listener()
+        {
+            public void handleEvent(Event e)
+            {
+                System.out.print("\nHandle Content change");
+                if (e.type != SWT.Resize) return;
+                layout(false);
+            }
+        };
+
+        filter = new Listener()
+        {
+            public void handleEvent(Event event)
+            {
+                System.out.print("\nFilter Listener");
+                if (event.widget instanceof Control)
+                {
+                    Control control = (Control) event.widget;
+                    if (contains(control)) showControl(control);
+                }
+            }
+        };
+
+        addDisposeListener(new DisposeListener()
+        {
+            public void widgetDisposed(DisposeEvent e)
+            {
+                getDisplay().removeFilter(SWT.FocusIn, filter);
+            }
+        });
+    }
+
+    static int checkStyle(int style)
+    {
+        int mask = SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
+        return style & mask;
+    }
+
+    boolean contains(Control control)
+    {
+        if (control == null || control.isDisposed()) return false;
+
+        Composite parent = control.getParent();
+        while (parent != null && !(parent instanceof Shell))
+        {
+            if (this == parent) return true;
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    /**
+     * Returns the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @return the Always Show Scrollbars flag value
+     */
+    public boolean getAlwaysShowScrollBars()
+    {
+        //checkWidget();
+        return alwaysShowScroll;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available horizontal space.
+     *
+     * @return the receiver's horizontal expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandHorizontal()
+    {
+        checkWidget();
+        return expandHorizontal;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available vertical space.
+     *
+     * @return the receiver's vertical expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandVertical()
+    {
+        checkWidget();
+        return expandVertical;
+    }
+
+    /**
+     * Returns the minimum width of the content control.
+     *
+     * @return the minimum width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinWidth()
+    {
+        checkWidget();
+        return minWidth;
+    }
+
+    /**
+     * Returns the minimum height of the content control.
+     *
+     * @return the minimum height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinHeight()
+    {
+        checkWidget();
+        return minHeight;
+    }
+
+    /**
+     * Get the content that is being scrolled.
+     *
+     * @return the control displayed in the content area
+     */
+    public Control getContent()
+    {
+        //checkWidget();
+        return content;
+    }
+
+    /**
+     * Returns <code>true</code> if the receiver automatically scrolls to a focused child control
+     * to make it visible. Otherwise, returns <code>false</code>.
+     *
+     * @return a boolean indicating whether focused child controls are automatically scrolled into the viewport
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public boolean getShowFocusedControl()
+    {
+        checkWidget();
+        return showFocusedControl;
+    }
+
+    void hScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar hBar = getHorizontalBar();
+        int hSelection = hBar.getSelection();
+        content.setLocation(-hSelection, location.y);
+    }
+    boolean needHScroll(Rectangle contentRect, boolean vVisible)
+    {
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.width -= 2*border;
+        ScrollBar vBar = getVerticalBar();
+        if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
+
+        if (!expandHorizontal && contentRect.width > hostRect.width) return true;
+        if (expandHorizontal && minWidth > hostRect.width) return true;
+        return false;
+    }
+
+    boolean needVScroll(Rectangle contentRect, boolean hVisible)
+    {
+        ScrollBar vBar = getVerticalBar();
+        if (vBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.height -= 2*border;
+        ScrollBar hBar = getHorizontalBar();
+        if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
+
+        if (!expandVertical && contentRect.height > hostRect.height) return true;
+        if (expandVertical && minHeight > hostRect.height) return true;
+        return false;
+    }
+
+    /**
+     * Return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.
+     *
+     * @return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.  If no content has been set, this returns
+     * (0, 0).
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public Point getOrigin()
+    {
+        checkWidget();
+        if (content == null) return new Point(0, 0);
+        Point location = content.getLocation();
+        return new Point(-location.x, -location.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param origin the point on the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     *    <li>ERROR_INVALID_ARGUMENT - value of origin is outside of content
+     * </ul>
+     * @since 2.0
+     */
+    public void setOrigin(Point origin)
+    {
+        setOrigin(origin.x, origin.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param x the x coordinate of the content to appear in the top left corner
+     *
+     * @param y the y coordinate of the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public void setOrigin(int x, int y)
+    {
+        checkWidget();
+        if (content == null) return;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setSelection(x);
+            x = -hBar.getSelection();
+        }
+        else
+        {
+            x = 0;
+        }
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setSelection(y);
+            y = -vBar.getSelection();
+        }
+        else
+        {
+            y = 0;
+        }
+        content.setLocation(x, y);
+    }
+    /**
+     * Set the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @param show true to show the scrollbars even when not required, false to show scrollbars only when required
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setAlwaysShowScrollBars(boolean show)
+    {
+        checkWidget();
+        if (show == alwaysShowScroll) return;
+        alwaysShowScroll = show;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null && alwaysShowScroll) hBar.setVisible(true);
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null && alwaysShowScroll) vBar.setVisible(true);
+        layout(false);
+    }
+
+    /**
+     * Set the content that will be scrolled.
+     *
+     * @param content the control to be displayed in the content area
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setContent(Control content)
+    {
+        System.out.print("\nSetting Content");
+        checkWidget();
+        if (this.content != null && !this.content.isDisposed())
+        {
+            this.content.removeListener(SWT.Resize, contentListener);
+            this.content.setBounds(new Rectangle(-200, -200, 0, 0));
+        }
+
+        this.content = content;
+        ScrollBar vBar = getVerticalBar();
+        ScrollBar hBar = getHorizontalBar();
+        if (this.content != null)
+        {
+            if (vBar != null)
+            {
+                vBar.setMaximum(0);
+                vBar.setThumb(0);
+                vBar.setSelection(0);
+            }
+            if (hBar != null)
+            {
+                hBar.setMaximum(0);
+                hBar.setThumb(0);
+                hBar.setSelection(0);
+            }
+            content.setLocation(0, 0);
+            layout(false);
+            this.content.addListener(SWT.Resize, contentListener);
+        }
+        else
+        {
+            if (hBar != null) hBar.setVisible(alwaysShowScroll);
+            if (vBar != null) vBar.setVisible(alwaysShowScroll);
+        }
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as wide as the
+     * ScrolledComposite when the width of the ScrolledComposite is greater than the
+     * minimum width specified in setMinWidth.  If the ScrolledComposite is less than the
+     * minimum width, the content will not be resized and instead the horizontal scroll bar will be
+     * used to view the entire width.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available horizontal space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandHorizontal(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandHorizontal) return;
+        expandHorizontal = expand;
+        layout(false);
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as tall as the
+     * ScrolledComposite when the height of the ScrolledComposite is greater than the
+     * minimum height specified in setMinHeight.  If the ScrolledComposite is less than the
+     * minimum height, the content will not be resized and instead the vertical scroll bar will be
+     * used to view the entire height.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available vertical space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandVertical(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandVertical) return;
+        expandVertical = expand;
+        layout(false);
+    }
+    /**
+     * Sets the layout which is associated with the receiver to be
+     * the argument which may be null.
+     * <p>
+     * Note: No Layout can be set on this Control because it already
+     * manages the size and position of its children.
+     * </p>
+     *
+     * @param layout the receiver's new layout or null
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setLayout(Layout layout)
+    {
+        checkWidget();
+        return;
+    }
+    /**
+     * Specify the minimum height at which the ScrolledComposite will begin scrolling the
+     * content with the vertical scroll bar.  This value is only relevant if
+     * setExpandVertical(true) has been set.
+     *
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinHeight(int height)
+    {
+        setMinSize(minWidth, height);
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param size the minimum size or null for the default size
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(Point size)
+    {
+        if (size == null)
+        {
+            setMinSize(0, 0);
+        }
+        else
+        {
+            setMinSize(size.x, size.y);
+        }
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param width the minimum width or 0 for default width
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(int width, int height)
+    {
+        checkWidget();
+        if (width == minWidth && height == minHeight) return;
+        minWidth = Math.max(0, width);
+        minHeight = Math.max(0, height);
+        layout(false);
+    }
+    /**
+     * Specify the minimum width at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) has been set.
+     *
+     * @param width the minimum width or 0 for default width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinWidth(int width)
+    {
+        setMinSize(width, minHeight);
+    }
+
+    /**
+     * Configure the receiver to automatically scroll to a focused child control
+     * to make it visible.
+     *
+     * If show is <code>false</code>, show a focused control is off.
+     * By default, show a focused control is off.
+     *
+     * @param show <code>true</code> to show a focused control.
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void setShowFocusedControl(boolean show)
+    {
+        checkWidget();
+        if (showFocusedControl == show) return;
+        Display display = getDisplay();
+        display.removeFilter(SWT.FocusIn, filter);
+        showFocusedControl = show;
+        if (!showFocusedControl) return;
+        display.addFilter(SWT.FocusIn, filter);
+        Control control = display.getFocusControl();
+        if (contains(control)) showControl(control);
+    }
+
+    /**
+     * Scrolls the content of the receiver so that the control is visible.
+     *
+     * @param control the control to be shown
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the control is null</li>
+     *    <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void showControl(Control control)
+    {
+        checkWidget();
+        if (control == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+        if (control.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+        if (!contains(control)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+
+        Rectangle itemRect = getDisplay().map(control.getParent(), this, control.getBounds());
+        Rectangle area = getClientArea();
+        Point origin = getOrigin();
+        if (itemRect.x < 0) origin.x = Math.max(0, origin.x + itemRect.x);
+        if (itemRect.y < 0) origin.y = Math.max(0, origin.y + itemRect.y);
+        if (area.width < itemRect.x + itemRect.width) origin.x = Math.max(0, origin.x + itemRect.x + itemRect.width - area.width);
+        if (area.height < itemRect.y + itemRect.height) origin.y = Math.max(0, origin.y + itemRect.y + itemRect.height - area.height);
+        setOrigin(origin);
+    }
+
+    void vScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar vBar = getVerticalBar();
+        int vSelection = vBar.getSelection();
+        content.setLocation(location.x, -vSelection);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ControlTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class provides the layout for ScrolledComposite
+ *
+ * @see ScrolledComposite
+ */
+class ScrolledCompositeLayout extends Layout
+{
+
+    boolean inLayout = false;
+    static final int DEFAULT_WIDTH  = 64;
+    static final int DEFAULT_HEIGHT = 64;
+
+    protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache)
+    {
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+        if (sc.content != null)
+        {
+            Point preferredSize = sc.content.computeSize(wHint, hHint, flushCache);
+            Point currentSize = sc.content.getSize();
+            size.x = sc.getExpandHorizontal() ? preferredSize.x : currentSize.x;
+            size.y = sc.getExpandVertical() ? preferredSize.y : currentSize.y;
+        }
+        size.x = Math.max(size.x, sc.minWidth);
+        size.y = Math.max(size.y, sc.minHeight);
+        if (wHint != SWT.DEFAULT) size.x = wHint;
+        if (hHint != SWT.DEFAULT) size.y = hHint;
+        return size;
+    }
+
+    protected boolean flushCache(Control control)
+    {
+        return true;
+    }
+
+    protected void layout(Composite composite, boolean flushCache)
+    {
+        if (inLayout) return;
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        if (sc.content == null) return;
+        ScrollBar hBar = sc.getHorizontalBar();
+        ScrollBar vBar = sc.getVerticalBar();
+        if (hBar != null)
+        {
+            if (hBar.getSize().y >= sc.getSize().y)
+            {
+                return;
+            }
+        }
+        if (vBar != null)
+        {
+            if (vBar.getSize().x >= sc.getSize().x)
+            {
+                return;
+            }
+        }
+        inLayout = true;
+        Rectangle contentRect = sc.content.getBounds();
+        if (!sc.alwaysShowScroll)
+        {
+            boolean hVisible = sc.needHScroll(contentRect, false);
+            boolean vVisible = sc.needVScroll(contentRect, hVisible);
+            if (!hVisible && vVisible) hVisible = sc.needHScroll(contentRect, vVisible);
+            if (hBar != null) hBar.setVisible(hVisible);
+            if (vBar != null) vBar.setVisible(vVisible);
+        }
+        Rectangle hostRect = sc.getClientArea();
+        if (sc.expandHorizontal)
+        {
+            contentRect.width = Math.max(sc.minWidth, hostRect.width);
+        }
+        if (sc.expandVertical)
+        {
+            contentRect.height = Math.max(sc.minHeight, hostRect.height);
+        }
+
+        if (hBar != null)
+        {
+            hBar.setMaximum(contentRect.width);
+            hBar.setThumb(Math.min(contentRect.width, hostRect.width));
+            int hPage = contentRect.width - hostRect.width;
+            int hSelection = hBar.getSelection();
+            if (hSelection >= hPage)
+            {
+                if (hPage <= 0)
+                {
+                    hSelection = 0;
+                    hBar.setSelection(0);
+                }
+                contentRect.x = -hSelection;
+            }
+        }
+
+        if (vBar != null)
+        {
+            vBar.setMaximum(contentRect.height);
+            vBar.setThumb(Math.min(contentRect.height, hostRect.height));
+            int vPage = contentRect.height - hostRect.height;
+            int vSelection = vBar.getSelection();
+            if (vSelection >= vPage)
+            {
+                if (vPage <= 0)
+                {
+                    vSelection = 0;
+                    vBar.setSelection(0);
+                }
+                contentRect.y = -vSelection;
+            }
+        }
+
+        sc.content.setBounds(contentRect);
+        inLayout = false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="DateEditorTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="DateEditorTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.dateeditor.DateEditorTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="DateEditorTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/com/nokia/test/java/eswt/dateeditor/DateEditorTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,512 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.dateeditor;
+
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.Calendar;
+
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+
+import org.eclipse.ercp.swt.mobile.TimedMessageBox;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+
+/**
+ *
+ */
+public class DateEditorTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** DateEditor field */
+    private DateEditor field = null;
+
+    /** Style and Type variables */
+    private int style = DateEditor.DATE;//default value
+    private int type  = DateEditor.COMPACT;//default value
+
+    /** Type and Style labels */
+    private Label typeLabel  = null;
+    private Label styleLabel = null;
+
+    /** Type menu commands */
+    private Command cmdTypeCOMPACT = null;
+    private Command cmdTypeFULL    = null;
+
+    /** Style menu commands */
+    private Command cmdStyleDATE        = null;
+    private Command cmdStyleTIME        = null;
+    private Command cmdStyleDATE_TIME   = null;
+    private Command cmdStyleDURATION    = null;
+    private Command cmdStyleOFFSET      = null;
+
+    /** Set commands */
+    private Command cmdSetTime = null;
+    private Command cmdSetDate = null;
+    private Command cmdSetTimeZone1 = null;
+    private Command cmdSetTimeZone2 = null;
+    private Command cmdSetTimeZone3 = null;
+    private Command cmdSetTimeZoneDefault = null;
+
+    private Command cmdShowTimeZones = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // intit the shell
+        this.shell.setText("Date Editor Test");
+
+        // create and set layout
+        this.shell.setLayout(new GridLayout(2, true));
+
+        // create menu
+        // Type submenu
+        Command cmdType = new Command(this.shell, Command.COMMANDGROUP, 3);
+        cmdType.setText("Type");
+
+        this.cmdTypeCOMPACT = new Command(cmdType, Command.GENERAL, 1);
+        this.cmdTypeCOMPACT.setText("COMPACT");
+        this.cmdTypeCOMPACT.addSelectionListener(this);
+
+        this.cmdTypeFULL = new Command(cmdType, Command.GENERAL, 0);
+        this.cmdTypeFULL.setText("FULL");
+        this.cmdTypeFULL.addSelectionListener(this);
+
+        // Style submenu
+        Command cmdStyle = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdStyle.setText("Style");
+
+        this.cmdStyleDATE = new Command(cmdStyle, Command.GENERAL, 4);
+        this.cmdStyleDATE.setText("DATE");
+        this.cmdStyleDATE.addSelectionListener(this);
+
+        this.cmdStyleTIME = new Command(cmdStyle, Command.GENERAL, 3);
+        this.cmdStyleTIME.setText("TIME");
+        this.cmdStyleTIME.addSelectionListener(this);
+
+        this.cmdStyleDATE_TIME = new Command(cmdStyle, Command.GENERAL, 2);
+        this.cmdStyleDATE_TIME.setText("DATE_TIME");
+        this.cmdStyleDATE_TIME.addSelectionListener(this);
+
+        this.cmdStyleDURATION = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdStyleDURATION.setText("DURATION");
+        this.cmdStyleDURATION.addSelectionListener(this);
+
+        this.cmdStyleOFFSET = new Command(cmdStyle, Command.GENERAL, 0);
+        this.cmdStyleOFFSET.setText("OFFSET");
+        this.cmdStyleOFFSET.addSelectionListener(this);
+
+        // Set submenu
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSet.setText("Set");
+
+        this.cmdSetTime = new Command(cmdSet, Command.GENERAL, 1);
+        this.cmdSetTime.setText("zero time");
+        this.cmdSetTime.addSelectionListener(this);
+
+        this.cmdSetDate = new Command(cmdSet, Command.GENERAL, 0);
+        this.cmdSetDate.setText("zero date");
+        this.cmdSetDate.addSelectionListener(this);
+
+        // Set submenu
+        Command cmdTimeZone = new Command(cmdSet, Command.COMMANDGROUP, 0);
+        cmdTimeZone.setText("Time zone");
+
+        this.cmdSetTimeZone1 = new Command(cmdTimeZone, Command.GENERAL, 1);
+        this.cmdSetTimeZone1.setText("GMT");
+        this.cmdSetTimeZone1.addSelectionListener(this);
+
+        this.cmdSetTimeZone2 = new Command(cmdTimeZone, Command.GENERAL, 1);
+        this.cmdSetTimeZone2.setText(TimeZone.getAvailableIDs()[0]);
+        this.cmdSetTimeZone2.addSelectionListener(this);
+
+        this.cmdSetTimeZone3 = new Command(cmdTimeZone, Command.GENERAL, 1);
+        this.cmdSetTimeZone3.setText(TimeZone.getAvailableIDs()[1]);
+        this.cmdSetTimeZone3.addSelectionListener(this);
+
+        this.cmdSetTimeZoneDefault = new Command(cmdTimeZone, Command.GENERAL, 0);
+        this.cmdSetTimeZoneDefault.setText("Default");
+        this.cmdSetTimeZoneDefault.addSelectionListener(this);
+
+        this.cmdShowTimeZones = new Command(cmdTimeZone, Command.GENERAL, 1);
+        this.cmdShowTimeZones.setText("Show Timezones");
+        this.cmdShowTimeZones.addSelectionListener(this);
+
+        // create label and field
+        Label tlabel = new Label(this.shell, SWT.NONE);
+        tlabel.setText("Type: ");
+        GridData tldata = new GridData();
+        tldata.horizontalAlignment       = SWT.RIGHT;
+        tlabel.setLayoutData(tldata);
+
+        this.typeLabel = new Label(this.shell, SWT.NONE);
+        this.typeLabel.setText("default");
+        GridData tdata = new GridData();
+        tdata.horizontalAlignment       = SWT.LEFT;
+        this.typeLabel.setLayoutData(tdata);
+
+        Label slabel = new Label(this.shell, SWT.NONE);
+        slabel.setText("Style: ");
+        GridData sldata = new GridData();
+        sldata.horizontalAlignment       = SWT.RIGHT;
+        slabel.setLayoutData(sldata);
+
+        this.styleLabel = new Label(this.shell, SWT.NONE);
+        this.styleLabel.setText("default");
+        GridData sdata = new GridData();
+        sdata.horizontalAlignment       = SWT.LEFT;
+        this.styleLabel.setLayoutData(sdata);
+
+        this.field = new DateEditor(this.shell, SWT.BORDER, DateEditor.DATE | DateEditor.FULL);
+        GridData fdata = new GridData();
+        fdata.horizontalSpan = 2;
+        fdata.grabExcessHorizontalSpace = true;
+        fdata.grabExcessVerticalSpace   = true;
+        fdata.horizontalAlignment       = SWT.CENTER;
+        fdata.verticalAlignment         = SWT.CENTER;
+        this.field.setLayoutData(fdata);
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+
+        if (e.widget == this.cmdTypeCOMPACT)
+        {
+            this.changeType(DateEditor.COMPACT);
+            return;
+        }
+        if (e.widget == this.cmdTypeFULL)
+        {
+            this.changeType(DateEditor.FULL);
+            return;
+        }
+
+        if (e.widget == this.cmdStyleDATE)
+        {
+            this.changeStyle(DateEditor.DATE);
+            return;
+        }
+        if (e.widget == this.cmdStyleTIME)
+        {
+            this.changeStyle(DateEditor.TIME);
+            return;
+        }
+        if (e.widget == this.cmdStyleDATE_TIME)
+        {
+            this.changeStyle(DateEditor.DATE_TIME);
+            return;
+        }
+        if (e.widget == this.cmdStyleDURATION)
+        {
+            this.changeStyle(DateEditor.DURATION);
+            return;
+        }
+        if (e.widget == this.cmdStyleOFFSET)
+        {
+            this.changeStyle(DateEditor.OFFSET);
+            return;
+        }
+        if (e.widget == this.cmdSetTime)
+        {
+            this.field.setTime(0);
+            return;
+        }
+        if (e.widget == this.cmdSetDate)
+        {
+            this.field.setDate(new Date(0));
+            return;
+        }
+        if (e.widget == this.cmdSetTimeZone1)
+        {
+            this.field.setTimeZone(TimeZone.getTimeZone("GMT"));
+            this.changeStyle(DateEditor.TIME);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetTimeZone2)
+        {
+            this.field.setTimeZone(TimeZone.getTimeZone(TimeZone.getAvailableIDs()[0]));
+            this.changeStyle(DateEditor.DATE_TIME);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetTimeZone3)
+        {
+            this.field.setTimeZone(TimeZone.getTimeZone(TimeZone.getAvailableIDs()[1]));
+            this.changeStyle(DateEditor.TIME);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetTimeZoneDefault)
+        {
+            this.field.setTimeZone(null);
+            this.changeStyle(DateEditor.DATE_TIME);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdShowTimeZones)
+        {
+            // create a shell with all timezones
+            this.dateFieldsInScrolledCompositeDialog(this.shell);
+            return;
+        }
+
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Update the type and recreate the field.
+     * @param type new type for the field.
+     */
+    private void changeType(int type)
+    {
+        if (this.field == null || this.field.isDisposed())
+            return;
+
+        this.type = type;
+        this.update();
+    }
+
+    /**
+     * Update the style and recreate the field.
+     * @param style new style of the field
+     */
+    private void changeStyle(int style)
+    {
+        if (this.field == null || this.field.isDisposed())
+            return;
+
+        this.style = style;
+        this.update();
+    }
+
+    /**
+     * Recreate the DateEditor field with current type and style.
+     */
+    private void update()
+    {
+        if (this.field == null || this.field.isDisposed())
+            return;
+
+        try
+        {
+
+            // store the field layout
+            Object data = this.field.getLayoutData();
+
+            // dispose old field and create new one
+            DateEditor field = this.field;
+            this.field =
+                new DateEditor(this.shell, SWT.BORDER, this.type | this.style);
+            if (this.style == DateEditor.DURATION)
+            {
+                this.field.setTime(field.getTime());
+            }
+            else
+            {
+                if (field.getDate() != null)
+                {
+                    this.field.setDate(field.getDate());
+                }
+                else
+                {
+                    // set current time
+                    Calendar c = Calendar.getInstance();
+                    Date date = c.getTime();
+                    this.field.setDate(date);
+                }
+            }
+
+            this.field.setLayoutData(data);
+            this.field.setFocus();
+
+            // dispose old field
+            field.dispose();
+
+        }
+        catch (Exception ex)
+        {
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception1");
+            mb.setMessage(ex.getMessage());
+            mb.open();
+        }
+
+        try
+        {
+            // update info labels
+            switch (this.type)
+            {
+            case DateEditor.COMPACT:
+                this.typeLabel.setText("COMPACT");
+                break;
+            case DateEditor.FULL:
+                this.typeLabel.setText("FULL");
+                break;
+            }
+
+            switch (this.style)
+            {
+            case DateEditor.DATE:
+                this.styleLabel.setText("DATE");
+                break;
+            case DateEditor.TIME:
+                this.styleLabel.setText("TIME");
+                break;
+            case DateEditor.DATE_TIME:
+                this.styleLabel.setText("DATE_TIME");
+                break;
+            case DateEditor.DURATION:
+                this.styleLabel.setText("DURATION");
+                break;
+            case DateEditor.OFFSET:
+                this.styleLabel.setText("OFFSET");
+                break;
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception2");
+            mb.setMessage(ex.getMessage());
+            mb.open();
+        }
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+    static void dateFieldsInScrolledCompositeDialog(Shell parent)
+    {
+        try
+        {
+
+            final Shell shell1 = new Shell(parent, SWT.APPLICATION_MODAL | SWT.BORDER);
+            shell1.setText("Timezones");
+
+            shell1.setLayout(new FillLayout(SWT.VERTICAL));
+
+            org.eclipse.swt.custom.ScrolledComposite sc = new org.eclipse.swt.custom.ScrolledComposite(shell1, SWT.V_SCROLL);
+            sc.setAlwaysShowScrollBars(true);
+
+            final Composite co = new Composite(sc, 0);
+            co.setLayout(new GridLayout(2, false));
+            Calendar c = Calendar.getInstance();
+            for (int i = 0; i<TimeZone.getAvailableIDs().length; i++)
+            {
+                Label zoneTitle = new Label(co, SWT.WRAP);
+                zoneTitle.setText(TimeZone.getTimeZone(TimeZone.getAvailableIDs()[i]).getID());
+                zoneTitle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+                DateEditor timezone_df = new DateEditor(co,SWT.BORDER,DateEditor.TIME | DateEditor.COMPACT);
+                timezone_df.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+                timezone_df.setTimeZone(TimeZone.getTimeZone(TimeZone.getAvailableIDs()[i]));
+
+                timezone_df.setDate(c.getTime());
+
+            }
+            Label localTitle = new Label(co, SWT.WRAP);
+            localTitle.setText("Local:");
+            localTitle.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+            DateEditor timezone_df = new DateEditor(co,SWT.BORDER,DateEditor.TIME | DateEditor.COMPACT);
+            timezone_df.setTimeZone(null);
+            timezone_df.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+            timezone_df.setDate(c.getTime());
+
+
+            shell1.layout(true);
+            co.setSize(co.computeSize(sc.getClientArea().width, -1));
+            sc.setContent(co);
+
+            {
+                Command cmd = new Command(shell1, Command.EXIT, 0);
+                cmd.setText("Cancel");
+                cmd.addSelectionListener(new SelectionListener()
+                {
+                    public void widgetDefaultSelected(SelectionEvent arg0)
+                    {
+                    }
+                    public void widgetSelected(SelectionEvent arg0)
+                    {
+
+                        shell1.dispose();
+                    }
+                });
+            }
+            {
+                Command cmd = new Command(shell1, Command.GENERAL, 0);
+                cmd.setText("Update");
+                cmd.addSelectionListener(new SelectionListener()
+                {
+                    public void widgetDefaultSelected(SelectionEvent arg0)
+                    {
+                    }
+                    public void widgetSelected(SelectionEvent arg0)
+                    {
+                        Calendar c = Calendar.getInstance();
+                        Date date = c.getTime();
+                        for (int a = 0; a < co.getChildren().length; a++)
+                        {
+                            if (co.getChildren()[a] instanceof DateEditor)
+                            {
+                                ((DateEditor) co.getChildren()[a]).setDate(date);
+                            }
+                        }
+                        shell1.layout(true);
+                        shell1.update();
+                    }
+                });
+            }
+
+            shell1.open();
+        }
+        catch (Exception e)
+        {
+            TimedMessageBox dlg = new TimedMessageBox(parent, SWT.ICON_ERROR);
+            dlg.setMessage(e.getMessage());
+            dlg.open();
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/org/eclipse/swt/custom/ScrolledComposite.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,758 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *       Nokia Corporation - S60 implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * A ScrolledComposite provides scrollbars and will scroll its content when the user
+ * uses the scrollbars.
+ *
+ *
+ * <p>There are two ways to use the ScrolledComposite:
+ *
+ * <p>
+ * 1) Set the size of the control that is being scrolled and the ScrolledComposite
+ * will show scrollbars when the contained control can not be fully seen.
+ *
+ * 2) The second way imitates the way a browser would work.  Set the minimum size of
+ * the control and the ScrolledComposite will show scroll bars if the visible area is
+ * less than the minimum size of the control and it will expand the size of the control
+ * if the visible area is greater than the minimum size.  This requires invoking
+ * both setMinWidth(), setMinHeight() and setExpandHorizontal(), setExpandVertical().
+ *
+ * <code><pre>
+ * public static void main (String [] args) {
+ *      Display display = new Display ();
+ *      Color red = display.getSystemColor(SWT.COLOR_RED);
+ *      Color blue = display.getSystemColor(SWT.COLOR_BLUE);
+ *      Shell shell = new Shell (display);
+ *      shell.setLayout(new FillLayout());
+ *
+ *      // set the size of the scrolled content - method 1
+ *      final ScrolledComposite sc1 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      final Composite c1 = new Composite(sc1, SWT.NONE);
+ *      sc1.setContent(c1);
+ *      c1.setBackground(red);
+ *      GridLayout layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c1.setLayout(layout);
+ *      Button b1 = new Button (c1, SWT.PUSH);
+ *      b1.setText("first button");
+ *      c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      // set the minimum width and height of the scrolled content - method 2
+ *      final ScrolledComposite sc2 = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ *      sc2.setExpandHorizontal(true);
+ *      sc2.setExpandVertical(true);
+ *      final Composite c2 = new Composite(sc2, SWT.NONE);
+ *      sc2.setContent(c2);
+ *      c2.setBackground(blue);
+ *      layout = new GridLayout();
+ *      layout.numColumns = 4;
+ *      c2.setLayout(layout);
+ *      Button b2 = new Button (c2, SWT.PUSH);
+ *      b2.setText("first button");
+ *      sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *
+ *      Button add = new Button (shell, SWT.PUSH);
+ *      add.setText("add children");
+ *      final int[] index = new int[]{0};
+ *      add.addListener(SWT.Selection, new Listener() {
+ *          public void handleEvent(Event e) {
+ *              index[0]++;
+ *              Button button = new Button(c1, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset size of content so children can be seen - method 1
+ *              c1.setSize(c1.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c1.layout();
+ *
+ *              button = new Button(c2, SWT.PUSH);
+ *              button.setText("button "+index[0]);
+ *              // reset the minimum width and height so children can be seen - method 2
+ *              sc2.setMinSize(c2.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ *              c2.layout();
+ *          }
+ *      });
+ *
+ *      shell.open ();
+ *      while (!shell.isDisposed ()) {
+ *          if (!display.readAndDispatch ()) display.sleep ();
+ *      }
+ *      display.dispose ();
+ * }
+ * </pre></code>
+ *
+ * <dl>
+ * <dt><b>Styles:</b><dd>H_SCROLL, V_SCROLL
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#scrolledcomposite">ScrolledComposite snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ */
+public class ScrolledComposite extends Composite
+{
+
+    Control content;
+    Listener contentListener;
+    Listener filter;
+
+    int minHeight = 0;
+    int minWidth = 0;
+    boolean expandHorizontal = false;
+    boolean expandVertical = false;
+    boolean alwaysShowScroll = false;
+    boolean showFocusedControl = false;
+
+    /**
+     * Constructs a new instance of this class given its parent
+     * and a style value describing its behavior and appearance.
+     * <p>
+     * The style value is either one of the style constants defined in
+     * class <code>SWT</code> which is applicable to instances of this
+     * class, or must be built by <em>bitwise OR</em>'ing together
+     * (that is, using the <code>int</code> "|" operator) two or more
+     * of those <code>SWT</code> style constants. The class description
+     * lists the style constants that are applicable to the class.
+     * Style bits are also inherited from superclasses.
+     * </p>
+     *
+     * @param parent a widget which will be the parent of the new instance (cannot be null)
+     * @param style the style of widget to construct
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+     * </ul>
+     *
+     * @see SWT#H_SCROLL
+     * @see SWT#V_SCROLL
+     * @see #getStyle()
+     */
+    public ScrolledComposite(Composite parent, int style)
+    {
+        super(parent, checkStyle(style));
+        super.setLayout(new ScrolledCompositeLayout());
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setVisible(false);
+            hBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Horizontal Scroll");
+                    hScroll();
+                }
+            });
+        }
+
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setVisible(false);
+            vBar.addListener(SWT.Selection, new Listener()
+            {
+                public void handleEvent(Event e)
+                {
+                    System.out.print("\nHandle Verical Scroll");
+                    vScroll();
+                }
+            });
+        }
+
+        contentListener = new Listener()
+        {
+            public void handleEvent(Event e)
+            {
+                System.out.print("\nHandle Content change");
+                if (e.type != SWT.Resize) return;
+                layout(false);
+            }
+        };
+
+        filter = new Listener()
+        {
+            public void handleEvent(Event event)
+            {
+                System.out.print("\nFilter Listener");
+                if (event.widget instanceof Control)
+                {
+                    Control control = (Control) event.widget;
+                    if (contains(control)) showControl(control);
+                }
+            }
+        };
+
+        addDisposeListener(new DisposeListener()
+        {
+            public void widgetDisposed(DisposeEvent e)
+            {
+                getDisplay().removeFilter(SWT.FocusIn, filter);
+            }
+        });
+    }
+
+    static int checkStyle(int style)
+    {
+        int mask = SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
+        return style & mask;
+    }
+
+    boolean contains(Control control)
+    {
+        if (control == null || control.isDisposed()) return false;
+
+        Composite parent = control.getParent();
+        while (parent != null && !(parent instanceof Shell))
+        {
+            if (this == parent) return true;
+            parent = parent.getParent();
+        }
+        return false;
+    }
+
+    /**
+     * Returns the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @return the Always Show Scrollbars flag value
+     */
+    public boolean getAlwaysShowScrollBars()
+    {
+        //checkWidget();
+        return alwaysShowScroll;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available horizontal space.
+     *
+     * @return the receiver's horizontal expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandHorizontal()
+    {
+        checkWidget();
+        return expandHorizontal;
+    }
+
+    /**
+     * Returns <code>true</code> if the content control
+     * will be expanded to fill available vertical space.
+     *
+     * @return the receiver's vertical expansion state
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public boolean getExpandVertical()
+    {
+        checkWidget();
+        return expandVertical;
+    }
+
+    /**
+     * Returns the minimum width of the content control.
+     *
+     * @return the minimum width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinWidth()
+    {
+        checkWidget();
+        return minWidth;
+    }
+
+    /**
+     * Returns the minimum height of the content control.
+     *
+     * @return the minimum height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.2
+     */
+    public int getMinHeight()
+    {
+        checkWidget();
+        return minHeight;
+    }
+
+    /**
+     * Get the content that is being scrolled.
+     *
+     * @return the control displayed in the content area
+     */
+    public Control getContent()
+    {
+        //checkWidget();
+        return content;
+    }
+
+    /**
+     * Returns <code>true</code> if the receiver automatically scrolls to a focused child control
+     * to make it visible. Otherwise, returns <code>false</code>.
+     *
+     * @return a boolean indicating whether focused child controls are automatically scrolled into the viewport
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public boolean getShowFocusedControl()
+    {
+        checkWidget();
+        return showFocusedControl;
+    }
+
+    void hScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar hBar = getHorizontalBar();
+        int hSelection = hBar.getSelection();
+        content.setLocation(-hSelection, location.y);
+    }
+    boolean needHScroll(Rectangle contentRect, boolean vVisible)
+    {
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.width -= 2*border;
+        ScrollBar vBar = getVerticalBar();
+        if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
+
+        if (!expandHorizontal && contentRect.width > hostRect.width) return true;
+        if (expandHorizontal && minWidth > hostRect.width) return true;
+        return false;
+    }
+
+    boolean needVScroll(Rectangle contentRect, boolean hVisible)
+    {
+        ScrollBar vBar = getVerticalBar();
+        if (vBar == null) return false;
+
+        Rectangle hostRect = getBounds();
+        int border = getBorderWidth();
+        hostRect.height -= 2*border;
+        ScrollBar hBar = getHorizontalBar();
+        if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
+
+        if (!expandVertical && contentRect.height > hostRect.height) return true;
+        if (expandVertical && minHeight > hostRect.height) return true;
+        return false;
+    }
+
+    /**
+     * Return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.
+     *
+     * @return the point in the content that currently appears in the top left
+     * corner of the scrolled composite.  If no content has been set, this returns
+     * (0, 0).
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public Point getOrigin()
+    {
+        checkWidget();
+        if (content == null) return new Point(0, 0);
+        Point location = content.getLocation();
+        return new Point(-location.x, -location.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param origin the point on the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     *    <li>ERROR_INVALID_ARGUMENT - value of origin is outside of content
+     * </ul>
+     * @since 2.0
+     */
+    public void setOrigin(Point origin)
+    {
+        setOrigin(origin.x, origin.y);
+    }
+    /**
+     * Scrolls the content so that the specified point in the content is in the top
+     * left corner.  If no content has been set, nothing will occur.
+     *
+     * Negative values will be ignored.  Values greater than the maximum scroll
+     * distance will result in scrolling to the end of the scrollbar.
+     *
+     * @param x the x coordinate of the content to appear in the top left corner
+     *
+     * @param y the y coordinate of the content to appear in the top left corner
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    public void setOrigin(int x, int y)
+    {
+        checkWidget();
+        if (content == null) return;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null)
+        {
+            hBar.setSelection(x);
+            x = -hBar.getSelection();
+        }
+        else
+        {
+            x = 0;
+        }
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null)
+        {
+            vBar.setSelection(y);
+            y = -vBar.getSelection();
+        }
+        else
+        {
+            y = 0;
+        }
+        content.setLocation(x, y);
+    }
+    /**
+     * Set the Always Show Scrollbars flag.  True if the scrollbars are
+     * always shown even if they are not required.  False if the scrollbars are only
+     * visible when some part of the composite needs to be scrolled to be seen.
+     * The H_SCROLL and V_SCROLL style bits are also required to enable scrollbars in the
+     * horizontal and vertical directions.
+     *
+     * @param show true to show the scrollbars even when not required, false to show scrollbars only when required
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setAlwaysShowScrollBars(boolean show)
+    {
+        checkWidget();
+        if (show == alwaysShowScroll) return;
+        alwaysShowScroll = show;
+        ScrollBar hBar = getHorizontalBar();
+        if (hBar != null && alwaysShowScroll) hBar.setVisible(true);
+        ScrollBar vBar = getVerticalBar();
+        if (vBar != null && alwaysShowScroll) vBar.setVisible(true);
+        layout(false);
+    }
+
+    /**
+     * Set the content that will be scrolled.
+     *
+     * @param content the control to be displayed in the content area
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setContent(Control content)
+    {
+        System.out.print("\nSetting Content");
+        checkWidget();
+        if (this.content != null && !this.content.isDisposed())
+        {
+            this.content.removeListener(SWT.Resize, contentListener);
+            this.content.setBounds(new Rectangle(-200, -200, 0, 0));
+        }
+
+        this.content = content;
+        ScrollBar vBar = getVerticalBar();
+        ScrollBar hBar = getHorizontalBar();
+        if (this.content != null)
+        {
+            if (vBar != null)
+            {
+                vBar.setMaximum(0);
+                vBar.setThumb(0);
+                vBar.setSelection(0);
+            }
+            if (hBar != null)
+            {
+                hBar.setMaximum(0);
+                hBar.setThumb(0);
+                hBar.setSelection(0);
+            }
+            content.setLocation(0, 0);
+            layout(false);
+            this.content.addListener(SWT.Resize, contentListener);
+        }
+        else
+        {
+            if (hBar != null) hBar.setVisible(alwaysShowScroll);
+            if (vBar != null) vBar.setVisible(alwaysShowScroll);
+        }
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as wide as the
+     * ScrolledComposite when the width of the ScrolledComposite is greater than the
+     * minimum width specified in setMinWidth.  If the ScrolledComposite is less than the
+     * minimum width, the content will not be resized and instead the horizontal scroll bar will be
+     * used to view the entire width.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available horizontal space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandHorizontal(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandHorizontal) return;
+        expandHorizontal = expand;
+        layout(false);
+    }
+    /**
+     * Configure the ScrolledComposite to resize the content object to be as tall as the
+     * ScrolledComposite when the height of the ScrolledComposite is greater than the
+     * minimum height specified in setMinHeight.  If the ScrolledComposite is less than the
+     * minimum height, the content will not be resized and instead the vertical scroll bar will be
+     * used to view the entire height.
+     * If expand is false, this behaviour is turned off.  By default, this behaviour is turned off.
+     *
+     * @param expand true to expand the content control to fill available vertical space
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setExpandVertical(boolean expand)
+    {
+        checkWidget();
+        if (expand == expandVertical) return;
+        expandVertical = expand;
+        layout(false);
+    }
+    /**
+     * Sets the layout which is associated with the receiver to be
+     * the argument which may be null.
+     * <p>
+     * Note: No Layout can be set on this Control because it already
+     * manages the size and position of its children.
+     * </p>
+     *
+     * @param layout the receiver's new layout or null
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setLayout(Layout layout)
+    {
+        checkWidget();
+        return;
+    }
+    /**
+     * Specify the minimum height at which the ScrolledComposite will begin scrolling the
+     * content with the vertical scroll bar.  This value is only relevant if
+     * setExpandVertical(true) has been set.
+     *
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinHeight(int height)
+    {
+        setMinSize(minWidth, height);
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param size the minimum size or null for the default size
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(Point size)
+    {
+        if (size == null)
+        {
+            setMinSize(0, 0);
+        }
+        else
+        {
+            setMinSize(size.x, size.y);
+        }
+    }
+    /**
+     * Specify the minimum width and height at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) and setExpandVertical(true) have been set.
+     *
+     * @param width the minimum width or 0 for default width
+     * @param height the minimum height or 0 for default height
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinSize(int width, int height)
+    {
+        checkWidget();
+        if (width == minWidth && height == minHeight) return;
+        minWidth = Math.max(0, width);
+        minHeight = Math.max(0, height);
+        layout(false);
+    }
+    /**
+     * Specify the minimum width at which the ScrolledComposite will begin scrolling the
+     * content with the horizontal scroll bar.  This value is only relevant if
+     * setExpandHorizontal(true) has been set.
+     *
+     * @param width the minimum width or 0 for default width
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     */
+    public void setMinWidth(int width)
+    {
+        setMinSize(width, minHeight);
+    }
+
+    /**
+     * Configure the receiver to automatically scroll to a focused child control
+     * to make it visible.
+     *
+     * If show is <code>false</code>, show a focused control is off.
+     * By default, show a focused control is off.
+     *
+     * @param show <code>true</code> to show a focused control.
+     *
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void setShowFocusedControl(boolean show)
+    {
+        checkWidget();
+        if (showFocusedControl == show) return;
+        Display display = getDisplay();
+        display.removeFilter(SWT.FocusIn, filter);
+        showFocusedControl = show;
+        if (!showFocusedControl) return;
+        display.addFilter(SWT.FocusIn, filter);
+        Control control = display.getFocusControl();
+        if (contains(control)) showControl(control);
+    }
+
+    /**
+     * Scrolls the content of the receiver so that the control is visible.
+     *
+     * @param control the control to be shown
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the control is null</li>
+     *    <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li>
+     * </ul>
+     * @exception SWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+     * </ul>
+     *
+     * @since 3.4
+     */
+    public void showControl(Control control)
+    {
+        checkWidget();
+        if (control == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+        if (control.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+        if (!contains(control)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+
+        Rectangle itemRect = getDisplay().map(control.getParent(), this, control.getBounds());
+        Rectangle area = getClientArea();
+        Point origin = getOrigin();
+        if (itemRect.x < 0) origin.x = Math.max(0, origin.x + itemRect.x);
+        if (itemRect.y < 0) origin.y = Math.max(0, origin.y + itemRect.y);
+        if (area.width < itemRect.x + itemRect.width) origin.x = Math.max(0, origin.x + itemRect.x + itemRect.width - area.width);
+        if (area.height < itemRect.y + itemRect.height) origin.y = Math.max(0, origin.y + itemRect.y + itemRect.height - area.height);
+        setOrigin(origin);
+    }
+
+    void vScroll()
+    {
+        if (content == null) return;
+        Point location = content.getLocation();
+        ScrollBar vBar = getVerticalBar();
+        int vSelection = vBar.getSelection();
+        content.setLocation(location.x, -vSelection);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DateEditorTestMidletSuite/src/org/eclipse/swt/custom/ScrolledCompositeLayout.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class provides the layout for ScrolledComposite
+ *
+ * @see ScrolledComposite
+ */
+class ScrolledCompositeLayout extends Layout
+{
+
+    boolean inLayout = false;
+    static final int DEFAULT_WIDTH  = 64;
+    static final int DEFAULT_HEIGHT = 64;
+
+    protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache)
+    {
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+        if (sc.content != null)
+        {
+            Point preferredSize = sc.content.computeSize(wHint, hHint, flushCache);
+            Point currentSize = sc.content.getSize();
+            size.x = sc.getExpandHorizontal() ? preferredSize.x : currentSize.x;
+            size.y = sc.getExpandVertical() ? preferredSize.y : currentSize.y;
+        }
+        size.x = Math.max(size.x, sc.minWidth);
+        size.y = Math.max(size.y, sc.minHeight);
+        if (wHint != SWT.DEFAULT) size.x = wHint;
+        if (hHint != SWT.DEFAULT) size.y = hHint;
+        return size;
+    }
+
+    protected boolean flushCache(Control control)
+    {
+        return true;
+    }
+
+    protected void layout(Composite composite, boolean flushCache)
+    {
+        if (inLayout) return;
+        ScrolledComposite sc = (ScrolledComposite)composite;
+        if (sc.content == null) return;
+        ScrollBar hBar = sc.getHorizontalBar();
+        ScrollBar vBar = sc.getVerticalBar();
+        if (hBar != null)
+        {
+            if (hBar.getSize().y >= sc.getSize().y)
+            {
+                return;
+            }
+        }
+        if (vBar != null)
+        {
+            if (vBar.getSize().x >= sc.getSize().x)
+            {
+                return;
+            }
+        }
+        inLayout = true;
+        Rectangle contentRect = sc.content.getBounds();
+        if (!sc.alwaysShowScroll)
+        {
+            boolean hVisible = sc.needHScroll(contentRect, false);
+            boolean vVisible = sc.needVScroll(contentRect, hVisible);
+            if (!hVisible && vVisible) hVisible = sc.needHScroll(contentRect, vVisible);
+            if (hBar != null) hBar.setVisible(hVisible);
+            if (vBar != null) vBar.setVisible(vVisible);
+        }
+        Rectangle hostRect = sc.getClientArea();
+        if (sc.expandHorizontal)
+        {
+            contentRect.width = Math.max(sc.minWidth, hostRect.width);
+        }
+        if (sc.expandVertical)
+        {
+            contentRect.height = Math.max(sc.minHeight, hostRect.height);
+        }
+
+        if (hBar != null)
+        {
+            hBar.setMaximum(contentRect.width);
+            hBar.setThumb(Math.min(contentRect.width, hostRect.width));
+            int hPage = contentRect.width - hostRect.width;
+            int hSelection = hBar.getSelection();
+            if (hSelection >= hPage)
+            {
+                if (hPage <= 0)
+                {
+                    hSelection = 0;
+                    hBar.setSelection(0);
+                }
+                contentRect.x = -hSelection;
+            }
+        }
+
+        if (vBar != null)
+        {
+            vBar.setMaximum(contentRect.height);
+            vBar.setThumb(Math.min(contentRect.height, hostRect.height));
+            int vPage = contentRect.height - hostRect.height;
+            int vSelection = vBar.getSelection();
+            if (vSelection >= vPage)
+            {
+                if (vPage <= 0)
+                {
+                    vSelection = 0;
+                    vBar.setSelection(0);
+                }
+                contentRect.y = -vSelection;
+            }
+        }
+
+        sc.content.setBounds(contentRect);
+        inLayout = false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DirectoryDialogMidlet/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="DirectoryDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="DirectoryDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.directorydialog.DirectoryDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="DirectoryDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DirectoryDialogMidlet/src/com/nokia/test/java/eswt/directorydialog/DirectoryDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,331 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.directorydialog;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ */
+public class DirectoryDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** setting fields */
+    protected Text fieldTitle           = null;
+    protected Text fieldMessage     = null;
+    protected Text fieldFilterPath  = null;
+
+    /** commands */
+    protected Command cmdSetTitleDEFINE     = null;
+    protected Command cmdSetTitleNULL           = null;
+
+    protected Command cmdSetMessageDEFINE       = null;
+    protected Command cmdSetMessageNULL     = null;
+
+    protected Command cmdSetFilterPathDEFINE    = null;
+    protected Command cmdSetFilterPathNULL  = null;
+
+    protected Command cmdSetClean               = null;
+
+    protected Command cmdOpen                   = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Directory Dialog Test");
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // create commands
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSettings.setText("Settings");
+
+        // title commands
+        Command cmdSetTitle = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdSetTitle.setText("Title");
+
+        this.cmdSetTitleDEFINE = new Command(cmdSetTitle, Command.GENERAL, 1);
+        this.cmdSetTitleDEFINE.setText("define");
+        this.cmdSetTitleDEFINE.addSelectionListener(this);
+
+        this.cmdSetTitleNULL = new Command(cmdSetTitle, Command.GENERAL, 0);
+        this.cmdSetTitleNULL.setText("null");
+        this.cmdSetTitleNULL.addSelectionListener(this);
+
+        // message commands
+        Command cmdSetMessage =
+            new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdSetMessage.setText("Message");
+
+        this.cmdSetMessageDEFINE =
+            new Command(cmdSetMessage, Command.GENERAL, 1);
+        this.cmdSetMessageDEFINE.setText("define");
+        this.cmdSetMessageDEFINE.addSelectionListener(this);
+
+        this.cmdSetMessageNULL = new Command(cmdSetMessage, Command.GENERAL, 0);
+        this.cmdSetMessageNULL.setText("null");
+        this.cmdSetMessageNULL.addSelectionListener(this);
+
+        // filter PATH command
+        Command cmdSetFilter =
+            new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdSetFilter.setText("Filter");
+
+        Command cmdSetFilterPATH =
+            new Command(cmdSetFilter, Command.COMMANDGROUP, 0);
+        cmdSetFilterPATH.setText("PATH");
+
+        this.cmdSetFilterPathDEFINE =
+            new Command(cmdSetFilterPATH, Command.GENERAL, 1);
+        this.cmdSetFilterPathDEFINE.setText("define");
+        this.cmdSetFilterPathDEFINE.addSelectionListener(this);
+
+        this.cmdSetFilterPathNULL =
+            new Command(cmdSetFilterPATH, Command.GENERAL, 0);
+        this.cmdSetFilterPathNULL.setText("null");
+        this.cmdSetFilterPathNULL.addSelectionListener(this);
+
+        // clean command
+        this.cmdSetClean = new Command(cmdSettings, Command.GENERAL, 0);
+        this.cmdSetClean.setText("Clean");
+        this.cmdSetClean.addSelectionListener(this);
+
+        // open command
+        this.cmdOpen = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdOpen.setText("Open");
+        this.cmdOpen.addSelectionListener(this);
+    }
+
+    /**
+     * Create and open a DirectoryDialog
+     */
+    protected void open()
+    {
+        // create a dialog
+        DirectoryDialog dlg = new DirectoryDialog(this.shell);
+
+        // configure the dialog
+        if (this.fieldTitle != null && !this.fieldTitle.isDisposed())
+        {
+            if (this.fieldTitle.isEnabled())
+            {
+                dlg.setText(this.fieldTitle.getText());
+            }
+            else
+            {
+                dlg.setText(null);
+            }
+        }
+
+        if (this.fieldMessage != null && !this.fieldMessage.isDisposed())
+        {
+            if (this.fieldMessage.isEnabled())
+            {
+                dlg.setMessage(this.fieldMessage.getText());
+            }
+            else
+            {
+                dlg.setMessage(null);
+            }
+        }
+
+        if (this.fieldFilterPath != null &&
+                !this.fieldFilterPath.isDisposed())
+        {
+            if (this.fieldFilterPath.isEnabled())
+            {
+                dlg.setFilterPath(this.fieldFilterPath.getText());
+            }
+            else
+            {
+                dlg.setFilterPath(null);
+            }
+        }
+
+        // open the dialog
+        dlg.open();
+    }
+
+    /**
+     * Clear all previously defined settings
+     */
+    protected void clean()
+    {
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            if (controls[i] != null && !controls[i].isDisposed())
+            {
+                controls[i].dispose();
+            }
+        }
+
+        // recreate a title label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Settings");
+        GridData data = new GridData();
+        data.horizontalSpan             = 2;
+        data.horizontalAlignment        = SWT.CENTER;
+        data.grabExcessHorizontalSpace  = true;
+        label.setLayoutData(data);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // title commands
+            if (event.widget == this.cmdSetTitleDEFINE)
+            {
+                if (this.fieldTitle == null || this.fieldTitle.isDisposed())
+                {
+                    this.fieldTitle = this.createField("Title: ");
+                }
+                else if (!this.fieldTitle.isEnabled())
+                {
+                    this.fieldTitle.setEnabled(true);
+                    this.fieldTitle.setText("");
+                }
+                return;
+            }
+            if (event.widget == this.cmdSetTitleNULL)
+            {
+                if (this.fieldTitle == null || this.fieldTitle.isDisposed())
+                {
+                    this.fieldTitle = this.createField("Title: ");
+                }
+                this.fieldTitle.setEnabled(false);
+                this.fieldTitle.setText("null");
+                return;
+            }
+
+            // message commands
+            if (event.widget == this.cmdSetMessageDEFINE)
+            {
+                if (this.fieldMessage == null ||
+                        this.fieldMessage.isDisposed())
+                {
+                    this.fieldMessage = this.createField("Message: ");
+                }
+                else if (!this.fieldMessage.isEnabled())
+                {
+                    this.fieldMessage.setEnabled(true);
+                    this.fieldMessage.setText("");
+                }
+                return;
+            }
+            if (event.widget == this.cmdSetMessageNULL)
+            {
+                if (this.fieldMessage == null ||
+                        this.fieldMessage.isDisposed())
+                {
+                    this.fieldMessage = this.createField("Message: ");
+                }
+                this.fieldMessage.setEnabled(false);
+                this.fieldMessage.setText("null");
+                return;
+            }
+
+            // filter PATH commands
+            if (event.widget == this.cmdSetFilterPathDEFINE)
+            {
+                if (this.fieldFilterPath == null ||
+                        this.fieldFilterPath.isDisposed())
+                {
+                    this.fieldFilterPath = this.createField("Filter PATH: ");
+                }
+                else if (!this.fieldFilterPath.isEnabled())
+                {
+                    this.fieldFilterPath.setEnabled(true);
+                    this.fieldFilterPath.setText("");
+                }
+                return;
+            }
+            if (event.widget == this.cmdSetFilterPathNULL)
+            {
+                if (this.fieldFilterPath == null ||
+                        this.fieldFilterPath.isDisposed())
+                {
+                    this.fieldFilterPath = this.createField("Filter PATH: ");
+                }
+                this.fieldFilterPath.setEnabled(false);
+                this.fieldFilterPath.setText("null");
+                return;
+            }
+
+            // clean command
+            if (event.widget == this.cmdSetClean)
+            {
+                this.clean();
+                return;
+            }
+
+            // open command
+            if (event.widget == this.cmdOpen)
+            {
+                this.open();
+                return;
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create and return a Text field with preceding info label
+     */
+    protected Text createField(String title)
+    {
+        // create info label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText(title);
+
+        // create a Text field
+        Text field = new Text(this.shell, SWT.BORDER);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+
+        return field;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/DirectoryDialogMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="FileDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="FileDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.filedialog.FileDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="FileDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/src/com/nokia/test/java/eswt/filedialog/FileDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,367 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.filedialog;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FileDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** dialog settings */
+
+    /** config fields */
+    protected Label fieldTYPE           = null;
+    protected Text fieldFILE            = null;
+    protected Text fieldFilterEXTENSION = null;
+    protected Text fieldFilterPATH      = null;
+
+    /** commands */
+    protected Command cmdTypeOPEN = null;
+    protected Command cmdTypeSAVE = null;
+
+    protected Command cmdSetFileDEFINE  = null;
+    protected Command cmdSetFileNULL        = null;
+
+    protected Command cmdSetFilterPATH      = null;
+    protected Command cmdSetFilterEXTENTION = null;
+
+    protected Command cmdSetClean   = null;
+
+    // open command
+    protected Command cmdOpen = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        this.shell.setText("File Dialog Test");
+        this.shell.setLayout(new GridLayout(2, true));
+
+        // create menu commands
+        // settings command group
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSettings.setText("Settings");
+
+        // type commands
+        Command cmdType = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdType.setText("Type");
+
+        this.cmdTypeOPEN = new Command(cmdType, Command.GENERAL, 1);
+        this.cmdTypeOPEN.setText("OPEN");
+        this.cmdTypeOPEN.addSelectionListener(this);
+
+        this.cmdTypeSAVE = new Command(cmdType, Command.GENERAL, 0);
+        this.cmdTypeSAVE.setText("SAVE");
+        this.cmdTypeSAVE.addSelectionListener(this);
+
+        // defaut file commands
+        Command cmdSetFile = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdSetFile.setText("File");
+
+        this.cmdSetFileDEFINE = new Command(cmdSetFile, Command.GENERAL, 1);
+        this.cmdSetFileDEFINE.setText("define");
+        this.cmdSetFileDEFINE.addSelectionListener(this);
+
+        this.cmdSetFileNULL = new Command(cmdSetFile, Command.GENERAL, 0);
+        this.cmdSetFileNULL.setText("null");
+        this.cmdSetFileNULL.addSelectionListener(this);
+
+        // filter commands
+        Command cmdFilter = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdFilter.setText("Filter");
+
+        this.cmdSetFilterEXTENTION = new Command(cmdFilter, Command.GENERAL, 1);
+        this.cmdSetFilterEXTENTION.setText("Extension");
+        this.cmdSetFilterEXTENTION.addSelectionListener(this);
+
+        this.cmdSetFilterPATH = new Command(cmdFilter, Command.GENERAL, 0);
+        this.cmdSetFilterPATH.setText("Path");
+        this.cmdSetFilterPATH.addSelectionListener(this);
+
+        // clean settings command
+        this.cmdSetClean = new Command(cmdSettings, Command.GENERAL, 0);
+        this.cmdSetClean.setText("Clean");
+        this.cmdSetClean.addSelectionListener(this);
+
+        // open dialog command
+        this.cmdOpen = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdOpen.setText("Open");
+        this.cmdOpen.addSelectionListener(this);
+
+        // clean settings
+        this.clean();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // type commands
+            if (event.widget == this.cmdTypeOPEN)
+            {
+                this.setType(SWT.OPEN);
+                return;
+            }
+            if (event.widget == this.cmdTypeSAVE)
+            {
+                this.setType(SWT.SAVE);
+                return;
+            }
+
+            // file commands
+            if (event.widget == this.cmdSetFileDEFINE)
+            {
+                if (this.fieldFILE == null || this.fieldFILE.isDisposed())
+                {
+                    this.fieldFILE = this.createField("Default value");
+                }
+                this.fieldFILE.setEnabled(true);
+                return;
+            }
+            if (event.widget == this.cmdSetFileNULL)
+            {
+                if (this.fieldFILE == null || this.fieldFILE.isDisposed())
+                {
+                    this.fieldFILE = this.createField("Default value");
+                }
+                this.fieldFILE.setText("null");
+                this.fieldFILE.setEnabled(false);
+                return;
+            }
+
+            // filter commands
+            if (event.widget == this.cmdSetFilterEXTENTION)
+            {
+                if (this.fieldFilterEXTENSION == null ||
+                        this.fieldFilterEXTENSION.isDisposed())
+                {
+                    this.fieldFilterEXTENSION =
+                        this.createField("Filter extention");
+                }
+                return;
+            }
+            if (event.widget == this.cmdSetFilterPATH)
+            {
+                if (this.fieldFilterPATH == null ||
+                        this.fieldFilterPATH.isDisposed())
+                {
+                    this.fieldFilterPATH =
+                        this.createField("Filter path");
+                }
+                return;
+            }
+
+            // clean settings command
+            if (event.widget == this.cmdSetClean)
+            {
+                this.clean();
+                return;
+            }
+
+            // open command
+            if (event.widget == this.cmdOpen)
+            {
+                this.openDialog();
+                return;
+            }
+
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.NONE);
+            msg.setMessage(ex.getMessage());
+        }
+
+        if (event.widget == this.cmdExit)
+        {
+            this.clean();
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     *
+     */
+    protected void setType(int type)
+    {
+        // validate specified type for the correct value
+        if (type != SWT.OPEN && type != SWT.SAVE)
+        {
+            // do nothing
+            return;
+        }
+
+        // update info labels
+        if (this.fieldTYPE == null || this.fieldTYPE.isDisposed())
+        {
+            // create info labels
+            Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Type:");
+            this.fieldTYPE = new Label(this.shell, SWT.NONE);
+        }
+        switch (type)
+        {
+        case SWT.OPEN:
+            this.fieldTYPE.setText("OPEN");
+            break;
+        case SWT.SAVE:
+            this.fieldTYPE.setText("SAVE");
+            break;
+        }
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Clean settings
+     */
+    protected void clean()
+    {
+        // dispose all info labels
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            if (controls[i] != null && !controls[i].isDisposed())
+                controls[i].dispose();
+        }
+
+        // create Settings label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("Settings");
+        GridData data = new GridData();
+        data.horizontalSpan             = 2;
+        data.horizontalAlignment        = SWT.CENTER;
+        data.grabExcessHorizontalSpace  = true;
+        label.setLayoutData(data);
+
+        this.shell.update();
+    }
+
+    /**
+     * Create a Text field with preceeding Label
+     */
+    protected Text createField(String title)
+    {
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText(title);
+
+        Text field = new Text(this.shell, SWT.BORDER);
+        this.shell.layout();
+        this.shell.update();
+
+        return field;
+    }
+
+    /**
+     * Create, configure and open a FileDialog
+     */
+    protected void openDialog()
+    {
+        try
+        {
+            // get type & create dialog
+            int type = SWT.NONE;
+            if (this.fieldTYPE != null && !this.fieldTYPE.isDisposed())
+            {
+                if ("OPEN".equals(this.fieldTYPE.getText()))
+                {
+                    type = SWT.OPEN;
+                }
+                if ("SAVE".equals(this.fieldTYPE.getText()))
+                {
+                    type = SWT.SAVE;
+                }
+            }
+            FileDialog dlg = new FileDialog(this.shell, type);
+
+            // configure the dialog
+            // set file name (default value)
+            if (this.fieldFILE != null && !this.fieldFILE.isDisposed())
+            {
+                String fname = null;
+                if (this.fieldFILE.isEnabled())
+                {
+                    fname = this.fieldFILE.getText();
+                }
+                dlg.setFileName(fname);
+            }
+
+            // set extention filter
+            if (this.fieldFilterEXTENSION != null &&
+                    !this.fieldFilterEXTENSION.isDisposed())
+            {
+                String filter = null;
+                if (this.fieldFilterEXTENSION.isEnabled())
+                {
+                    filter = this.fieldFilterEXTENSION.getText();
+                }
+                dlg.setFilterExtensions(new String[] {filter});
+            }
+
+            // set path filter
+            if (this.fieldFilterPATH != null &&
+                    !this.fieldFilterPATH.isDisposed())
+            {
+                String filter = null;
+                if (this.fieldFilterPATH.isEnabled())
+                {
+                    filter = this.fieldFilterPATH.getText();
+                }
+                System.out.println(filter);
+                dlg.setFilterPath(filter);
+                System.out.println("Filter is set");
+            }
+
+            // open the dialog
+            String result = dlg.open();
+
+            if (result != null)
+            {
+                MessageBox msg = new MessageBox(this.shell,
+                                                SWT.ICON_INFORMATION | SWT.OK);
+                msg.setMessage("Selected file: " + result);
+                msg.open();
+            }
+
+        }
+        catch (Exception ex)
+        {
+            System.out.println("Exception: " + ex.getMessage());
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FileDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="FontDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="FontDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.fontdialog.FontDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="FontDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/src/com/nokia/test/java/eswt/fontdialog/FontDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* 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.test.java.eswt.fontdialog;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class FontDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** fontdialog instance */
+    private FontDialog fdlg = null;
+
+    private FontData fdata = null;
+
+    private Label label = null;
+
+    /** canvas instance to change background color */
+    private Canvas canvas = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("FontDialog Test");
+        this.shell.setLayout(new GridLayout(1, false));
+
+        this.label = new Label(this.shell,SWT.BORDER);
+        label.setText("Example Font");
+        label.setLayoutData(
+            new GridData(SWT.CENTER, SWT.CENTER, true, true));
+
+        // create canvas, that occupies the area in bottom corner
+        this.canvas = new Canvas(this.shell, SWT.BORDER);
+        this.canvas.setBounds(0,0,this.shell.getBounds().width,50);
+
+        // initialize the colordialog
+        this.fdlg = new FontDialog(this.shell);
+
+        // "open" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 1);
+        cmd.setText("Open");
+        cmd.addSelectionListener(this);
+        // "set new color"  command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Set new color");
+        cmd.addSelectionListener(this);
+        // "set new fontlisy"  command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Set new fontlist");
+        cmd.addSelectionListener(this);
+        // "set new Text"  command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Set new text");
+        cmd.addSelectionListener(this);
+        // "set long Text"  command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Set long text");
+        cmd.addSelectionListener(this);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Open".equals(scmd))
+            {
+                // open the colordialog
+                this.fdata  = this.fdlg.open();
+                if (this.fdata != null)
+                {
+                    Font font = new Font(this.display,this.fdata);
+                    this.label.setFont(font);
+
+                    if (this.fdlg.getRGB() != null)
+                    {
+                        // set the background to the selected color
+                        Color color = new Color(this.display, this.fdlg.getRGB());
+                        this.label.setForeground(color);
+                        this.canvas.setBackground(color);
+                        color.dispose();
+                    }
+                }
+
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            if ("Set new color".equals(scmd))
+            {
+                // add a new custom color to the fontdialog
+                this.fdlg.setRGB(new RGB(131, 153, 177));
+                this.fdlg.setRGB(new RGB(255, 0, 0));
+                this.fdlg.open();
+
+                return;
+            }
+            if ("Set new fontlist".equals(scmd))
+            {
+                FontData[] fdatalist = this.display.getFontList(null, true);
+                FontData[] list = new FontData[1];
+
+                list[0] = fdatalist[2];
+
+                // add a new fontlist
+                this.fdlg.setFontList(list);
+                this.fdata = this.fdlg.open();
+
+                return;
+            }
+            if ("Set new text".equals(scmd))
+            {
+                // add a new custom title to the fontdialog
+                this.fdlg.setText("New FontDialog");
+                return;
+            }
+            if ("Set long text".equals(scmd))
+            {
+                // add a long title to the fontdialog
+                this.fdlg.setText("This is a very long title for FontDialog to see how it behaves! Let's see what happens...");
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,79 @@
+<!--
+#
+# 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="FontsTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="FontTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.font.FontTestMIDlet_01"/>
+    <property name="midlet2.name" value="FontTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.font.FontTestMIDlet_02"/>
+    <property name="midlet3.name" value="FontTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.font.FontTestMIDlet_03"/>
+    <property name="midlet4.name" value="FontTestMIDlet_04"/>
+    <property name="midlet4.icon.name" value="icon.png"/>
+    <property name="midlet4.package.name" value="com.nokia.test.java.eswt.font.FontTestMIDlet_04"/>
+    <property name="midlet5.name" value="FontTestMIDlet_05"/>
+    <property name="midlet5.icon.name" value="icon.png"/>
+    <property name="midlet5.package.name" value="com.nokia.test.java.eswt.font.FontTestMIDlet_05"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="FontsTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+            <midlet name="${midlet4.name}" icon="${midlet4.icon.name}" class="${midlet4.package.name}" />
+            <midlet name="${midlet5.name}" icon="${midlet5.icon.name}" class="${midlet5.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontConfigDialog.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,272 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ *
+ */
+public class FontConfigDialog extends Dialog implements SelectionListener
+{
+    /** shell */
+    protected Shell shell = null;
+
+    /** */
+    protected Font font = null;
+
+    /** Info labels */
+    protected Label infoHeight  = null;
+    protected Label infoStyle       = null;
+
+    /** success flag */
+    protected boolean success = false;
+
+    /** Commands */
+    protected Command cmdChangeHeight           = null;
+    protected Command cmdChangeStyleNORMAL          = null;
+    protected Command cmdChangeStyleITALIC          = null;
+    protected Command cmdChangeStyleBOLD            = null;
+    protected Command cmdChangeStyleBOLDITALIC      = null;
+
+    protected Command cmdOK     = null;
+    protected Command cmdCancel = null;
+
+    /**
+     * Constructor
+     */
+    public FontConfigDialog(Shell parent)
+    {
+        super(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+    }
+
+    /**
+     * Initialization
+     */
+    private void init(Font font)
+    {
+        // shell init
+        this.shell = new Shell(this.getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+        this.shell.setText("Font Configuration");
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // set default font
+        if (font == null && font.isDisposed())
+        {
+            throw new IllegalArgumentException("The parameter cannot be null");
+        }
+        FontData fdata = font.getFontData()[0];
+        this.font = new Font(this.getParent().getDisplay(), fdata);
+
+        // create info labels
+        Label heightTitle = new Label(this.shell, SWT.NONE);
+        heightTitle.setText("Height: ");
+        this.infoHeight = new Label(this.shell, SWT.BORDER);
+        this.infoHeight.setText(
+            String.valueOf(this.font.getFontData()[0].getHeight()));
+
+        Label styleTitle = new Label(this.shell, SWT.NONE);
+        styleTitle.setText("Style: ");
+        this.infoStyle = new Label(this.shell, SWT.BORDER);
+        this.setStyle(this.font.getFontData()[0].getStyle());
+
+        // create commands
+        // change command group
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSet.setText("Set");
+
+        // change height
+        this.cmdChangeHeight = new Command(cmdSet, Command.GENERAL, 1);
+        this.cmdChangeHeight.setText("Height");
+        this.cmdChangeHeight.addSelectionListener(this);
+
+        // change style
+        Command cmdStyle = new Command(cmdSet, Command.COMMANDGROUP, 0);
+        cmdStyle.setText("Style");
+
+        this.cmdChangeStyleNORMAL = new Command(cmdStyle, Command.GENERAL, 3);
+        this.cmdChangeStyleNORMAL.setText("NORMAL");
+        this.cmdChangeStyleNORMAL.addSelectionListener(this);
+
+        this.cmdChangeStyleITALIC = new Command(cmdStyle, Command.GENERAL, 2);
+        this.cmdChangeStyleITALIC.setText("ITALIC");
+        this.cmdChangeStyleITALIC.addSelectionListener(this);
+
+        this.cmdChangeStyleBOLD = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdChangeStyleBOLD.setText("BOLD");
+        this.cmdChangeStyleBOLD.addSelectionListener(this);
+
+        this.cmdChangeStyleBOLDITALIC = new Command(cmdStyle, Command.GENERAL, 0);
+        this.cmdChangeStyleBOLDITALIC.setText("BOLD | ITALIC");
+        this.cmdChangeStyleBOLDITALIC.addSelectionListener(this);
+
+        // OK command
+        this.cmdOK = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdOK.setText("OK");
+        this.cmdOK.addSelectionListener(this);
+
+        // Cancel command
+        this.cmdCancel = new Command(this.shell, Command.EXIT, 0);
+        this.cmdCancel.setText("Cancel");
+        this.cmdCancel.addSelectionListener(this);
+
+        // restore success flag
+        this.success = false;
+    }
+
+    /**
+     *
+     */
+    public Font open(Font font)
+    {
+        // init
+        this.init(font);
+
+        // open the dialog
+        shell.open();
+        Display display = this.getParent().getDisplay();
+        while (!shell.isDisposed())
+        {
+            if (!display.readAndDispatch()) display.sleep();
+        }
+
+        if (!this.success)
+        {
+            this.font.dispose();
+            this.font = null;
+        }
+
+        return this.font;
+    }
+
+    /**
+     * Set specified style to current font and unpdate style info label
+     */
+    private void setStyle(int style)
+    {
+        FontData data = this.font.getFontData()[0];
+        this.font.dispose();
+        data.setStyle(style);
+        this.font = new Font(this.getParent().getDisplay(), data);
+
+        // update info label
+        String sstyle = "";
+        switch (style)
+        {
+        case SWT.NORMAL:
+            sstyle = "NORMAL";
+            break;
+
+        case SWT.ITALIC:
+            sstyle = "ITALIC";
+            break;
+
+        case SWT.BOLD:
+            sstyle = "BOLD";
+            break;
+
+        case SWT.BOLD | SWT.ITALIC:
+            sstyle = "BOLD | ITALIC";
+            break;
+        }
+        this.infoStyle.setText(sstyle);
+        this.infoStyle.pack();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        // change height command
+        if (e.widget == this.cmdChangeHeight)
+        {
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.BORDER, QueryDialog.NUMERIC);
+            dlg.setPromptText("Input height",
+                              String.valueOf(this.font.getFontData()[0].getHeight()));
+            dlg.setMinimum(0);
+            dlg.setMaximum(2);
+            String sheight = dlg.open();
+            if (sheight != null)
+            {
+                FontData data = this.font.getFontData()[0];
+                this.font.dispose();
+                data.setHeight(Integer.parseInt(sheight));
+                this.font = new Font(this.getParent().getDisplay(), data);
+                this.infoHeight.setText(sheight);
+                this.infoHeight.pack();
+            }
+            return;
+        }
+
+        // change style commands
+        if (e.widget == this.cmdChangeStyleNORMAL)
+        {
+            this.setStyle(SWT.NORMAL);
+            return;
+        }
+        if (e.widget == this.cmdChangeStyleITALIC)
+        {
+            this.setStyle(SWT.ITALIC);
+            return;
+        }
+        if (e.widget == this.cmdChangeStyleBOLD)
+        {
+            this.setStyle(SWT.BOLD);
+            return;
+        }
+        if (e.widget == this.cmdChangeStyleBOLDITALIC)
+        {
+            this.setStyle(SWT.BOLD | SWT.ITALIC);
+            return;
+        }
+
+        // OK command
+        if (e.widget == this.cmdOK)
+        {
+            this.success = true;
+            this.shell.dispose();
+        }
+
+        // Cancel command
+        if (e.widget == this.cmdCancel)
+        {
+            this.success = false;
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent e)
+    {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,225 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Canvas;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FontTestMIDlet_01 extends TestBaseMIDlet implements PaintListener
+{
+    /** canvas */
+    private Canvas canvas = null;
+
+    /** currently used font height */
+    private int height          = 12;
+    /** currently used font face */
+    protected String fontface   = null;
+    /** created fonts */
+    protected Vector fonts      = null;
+
+    /** commands */
+    // font height
+    protected Command cmdFontHeight = null;
+    // font face commands
+    protected Vector fontFaceCMDs   = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        this.shell.setText("Font Test");
+        this.shell.setLayout(new FillLayout());
+
+        this.fonts = new Vector();
+
+        // commands
+        Command cmdFont = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdFont.setText("Font");
+
+        // font height
+        this.cmdFontHeight = new Command(cmdFont, Command.GENERAL, 1);
+        this.cmdFontHeight.setText("Height");
+        this.cmdFontHeight.addSelectionListener(this);
+
+        // font faces
+        Command cmdFontFace = new Command(cmdFont, Command.COMMANDGROUP, 0);
+        cmdFontFace.setText("Face (name)");
+
+        this.fontFaceCMDs = new Vector();
+        String[] faces = this.getFontFaces();
+        for (int i=0; i<faces.length; i++)
+        {
+            Command cmd = new Command(cmdFontFace, Command.GENERAL, i);
+            cmd.setText(faces[i]);
+            cmd.addSelectionListener(this);
+            this.fontFaceCMDs.addElement(cmd);
+        }
+
+        // create Canvas
+        this.canvas = new Canvas(this.shell,SWT.NO_BACKGROUND);
+        canvas.addPaintListener(this);
+    }
+
+    /**
+     *
+     */
+    private String[] getFontFaces()
+    {
+        FontData[] fdata = this.display.getFontList(null, true);
+
+        System.out.println("Font list obtained. Items count " + fdata.length);
+
+        Vector ff = new Vector();
+        for (int i=0; i<fdata.length; i++)
+        {
+            String fface = fdata[i].getName();
+            if (!ff.contains(fface))
+            {
+                ff.addElement(fface);
+            }
+        }
+
+        String[] result = new String[ff.size()];
+        ff.copyInto(result);
+        return result;
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        // set height command
+        if (event.widget == this.cmdFontHeight)
+        {
+            QueryDialog dlg =
+                new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+            dlg.setPromptText("Set Font height", String.valueOf(this.height));
+            String result = dlg.open();
+            if (result != null)
+            {
+                this.height = Integer.parseInt(result);
+            }
+            this.canvas.redraw();
+            return;
+        }
+
+        // font face selection
+        if (this.fontFaceCMDs.contains(event.widget))
+        {
+            this.fontface = ((Command) event.widget).getText();
+            this.canvas.redraw();
+            return;
+        }
+
+        // pre-exit cleaning
+        if (event.widget == this.cmdExit)
+        {
+            this.clean();
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt.events.PaintEvent)
+     */
+    public void paintControl(PaintEvent e)
+    {
+        if (e.widget == this.canvas)
+        {
+            if (this.fontface == null)
+            {
+                // font face is not defined, do nothing
+                return;
+            }
+
+            // dispose previously allocated fonts
+            this.clean();
+
+            int x = 10;
+            int y = 10;
+            Font font;
+
+            String str = "eSWT Fonts";
+            font = new Font(this.display, this.fontface, this.height,
+                            SWT.NORMAL);
+            e.gc.setFont(font);
+            e.gc.drawString(str, x, y);
+            y += e.gc.getFontMetrics().getHeight();
+            System.out.println("Font Height = " + font.getFontData()[0].getHeight());
+            this.fonts.addElement(font);
+
+            font = new Font(this.display, this.fontface, this.height,
+                            SWT.ITALIC);
+            e.gc.setFont(font);
+            e.gc.drawString(str, x, y);
+            y += e.gc.getFontMetrics().getHeight();
+            this.fonts.addElement(font);
+
+            font = new Font(this.display, this.fontface, this.height,
+                            SWT.BOLD);
+            e.gc.setFont(font);
+            e.gc.drawText(str, x, y);
+            y += e.gc.getFontMetrics().getHeight();
+            this.fonts.addElement(font);
+
+            font = new Font(this.display, this.fontface, this.height,
+                            SWT.ITALIC | SWT.BOLD);
+            e.gc.setFont(font);
+            e.gc.drawText(str, x, y);
+            y += e.gc.getFontMetrics().getHeight();
+            this.fonts.addElement(font);
+        }
+    }
+
+    /**
+     * Cleaning
+     */
+    protected void clean()
+    {
+        if (this.fonts != null)
+        {
+            Enumeration fs = this.fonts.elements();
+            while (fs.hasMoreElements())
+            {
+                Font font = (Font)fs.nextElement();
+                if (font != null && !font.isDisposed())
+                    font.dispose();
+            }
+            this.fonts.removeAllElements();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,247 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import org.eclipse.ercp.swt.mobile.CaptionedControl;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FontTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** currently used font */
+    protected Font font = null;
+
+    /** current composite */
+    protected Composite composite = null;
+
+    /** commands */
+    protected Command cmdCompositeCombo     = null;
+    protected Command cmdCaprionedControl   = null;
+
+    protected Command cmdFont               = null;
+    private Command cmdFontDEFINE           = null;
+    private Command cmdFontNULL             = null;
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Font Test");
+        this.shell.setLayout(new GridLayout(1, false));
+
+        // setup commands
+        // composite
+        Command cmdComposite = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdComposite.setText("Composite");
+
+        this.cmdCompositeCombo = new Command(cmdComposite, Command.GENERAL, 1);
+        this.cmdCompositeCombo.setText("Combo");
+        this.cmdCompositeCombo.addSelectionListener(this);
+
+        this.cmdCaprionedControl = new Command(cmdComposite, Command.GENERAL, 0);
+        this.cmdCaprionedControl.setText("Captioned Control");
+        this.cmdCaprionedControl.addSelectionListener(this);
+
+        // font settings
+        this.cmdFont = new Command(this.shell, Command.COMMANDGROUP, 1);
+        this.cmdFont.setText("Font");
+        this.cmdFont.setEnabled(false);
+
+        this.cmdFontDEFINE = new Command(this.cmdFont, Command.GENERAL, 1);
+        this.cmdFontDEFINE.setText("Define");
+        this.cmdFontDEFINE.addSelectionListener(this);
+
+        this.cmdFontNULL = new Command(this.cmdFont, Command.GENERAL, 0);
+        this.cmdFontNULL.setText("null");
+        this.cmdFontNULL.addSelectionListener(this);
+    }
+
+    /**
+     * Clean the shell
+     */
+    private void clean()
+    {
+        // dispose composite
+        if (this.composite != null && !this.composite.isDisposed())
+        {
+            this.composite.dispose();
+        }
+
+        // dispose the font
+        if (this.font != null && !this.font.isDisposed())
+        {
+            this.font.dispose();
+        }
+
+        this.shell.update();
+        this.shell.layout();
+        this.shell.redraw();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // composite commands
+            if (event.widget == this.cmdCompositeCombo)
+            {
+                if (this.composite instanceof Combo)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new Combo
+                Combo control = new Combo(this.shell, SWT.NONE);
+                control.setItems(new String[] {"item 1","item 2","item 3"});
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.composite = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            if (event.widget == this.cmdCaprionedControl)
+            {
+                if (this.composite instanceof CaptionedControl)
+                {
+                    return;
+                }
+                this.clean();
+                CaptionedControl control = new CaptionedControl(this.shell, SWT.NONE);
+                new DateEditor(control, DateEditor.DATE);
+                control.setText("Today: ");
+                control.setTrailingText("*");
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                control.setFocus();
+                this.composite = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                this.log(this.composite.getFont());
+                return;
+            }
+
+            // font events
+            if (event.widget == this.cmdFontDEFINE)
+            {
+                FontConfigDialog dlg = new FontConfigDialog(this.shell);
+                Font font = dlg.open(this.composite.getFont());
+                this.log(font);
+                if (font != null)
+                {
+                    this.composite.setFont(font);
+                    // dispose current font
+                    if (this.font != null && !this.font.isDisposed())
+                    {
+                        this.font.dispose();
+                    }
+                    this.composite.redraw();
+                    this.composite.update();
+                    this.font = font;
+                    this.shell.layout();
+                    this.shell.update();
+                }
+                return;
+            }
+            if (event.widget == this.cmdFontNULL)
+            {
+                this.composite.setFont(null);
+                // dispose current font
+                if (this.font != null && !this.font.isDisposed())
+                {
+                    this.font.dispose();
+                }
+                // set font to null
+                this.font = null;
+                this.log(this.composite.getFont());
+                return;
+            }
+
+            // exit command
+            if (event.widget == this.cmdExit)
+            {
+                this.clean();
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     *
+     */
+    private void log(Font font)
+    {
+        if (font == null)
+        {
+            System.out.println("Font is NULL");
+            return;
+        }
+
+        System.out.print("Height: " + font.getFontData()[0].getHeight());
+        int style = font.getFontData()[0].getStyle();
+        String msg = "N/A";
+        if ((style & SWT.NORMAL) == style)
+        {
+            msg = "NORMAL";
+        }
+        else if ((style & SWT.ITALIC) == style)
+        {
+            msg = "ITALIC";
+        }
+        else if ((style & SWT.BOLD) == style)
+        {
+            msg = "BOLD";
+        }
+        else if ((style & (SWT.ITALIC | SWT.BOLD)) == style)
+        {
+            msg = "ITALIC | BOLD";
+        }
+        System.out.println("Style: " + msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,336 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import java.util.Date;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FontTestMIDlet_03 extends TestBaseMIDlet
+{
+
+    /** currently used font */
+    protected Font font = null;
+
+    /** current control */
+    protected Control control = null;
+
+    protected Button controls[];
+    /** commands */
+    protected Command cmdControlButton      = null;
+    protected Command cmdControlDateEditor  = null;
+    protected Command cmdControlLabel       = null;
+    protected Command cmdControlHyperLink   = null;
+
+    protected Command cmdFont               = null;
+    protected Command cmdFontDEFINE         = null;
+    protected Command cmdFontNULL           = null;
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Font Test");
+        this.shell.setLayout(new GridLayout(1, false));
+
+        this.controls = new Button[3];
+        // setup commands
+        // composite
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdControl.setText("Control");
+
+        this.cmdControlButton = new Command(cmdControl, Command.GENERAL, 3);
+        this.cmdControlButton.setText("Button");
+        this.cmdControlButton.addSelectionListener(this);
+
+        this.cmdControlDateEditor = new Command(cmdControl, Command.GENERAL, 2);
+        this.cmdControlDateEditor.setText("Date Editor");
+        this.cmdControlDateEditor.addSelectionListener(this);
+
+        this.cmdControlLabel = new Command(cmdControl, Command.GENERAL, 1);
+        this.cmdControlLabel.setText("Label");
+        this.cmdControlLabel.addSelectionListener(this);
+
+        this.cmdControlHyperLink = new Command(cmdControl, Command.GENERAL, 0);
+        this.cmdControlHyperLink.setText("HyperLink");
+        this.cmdControlHyperLink.addSelectionListener(this);
+
+        // font settings
+        this.cmdFont = new Command(this.shell, Command.COMMANDGROUP, 1);
+        this.cmdFont.setText("Font");
+        this.cmdFont.setEnabled(false);
+
+        this.cmdFontDEFINE = new Command(this.cmdFont, Command.GENERAL, 1);
+        this.cmdFontDEFINE.setText("Define");
+        this.cmdFontDEFINE.addSelectionListener(this);
+
+        this.cmdFontNULL = new Command(this.cmdFont, Command.GENERAL, 0);
+        this.cmdFontNULL.setText("null");
+        this.cmdFontNULL.addSelectionListener(this);
+    }
+
+    /**
+     * Clean the shell
+     */
+    protected void clean()
+    {
+        // dispose composite
+        if (this.control != null && !this.control.isDisposed())
+        {
+            this.control.dispose();
+        }
+
+        // dispose the font
+        if (this.font != null && !this.font.isDisposed())
+        {
+            this.font.dispose();
+        }
+
+        this.shell.update();
+        this.shell.redraw();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // composite commands
+            // Button
+            if (event.widget == this.cmdControlButton)
+            {
+                if (this.control instanceof Button)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new Button
+                Button control1 = new Button(this.shell, SWT.NONE);
+                control1.setText("Button");
+                control1.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control1;
+                this.controls[0] = control1;
+
+                Button control2 = new Button(this.shell, SWT.CHECK);
+                control2.setText("Check");
+                control2.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+
+                this.controls[1] = control2;
+
+                Button control3 = new Button(this.shell, SWT.RADIO);
+                control3.setText("Radio");
+                control3.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.controls[2] = control3;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // DateEditor
+            if (event.widget == this.cmdControlDateEditor)
+            {
+                if (this.control instanceof DateEditor)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new DateEditor
+                DateEditor control = new DateEditor(this.shell, SWT.NONE);
+                control.setDate(new Date());
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // Label
+            if (event.widget == this.cmdControlLabel)
+            {
+                if (this.control instanceof Label)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new Label
+                Label control = new Label(this.shell, SWT.NONE);
+                control.setText("Label");
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // HyperLink
+            if (event.widget == this.cmdControlHyperLink)
+            {
+                if (this.control instanceof HyperLink)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new Label
+                HyperLink control = new HyperLink(this.shell, SWT.NONE, HyperLink.EMAIL);
+                control.setText("some.body@somewhere.com");
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+
+            // font events
+            if (event.widget == this.cmdFontDEFINE)
+            {
+                FontConfigDialog dlg = new FontConfigDialog(this.shell);
+                Font font = dlg.open(this.control.getFont());
+                if (font != null)
+                {
+                    if (this.control instanceof Button)
+                    {
+                        for (int i = 0; i < this.controls.length; i++)
+                        {
+
+                            this.controls[i].setFont(font);
+                        }
+                    }
+                    this.control.setFont(font);
+                    // dispose current font
+                    if (this.font != null && !this.font.isDisposed())
+                    {
+                        this.font.dispose();
+                    }
+                    this.font = font;
+                    // update control
+                    this.control.pack();
+                    this.shell.layout();
+                    this.shell.update();
+                }
+                return;
+            }
+            if (event.widget == this.cmdFontNULL)
+            {
+                if (this.control instanceof Button)
+                {
+                    for (int i = 0; i < this.controls.length; i++)
+                    {
+
+                        this.controls[i].setFont(null);
+                    }
+                }
+                this.control.setFont(null);
+
+                // dispose current font
+                if (this.font != null && !this.font.isDisposed())
+                {
+                    this.font.dispose();
+                }
+                // set font to null
+                this.font = null;
+                this.shell.layout();
+                this.shell.update();
+                this.log(this.control.getFont());
+                return;
+            }
+
+            // exit command
+            if (event.widget == this.cmdExit)
+            {
+                this.clean();
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     *
+     */
+    private void log(Font font)
+    {
+        if (font == null)
+        {
+            System.out.println("Font is NULL");
+            return;
+        }
+
+        System.out.print("Height: " + font.getFontData()[0].getHeight());
+        int style = font.getFontData()[0].getStyle();
+        String msg = "N/A";
+        if ((style & SWT.NORMAL) == style)
+        {
+            msg = "NORMAL";
+        }
+        else if ((style & SWT.ITALIC) == style)
+        {
+            msg = "ITALIC";
+        }
+        else if ((style & SWT.BOLD) == style)
+        {
+            msg = "BOLD";
+        }
+        else if ((style & (SWT.ITALIC | SWT.BOLD)) == style)
+        {
+            msg = "ITALIC | BOLD";
+        }
+        System.out.println("Style: " + msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.TextExtension;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FontTestMIDlet_04 extends TestBaseMIDlet
+{
+
+    /** currently used font */
+    protected Font font = null;
+
+    /** current text control */
+    protected Control control = null;
+
+    /** commands */
+    protected Command cmdControlText            = null;
+    protected Command cmdControlTextExtension   = null;
+
+    protected Command cmdFont               = null;
+    protected Command cmdFontDEFINE         = null;
+    protected Command cmdFontNULL           = null;
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Font Test");
+        this.shell.setLayout(new GridLayout(1, false));
+
+        // setup commands
+        // composite
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdControl.setText("Control");
+
+
+        this.cmdControlText = new Command(cmdControl, Command.GENERAL, 1);
+        this.cmdControlText.setText("Text");
+        this.cmdControlText.addSelectionListener(this);
+
+        this.cmdControlTextExtension = new Command(cmdControl, Command.GENERAL, 0);
+        this.cmdControlTextExtension.setText("Text Extension");
+        this.cmdControlTextExtension.addSelectionListener(this);
+
+        // font settings
+        this.cmdFont = new Command(this.shell, Command.COMMANDGROUP, 1);
+        this.cmdFont.setText("Font");
+        this.cmdFont.setEnabled(false);
+
+        this.cmdFontDEFINE = new Command(this.cmdFont, Command.GENERAL, 1);
+        this.cmdFontDEFINE.setText("Define");
+        this.cmdFontDEFINE.addSelectionListener(this);
+
+        this.cmdFontNULL = new Command(this.cmdFont, Command.GENERAL, 0);
+        this.cmdFontNULL.setText("null");
+        this.cmdFontNULL.addSelectionListener(this);
+    }
+
+    /**
+     * Clean the shell
+     */
+    protected void clean()
+    {
+        // dispose composite
+        if (this.control != null && !this.control.isDisposed())
+        {
+            this.control.dispose();
+        }
+
+        // dispose the font
+        if (this.font != null && !this.font.isDisposed())
+        {
+            this.font.dispose();
+        }
+
+        this.shell.update();
+        this.shell.redraw();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // composite commands
+            // Text
+            if (event.widget == this.cmdControlText)
+            {
+                if (this.control instanceof Text)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new Text
+                Text control = new Text(this.shell, SWT.BORDER);
+                control.setText("some text");
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // DateEditor
+            if (event.widget == this.cmdControlTextExtension)
+            {
+                if (this.control instanceof TextExtension)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new TextExtension
+                TextExtension control =
+                    new TextExtension(this.shell, SWT.BORDER, TextExtension.URL);
+                control.setText("www.nokia.com");
+                control.setLayoutData(
+                    new GridData(SWT.CENTER, SWT.CENTER, true, true));
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+
+            // font events
+            if (event.widget == this.cmdFontDEFINE)
+            {
+                FontConfigDialog dlg = new FontConfigDialog(this.shell);
+                Font font = dlg.open(this.control.getFont());
+                if (font != null)
+                {
+                    this.control.setFont(font);
+                    // dispose current font
+                    if (this.font != null && !this.font.isDisposed())
+                    {
+                        this.font.dispose();
+                    }
+                    this.font = font;
+                    // update control
+                    this.shell.layout();
+                    this.shell.update();
+                }
+                return;
+            }
+            if (event.widget == this.cmdFontNULL)
+            {
+                this.control.setFont(null);
+                // dispose current font
+                if (this.font != null && !this.font.isDisposed())
+                {
+                    this.font.dispose();
+                }
+                // set font to null
+                this.font = null;
+                this.shell.layout();
+                this.shell.update();
+                this.log(this.control.getFont());
+                return;
+            }
+
+            // exit command
+            if (event.widget == this.cmdExit)
+            {
+                this.clean();
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     *
+     */
+    private void log(Font font)
+    {
+        if (font == null)
+        {
+            System.out.println("Font is NULL");
+            return;
+        }
+
+        System.out.print("Height: " + font.getFontData()[0].getHeight());
+        int style = font.getFontData()[0].getStyle();
+        String msg = "N/A";
+        if ((style & SWT.NORMAL) == style)
+        {
+            msg = "NORMAL";
+        }
+        else if ((style & SWT.ITALIC) == style)
+        {
+            msg = "ITALIC";
+        }
+        else if ((style & SWT.BOLD) == style)
+        {
+            msg = "BOLD";
+        }
+        else if ((style & (SWT.ITALIC | SWT.BOLD)) == style)
+        {
+            msg = "ITALIC | BOLD";
+        }
+        System.out.println("; Style: " + msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/font/FontTestMIDlet_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,304 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.font;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ListBox;
+import org.eclipse.ercp.swt.mobile.ListBoxItem;
+import org.eclipse.ercp.swt.mobile.ListView;
+import org.eclipse.ercp.swt.mobile.SortedList;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class FontTestMIDlet_05 extends TestBaseMIDlet
+{
+
+    /** currently used font */
+    protected Font font = null;
+
+    /** current List control */
+    protected Control control = null;
+
+    /** list items */
+    protected String[] items = new String[] {"item 4","item 2","item 3","item 1"};
+
+    /** commands */
+    protected Command cmdControlList        = null;
+    protected Command cmdControlListBox     = null;
+    protected Command cmdControlListView    = null;
+    protected Command cmdControlSortedList  = null;
+
+    protected Command cmdFont               = null;
+    protected Command cmdFontDEFINE         = null;
+    protected Command cmdFontNULL           = null;
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Font Test");
+        this.shell.setLayout(new FillLayout());
+
+        // setup commands
+        // composite
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdControl.setText("List Control");
+
+        this.cmdControlList = new Command(cmdControl, Command.GENERAL, 3);
+        this.cmdControlList.setText("List");
+        this.cmdControlList.addSelectionListener(this);
+
+        this.cmdControlListBox = new Command(cmdControl, Command.GENERAL, 2);
+        this.cmdControlListBox.setText("List Box");
+        this.cmdControlListBox.addSelectionListener(this);
+
+        this.cmdControlListView = new Command(cmdControl, Command.GENERAL, 1);
+        this.cmdControlListView.setText("List View");
+        this.cmdControlListView.addSelectionListener(this);
+
+        this.cmdControlSortedList = new Command(cmdControl, Command.GENERAL, 0);
+        this.cmdControlSortedList.setText("Sorted List");
+        this.cmdControlSortedList.addSelectionListener(this);
+
+        // font settings
+        this.cmdFont = new Command(this.shell, Command.COMMANDGROUP, 1);
+        this.cmdFont.setText("Font");
+        this.cmdFont.setEnabled(false);
+
+        this.cmdFontDEFINE = new Command(this.cmdFont, Command.GENERAL, 1);
+        this.cmdFontDEFINE.setText("Define");
+        this.cmdFontDEFINE.addSelectionListener(this);
+
+        this.cmdFontNULL = new Command(this.cmdFont, Command.GENERAL, 0);
+        this.cmdFontNULL.setText("null");
+        this.cmdFontNULL.addSelectionListener(this);
+    }
+
+    /**
+     * Clean the shell
+     */
+    protected void clean()
+    {
+        // dispose composite
+        if (this.control != null && !this.control.isDisposed())
+        {
+            this.control.dispose();
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.update();
+        }
+
+        // dispose the font
+        if (this.font != null && !this.font.isDisposed())
+        {
+            this.font.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        try
+        {
+            // composite commands
+            // List
+            if (event.widget == this.cmdControlList)
+            {
+                if (this.control instanceof List)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new List
+                List control = new List(this.shell, SWT.BORDER);
+                control.setItems(this.items);
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // ListBox
+            if (event.widget == this.cmdControlListBox)
+            {
+                if (this.control instanceof ListBox)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new ListBox
+                ListBox control =
+                    new ListBox(this.shell, SWT.BORDER,
+                                ListBox.LB_STYLE_NO_HEADING_TEXT);
+                ListBoxItem[] data = new ListBoxItem[this.items.length];
+                for (int i=0; i<data.length; i++)
+                {
+                    data[i] = new ListBoxItem();
+                    data[i].setDetailText(this.items[i]);
+                }
+                control.setDataModel(data);
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // ListView
+            if (event.widget == this.cmdControlListView)
+            {
+                if (this.control instanceof ListView)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new ListView
+                ListView control = new ListView(this.shell, SWT.BORDER);
+                control.setItems(this.items, null);
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+            // SortedList
+            if (event.widget == this.cmdControlSortedList)
+            {
+                if (this.control instanceof SortedList)
+                {
+                    // nothing to change
+                    return;
+                }
+                // cleaning
+                this.clean();
+                // create new SortedList
+                SortedList control = new SortedList(this.shell, SWT.BORDER);
+                control.setItems(this.items);
+                this.control = control;
+                this.cmdFont.setEnabled(true);
+                this.shell.layout();
+                this.shell.update();
+                return;
+            }
+
+            // font events
+            if (event.widget == this.cmdFontDEFINE)
+            {
+                FontConfigDialog dlg = new FontConfigDialog(this.shell);
+                Font font = dlg.open(this.control.getFont());
+                if (font != null)
+                {
+                    this.control.setFont(font);
+                    // dispose current font
+                    if (this.font != null && !this.font.isDisposed())
+                    {
+                        this.font.dispose();
+                    }
+                    this.font = font;
+                    // update control
+                    this.control.update();
+                    this.shell.layout();
+                    this.shell.update();
+                }
+                return;
+            }
+            if (event.widget == this.cmdFontNULL)
+            {
+                this.control.setFont(null);
+                // dispose current font
+                if (this.font != null && !this.font.isDisposed())
+                {
+                    this.font.dispose();
+                }
+                // set font to null
+                this.font = null;
+                this.shell.layout();
+                this.shell.update();
+                this.log(this.control.getFont());
+                return;
+            }
+
+            // exit command
+            if (event.widget == this.cmdExit)
+            {
+                this.clean();
+            }
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     *
+     */
+    private void log(Font font)
+    {
+        if (font == null)
+        {
+            System.out.println("Font is NULL");
+            return;
+        }
+
+        System.out.print("Height: " + font.getFontData()[0].getHeight());
+        int style = font.getFontData()[0].getStyle();
+        String msg = "N/A";
+        if ((style & SWT.NORMAL) == style)
+        {
+            msg = "NORMAL";
+        }
+        else if ((style & SWT.ITALIC) == style)
+        {
+            msg = "ITALIC";
+        }
+        else if ((style & SWT.BOLD) == style)
+        {
+            msg = "BOLD";
+        }
+        else if ((style & (SWT.ITALIC | SWT.BOLD)) == style)
+        {
+            msg = "ITALIC | BOLD";
+        }
+        System.out.println("; Style: " + msg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/FontsTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="GraphicsTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="GraphicsTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.graphics.GraphicsTestMIDlet_01"/>
+    <property name="midlet2.name" value="GraphicsTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.graphics.GraphicsTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="GraphicsTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
Binary file javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/res/medium.jpg has changed
Binary file javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/res/res/medium.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/graphics/GraphicsTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,551 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.graphics;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the gc (graphics) component
+ * - changing line style
+ * - changing line width
+ * - drawing shapes
+ * - drawing strings
+ */
+public class GraphicsTestMIDlet_01 extends TestBaseMIDlet implements PaintListener
+{
+    /** menuitems... */
+    private MenuItem mnuSolid = null;
+    private MenuItem mnuDash = null;
+    private MenuItem mnuDot = null;
+    private MenuItem mnuDashDot = null;
+    private MenuItem mnuDashDotDot = null;
+    private MenuItem mnu0 = null;
+    private MenuItem mnu1 = null;
+    private MenuItem mnu3 = null;
+    private MenuItem mnu5 = null;
+    /** screen area */
+    private Rectangle rect;
+    /** line style */
+    private int style;
+    /** line width */
+    private int width;
+    /** shape */
+    private byte shape;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Graphics 1");
+        this.shell.setBackground(this.display.getSystemColor(SWT.COLOR_YELLOW));
+        this.shell.addPaintListener(this);
+        // default values
+        this.rect = this.shell.getClientArea();
+        this.rect = this.shell.getClientArea();
+        this.rect.x += 5;
+        this.rect.y += 5;
+        this.rect.width -= 11;
+        this.rect.height -= 11;
+        this.style = SWT.LINE_SOLID;
+        this.width = 0;
+        this.shape = 0;
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "line style" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Line Style");
+        item.setMenu(menu);
+        // "solid" menuitem for "line style" submenu
+        this.mnuSolid = new MenuItem(menu, SWT.PUSH);
+        this.mnuSolid.setText("* Solid");
+        this.mnuSolid.addSelectionListener(this);
+        // "dash" menuitem for "line style" submenu
+        this.mnuDash = new MenuItem(menu, SWT.PUSH);
+        this.mnuDash.setText("Dash");
+        this.mnuDash.addSelectionListener(this);
+        // "dot" menuitem for "line style" submenu
+        this.mnuDot = new MenuItem(menu, SWT.PUSH);
+        this.mnuDot.setText("Dot");
+        this.mnuDot.addSelectionListener(this);
+        // "dashdot" menuitem for "line style" submenu
+        this.mnuDashDot = new MenuItem(menu, SWT.PUSH);
+        this.mnuDashDot.setText("DashDot");
+        this.mnuDashDot.addSelectionListener(this);
+        // "dashdotdot" menuitem for "line style" submenu
+        this.mnuDashDotDot = new MenuItem(menu, SWT.PUSH);
+        this.mnuDashDotDot.setText("DashDotDot");
+        this.mnuDashDotDot.addSelectionListener(this);
+        // "line width" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Line Width");
+        item.setMenu(menu);
+        // "0" menuitem for "line width" submenu
+        this.mnu0 = new MenuItem(menu, SWT.PUSH);
+        this.mnu0.setText("* 0");
+        this.mnu0.addSelectionListener(this);
+        // "1" menuitem for "line width" submenu
+        this.mnu1 = new MenuItem(menu, SWT.PUSH);
+        this.mnu1.setText("1");
+        this.mnu1.addSelectionListener(this);
+        // "3" menuitem for "line width" submenu
+        this.mnu3 = new MenuItem(menu, SWT.PUSH);
+        this.mnu3.setText("3");
+        this.mnu3.addSelectionListener(this);
+        // "5" menuitem for "line width" submenu
+        this.mnu5 = new MenuItem(menu, SWT.PUSH);
+        this.mnu5.setText("5");
+        this.mnu5.addSelectionListener(this);
+        // "shape" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Shape");
+        item.setMenu(menu);
+        // "arc" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Arc");
+        item.addSelectionListener(this);
+        // "line" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Line");
+        item.addSelectionListener(this);
+        // "oval" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Oval");
+        item.addSelectionListener(this);
+        // "point" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Point");
+        item.addSelectionListener(this);
+        // "polygon" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Polygon");
+        item.addSelectionListener(this);
+        // "polyline" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Polyline");
+        item.addSelectionListener(this);
+        // "rectangle" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Rectangle");
+        item.addSelectionListener(this);
+        // "round rectangle" menuitem for "shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Round Rectangle");
+        item.addSelectionListener(this);
+        // "string" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("String");
+        item.setMenu(menu);
+        // "normal" menuitem for "string" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        item.addSelectionListener(this);
+        // "transparent" menuitem for "string" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Transparent");
+        item.addSelectionListener(this);
+        // "text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Text");
+        item.setMenu(menu);
+        // "normal" menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        item.addSelectionListener(this);
+        // "delimiter" menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Delimiter");
+        item.addSelectionListener(this);
+        // "tab" menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Tab");
+        item.addSelectionListener(this);
+        // "mnemonic" menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Mnemonic");
+        item.addSelectionListener(this);
+        // "transparent" menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Transparent");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * update the mark in "line style" submenu
+     * @param newstyle the selected style
+     * @param item the selected menuitem
+     */
+    private void chgStyle(int newStyle, MenuItem item)
+    {
+        if (this.style != newStyle)
+        {
+            switch (this.style)
+            {
+            case SWT.LINE_SOLID:
+                this.mnuSolid.setText("Solid");
+                break;
+            case SWT.LINE_DASH:
+                this.mnuDash.setText("Dash");
+                break;
+            case SWT.LINE_DOT:
+                this.mnuDot.setText("Dot");
+                break;
+            case SWT.LINE_DASHDOT:
+                this.mnuDashDot.setText("DashDot");
+                break;
+            case SWT.LINE_DASHDOTDOT:
+                this.mnuDashDotDot.setText("DashDotDot");
+                break;
+            default:
+                break;
+            }
+            // set the new style and mark it in the menu
+            this.style = newStyle;
+            item.setText("* "+item.getText());
+            //this.shell.redraw();
+            this.shell.update();
+        }
+    }
+
+    /**
+     * update the mark in "line width" submenu
+     * @param newwidth the selected width
+     * @param item the selected menuitem
+     */
+    private void chgWidth(int newWidth, MenuItem item)
+    {
+        if (this.width != newWidth)
+        {
+            switch (this.width)
+            {
+            case 0:
+                this.mnu0.setText("0");
+                break;
+            case 1:
+                this.mnu1.setText("1");
+                break;
+            case 3:
+                this.mnu3.setText("3");
+                break;
+            case 5:
+                this.mnu5.setText("5");
+                break;
+            default:
+                break;
+            }
+            // set the new width and mark it in the menu
+            this.width = newWidth;
+            item.setText("* "+item.getText());
+            this.shell.update();
+        }
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if (event.widget == this.mnuSolid)
+            {
+                // set the style
+                this.chgStyle(SWT.LINE_SOLID, this.mnuSolid);
+                return;
+            }
+            if (event.widget == this.mnuDash)
+            {
+                // set the style
+                this.chgStyle(SWT.LINE_DASH, this.mnuDash);
+                return;
+            }
+            if (event.widget == this.mnuDot)
+            {
+                // set the style
+                this.chgStyle(SWT.LINE_DOT, this.mnuDot);
+                return;
+            }
+            if (event.widget == this.mnuDashDot)
+            {
+                // set the style
+                this.chgStyle(SWT.LINE_DASHDOT, this.mnuDashDot);
+                return;
+            }
+            if (event.widget == this.mnuDashDotDot)
+            {
+                // set the style
+                this.chgStyle(SWT.LINE_DASHDOTDOT, this.mnuDashDotDot);
+                return;
+            }
+            if (event.widget == this.mnu0)
+            {
+                // set the width
+                this.chgWidth(0, this.mnu0);
+                return;
+            }
+            if (event.widget == this.mnu1)
+            {
+                // set the width
+                this.chgWidth(1, this.mnu1);
+                return;
+            }
+            if (event.widget == this.mnu3)
+            {
+                // set the width
+                this.chgWidth(3, this.mnu3);
+                return;
+            }
+            if (event.widget == this.mnu5)
+            {
+                // set the width
+                this.chgWidth(5, this.mnu5);
+                return;
+            }
+            if ("Arc".equals(scmd))
+            {
+                // draw an arc...
+                this.shape = 1;
+                this.shell.redraw();
+                return;
+            }
+            if ("Line".equals(scmd))
+            {
+                // draw a line...
+                this.shape = 2;
+                this.shell.redraw();
+                return;
+            }
+            if ("Oval".equals(scmd))
+            {
+                // draw an oval...
+                this.shape = 3;
+                this.shell.redraw();
+                return;
+            }
+            if ("Point".equals(scmd))
+            {
+                // draw a point...
+                this.shape = 4;
+                this.shell.redraw();
+                return;
+            }
+            if ("Polygon".equals(scmd))
+            {
+                // draw a polygon...
+                this.shape = 5;
+                this.shell.redraw();
+                return;
+            }
+            if ("Polyline".equals(scmd))
+            {
+                // draw a polyline...
+                this.shape = 6;
+                this.shell.redraw();
+                return;
+            }
+            if ("Rectangle".equals(scmd))
+            {
+                // draw a rectangle...
+                this.shape = 7;
+                this.shell.redraw();
+                return;
+            }
+            if ("Round Rectangle".equals(scmd))
+            {
+                // draw a round rectangle...
+                this.shape = 8;
+                this.shell.redraw();
+                return;
+            }
+            if ("Normal".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("String".equals(scmd))
+                {
+                    // draw a string with background...
+                    this.shape = 9;
+                    this.shell.redraw();
+                    return;
+                }
+                if ("Text".equals(scmd))
+                {
+                    // draw a text with background...
+                    this.shape = 11;
+                    this.shell.redraw();
+                    return;
+                }
+            }
+            if ("Transparent".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("String".equals(scmd))
+                {
+                    // draw a string without background...
+                    this.shape = 10;
+                    this.shell.redraw();
+                    return;
+                }
+                if ("Text".equals(scmd))
+                {
+                    // draw a text without background...
+                    this.shape = 15;
+                    this.shell.redraw();
+                    return;
+                }
+            }
+            if ("Delimiter".equals(scmd))
+            {
+                // draw a text in multiple lines...
+                this.shape = 12;
+                this.shell.redraw();
+                return;
+            }
+            if ("Tab".equals(scmd))
+            {
+                // draw a text with expanded tabs...
+                this.shape = 13;
+                this.shell.redraw();
+                return;
+            }
+            if ("Mnemonic".equals(scmd))
+            {
+                // draw a text with underlined mnemonic characters...
+                this.shape = 14;
+                this.shell.redraw();
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * paintlistener implementation
+     */
+    public void paintControl(PaintEvent event)
+    {
+        // set the line style & line width
+        event.gc.setLineStyle(this.style);
+        event.gc.setLineWidth(this.width);
+        switch (this.shape)
+        {
+        case 1:
+            // draw an arc
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawArc(this.rect.x, this.rect.y, this.rect.width, this.rect.height, 40, 180);
+            break;
+        case 2:
+            // draw a line
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.drawLine(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
+            break;
+        case 3:
+            // draw an oval
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_GREEN));
+            event.gc.drawOval(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
+            break;
+        case 4:
+            // draw a point
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLACK));
+            event.gc.drawPoint(this.rect.x+(this.rect.width/2), this.rect.y+(this.rect.height/2));
+            break;
+        case 5:
+            // draw a polygon
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_MAGENTA));
+            event.gc.drawPolygon(new int[] {5, 5, 40, 40, 80, 150, 200, 180, 150, 30});
+            break;
+        case 6:
+            // draw a polyline
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_RED));
+            event.gc.drawPolyline(new int[] {5, 5, 40, 40, 80, 150, 200, 180, 150, 30});
+            break;
+        case 7:
+            // draw a rectangle
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_DARK_GREEN));
+            event.gc.drawRectangle(this.rect);
+            break;
+        case 8:
+            // draw a round rectangle
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_DARK_RED));
+            event.gc.drawRoundRectangle(this.rect.x, this.rect.y, this.rect.width, this.rect.height, 15, 15);
+            break;
+        case 9:
+            // draw a string with background...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawString("The text has", 5, 5);
+            event.gc.drawString("cyan background,", 5, 35);
+            event.gc.drawString("blue foreground", 5, 65);
+            break;
+        case 10:
+            // draw a string without background...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawString("Transparent text", 5, 5, true);
+            break;
+        case 11:
+            // draw a text with background...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawText("Text in multiple\nlines\twith\ttabs\ncyan background\nblue foreground", 5, 5);
+            break;
+        case 12:
+            // draw a text in multiple lines...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawText("This\rtext\nhas\nline\ndelimiters", 5, 5, SWT.DRAW_DELIMITER);
+            break;
+        case 13:
+            // draw a text with expanded tabs...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawText("Text\twith\ttabs", 5, 5, SWT.DRAW_TAB);
+            break;
+        case 14:
+            // draw a text with underlined mnemonic characters...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawText("&Te&xt wi&th& mne&mo&nics", 5, 5, SWT.DRAW_MNEMONIC);
+            break;
+        case 15:
+            // draw a text without background...
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawText("Transparent text", 5, 5, SWT.DRAW_TRANSPARENT);
+            break;
+        case 0:
+        default:
+            break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/graphics/GraphicsTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,446 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.graphics;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.graphics.ImageLoader;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the gc (graphics) component
+ * - drawing filled shapes
+ * - drawing focus rectangular
+ * - drawing images
+ * - copying areas
+ */
+public class GraphicsTestMIDlet_02 extends TestBaseMIDlet implements PaintListener
+{
+    /** image instance */
+    private Image img = null;
+    /** loaded image instance */
+    private Image loaded = null;
+    /** screen area */
+    private Rectangle rect;
+    /** shape */
+    private byte shape;
+
+    private ImageLoader iLoader = null;
+
+    private static final String sGIF
+    = "file:///e:/Images/graphs_gif.gif";
+    private static final String sPNG
+    = "file:///e:/Images/graphs_png.png";
+    private static final String sJPG
+    = "file:///e:/Images/graphs_jpg.jpg";
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Graphics 2");
+        this.shell.setBackground(this.display.getSystemColor(SWT.COLOR_WHITE));
+        this.shell.addPaintListener(this);
+
+        // default values
+        this.rect = this.shell.getClientArea();
+        this.rect.x += 5;
+        this.rect.y += 5;
+        this.rect.width -= 11;
+        this.rect.height -= 11;
+        this.shape = 0;
+        this.iLoader = new ImageLoader();
+        // try to initialize the image
+        try
+        {
+            this.img = new Image(this.display, this.getClass().getResourceAsStream("/res/medium.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Image could not be loaded");
+            mb.open();
+            this.img = null;
+        }
+
+        // try to initialize the image
+        try
+        {
+            this.loaded = new Image(this.display, this.iLoader.load(this.getClass().getResourceAsStream("/res/medium.jpg"))[0]);
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Image could not be loaded");
+            mb.open();
+            this.loaded = null;
+        }
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "filled shape" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Filled Shape");
+        item.setMenu(menu);
+        // "arc" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Arc");
+        item.addSelectionListener(this);
+        // "gradient rectangle" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Gradient Rectangle");
+        item.addSelectionListener(this);
+        // "oval" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Oval");
+        item.addSelectionListener(this);
+        // "polygon" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Polygon");
+        item.addSelectionListener(this);
+        // "rectangle" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Rectangle");
+        item.addSelectionListener(this);
+        // "round rectangle" menuitem for "filled shape" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Round Rectangle");
+        item.addSelectionListener(this);
+        // "focus rectangular" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Focus Rectangular");
+        item.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "normal" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        item.addSelectionListener(this);
+        // "stretched" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Stretched");
+        item.addSelectionListener(this);
+        // "shrunk" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Shrunk");
+        item.addSelectionListener(this);
+        // "load" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Load jpeg");
+        item.addSelectionListener(this);
+
+        // "copy" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Copy");
+        item.setMenu(menu);
+        // "area" menuitem for "copy" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Area");
+        item.addSelectionListener(this);
+        // "image" menuitem for "copy" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Image");
+        item.addSelectionListener(this);
+
+//      "save" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Save");
+        item.setMenu(menu);
+        // "gif" menuitem for "save" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("GIF");
+        item.addSelectionListener(this);
+        // "png" menuitem for "save" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("PNG");
+        item.addSelectionListener(this);
+        // "jpg" menuitem for "save" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("JPG");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Arc".equals(scmd))
+            {
+                // draw a filled arc...
+                this.shape = 1;
+                this.shell.redraw();
+                return;
+            }
+            if ("Gradient Rectangle".equals(scmd))
+            {
+                // draw a gradient filled rectangle...
+                this.shape = 2;
+                this.shell.redraw();
+                return;
+            }
+            if ("Oval".equals(scmd))
+            {
+                // draw a filled oval...
+                this.shape = 3;
+                this.shell.redraw();
+                return;
+            }
+            if ("Polygon".equals(scmd))
+            {
+                // draw a filled polygon...
+                this.shape = 4;
+                this.shell.redraw();
+                return;
+            }
+            if ("Rectangle".equals(scmd))
+            {
+                // draw a filled rectangle...
+                this.shape = 5;
+                this.shell.redraw();
+                return;
+            }
+            if ("Round Rectangle".equals(scmd))
+            {
+                // draw a filled round rectangle...
+                this.shape = 6;
+                this.shell.redraw();
+                return;
+            }
+            if ("Focus Rectangular".equals(scmd))
+            {
+                // draw a focus rectangle... - ??
+                this.shape = 7;
+                this.shell.redraw();
+                return;
+            }
+            if ("Normal".equals(scmd))
+            {
+                // draw an image...
+                this.shape = 8;
+                this.shell.redraw();
+                return;
+            }
+            if ("Stretched".equals(scmd))
+            {
+                // draw a stretched image...
+                this.shape = 9;
+                this.shell.redraw();
+                return;
+            }
+            if ("Shrunk".equals(scmd))
+            {
+                // draw a shrunk image...
+                this.shape = 10;
+                this.shell.redraw();
+                return;
+            }
+            if ("Load jpeg".equals(scmd))
+            {
+                // draw a shrunk image...
+                this.shape = 13;
+                this.shell.redraw();
+                return;
+            }
+            if ("Area".equals(scmd))
+            {
+                // copy an area to another location...
+                this.shape = 11;
+                this.shell.redraw();
+                return;
+            }
+            if ("Image".equals(scmd))
+            {
+                // copy an area into an image...
+                this.shape = 12;
+                this.shell.redraw();
+                return;
+            }
+            if ("GIF".equals(scmd))
+            {
+                // copy an area into an image...
+                this.iLoader.save(sGIF,SWT.IMAGE_GIF);
+                return;
+            }
+            if ("PNG".equals(scmd))
+            {
+                // copy an area into an image...
+                // draw a shrunk image...
+                this.shape = 14;
+                this.shell.redraw();
+                return;
+            }
+            if ("JPG".equals(scmd))
+            {
+                // copy an area into an image...
+                this.iLoader.save(sJPG,SWT.IMAGE_JPEG);
+                return;
+            }
+        }
+        else if (event.widget == this.cmdExit && this.img != null && !this.img.isDisposed())
+            // dispose the image before exit
+            this.img.dispose();
+        super.widgetSelected(event);
+    }
+
+    /**
+     * paintlistener implementation
+     */
+    public void paintControl(PaintEvent event)
+    {
+        switch (this.shape)
+        {
+        case 1:
+            // draw a filled arc
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_GREEN));
+            event.gc.fillArc(this.rect.x, this.rect.y, this.rect.width, this.rect.height, 40, 180);
+            break;
+        case 2:
+            // draw a gradient filled rectangle
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_RED));
+            event.gc.fillGradientRectangle(this.rect.x, this.rect.y, this.rect.width, this.rect.height, true);
+            break;
+        case 3:
+            // draw a filled oval
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_YELLOW));
+            event.gc.fillOval(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
+            break;
+        case 4:
+            // draw a filled polygon
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.fillPolygon(new int[] {5, 5, 40, 40, 80, 150, 200, 180, 150, 30});
+            break;
+        case 5:
+            // draw a filled rectangle
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.fillRectangle(this.rect);
+            break;
+        case 6:
+            // draw a filled round rectangle
+            event.gc.setBackground(this.display.getSystemColor(SWT.COLOR_MAGENTA));
+            event.gc.fillRoundRectangle(this.rect.x, this.rect.y, this.rect.width, this.rect.height, 15, 15);
+            break;
+        case 7:
+            // draw a focus rectangle - ??
+            event.gc.drawRectangle(20, 20, 100, 100);
+            event.gc.drawFocus(20, 20, 100, 100);
+            break;
+        case 8:
+            // draw an image
+            if (this.img != null && !this.img.isDisposed())
+                event.gc.drawImage(this.img, this.rect.x, this.rect.y);
+            break;
+        case 9:
+            // draw a stretched image
+            if (this.img != null && !this.img.isDisposed())
+                event.gc.drawImage(this.img, 0, 0, 100, 100, this.rect.x, this.rect.y, this.rect.width, this.rect.height);
+            break;
+        case 10:
+            // draw a shrunk image
+            if (this.img != null && !this.img.isDisposed())
+                event.gc.drawImage(this.img, 0, 0, 100, 100, this.rect.x, this.rect.y, 50, 50);
+            break;
+        case 11:
+            // copy an area to another location...
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_RED));
+            event.gc.drawRectangle(5, 5, 30, 30);
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_GREEN));
+            event.gc.drawLine(5, 5, 35, 35);
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+            event.gc.drawLine(35, 5, 5, 35);
+            event.gc.copyArea(5, 5, 30, 30, 5, 45);
+
+            break;
+        case 12:
+            // copy an area into an image...
+
+            Image imgcpy = new Image(this.display, 31, 31);
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLACK));
+            event.gc.drawRectangle(5, 5, 30, 30);
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_YELLOW));
+            event.gc.drawLine(5, 5, 35, 35);
+            event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_CYAN));
+            event.gc.drawLine(35, 5, 5, 35);
+            event.gc.copyArea(imgcpy, 5, 5);
+            event.gc.drawImage(imgcpy, 5, 45);
+            imgcpy.dispose();
+            break;
+        case 13:
+            // draw a loaded image
+            if (this.loaded != null && !this.loaded.isDisposed())
+                event.gc.drawImage(this.loaded, 0, 0, 100, 100, this.rect.x, this.rect.y, 50, 50);
+            break;
+        case 14:
+            // draw a loaded image
+            try
+            {
+                if (this.loaded != null && !this.loaded.isDisposed())
+                {
+                    // copy an area into an image...
+                    event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_RED));
+                    event.gc.drawRectangle(5, 5, 30, 30);
+                    event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_GREEN));
+                    event.gc.drawLine(5, 5, 35, 35);
+                    event.gc.setForeground(this.display.getSystemColor(SWT.COLOR_BLUE));
+                    event.gc.drawLine(35, 5, 5, 35);
+                    Image imgcopy = new Image(this.display, this.rect);
+                    event.gc.copyArea(imgcopy, this.rect.height, this.rect.width);
+                    this.iLoader.data = null;
+                    this.iLoader.data[0] = imgcopy.getImageData();
+                    this.iLoader.save(sPNG,SWT.IMAGE_PNG);
+                }
+            }
+            catch (Exception ex)
+            {
+                // show a messagebox about the exception
+                MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                mb.setText("Exception");
+                mb.setMessage(ex.getMessage());
+                mb.open();
+
+            }
+
+            break;
+        case 0:
+        default:
+            break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/GraphicsTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="HyperlinkTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="HyperlinkTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.hyperlink.HyperlinkTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="HyperlinkTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/src/com/nokia/test/java/eswt/hyperlink/HyperlinkTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* 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.test.java.eswt.hyperlink;
+
+
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import org.eclipse.ercp.swt.mobile.HyperLink;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class HyperlinkTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /**  push text button */
+    private HyperLink url = null;
+    /**  check button */
+    private HyperLink email = null;
+    /** radio button */
+    private HyperLink phone = null;
+
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("HyperLink Test");
+        this.shell.setLayout(new GridLayout());
+
+        // HyperLink url
+        this.url = new HyperLink(this.shell, SWT.BORDER, HyperLink.URL);
+        this.url.setText("www.google.com");
+        this.url.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // HyperLink url
+        this.email = new HyperLink(this.shell, SWT.BORDER, HyperLink.EMAIL);
+        this.email.setText("some.body@somewhere.com");
+        this.email.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // HyperLink url
+        this.phone = new HyperLink(this.shell, SWT.BORDER, HyperLink.PHONE);
+        this.phone.setText("+358504804394");
+        this.phone.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // HyperLink no border url
+        this.url = new HyperLink(this.shell, SWT.RIGHT, HyperLink.URL);
+        this.url.setText("URL-no border");
+        this.url.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // HyperLink no border email
+        this.email = new HyperLink(this.shell, SWT.CENTER, HyperLink.EMAIL);
+        this.email.setText("noborderEMAIL");
+        this.email.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // HyperLink no border email
+        this.phone = new HyperLink(this.shell, SWT.LEFT, HyperLink.PHONE);
+        this.phone.setText("Phone_No_Border");
+        this.phone.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+
+        // "change text" menuitem
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Change Text");
+        item.addSelectionListener(this);
+
+        //"set long text" menuitem
+
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Set Long Text");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * Return currently focused HyperLink.
+     * @return focused HyperLink
+     */
+    private HyperLink getFocusedHyperLink()
+    {
+        HyperLink result = null;
+
+        Control[] links = this.shell.getChildren();
+        for (int i=0; i<links.length; i++)
+        {
+            if (links[i].isFocusControl())
+            {
+                result = (HyperLink)links[i];
+                break;
+            }
+        }
+
+        return result;
+    }
+
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem)event.widget).getText();
+
+
+            if ("Change Text".equals(scmd))
+            {
+                HyperLink focused = this.getFocusedHyperLink();
+                // query dialog for new label text
+                QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+                dlg.setPromptText("Enter text:", focused.getText());
+                dlg.setMinimum(1);
+                dlg.setMaximum(50);
+                String txt = dlg.open();
+                if (txt != null)
+                    focused.setText(txt);
+                return;
+            }
+            if ("Set Long Text".equals(scmd))
+            {
+                HyperLink focused = this.getFocusedHyperLink();
+                focused.setText("This is a very long text that should go to several rows. Let us see how it behaves!"+
+                                "So, what will happen? It is interesting to see.");
+                return;
+            }
+
+        }
+        else if (event.widget == this.cmdExit)
+        {
+
+        }
+        super.widgetSelected(event);
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/HyperlinkTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LabelTestMidletSuite/build.xml	Tue May 25 12:34:19 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: 
+#
+-->
+
+<project name="LabelTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="LabelTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.label.LabelTestMIDlet_01"/>
+    <property name="midlet2.name" value="LabelTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.label.LabelTestMIDlet_02"/>
+    <property name="midlet3.name" value="LabelTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.label.LabelTestMIDlet_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="LabelTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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
Binary file javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/BigLabel.jpg has changed
Binary file javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/SmallLabel.jpg has changed
Binary file javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/LabelTestMidletSuite/res/res/phone.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,261 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.label;
+
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the label component
+ * - changing the aligment of label
+ * - changing title & image
+ */
+public class LabelTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** text label */
+    private Label txtLabel = null;
+    /** horizontal separator label */
+    private Label hsepLabel = null;
+    /** vertical separator label */
+    private Label vsepLabel = null;
+    /** image label */
+    private Label imgLabel = null;
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Label 1");
+        this.shell.setLayout(new GridLayout());
+
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/BigLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+
+        // text label
+        this.txtLabel = new Label(this.shell, SWT.BORDER);
+        this.txtLabel.setText("label");
+        this.txtLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // horizontal separator label
+        try
+        {
+            this.hsepLabel = new Label(this.shell, SWT.SEPARATOR | SWT.HORIZONTAL);
+            // vertical separator label
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException(ex.getMessage());
+            this.hsepLabel = null;
+        }
+        try
+        {
+            this.vsepLabel = new Label(this.shell, SWT.SEPARATOR | SWT.VERTICAL);
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException(ex.getMessage());
+            this.vsepLabel = null;
+        }
+        // image label
+        this.imgLabel = new Label(this.shell, SWT.BORDER);
+        this.imgLabel.setImage(this.smallimg);
+        this.imgLabel.setLayoutData(new GridData(SWT.FILL | SWT.FILL, SWT.FILL, true, true));
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "alignment" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Alignment");
+        item.setMenu(menu);
+        // "left" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Left");
+        item.addSelectionListener(this);
+        // "center" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Center");
+        item.addSelectionListener(this);
+        // "right" menuitem for "alignment" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Right");
+        item.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "null" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "small" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Small");
+        item.addSelectionListener(this);
+        // "big" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Big");
+        item.addSelectionListener(this);
+        // "invalid" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Invalid");
+        item.addSelectionListener(this);
+        // "change text" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Change Text");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Left".equals(scmd))
+            {
+                // set left alignment for all labels
+                this.txtLabel.setAlignment(SWT.LEFT);
+                this.imgLabel.setAlignment(SWT.LEFT);
+                return;
+            }
+            if ("Center".equals(scmd))
+            {
+                // set center alignment for all labels
+                this.txtLabel.setAlignment(SWT.CENTER);
+                this.imgLabel.setAlignment(SWT.CENTER);
+                return;
+            }
+            if ("Right".equals(scmd))
+            {
+                // set right alignment for all labels
+                this.txtLabel.setAlignment(SWT.RIGHT);
+                this.imgLabel.setAlignment(SWT.RIGHT);
+                return;
+            }
+            if ("Null".equals(scmd))
+            {
+                // change image label to null
+                this.imgLabel.setImage(null);
+                return;
+            }
+            if ("Small".equals(scmd))
+            {
+                // change image label to small image
+                this.imgLabel.setImage(this.smallimg);
+                return;
+            }
+            if ("Big".equals(scmd))
+            {
+                // change image label to big image
+                this.imgLabel.setImage(this.bigimg);
+                return;
+            }
+
+            if ("Invalid".equals(scmd))
+            {
+                // try to change the image label to an invalid image
+                try
+                {
+                    this.imgLabel.setImage(new Image(this.display, this.getClass().getResourceAsStream("/res/invalid.png")));
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    this.showException(ex.getMessage());
+                }
+                return;
+            }
+
+            if ("Change Text".equals(scmd))
+            {
+                // query dialog for new label text
+                QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+                dlg.setPromptText("Enter text:", this.txtLabel.getText());
+                dlg.setMinimum(1);
+                dlg.setMaximum(50);
+                String txt = dlg.open();
+                if (txt != null)
+                    this.txtLabel.setText(txt);
+                return;
+            }
+        }
+        else if (event.widget == this.cmdExit)
+        {
+            // dispose the images before exit
+            if (this.smallimg != null && !this.smallimg.isDisposed())
+                this.smallimg.dispose();
+            if (this.bigimg != null && !this.bigimg.isDisposed())
+                this.bigimg.dispose();
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,312 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.label;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the label component
+ * - creating separator label
+ */
+public class LabelTestMIDlet_02 extends TestBaseMIDlet
+{
+    /** label instance */
+    private Label seplabel = null;
+    /** menuitems... */
+    private MenuItem mnuHorizontal = null;
+    private MenuItem mnuVertical = null;
+    private MenuItem mnuSIn = null;
+    private MenuItem mnuSOut = null;
+    private MenuItem mnuSNone = null;
+
+    private MenuItem VFillLayout = null;
+    private MenuItem HFillLayout = null;
+    private MenuItem smallLabels = null;
+
+    /** separator type */
+    private int type;
+    /** separator style */
+    private int style;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Label 2");
+        this.shell.setLayout(new FillLayout());
+        // default values
+        this.type = SWT.HORIZONTAL;
+        this.style = SWT.SHADOW_IN;
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "type" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Type");
+        item.setMenu(menu);
+        // "horizontal" menuitem for "type" submenu
+        this.mnuHorizontal = new MenuItem(menu, SWT.PUSH);
+        this.mnuHorizontal.setText("* Horizontal");
+        this.mnuHorizontal.addSelectionListener(this);
+        // "vertical" menuitem for "type" submenu
+        this.mnuVertical = new MenuItem(menu, SWT.PUSH);
+        this.mnuVertical.setText("Vertical");
+        this.mnuVertical.addSelectionListener(this);
+        // "style submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Style");
+        item.setMenu(menu);
+        // "shadow_in" menuitem for "style" submenu
+        this.mnuSIn = new MenuItem(menu, SWT.PUSH);
+        this.mnuSIn.setText("* SHADOW_IN");
+        this.mnuSIn.addSelectionListener(this);
+        // "shadow_out" menuitem for "style" submenu
+        this.mnuSOut = new MenuItem(menu, SWT.PUSH);
+        this.mnuSOut.setText("SHADOW_OUT");
+        this.mnuSOut.addSelectionListener(this);
+        // "shadow_none" menuitem for "style" submenu
+        this.mnuSNone = new MenuItem(menu, SWT.PUSH);
+        this.mnuSNone.setText("SHADOW_NONE");
+        this.mnuSNone.addSelectionListener(this);
+        // "create" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Create");
+        item.addSelectionListener(this);
+
+        this.VFillLayout = new MenuItem(mainmenu, SWT.PUSH);
+        this.VFillLayout.setText("Vertical Fill");
+        this.VFillLayout.addSelectionListener(this);
+
+        this.HFillLayout = new MenuItem(mainmenu, SWT.PUSH);
+        this.HFillLayout.setText("Horizontal Fill");
+        this.HFillLayout.addSelectionListener(this);
+
+        this.smallLabels = new MenuItem(mainmenu, SWT.PUSH);
+        this.smallLabels.setText("Small Separators");
+        this.smallLabels.addSelectionListener(this);
+    }
+
+    /**
+     * update the mark in "type" submenu
+     * @param newtype the selected type
+     * @param item the selected menuitem
+     */
+    private void chgType(int newType, MenuItem item)
+    {
+        if (this.type != newType)
+        {
+            if (this.type == SWT.HORIZONTAL)
+                this.mnuHorizontal.setText("Horizontal");
+            else
+                this.mnuVertical.setText("Vertical");
+            this.type = newType;
+            item.setText("* "+item.getText());
+        }
+    }
+
+    /**
+     * update the mark in "style" submenu
+     * @param newstyle the selected style
+     * @param item the selected menuitem
+     */
+    private void chgStyle(int newStyle, MenuItem item)
+    {
+        if (this.style != newStyle)
+        {
+            switch (this.style)
+            {
+            case SWT.SHADOW_IN:
+                this.mnuSIn.setText("SHADOW_IN");
+                break;
+            case SWT.SHADOW_OUT:
+                this.mnuSOut.setText("SHADOW_OUT");
+                break;
+            case SWT.SHADOW_NONE:
+                this.mnuSNone.setText("SHADOW_NONE");
+                break;
+            default:
+                break;
+            }
+            this.style = newStyle;
+            item.setText("* "+item.getText());
+        }
+    }
+
+
+
+    public void LabelTestSeparatorWithVFillLayout()
+    {
+
+        shell.setLayout(new FillLayout(SWT.VERTICAL));
+
+        Label label1 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);
+        Label label2 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL|SWT.RIGHT);
+        Label label3 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL|SWT.CENTER);
+
+        Label label4 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL|SWT.RIGHT_TO_LEFT);
+        Label label5 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL|SWT.RIGHT|SWT.RIGHT_TO_LEFT);
+        Label label6 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL|SWT.CENTER|SWT.RIGHT_TO_LEFT);
+        shell.layout();
+
+    }
+
+    public void LabelTestSeparatorWithHFillLayout()
+    {
+
+        shell.setLayout(new FillLayout(SWT.HORIZONTAL));
+
+        Label label1 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL);
+        Label label2 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL|SWT.DOWN);
+        Label label3 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL|SWT.CENTER);
+
+        Label label4 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL|SWT.RIGHT_TO_LEFT);
+        Label label5 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL|SWT.DOWN|SWT.RIGHT_TO_LEFT);
+        Label label6 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL|SWT.CENTER|SWT.RIGHT_TO_LEFT);
+        shell.layout();
+
+    }
+
+    public void LabelTestSmallSizeSeparators()
+    {
+
+        Label label1 =  new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);
+        label1.setBounds(10,10,16,8);
+
+        Label label2 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.HORIZONTAL);
+        label2.setBounds(10,30, 5, 7);
+
+        Label label3 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.HORIZONTAL);
+        label3.setBounds(10,50, 1, 8);
+
+        Label label4 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL);
+        label4.setBounds(10,100, 8, 16);
+
+        Label label5 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL);
+        label5.setBounds(40,100, 7, 2);
+
+        Label label6 =  new Label(shell, SWT.BORDER|SWT.SEPARATOR|SWT.VERTICAL);
+        label6.setBounds(70,100, 5, 3);
+
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.mnuHorizontal)
+        {
+            // set the type
+            this.chgType(SWT.HORIZONTAL, this.mnuHorizontal);
+            return;
+        }
+        if (event.widget == this.mnuVertical)
+        {
+            // set the type
+            this.chgType(SWT.VERTICAL, this.mnuVertical);
+            return;
+        }
+        if (event.widget == this.mnuSIn)
+        {
+            // set the style
+            this.chgStyle(SWT.SHADOW_IN, this.mnuSIn);
+            return;
+        }
+        if (event.widget == this.mnuSOut)
+        {
+            // set the style
+            this.chgStyle(SWT.SHADOW_OUT, this.mnuSOut);
+            return;
+        }
+        if (event.widget == this.mnuSNone)
+        {
+            // set the style
+            this.chgStyle(SWT.SHADOW_NONE, this.mnuSNone);
+            return;
+        }
+        if (event.widget == this.VFillLayout)
+        {
+            // set the labels
+            this.LabelTestSeparatorWithVFillLayout();
+            return;
+        }
+        if (event.widget == this.HFillLayout)
+        {
+            // set the labels
+            this.LabelTestSeparatorWithHFillLayout();
+            return;
+        }
+        if (event.widget == this.smallLabels)
+        {
+            // set the labels
+            this.LabelTestSmallSizeSeparators();
+            return;
+        }
+        if (event.widget instanceof MenuItem && "Create".equals(((MenuItem) event.widget).getText()))
+        {
+            try
+            {
+                // create a label with the selected type & style
+                if (this.seplabel != null && !this.seplabel.isDisposed())
+                    this.seplabel.dispose();
+            }
+            catch (Exception ex)
+            {
+                this.showException(ex.getMessage());
+            }
+            try
+            {
+                this.seplabel = new Label(this.shell, SWT.SEPARATOR | this.type | this.style);
+            }
+            catch (Exception ex)
+            {
+                this.showException(ex.getMessage());
+
+            }
+
+            this.shell.layout();
+            return;
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/label/LabelTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.label;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.MobileShell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the label component
+ * - adding label to different parents
+ */
+public class LabelTestMIDlet_03 extends TestBaseMIDlet
+{
+    /** image instance */
+    private Image img = null;
+    /** mobileshell instance */
+    private MobileShell mshell = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Label 3");
+        this.shell.setLayout(new GridLayout());
+
+        // try to initialize the image
+        try
+        {
+            this.img = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Image could not be loaded");
+            mb.open();
+            this.img = null;
+        }
+
+        // create text label on the shell
+        Label label = new Label(this.shell, SWT.BORDER);
+        label.setText("Label on Shell");
+        label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
+        // create image label on the shell
+        label = new Label(this.shell, SWT.BORDER);
+        label.setImage(this.img);
+        label.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, true));
+        // "switch" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Switch");
+        cmd.addSelectionListener(this);
+
+        // create the mobileshell with the labels
+        this.mshell = new MobileShell(this.display, SWT.SHELL_TRIM, MobileShell.SMALL_STATUS_PANE);
+        this.mshell.setText("Label Test 3 - Mobile Shell");
+        this.mshell.setLayout(new GridLayout());
+        // create image label on the mobileshell
+        label = new Label(this.mshell, SWT.BORDER);
+        label.setImage(this.img);
+        label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
+        // create text label on the mobileshell
+        label = new Label(this.mshell, SWT.BORDER);
+        label.setText("Label on MobileShell");
+        label.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, true));
+        // "switch" left softkey command
+        cmd = new Command(this.mshell, Command.SELECT, 0);
+        cmd.setText("Switch");
+        cmd.addSelectionListener(this);
+        // "exit" right softkey command
+        cmd = new Command(this.mshell, Command.EXIT, 0);
+        cmd.setText("Exit");
+        cmd.addSelectionListener(this);
+        this.mshell.pack();
+        this.mshell.open();
+        this.mshell.setVisible(false);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command && "Switch".equals(((Command) event.widget).getText()))
+        {
+            // switch between shell & mobileshell...
+            this.mshell.setVisible(!this.mshell.isVisible());
+            this.shell.setVisible(!this.shell.isVisible());
+            return;
+        }
+        else if (event.widget == this.cmdExit && this.img != null && !this.img.isDisposed())
+            // dispose the images before exit
+            this.img.dispose();
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LabelTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,79 @@
+<!--
+#
+# 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="LayoutTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="LayoutTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.layout.LayoutTestMIDlet_01"/>
+    <property name="midlet2.name" value="LayoutTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.layout.LayoutTestMIDlet_02"/>
+    <property name="midlet3.name" value="LayoutTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.layout.LayoutTestMIDlet_03"/>
+    <property name="midlet4.name" value="LayoutTestMIDlet_04"/>
+    <property name="midlet4.icon.name" value="icon.png"/>
+    <property name="midlet4.package.name" value="com.nokia.test.java.eswt.layout.LayoutTestMIDlet_04"/>
+    <property name="midlet5.name" value="LayoutTestMIDlet_05"/>
+    <property name="midlet5.icon.name" value="icon.png"/>
+    <property name="midlet5.package.name" value="com.nokia.test.java.eswt.layout.LayoutTestMIDlet_05"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="LayoutTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+            <midlet name="${midlet4.name}" icon="${midlet4.icon.name}" class="${midlet4.package.name}" />
+            <midlet name="${midlet5.name}" icon="${midlet5.icon.name}" class="${midlet5.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/FormDataConfigDialog.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,373 @@
+/*
+* 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.test.java.eswt.layout;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * A modal dialog that is used to configure a FormData.
+ */
+public class FormDataConfigDialog implements SelectionListener
+{
+    /** parent shell*/
+    protected Shell parent = null;
+    /** The dialog's shell */
+    protected Shell shell = null;
+
+    /** GridData object */
+    protected FormData data = null;
+
+    /** Fonts */
+    protected Font titleFont = null;
+    protected Font valueFont = null;
+
+    /** Success flag */
+    protected boolean success = false;
+
+    /** Config fields */
+    protected Label widthInfo   = null;
+    protected Label heightInfo  = null;
+
+    protected Label attTopInfo      = null;
+    protected Label attBottomInfo   = null;
+    protected Label attLeftInfo     = null;
+    protected Label attRightInfo    = null;
+
+    /** commands */
+    protected Command cmdSetWIDTH   = null;
+    protected Command cmdSetHEIGHT  = null;
+
+    protected Command cmdAttachTOP      = null;
+    protected Command cmdAttachBOTTOM   = null;
+    protected Command cmdAttachLEFT     = null;
+    protected Command cmdAttachRIGHT    = null;
+
+    /** Clear, Done and Cancel commands */
+    private Command cmdReset    = null;
+    private Command cmdDone     = null;
+    private Command cmdCancel   = null;
+
+    /**
+     * Constructor.
+     * @param parent A parent shell
+     */
+    public FormDataConfigDialog(Shell parent)
+    {
+        this.parent = parent;
+        this.shell = new Shell(this.parent, SWT.DIALOG_TRIM);
+        this.shell.setText("Form Data Config");
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // create commands
+        this.cmdCancel = new Command(this.shell, Command.CANCEL, 0);
+        this.cmdCancel.setText("Cancel");
+        this.cmdCancel.addSelectionListener(this);
+
+        this.cmdDone = new Command(this.shell, Command.OK, 0);
+        this.cmdDone.setText("Done");
+        this.cmdDone.addSelectionListener(this);
+
+        this.cmdReset = new Command(this.shell, Command.GENERAL, 1);
+        this.cmdReset.setText("Reset");
+        this.cmdReset.addSelectionListener(this);
+
+        // Set commands
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdSet.setText("Set");
+
+        Command cmdAttach = new Command(cmdSet, Command.COMMANDGROUP, 2);
+        cmdAttach.setText("Attach");
+
+        this.cmdAttachTOP = new Command(cmdAttach, Command.SELECT, 3);
+        this.cmdAttachTOP.setText("top");
+        this.cmdAttachTOP.addSelectionListener(this);
+
+        this.cmdAttachBOTTOM = new Command(cmdAttach, Command.SELECT, 2);
+        this.cmdAttachBOTTOM.setText("bottom");
+        this.cmdAttachBOTTOM.addSelectionListener(this);
+
+        this.cmdAttachLEFT = new Command(cmdAttach, Command.SELECT, 1);
+        this.cmdAttachLEFT.setText("left");
+        this.cmdAttachLEFT.addSelectionListener(this);
+
+        this.cmdAttachRIGHT = new Command(cmdAttach, Command.SELECT, 0);
+        this.cmdAttachRIGHT.setText("right");
+        this.cmdAttachRIGHT.addSelectionListener(this);
+
+        this.cmdSetWIDTH = new Command(cmdSet, Command.SELECT, 1);
+        this.cmdSetWIDTH.setText("Width");
+        this.cmdSetWIDTH.addSelectionListener(this);
+
+        this.cmdSetHEIGHT = new Command(cmdSet, Command.SELECT, 0);
+        this.cmdSetHEIGHT.setText("Height");
+        this.cmdSetHEIGHT.addSelectionListener(this);
+    }
+
+    /**
+     * Open the dialog.
+     * @return return created GridData or null if a user
+     * has canceled the dialog
+     */
+    public FormData open()
+    {
+        // set font
+        FontData[] fdata = this.parent.getFont().getFontData();
+        Font font = new Font(this.parent.getDisplay(), fdata);
+        this.shell.setFont(font);
+
+        // create custom fonts
+        this.titleFont = new Font(this.parent.getDisplay(),
+                                  new FontData("Arial", 6, SWT.ITALIC));
+        this.valueFont = new Font(this.parent.getDisplay(),
+                                  new FontData("Arial", 6, SWT.NORMAL));
+
+        // cleaning
+        this.reset();
+
+        // open the shell
+        this.shell.setBounds(this.parent.getBounds());
+        this.shell.layout();
+        this.shell.open();
+
+        // event loop
+        while (!this.shell.isDisposed())
+            if (!this.shell.getDisplay().readAndDispatch())
+                this.shell.getDisplay().sleep();
+
+        // dispose fonts
+        font.dispose();
+        this.titleFont.dispose();
+        this.valueFont.dispose();
+
+        if (!this.success)  //user has canceled the dialog
+        {
+            return null;
+        }
+        return this.data;
+    }
+
+    /**
+     *
+     */
+    protected void reset()
+    {
+        // clean the shell
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        // create FormData
+        this.data = new FormData();
+
+        // create config info fields
+        this.widthInfo =
+            this.createInfoLabel("Width: ", String.valueOf(this.data.width));
+        this.heightInfo =
+            this.createInfoLabel("Height: ", String.valueOf(this.data.width));
+        this.attTopInfo =
+            this.createInfoLabel("Top attachment: ", "none");
+        this.attBottomInfo =
+            this.createInfoLabel("Bottom attachment: ", "none");
+        this.attLeftInfo =
+            this.createInfoLabel("Left attachment: ", "none");
+        this.attRightInfo =
+            this.createInfoLabel("Right attachment: ", "none");
+
+        // update
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Create a Label control with preceding title.
+     * @param title a String to be used as a title
+     * @param value a value for the info label
+     * @return created Label control
+     */
+    protected Label createInfoLabel(String title, String value)
+    {
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText(title);
+        label.setFont(this.titleFont);
+        Label info = new Label(this.shell, SWT.NONE);
+        info.setText(value);
+        info.setFont(this.valueFont);
+
+        this.shell.layout();
+        return info;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent arg0)
+    {
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        // Set commands
+        if (e.widget == this.cmdSetWIDTH)
+        {
+            Integer value = this.numQuery("Width:", this.data.width);
+            if (value != null)
+            {
+                this.data.width = value.intValue();
+                // update info label
+                this.widthInfo.setText(String.valueOf(value));
+                this.widthInfo.pack();
+            }
+            return;
+        }
+        if (e.widget == this.cmdSetHEIGHT)
+        {
+            Integer value = this.numQuery("Height:", this.data.height);
+            if (value != null)
+            {
+                this.data.height = value.intValue();
+                // update info label
+                this.heightInfo.setText(String.valueOf(value));
+                this.heightInfo.pack();
+            }
+            return;
+        }
+
+        // attach commands
+        if (e.widget == this.cmdAttachTOP)
+        {
+            this.data.top = this.getAttachment(this.data.top);
+            // update info label
+            this.attTopInfo.setText("set");
+            return;
+        }
+        if (e.widget == this.cmdAttachBOTTOM)
+        {
+            this.data.bottom = this.getAttachment(this.data.bottom);
+            // update info label
+            this.attBottomInfo.setText("set");
+            return;
+        }
+        if (e.widget == this.cmdAttachLEFT)
+        {
+            this.data.left = this.getAttachment(this.data.left);
+            // update info label
+            this.attLeftInfo.setText("set");
+            return;
+        }
+        if (e.widget == this.cmdAttachRIGHT)
+        {
+            this.data.right = this.getAttachment(this.data.right);
+            // update info label
+            this.attRightInfo.setText("set");
+            return;
+        }
+
+        // Clear command
+        if (e.widget == this.cmdReset)
+        {
+            this.reset();
+            return;
+        }
+
+        // Done command
+        if (e.widget == this.cmdDone)
+        {
+            this.success = true;
+            this.shell.dispose();
+            return;
+        }
+
+        // Cancel command
+        if (e.widget == this.cmdCancel)
+        {
+            this.success = false;
+            this.shell.dispose();
+            return;
+        }
+    }
+
+    /**
+     *
+     * @param msg
+     * @param value
+     * @return
+     */
+    protected Integer numQuery(String msg, int value)
+    {
+        // workaround a bug in QueryDialog
+        if (value < 0)
+        {
+            value = 0; //otherwise QueryDialog throws invalid argument exception
+        }
+        Integer result = null;
+        QueryDialog dlg =
+            new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+        dlg.setMaximum(3);
+        dlg.setPromptText(msg, String.valueOf(value));
+        String res = dlg.open();
+        if (res != null)
+        {
+            result = Integer.valueOf(res);
+        }
+
+        return result;
+    }
+
+    /**
+     *
+     */
+    protected FormAttachment getAttachment(FormAttachment attachment)
+    {
+        if (attachment == null)
+        {
+            attachment = new FormAttachment(0, 0);
+        }
+
+        Integer numerator =
+            this.numQuery("numerator (%):", attachment.numerator);
+        if (numerator != null)
+        {
+            attachment.numerator = numerator.intValue();
+        }
+
+        Integer offset =
+            this.numQuery("offset:", attachment.offset);
+        if (offset != null)
+        {
+            attachment.offset = offset.intValue();
+        }
+
+        return attachment;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/GridDataConfigDialog.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,635 @@
+/*
+* 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.test.java.eswt.layout;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * A modal dialog that is used to configure a GridData.
+ */
+public class GridDataConfigDialog implements SelectionListener
+{
+    /** parent shell*/
+    private Shell parent = null;
+    /** The dialog's shell */
+    private Shell shell = null;
+
+    /** GridData object */
+    private GridData data = null;
+
+    /** Fonts */
+    private Font titleFont = null;
+    private Font valueFont = null;
+
+    /** Success flag */
+    private boolean success = false;
+
+    /** Config fields */
+    private Label vAlignInfo        = null;
+    private Label hAlignInfo        = null;
+    private Label vGrabInfo         = null;
+    private Label hGrabInfo         = null;
+
+    private ConstrainedText wHintField      = null;
+    private ConstrainedText hHintField      = null;
+    private ConstrainedText vIndentField    = null;
+    private ConstrainedText hIndentField    = null;
+    private ConstrainedText vSpanField      = null;
+    private ConstrainedText hSpanField      = null;
+
+    /** Commands */
+    /** Alignment */
+    private Command cmdAlign_V_TOP      = null;
+    private Command cmdAlign_V_CENTER   = null;
+    private Command cmdAlign_V_BOTTOM   = null;
+    private Command cmdAlign_V_FILL     = null;
+    private Command cmdAlign_H_LEFT     = null;
+    private Command cmdAlign_H_CENTER   = null;
+    private Command cmdAlign_H_RIGHT    = null;
+    private Command cmdAlign_H_FILL     = null;
+    /** Hint */
+    private Command cmdHint_W   = null;
+    private Command cmdHint_H   = null;
+    /** Indent */
+    private Command cmdIndent_V = null;
+    private Command cmdIndent_H = null;
+    /** Span */
+    private Command cmdSpan_V   = null;
+    private Command cmdSpan_H   = null;
+    /** Grab Space */
+    private Command cmdGrabV_TRUE   = null;
+    private Command cmdGrabV_FALSE  = null;
+    private Command cmdGrabH_TRUE   = null;
+    private Command cmdGrabH_FALSE  = null;
+
+    /** Clear, Done and Cancel commands */
+    private Command cmdReset    = null;
+    private Command cmdDone     = null;
+    private Command cmdCancel   = null;
+
+    /**
+     * Constructor.
+     * @param parent A parent shell
+     */
+    public GridDataConfigDialog(Shell parent)
+    {
+        this.parent = parent;
+        this.shell = new Shell(this.parent, SWT.DIALOG_TRIM);
+        this.shell.setText("Grid Data Config");
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // create commands
+        this.cmdCancel = new Command(this.shell, Command.CANCEL, 0);
+        this.cmdCancel.setText("Cancel");
+        this.cmdCancel.addSelectionListener(this);
+
+        this.cmdDone = new Command(this.shell, Command.OK, 0);
+        this.cmdDone.setText("Done");
+        this.cmdDone.addSelectionListener(this);
+
+        this.cmdReset = new Command(this.shell, Command.GENERAL, 1);
+        this.cmdReset.setText("Reset");
+        this.cmdReset.addSelectionListener(this);
+
+        // Set commands
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdSet.setText("Set");
+
+        // grabbing
+        Command cmdGrab = new Command(cmdSet, Command.COMMANDGROUP, 0);
+        cmdGrab.setText("Grab");
+        // horizontal
+        Command cmdGrabH = new Command(cmdGrab, Command.COMMANDGROUP, 0);
+        cmdGrabH.setText("Horizontal");
+        this.cmdGrabH_FALSE = new Command(cmdGrabH, Command.GENERAL, 0);
+        this.cmdGrabH_FALSE.setText("false");
+        this.cmdGrabH_FALSE.addSelectionListener(this);
+        this.cmdGrabH_TRUE = new Command(cmdGrabH, Command.GENERAL, 1);
+        this.cmdGrabH_TRUE.setText("true");
+        this.cmdGrabH_TRUE.addSelectionListener(this);
+        // vertical
+        Command cmdGrabV = new Command(cmdGrab, Command.COMMANDGROUP, 1);
+        cmdGrabV.setText("Vertical");
+        this.cmdGrabV_FALSE = new Command(cmdGrabV, Command.GENERAL, 0);
+        this.cmdGrabV_FALSE.setText("false");
+        this.cmdGrabV_FALSE.addSelectionListener(this);
+        this.cmdGrabV_TRUE = new Command(cmdGrabV, Command.GENERAL, 1);
+        this.cmdGrabV_TRUE.setText("true");
+        this.cmdGrabV_TRUE.addSelectionListener(this);
+
+        // Span
+        Command cmdSpan = new Command(cmdSet, Command.COMMANDGROUP, 1);
+        cmdSpan.setText("Span");
+        this.cmdSpan_H = new Command(cmdSpan, Command.GENERAL, 0);
+        this.cmdSpan_H.setText("Horizontal");
+        this.cmdSpan_H.addSelectionListener(this);
+        this.cmdSpan_V = new Command(cmdSpan, Command.GENERAL, 1);
+        this.cmdSpan_V.setText("Vertical");
+        this.cmdSpan_V.addSelectionListener(this);
+
+        // Indent
+        Command cmdIndent = new Command(cmdSet, Command.COMMANDGROUP, 2);
+        cmdIndent.setText("Indent");
+        this.cmdIndent_H = new Command(cmdIndent, Command.GENERAL, 0);
+        this.cmdIndent_H.setText("Horizontal");
+        this.cmdIndent_H.addSelectionListener(this);
+        this.cmdIndent_V = new Command(cmdIndent, Command.GENERAL, 1);
+        this.cmdIndent_V.setText("Vertical");
+        this.cmdIndent_V.addSelectionListener(this);
+
+        // Hint
+        Command cmdHint = new Command(cmdSet, Command.COMMANDGROUP, 3);
+        cmdHint.setText("Hint");
+        this.cmdHint_H = new Command(cmdHint, Command.GENERAL, 0);
+        this.cmdHint_H.setText("height");
+        this.cmdHint_H.addSelectionListener(this);
+        this.cmdHint_W = new Command(cmdHint, Command.GENERAL, 1);
+        this.cmdHint_W.setText("width");
+        this.cmdHint_W.addSelectionListener(this);
+
+        // Alignment
+        Command cmdAlign = new Command(cmdSet, Command.COMMANDGROUP, 4);
+        cmdAlign.setText("Alignment");
+        // horizontal
+        Command cmdAlign_H = new Command(cmdAlign, Command.COMMANDGROUP, 0);
+        cmdAlign_H.setText("Horizontal");
+        this.cmdAlign_H_FILL = new Command(cmdAlign_H, Command.GENERAL, 0);
+        this.cmdAlign_H_FILL.setText("FILL");
+        this.cmdAlign_H_FILL.addSelectionListener(this);
+        this.cmdAlign_H_RIGHT = new Command(cmdAlign_H, Command.GENERAL, 1);
+        this.cmdAlign_H_RIGHT.setText("RIGHT");
+        this.cmdAlign_H_RIGHT.addSelectionListener(this);
+        this.cmdAlign_H_CENTER = new Command(cmdAlign_H, Command.GENERAL, 2);
+        this.cmdAlign_H_CENTER.setText("CENTER");
+        this.cmdAlign_H_CENTER.addSelectionListener(this);
+        this.cmdAlign_H_LEFT = new Command(cmdAlign_H, Command.GENERAL, 3);
+        this.cmdAlign_H_LEFT.setText("LEFT");
+        this.cmdAlign_H_LEFT.addSelectionListener(this);
+        // vertical
+        Command cmdAlign_V = new Command(cmdAlign, Command.COMMANDGROUP, 1);
+        cmdAlign_V.setText("Vertical");
+        this.cmdAlign_V_FILL = new Command(cmdAlign_V, Command.GENERAL, 0);
+        this.cmdAlign_V_FILL.setText("FILL");
+        this.cmdAlign_V_FILL.addSelectionListener(this);
+        this.cmdAlign_V_BOTTOM = new Command(cmdAlign_V, Command.GENERAL, 1);
+        this.cmdAlign_V_BOTTOM.setText("BOTTOM");
+        this.cmdAlign_V_BOTTOM.addSelectionListener(this);
+        this.cmdAlign_V_CENTER = new Command(cmdAlign_V, Command.GENERAL, 2);
+        this.cmdAlign_V_CENTER.setText("CENTER");
+        this.cmdAlign_V_CENTER.addSelectionListener(this);
+        this.cmdAlign_V_TOP = new Command(cmdAlign_V, Command.GENERAL, 3);
+        this.cmdAlign_V_TOP.setText("TOP");
+        this.cmdAlign_V_TOP.addSelectionListener(this);
+    }
+
+    /**
+     * Open the dialog.
+     * @return return created GridData or null if a user
+     * has canceled the dialog
+     */
+    public GridData open()
+    {
+        // set font
+        FontData[] fdata = this.parent.getFont().getFontData();
+        Font font = new Font(this.parent.getDisplay(), fdata);
+        this.shell.setFont(font);
+        // create GridData
+        this.data = new GridData();
+
+        // create custom fonts
+        this.titleFont = new Font(this.parent.getDisplay(),
+                                  new FontData("Arial", 6, SWT.ITALIC));
+        this.valueFont = new Font(this.parent.getDisplay(),
+                                  new FontData("Arial", 6, SWT.NORMAL));
+
+        // open the shell
+        this.shell.setBounds(this.parent.getBounds());
+        this.shell.layout();
+        this.shell.open();
+
+        // event loop
+        while (!this.shell.isDisposed())
+            if (!this.shell.getDisplay().readAndDispatch())
+                this.shell.getDisplay().sleep();
+
+        // dispose fonts
+        font.dispose();
+        this.titleFont.dispose();
+        this.valueFont.dispose();
+
+        if (!this.success)  //user has canceled the dialog
+        {
+            return null;
+        }
+
+        return this.data;
+    }
+
+    /**
+     * Create a Label control with preceding title.
+     * @param title a String to be used as a title
+     * @param value a value for the info label
+     * @return created Label control
+     */
+    private Label createInfoLabel(String title, String value)
+    {
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText(title);
+        label.setFont(this.titleFont);
+        Label info = new Label(this.shell, SWT.NONE);
+        info.setText(value);
+        info.setFont(this.valueFont);
+
+        this.shell.layout();
+        return info;
+    }
+
+    /**
+     * Create numerical field with preceding title label and default value.
+     * @param title a String for a title
+     * @param value default value
+     * @return created control
+     */
+    private ConstrainedText createNumField(String title, int value)
+    {
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText(title);
+        label.setFont(this.titleFont);
+        ConstrainedText field =
+            new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        field.setText(String.valueOf(value));
+        field.setFont(this.valueFont);
+
+        this.shell.layout();
+        return field;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        // Setting commands
+        // horizontalAlignment
+        if (e.widget == this.cmdAlign_H_LEFT)
+        {
+            if (this.hAlignInfo == null || this.hAlignInfo.isDisposed())
+            {
+                this.hAlignInfo =
+                    this.createInfoLabel("horizontalAlignment: ", "LEFT");
+            }
+            else
+            {
+                this.hAlignInfo.setText("LEFT");
+                this.hAlignInfo.pack();
+            }
+            this.data.horizontalAlignment = SWT.LEFT;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_H_CENTER)
+        {
+            if (this.hAlignInfo == null || this.hAlignInfo.isDisposed())
+            {
+                this.hAlignInfo =
+                    this.createInfoLabel("horizontalAlignment: ", "CENTER");
+            }
+            else
+            {
+                this.hAlignInfo.setText("CENTER");
+                this.hAlignInfo.pack();
+            }
+            this.data.horizontalAlignment = SWT.CENTER;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_H_RIGHT)
+        {
+            if (this.hAlignInfo == null || this.hAlignInfo.isDisposed())
+            {
+                this.hAlignInfo =
+                    this.createInfoLabel("horizontalAlignment: ", "RIGHT");
+            }
+            else
+            {
+                this.hAlignInfo.setText("RIGHT");
+                this.hAlignInfo.pack();
+            }
+            this.data.horizontalAlignment = SWT.RIGHT;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_H_FILL)
+        {
+            if (this.hAlignInfo == null || this.hAlignInfo.isDisposed())
+            {
+                this.hAlignInfo =
+                    this.createInfoLabel("horizontalAlignment: ", "FILL");
+            }
+            else
+            {
+                this.hAlignInfo.setText("FILL");
+                this.hAlignInfo.pack();
+            }
+            this.data.horizontalAlignment = SWT.FILL;
+            this.shell.update();
+            return;
+        }
+        // verticalAlignment
+        if (e.widget == this.cmdAlign_V_TOP)
+        {
+            if (this.vAlignInfo == null || this.vAlignInfo.isDisposed())
+            {
+                this.vAlignInfo =
+                    this.createInfoLabel("verticalAlignment: ", "TOP");
+            }
+            else
+            {
+                this.vAlignInfo.setText("TOP");
+                this.vAlignInfo.pack();
+            }
+            this.data.verticalAlignment = SWT.TOP;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_V_CENTER)
+        {
+            if (this.vAlignInfo == null || this.vAlignInfo.isDisposed())
+            {
+                this.vAlignInfo =
+                    this.createInfoLabel("verticalAlignment: ", "CENTER");
+            }
+            else
+            {
+                this.vAlignInfo.setText("CENTER");
+                this.vAlignInfo.pack();
+            }
+            this.data.verticalAlignment = SWT.CENTER;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_V_BOTTOM)
+        {
+            if (this.vAlignInfo == null || this.vAlignInfo.isDisposed())
+            {
+                this.vAlignInfo =
+                    this.createInfoLabel("verticalAlignment: ", "BOTTOM");
+            }
+            else
+            {
+                this.vAlignInfo.setText("BOTTOM");
+                this.vAlignInfo.pack();
+            }
+            this.data.verticalAlignment = SWT.BOTTOM;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdAlign_V_FILL)
+        {
+            if (this.vAlignInfo == null || this.vAlignInfo.isDisposed())
+            {
+                this.vAlignInfo =
+                    this.createInfoLabel("verticalAlignment: ", "FILL");
+            }
+            else
+            {
+                this.vAlignInfo.setText("FILL");
+                this.vAlignInfo.pack();
+            }
+            this.data.verticalAlignment = SWT.FILL;
+            this.shell.update();
+            return;
+        }
+        // hint
+        if (e.widget == this.cmdHint_W)
+        {
+            if (this.wHintField == null || this.wHintField.isDisposed())
+            {
+                this.wHintField =
+                    this.createNumField("widthHint: ", this.data.widthHint);
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdHint_H)
+        {
+            if (this.hHintField == null || this.hHintField.isDisposed())
+            {
+                this.hHintField =
+                    this.createNumField("heightHint: ", this.data.heightHint);
+                this.shell.update();
+            }
+            return;
+        }
+        // indent
+        if (e.widget == this.cmdIndent_V)
+        {
+            if (this.vIndentField == null || this.vIndentField.isDisposed())
+            {
+                this.vIndentField =
+                    this.createNumField("verticalIndent: ", this.data.verticalIndent);
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdIndent_H)
+        {
+            if (this.hIndentField == null || this.hIndentField.isDisposed())
+            {
+                this.hIndentField =
+                    this.createNumField("horizontalIndent: ", this.data.horizontalIndent);
+                this.shell.update();
+            }
+            return;
+        }
+        // span
+        if (e.widget == this.cmdSpan_V)
+        {
+            if (this.vSpanField == null || this.vSpanField.isDisposed())
+            {
+                this.vSpanField =
+                    this.createNumField("verticalSpan: ", this.data.verticalSpan);
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdSpan_H)
+        {
+            if (this.hSpanField == null || this.hSpanField.isDisposed())
+            {
+                this.hSpanField =
+                    this.createNumField("horizontalSpan: ", this.data.horizontalSpan);
+                this.shell.update();
+            }
+            return;
+        }
+        // grab
+        // vertical
+        if (e.widget == this.cmdGrabV_TRUE)
+        {
+            if (this.vGrabInfo == null || this.vGrabInfo.isDisposed())
+            {
+                this.vGrabInfo =
+                    this.createInfoLabel("grabExcessVerticalSpace: ", "true");
+            }
+            else
+            {
+                this.vGrabInfo.setText("true");
+                this.vGrabInfo.pack();
+            }
+            this.data.grabExcessVerticalSpace = true;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdGrabV_FALSE)
+        {
+            if (this.vGrabInfo == null || this.vGrabInfo.isDisposed())
+            {
+                this.vGrabInfo =
+                    this.createInfoLabel("grabExcessVerticalSpace: ", "false");
+            }
+            else
+            {
+                this.vGrabInfo.setText("false");
+                this.vGrabInfo.pack();
+            }
+            this.data.grabExcessVerticalSpace = false;
+            this.shell.update();
+            return;
+        }
+        // horizontal
+        if (e.widget == this.cmdGrabH_TRUE)
+        {
+            if (this.hGrabInfo == null || this.hGrabInfo.isDisposed())
+            {
+                this.hGrabInfo =
+                    this.createInfoLabel("grabExcessHorizontalSpace: ", "true");
+            }
+            else
+            {
+                this.hGrabInfo.setText("true");
+                this.hGrabInfo.pack();
+            }
+            this.data.grabExcessHorizontalSpace = true;
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdGrabH_FALSE)
+        {
+            if (this.hGrabInfo == null || this.hGrabInfo.isDisposed())
+            {
+                this.hGrabInfo =
+                    this.createInfoLabel("grabExcessHorizontalSpace: ", "false");
+            }
+            else
+            {
+                this.hGrabInfo.setText("false");
+                this.hGrabInfo.pack();
+            }
+            this.data.grabExcessHorizontalSpace = false;
+            this.shell.update();
+            return;
+        }
+
+        // Clear command
+        if (e.widget == this.cmdReset)
+        {
+            this.data = new GridData();
+
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+                controls[i].dispose();
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // Done command
+        if (e.widget == this.cmdDone)
+        {
+            this.success = true;
+            this.adjustSettings();
+            this.shell.dispose();
+            return;
+        }
+
+        // Cancel command
+        if (e.widget == this.cmdCancel)
+        {
+            this.success = false;
+            this.shell.dispose();
+            return;
+        }
+    }
+
+    /**
+     * Adjust numerical settings to the current GridData.
+     */
+    private void adjustSettings()
+    {
+        // width\height hint
+        if (this.wHintField != null && !this.wHintField.isDisposed())
+        {
+            this.data.widthHint = Integer.parseInt(this.wHintField.getText());
+        }
+        if (this.hHintField != null && !this.hHintField.isDisposed())
+        {
+            this.data.heightHint = Integer.parseInt(this.hHintField.getText());
+        }
+        // indent
+        if (this.vIndentField != null && !this.vIndentField.isDisposed())
+        {
+            this.data.verticalIndent =
+                Integer.parseInt(this.vIndentField.getText());
+        }
+        if (this.hIndentField != null && !this.hIndentField.isDisposed())
+        {
+            this.data.horizontalIndent =
+                Integer.parseInt(this.hIndentField.getText());
+        }
+        // span
+        if (this.vSpanField != null && !this.vSpanField.isDisposed())
+        {
+            this.data.verticalSpan =
+                Integer.parseInt(this.vSpanField.getText());
+        }
+        if (this.hSpanField != null && !this.hSpanField.isDisposed())
+        {
+            this.data.horizontalSpan =
+                Integer.parseInt(this.hSpanField.getText());
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent e)
+    {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,247 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.layout;
+
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class LayoutTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** Commands */
+    /** Add/Remove control commands */
+    private Command cmdAddLABEL         = null;
+    private Command cmdAddTEXT          = null;
+    private Command cmdAddDATE          = null;
+
+    private Command cmdRemove           = null;
+    private Command cmdRemoveCURRENT    = null;
+    private Command cmdRemoveFIRST      = null;
+    private Command cmdRemoveLAST       = null;
+    private Command cmdRemoveALL        = null;
+
+    /** Layout commands */
+    private Command cmdFillLayout   = null;
+    private Command cmdRowLayout    = null;
+    private Command cmdGridLayout   = null;
+
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Layout Test");
+        this.shell.setLayout(new RowLayout());
+
+        // create commands
+        // Control commands
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdControl.setText("Control");
+
+        Command cmdAdd = new Command(cmdControl, Command.COMMANDGROUP, 1);
+        cmdAdd.setText("Add");
+
+        this.cmdAddLABEL = new Command(cmdAdd, Command.GENERAL, 2);
+        this.cmdAddLABEL.setText("Label");
+        this.cmdAddLABEL.addSelectionListener(this);
+
+        this.cmdAddTEXT = new Command(cmdAdd, Command.GENERAL, 1);
+        this.cmdAddTEXT.setText("Text");
+        this.cmdAddTEXT.addSelectionListener(this);
+
+        this.cmdAddDATE = new Command(cmdAdd, Command.GENERAL, 0);
+        this.cmdAddDATE.setText("Date Editor");
+        this.cmdAddDATE.addSelectionListener(this);
+
+        this.cmdRemove = new Command(cmdControl, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveCURRENT = new Command(cmdRemove, Command.GENERAL, 3);
+        this.cmdRemoveCURRENT.setText("current");
+        this.cmdRemoveCURRENT.addSelectionListener(this);
+
+        this.cmdRemoveFIRST = new Command(cmdRemove, Command.GENERAL, 2);
+        this.cmdRemoveFIRST.setText("first");
+        this.cmdRemoveFIRST.addSelectionListener(this);
+
+        this.cmdRemoveLAST = new Command(cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveLAST.setText("last");
+        this.cmdRemoveLAST.addSelectionListener(this);
+
+        this.cmdRemoveALL = new Command(cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveALL.setText("all");
+        this.cmdRemoveALL.addSelectionListener(this);
+
+        // Layout commands
+        Command cmdLayout = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdLayout.setText("Layout");
+
+        this.cmdFillLayout = new Command(cmdLayout, Command.GENERAL, 2);
+        this.cmdFillLayout.setText("Fill Layout");
+        this.cmdFillLayout.addSelectionListener(this);
+
+        this.cmdRowLayout = new Command(cmdLayout, Command.GENERAL, 1);
+        this.cmdRowLayout.setText("Row Layout");
+        this.cmdRowLayout.addSelectionListener(this);
+
+        this.cmdGridLayout = new Command(cmdLayout, Command.GENERAL, 0);
+        this.cmdGridLayout.setText("Grid Layout");
+        this.cmdGridLayout.addSelectionListener(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // Control commands
+        // Add commands
+        if (event.widget == this.cmdAddLABEL)
+        {
+            Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Label");
+            this.cmdRemove.setEnabled(true);
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddTEXT)
+        {
+            Text text = new Text(this.shell, SWT.BORDER);
+            text.setText("Text");
+            this.cmdRemove.setEnabled(true);
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddDATE)
+        {
+            DateEditor date = new DateEditor(this.shell, SWT.BORDER);
+            date.setDate(new Date());
+            this.cmdRemove.setEnabled(true);
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Remove commands
+        if (event.widget == this.cmdRemoveCURRENT)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                if (controls[i].isFocusControl())
+                {
+                    controls[i].dispose();
+                    this.shell.layout();
+                    this.shell.update();
+                    if (this.shell.getChildren().length == 0)
+                    {
+                        this.cmdRemove.setEnabled(false);
+                    }
+                    break;
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveFIRST)
+        {
+            Control[] controls = this.shell.getChildren();
+            if (controls.length > 0)
+            {
+                controls[0].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveLAST)
+        {
+            Control[] controls = this.shell.getChildren();
+            int length = controls.length;
+            if (length > 0)
+            {
+                controls[length-1].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveALL)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            this.shell.layout();
+            this.shell.update();
+            if (this.shell.getChildren().length == 0)
+            {
+                this.cmdRemove.setEnabled(false);
+            }
+            return;
+        }
+
+        // Layout commands
+        if (event.widget == this.cmdFillLayout)
+        {
+            this.shell.setLayout(new FillLayout());
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdRowLayout)
+        {
+            this.shell.setLayout(new RowLayout());
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdGridLayout)
+        {
+            this.shell.setLayout(new GridLayout());
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,395 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.layout;
+
+import java.util.Date;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * The MIDlet is used to examine different aspects of GridLayout.
+ *
+ */
+public class LayoutTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** GridLayout object */
+    private GridLayout layout = null;
+
+    /** Commands */
+    /** Add\Remove control commands */
+    private Command cmdAddLABEL         = null;
+    private Command cmdAddTEXT          = null;
+    private Command cmdAddDATE          = null;
+    private Command cmdRemoveAll        = null;
+
+    /** Settings commands */
+    private Command cmdNumberOfColumns      = null;
+    private Command cmdMakeColsEqualTRUE    = null;
+    private Command cmdMakeColsEqualFALSE   = null;
+
+    private Command cmdSpacingHORIZONTAL    = null;
+    private Command cmdSpacingVERTICAL      = null;
+
+    private Command cmdMarginTOP            = null;
+    private Command cmdMarginBOTTOM         = null;
+    private Command cmdMarginLEFT           = null;
+    private Command cmdMarginRIGHT          = null;
+    private Command cmdMarginWIDTH          = null;
+    private Command cmdMarginHEIGHT         = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Grid Layout Test");
+        // create and set the layout
+        this.layout = new GridLayout();
+        this.shell.setLayout(this.layout);
+
+        // create commands
+        // Add control commands
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdControl.setText("Control");
+
+        this.cmdRemoveAll = new Command(cmdControl, Command.GENERAL, 0);
+        this.cmdRemoveAll.setText("Remove All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        Command cmdAdd = new Command(cmdControl, Command.COMMANDGROUP, 1);
+        cmdAdd.setText("Add");
+
+        this.cmdAddLABEL = new Command(cmdAdd, Command.GENERAL, 2);
+        this.cmdAddLABEL.setText("Label");
+        this.cmdAddLABEL.addSelectionListener(this);
+
+        this.cmdAddTEXT = new Command(cmdAdd, Command.GENERAL, 1);
+        this.cmdAddTEXT.setText("Text");
+        this.cmdAddTEXT.addSelectionListener(this);
+
+        this.cmdAddDATE = new Command(cmdAdd, Command.GENERAL, 0);
+        this.cmdAddDATE.setText("Date Editor");
+        this.cmdAddDATE.addSelectionListener(this);
+
+        // Settings command
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        this.cmdNumberOfColumns = new Command(cmdSettings, Command.GENERAL, 3);
+        this.cmdNumberOfColumns.setText("Number of Columns");
+        this.cmdNumberOfColumns.addSelectionListener(this);
+
+        Command cmdMakeColsEqual =
+            new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdMakeColsEqual.setText("makeColumnsEqualWidth");
+
+        this.cmdMakeColsEqualTRUE =
+            new Command(cmdMakeColsEqual, Command.GENERAL, 1);
+        this.cmdMakeColsEqualTRUE.setText("true");
+        this.cmdMakeColsEqualTRUE.addSelectionListener(this);
+
+        this.cmdMakeColsEqualFALSE =
+            new Command(cmdMakeColsEqual, Command.GENERAL, 0);
+        this.cmdMakeColsEqualFALSE.setText("false");
+        this.cmdMakeColsEqualFALSE.addSelectionListener(this);
+
+        Command cmdSpacing = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdSpacing.setText("Spacing");
+
+        this.cmdSpacingHORIZONTAL = new Command(cmdSpacing, Command.GENERAL, 1);
+        this.cmdSpacingHORIZONTAL.setText("HORIZONTAL");
+        this.cmdSpacingHORIZONTAL.addSelectionListener(this);
+
+        this.cmdSpacingVERTICAL = new Command(cmdSpacing, Command.GENERAL, 0);
+        this.cmdSpacingVERTICAL.setText("VERTICAL");
+        this.cmdSpacingVERTICAL.addSelectionListener(this);
+
+        Command cmdMargin = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdMargin.setText("Margin");
+
+        this.cmdMarginTOP = new Command(cmdMargin, Command.GENERAL, 5);
+        this.cmdMarginTOP.setText("TOP");
+        this.cmdMarginTOP.addSelectionListener(this);
+
+        this.cmdMarginBOTTOM = new Command(cmdMargin, Command.GENERAL, 4);
+        this.cmdMarginBOTTOM.setText("BOTTOM");
+        this.cmdMarginBOTTOM.addSelectionListener(this);
+
+        this.cmdMarginLEFT = new Command(cmdMargin, Command.GENERAL, 3);
+        this.cmdMarginLEFT.setText("LEFT");
+        this.cmdMarginLEFT.addSelectionListener(this);
+
+        this.cmdMarginRIGHT = new Command(cmdMargin, Command.GENERAL, 2);
+        this.cmdMarginRIGHT.setText("RIGHT");
+        this.cmdMarginRIGHT.addSelectionListener(this);
+
+        this.cmdMarginWIDTH = new Command(cmdMargin, Command.GENERAL, 1);
+        this.cmdMarginWIDTH.setText("WIDTH");
+        this.cmdMarginWIDTH.addSelectionListener(this);
+
+        this.cmdMarginHEIGHT = new Command(cmdMargin, Command.GENERAL, 0);
+        this.cmdMarginHEIGHT.setText("HEIGHT");
+        this.cmdMarginHEIGHT.addSelectionListener(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // Add controls
+        if (event.widget == this.cmdAddLABEL)
+        {
+            Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Label");
+            this.setLayoutData(label);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddTEXT)
+        {
+            Text text = new Text(this.shell, SWT.BORDER);
+            text.setText("Text");
+            this.setLayoutData(text);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddDATE)
+        {
+            DateEditor date = new DateEditor(this.shell, SWT.BORDER);
+            date.setDate(new Date());
+            this.setLayoutData(date);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Remove command
+        if (event.widget == this.cmdRemoveAll)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+                controls[i].dispose();
+
+            this.shell.update();
+            return;
+        }
+
+        // Settings commands
+        if (event.widget == this.cmdNumberOfColumns)
+        {
+            int nOfCols = this.layout.numColumns;
+            nOfCols = doNumberPrompt("Number of columns:", nOfCols);
+
+            if (nOfCols != this.layout.numColumns)
+            {
+                this.layout.numColumns = nOfCols;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMakeColsEqualTRUE)
+        {
+            this.layout.makeColumnsEqualWidth = true;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdMakeColsEqualFALSE)
+        {
+            this.layout.makeColumnsEqualWidth = false;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdSpacingHORIZONTAL)
+        {
+            int spacing = this.layout.horizontalSpacing;
+            spacing = this.doNumberPrompt("Horizontal spacing:", spacing);
+
+            if (spacing != this.layout.horizontalSpacing)
+            {
+                this.layout.horizontalSpacing = spacing;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdSpacingVERTICAL)
+        {
+            int spacing = this.layout.verticalSpacing;
+            spacing = this.doNumberPrompt("Vertical spacing:", spacing);
+
+            if (spacing != this.layout.verticalSpacing)
+            {
+                this.layout.verticalSpacing = spacing;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginTOP)
+        {
+            int margin = this.layout.marginTop;
+            margin = this.doNumberPrompt("Top margin:", margin);
+
+            if (margin != this.layout.marginTop)
+            {
+                this.layout.marginTop = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginBOTTOM)
+        {
+            int margin = this.layout.marginBottom;
+            margin = this.doNumberPrompt("Bottom margin:", margin);
+
+            if (margin != this.layout.marginBottom)
+            {
+                this.layout.marginBottom = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginLEFT)
+        {
+            int margin = this.layout.marginLeft;
+            margin = this.doNumberPrompt("Left margin:", margin);
+
+            if (margin != this.layout.marginLeft)
+            {
+                this.layout.marginLeft = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginRIGHT)
+        {
+            int margin = this.layout.marginRight;
+            margin = this.doNumberPrompt("Right margin:", margin);
+
+            if (margin != this.layout.marginRight)
+            {
+                this.layout.marginRight = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginWIDTH)
+        {
+            int margin = this.layout.marginWidth;
+            margin = this.doNumberPrompt("Margin width:", margin);
+
+            if (margin != this.layout.marginWidth)
+            {
+                this.layout.marginWidth = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginHEIGHT)
+        {
+            int margin = this.layout.marginHeight;
+            margin = this.doNumberPrompt("Margin height:", margin);
+
+            if (margin != this.layout.marginHeight)
+            {
+                this.layout.marginHeight = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create and open a number QueryDialog with specified prompt and default
+     * value. The result of dialog open is returned as int.
+     * @param prompt a prompt message
+     * @param value default value
+     * @return result of dialog open or default value if input was canceled
+     */
+    private int doNumberPrompt(String prompt, int value)
+    {
+        int result = value;
+
+        QueryDialog dlg =
+            new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+
+        dlg.setPromptText(prompt, String.valueOf(value));
+        String svalue = dlg.open();
+        if (svalue != null)
+        {
+            result = Integer.parseInt(svalue);
+        }
+        return result;
+    }
+
+    /**
+     * Prompt a user for layout data (GridData).
+     * First, the user is asked does he want to set a layout data. If he does,
+     * a GridDataConfig dialog is shown. After the user specifies
+     * all required values and clicks OK, a GridData object is created and
+     * set to the specified control.
+     * @param control a Control to which created GridData is set
+     */
+    private void setLayoutData(Control control)
+    {
+        // prompt a user does he want to set GridData for a control
+        MessageBox msg =
+            new MessageBox(this.shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+        msg.setMessage("Would you like to set a layout data for the control?");
+        if (msg.open() == SWT.NO)
+        {
+            return;
+        }
+        // create GridDataConfig dialog
+        GridDataConfigDialog dlg = new GridDataConfigDialog(this.shell);
+        GridData data = dlg.open();
+        if (data != null)
+        {
+            control.setLayoutData(data);
+        }
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,559 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.layout;
+
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * The MIDlet is used to examine different aspects of RowLayout.
+ *
+ */
+public class LayoutTestMIDlet_03 extends TestBaseMIDlet
+{
+    /** RowLayout object */
+    private RowLayout layout = null;
+
+    /** Commands */
+    /** Add\Remove control commands */
+    private Command cmdAddLABEL         = null;
+    private Command cmdAddTEXT          = null;
+    private Command cmdAddDATE          = null;
+
+    private Command cmdRemove           = null;
+    private Command cmdRemoveCURRENT    = null;
+    private Command cmdRemoveFIRST      = null;
+    private Command cmdRemoveLAST       = null;
+    private Command cmdRemoveALL        = null;
+
+    /** Settings commands */
+    private Command cmdTypeVERTICAL     = null;
+    private Command cmdTypeHORIZONTAL   = null;
+    private Command cmdPackTRUE         = null;
+    private Command cmdPackFALSE        = null;
+    private Command cmdFillTRUE         = null;
+    private Command cmdFillFALSE        = null;
+    private Command cmdJustifyTRUE      = null;
+    private Command cmdJustifyFALSE     = null;
+    private Command cmdWrapTRUE         = null;
+    private Command cmdWrapFALSE        = null;
+    private Command cmdSpacing          = null;
+
+    private Command cmdMarginTOP            = null;
+    private Command cmdMarginBOTTOM         = null;
+    private Command cmdMarginLEFT           = null;
+    private Command cmdMarginRIGHT          = null;
+    private Command cmdMarginWIDTH          = null;
+    private Command cmdMarginHEIGHT         = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Row Layout Test");
+        // create and set the layout
+        this.layout = new RowLayout();
+        this.shell.setLayout(this.layout);
+
+        // create commands
+        // Add control commands
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdControl.setText("Control");
+
+        this.cmdRemove = new Command(cmdControl, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveCURRENT = new Command(cmdRemove, Command.GENERAL, 3);
+        this.cmdRemoveCURRENT.setText("current");
+        this.cmdRemoveCURRENT.addSelectionListener(this);
+
+        this.cmdRemoveFIRST = new Command(cmdRemove, Command.GENERAL, 2);
+        this.cmdRemoveFIRST.setText("first");
+        this.cmdRemoveFIRST.addSelectionListener(this);
+
+        this.cmdRemoveLAST = new Command(cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveLAST.setText("last");
+        this.cmdRemoveLAST.addSelectionListener(this);
+
+        this.cmdRemoveALL = new Command(cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveALL.setText("all");
+        this.cmdRemoveALL.addSelectionListener(this);
+
+        Command cmdAdd = new Command(cmdControl, Command.COMMANDGROUP, 1);
+        cmdAdd.setText("Add");
+
+        this.cmdAddLABEL = new Command(cmdAdd, Command.GENERAL, 2);
+        this.cmdAddLABEL.setText("Label");
+        this.cmdAddLABEL.addSelectionListener(this);
+
+        this.cmdAddTEXT = new Command(cmdAdd, Command.GENERAL, 1);
+        this.cmdAddTEXT.setText("Text");
+        this.cmdAddTEXT.addSelectionListener(this);
+
+        this.cmdAddDATE = new Command(cmdAdd, Command.GENERAL, 0);
+        this.cmdAddDATE.setText("Date Editor");
+        this.cmdAddDATE.addSelectionListener(this);
+
+        // Settings commands
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        // type
+        Command cmdType = new Command(cmdSettings, Command.COMMANDGROUP, 6);
+        cmdType.setText("Type");
+
+        this.cmdTypeHORIZONTAL = new Command(cmdType, Command.GENERAL, 1);
+        this.cmdTypeHORIZONTAL.setText("HORIZONTAL");
+        this.cmdTypeHORIZONTAL.addSelectionListener(this);
+
+        this.cmdTypeVERTICAL = new Command(cmdType, Command.GENERAL, 0);
+        this.cmdTypeVERTICAL.setText("VERTICAL");
+        this.cmdTypeVERTICAL.addSelectionListener(this);
+
+        // pack
+        Command cmdPack = new Command(cmdSettings, Command.COMMANDGROUP, 5);
+        cmdPack.setText("Pack");
+
+        this.cmdPackTRUE = new Command(cmdPack, Command.GENERAL, 1);
+        this.cmdPackTRUE.setText("true");
+        this.cmdPackTRUE.addSelectionListener(this);
+
+        this.cmdPackFALSE = new Command(cmdPack, Command.GENERAL, 0);
+        this.cmdPackFALSE.setText("false");
+        this.cmdPackFALSE.addSelectionListener(this);
+
+        // fill
+        Command cmdFill = new Command(cmdSettings, Command.COMMANDGROUP, 4);
+        cmdFill.setText("Fill");
+
+        this.cmdFillTRUE = new Command(cmdFill, Command.GENERAL, 1);
+        this.cmdFillTRUE.setText("true");
+        this.cmdFillTRUE.addSelectionListener(this);
+
+        this.cmdFillFALSE = new Command(cmdFill, Command.GENERAL, 0);
+        this.cmdFillFALSE.setText("false");
+        this.cmdFillFALSE.addSelectionListener(this);
+
+        // justify
+        Command cmdJustify = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdJustify.setText("Justify");
+
+        this.cmdJustifyTRUE = new Command(cmdJustify, Command.GENERAL, 1);
+        this.cmdJustifyTRUE.setText("true");
+        this.cmdJustifyTRUE.addSelectionListener(this);
+
+        this.cmdJustifyFALSE = new Command(cmdJustify, Command.GENERAL, 0);
+        this.cmdJustifyFALSE.setText("false");
+        this.cmdJustifyFALSE.addSelectionListener(this);
+
+        // wrap
+        Command cmdWrap = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdWrap.setText("Wrap");
+
+        this.cmdWrapTRUE = new Command(cmdWrap, Command.GENERAL, 1);
+        this.cmdWrapTRUE.setText("true");
+        this.cmdWrapTRUE.addSelectionListener(this);
+
+        this.cmdWrapFALSE = new Command(cmdWrap, Command.GENERAL, 0);
+        this.cmdWrapFALSE.setText("false");
+        this.cmdWrapFALSE.addSelectionListener(this);
+
+        // spacing
+        this.cmdSpacing = new Command(cmdSettings, Command.GENERAL, 1);
+        this.cmdSpacing.setText("Spacing");
+        this.cmdSpacing.addSelectionListener(this);
+
+        // margin
+        Command cmdMargin = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdMargin.setText("Margin");
+
+        this.cmdMarginTOP = new Command(cmdMargin, Command.GENERAL, 5);
+        this.cmdMarginTOP.setText("TOP");
+        this.cmdMarginTOP.addSelectionListener(this);
+
+        this.cmdMarginBOTTOM = new Command(cmdMargin, Command.GENERAL, 4);
+        this.cmdMarginBOTTOM.setText("BOTTOM");
+        this.cmdMarginBOTTOM.addSelectionListener(this);
+
+        this.cmdMarginLEFT = new Command(cmdMargin, Command.GENERAL, 3);
+        this.cmdMarginLEFT.setText("LEFT");
+        this.cmdMarginLEFT.addSelectionListener(this);
+
+        this.cmdMarginRIGHT = new Command(cmdMargin, Command.GENERAL, 2);
+        this.cmdMarginRIGHT.setText("RIGHT");
+        this.cmdMarginRIGHT.addSelectionListener(this);
+
+        this.cmdMarginWIDTH = new Command(cmdMargin, Command.GENERAL, 1);
+        this.cmdMarginWIDTH.setText("WIDTH");
+        this.cmdMarginWIDTH.addSelectionListener(this);
+
+        this.cmdMarginHEIGHT = new Command(cmdMargin, Command.GENERAL, 0);
+        this.cmdMarginHEIGHT.setText("HEIGHT");
+        this.cmdMarginHEIGHT.addSelectionListener(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // Add controls
+        if (event.widget == this.cmdAddLABEL)
+        {
+            Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Label");
+            this.setLayoutData(label);
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddTEXT)
+        {
+            Text text = new Text(this.shell, SWT.BORDER);
+            text.setText("Text");
+            this.setLayoutData(text);
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddDATE)
+        {
+            DateEditor date = new DateEditor(this.shell, SWT.BORDER);
+            date.setDate(new Date());
+            this.setLayoutData(date);
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Remove commands
+        if (event.widget == this.cmdRemoveCURRENT)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                if (controls[i].isFocusControl())
+                {
+                    controls[i].dispose();
+                    this.shell.layout();
+                    this.shell.update();
+                    if (this.shell.getChildren().length == 0)
+                    {
+                        this.cmdRemove.setEnabled(false);
+                    }
+                    break;
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveFIRST)
+        {
+            Control[] controls = this.shell.getChildren();
+            if (controls.length > 0)
+            {
+                controls[0].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveLAST)
+        {
+            Control[] controls = this.shell.getChildren();
+            int length = controls.length;
+            if (length > 0)
+            {
+                controls[length-1].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveALL)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            this.shell.layout();
+            this.shell.update();
+            if (this.shell.getChildren().length == 0)
+            {
+                this.cmdRemove.setEnabled(false);
+            }
+            return;
+        }
+
+        // Settings commands
+        // type
+        if (event.widget == this.cmdTypeHORIZONTAL)
+        {
+            this.layout.type = SWT.HORIZONTAL;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdTypeVERTICAL)
+        {
+            this.layout.type = SWT.VERTICAL;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // pack
+        if (event.widget == this.cmdPackTRUE)
+        {
+            this.layout.pack = true;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdPackFALSE)
+        {
+            this.layout.pack = false;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // fill
+        if (event.widget == this.cmdFillTRUE)
+        {
+            this.layout.fill = true;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdFillFALSE)
+        {
+            this.layout.fill = false;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // justify
+        if (event.widget == this.cmdJustifyTRUE)
+        {
+            this.layout.justify = true;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdJustifyFALSE)
+        {
+            this.layout.justify = false;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // wrap
+        if (event.widget == this.cmdWrapTRUE)
+        {
+            this.layout.wrap = true;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdWrapFALSE)
+        {
+            this.layout.wrap = false;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // spacing
+        if (event.widget == this.cmdSpacing)
+        {
+            int spacing = this.layout.spacing;
+            spacing = this.doNumberPrompt("Spacing:", spacing);
+
+            if (spacing != this.layout.spacing)
+            {
+                this.layout.spacing = spacing;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        // margin
+        if (event.widget == this.cmdMarginTOP)
+        {
+            int margin = this.layout.marginTop;
+            margin = this.doNumberPrompt("Top margin:", margin);
+
+            if (margin != this.layout.marginTop)
+            {
+                this.layout.marginTop = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginBOTTOM)
+        {
+            int margin = this.layout.marginBottom;
+            margin = this.doNumberPrompt("Bottom margin:", margin);
+
+            if (margin != this.layout.marginBottom)
+            {
+                this.layout.marginBottom = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginLEFT)
+        {
+            int margin = this.layout.marginLeft;
+            margin = this.doNumberPrompt("Left margin:", margin);
+
+            if (margin != this.layout.marginLeft)
+            {
+                this.layout.marginLeft = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginRIGHT)
+        {
+            int margin = this.layout.marginRight;
+            margin = this.doNumberPrompt("Right margin:", margin);
+
+            if (margin != this.layout.marginRight)
+            {
+                this.layout.marginRight = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginWIDTH)
+        {
+            int margin = this.layout.marginWidth;
+            margin = this.doNumberPrompt("Margin width:", margin);
+
+            if (margin != this.layout.marginWidth)
+            {
+                this.layout.marginWidth = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginHEIGHT)
+        {
+            int margin = this.layout.marginHeight;
+            margin = this.doNumberPrompt("Margin height:", margin);
+
+            if (margin != this.layout.marginHeight)
+            {
+                this.layout.marginHeight = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create and open a number QueryDialog with specified prompt and default
+     * value. The result of dialog open is returned as int.
+     * @param prompt a prompt message
+     * @param value default value
+     * @return result of dialog open or default value if input was canceled
+     */
+    private int doNumberPrompt(String prompt, int value)
+    {
+        int result = value;
+
+        if (value < 0) value = 0;
+
+        QueryDialog dlg =
+            new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+
+        dlg.setPromptText(prompt, String.valueOf(value));
+        String svalue = dlg.open();
+        if (svalue != null)
+        {
+            result = Integer.parseInt(svalue);
+        }
+        return result;
+    }
+
+    /**
+     * Prompt a user for layout data (RowData).
+     * First, the user is asked does he want to set a layout data. If he does,
+     * he is promted for width and height values. A RowData object is created
+     * then and set to the specified control.
+     * @param control a Control to which created RowData is set
+     */
+    private void setLayoutData(Control control)
+    {
+        // prompt a user does he want to set GridData for a control
+        MessageBox msg =
+            new MessageBox(this.shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+        msg.setMessage("Would you like to set layout data for the control?");
+
+        if (msg.open() == SWT.NO)
+        {
+            return;
+        }
+
+        // create layout data
+        RowData data = new RowData();
+
+        // prompt user for width and height
+        int width = this.doNumberPrompt("Width:", data.width);
+        data.width = width;
+        int height = this.doNumberPrompt("Height:", data.height);
+        data.height = height;
+
+        // set layout data
+        control.setLayoutData(data);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,333 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.layout;
+
+import java.util.Date;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * The MIDlet is used to examine different aspects of FillLayout.
+ */
+public class LayoutTestMIDlet_04 extends TestBaseMIDlet
+{
+    /** FillLayout object */
+    private FillLayout layout = null;
+
+    /** Commands */
+    /** Add\Remove control commands */
+    private Command cmdAddLABEL         = null;
+    private Command cmdAddTEXT          = null;
+    private Command cmdAddDATE          = null;
+
+    private Command cmdRemove           = null;
+    private Command cmdRemoveCURRENT    = null;
+    private Command cmdRemoveFIRST      = null;
+    private Command cmdRemoveLAST       = null;
+    private Command cmdRemoveALL        = null;
+
+    /** Settings commands */
+    private Command cmdTypeVERTICAL     = null;
+    private Command cmdTypeHORIZONTAL   = null;
+    private Command cmdSpacing          = null;
+
+    private Command cmdMarginWIDTH          = null;
+    private Command cmdMarginHEIGHT         = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Fill Layout Test");
+        // create and set the layout
+        this.layout = new FillLayout();
+        this.shell.setLayout(this.layout);
+
+        // create commands
+        // Add control commands
+        Command cmdControl = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdControl.setText("Control");
+
+        this.cmdRemove = new Command(cmdControl, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+        this.cmdRemove.setEnabled(false);
+
+        this.cmdRemoveCURRENT = new Command(cmdRemove, Command.GENERAL, 3);
+        this.cmdRemoveCURRENT.setText("current");
+        this.cmdRemoveCURRENT.addSelectionListener(this);
+
+        this.cmdRemoveFIRST = new Command(cmdRemove, Command.GENERAL, 2);
+        this.cmdRemoveFIRST.setText("first");
+        this.cmdRemoveFIRST.addSelectionListener(this);
+
+        this.cmdRemoveLAST = new Command(cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveLAST.setText("last");
+        this.cmdRemoveLAST.addSelectionListener(this);
+
+        this.cmdRemoveALL = new Command(cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveALL.setText("all");
+        this.cmdRemoveALL.addSelectionListener(this);
+
+        Command cmdAdd = new Command(cmdControl, Command.COMMANDGROUP, 1);
+        cmdAdd.setText("Add");
+
+        this.cmdAddLABEL = new Command(cmdAdd, Command.GENERAL, 2);
+        this.cmdAddLABEL.setText("Label");
+        this.cmdAddLABEL.addSelectionListener(this);
+
+        this.cmdAddTEXT = new Command(cmdAdd, Command.GENERAL, 1);
+        this.cmdAddTEXT.setText("Text");
+        this.cmdAddTEXT.addSelectionListener(this);
+
+        this.cmdAddDATE = new Command(cmdAdd, Command.GENERAL, 0);
+        this.cmdAddDATE.setText("Date Editor");
+        this.cmdAddDATE.addSelectionListener(this);
+
+        // Settings commands
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        // type
+        Command cmdType = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdType.setText("Type");
+
+        this.cmdTypeHORIZONTAL = new Command(cmdType, Command.GENERAL, 1);
+        this.cmdTypeHORIZONTAL.setText("HORIZONTAL");
+        this.cmdTypeHORIZONTAL.addSelectionListener(this);
+
+        this.cmdTypeVERTICAL = new Command(cmdType, Command.GENERAL, 0);
+        this.cmdTypeVERTICAL.setText("VERTICAL");
+        this.cmdTypeVERTICAL.addSelectionListener(this);
+
+        // spacing
+        this.cmdSpacing = new Command(cmdSettings, Command.GENERAL, 1);
+        this.cmdSpacing.setText("Spacing");
+        this.cmdSpacing.addSelectionListener(this);
+
+        // margin
+        Command cmdMargin = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdMargin.setText("Margin");
+
+        this.cmdMarginWIDTH = new Command(cmdMargin, Command.GENERAL, 1);
+        this.cmdMarginWIDTH.setText("WIDTH");
+        this.cmdMarginWIDTH.addSelectionListener(this);
+
+        this.cmdMarginHEIGHT = new Command(cmdMargin, Command.GENERAL, 0);
+        this.cmdMarginHEIGHT.setText("HEIGHT");
+        this.cmdMarginHEIGHT.addSelectionListener(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // Add controls
+        if (event.widget == this.cmdAddLABEL)
+        {
+            Label label = new Label(this.shell, SWT.NONE);
+            label.setText("Label");
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddTEXT)
+        {
+            Text text = new Text(this.shell, SWT.BORDER);
+            text.setText("Text");
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdAddDATE)
+        {
+            DateEditor date = new DateEditor(this.shell, SWT.BORDER);
+            date.setDate(new Date());
+            this.cmdRemove.setEnabled(true);
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // Remove commands
+        if (event.widget == this.cmdRemoveCURRENT)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                if (controls[i].isFocusControl())
+                {
+                    controls[i].dispose();
+                    this.shell.layout();
+                    this.shell.update();
+                    if (this.shell.getChildren().length == 0)
+                    {
+                        this.cmdRemove.setEnabled(false);
+                    }
+                    break;
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveFIRST)
+        {
+            Control[] controls = this.shell.getChildren();
+            if (controls.length > 0)
+            {
+                controls[0].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveLAST)
+        {
+            Control[] controls = this.shell.getChildren();
+            int length = controls.length;
+            if (length > 0)
+            {
+                controls[length-1].dispose();
+                this.shell.layout();
+                this.shell.update();
+                if (this.shell.getChildren().length == 0)
+                {
+                    this.cmdRemove.setEnabled(false);
+                }
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveALL)
+        {
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            this.shell.layout();
+            this.shell.update();
+            if (this.shell.getChildren().length == 0)
+            {
+                this.cmdRemove.setEnabled(false);
+            }
+            return;
+        }
+
+        // Settings commands
+        // type
+        if (event.widget == this.cmdTypeHORIZONTAL)
+        {
+            this.layout.type = SWT.HORIZONTAL;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (event.widget == this.cmdTypeVERTICAL)
+        {
+            this.layout.type = SWT.VERTICAL;
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        // spacing
+        if (event.widget == this.cmdSpacing)
+        {
+            int spacing = this.layout.spacing;
+            spacing = this.doNumberPrompt("Spacing:", spacing);
+
+            if (spacing != this.layout.spacing)
+            {
+                this.layout.spacing = spacing;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        // margin
+        if (event.widget == this.cmdMarginWIDTH)
+        {
+            int margin = this.layout.marginWidth;
+            margin = this.doNumberPrompt("Margin width:", margin);
+
+            if (margin != this.layout.marginWidth)
+            {
+                this.layout.marginWidth = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (event.widget == this.cmdMarginHEIGHT)
+        {
+            int margin = this.layout.marginHeight;
+            margin = this.doNumberPrompt("Margin height:", margin);
+
+            if (margin != this.layout.marginHeight)
+            {
+                this.layout.marginHeight = margin;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create and open a number QueryDialog with specified prompt and default
+     * value. The result of dialog open is returned as int.
+     * @param prompt a prompt message
+     * @param value default value
+     * @return result of dialog open or default value if input was canceled
+     */
+    private int doNumberPrompt(String prompt, int value)
+    {
+        int result = value;
+
+        if (value < 0) value = 0;
+
+        QueryDialog dlg =
+            new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+
+        dlg.setPromptText(prompt, String.valueOf(value));
+        String svalue = dlg.open();
+        if (svalue != null)
+        {
+            result = Integer.parseInt(svalue);
+        }
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/layout/LayoutTestMIDlet_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,379 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.layout;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class LayoutTestMIDlet_05 extends TestBaseMIDlet
+{
+    /** layout */
+    protected FormLayout layout = null;
+
+    /** current attachment rule */
+    protected int autoAttach = SWT.NONE;
+
+    /** last created control */
+    protected Control control = null;
+
+    /** commands */
+    protected Command cmdAddLABEL   = null;
+    protected Command cmdAddTEXT    = null;
+    protected Command cmdAddSLIDER  = null;
+    protected Command cmdAddLIST    = null;
+
+    protected Command cmdAttachTOP      = null;
+    protected Command cmdAttachBOTTOM   = null;
+    protected Command cmdAttachLEFT     = null;
+    protected Command cmdAttachRIGHT    = null;
+
+    protected Command cmdMarginTOP      = null;
+    protected Command cmdMarginBOTTOM   = null;
+    protected Command cmdMarginLEFT     = null;
+    protected Command cmdMarginRIGHT    = null;
+
+    protected Command cmdSpacing        = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // setup the shell
+        this.shell.setText("Form Layout Test");
+        this.layout = new FormLayout();
+        this.shell.setLayout(this.layout);
+
+        // create commands
+        Command cmdAdd = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdAdd.setText("Add");
+
+        this.cmdAddLABEL = new Command(cmdAdd, Command.SELECT, 3);
+        this.cmdAddLABEL.setText("Label");
+        this.cmdAddLABEL.addSelectionListener(this);
+
+        this.cmdAddTEXT = new Command(cmdAdd, Command.SELECT, 2);
+        this.cmdAddTEXT.setText("Text");
+        this.cmdAddTEXT.addSelectionListener(this);
+
+        this.cmdAddSLIDER = new Command(cmdAdd, Command.SELECT, 1);
+        this.cmdAddSLIDER.setText("Slider");
+        this.cmdAddSLIDER.addSelectionListener(this);
+
+        this.cmdAddLIST = new Command(cmdAdd, Command.SELECT, 0);
+        this.cmdAddLIST.setText("List");
+        this.cmdAddLIST.addSelectionListener(this);
+
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        Command cmdAttach = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdAttach.setText("Auto attach");
+
+        this.cmdAttachTOP = new Command(cmdAttach, Command.GENERAL, 3);
+        this.cmdAttachTOP.setText("top");
+        this.cmdAttachTOP.addSelectionListener(this);
+
+        this.cmdAttachBOTTOM = new Command(cmdAttach, Command.GENERAL, 2);
+        this.cmdAttachBOTTOM.setText("bottom");
+        this.cmdAttachBOTTOM.addSelectionListener(this);
+
+        this.cmdAttachLEFT = new Command(cmdAttach, Command.GENERAL, 1);
+        this.cmdAttachLEFT.setText("left");
+        this.cmdAttachLEFT.addSelectionListener(this);
+
+        this.cmdAttachRIGHT = new Command(cmdAttach, Command.GENERAL, 0);
+        this.cmdAttachRIGHT.setText("right");
+        this.cmdAttachRIGHT.addSelectionListener(this);
+
+        Command cmdMargin = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdMargin.setText("Margin");
+
+        this.cmdMarginTOP = new Command(cmdMargin, Command.GENERAL, 3);
+        this.cmdMarginTOP.setText("top");
+        this.cmdMarginTOP.addSelectionListener(this);
+
+        this.cmdMarginBOTTOM = new Command(cmdMargin, Command.GENERAL, 2);
+        this.cmdMarginBOTTOM.setText("bottom");
+        this.cmdMarginBOTTOM.addSelectionListener(this);
+
+        this.cmdMarginLEFT = new Command(cmdMargin, Command.GENERAL, 1);
+        this.cmdMarginLEFT.setText("left");
+        this.cmdMarginLEFT.addSelectionListener(this);
+
+        this.cmdMarginRIGHT = new Command(cmdMargin, Command.GENERAL, 0);
+        this.cmdMarginRIGHT.setText("right");
+        this.cmdMarginRIGHT.addSelectionListener(this);
+
+        this.cmdSpacing = new Command(cmdSettings, Command.GENERAL, 0);
+        this.cmdSpacing.setText("Spacing");
+        this.cmdSpacing.addSelectionListener(this);
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        // add commands
+        if (e.widget == this.cmdAddLABEL)
+        {
+            Label control = new Label(this.shell, SWT.BORDER);
+            control.setText("Label");
+            if (!this.setLayoutData(control))
+            {
+                this.autoAttach(control, null);
+            }
+            control.pack();
+            this.shell.layout();
+            this.control = control;
+            return;
+        }
+        if (e.widget == this.cmdAddTEXT)
+        {
+            Text control = new Text(this.shell, SWT.BORDER);
+            control.setText("Text control");
+            if (!this.setLayoutData(control))
+            {
+                this.autoAttach(control, null);
+            }
+            control.pack();
+            this.shell.layout();
+            this.control = control;
+            return;
+        }
+        if (e.widget == this.cmdAddSLIDER)
+        {
+            Slider control = new Slider(this.shell, SWT.BORDER);
+            if (!this.setLayoutData(control))
+            {
+                this.autoAttach(control, null);
+            }
+            this.shell.layout();
+            this.control = control;
+            return;
+        }
+        if (e.widget == this.cmdAddLIST)
+        {
+            List control = new List(this.shell, SWT.BORDER);
+            control.setItems(new String[] {"Item 1","Item 2","Item 3"});
+            control.setSize(100, 100);
+            if (!this.setLayoutData(control))
+            {
+                this.autoAttach(control, control.getSize());
+            }
+            this.shell.layout();
+            this.control = control;
+            return;
+        }
+
+        // attach commands
+        if (e.widget == this.cmdAttachTOP)
+        {
+            this.autoAttach = SWT.TOP;
+            return;
+        }
+        if (e.widget == this.cmdAttachBOTTOM)
+        {
+            this.autoAttach = SWT.BOTTOM;
+            return;
+        }
+        if (e.widget == this.cmdAttachLEFT)
+        {
+            this.autoAttach = SWT.LEFT;
+            return;
+        }
+        if (e.widget == this.cmdAttachRIGHT)
+        {
+            this.autoAttach = SWT.RIGHT;
+            return;
+        }
+
+        // set margin commands
+        if (e.widget == this.cmdMarginTOP)
+        {
+            int value = this.numQuery("Top Marging:", this.layout.marginTop);
+            if (value != this.layout.marginTop)
+            {
+                this.layout.marginTop = value;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdMarginBOTTOM)
+        {
+            int value = this.numQuery("Bottom Marging:", this.layout.marginBottom);
+            if (value != this.layout.marginBottom)
+            {
+                this.layout.marginBottom = value;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdMarginLEFT)
+        {
+            int value = this.numQuery("Left Marging:", this.layout.marginLeft);
+            if (value != this.layout.marginLeft)
+            {
+                this.layout.marginLeft = value;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+        if (e.widget == this.cmdMarginRIGHT)
+        {
+            int value = this.numQuery("Right Marging:", this.layout.marginRight);
+            if (value != this.layout.marginRight)
+            {
+                this.layout.marginRight = value;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+
+        // spacing command
+        if (e.widget == this.cmdSpacing)
+        {
+            int value = this.numQuery("Spacing:", this.layout.spacing);
+            if (value != this.layout.spacing)
+            {
+                this.layout.spacing = value;
+                this.shell.layout();
+                this.shell.update();
+            }
+            return;
+        }
+
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Prompt a user for layout data (FormData).
+     * First, the user is asked does he want to set a layout data. If he does,
+     * a FormDataConfig dialog is shown. After the user specifies
+     * all required values and clicks OK, a FormData object is created and
+     * set to the specified control.
+     * @param control a Control to which created FormData is set
+     */
+    protected boolean setLayoutData(Control control)
+    {
+        // prompt a user does he want to set FormData for a control
+        MessageBox msg =
+            new MessageBox(this.shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+        msg.setMessage("Would you like to set a layout data for the control?");
+        if (msg.open() == SWT.YES)
+        {
+            // prompt for layout data
+            FormDataConfigDialog dlg = new FormDataConfigDialog(this.shell);
+            FormData data = dlg.open();
+            if (data != null)
+            {
+                control.setLayoutData(data);
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     *
+     */
+    protected void autoAttach(Control control, Point size)
+    {
+        FormData data = new FormData();
+        if (size != null)
+        {
+            data.width  = size.x;
+            data.height = size.y;
+        }
+
+        if (this.control != null && !this.control.isDisposed())
+        {
+            switch (this.autoAttach)
+            {
+            case SWT.TOP:
+            {
+                data.bottom = new FormAttachment(this.control, 0, SWT.TOP);
+                data.left   = new FormAttachment(this.control, 0, SWT.LEFT);
+                break;
+            }
+
+            case SWT.BOTTOM:
+            {
+                data.top    = new FormAttachment(this.control, 0, SWT.BOTTOM);
+                data.left   = new FormAttachment(this.control, 0, SWT.LEFT);
+                break;
+            }
+
+            case SWT.LEFT:
+            {
+                data.right = new FormAttachment(this.control, 0, SWT.LEFT);
+                data.top    = new FormAttachment(this.control, 0, SWT.TOP);
+                break;
+            }
+
+            case SWT.RIGHT:
+                data.left = new FormAttachment(this.control, 0, SWT.RIGHT);
+                data.top    = new FormAttachment(this.control, 0, SWT.TOP);
+                break;
+            }
+        }
+        control.setLayoutData(data);
+    }
+
+    /**
+     *
+     */
+    protected int numQuery(String msg, int value)
+    {
+        int result = value;
+        QueryDialog dlg =
+            new QueryDialog(this.shell, SWT.NONE, QueryDialog.NUMERIC);
+        dlg.setMaximum(3);
+        dlg.setPromptText(msg, String.valueOf(value));
+        String res = dlg.open();
+        if (res != null)
+        {
+            result = Integer.parseInt(res);
+        }
+
+        return result;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/LayoutTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="ListBoxTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ListBoxTestMidlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.listbox.ListBoxTestMidlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ListBoxTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/medium.jpg has changed
Binary file javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/small.png has changed
Binary file javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/res/res/sphere.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/src/com/nokia/test/java/eswt/listbox/ListBoxTestMidlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,771 @@
+/*
+* 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.test.java.eswt.listbox;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.ercp.swt.mobile.ListBox;
+import org.eclipse.ercp.swt.mobile.ListBoxItem;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class ListBoxTestMidlet_01 extends TestBaseMIDlet
+{
+
+    /** constrainedtext instance - number of items */
+    private ConstrainedText itemNum = null;
+    /** list instance */
+    private ListBox listBox = null;
+
+    private ListBoxItem[] items = null;
+
+    private int[] single_styles =
+    {
+        ListBox.LB_STYLE_NO_HEADING_TEXT,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_SELECTION_NUMBER,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_SELECTION_NUMBER|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_HEADING_ICONS,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_HEADING_ICONS|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_1LINE_ITEM,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_SELECTION_NUMBER,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_SELECTION_NUMBER|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_SELECTION_NUMBER,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_SELECTION_NUMBER|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS|ListBox.LB_MOD_SHOW_DETAIL_ICONS
+    };
+    private int[] multi_styles =
+    {
+        ListBox.LB_STYLE_NO_HEADING_TEXT,
+        ListBox.LB_STYLE_NO_HEADING_TEXT|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_1LINE_ITEM,
+        ListBox.LB_STYLE_1LINE_ITEM|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_DETAIL_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS,
+        ListBox.LB_STYLE_2LINE_ITEM|ListBox.LB_MOD_SHOW_HEADING_ICONS|ListBox.LB_MOD_SHOW_DETAIL_ICONS
+    };
+
+    private Command CMDMULTI = null;
+    private Command CMDSINGLE = null;
+
+    private Command CMDENABLETEXT = null;
+    private Command CMDDISABLETEXT = null;
+
+    private Command CMDNEXTSTYLE = null;
+    private Command CMDPREVSTYLE = null;
+
+    private Command CMDEMPTY = null;
+    private Command CMDREMOVE = null;
+    private Command CMDREMOVEALL = null;
+    private Command CMDSELECT = null;
+    private Command CMDSELECTALL = null;
+    private Command CMDDESELECT = null;
+    private Command CMDDESELECTALL = null;
+
+    private Command CMDFONT = null;
+    private Command CMDHEADFONT = null;
+
+    private Command CMDSET_IMAGE = null;
+    private Command CMDSET_EMPTY = null;
+    private Command CMDSET_LONG = null;
+    private Command CMDSET_SPECIAL = null;
+
+    /** custom image for the ListBox */
+    private Image smallImage = null;
+    /** custom large image for the ListBox */
+    private Image largeImage = null;
+    /** custom large image for the ListBox */
+    private Image sphereImage = null;
+    /** custom large image for the ListBox */
+    private Image labelImage = null;
+    /** custom transparent image for the ListBox */
+    private Image transImage = null;
+    /** custom image for the ListBox */
+    private Image[] headImages = null;
+    /** custom image for the ListBox */
+    private Image[] detailImages = null;
+
+
+    private Shell tooltip = null;
+    private int listType = 0;
+
+    private int singlestyleCounter = 0;
+    private int multistyleCounter = 0;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+
+        // customize the shell
+        this.shell.setText("ListBox 1");
+        this.shell.setLayout(new RowLayout());
+        this.headImages = new Image[4];
+        this.detailImages = new Image[4];
+        this.singlestyleCounter = 0;
+        this.multistyleCounter = 0;
+        this.listType = SWT.SINGLE;
+        this.createToolTip("ListBox");
+        // try to initialize the image
+        try
+        {
+            this.smallImage = new Image(this.display, this.getClass().getResourceAsStream("/res/small.png"));
+            this.detailImages[0] = this.smallImage;
+            this.headImages[1] = this.smallImage;
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.smallImage = null;
+            this.detailImages[0] = null;
+            this.headImages[1] = null;
+        }
+
+        try
+        {
+            this.largeImage = new Image(this.display, this.getClass().getResourceAsStream("/res/medium.jpg"));
+            this.headImages[3] = this.largeImage;
+            this.detailImages[1] = this.largeImage;
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.largeImage = null;
+            this.headImages[3] = null;
+            this.detailImages[1] = null;
+        }
+        try
+        {
+            this.sphereImage = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+            this.headImages[0] = this.sphereImage;
+            this.detailImages[2] = this.sphereImage;
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.sphereImage = null;
+            this.headImages[0] = null;
+            this.detailImages[2] = null;
+        }
+        try
+        {
+            this.labelImage = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+            this.headImages[2] = this.labelImage;
+            this.detailImages[3] = this.labelImage;
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.labelImage = null;
+            this.headImages[2] = null;
+            this.detailImages[3] = null;
+        }
+        try
+        {
+            this.transImage = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.transImage = null;
+
+        }
+        // "no. of items:" label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("No. of items:");
+        label.setLayoutData(new RowData());
+        // input field for "no. of items:"
+        this.itemNum = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.itemNum.setTextLimit(3);
+        this.itemNum.setText(String.valueOf(0));
+        this.itemNum.setLayoutData(new RowData());
+
+        // "single listview" left softkey command
+        this.CMDSINGLE = new Command(this.shell, Command.SELECT, 1);
+        this.CMDSINGLE.setText("Single ListBox");
+        this.CMDSINGLE.addSelectionListener(this);
+        // "multi listview" left softkey command
+        this.CMDMULTI = new Command(this.shell, Command.SELECT, 0);
+        this.CMDMULTI.setText("Multi ListBox");
+        this.CMDMULTI.addSelectionListener(this);
+
+        this.CMDENABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDENABLETEXT.setText("Enable Text");
+        this.CMDENABLETEXT.addSelectionListener(this);
+
+        this.CMDDISABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDDISABLETEXT.setText("Disable Text");
+        this.CMDDISABLETEXT.addSelectionListener(this);
+
+        this.CMDNEXTSTYLE = new Command(this.shell, Command.OK, 0);
+        this.CMDNEXTSTYLE.setText("Next style");
+        this.CMDNEXTSTYLE.addSelectionListener(this);
+
+        this.CMDPREVSTYLE = new Command(this.shell, Command.OK, 0);
+        this.CMDPREVSTYLE.setText("Prev style");
+        this.CMDPREVSTYLE.addSelectionListener(this);
+    }
+
+    /**
+     * create a listbox on the shell
+     * @param type the typ of the listbox
+     */
+    private void createListBox(int type, int layoutstyle)
+    {
+        // dispose previous listbox
+        if (this.listBox != null && !this.listBox.isDisposed())
+            this.listBox.dispose();
+
+        int item_count = Integer.parseInt(this.itemNum.getText());
+        if (item_count < 0)
+            return;
+
+        // create the list
+        if (type == SWT.SINGLE)
+            this.listBox = new ListBox(this.shell, type  | SWT.BORDER | SWT.V_SCROLL, this.single_styles[layoutstyle]);
+        else
+            this.listBox = new ListBox(this.shell, type  | SWT.BORDER | SWT.V_SCROLL, this.multi_styles[layoutstyle]);
+
+        this.listType = type;
+        // set the items for the listbox
+
+        items = new ListBoxItem[item_count];
+        if (type == SWT.SINGLE)
+        {
+            if (layoutstyle == 0)
+                this.createListBoxItems(false,false,false);
+            else if (layoutstyle == 1)
+                this.createListBoxItems(false,true,false);
+            else if (layoutstyle == 2)
+                this.createListBoxItems(false,false,false);
+            else if (layoutstyle == 3)
+                this.createListBoxItems(false,true,false);
+            else if (layoutstyle == 4)
+                this.createListBoxItems(false,false,true);
+            else if (layoutstyle == 5)
+                this.createListBoxItems(false,true,true);
+            else if (layoutstyle == 6)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 7)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 8)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 9)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 10)
+                this.createListBoxItems(true,false,true);
+            else if (layoutstyle == 11)
+                this.createListBoxItems(true,true,true);
+            else if (layoutstyle == 12)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 13)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 14)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 15)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 16)
+                this.createListBoxItems(true,false,true);
+            else if (layoutstyle == 17)
+                this.createListBoxItems(true,true,true);
+        }
+        else if (type == SWT.MULTI)
+        {
+            if (layoutstyle == 0)
+                this.createListBoxItems(false,false,false);
+            else if (layoutstyle == 1)
+                this.createListBoxItems(false,true,false);
+            else if (layoutstyle == 2)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 3)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 4)
+                this.createListBoxItems(true,false,false);
+            else if (layoutstyle == 5)
+                this.createListBoxItems(true,true,false);
+            else if (layoutstyle == 6)
+                this.createListBoxItems(true,false,true);
+            else if (layoutstyle == 7)
+                this.createListBoxItems(true,true,true);
+        }
+        this.listBox.setDataModel(items);
+        this.listBox.addSelectionListener(this);
+
+        this.listBox.setLayoutData(new RowData(this.shell.getBounds().width,(this.shell.getBounds().height)-(this.itemNum.getBounds().height*3)-30));
+        this.setMenuToList();
+        this.shell.layout();
+    }
+
+    private void createListBoxItems(boolean head, boolean detailIcon, boolean headIcon)
+    {
+        for (int i = 0; i < items.length; i++)
+        {
+            items[i] = new ListBoxItem("detail "+(i+1),null,null,null);
+            if (head)
+                items[i].setHeadingText("head "+(i+1));
+            if (detailIcon)
+                items[i].setDetailIcons(this.detailImages);
+            if (headIcon)
+                items[i].setHeadingIcons(this.headImages);
+        }
+    }
+    private void createEmptyListBox()
+    {
+        this.items = new ListBoxItem[0];
+    }
+
+    private void clearListBoxItems()
+    {
+
+        for (int i = 0; i < items.length; i++)
+        {
+            items[i] = null;
+        }
+
+    }
+
+    private void setMenuToList()
+    {
+        Command remove = new Command(this.listBox, Command.COMMANDGROUP,0);
+        remove.setText("Clear");
+
+        this.CMDREMOVE = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVE.setText("Selected");
+        this.CMDREMOVE.addSelectionListener(this);
+
+        this.CMDREMOVEALL = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVEALL.setText("All");
+        this.CMDREMOVEALL.addSelectionListener(this);
+
+        this.CMDEMPTY = new Command(remove, Command.GENERAL, 0);
+        this.CMDEMPTY.setText("Empty ListBox");
+        this.CMDEMPTY.addSelectionListener(this);
+
+        Command select = new Command(this.listBox, Command.COMMANDGROUP,0);
+        select.setText("Select");
+
+        this.CMDSELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECT.setText("Focused");
+        this.CMDSELECT.addSelectionListener(this);
+
+        this.CMDSELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECTALL.setText("All");
+        this.CMDSELECTALL.addSelectionListener(this);
+
+        this.CMDDESELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECT.setText("Deselect");
+        this.CMDDESELECT.addSelectionListener(this);
+
+        this.CMDDESELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECTALL.setText("Deselect all");
+        this.CMDDESELECTALL.addSelectionListener(this);
+
+        Command font = new Command(this.listBox, Command.COMMANDGROUP,0);
+        font.setText("Font");
+
+        this.CMDFONT = new Command(font, Command.GENERAL, 0);
+        this.CMDFONT.setText("Detail");
+        this.CMDFONT.addSelectionListener(this);
+
+        this.CMDHEADFONT = new Command(font, Command.GENERAL, 0);
+        this.CMDHEADFONT.setText("Head");
+        this.CMDHEADFONT.addSelectionListener(this);
+
+        Command set = new Command(this.listBox, Command.COMMANDGROUP,0);
+        set.setText("Set");
+
+        this.CMDSET_IMAGE = new Command(set, Command.GENERAL,0);
+        this.CMDSET_IMAGE.setText("Image");
+        this.CMDSET_IMAGE.addSelectionListener(this);
+
+        this.CMDSET_EMPTY = new Command(set, Command.GENERAL,0);
+        this.CMDSET_EMPTY.setText("Empty");
+        this.CMDSET_EMPTY.addSelectionListener(this);
+
+        this.CMDSET_LONG = new Command(set, Command.GENERAL,0);
+        this.CMDSET_LONG.setText("Long text");
+        this.CMDSET_LONG.addSelectionListener(this);
+
+        this.CMDSET_SPECIAL = new Command(set, Command.GENERAL,0);
+        this.CMDSET_SPECIAL.setText("Special chars");
+        this.CMDSET_SPECIAL.addSelectionListener(this);
+    }
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            this.tooltip.setVisible(false);
+            if (event.widget == this.CMDSINGLE)
+            {
+                // create a single list
+                this.createListBox(SWT.SINGLE, this.singlestyleCounter);
+                return;
+            }
+            if (event.widget == this.CMDMULTI)
+            {
+                // create a multi list
+                this.createListBox(SWT.MULTI, this.multistyleCounter);
+                return;
+            }
+            if (event.widget == this.CMDENABLETEXT)
+            {
+                // enable text control
+                this.itemNum.setEnabled(true);
+                return;
+            }
+            if (event.widget == this.CMDDISABLETEXT)
+            {
+                // disable text control
+                this.itemNum.setEnabled(false);
+                return;
+            }
+            if (event.widget == this.CMDNEXTSTYLE)
+            {
+                if (this.listType == SWT.SINGLE)
+                {
+                    if (this.singlestyleCounter == this.single_styles.length-1)
+                    {
+                        this.singlestyleCounter = 0;
+                    }
+                    else
+                    {
+                        this.singlestyleCounter++;
+                    }
+                    this.createListBox(SWT.SINGLE,singlestyleCounter);
+                }
+                else
+                {
+                    if (this.multistyleCounter == this.multi_styles.length-1)
+                    {
+                        this.multistyleCounter = 0;
+                    }
+                    else
+                    {
+                        this.multistyleCounter++;
+                    }
+                    this.createListBox(SWT.MULTI,this.multistyleCounter);
+                }
+                return;
+
+            }
+            if (event.widget == this.CMDPREVSTYLE)
+            {
+                if (this.listType == SWT.SINGLE)
+                {
+                    if (this.singlestyleCounter == 0)
+                    {
+                        this.singlestyleCounter = 0;
+                    }
+                    else
+                    {
+                        this.singlestyleCounter--;
+                    }
+                    this.createListBox(SWT.SINGLE,singlestyleCounter);
+                }
+                else
+                {
+                    if (this.multistyleCounter == 0)
+                    {
+                        this.multistyleCounter = 0;
+                    }
+                    else
+                    {
+                        this.multistyleCounter--;
+                    }
+                    this.createListBox(SWT.MULTI,this.multistyleCounter);
+                }
+                return;
+            }
+            if (listBox != null)
+            {
+                int index = this.listBox.getFocusIndex();
+                int indeces[] = this.listBox.getSelectionIndices();
+
+                if (event.widget == this.CMDREMOVE)
+                {
+                    // remove items
+                    if (this.listType == SWT.SINGLE)
+                    {
+                        this.items[index] = null;
+                    }
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                        {
+                            this.items[indeces[i]] = null;
+                        }
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDREMOVEALL)
+                {
+//                   remove all items
+                    try
+                    {
+                        // set items array full of null
+                        this.clearListBoxItems();
+                        this.listBox.setDataModel(items);
+                    }
+                    catch (Exception ex)
+                    {
+                        // show a messagebox about the exception
+                        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                        mb.setText("Exception");
+                        mb.setMessage(ex.getMessage());
+                        mb.open();
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDEMPTY)
+                {
+                    //create empty list
+                    try
+                    {
+                        // size of ListBoxItem[] is 0.
+                        this.createEmptyListBox();
+                        this.listBox.setDataModel(items);
+                    }
+                    catch (Exception ex)
+                    {
+                        // show a messagebox about the exception
+                        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                        mb.setText("Exception");
+                        mb.setMessage(ex.getMessage());
+                        mb.open();
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDSELECT)
+                {
+                    // select items
+                    this.listBox.select(index);
+
+                }
+                else if (event.widget == this.CMDSELECTALL)
+                {
+                    // select all items
+                    this.listBox.selectAll();
+
+                }
+                else if (event.widget == this.CMDDESELECT)
+                {
+                    // deselect items
+                    this.listBox.deselect(index);
+
+                }
+                else if (event.widget == this.CMDDESELECTALL)
+                {
+                    // deselect all items
+                    this.listBox.deselectAll();
+
+                }
+                else if (event.widget == this.CMDFONT)
+                {
+                    // set font to items
+                    FontDialog dlg = new FontDialog(this.shell);
+                    Font font = new Font(this.display,dlg.open());
+                    this.listBox.setFont(font);
+                }
+                else if (event.widget == this.CMDHEADFONT)
+                {
+                    // set heading font to items
+                    FontDialog dlg = new FontDialog(this.shell);
+                    Font font = new Font(this.display,dlg.open());
+                    this.listBox.setHeadingFont(font);
+                }
+                else if (event.widget == this.CMDSET_LONG)
+                {
+                    //
+                    if (items.length > 3)
+                    {
+                        this.items[0].setDetailText("Item's text is changed to long so wrapping can be tested");
+                        this.items[1].setHeadingText("Item's text is changed to long so wrapping can be tested");
+                        this.items[2].setDetailText("Item's text is changed to long so wrapping can be tested");
+                        this.items[2].setHeadingText("Item's text is changed to long so wrapping can be tested");
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDSET_EMPTY)
+                {
+                    //
+                    if (items.length > 3)
+                    {
+                        this.items[0].setDetailText("");
+                        this.items[1].setHeadingText("");
+                        this.items[2].setDetailText("");
+                        this.items[2].setHeadingText("");
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDSET_SPECIAL)
+                {
+                    //
+                    //
+                    if (items.length > 3)
+                    {
+                        this.items[0].setDetailText("? \n \t %&@#£$ !!!");
+                        this.items[1].setHeadingText("? \n \t %&@#£$ !!!");
+                        this.items[2].setDetailText("? \n \t %&@#£$ !!!");
+                        this.items[2].setHeadingText("? \n \t %&@#£$ !!!");
+                    }
+                    this.listBox.refreshList();
+                }
+                else if (event.widget == this.CMDSET_IMAGE)
+                {
+                    if (items.length > 3)
+                    {
+
+                        Image[] setImages = new Image[1];
+                        setImages[0] = this.transImage;
+                        this.items[0].setDetailIcons(setImages);
+
+                        Image[] setImages2 = new Image[1];
+                        setImages2[0] = this.labelImage;
+                        this.items[1].setDetailIcons(setImages2);
+
+                        Image[] setImages3 = new Image[1];
+                        setImages3[0] = this.largeImage;
+                        this.items[2].setDetailIcons(setImages3);
+
+                        Image[] setImages4 = new Image[1];
+                        setImages4[0] = this.transImage;
+                        this.items[0].setHeadingIcons(setImages4);
+
+                        Image[] setImages5 = new Image[1];
+                        setImages5[0] = this.largeImage;
+                        this.items[1].setHeadingIcons(setImages5);
+
+                        Image[] setImages6 = new Image[1];
+                        setImages6[0] = this.smallImage;
+                        this.items[2].setHeadingIcons(setImages6);
+
+                    }
+                    this.listBox.refreshList();
+                }
+
+            }
+
+        }
+        if (event.widget instanceof ListBox)
+        {
+            ListBoxItem item = this.items[this.listBox.getFocusIndex()];
+            if (item != null)
+                this.updateToolTip("Selection"+item.getDetailText());
+        }
+        super.widgetSelected(event);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof ListBox)
+        {
+            ListBoxItem item = this.items[this.listBox.getFocusIndex()];
+            if (item != null)
+                updateToolTip("Default"+this.items[this.listBox.getFocusIndex()].getDetailText());
+        }
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(Display.getCurrent().getBounds().width/2, Display.getCurrent().getBounds().height/2);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListBoxTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListTestMidletSuite/build.xml	Tue May 25 12:34:19 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: 
+#
+-->
+
+<project name="ListTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="LinkTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.list.ListTestMIDlet_01"/>
+    <property name="midlet2.name" value="LinkTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.list.ListTestMIDlet_02"/>
+    <property name="midlet3.name" value="LinkTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.list.ListTestMIDlet_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ListTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,242 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.list;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the list component
+ * - creating single list
+ * - creating multi list
+ * - navigating and scrolling in lists
+ */
+public class ListTestMIDlet_01 extends TestBaseMIDlet
+{
+    private MenuItem cmdSingle = null;
+    private MenuItem cmdMulti = null;
+    /** constrainedtext instance - number of items */
+    private ConstrainedText itemNum = null;
+    /** list instance */
+    private List list = null;
+    /** */
+    private Shell tooltip = null;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("List 1");
+        this.shell.setLayout(new GridLayout(2, true));
+
+        // "no. of items:" label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("No. of items:");
+        label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+        // input field for "no. of items:"
+        this.itemNum = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.itemNum.setTextLimit(2);
+        this.itemNum.setText(String.valueOf(0));
+        this.itemNum.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+        this.list = new List(this.shell, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+        this.list.setItems(new String[] {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"});
+        this.list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        this.list.addSelectionListener(this);
+        this.shell.layout();
+        this.createToolTip("");
+
+        // "single list" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 1);
+        cmd.setText("Single List");
+        cmd.addSelectionListener(this);
+        // "multi list" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Multi List");
+        cmd.addSelectionListener(this);
+
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Enable Text");
+        cmd.addSelectionListener(this);
+
+        cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Disable Text");
+        cmd.addSelectionListener(this);
+    }
+
+    /**
+     * create a list on the shell
+     * @param type the typ of the list
+     */
+    private void createList(int type)
+    {
+        try
+        {
+            // dispose previous list
+            if (this.list != null && !this.list.isDisposed())
+                this.list.dispose();
+            // create the list
+            this.list = new List(this.shell, type | SWT.V_SCROLL);
+            for (int i = 0; i < Integer.parseInt(this.itemNum.getText()); i++)
+                this.list.add("Item "+(i+1));
+            this.list.addSelectionListener(this);
+
+            this.list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+            Menu mainmenu = new Menu(this.list);
+            this.cmdSingle = new MenuItem(mainmenu, SWT.PUSH);
+            cmdSingle.setText("Single List");
+            cmdSingle.addSelectionListener(this);
+            this.cmdMulti = new MenuItem(mainmenu, SWT.PUSH);
+            cmdMulti.setText("Multi List");
+            cmdMulti.addSelectionListener(this);
+            this.list.setMenu(mainmenu);
+            this.shell.layout();
+            this.shell.update();
+        }
+        catch (Exception ex)
+        {
+            this.updateToolTip(ex.getMessage());
+        }
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            this.tooltip.setVisible(false);
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Single List".equals(scmd))
+            {
+                // create a single list
+                this.createList(SWT.SINGLE);
+                return;
+            }
+            if ("Multi List".equals(scmd))
+            {
+                // create a multi list
+                this.createList(SWT.MULTI);
+                return;
+            }
+        }
+        if (event.widget instanceof Command)
+        {
+            this.tooltip.setVisible(false);
+            String scmd = ((Command) event.widget).getText();
+            if ("Single List".equals(scmd))
+            {
+                // create a single list
+                this.createList(SWT.SINGLE);
+                return;
+            }
+            if ("Multi List".equals(scmd))
+            {
+                // create a multi list
+                this.createList(SWT.MULTI);
+                return;
+            }
+            if ("Enable Text".equals(scmd))
+            {
+                // enable text control
+                this.itemNum.setEnabled(true);
+                return;
+            }
+            if ("Disable Text".equals(scmd))
+            {
+                // enable text control
+                this.itemNum.setEnabled(false);
+                return;
+            }
+        }
+        else if (event.widget instanceof List)
+        {
+            updateToolTip("Sel: "+ this.list.getItem(this.list.getFocusIndex()));
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+
+        updateToolTip("Def: "+this.list.getItem(this.list.getFocusIndex()));
+
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(5, 5);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.list;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the list component
+ * - adding item to single list
+ * - removing item from single list
+ * - setting items in single list
+ */
+public class ListTestMIDlet_02 extends TestBaseMIDlet
+{
+    /** text instance */
+    private Text newItem = null;
+    /** list instance */
+    private List list = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("List 2");
+        this.shell.setLayout(new GridLayout(1, true));
+
+//      set up the default list
+        this.list = new List(this.shell, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+        this.list.setItems(new String[] {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"});
+        this.list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        // "new item:" label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("New item:");
+        label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+        // input field for "new:"
+        this.newItem = new Text(this.shell, SWT.BORDER);
+        this.newItem.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "add" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Add");
+        item.setMenu(menu);
+        // "add / before" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Before");
+        item.addSelectionListener(this);
+        // "add / after" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("After");
+        item.addSelectionListener(this);
+        // "remove" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Remove");
+        item.setMenu(menu);
+        // "remove / selected" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Selected");
+        item.addSelectionListener(this);
+        // "remove / all" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("All");
+        item.addSelectionListener(this);
+        // "set" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set");
+        item.setMenu(menu);
+        // "set / selected" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Selected");
+        item.addSelectionListener(this);
+        // "set / defaults" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Defaults");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            int index = this.list.getFocusIndex();
+            if ("Before".equals(scmd))
+            {
+                // add an item before the selected item
+                if (index == -1)
+                    index = 0;
+                this.list.add(this.newItem.getText(), index);
+                return;
+            }
+            if ("After".equals(scmd))
+            {
+                // add an item after the selected item
+                this.list.add(this.newItem.getText(), index+1);
+                return;
+            }
+            if ("Selected".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Remove".equals(scmd))
+                {
+                    // remove the selected item
+                    if (index != -1)
+                        this.list.remove(index);
+                    return;
+                }
+                if ("Set".equals(scmd))
+                {
+                    // set the selected item
+                    if (index != -1)
+                        this.list.setItem(index, this.newItem.getText());
+                    return;
+                }
+            }
+            if ("All".equals(scmd))
+            {
+                // remove all items
+                this.list.removeAll();
+                return;
+            }
+            if ("Defaults".equals(scmd))
+            {
+                // set the list items to the dafaults
+                this.list.setItems(new String[] {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"});
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/list/ListTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,223 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.list;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the list component
+ * - adding item to multiple list
+ * - removing item from multi list
+ * - setting items in multiple list
+ * - selecting items in multiple list
+ */
+public class ListTestMIDlet_03 extends TestBaseMIDlet
+{
+    /** text instance */
+    private Text newItem = null;
+    /** list instance */
+    private List list = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("List 3");
+        this.shell.setLayout(new GridLayout(1, true));
+
+        // set up the default List
+        this.list = new List(this.shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
+        this.list.setItems(new String[] {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"});
+        this.list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        // "new item:" label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("New item:");
+        label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+        // input field for "new:"
+        this.newItem = new Text(this.shell, SWT.BORDER);
+        this.newItem.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "add" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Add");
+        item.setMenu(menu);
+        // "add / before" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Before");
+        item.addSelectionListener(this);
+        // "add / after" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("After");
+        item.addSelectionListener(this);
+        // "remove" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Remove");
+        item.setMenu(menu);
+        // "remove / selected" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Selected");
+        item.addSelectionListener(this);
+        // "remove / all" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("All");
+        item.addSelectionListener(this);
+        // "select" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Select");
+        item.setMenu(menu);
+        // "select / focused" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Focused");
+        item.addSelectionListener(this);
+        // "select / all" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("All");
+        item.addSelectionListener(this);
+        // "select / deselect" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Deselect");
+        item.addSelectionListener(this);
+        // "select / none" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("None");
+        item.addSelectionListener(this);
+        // "set" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set");
+        item.setMenu(menu);
+        // "set / selected" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Selected");
+        item.addSelectionListener(this);
+        // "set / defaults" menuitem
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Defaults");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            int[] index = this.list.getSelectionIndices();
+            if ("Before".equals(scmd))
+            {
+                // add an item before the selected item(s)
+                if (index.length > 0)
+                    for (int i = index.length-1; i >= 0; i--)
+                        this.list.add(this.newItem.getText(), index[i]);
+                return;
+            }
+            if ("After".equals(scmd))
+            {
+                // add an item after the selected item(s)
+                if (index.length > 0)
+                    for (int i = index.length-1; i >= 0; i--)
+                        this.list.add(this.newItem.getText(), index[i]+1);
+                return;
+            }
+            if ("Selected".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Remove".equals(scmd))
+                {
+                    // remove the selected item(s)
+                    if (index.length > 0)
+                        this.list.remove(index);
+                    return;
+                }
+                if ("Set".equals(scmd))
+                {
+                    // set the selected item(s)
+                    for (int i = 0; i < index.length; i++)
+                        this.list.setItem(index[i], this.newItem.getText());
+                    return;
+                }
+            }
+            if ("Focused".equals(scmd))
+            {
+                // select the focused item
+                int focus = this.list.getFocusIndex();
+                if (focus > -1)
+                    this.list.select(focus);
+                return;
+            }
+            if ("All".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Remove".equals(scmd))
+                {
+                    // remove all items
+                    this.list.removeAll();
+                    return;
+                }
+                if ("Select".equals(scmd))
+                {
+                    // select all items
+                    this.list.selectAll();
+                    return;
+                }
+            }
+            if ("Deselect".equals(scmd))
+            {
+                // deselect the focused item
+                int focus = this.list.getFocusIndex();
+                if (focus > -1)
+                    this.list.deselect(focus);
+                return;
+            }
+            if ("None".equals(scmd))
+            {
+                // deselect all items
+                this.list.deselectAll();
+                return;
+            }
+            if ("Defaults".equals(scmd))
+            {
+                // set the list items to the dafaults
+                this.list.setItems(new String[] {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"});
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListViewTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="ListViewTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ListViewTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.listview.ListViewTestMIDlet_01"/>
+    <property name="midlet2.name" value="ListViewTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.listview.ListViewTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ListViewTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
Binary file javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/medium.jpg has changed
Binary file javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/small.png has changed
Binary file javauis/tsrc/fute/eswt/ListViewTestMidletSuite/res/sphere.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/listview/ListViewTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,582 @@
+/*
+* 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.test.java.eswt.listview;
+
+import javax.microedition.lcdui.Font;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.MobileDevice;
+import org.eclipse.ercp.swt.mobile.Screen;
+import org.eclipse.ercp.swt.mobile.ScreenEvent;
+import org.eclipse.ercp.swt.mobile.ScreenListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ercp.swt.mobile.ListView;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class ListViewTestMIDlet_01 extends TestBaseMIDlet implements  ScreenListener
+{
+
+    /** constrainedtext instance - number of items */
+    private ConstrainedText itemNum = null;
+    /** list instance */
+    private ListView listView = null;
+
+    private Command CMDMULTI = null;
+    private Command CMDSINGLE = null;
+    private Command CMDSINGLE_IMAGE = null;
+    private Command CMDMULTI_IMAGE = null;
+
+    private Command CMDENABLETEXT = null;
+    private Command CMDDISABLETEXT = null;
+
+    private Command CMDREMOVE = null;
+    private Command CMDREMOVELIST = null;
+    private Command CMDREMOVEALL = null;
+    private Command CMDSELECT = null;
+    private Command CMDSELECTALL = null;
+    private Command CMDDESELECT = null;
+    private Command CMDDESELECTALL = null;
+    private Command CMDADD = null;
+
+    private Command CMDSET_IMAGE = null;
+    private Command CMDSET_TRANSIMAGE = null;
+    private Command CMDSET_EMPTY = null;
+    private Command CMDSET_LONG = null;
+    private Command CMDSET_SPECIAL = null;
+
+    private Command CMDSETSELECT = null;
+    private Command CMDSETSELECTALL = null;
+    private Command CMDSETSELECTINDECS = null;
+    private Command CMDSETSELECTSTRING = null;
+
+    private Command CMDDENSITY_LOW = null;
+    private Command CMDDENSITY_MEDIUM = null;
+    private Command CMDDENSITY_HIGH = null;
+
+    private MenuItem cmdSingle = null;
+    private MenuItem cmdMulti = null;
+    /** custom image for the Listview */
+    private Image smallImage = null;
+    /** custom large image for the Listview */
+    private Image largeImage = null;
+    /** custom transparent image for the Listview */
+    private Image transImage = null;
+
+    private Shell tooltip = null;
+
+    private MobileDevice iDevice;
+    private Screen iScreen;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+
+        // customize the shell
+        this.shell.setText("ListView 1");
+        this.shell.setLayout(new RowLayout());
+        iDevice = MobileDevice.getMobileDevice();
+        this.iScreen = iDevice.getScreens()[0];
+        iScreen.addEventListener(this);
+        // try to initialize the image
+        try
+        {
+            this.smallImage = new Image(this.display, this.getClass().getResourceAsStream("/small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.smallImage = null;
+        }
+
+        try
+        {
+            this.largeImage = new Image(this.display, this.getClass().getResourceAsStream("/medium.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.largeImage = null;
+        }
+        try
+        {
+            this.transImage = new Image(this.display, this.getClass().getResourceAsStream("/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.transImage = null;
+        }
+
+        this.createToolTip("");
+        // "no. of items:" label
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("No. of items:");
+        label.setLayoutData(new RowData());
+        // input field for "no. of items:"
+        this.itemNum = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.itemNum.setTextLimit(3);
+        this.itemNum.setText(String.valueOf(0));
+        this.itemNum.setLayoutData(new RowData(70,SWT.DEFAULT));
+
+        // "single listview" left softkey command
+        this.CMDSINGLE = new Command(this.shell, Command.SELECT, 1);
+        this.CMDSINGLE.setText("Single ListView");
+        this.CMDSINGLE.addSelectionListener(this);
+        // "multi listview" left softkey command
+        this.CMDMULTI = new Command(this.shell, Command.OK, 0);
+        this.CMDMULTI.setText("Multi ListView");
+        this.CMDMULTI.addSelectionListener(this);
+        // "single listview" left softkey command
+        this.CMDSINGLE_IMAGE = new Command(this.shell, Command.OK, 0);
+        this.CMDSINGLE_IMAGE.setText("Single ListView with image");
+        this.CMDSINGLE_IMAGE.addSelectionListener(this);
+        // "multi listview" left softkey command
+        this.CMDMULTI_IMAGE = new Command(this.shell, Command.SELECT, 0);
+        this.CMDMULTI_IMAGE.setText("Multi ListView with image");
+        this.CMDMULTI_IMAGE.addSelectionListener(this);
+
+        this.CMDENABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDENABLETEXT.setText("Enable Text");
+        this.CMDENABLETEXT.addSelectionListener(this);
+
+        this.CMDDISABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDDISABLETEXT.setText("Disable Text");
+        this.CMDDISABLETEXT.addSelectionListener(this);
+
+        Command density = new Command(this.shell, Command.COMMANDGROUP,0);
+        density.setText("Density");
+
+        this.CMDDENSITY_LOW = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_LOW.setText("Low");
+        this.CMDDENSITY_LOW.addSelectionListener(this);
+
+        this.CMDDENSITY_MEDIUM = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_MEDIUM.setText("Medium");
+        this.CMDDENSITY_MEDIUM.addSelectionListener(this);
+
+        this.CMDDENSITY_HIGH = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_HIGH.setText("High");
+        this.CMDDENSITY_HIGH.addSelectionListener(this);
+
+        Command remove = new Command(this.shell, Command.COMMANDGROUP,0);
+        remove.setText("Remove");
+
+        this.CMDREMOVE = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVE.setText("Selected");
+        this.CMDREMOVE.addSelectionListener(this);
+
+        this.CMDREMOVELIST = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVELIST.setText("Start");
+        this.CMDREMOVELIST.addSelectionListener(this);
+
+        this.CMDREMOVEALL = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVEALL.setText("All");
+        this.CMDREMOVEALL.addSelectionListener(this);
+
+        Command select = new Command(this.shell, Command.COMMANDGROUP,0);
+        select.setText("Select");
+
+        this.CMDSELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECT.setText("Focused");
+        this.CMDSELECT.addSelectionListener(this);
+
+        this.CMDSELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECTALL.setText("All");
+        this.CMDSELECTALL.addSelectionListener(this);
+
+        this.CMDDESELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECT.setText("Deselect");
+        this.CMDDESELECT.addSelectionListener(this);
+
+        this.CMDDESELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECTALL.setText("Deselect all");
+        this.CMDDESELECTALL.addSelectionListener(this);
+
+        this.CMDADD = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDADD.setText("Add");
+        this.CMDADD.addSelectionListener(this);
+
+        Command set = new Command(this.shell, Command.COMMANDGROUP,0);
+        set.setText("Set");
+
+        this.CMDSET_IMAGE = new Command(set, Command.GENERAL,0);
+        this.CMDSET_IMAGE.setText("Image");
+        this.CMDSET_IMAGE.addSelectionListener(this);
+
+        this.CMDSET_TRANSIMAGE = new Command(set, Command.GENERAL,0);
+        this.CMDSET_TRANSIMAGE.setText("Transparent Image");
+        this.CMDSET_TRANSIMAGE.addSelectionListener(this);
+
+        this.CMDSET_EMPTY = new Command(set, Command.GENERAL,0);
+        this.CMDSET_EMPTY.setText("Empty");
+        this.CMDSET_EMPTY.addSelectionListener(this);
+
+        this.CMDSET_LONG = new Command(set, Command.GENERAL,0);
+        this.CMDSET_LONG.setText("Long text");
+        this.CMDSET_LONG.addSelectionListener(this);
+
+        this.CMDSET_SPECIAL = new Command(set, Command.GENERAL,0);
+        this.CMDSET_SPECIAL.setText("Special chars");
+        this.CMDSET_SPECIAL.addSelectionListener(this);
+
+        Command setSelection = new Command(this.shell, Command.COMMANDGROUP,0);
+        setSelection.setText("Set Selection");
+        this.CMDSETSELECT = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECT.setText("Focused");
+        this.CMDSETSELECT.addSelectionListener(this);
+
+        this.CMDSETSELECTALL = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTALL.setText("All");
+        this.CMDSETSELECTALL.addSelectionListener(this);
+
+        this.CMDSETSELECTINDECS = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTINDECS.setText("Deselect");
+        this.CMDSETSELECTINDECS.addSelectionListener(this);
+
+        this.CMDSETSELECTSTRING = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTSTRING.setText("Deselect all");
+        this.CMDSETSELECTSTRING.addSelectionListener(this);
+    }
+
+    /**
+     * create a listview on the shell
+     * @param type the typ of the listbox
+     */
+    private void createListView(int type, int layoutstyle, boolean image)
+    {
+        // dispose previous listview
+        if (this.listView != null && !this.listView.isDisposed())
+            this.listView.dispose();
+        // create the listview
+        this.listView = new ListView(this.shell, type | SWT.BORDER | SWT.V_SCROLL,layoutstyle);
+        if (image)
+        {
+            for (int i = 0; i < Integer.parseInt(this.itemNum.getText()); i++)
+                this.listView.add("Item "+(i+1), this.smallImage);
+        }
+        else
+        {
+            for (int i = 0; i < Integer.parseInt(this.itemNum.getText()); i++)
+                this.listView.add("Item "+(i+1), null);
+        }
+        this.listView.addSelectionListener(this);
+        this.listView.setLayoutData(new RowData(this.shell.getBounds().width,this.shell.getBounds().height-(this.itemNum.getBounds().height*2)-30));
+        this.listView.pack();
+        Menu mainmenu = new Menu(this.listView);
+        this.cmdSingle = new MenuItem(mainmenu, SWT.PUSH);
+        cmdSingle.setText("Single");
+        cmdSingle.addSelectionListener(this);
+        this.cmdMulti = new MenuItem(mainmenu, SWT.PUSH);
+        cmdMulti.setText("Multi");
+        cmdMulti.addSelectionListener(this);
+        this.listView.setMenu(mainmenu);
+
+        this.shell.layout();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command || event.widget instanceof MenuItem)
+        {
+            if (event.widget == this.CMDSINGLE || event.widget == this.cmdSingle)
+            {
+                // create a single list
+                this.createListView(SWT.SINGLE, ListView.LOW,false);
+                return;
+            }
+            if (event.widget == this.CMDMULTI || event.widget == this.cmdMulti)
+            {
+                // create a multi list
+                this.createListView(SWT.MULTI, ListView.LOW,false);
+                return;
+            }
+            if (event.widget == this.CMDSINGLE_IMAGE)
+            {
+                // create a single list
+                this.createListView(SWT.SINGLE, ListView.LOW,true);
+                return;
+            }
+            if (event.widget == this.CMDMULTI_IMAGE)
+            {
+                // create a multi list
+                this.createListView(SWT.MULTI, ListView.LOW,true);
+                return;
+            }
+            if (event.widget == this.CMDENABLETEXT)
+            {
+                // enable text control
+                this.itemNum.setEnabled(true);
+                return;
+            }
+            if (event.widget == this.CMDDISABLETEXT)
+            {
+                // disable text control
+                this.itemNum.setEnabled(false);
+                return;
+            }
+            if (listView != null)
+            {
+                int index = this.listView.getFocusIndex();
+                int indeces[] = this.listView.getSelectionIndices();
+
+                if (event.widget == this.CMDDENSITY_LOW)
+                {
+                    // enable text control
+                    this.listView.setLayoutDensity(ListView.LOW);
+                    return;
+                }
+                if (event.widget == this.CMDDENSITY_MEDIUM)
+                {
+                    // enable text control
+                    this.listView.setLayoutDensity(ListView.MEDIUM);
+                    return;
+                }
+                if (event.widget == this.CMDDENSITY_HIGH)
+                {
+                    // enable text control
+                    this.listView.setLayoutDensity(ListView.HIGH);
+                    return;
+                }
+                if (event.widget == this.CMDREMOVE)
+                {
+                    // remove items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.remove(index);
+                    else
+                        this.listView.remove(indeces);
+
+                    return;
+                }
+                if (event.widget == this.CMDREMOVELIST)
+                {
+                    // remove items
+                    if (this.listView.getItemCount() > 5)
+                        this.listView.remove(0, 4);
+
+                    return;
+                }
+                if (event.widget == this.CMDREMOVEALL)
+                {
+                    // remove all items
+                    this.listView.removeAll();
+                    return;
+                }
+                if (event.widget == this.CMDSELECT)
+                {
+                    // select items
+                    this.listView.select(index);
+                    return;
+                }
+                if (event.widget == this.CMDSELECTALL)
+                {
+                    // select all items
+                    this.listView.selectAll();
+                    return;
+                }
+                if (event.widget == this.CMDDESELECT)
+                {
+                    // deselect items
+                    this.listView.deselect(index);
+                    return;
+                }
+                if (event.widget == this.CMDDESELECTALL)
+                {
+                    // deselect all items
+                    this.listView.deselectAll();
+                    return;
+                }
+                if (event.widget == this.CMDADD)
+                {
+                    // add items
+                    this.listView.add("Added",null,index);
+
+                    return;
+                }
+                if (event.widget == this.CMDSET_LONG)
+                {
+                    // set long text items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.setItem(index,"Item's text is changed to long so wrapping can be tested",listView.getIcon(index));
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                            this.listView.setItem(indeces[i], "Item's text is changed to long so wrapping can be tested", listView.getIcon(indeces[i]));
+                    }
+                    return;
+                }
+                if (event.widget == this.CMDSET_EMPTY)
+                {
+                    // set empty text items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.setItem(index,"",listView.getIcon(index));
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                            this.listView.setItem(indeces[i], "", listView.getIcon(indeces[i]));
+                    }
+                    return;
+                }
+                if (event.widget == this.CMDSET_SPECIAL)
+                {
+                    // set special text items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.setItem(index,"? \n \t %&@#£$ !!!",listView.getIcon(index));
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                            this.listView.setItem(indeces[i], "?%&@#£$ \n \t !!!", listView.getIcon(indeces[i]));
+                    }
+                    return;
+                }
+
+                if (event.widget == this.CMDSET_IMAGE)
+                {
+                    // set images items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.setItem(index,listView.getItem(index),this.largeImage);
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                            this.listView.setItem(indeces[i], listView.getItem(indeces[i]), this.largeImage);
+                    }
+                    return;
+                }
+                if (event.widget == this.CMDSET_TRANSIMAGE)
+                {
+                    // set images items
+                    if (this.listView.getStyle() == SWT.SINGLE)
+                        this.listView.setItem(index,listView.getItem(index),this.transImage);
+                    else
+                    {
+                        for (int i = 0; i < indeces.length; i++)
+                            this.listView.setItem(indeces[i], listView.getItem(indeces[i]), this.transImage);
+                    }
+                    return;
+                }
+            }
+        }
+        else if (event.widget instanceof ListView)
+        {
+            updateToolTip("Sel: "+ this.listView.getItem(this.listView.getFocusIndex()));
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+
+        updateToolTip("Def: "+this.listView.getItem(this.listView.getFocusIndex()));
+
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(5, 5);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+
+    public void screenActivated(ScreenEvent event)
+    {
+    }
+    public void screenDeactivated(ScreenEvent event)
+    {
+    }
+    public void screenOrientationChanged(ScreenEvent event)
+    {
+        if (this.listView != null)
+        {
+            this.listView.setLayoutData(new RowData(this.shell.getBounds().width,this.shell.getBounds().height-(this.itemNum.getBounds().height*2)-30));
+        }
+        if (this.tooltip != null)
+        {
+            this.tooltip.setLocation(5, 5);
+        }
+        this.shell.layout();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/listview/ListViewTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,957 @@
+/*
+* 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.test.java.eswt.listview;
+
+import java.util.Vector;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.MobileShell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.RowData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ercp.swt.mobile.ListView;
+
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class ListViewTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** list instance */
+    private ListView listView = null;
+
+    protected MobileShell iMobileShell;
+
+    private Command CMDMULTI = null;
+    private Command CMDSINGLE = null;
+    private Command CMDSINGLE_IMAGE = null;
+    private Command CMDMULTI_IMAGE = null;
+
+    private Command CMDENABLETEXT = null;
+    private Command CMDDISABLETEXT = null;
+
+    private Command CMDREMOVE = null;
+    private Command CMDREMOVEALL = null;
+    private Command CMDSELECT = null;
+    private Command CMDSELECTALL = null;
+    private Command CMDDESELECT = null;
+    private Command CMDDESELECTALL = null;
+    private Command CMDADD = null;
+    private Command CMDADDIMAGE = null;
+    private Command CMDADDTRANSIMAGE = null;
+
+    private Command CMDSET_IMAGE = null;
+    private Command CMDSET_TRANSIMAGE = null;
+    private Command CMDSET_EMPTY = null;
+    private Command CMDSET_LONG = null;
+    private Command CMDSET_SPECIAL = null;
+
+    private Command CMDSETSELECT = null;
+    private Command CMDSETSELECTALL = null;
+    private Command CMDSETSELECTINDECS = null;
+    private Command CMDSETSELECTSTRING = null;
+
+    private Command CMDDENSITY_LOW = null;
+    private Command CMDDENSITY_MEDIUM = null;
+    private Command CMDDENSITY_HIGH = null;
+
+    private Command iExitCommand = null;
+    private Command iSwitchCommand = null;
+
+    /** custom image for the Listview */
+    private Image smallImage = null;
+    /** custom large image for the Listview */
+    private Image largeImage = null;
+    /** custom transparent image for the Listview */
+    private Image transImage = null;
+    /** custom image for the Listview */
+    private Image iImage = null;
+
+    private Shell tooltip = null;
+    private final int NORMAL_ITEM_COUNT = 100;
+    private final int LARGE_ITEM_COUNT = 1000;
+    protected final String IMAGE1 = "/sphere.jpg";
+    protected final String IMAGE2 = "/phone2.jpg";
+    protected final int NUMBER_OF_SAMPLES = 1;
+    protected final String TESTTEXT = "1234567890"; // Note: used also for NUMERIC ConstrainedText test
+    protected final int TESTITEMCOUNT = 10;
+    protected final Point TESTIMAGESIZE = new Point(30, 40);
+    private Vector images = new Vector();
+    private int samples = 0;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+
+        // customize the shell
+        this.shell.setText("ListView 2");
+        this.shell.setLayout(new FillLayout());
+
+        this.iMobileShell = new MobileShell(this.display);
+        this.iMobileShell.setText("MobileShell");
+        this.iExitCommand = new Command(iMobileShell, Command.EXIT, 0);
+        this.iExitCommand.setText("Back");
+        this.iExitCommand.addSelectionListener(this);
+
+        iMobileShell.open();
+        iMobileShell.setVisible(false);
+        // try to initialize the image
+        try
+        {
+            this.smallImage = new Image(this.display, this.getClass().getResourceAsStream("/small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.smallImage = null;
+        }
+
+        try
+        {
+            this.largeImage = new Image(this.display, this.getClass().getResourceAsStream("/medium.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.largeImage = null;
+        }
+        try
+        {
+            this.transImage = new Image(this.display, this.getClass().getResourceAsStream("/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.transImage = null;
+        }
+        // try to initialize the image
+        try
+        {
+            this.iImage = new Image(this.display, this.getClass().getResourceAsStream("/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.smallImage = null;
+        }
+        // "single listview" left softkey command
+        this.CMDSINGLE = new Command(this.shell, Command.SELECT, 1);
+        this.CMDSINGLE.setText("Single ListView");
+        this.CMDSINGLE.addSelectionListener(this);
+        // "multi listview" left softkey command
+        this.CMDMULTI = new Command(this.shell, Command.OK, 0);
+        this.CMDMULTI.setText("Multi ListView");
+        this.CMDMULTI.addSelectionListener(this);
+        // "single listview" left softkey command
+        this.CMDSINGLE_IMAGE = new Command(this.shell, Command.OK, 0);
+        this.CMDSINGLE_IMAGE.setText("Single ListView with image");
+        this.CMDSINGLE_IMAGE.addSelectionListener(this);
+        // "multi listview" left softkey command
+        this.CMDMULTI_IMAGE = new Command(this.shell, Command.SELECT, 0);
+        this.CMDMULTI_IMAGE.setText("Multi ListView with image");
+        this.CMDMULTI_IMAGE.addSelectionListener(this);
+
+        this.CMDENABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDENABLETEXT.setText("Enable Text");
+        this.CMDENABLETEXT.addSelectionListener(this);
+
+        this.CMDDISABLETEXT = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDDISABLETEXT.setText("Disable Text");
+        this.CMDDISABLETEXT.addSelectionListener(this);
+
+        Command density = new Command(this.shell, Command.COMMANDGROUP,0);
+        density.setText("Density");
+
+        this.CMDDENSITY_LOW = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_LOW.setText("Low");
+        this.CMDDENSITY_LOW.addSelectionListener(this);
+
+        this.CMDDENSITY_MEDIUM = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_MEDIUM.setText("Medium");
+        this.CMDDENSITY_MEDIUM.addSelectionListener(this);
+
+        this.CMDDENSITY_HIGH = new Command(density, Command.GENERAL, 0);
+        this.CMDDENSITY_HIGH.setText("High");
+        this.CMDDENSITY_HIGH.addSelectionListener(this);
+
+        Command remove = new Command(this.shell, Command.COMMANDGROUP,0);
+        remove.setText("Remove");
+
+        this.CMDREMOVE = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVE.setText("Selected");
+        this.CMDREMOVE.addSelectionListener(this);
+
+        this.CMDREMOVEALL = new Command(remove, Command.GENERAL, 0);
+        this.CMDREMOVEALL.setText("All");
+        this.CMDREMOVEALL.addSelectionListener(this);
+
+        Command select = new Command(this.shell, Command.COMMANDGROUP,0);
+        select.setText("Select");
+
+        this.CMDSELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECT.setText("Focused");
+        this.CMDSELECT.addSelectionListener(this);
+
+        this.CMDSELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDSELECTALL.setText("All");
+        this.CMDSELECTALL.addSelectionListener(this);
+
+        this.CMDDESELECT = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECT.setText("Deselect");
+        this.CMDDESELECT.addSelectionListener(this);
+
+        this.CMDDESELECTALL = new Command(select, Command.GENERAL, 0);
+        this.CMDDESELECTALL.setText("Deselect all");
+        this.CMDDESELECTALL.addSelectionListener(this);
+
+        this.CMDADD = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDADD.setText("Add");
+        this.CMDADD.addSelectionListener(this);
+
+        this.CMDADDIMAGE = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDADDIMAGE.setText("Add with image");
+        this.CMDADDIMAGE.addSelectionListener(this);
+
+        this.CMDADDTRANSIMAGE = new Command(this.shell, Command.GENERAL, 0);
+        this.CMDADDTRANSIMAGE.setText("Add with trans image");
+        this.CMDADDTRANSIMAGE.addSelectionListener(this);
+
+        Command set = new Command(this.shell, Command.COMMANDGROUP,0);
+        set.setText("Set");
+
+        this.CMDSET_IMAGE = new Command(set, Command.GENERAL,0);
+        this.CMDSET_IMAGE.setText("Image");
+        this.CMDSET_IMAGE.addSelectionListener(this);
+
+        this.CMDSET_TRANSIMAGE = new Command(set, Command.GENERAL,0);
+        this.CMDSET_TRANSIMAGE.setText("Transparent Image");
+        this.CMDSET_TRANSIMAGE.addSelectionListener(this);
+
+        this.CMDSET_EMPTY = new Command(set, Command.GENERAL,0);
+        this.CMDSET_EMPTY.setText("Empty");
+        this.CMDSET_EMPTY.addSelectionListener(this);
+
+        this.CMDSET_LONG = new Command(set, Command.GENERAL,0);
+        this.CMDSET_LONG.setText("Long text");
+        this.CMDSET_LONG.addSelectionListener(this);
+
+        this.CMDSET_SPECIAL = new Command(set, Command.GENERAL,0);
+        this.CMDSET_SPECIAL.setText("Special chars");
+        this.CMDSET_SPECIAL.addSelectionListener(this);
+
+        Command setSelection = new Command(this.shell, Command.COMMANDGROUP,0);
+        setSelection.setText("Set Selection");
+        this.CMDSETSELECT = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECT.setText("Focused");
+        this.CMDSETSELECT.addSelectionListener(this);
+
+        this.CMDSETSELECTALL = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTALL.setText("All");
+        this.CMDSETSELECTALL.addSelectionListener(this);
+
+        this.CMDSETSELECTINDECS = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTINDECS.setText("Deselect");
+        this.CMDSETSELECTINDECS.addSelectionListener(this);
+
+        this.CMDSETSELECTSTRING = new Command(setSelection, Command.GENERAL, 0);
+        this.CMDSETSELECTSTRING.setText("Deselect all");
+        this.CMDSETSELECTSTRING.addSelectionListener(this);
+
+        this.iSwitchCommand = new Command(this.shell, Command.GENERAL, 0);
+        this.iSwitchCommand.setText("MobileShell");
+        this.iSwitchCommand.addSelectionListener(this);
+    }
+
+    /**
+     * create a listview on the shell
+     * @param type the typ of the listbox
+     */
+    private void createListView(int type, int layoutstyle, boolean image)
+    {
+        // dispose previous listview
+        if (this.listView != null && !this.listView.isDisposed())
+            this.listView.dispose();
+
+
+        if (layoutstyle != -1)
+        {
+            // create the listview
+            this.listView = new ListView(this.shell, type | SWT.BORDER | SWT.V_SCROLL,layoutstyle);
+        }
+        else
+        {
+            this.listView = new ListView(this.shell, type);
+        }
+        try
+        {
+            if (image)
+            {
+                for (int i = 0; i < 10; i++)
+                    this.listView.add("Item "+(i+1), this.smallImage);
+            }
+            else
+            {
+                for (int i = 0; i < 8; i++)
+                    this.listView.add("Item "+(i+1), null);
+            }
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+
+        try
+        {
+            this.listView.addSelectionListener(this);
+            this.listView.pack();
+
+            this.shell.layout();
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+    }
+
+    /** * This must NOT printed in actual test run */
+    public void trace(String aMessage)
+    {
+        System.out.println(aMessage);
+    }
+    protected Image getImage()
+    {
+        return iImage;
+    }
+    // Generic interface for item addition testing
+    private abstract class AddlItemInterface
+    {
+        // This is called to add an item to whatever
+        public abstract void add();
+        // This is called between the samples (not timed) to clean up
+        public abstract void cleanUp();
+    }
+
+    // Pass in the interface and how many items to create in each sample
+    private void testAddingItems(AddlItemInterface control, int itemCount)
+    {
+        this.iMobileShell.layout();
+
+        // Event flush before starting the test
+        while (Display.getCurrent().readAndDispatch()) {}
+
+        for (int i = 0; i < 1; ++i)
+        {
+            for (int item = 0; item < itemCount; ++item)
+            {
+                control.add();
+            }
+
+            // Event flush, dispatching events caused by each sample is included in the test time
+            while (Display.getCurrent().readAndDispatch()) {}
+
+            control.cleanUp();
+
+            // Event flush, events possibly caused by cleanUp
+            while (Display.getCurrent().readAndDispatch()) {}
+        }
+    }
+    // Helper, tests appending item to the end of a list
+    String stringItems[] = null;
+    Image[] listViewImages;
+    Image listViewImage;
+    public void testAppendingListViewItemAtIndex(int index, int style)
+    {
+        listViewImage = getImage();
+        listView = new ListView(this.iMobileShell, style);
+        stringItems = new String[index];
+        listViewImages = new Image[index];
+        for (int i = 0; i < index; ++i)
+        {
+            stringItems[i] = new String(TESTTEXT);
+            listViewImages[i] = listViewImage;
+        }
+        listView.setItems(stringItems, listViewImages);
+        testAddingItems(new AddlItemInterface()
+        {
+            public void add()
+            {
+                listView.add(TESTTEXT, listViewImage);
+            }
+            public void cleanUp()
+            {
+                // The whole list is disposed so that item memory is not preallocated from the last sample
+                int style = listView.getStyle();
+                listView.dispose();
+                listView = new ListView(iMobileShell, style);
+                listView.setItems(stringItems, listViewImages);
+                iMobileShell.layout();
+            }
+        }, 1);
+    }
+
+    public boolean append1stItemToSingleListView()
+    {
+        trace("\n [ListPopulatingTest]append1stItemToSingleListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(0, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append100thItemToSingleListView()
+    {
+        trace("\n [ListPopulatingTest]append100thItemToSingleListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(99, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append1000thItemToSingleListView()
+    {
+        trace("\n [ListPopulatingTest]append1000thItemToSingleListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(999, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append10000thItemToSingleListView()
+    {
+        trace("\n [ListPopulatingTest]append10000thItemToSingleListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(9999, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append1stItemToMultiListView()
+    {
+        trace("\n [ListPopulatingTest]append1stItemToMultiListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(0, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append100thItemToMultiListView()
+    {
+        trace("\n [ListPopulatingTest]append100thItemToMultiListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(99, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append1000thItemToMultiListView()
+    {
+        trace("\n [ListPopulatingTest]append1000thItemToMultiListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(999, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean append10000thItemToMultiListView()
+    {
+        trace("\n [ListPopulatingTest]append10000thItemToMultiListView");
+        try
+        {
+            testAppendingListViewItemAtIndex(9999, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    // Helper, tests populating the list by adding in a loop
+    private void testAddingItemsToListViewInALoop(int nItems, int style)
+    {
+        listViewImage = getImage();
+        listView = new ListView(this.iMobileShell, style);
+        testAddingItems(new AddlItemInterface()
+        {
+            public void add()
+            {
+                listView.add(TESTTEXT, listViewImage);
+            }
+            public void cleanUp()
+            {
+                // The whole list is disposed so that item memory is not preallocated from the last sample
+                int style = listView.getStyle();
+                listView.dispose();
+                listView = new ListView(iMobileShell, style);
+                iMobileShell.layout();
+            }
+        }, nItems);
+    }
+
+    public boolean appendNormalNumberOfItemsToSingleViewListInALoop()
+    {
+        trace("\n [ListPopulatingTest]appendNormalNumberOfItemsToSingleViewListInALoop");
+        try
+        {
+            testAddingItemsToListViewInALoop(NORMAL_ITEM_COUNT, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean appendLargeNumberOfItemsToSingleListViewInALoop()
+    {
+        trace("\n [ListPopulatingTest]appendLargeNumberOfItemsToSingleListViewInALoop");
+        try
+        {
+            testAddingItemsToListViewInALoop(LARGE_ITEM_COUNT, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean appendNormalNumberOfItemsToMultiListViewInALoop()
+    {
+        trace("\n [ListPopulatingTest]appendNormalNumberOfItemsToMultiListViewInALoop");
+        try
+        {
+            testAddingItemsToListViewInALoop(NORMAL_ITEM_COUNT, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean appendLargeNumberOfItemsToMultiListViewInALoop()
+    {
+        trace("\n [ListPopulatingTest]appendLargeNumberOfItemsToMultiListViewInALoop");
+        try
+        {
+            testAddingItemsToListViewInALoop(LARGE_ITEM_COUNT, SWT.MULTI);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+    private int indexToTest = 0;
+    // Helper, tests replacing an item in the list, the most efficient way
+    private void testReplacingListViewItemAtIndex(int index, int style)
+    {
+        indexToTest = index;
+        listView = new ListView(this.iMobileShell, style);
+        stringItems = new String[index + 1];
+        listViewImages = new Image[index + 1];
+        for (int i = 0; i < index + 1; ++i)
+        {
+            stringItems[i] = new String(TESTTEXT);
+            listViewImages[i] = listViewImage;
+        }
+        listView.setItems(stringItems, listViewImages);
+        testAddingItems(new AddlItemInterface()
+        {
+            public void add()
+            {
+                listView.setItem(indexToTest, TESTTEXT, listViewImage);
+            }
+            public void cleanUp()
+            {
+            }
+        }, 1);
+    }
+
+    public boolean replaceSingleStyleListViewItemAtLastIndex0()
+    {
+        trace("\n [ListPopulatingTest]replaceSingleStyleListViewItemAtLastIndex0");
+        try
+        {
+            testReplacingListViewItemAtIndex(0, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean replaceSingleStyleListViewItemAtLastIndex99()
+    {
+        trace("\n [ListPopulatingTest]replaceSingleStyleListViewItemAtLastIndex99");
+        try
+        {
+            testReplacingListViewItemAtIndex(99, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    public boolean replaceSingleStyleListViewItemAtLastIndex999()
+    {
+        trace("\n [ListPopulatingTest]replaceSingleStyleListViewItemAtLastIndex999");
+        try
+        {
+            testReplacingListViewItemAtIndex(999, SWT.SINGLE);
+        }
+        catch (Exception ex)
+        {
+            ex.printStackTrace();
+        }
+        return true;
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            try
+            {
+                if (event.widget == this.CMDSINGLE)
+                {
+                    // create a single list
+                    this.createListView(SWT.SINGLE, -1,false);
+                    return;
+                }
+                if (event.widget == this.CMDMULTI)
+                {
+                    // create a multi list
+                    this.createListView(SWT.MULTI, ListView.HIGH,false);
+                    return;
+                }
+                if (event.widget == this.CMDSINGLE_IMAGE)
+                {
+                    // create a single list
+                    this.createListView(SWT.SINGLE, ListView.MEDIUM,true);
+                    return;
+                }
+                if (event.widget == this.CMDMULTI_IMAGE)
+                {
+                    // create a multi list
+                    this.createListView(SWT.MULTI, ListView.LOW,true);
+                    return;
+                }
+                if (listView != null)
+                {
+                    int index = this.listView.getFocusIndex();
+                    int indeces[] = this.listView.getSelectionIndices();
+
+                    if (event.widget == this.CMDDENSITY_LOW)
+                    {
+                        // enable text control
+                        this.listView.setLayoutDensity(ListView.LOW);
+                        return;
+                    }
+                    if (event.widget == this.CMDDENSITY_MEDIUM)
+                    {
+                        // enable text control
+                        this.listView.setLayoutDensity(ListView.MEDIUM);
+                        return;
+                    }
+                    if (event.widget == this.CMDDENSITY_HIGH)
+                    {
+                        // enable text control
+                        this.listView.setLayoutDensity(ListView.HIGH);
+                        return;
+                    }
+                    if (event.widget == this.CMDREMOVE)
+                    {
+                        // remove items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.remove(index);
+                        else
+                            this.listView.remove(indeces);
+
+                        return;
+                    }
+                    if (event.widget == this.CMDREMOVEALL)
+                    {
+                        // remove all items
+                        this.listView.removeAll();
+                        return;
+                    }
+                    if (event.widget == this.CMDSELECT)
+                    {
+                        // select items
+                        this.listView.select(index);
+                        return;
+                    }
+                    if (event.widget == this.CMDSELECTALL)
+                    {
+                        // select all items
+                        this.listView.selectAll();
+                        return;
+                    }
+                    if (event.widget == this.CMDDESELECT)
+                    {
+                        // deselect items
+                        this.listView.deselect(index);
+                        return;
+                    }
+                    if (event.widget == this.CMDDESELECTALL)
+                    {
+                        // deselect all items
+                        this.listView.deselectAll();
+                        return;
+                    }
+                    if (event.widget == this.CMDADD)
+                    {
+                        // add items
+                        this.listView.add("Added",null,index);
+
+                        return;
+                    }
+                    if (event.widget == this.CMDADDIMAGE)
+                    {
+                        // add items
+                        this.listView.add("Added",this.largeImage);
+
+                        return;
+                    }
+                    if (event.widget == this.CMDADDTRANSIMAGE)
+                    {
+                        // add items
+                        this.listView.add("Added",this.transImage);
+
+                        return;
+                    }
+                    if (event.widget == this.CMDSET_LONG)
+                    {
+                        // set long text items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.setItem(index,"Item's text is changed to long so wrapping can be tested",listView.getIcon(index));
+                        else
+                        {
+                            for (int i = 0; i < indeces.length; i++)
+                                this.listView.setItem(indeces[i], "Item's text is changed to long so wrapping can be tested", listView.getIcon(indeces[i]));
+                        }
+                        return;
+                    }
+                    if (event.widget == this.CMDSET_EMPTY)
+                    {
+                        // set empty text items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.setItem(index,"",listView.getIcon(index));
+                        else
+                        {
+                            for (int i = 0; i < indeces.length; i++)
+                                this.listView.setItem(indeces[i], "", listView.getIcon(indeces[i]));
+                        }
+                        return;
+                    }
+                    if (event.widget == this.CMDSET_SPECIAL)
+                    {
+                        // set special text items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.setItem(index,"? \n \t %&@#£$ !!!",listView.getIcon(index));
+                        else
+                        {
+                            for (int i = 0; i < indeces.length; i++)
+                                this.listView.setItem(indeces[i], "?%&@#£$ \n \t !!!", listView.getIcon(indeces[i]));
+                        }
+                        return;
+                    }
+
+                    if (event.widget == this.CMDSET_IMAGE)
+                    {
+                        // set images items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.setItem(index,listView.getItem(index),this.largeImage);
+                        else
+                        {
+                            for (int i = 0; i < indeces.length; i++)
+                                this.listView.setItem(indeces[i], listView.getItem(indeces[i]), this.largeImage);
+                        }
+                        return;
+                    }
+                    if (event.widget == this.CMDSET_TRANSIMAGE)
+                    {
+                        // set images items
+                        if (this.listView.getStyle() == SWT.SINGLE)
+                            this.listView.setItem(index,listView.getItem(index),this.transImage);
+                        else
+                        {
+                            for (int i = 0; i < indeces.length; i++)
+                                this.listView.setItem(indeces[i], listView.getItem(indeces[i]), this.transImage);
+                        }
+                        return;
+                    }
+                    if (event.widget == this.iExitCommand)
+                    {
+                        // set images items
+                        this.iMobileShell.setVisible(false);
+                        this.shell.setVisible(true);
+                        return;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+            }
+            try
+            {
+                if (event.widget == this.iSwitchCommand)
+                {
+                    // set images items
+                    this.shell.setVisible(false);
+                    this.iMobileShell.setVisible(true);
+                    this.append1stItemToSingleListView();
+                    this.append100thItemToSingleListView();
+                    this.append1000thItemToSingleListView();
+                    return;
+                }
+            }
+            catch (Exception ex)
+            {
+                ex.printStackTrace();
+            }
+        }
+        else if (event.widget instanceof ListView)
+        {
+        }
+        super.widgetSelected(event);
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(Display.getCurrent().getBounds().width/2, Display.getCurrent().getBounds().height/2);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ListViewTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MenuTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="MenuTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="MenuTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.menu.MenuTestMIDlet_01"/>
+    <property name="midlet2.name" value="MenuTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.menu.MenuTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="MenuTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/menu/MenuTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,338 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.menu;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the menu and menuitem components
+ * - enabling and disabling menuitems
+ * - menu styles
+ * - menu levels
+ * - menuitem styles
+ * - setting text in menuitems
+ */
+public class MenuTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** "enable" menuitem */
+    private MenuItem mnuEnable = null;
+    /** "disable" menuitem */
+    private MenuItem mnuDisable = null;
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** transparent image */
+    private Image transimg = null;
+
+    private Button topLeftField     = null;
+    private Button topRightField    = null;
+    private Button bottomLeftField  = null;
+    private Button bottomRightField = null;
+
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Menu & MenuItem");
+        // create and set the layout
+        this.shell.setLayout(new FormLayout());
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Transparent image could not be loaded");
+            this.transimg = null;
+        }
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "2nd level" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("2nd level");
+        item.setMenu(menu);
+        // "3rd level" submenu for "2nd level" submenu
+        item = new MenuItem(menu, SWT.CASCADE);
+        menu = new Menu(menu);
+        item.setText("3rd level");
+        item.setMenu(menu);
+        // ""push" menuitem" menuitem for "3rd level" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"Push\" MenuItem");
+        // "4th" menuitem for "3rd level" submenu
+        try
+        {
+            item = new MenuItem(menu, SWT.CASCADE);
+            menu = new Menu(menu);
+            item.setText("4th level");
+            item.setMenu(menu);
+
+            // ""push" menuitem" menuitem for "4th level" submenu
+            item = new MenuItem(menu, SWT.PUSH);
+            item.setText("\"Push\" MenuItem");
+        }
+        catch (Exception ex)
+        {
+            this.showException("Not able to create level 4: "+ ex.toString());
+            menu = null;
+            item = null;
+        }
+        // "5th" menuitem for "5th level" submenu
+        try
+        {
+            item = new MenuItem(menu, SWT.CASCADE);
+            menu = new Menu(menu);
+            item.setText("5th level");
+            item.setMenu(menu);
+
+            // ""push" menuitem" menuitem for "5th level" submenu
+            item = new MenuItem(menu, SWT.PUSH);
+            item.setText("\"Push\" MenuItem");
+        }
+        catch (Exception ex)
+        {
+            this.showException("Not able to create level 5: "+ ex.toString());
+            menu = null;
+            item = null;
+        }
+        // "enabling" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Enabling");
+        item.setMenu(menu);
+        // "enable" menuitem for "enabling" submenu
+        this.mnuEnable = new MenuItem(menu, SWT.PUSH);
+        this.mnuEnable.setText("Enable");
+        this.mnuEnable.addSelectionListener(this);
+        // "disable" menuitem for "enabling" submenu
+        this.mnuDisable = new MenuItem(menu, SWT.PUSH);
+        this.mnuDisable.setText("Disable");
+        this.mnuDisable.setEnabled(false);
+        this.mnuDisable.addSelectionListener(this);
+        // "item style" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Item Style - Check");
+        item.setMenu(menu);
+        // "push item 1" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push Item 1");
+        // "check item 1" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.CHECK);
+        item.setText("Check Item 1");
+        // "check item 2" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.CHECK);
+        item.setText("Check Item 2");
+        // "check item 3" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.CHECK);
+        item.setText("Check Item 3");
+        // "push item 2" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push Item 2");
+
+        // "item style" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Item Style - Radio");
+        item.setMenu(menu);
+        // "push item 1" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push Item");
+        // "radio item 1" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.RADIO);
+        item.setText("Radio Item 1");
+        // "radio item 2" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.RADIO);
+        item.setText("Radio Item 2");
+        // "radio item 3" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.RADIO);
+        item.setText("Radio Item 3");
+        // "push item 2" menuitem for "check" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Push Item 2");
+        // "text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Text");
+        item.setMenu(menu);
+        // ("empty") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("");
+        // ("normal") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        // ("long") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("This is a long text for the menuitem's label. If it does not fit on the display, then it is truncated.");
+
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // ("smallimage") menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setImage(this.smallimg);
+        // ("bigimage") menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setImage(this.bigimg);
+        // ("transparent") menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setImage(this.transimg);
+        // ("image and text") menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("small image");
+        item.setImage(this.smallimg);
+
+        // create Text fields
+        // top left
+        this.topLeftField = new Button(this.shell, SWT.PUSH);
+        this.topLeftField.setText("getMenu()");
+
+        // create and set the layout data
+        FormData tldata = new FormData();
+        tldata.left = new FormAttachment(0, 0);
+        tldata.top = new FormAttachment(0, 0);
+        tldata.right = new FormAttachment(40, 0);
+        this.topLeftField.setLayoutData(tldata);
+
+        // top right
+        this.topRightField = new Button(this.shell, SWT.PUSH);
+        this.topRightField.setText("getMenuBar()");
+        // create and set the layout data
+        FormData trdata = new FormData();
+        trdata.left = new FormAttachment(50, 0);
+        trdata.top = new FormAttachment(0, 0);
+        trdata.right = new FormAttachment(90, 0);
+        this.topRightField.setLayoutData(trdata);
+
+        // bottom left
+        this.bottomLeftField = new Button(this.shell, SWT.PUSH);
+        this.bottomLeftField.setText("Disable");
+        // create and set the layout data
+        FormData bldata = new FormData();
+        bldata.left = new FormAttachment(0, 0);
+        bldata.top = new FormAttachment(50, 0);
+        bldata.right = new FormAttachment(40, 0);
+        this.bottomLeftField.setLayoutData(bldata);
+
+        // top right
+        this.bottomRightField = new Button(this.shell, SWT.PUSH);
+        this.bottomRightField.setText("Enable");
+        // create and set the layout data
+        FormData brdata = new FormData();
+        brdata.left = new FormAttachment(50, 0);
+        brdata.top = new FormAttachment(50, 0);
+        brdata.right = new FormAttachment(90, 0);
+        this.bottomRightField.setLayoutData(brdata);
+
+
+        this.topLeftField.addSelectionListener(this);
+        this.topRightField.addSelectionListener(this);
+        this.bottomLeftField.addSelectionListener(this);
+        this.bottomRightField.addSelectionListener(this);
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        if (event.widget == this.mnuEnable || event.widget == this.mnuDisable)
+        {
+            // excahnge enabled / disabled menuitems
+            this.mnuEnable.setEnabled(!this.mnuEnable.getEnabled());
+            this.mnuDisable.setEnabled(!this.mnuDisable.getEnabled());
+            return;
+        }
+        if (event.widget == this.topLeftField)
+        {
+            this.shell.getMenu().setVisible(true);
+            return;
+        }
+        if (event.widget == this.topRightField)
+        {
+            this.shell.getMenuBar().setVisible(true);
+            return;
+        }
+        if (event.widget == this.bottomLeftField)
+        {
+            this.shell.getMenuBar().setEnabled(false);
+            return;
+        }
+        if (event.widget == this.bottomRightField)
+        {
+            this.shell.getMenuBar().setEnabled(true);
+            return;
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/menu/MenuTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,286 @@
+/*
+* 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.test.java.eswt.menu;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class MenuTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    private Button topLeftField     = null;
+    private Button topRightField    = null;
+    private Button bottomLeftField  = null;
+    private Button bottomRightField = null;
+
+    private Menu menu_1 = null;
+    private Menu menu_2 = null;
+    private Menu menu_3 = null;
+    private Menu menu_4 = null;
+
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** transparent image */
+    private Image transimg = null;
+
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Menu & MenuItem 02");
+        // create and set the layout
+        this.shell.setLayout(new FormLayout());
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Transparent image could not be loaded");
+            this.transimg = null;
+        }
+
+
+        // setup the menu
+        this.menu_1 = new Menu(this.shell, SWT.POP_UP);
+        // "push item 1" menuitem for "check" submenu
+
+        // "2nd level" submenu
+        Menu menu = new Menu(menu_1);
+        MenuItem item = new MenuItem(menu_1, SWT.CASCADE);
+        item.setText("2nd level");
+        item.setMenu(menu);
+        // "3rd level" submenu for "2nd level" submenu
+        item = new MenuItem(menu, SWT.CASCADE);
+        menu = new Menu(menu);
+        item.setText("3rd level");
+        item.setMenu(menu);
+        // ""push" menuitem" menuitem for "3rd level" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("\"Push\" MenuItem");
+        // "4th" menuitem for "3rd level" submenu
+        try
+        {
+            item = new MenuItem(menu, SWT.CASCADE);
+            menu = new Menu(menu);
+            item.setText("4th level");
+            item.setMenu(menu);
+
+            // ""push" menuitem" menuitem for "4th level" submenu
+            item = new MenuItem(menu, SWT.PUSH);
+            item.setText("\"Push\" MenuItem");
+        }
+        catch (Exception ex)
+        {
+            this.showException("Not able to create level 4: "+ ex.toString());
+            menu = null;
+            item = null;
+        }
+        // "5th" menuitem for "5th level" submenu
+        try
+        {
+            item = new MenuItem(menu, SWT.CASCADE);
+            menu = new Menu(menu);
+            item.setText("5th level");
+            item.setMenu(menu);
+
+            // ""push" menuitem" menuitem for "5th level" submenu
+            item = new MenuItem(menu, SWT.PUSH);
+            item.setText("\"Push\" MenuItem");
+        }
+        catch (Exception ex)
+        {
+            this.showException("Not able to create level 5: "+ ex.toString());
+            menu = null;
+            item = null;
+        }
+        // ("empty") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("");
+        // ("normal") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        // ("long") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("This is a long text for the menuitem's label. If it does not fit on the display, then it is truncated.");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("!#¤%&");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("_.,'¨´");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("&/()=?");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("+<>|½");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Extra");
+        // ("special chars") menuitem for "text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Scroll here");
+        // "item style" submenu
+        this.menu_2 = new Menu(this.shell, SWT.POP_UP);
+        // "push item 1" menuitem for "check" submenu
+        item = new MenuItem(menu_2, SWT.PUSH);
+        item.setText("Push Item 1");
+        // "check item 1" menuitem for "check" submenu
+        item = new MenuItem(menu_2, SWT.CHECK);
+        item.setText("Check Item 1");
+        // "check item 2" menuitem for "check" submenu
+        item = new MenuItem(menu_2, SWT.CHECK);
+        item.setText("Check Item 2");
+        // "check item 3" menuitem for "check" submenu
+        item = new MenuItem(menu_2, SWT.CHECK);
+        item.setText("Check Item 3");
+        // "push item 2" menuitem for "check" submenu
+        item = new MenuItem(menu_2, SWT.PUSH);
+        item.setText("Push Item 2");
+
+        // "item style" submenu
+        this.menu_3 = new Menu(this.shell, SWT.POP_UP);
+        // "push item 1" menuitem for "check" submenu
+        item = new MenuItem(menu_3, SWT.PUSH);
+        item.setText("Push Item");
+        // "radio item 1" menuitem for "check" submenu
+        item = new MenuItem(menu_3, SWT.RADIO);
+        item.setText("Radio Item 1");
+        // "radio item 2" menuitem for "check" submenu
+        item = new MenuItem(menu_3, SWT.RADIO);
+        item.setText("Radio Item 2");
+        // "radio item 3" menuitem for "check" submenu
+        item = new MenuItem(menu_3, SWT.RADIO);
+        item.setText("Radio Item 3");
+        // "push item 2" menuitem for "check" submenu
+        item = new MenuItem(menu_3, SWT.PUSH);
+        item.setText("Push Item 2");
+
+        // "image" submenu
+        this.menu_4 = new Menu(this.shell, SWT.POP_UP);
+        // ("smallimage") menuitem for "image" submenu
+        item = new MenuItem(menu_4, SWT.PUSH);
+        item.setImage(this.smallimg);
+        // ("bigimage") menuitem for "image" submenu
+        item = new MenuItem(menu_4, SWT.PUSH);
+        item.setImage(this.bigimg);
+        // ("transparent") menuitem for "image" submenu
+        item = new MenuItem(menu_4, SWT.PUSH);
+        item.setImage(this.transimg);
+        // ("image and text") menuitem for "image" submenu
+        item = new MenuItem(menu_4, SWT.PUSH);
+        item.setText("small image");
+        item.setImage(this.smallimg);
+        this.menu_4.setLocation(0,0);
+        // create Text fields
+        // top left
+        this.topLeftField = new Button(this.shell, SWT.PUSH);
+        this.topLeftField.setText("Extra");
+
+        // create and set the layout data
+        FormData tldata = new FormData();
+        tldata.left = new FormAttachment(0, 0);
+        tldata.top = new FormAttachment(0, 0);
+        tldata.right = new FormAttachment(40, 0);
+        this.topLeftField.setLayoutData(tldata);
+
+        // top right
+        this.topRightField = new Button(this.shell, SWT.PUSH);
+        this.topRightField.setText("Check");
+        // create and set the layout data
+        FormData trdata = new FormData();
+        trdata.left = new FormAttachment(50, 0);
+        trdata.top = new FormAttachment(0, 0);
+        trdata.right = new FormAttachment(90, 0);
+        this.topRightField.setLayoutData(trdata);
+
+        // bottom left
+        this.bottomLeftField = new Button(this.shell, SWT.PUSH);
+        this.bottomLeftField.setText("Radio");
+        // create and set the layout data
+        FormData bldata = new FormData();
+        bldata.left = new FormAttachment(0, 0);
+        bldata.top = new FormAttachment(50, 0);
+        bldata.right = new FormAttachment(40, 0);
+        this.bottomLeftField.setLayoutData(bldata);
+
+        // top right
+        this.bottomRightField = new Button(this.shell, SWT.PUSH);
+        this.bottomRightField.setText("Image");
+        // create and set the layout data
+        FormData brdata = new FormData();
+        brdata.left = new FormAttachment(50, 0);
+        brdata.top = new FormAttachment(50, 0);
+        brdata.right = new FormAttachment(90, 0);
+        this.bottomRightField.setLayoutData(brdata);
+
+        this.menu_2.setLocation(this.bottomRightField.getLocation());
+        this.menu_3.setLocation(this.bottomRightField.getLocation());
+
+        this.topLeftField.setMenu(menu_1);
+        this.topRightField.setMenu(this.menu_2);
+        this.bottomLeftField.setMenu(this.menu_3);
+        this.bottomRightField.setMenu(this.menu_4);
+
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MenuTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="MessageBoxTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="MessageBoxTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.messagebox.MessageBoxTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="MessageBoxTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/src/com/nokia/test/java/eswt/messagebox/MessageBoxTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,320 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.messagebox;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the messagebox component
+ * - changing messagebox content
+ * - creating messagebox
+ * - scrolling in messagebox
+ * - softkey mapping in messagebox
+ */
+public class MessageBoxTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** error messagebox */
+    private MessageBox errmsgbox = null;
+    /** information messagebox */
+    private MessageBox infomsgbox = null;
+    /** question messagebox */
+    private MessageBox qstmsgbox = null;
+    /** warning messagebox */
+    private MessageBox warnmsgbox = null;
+    /** working messagebox */
+    private MessageBox workmsgbox = null;
+    /** label to report the selected softkey */
+    private Label keylabel = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("MessageBox");
+        this.shell.setLayout(new GridLayout());
+
+        // represent the selected softkey
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("SoftKey:");
+        label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        this.keylabel = new Label(this.shell, SWT.NONE);
+        this.keylabel.setText("");
+        this.keylabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // setup the messageboxes
+        this.errmsgbox = new MessageBox(this.shell, SWT.ICON_ERROR | SWT.OK);
+        this.errmsgbox.setText("Error...");
+        this.errmsgbox.setMessage("This is an \"error\" messagebox.");
+        this.infomsgbox = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK | SWT.CANCEL);
+        this.infomsgbox.setText("Information...");
+        this.infomsgbox.setMessage("This is an \"information\" messagebox.");
+        this.qstmsgbox = new MessageBox(this.shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+        this.qstmsgbox.setText("Question...");
+        this.qstmsgbox.setMessage("This is a \"question\" messagebox.");
+        this.warnmsgbox = new MessageBox(this.shell, SWT.ICON_WARNING | SWT.YES | SWT.NO | SWT.CANCEL);
+        this.warnmsgbox.setText("Warning...");
+        this.warnmsgbox.setMessage("This is a \"warning\" messagebox.");
+        this.workmsgbox = new MessageBox(this.shell, SWT.ICON_WORKING | SWT.RETRY | SWT.CANCEL);
+        this.workmsgbox.setText("Working...");
+        this.workmsgbox.setMessage("This is a \"working\" messagebox.");
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "show" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Show");
+        item.setMenu(menu);
+        // "error" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Error");
+        item.addSelectionListener(this);
+        // "information" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Information");
+        item.addSelectionListener(this);
+        // "question" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Question");
+        item.addSelectionListener(this);
+        // "warning" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Warning");
+        item.addSelectionListener(this);
+        // "working" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Working");
+        item.addSelectionListener(this);
+        // "change title" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Change Title");
+        item.setMenu(menu);
+        // "null" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "empty" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Empty");
+        item.addSelectionListener(this);
+        // "short" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Short");
+        item.addSelectionListener(this);
+        // "long" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Long");
+        item.addSelectionListener(this);
+        // "change text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Change Text");
+        item.setMenu(menu);
+        // "null" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "empty" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Empty");
+        item.addSelectionListener(this);
+        // "short" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Short");
+        item.addSelectionListener(this);
+        // "long" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Long");
+        item.addSelectionListener(this);
+    }
+
+    /** display the pressed softkey */
+    private void key(int code)
+    {
+        switch (code)
+        {
+        case SWT.OK:
+            this.keylabel.setText("Ok selected.");
+            break;
+        case SWT.CANCEL:
+            this.keylabel.setText("Cancel selected.");
+            break;
+        case SWT.YES:
+            this.keylabel.setText("Yes selected.");
+            break;
+        case SWT.NO:
+            this.keylabel.setText("No selected.");
+            break;
+        case SWT.RETRY:
+            this.keylabel.setText("Retry selected.");
+            break;
+        default:
+            this.keylabel.setText("Unexpected keycode.");
+            break;
+        }
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Error".equals(scmd))
+            {
+                // display the error mesagebox
+                this.key(this.errmsgbox.open());
+                return;
+            }
+            if ("Information".equals(scmd))
+            {
+                // display the information mesagebox
+                this.key(this.infomsgbox.open());
+                return;
+            }
+            if ("Question".equals(scmd))
+            {
+                // display the question mesagebox
+                this.key(this.qstmsgbox.open());
+                return;
+            }
+            if ("Warning".equals(scmd))
+            {
+                // display the warning mesagebox
+                this.key(this.warnmsgbox.open());
+                return;
+            }
+            if ("Working".equals(scmd))
+            {
+                // display the working mesagebox
+                this.key(this.workmsgbox.open());
+                return;
+            }
+            if ("Null".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                try
+                {
+                    if ("Change Title".equals(scmd))
+                        // try to set the title text to null
+                        this.errmsgbox.setText(null);
+                    if ("Change Text".equals(scmd))
+                        // try to set the message text to null
+                        this.errmsgbox.setMessage(null);
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                    msg.setText("Exception");
+                    msg.setMessage(ex.getMessage());
+                    msg.open();
+                }
+                return;
+            }
+            if ("Empty".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // change titles to an empty text
+                    this.errmsgbox.setText("");
+                    this.infomsgbox.setText("");
+                    this.qstmsgbox.setText("");
+                    this.warnmsgbox.setText("");
+                    this.workmsgbox.setText("");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // change the message text to an empty text
+                    this.errmsgbox.setMessage("");
+                    this.infomsgbox.setMessage("");
+                    this.qstmsgbox.setMessage("");
+                    this.warnmsgbox.setMessage("");
+                    this.workmsgbox.setMessage("");
+                    return;
+                }
+            }
+            if ("Short".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // change titles to a short title
+                    this.errmsgbox.setText("Error...");
+                    this.infomsgbox.setText("Information...");
+                    this.qstmsgbox.setText("Question...");
+                    this.warnmsgbox.setText("Warning...");
+                    this.workmsgbox.setText("Working...");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // change the message text to a short text
+                    this.errmsgbox.setMessage("This is an \"error\" messagebox.");
+                    this.infomsgbox.setMessage("This is an \"information\" messagebox.");
+                    this.qstmsgbox.setMessage("This is a \"question\" messagebox.");
+                    this.warnmsgbox.setMessage("This is a \"warning\" messagebox.");
+                    this.workmsgbox.setMessage("This is a \"working\" messagebox.");
+                    return;
+                }
+            }
+            if ("Long".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // change titles to a long title
+                    this.errmsgbox.setText("Long title for Error messagebox...");
+                    this.infomsgbox.setText("Long title for Information messagebox...");
+                    this.qstmsgbox.setText("Long title for Question messagebox...");
+                    this.warnmsgbox.setText("Long title for Warning messagebox...");
+                    this.workmsgbox.setText("Long title for Working messagebox...");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // change the message text to a long text
+                    this.errmsgbox.setMessage("It should be scrollable in case the whole message text does not fit on the screen. In that case it can be scrolled page by page with the Up and Down keys. The graphic icon within the message box does not scroll and it is always shown on the message box...");
+                    this.infomsgbox.setMessage("It should be scrollable in case the whole message text does not fit on the screen. In that case it can be scrolled page by page with the Up and Down keys. The graphic icon within the message box does not scroll and it is always shown on the message box...");
+                    this.qstmsgbox.setMessage("It should be scrollable in case the whole message text does not fit on the screen. In that case it can be scrolled page by page with the Up and Down keys. The graphic icon within the message box does not scroll and it is always shown on the message box...");
+                    this.warnmsgbox.setMessage("It should be scrollable in case the whole message text does not fit on the screen. In that case it can be scrolled page by page with the Up and Down keys. The graphic icon within the message box does not scroll and it is always shown on the message box...");
+                    this.workmsgbox.setMessage("It should be scrollable in case the whole message text does not fit on the screen. In that case it can be scrolled page by page with the Up and Down keys. The graphic icon within the message box does not scroll and it is always shown on the message box...");
+                    return;
+                }
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MessageBoxTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="MobileShellTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="MobileShellTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.mobileshell.MobileShellTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="MobileShellTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MobileShellTestMidletSuite/src/com/nokia/test/java/eswt/mobileshell/MobileShellTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,576 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.mobileshell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.MobileShell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the mobileshell component
+ * - changing status style of mobileshell
+ * - changing to full screen mode
+ * - set title & image
+ * - creating mobileshell
+ * - setting status text
+ */
+public class MobileShellTestMIDlet_01 extends TestBaseMIDlet implements KeyListener, MouseListener
+{
+    /** menuitems... */
+    private MenuItem mnuNone = null;
+    private MenuItem mnuSmall = null;
+    private MenuItem mnuLarge = null;
+    private MenuItem mnuShell = null;
+    private MenuItem mnuDialog = null;
+    private MenuItem mnuNo = null;
+    private MenuItem mnuTitle = null;
+    private MenuItem mnuClose = null;
+    private MenuItem mnuBorder = null;
+    private MenuItem mnuTEmpty = null;
+    private MenuItem mnuTNormal = null;
+    private MenuItem mnuTLong = null;
+    private MenuItem mnuOn = null;
+    private MenuItem mnuOff = null;
+    private MenuItem mnuSEmpty = null;
+    private MenuItem mnuSNormal = null;
+    private MenuItem mnuSLong = null;
+    private MenuItem mnuMShell = null;
+    /** custom icon for the mobileshell */
+    private Image icon = null;
+    /** mobileshell instance */
+    private MobileShell mshell = null;
+    /** "enable" / "disable" command */
+    private Command cmdSwitch = null;
+    /** text instance */
+    private Text text = null;
+    /** status pane style */
+    private int status;
+    /** trimming style */
+    private int trimming;
+    /** title pane text */
+    private String titleText;
+    /** image on the status pane */
+    private boolean img;
+    /** status pane text */
+    private String statusText;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("MobileShell Test");
+        // default values
+        this.status = MobileShell.NO_STATUS_PANE;
+        this.trimming = SWT.SHELL_TRIM;
+        this.titleText = "";
+        this.img = false;
+        this.statusText = "";
+        Label label = new Label(this.shell, SWT.CENTER);
+        label.setText("Original Shell");
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label2 = new Label(this.shell, SWT.CENTER);
+        label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+        label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label3 = new Label(this.shell, SWT.CENTER);
+        label3.setText("Shell CA:"+this.shell.getClientArea().width+","+this.shell.getClientArea().height);
+        label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label4 = new Label(this.shell, SWT.CENTER);
+        label4.setText("S to D:"+this.shell.toDisplay(0,0).x+","+this.shell.toDisplay(0,0).y);
+        label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // try to initialize the image
+        try
+        {
+            this.icon = new Image(this.display, this.getClass().getResourceAsStream("/res/icon.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            mb.setText("Exception");
+            mb.setMessage("Icon could not be loaded");
+            mb.open();
+            this.icon = null;
+        }
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "status pane" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Status Pane");
+        item.setMenu(menu);
+        // "none" menuitem for "status pane" submenu
+        this.mnuNone = new MenuItem(menu, SWT.PUSH);
+        this.mnuNone.setText("* None");
+        this.mnuNone.addSelectionListener(this);
+        // "small" menuitem for "status pane" submenu
+        this.mnuSmall = new MenuItem(menu, SWT.PUSH);
+        this.mnuSmall.setText("Small");
+        this.mnuSmall.addSelectionListener(this);
+        // "large" menuitem for "status pane" submenu
+        this.mnuLarge = new MenuItem(menu, SWT.PUSH);
+        this.mnuLarge.setText("Large");
+        this.mnuLarge.addSelectionListener(this);
+        // "trimming" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Trimming");
+        item.setMenu(menu);
+        // "shell_trim" menuitem for "trimming" submenu
+        this.mnuShell = new MenuItem(menu, SWT.PUSH);
+        this.mnuShell.setText("* Shell_Trim");
+        this.mnuShell.addSelectionListener(this);
+        // "dialog_trim" menuitem for "trimming" submenu
+        this.mnuDialog = new MenuItem(menu, SWT.PUSH);
+        this.mnuDialog.setText("Dialog_Trim");
+        this.mnuDialog.addSelectionListener(this);
+        // "no_trim" menuitem for "trimming" submenu
+        this.mnuNo = new MenuItem(menu, SWT.PUSH);
+        this.mnuNo.setText("No_Trim");
+        this.mnuNo.addSelectionListener(this);
+        // "title" menuitem for "trimming" submenu
+        this.mnuTitle = new MenuItem(menu, SWT.PUSH);
+        this.mnuTitle.setText("Title");
+        this.mnuTitle.addSelectionListener(this);
+        // "close" menuitem for "trimming" submenu
+        this.mnuClose = new MenuItem(menu, SWT.PUSH);
+        this.mnuClose.setText("Close");
+        this.mnuClose.addSelectionListener(this);
+        // "border" menuitem for "trimming" submenu
+        this.mnuBorder = new MenuItem(menu, SWT.PUSH);
+        this.mnuBorder.setText("Border");
+        this.mnuBorder.addSelectionListener(this);
+        // "set title text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set Title Text");
+        item.setMenu(menu);
+        // "empty" menuitem for "set title text" submenu
+        this.mnuTEmpty = new MenuItem(menu, SWT.PUSH);
+        this.mnuTEmpty.setText("* Empty");
+        this.mnuTEmpty.addSelectionListener(this);
+        // "normal" menuitem for "set title text" submenu
+        this.mnuTNormal = new MenuItem(menu, SWT.PUSH);
+        this.mnuTNormal.setText("Normal");
+        this.mnuTNormal.addSelectionListener(this);
+        // "long" menuitem for "set title text" submenu
+        this.mnuTLong = new MenuItem(menu, SWT.PUSH);
+        this.mnuTLong.setText("Long");
+        this.mnuTLong.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "on" menuitem for "image" submenu
+        this.mnuOn = new MenuItem(menu, SWT.PUSH);
+        this.mnuOn.setText("On");
+        this.mnuOn.addSelectionListener(this);
+        // "off" menuitem for "image" submenu
+        this.mnuOff = new MenuItem(menu, SWT.PUSH);
+        this.mnuOff.setText("* Off");
+        this.mnuOff.addSelectionListener(this);
+        // "set status text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Set Status Text");
+        item.setMenu(menu);
+        // "empty" menuitem for "set status text" submenu
+        this.mnuSEmpty = new MenuItem(menu, SWT.PUSH);
+        this.mnuSEmpty.setText("* Empty");
+        this.mnuSEmpty.addSelectionListener(this);
+        // "normal" menuitem for "set status text" submenu
+        this.mnuSNormal = new MenuItem(menu, SWT.PUSH);
+        this.mnuSNormal.setText("Normal");
+        this.mnuSNormal.addSelectionListener(this);
+        // "long" menuitem for "set status text" submenu
+        this.mnuSLong = new MenuItem(menu, SWT.PUSH);
+        this.mnuSLong.setText("Long");
+        this.mnuSLong.addSelectionListener(this);
+        // "create" menuitem
+        this.mnuMShell = new MenuItem(mainmenu, SWT.PUSH);
+        this.mnuMShell.setText("Create");
+        this.mnuMShell.addSelectionListener(this);
+    }
+
+    /**
+     * update the mark in "status pane" submenu
+     * @param newStatus the selected status pane style
+     * @param item the selected menuitem
+     */
+    private void chgStatus(int newStatus, MenuItem item)
+    {
+        if (this.status != newStatus)
+        {
+            switch (this.status)
+            {
+            case MobileShell.NO_STATUS_PANE:
+                this.mnuNone.setText("None");
+                break;
+            case MobileShell.SMALL_STATUS_PANE:
+                this.mnuSmall.setText("Small");
+                break;
+            case MobileShell.LARGE_STATUS_PANE:
+                this.mnuLarge.setText("Large");
+                break;
+            default:
+                break;
+            }
+            this.status = newStatus;
+            item.setText("* "+item.getText());
+        }
+    }
+
+    /**
+     * update the mark in "trimming" submenu
+     * @param newTrimming the selected trimming style
+     * @param item the selected menuitem
+     */
+    private void chgTrimming(int newTrimming, MenuItem item)
+    {
+        if (this.trimming != newTrimming)
+        {
+            switch (this.trimming)
+            {
+            case SWT.SHELL_TRIM:
+                this.mnuShell.setText("Shell_Trim");
+                break;
+            case SWT.DIALOG_TRIM:
+                this.mnuDialog.setText("Dialog_Trim");
+                break;
+            case SWT.NO_TRIM:
+                this.mnuNo.setText("No_Trim");
+                break;
+            case SWT.TITLE:
+                this.mnuTitle.setText("Title");
+                break;
+            case SWT.CLOSE:
+                this.mnuClose.setText("Close");
+                break;
+            case SWT.BORDER:
+                this.mnuBorder.setText("Border");
+                break;
+            default:
+                break;
+            }
+            this.trimming = newTrimming;
+            item.setText("* "+item.getText());
+        }
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if (event.widget == this.mnuNone)
+            {
+                // set the status pane to none
+                this.chgStatus(MobileShell.NO_STATUS_PANE, this.mnuNone);
+                return;
+            }
+            if (event.widget == this.mnuSmall)
+            {
+                // set the status pane to small
+                this.chgStatus(MobileShell.SMALL_STATUS_PANE, this.mnuSmall);
+                return;
+            }
+            if (event.widget == this.mnuLarge)
+            {
+                // set the status pane to large
+                this.chgStatus(MobileShell.LARGE_STATUS_PANE, this.mnuLarge);
+                return;
+            }
+            if (event.widget == this.mnuShell)
+            {
+                // set the trimming style to shell_trim
+                this.chgTrimming(SWT.SHELL_TRIM, this.mnuShell);
+                return;
+            }
+            if (event.widget == this.mnuDialog)
+            {
+                // set the trimming style to dialog_trim
+                this.chgTrimming(SWT.DIALOG_TRIM, this.mnuDialog);
+                return;
+            }
+            if (event.widget == this.mnuNo)
+            {
+                // set the trimming style to no_trim
+                this.chgTrimming(SWT.NO_TRIM, this.mnuNo);
+                return;
+            }
+            if (event.widget == this.mnuTitle)
+            {
+                // set the trimming style to title
+                this.chgTrimming(SWT.TITLE, this.mnuTitle);
+                return;
+            }
+            if (event.widget == this.mnuClose)
+            {
+                // set the trimming style to close
+                this.chgTrimming(SWT.CLOSE, this.mnuClose);
+                return;
+            }
+            if (event.widget == this.mnuBorder)
+            {
+                // set the trimming style to border
+                this.chgTrimming(SWT.BORDER, this.mnuBorder);
+                return;
+            }
+            if (event.widget == this.mnuTEmpty)
+            {
+                // set title text to an empty string
+                this.mnuTEmpty.setText("* Empty");
+                this.mnuTNormal.setText("Normal");
+                this.mnuTLong.setText("Long");
+                this.titleText = "";
+                return;
+            }
+            if (event.widget == this.mnuTNormal)
+            {
+                // set a normal (short) title string
+                this.mnuTEmpty.setText("Empty");
+                this.mnuTNormal.setText("* Normal");
+                this.mnuTLong.setText("Long");
+                this.titleText = "MobileShell";
+                return;
+            }
+            if (event.widget == this.mnuTLong)
+            {
+                // set a long title string
+                this.mnuTEmpty.setText("Empty");
+                this.mnuTNormal.setText("Normal");
+                this.mnuTLong.setText("* Long");
+                this.titleText = "This supposed to be a very long text for the shell title and most probably it does not fit on that area...";
+                return;
+            }
+            if (event.widget == this.mnuOn)
+            {
+                // set a custom icon for the mobileshell
+                this.mnuOn.setText("* On");
+                this.mnuOff.setText("Off");
+                this.img = true;
+                return;
+            }
+            if (event.widget == this.mnuOff)
+            {
+                // disable custom icon
+                this.mnuOn.setText("On");
+                this.mnuOff.setText("* Off");
+                this.img = false;
+                return;
+            }
+            if (event.widget == this.mnuSEmpty)
+            {
+                // set the status text to an empty string
+                this.mnuSEmpty.setText("* Empty");
+                this.mnuSNormal.setText("Normal");
+                this.mnuSLong.setText("Long");
+                this.statusText = "";
+                return;
+            }
+            if (event.widget == this.mnuSNormal)
+            {
+                // set a normal (short) status string
+                this.mnuSEmpty.setText("Empty");
+                this.mnuSNormal.setText("* Normal");
+                this.mnuSLong.setText("Long");
+                this.statusText = "MobileShell";
+                return;
+            }
+            if (event.widget == this.mnuSLong)
+            {
+                // set a long status string
+                this.mnuSEmpty.setText("Empty");
+                this.mnuSNormal.setText("Normal");
+                this.mnuSLong.setText("* Long");
+                this.statusText = "This supposed to be a very long text for the status pane and most probably it does not fit on that area...";
+                return;
+            }
+            if ("Create".equals(scmd))
+            {
+                // creata a mobileshell and apply the settings
+                this.mshell = new MobileShell(this.display, this.trimming, this.status);
+                this.mshell.setText(this.titleText);
+                this.mshell.setStatusText(this.statusText);
+                if (this.img)
+                    this.mshell.setImage(this.icon);
+                this.mshell.setLayout(new GridLayout(2, false));
+                this.mshell.addKeyListener(this);
+                this.mnuMShell.setText("Show");
+                // display a label and a text finput field for testing purposes...
+                Label label = new Label(this.mshell, SWT.LEFT);
+                label.setText("Test input:");
+                label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+                this.text = new Text(this.mshell, SWT.LEFT | SWT.BORDER);
+                this.text.setText("test");
+                this.text.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+                this.text.addKeyListener(this);
+
+                Label label2 = new Label(this.mshell, SWT.CENTER);
+                label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+                label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+                Label label3 = new Label(this.mshell, SWT.CENTER);
+                label3.setText("MobileShell CA:"+this.mshell.getClientArea().width+","+this.mshell.getClientArea().height);
+                label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+                Label label4 = new Label(this.mshell, SWT.CENTER);
+                label4.setText("MS to D:"+this.mshell.toDisplay(0,0).x+","+this.mshell.toDisplay(0,0).y);
+                label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+                // "close" right softkey command
+                Command cmd = new Command(this.mshell, Command.EXIT, 0);
+                cmd.setText("Close");
+                cmd.addSelectionListener(this);
+                // "hide" left softkey command
+                cmd = new Command(this.mshell, Command.SELECT, 1);
+                cmd.setText("Hide");
+                cmd.addSelectionListener(this);
+                // "disable text" left softkey command
+                this.cmdSwitch = new Command(this.mshell, Command.SELECT, 0);
+                this.cmdSwitch.setText("Disable Text");
+                this.cmdSwitch.addSelectionListener(this);
+                // open the mobileshell
+                this.mshell.addMouseListener(this);
+                this.mshell.layout();
+                this.mshell.open();
+                return;
+            }
+            if ("Show".equals(scmd))
+            {
+                // apply the new settings
+                this.mshell.changeTrim(this.trimming, this.status);
+                this.mshell.setText(this.titleText);
+                this.mshell.setStatusText(this.statusText);
+                if (this.img)
+                    this.mshell.setImage(this.icon);
+                else
+                    this.mshell.setImage(null);
+                // display the mobileshell
+                this.mshell.setActive();
+                return;
+            }
+        }
+        else if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Hide".equals(scmd))
+            {
+                // hide the mobileshell
+                this.shell.setActive();
+                return;
+            }
+            if ("Close".equals(scmd))
+            {
+                // close the mobileshell
+                this.mnuMShell.setText("Create");
+                this.mshell.dispose();
+                this.mshell = null;
+                return;
+            }
+            if (event.widget == this.cmdSwitch)
+            {
+                if (this.text.isEnabled())
+                {
+                    // disable the test input text
+                    this.text.setEnabled(false);
+                    this.cmdSwitch.setText("Enable Text");
+                }
+                else
+                {
+                    // enable the test input text
+                    this.text.setEnabled(true);
+                    this.cmdSwitch.setText("Disable Text");
+                }
+                return;
+            }
+            if (event.widget == this.cmdExit && this.icon != null && !this.icon.isDisposed())
+                // dispose the image before exit
+                this.icon.dispose();
+        }
+        super.widgetSelected(event);
+    }
+    public void mouseDoubleClick(MouseEvent e)
+    {
+        System.out.println(e.toString());
+        this.text.setText(e.x+","+e.y);
+    }
+    public void mouseDown(MouseEvent e)
+    {
+        System.out.println(e.toString());
+        this.text.setText(e.x+","+e.y);
+    }
+    public void mouseUp(MouseEvent e)
+    {
+        System.out.println(e.toString());
+        this.text.setText(e.x+","+e.y);
+    }
+    /**
+     *  a key is pressed...
+     */
+    public void keyPressed(KeyEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * a key is released
+     */
+    public void keyReleased(KeyEvent event)
+    {
+        switch ((event.keyCode | SWT.KEYCODE_BIT))
+        {
+        case SWT.KEYPAD_0:
+            // change the fullscreen mode
+            this.mshell.setFullScreenMode(!this.mshell.getFullScreenMode());
+            break;
+        case SWT.KEYPAD_1:
+            // hide the mobileshell
+            this.shell.setActive();
+            break;
+        case SWT.KEYPAD_3:
+            // close the mobileshell
+            this.mnuMShell.setText("Create");
+            this.mshell.dispose();
+            this.mshell = null;
+            break;
+        default:
+            break;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MultipageDialogMidlet/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="MultipageDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="MultiPageDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.multipagedialog.MultiPageDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="MultipageDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/big.png has changed
Binary file javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/icon.png has changed
Binary file javauis/tsrc/fute/eswt/MultipageDialogMidlet/res/res/medium.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MultipageDialogMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/MultipageDialogMidlet/src/com/nokia/test/java/eswt/multipagedialog/MultiPageDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,691 @@
+/*
+* 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.test.java.eswt.multipagedialog;
+
+import java.util.Date;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ercp.swt.mobile.TextExtension;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.ercp.swt.mobile.MultiPageDialog;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class MultiPageDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    MultiPageDialog mpdialog = null;
+    Composite initialPage = null;
+
+    Command backCMD = null;
+
+    Command showMultipageCMD = null;
+
+    Command addMenu = null;
+    Command addPage = null;
+    Command addPageWithImage = null;
+    Command addManyPages = null;
+    Command addManyPagesWithImage = null;
+    Command addButtonPage = null;
+    Command addListPage = null;
+    Command addTextPage = null;
+    Command addControlPage = null;
+    Command addBrowserPage = null;
+
+    Command removePage = null;
+    Command removeAll = null;
+
+    Command SelectFirst = null;
+    Command SelectLast = null;
+
+    Command updateTitleEmpty = null;
+    Command updateTitleNormal = null;
+    Command updateTitleLong = null;
+    Command updateTitleSpecialChars = null;
+
+    Command updateImageNull = null;
+    Command updateImageIcon = null;
+    Command updateImageBig = null;
+    Command updateImageSmall = null;
+
+    /** custom icon for the pages */
+    private Image icon = null;
+    private String icon_fn = "icon.png";
+    /** custom big image for the pages */
+    private Image bigImage = null;
+    private String bigImage_fn = "big.png";
+    /** custom small for the pages */
+    private Image smallImage = null;
+    private String smallImage_fn = "medium.jpg";
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String title, String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText(title);
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * try to load image from resourse
+     * @param filename
+     * @param image
+     */
+    protected Image loadImage(String filename)
+    {
+        Image image = null;
+        // try to initialize the image
+        try
+        {
+            image = new Image(this.display, this.getClass().getResourceAsStream("/res/"+filename));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Exception",image+" could not be loaded");
+            image = null;
+        }
+        return image;
+    }
+    protected void init()
+    {
+
+        this.shell.setText("Multipage Dialog Test");
+        this.shell.setLayout(new GridLayout());
+
+        this.icon = this.loadImage(this.icon_fn);
+        this.bigImage = this.loadImage(this.bigImage_fn);
+        this.smallImage = this.loadImage(this.smallImage_fn);
+
+        mpdialog = new MultiPageDialog(this.shell);
+        this.initialPage = mpdialog.createPage("Initial Page", null);
+        this.backCMD = new Command(this.initialPage, Command.OK, 1);
+        this.backCMD.setText("Back");
+        this.backCMD.addSelectionListener(this);
+
+        this.showMultipageCMD = new Command(this.shell, Command.OK, 1);
+        this.showMultipageCMD.setText("Show");
+        this.showMultipageCMD.addSelectionListener(this);
+
+        //  Add submenu
+        this.addMenu = new Command(this.shell, Command.COMMANDGROUP, 2);
+        this.addMenu.setText("Add");
+
+        this.addPage = new Command(addMenu, Command.GENERAL, 1);
+        this.addPage.setText("One with label");
+        this.addPage.addSelectionListener(this);
+
+        this.addPageWithImage = new Command(addMenu, Command.GENERAL, 1);
+        this.addPageWithImage.setText("One with image");
+        this.addPageWithImage.addSelectionListener(this);
+
+        this.addManyPages = new Command(addMenu, Command.GENERAL, 0);
+        this.addManyPages.setText("100 with label");
+        this.addManyPages.addSelectionListener(this);
+
+        this.addManyPagesWithImage = new Command(addMenu, Command.GENERAL, 0);
+        this.addManyPagesWithImage.setText("100 with image");
+        this.addManyPagesWithImage.addSelectionListener(this);
+
+        this.addButtonPage = new Command(addMenu, Command.GENERAL, 0);
+        this.addButtonPage.setText("Buttons");
+        this.addButtonPage.addSelectionListener(this);
+
+        this.addListPage = new Command(addMenu, Command.GENERAL, 0);
+        this.addListPage.setText("Lists");
+        this.addListPage.addSelectionListener(this);
+
+        this.addTextPage = new Command(addMenu, Command.GENERAL, 0);
+        this.addTextPage.setText("Texts");
+        this.addTextPage.addSelectionListener(this);
+
+        this.addControlPage = new Command(addMenu, Command.GENERAL, 0);
+        this.addControlPage.setText("Controls");
+        this.addControlPage.addSelectionListener(this);
+
+        this.addBrowserPage = new Command(addMenu, Command.GENERAL, 0);
+        this.addBrowserPage.setText("Browser");
+        this.addBrowserPage.addSelectionListener(this);
+
+        //  Remove submenu
+        Command removeMenu = new Command(this.initialPage.getShell(), Command.COMMANDGROUP, 1);
+        removeMenu.setText("Remove");
+
+
+        this.removePage = new Command(removeMenu, Command.GENERAL, 1);
+        this.removePage.setText("Selected");
+        this.removePage.addSelectionListener(this);
+
+        this.removeAll = new Command(removeMenu, Command.GENERAL, 0);
+        this.removeAll.setText("All");
+        this.removeAll.addSelectionListener(this);
+
+        //  Selection submenu
+        Command selectMenu = new Command(this.initialPage.getShell(), Command.COMMANDGROUP, 1);
+        selectMenu.setText("Select");
+
+        this.SelectFirst = new Command(selectMenu, Command.GENERAL, 1);
+        this.SelectFirst.setText("First");
+        this.SelectFirst.addSelectionListener(this);
+
+        this.SelectLast = new Command(selectMenu, Command.GENERAL, 0);
+        this.SelectLast.setText("Last");
+        this.SelectLast.addSelectionListener(this);
+
+        //  Update submenu
+        Command updateMenu = new Command(this.initialPage.getShell(), Command.COMMANDGROUP, 1);
+        updateMenu.setText("Update");
+
+        //  Update title submenu
+        Command updateTitleMenu = new Command(updateMenu, Command.COMMANDGROUP, 1);
+        updateTitleMenu.setText("Title");
+
+        this.updateTitleEmpty = new Command(updateTitleMenu, Command.GENERAL, 1);
+        this.updateTitleEmpty.setText("Empty Title");
+        this.updateTitleEmpty.addSelectionListener(this);
+
+        this.updateTitleNormal = new Command(updateTitleMenu, Command.GENERAL, 1);
+        this.updateTitleNormal.setText("Normal Title");
+        this.updateTitleNormal.addSelectionListener(this);
+
+        this.updateTitleLong = new Command(updateTitleMenu, Command.GENERAL, 1);
+        this.updateTitleLong.setText("Long Title");
+        this.updateTitleLong.addSelectionListener(this);
+
+        this.updateTitleSpecialChars = new Command(updateTitleMenu, Command.GENERAL, 1);
+        this.updateTitleSpecialChars.setText("Special chars Title");
+        this.updateTitleSpecialChars.addSelectionListener(this);
+
+        //  Update image submenu
+        Command updateImageMenu = new Command(updateMenu, Command.COMMANDGROUP, 1);
+        updateImageMenu.setText("Image");
+
+        this.updateImageIcon = new Command(updateImageMenu, Command.GENERAL, 0);
+        this.updateImageIcon.setText("Icon");
+        this.updateImageIcon.addSelectionListener(this);
+
+        this.updateImageSmall = new Command(updateImageMenu, Command.GENERAL, 0);
+        this.updateImageSmall.setText("Small");
+        this.updateImageSmall.addSelectionListener(this);
+
+        this.updateImageBig = new Command(updateImageMenu, Command.GENERAL, 0);
+        this.updateImageBig.setText("Big");
+        this.updateImageBig.addSelectionListener(this);
+
+        this.updateImageNull = new Command(updateImageMenu, Command.GENERAL, 0);
+        this.updateImageNull.setText("Null");
+        this.updateImageNull.addSelectionListener(this);
+
+    }
+
+    private void createPageWithLists()
+    {
+        Composite page = mpdialog.createPage("Lists",null);
+        page.setLayout(new GridLayout(2, true));
+
+        Command back = new Command(page, Command.BACK, 1);
+        back.setText("Back");
+        back.addSelectionListener(this);
+
+    }
+    private void createPageWithButtons()
+    {
+        Composite page = mpdialog.createPage("Buttons",null);
+        page.setLayout(new GridLayout(2, true));
+
+        this.addButton(page,SWT.PUSH,"Push");
+        this.addButton(page,SWT.TOGGLE,"Toggle");
+        this.addButton(page,SWT.RADIO, "1st");
+        this.addButton(page,SWT.RADIO, "2nd");
+        this.addButton(page,SWT.RADIO, "3rd");
+        this.addButton(page,SWT.CHECK, "1st");
+        this.addButton(page,SWT.CHECK, "2nd");
+        this.addButton(page,SWT.CHECK, "3rd");
+
+        Command back = new Command(page, Command.BACK, 1);
+        back.setText("Back");
+        back.addSelectionListener(this);
+
+    }
+    private void createPageWithBrowser()
+    {
+        Composite page = mpdialog.createPage("Browser",null);
+        page.setLayout(new GridLayout(2, true));
+
+        Command back = new Command(page, Command.BACK, 1);
+        back.setText("Back");
+        back.addSelectionListener(this);
+
+    }
+    private void createPageWithControls()
+    {
+        Composite page = mpdialog.createPage("Controls",null);
+        page.setLayout(new GridLayout(2, true));
+
+        this.addCombo(page);
+        this.addLabel(page);
+        this.addDateEditor(page);
+        this.addHyperlink(page);
+        this.addSlider(page);
+        this.addProgressBar(page);
+
+        Command back = new Command(page, Command.BACK, 1);
+        back.setText("Back");
+        back.addSelectionListener(this);
+
+    }
+    private void createPageWithTexts()
+    {
+        Composite page = mpdialog.createPage("Controls",null);
+        page.setLayout(new GridLayout(2, true));
+
+        this.addText(page);
+        this.addTextExtension(page);
+        this.addConstrainedText(page);
+
+        Command back = new Command(page, Command.BACK, 1);
+        back.setText("Back");
+        back.addSelectionListener(this);
+
+    }
+    public void widgetSelected(SelectionEvent e)
+    {
+
+        if (e.widget == this.backCMD)
+        {
+            this.mpdialog.close();
+            this.shell.setActive();
+            return;
+        }
+        if (e.widget instanceof Command)
+        {
+            String scmd = ((Command) e.widget).getText();
+            if (scmd.equals("Back"))
+            {
+                this.mpdialog.close();
+                this.shell.setActive();
+                return;
+            }
+        }
+        if (e.widget == this.showMultipageCMD)
+        {
+
+            Command addingMenu = new Command(this.initialPage, Command.COMMANDGROUP, 1);
+            addingMenu = this.addMenu;
+            mpdialog.setSelection(mpdialog.getPageCount() - 1); // The last page
+
+            mpdialog.open(); // open a modal dialog
+            return;
+        }
+        if (e.widget == this.addPage)
+        {
+            Composite page = mpdialog.createPage("Added Page", null);
+            page.setLayout(new GridLayout(1, true));
+            Label label = new Label(page, SWT.NONE);
+            label.setText("Label in Page");
+            label.setAlignment(SWT.CENTER);
+            Command back = new Command(page, Command.BACK, 1);
+            back.setText("Back");
+            back.addSelectionListener(this);
+            return;
+        }
+        if (e.widget == this.addPageWithImage)
+        {
+            Composite page = mpdialog.createPage("Added Page", this.icon);
+            page.setLayout(new GridLayout(1, true));
+            Label label = new Label(page, SWT.NONE);
+            label.setText("Label in Page");
+            label.setAlignment(SWT.CENTER);
+            Command back = new Command(page, Command.BACK, 1);
+            back.setText("Back");
+            back.addSelectionListener(this);
+            return;
+        }
+        if (e.widget == this.addManyPages)
+        {
+            for (int i = 0; i < 100; i++)
+            {
+                Composite page = mpdialog.createPage("Page"+(i+1), null);
+                page.setLayout(new GridLayout(1, true));
+                Label label = new Label(page, SWT.NONE);
+                label.setText("Label in Page");
+                label.setAlignment(SWT.CENTER);
+                Command back = new Command(page, Command.BACK, 1);
+                back.setText("Back");
+                back.addSelectionListener(this);
+            }
+            return;
+        }
+        if (e.widget == this.addManyPagesWithImage)
+        {
+            for (int i = 0; i < 100; i++)
+            {
+                Composite page = mpdialog.createPage("",this.icon);
+                page.setLayout(new GridLayout(1, true));
+                Label label = new Label(page, SWT.NONE);
+                label.setText("Label in Page");
+                label.setAlignment(SWT.CENTER);
+                Command back = new Command(page, Command.BACK, 1);
+                back.setText("Back");
+                back.addSelectionListener(this);
+            }
+            return;
+        }
+        if (e.widget == this.addButtonPage)
+        {
+
+            this.createPageWithButtons();
+            return;
+        }
+        if (e.widget == this.addListPage)
+        {
+
+            this.createPageWithLists();
+            return;
+        }
+        if (e.widget == this.addControlPage)
+        {
+
+            this.createPageWithControls();
+            return;
+        }
+        if (e.widget == this.addBrowserPage)
+        {
+
+            this.createPageWithBrowser();
+            return;
+        }
+        if (e.widget == this.addTextPage)
+        {
+
+            this.createPageWithTexts();
+            return;
+        }
+        if (e.widget == this.removeAll)
+        {
+            for (int i = 0; i < this.mpdialog.getPageCount()-1; i++)
+            {
+                this.mpdialog.deletePage(i);
+            }
+            return;
+        }
+        if (e.widget == this.removePage)
+        {
+            this.mpdialog.deletePage(this.mpdialog.getSelectionIndex());
+            return;
+        }
+        if (e.widget == this.SelectFirst)
+        {
+            this.mpdialog.setSelection(0);
+            return;
+        }
+        if (e.widget == this.SelectLast)
+        {
+            this.mpdialog.setSelection(this.mpdialog.getPageCount()-1);
+            return;
+        }
+        if (e.widget == this.updateTitleNormal)
+        {
+            this.mpdialog.setTitle(this.mpdialog.getSelectionIndex(), "Updated");
+            return;
+        }
+        if (e.widget == this.updateTitleEmpty)
+        {
+            this.mpdialog.setTitle(this.mpdialog.getSelectionIndex(), "");
+            return;
+        }
+        if (e.widget == this.updateTitleLong)
+        {
+            this.mpdialog.setTitle(this.mpdialog.getSelectionIndex(), "Very Very Very long title to see how title is truncated");
+            return;
+        }
+        if (e.widget == this.updateTitleSpecialChars)
+        {
+            this.mpdialog.setTitle(this.mpdialog.getSelectionIndex(), "? \n \t %&@#£$ !!!");
+            return;
+        }
+        if (e.widget == this.updateImageIcon)
+        {
+            try
+            {
+                if (this.icon != null)
+                    this.mpdialog.setImage(this.mpdialog.getSelectionIndex(), this.icon);
+            }
+            catch (Exception ex)
+            {
+                this.showException("Error Updating Image",ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.updateImageBig)
+        {
+            try
+            {
+                if (this.bigImage != null)
+                    this.mpdialog.setImage(this.mpdialog.getSelectionIndex(), this.bigImage);
+            }
+            catch (Exception ex)
+            {
+                this.showException("Error Updating Image",ex.toString());
+            }
+
+            return;
+        }
+        if (e.widget == this.updateImageSmall)
+        {
+            try
+            {
+                if (this.smallImage != null)
+                    this.mpdialog.setImage(this.mpdialog.getSelectionIndex(), this.smallImage);
+            }
+            catch (Exception ex)
+            {
+                this.showException("Error Updating Image",ex.toString());
+            }
+            return;
+        }
+        if (e.widget == this.updateImageNull)
+        {
+            try
+            {
+                this.mpdialog.setImage(this.mpdialog.getSelectionIndex(), null);
+            }
+            catch (Exception ex)
+            {
+                this.showException("Error Updating Image",ex.toString());
+            }
+            return;
+        }
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Create a Label and add it to current shell.
+     */
+    private void addLabel(Composite page)
+    {
+
+        // control
+        Label control = new Label(page, SWT.NONE);
+        control.setText("A Label control");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Hyperlink and add it to current shell.
+     */
+    private void addHyperlink(Composite page)
+    {
+
+        // control
+        HyperLink control = new HyperLink(page, SWT.NONE, HyperLink.EMAIL);
+        control.setText("some.name@foo.com");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Text and add it to current shell.
+     */
+    private void addText(Composite page)
+    {
+
+        // control
+        Text control = new Text(page, SWT.BORDER);
+        control.setText("Text field");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    private void addTextExtension(Composite page)
+    {
+
+        // control
+        TextExtension control = new TextExtension(page, SWT.BORDER);
+        control.setText("Text field");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a ConstrainedText and add it to current shell.
+     */
+    private void addConstrainedText(Composite page)
+    {
+
+        // control
+        ConstrainedText control =
+            new ConstrainedText(page, SWT.BORDER, ConstrainedText.PHONENUMBER);
+        control.setText("+*#0123456789");
+        control.setTextLimit(15);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Slider control and add it to current shell.
+     */
+    private void addSlider(Composite page)
+    {
+
+        // control
+        Slider control = new Slider(page, SWT.HORIZONTAL);
+        control.setMaximum(10);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a DateEditor and add it to current shell.
+     */
+    private void addDateEditor(Composite page)
+    {
+
+        // control
+        DateEditor control =
+            new DateEditor(page, SWT.BORDER, DateEditor.DATE_TIME);
+        control.setDate(new Date());
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Button and add it to current shell.
+     */
+    private void addButton(Composite page,int style, String name)
+    {
+
+        // control
+        Button control = new Button(page, style);
+        control.setText(name);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Combo control and add it to current shell.
+     */
+    private void addCombo(Composite page)
+    {
+
+        // control
+        Combo control =
+            new Combo(page, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
+        control.add("item 1");
+        control.add("item 2");
+        control.add("item 3");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+        control.pack();
+    }
+
+    /**
+     * Create a ProgressBar and add it to current shell.
+     */
+    private void addProgressBar(Composite page)
+    {
+
+        // control
+        ProgressBar control = new ProgressBar(page, SWT.BORDER | SWT.HORIZONTAL);
+        control.setMaximum(100);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="ProgressBarTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ProgressBarTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.progressbar.ProgressBarTestMIDlet_01"/>
+    <property name="midlet2.name" value="ProgressBarTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.progressbar.ProgressBarTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ProgressBarTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarRunnable.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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.test.java.eswt.progressbar;
+
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.SWT;
+
+public class ProgressBarRunnable extends Composite
+{
+
+    private int value;
+    private ProgressBar pb;
+    public ProgressBarRunnable(Composite parent, int style)
+    {
+
+        super(parent, SWT.NO_BACKGROUND);
+        pb = new ProgressBar(this,style);
+        value = 0;
+        pb.setSelection(value);
+    }
+
+    protected void internal_createHandle()
+    {
+
+    }
+
+    public void setMaximum(int value)
+    {
+        this.pb.setMaximum(value);
+    }
+    public void setMinimum(int value)
+    {
+        this.pb.setMinimum(value);
+    }
+    public void getMaximum()
+    {
+        this.pb.getMaximum();
+    }
+    public void getMinimum()
+    {
+        this.pb.getMinimum();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,211 @@
+/*
+* 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.test.java.eswt.progressbar;
+
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import java.util.*;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/* **
+ * this class is intended to test the progress bar component
+ *
+ *
+ */
+
+public class ProgressBarTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /**  smooth progress bar */
+    private ProgressBar smooth = null;
+
+    /**  indeterminate progress bar*/
+    private ProgressBar indeterminate = null;
+
+    public ProgressBarRunnable runnable = null;
+    /** Add runnable command */
+    private String cmdRunnable = "Runnable";
+    /** Add smooth command */
+    private String cmdSmooth = "Smooth";
+    /** Add indeterminate command */
+    private String cmdIndeterminate = "Indeterminate";
+    /** Add smooth vertical command */
+    private String cmdSmoothVertical = "Smooth - vertical";
+    /** Add indeterminate vertical command */
+    private String cmdIndeterminateVertical = "Indeterminate - vertical";
+
+
+    Timer timer;
+    private ProgressTimerTask progTimerTask;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+
+        // customize the shell
+        this.shell.setText("Progress Bar test");
+        this.shell.setLayout(new GridLayout());
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+
+        // "Runnable" menuitem for "add" submenu
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdRunnable);
+        item.addSelectionListener(this);
+        // "Smooth" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdSmooth);
+        item.addSelectionListener(this);
+        // "Indeterminate" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdIndeterminate);
+        item.addSelectionListener(this);
+        // "Smooth - vertical" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdSmoothVertical);
+        item.addSelectionListener(this);
+        // "Indeterminate - vertical" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdIndeterminateVertical);
+        item.addSelectionListener(this);
+
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Add Selection");
+        item.addSelectionListener(this);
+
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Clear Shell");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * Cleanup the screen.
+     * Removes all widget objects which are currently presented
+     * on the shell.
+     */
+    private void shellCleanup()
+    {
+
+        if (this.shell == null || this.shell.isDisposed()) return;
+
+        Control[] controls = this.shell.getChildren();
+
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        this.shell.update();
+    }
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            try
+            {
+                String scmd = ((MenuItem) event.widget).getText();
+                if (this.cmdSmooth.equals(scmd))
+                {
+                    this.smooth = new ProgressBar(this.shell, SWT.BORDER|SWT.SMOOTH);
+                    this.smooth.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                }
+                else if (this.cmdIndeterminate.equals(scmd))
+                {
+                    this.indeterminate = new ProgressBar(this.shell, SWT.INDETERMINATE);
+                    this.indeterminate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                }
+                else if (this.cmdIndeterminateVertical.equals(scmd))
+                {
+                    this.indeterminate = new ProgressBar(this.shell, SWT.INDETERMINATE|SWT.VERTICAL);
+                    this.indeterminate.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false));
+                }
+                else if (this.cmdSmoothVertical.equals(scmd))
+                {
+                    this.smooth = new ProgressBar(this.shell, SWT.SMOOTH|SWT.VERTICAL);
+                    this.smooth.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false));
+                }
+                else if (this.cmdRunnable.equals(scmd))
+                {
+                    try
+                    {
+                        this.runnable = new ProgressBarRunnable(this.shell, SWT.SMOOTH);
+                        this.runnable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                        this.runnable.setMaximum(10);
+                    }
+                    catch (Exception ex)
+                    {
+                        this.showException(ex.getMessage());
+                    }
+                }
+                else if (scmd.equals("Clear Shell"))
+                {
+                    this.shellCleanup();
+                }
+                else if (scmd.equals("Add Selection"))
+                {
+                    if (this.shell == null || this.shell.isDisposed()) return;
+
+                    if (this.smooth != null)
+                    {
+                        if (this.smooth.getSelection()+10 <= this.smooth.getMaximum())
+                            this.smooth.setSelection(this.smooth.getSelection()+10);
+                    }
+                    else
+                    {
+                        this.smooth.setSelection(this.smooth.getMinimum());
+                    }
+                }
+
+            }
+            catch (Exception ex)
+            {
+                this.showException(ex.getMessage());
+            }
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressBarTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,344 @@
+/*
+* 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.test.java.eswt.progressbar;
+
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ercp.swt.mobile.Command;
+import java.util.*;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/* **
+ * this class is intended to test the progress bar component
+ *
+ *
+ */
+
+public class ProgressBarTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /**  smooth progress bar */
+    private ProgressBar smooth = null;
+
+    /**  indeterminate progress bar*/
+    private ProgressBar indeterminate = null;
+
+    private Shell dialog = null;
+
+    public ProgressBar runnable = null;
+    /** Add runnable command */
+    private String cmdRunnable = "Runnable";
+    /** Add smooth command */
+    private String cmdSmooth = "Smooth in Dialog Shell";
+    /** Add indeterminate command */
+    private String cmdIndeterminate = "Indeterminate";
+    /** Add smooth vertical command */
+    private String cmdSmoothVertical = "Smooth - vertical";
+    /** Add indeterminate vertical command */
+    private String cmdIndeterminateVertical = "Indeterminate in dialog shell";
+    /** Add runnable command */
+    private String cmdRun = "Run it";
+
+    private Command cmdClose = null;
+    private Command cmdAgain = null;
+    private Label smoothLabel = null;
+    Timer timer;
+    private ProgressTimerTask progTimerTask;
+    int KTime;
+    volatile int timeout;
+    boolean addItemsInEvent = false;
+
+    synchronized int timeout()
+    {
+        return timeout;
+    }
+
+    synchronized void setTimeout(int val)
+    {
+        timeout = val;
+    }
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+
+        // customize the shell
+        this.shell.setText("Progress Bar test");
+        this.shell.setLayout(new GridLayout());
+
+        this.dialog = new Shell(this.shell,SWT.DIALOG_TRIM);
+        this.dialog.setLayout(new GridLayout());
+        // "single listview" left softkey command
+        this.cmdAgain = new Command(this.dialog, Command.SELECT, 1);
+        this.cmdAgain.setText("Again");
+        this.cmdAgain.addSelectionListener(this);
+        this.cmdClose = new Command(this.dialog, Command.EXIT, 1);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+
+        // set up the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+
+        // "Runnable" menuitem for "add" submenu
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdRunnable);
+        item.addSelectionListener(this);
+        // "Smooth" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdSmooth);
+        item.addSelectionListener(this);
+        // "Indeterminate" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdIndeterminate);
+        item.addSelectionListener(this);
+        // "Smooth - vertical" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdSmoothVertical);
+        item.addSelectionListener(this);
+        // "Indeterminate - vertical" menuitem for "add" submenu
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdIndeterminateVertical);
+        item.addSelectionListener(this);
+
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Add Selection");
+        item.addSelectionListener(this);
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText(this.cmdRun);
+        item.addSelectionListener(this);
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Clear Shell");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * Cleanup the screen.
+     * Removes all widget objects which are currently presented
+     * on the shell.
+     */
+    private void shellCleanup()
+    {
+
+        if (this.shell == null || this.shell.isDisposed()) return;
+
+        Control[] controls = this.shell.getChildren();
+
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        this.shell.update();
+    }
+    void after(final ProgressBar bar, final Label label1, final String text, int miliseconds)
+    {
+        KTime = miliseconds;
+        setTimeout(KTime);
+        bar.setSelection(0);
+        new Thread(new Runnable()
+        {
+            public void run()
+            {
+                while (timeout() > 0)
+                {
+                    try
+                    {
+                        Thread.sleep(50);
+                    }
+                    catch (InterruptedException e)
+                    {
+                        e.printStackTrace();
+                    }
+                    Display.getDefault().syncExec(new Runnable()
+                    {
+                        public void run()
+                        {
+                            bar.setSelection(KTime - timeout());
+                            if (timeout() % 1000 == 0)
+                            {
+                                label1.setText(text + " " + timeout() / 1000 + " seconds");
+                                bar.getParent().layout();
+                            }
+                        }
+                    });
+                    setTimeout(timeout() - 50);
+                }
+                Display.getDefault().syncExec(new Runnable()
+                {
+                    public void run()
+                    {
+                        bar.setSelection(KTime);
+                    }
+                });
+
+
+            }
+        }).start();
+    }
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdClose)
+        {
+            Control[] controls = this.dialog.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                controls[i].dispose();
+            }
+            this.dialog.setVisible(false);
+        }
+        else if (event.widget == this.cmdAgain)
+        {
+            Label label = null;
+
+            this.after(this.smooth, this.smoothLabel, "Finishing in", 5000);
+        }
+        if (event.widget instanceof MenuItem)
+        {
+            try
+            {
+                String scmd = ((MenuItem) event.widget).getText();
+                if (this.cmdSmooth.equals(scmd))
+                {
+
+                    this.dialog.setText("Smooth");
+                    this.smoothLabel = new Label(this.dialog,SWT.BORDER);
+                    this.smoothLabel.setText("Running");
+                    this.smoothLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+                    this.smooth = new ProgressBar(this.dialog, SWT.BORDER|SWT.SMOOTH);
+                    this.smooth.setMaximum(5000);
+                    this.smooth.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+                    this.cmdAgain.setEnabled(true);
+                    this.dialog.layout();
+                    this.dialog.open();
+                    this.after(this.smooth, this.smoothLabel, "Finishing in", 5000);
+                }
+                else if (this.cmdIndeterminate.equals(scmd))
+                {
+                    this.indeterminate = new ProgressBar(this.shell, SWT.INDETERMINATE);
+                    this.indeterminate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                }
+                else if (this.cmdIndeterminateVertical.equals(scmd))
+                {
+                    Label label = new Label(this.dialog,SWT.BORDER);
+                    label.setText("Running");
+                    label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+                    this.dialog.setText("Indeterminate");
+                    this.indeterminate = new ProgressBar(this.dialog, SWT.INDETERMINATE);
+                    this.indeterminate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                    this.cmdAgain.setEnabled(false);
+                    this.dialog.layout();
+                    this.dialog.open();
+                }
+                else if (this.cmdSmoothVertical.equals(scmd))
+                {
+                    this.runnable = new ProgressBar(this.shell, SWT.SMOOTH|SWT.VERTICAL);
+                    this.runnable.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false));
+                }
+                else if (this.cmdRunnable.equals(scmd))
+                {
+                    try
+                    {
+                        this.runnable = new ProgressBar(this.shell, SWT.SMOOTH);
+                        this.runnable.setMinimum(0);
+                        this.runnable.setMaximum(10);
+                        this.runnable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+                    }
+                    catch (Exception ex)
+                    {
+                        this.showException(ex.getMessage());
+                    }
+                }
+                else if (scmd.equals("Clear Shell"))
+                {
+                    this.shellCleanup();
+                }
+                else if (scmd.equals("Add Selection"))
+                {
+                    if (this.shell == null || this.shell.isDisposed()) return;
+
+                    if (this.smooth != null)
+                    {
+                        if (this.smooth.getSelection()+10 <= this.smooth.getMaximum())
+                            this.smooth.setSelection(this.smooth.getSelection()+10);
+                    }
+                    else
+                    {
+                        this.smooth.setSelection(this.smooth.getMinimum());
+                    }
+                }
+                else if (scmd.equals("Run it"))
+                {
+                    if (this.shell == null || this.shell.isDisposed()) return;
+
+                    if (this.runnable != null)
+                    {
+                        while (this.runnable.getSelection() < this.runnable.getMaximum())
+                        {
+                            try
+                            {
+                                Thread.sleep(1000);
+                            }
+                            catch (InterruptedException e)
+                            {
+                                e.printStackTrace();
+                            }
+                            this.runnable.setSelection(this.runnable.getSelection()+1);
+                            this.runnable.update();
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                this.showException(ex.getMessage());
+            }
+
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ProgressBarTestMidletSuite/src/com/nokia/test/java/eswt/progressbar/ProgressTimerTask.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* 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.test.java.eswt.progressbar;
+
+import java.util.TimerTask;
+import org.eclipse.swt.widgets.ProgressBar;
+
+public class ProgressTimerTask extends TimerTask
+{
+
+    private ProgressBar pb = null;
+    public ProgressTimerTask(ProgressBar pb)
+    {
+        this.pb = pb;
+    }
+    private int count = 0;
+    public void run()
+    {
+        if (count == pb.getMaximum())
+        {
+            count = 0;
+            pb.setSelection(count);
+            pb.getParent().update();
+        }
+        else
+        {
+            pb.setSelection(count);
+            pb.getParent().update();
+        }
+        count++;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="QueryDialogTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="QueryDialogTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.querydialog.QueryDialogTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="QueryDialogTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/QueryDialogTestMidletSuite/src/com/nokia/test/java/eswt/querydialog/QueryDialogTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,492 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.querydialog;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/* **
+ * this class is intended to test the querydialog component
+ *
+ */
+public class QueryDialogTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** Setting fields */
+    private Text titleField             = null;
+    private Text promptField            = null;
+    private Text defaultField           = null;
+    private ConstrainedText minField    = null;
+    private ConstrainedText maxField    = null;
+
+    /** Create commands */
+    private Command cmdCreateSTANDARD   = null;
+    private Command cmdCreateNUMBER     = null;
+    private Command cmdCreateTIME       = null;
+    private Command cmdCreateDATE       = null;
+    private Command cmdCreatePASSWORD   = null;
+
+    /** Set Title commands */
+    private Command cmdSetTitleNULL     = null;
+    private Command cmdSetTitleDEFINE   = null;
+
+    /** Set Prompt commands */
+    private Command cmdSetPromptNULL    = null;
+    private Command cmdSetPromptDEFINE  = null;
+
+    /** Set Default value commands */
+    private Command cmdSetDefaultNULL   = null;
+    private Command cmdSetDefaultDEFINE = null;
+
+    /** Set Limit commands */
+    private Command cmdSetLimitMIN      = null;
+    private Command cmdSetLimitMAX      = null;
+
+    /** Clear command */
+    private Command cmdClear            = null;
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // init the shell
+        this.shell.setText("Query Dialog Test");
+
+        // create and set a layout
+        this.shell.setLayout(new GridLayout(2, false));
+
+        // create Create commands
+        Command cmdCreate = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdCreate.setText("Create");
+
+        this.cmdCreateSTANDARD = new Command(cmdCreate, Command.GENERAL, 4);
+        this.cmdCreateSTANDARD.setText("STANDARD");
+        this.cmdCreateSTANDARD.addSelectionListener(this);
+
+        this.cmdCreateNUMBER = new Command(cmdCreate, Command.GENERAL, 3);
+        this.cmdCreateNUMBER.setText("NUMBER");
+        this.cmdCreateNUMBER.addSelectionListener(this);
+
+        this.cmdCreateTIME = new Command(cmdCreate, Command.GENERAL, 2);
+        this.cmdCreateTIME.setText("TIME");
+        this.cmdCreateTIME.addSelectionListener(this);
+
+        this.cmdCreateDATE = new Command(cmdCreate, Command.GENERAL, 1);
+        this.cmdCreateDATE.setText("DATE");
+        this.cmdCreateDATE.addSelectionListener(this);
+
+        this.cmdCreatePASSWORD = new Command(cmdCreate, Command.GENERAL, 0);
+        this.cmdCreatePASSWORD.setText("PASSWORD");
+        this.cmdCreatePASSWORD.addSelectionListener(this);
+
+        // create Set commands
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSet.setText("Set");
+
+        Command cmdTitle = new Command(cmdSet, Command.COMMANDGROUP, 3);
+        cmdTitle.setText("Title");
+
+        this.cmdSetTitleDEFINE = new Command(cmdTitle, Command.GENERAL, 1);
+        this.cmdSetTitleDEFINE.setText("define");
+        this.cmdSetTitleDEFINE.addSelectionListener(this);
+
+        this.cmdSetTitleNULL = new Command(cmdTitle, Command.GENERAL, 0);
+        this.cmdSetTitleNULL.setText("null");
+        this.cmdSetTitleNULL.addSelectionListener(this);
+
+        Command cmdPrompt = new Command(cmdSet, Command.COMMANDGROUP, 2);
+        cmdPrompt.setText("Prompt");
+
+        this.cmdSetPromptDEFINE = new Command(cmdPrompt, Command.GENERAL, 1);
+        this.cmdSetPromptDEFINE.setText("define");
+        this.cmdSetPromptDEFINE.addSelectionListener(this);
+
+        this.cmdSetPromptNULL = new Command(cmdPrompt, Command.GENERAL, 0);
+        this.cmdSetPromptNULL.setText("null");
+        this.cmdSetPromptNULL.addSelectionListener(this);
+
+        Command cmdDefault = new Command(cmdSet, Command.COMMANDGROUP, 1);
+        cmdDefault.setText("Default");
+
+        this.cmdSetDefaultDEFINE = new Command(cmdDefault, Command.GENERAL, 1);
+        this.cmdSetDefaultDEFINE.setText("define");
+        this.cmdSetDefaultDEFINE.addSelectionListener(this);
+
+        this.cmdSetDefaultNULL = new Command(cmdDefault, Command.GENERAL, 0);
+        this.cmdSetDefaultNULL.setText("null");
+        this.cmdSetDefaultNULL.addSelectionListener(this);
+
+        Command cmdLimit = new Command(cmdSet, Command.COMMANDGROUP, 0);
+        cmdLimit.setText("Limit");
+
+        this.cmdSetLimitMIN = new Command(cmdLimit, Command.GENERAL, 1);
+        this.cmdSetLimitMIN.setText("min");
+        this.cmdSetLimitMIN.addSelectionListener(this);
+
+        this.cmdSetLimitMAX = new Command(cmdLimit, Command.GENERAL, 0);
+        this.cmdSetLimitMAX.setText("max");
+        this.cmdSetLimitMAX.addSelectionListener(this);
+
+        // create Clear commands
+        this.cmdClear = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdClear.setText("Clear");
+        this.cmdClear.addSelectionListener(this);
+    }
+
+    /**
+     * Create a QueryDialog with defined parameters and open it.
+     * @param type a type of a QueryDialog dialog to open
+     */
+    private void openDialog(int type)
+    {
+        try
+        {
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.NONE, type);
+
+            // set title
+            if (this.titleField != null && !this.titleField.isDisposed())
+            {
+                if (!this.titleField.isEnabled() &&
+                        "null".equals(this.titleField.getText()))
+                {
+                    dlg.setText(null);
+                }
+                else
+                {
+                    dlg.setText(this.titleField.getText());
+                }
+            }
+
+            // set prompt and default
+            String defaultValue = "";
+            if (this.defaultField != null && !this.defaultField.isDisposed())
+            {
+                if (!this.defaultField.isEnabled() &&
+                        "null".equals(this.defaultField.getText()))
+                {
+                    defaultValue = null;
+                }
+                else
+                {
+                    defaultValue = this.defaultField.getText();
+                }
+            }
+
+            if (this.promptField != null && !this.promptField.isDisposed())
+            {
+                if (!this.promptField.isEnabled() &&
+                        "null".equals(this.promptField.getText()))
+                {
+                    dlg.setPromptText(null, defaultValue);
+                }
+                else
+                {
+                    dlg.setPromptText(this.promptField.getText(), defaultValue);
+                }
+            }
+
+            // set limit
+            if (this.minField != null && !this.minField.isDisposed())
+            {
+                String value = this.minField.getText();
+                if (value != null && !"".equals(value))
+                {
+                    dlg.setMinimum(Integer.parseInt(this.minField.getText()));
+                }
+            }
+            if (this.maxField != null && !this.maxField.isDisposed())
+            {
+                String value = this.maxField.getText();
+                if (value != null && !"".equals(value))
+                {
+                    dlg.setMaximum(Integer.parseInt(this.maxField.getText()));
+                }
+            }
+
+            // open the dialog
+            dlg.open();
+
+        }
+        catch (IllegalArgumentException ex1)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.OK);
+            msg.setMessage("Exception: " + ex1.getMessage());
+            msg.open();
+        }
+        catch (SWTException ex2)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.OK);
+            msg.setMessage("Exception: " + ex2.getMessage());
+            msg.open();
+        }
+        catch (Exception ex)
+        {
+            MessageBox msg = new MessageBox(this.shell, SWT.OK);
+            msg.setMessage("Exception: " + ex.getMessage());
+            msg.open();
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+
+        // create commands
+        if (e.widget == this.cmdCreateSTANDARD)
+        {
+            this.openDialog(QueryDialog.STANDARD);
+            return;
+        }
+        if (e.widget == this.cmdCreateNUMBER)
+        {
+            this.openDialog(QueryDialog.NUMERIC);
+            return;
+        }
+        if (e.widget == this.cmdCreateTIME)
+        {
+            this.openDialog(QueryDialog.TIME);
+            return;
+        }
+        if (e.widget == this.cmdCreateDATE)
+        {
+            this.openDialog(QueryDialog.DATE);
+            return;
+        }
+        if (e.widget == this.cmdCreatePASSWORD)
+        {
+            this.openDialog(QueryDialog.PASSWORD);
+            return;
+        }
+
+        // set commands
+        if (e.widget == this.cmdSetTitleDEFINE)
+        {
+            // check does the field already exist
+            if (this.titleField == null || this.titleField.isDisposed())
+            {
+                // create title field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Title: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.titleField = new Text(this.shell, SWT.BORDER);
+                this.titleField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+
+            }
+            // clear and enable the field
+            this.titleField.setText("");
+            this.titleField.setEnabled(true);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetTitleNULL)
+        {
+            if (this.titleField == null || this.titleField.isDisposed())
+            {
+                // create title field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Title: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.titleField = new Text(this.shell, SWT.BORDER);
+                this.titleField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            this.titleField.setText("null");
+            // disable the field
+            this.titleField.setEnabled(false);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetPromptDEFINE)
+        {
+            // check does the field already exist
+            if (this.promptField == null || this.promptField.isDisposed())
+            {
+                // create prompt field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Prompt: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.promptField = new Text(this.shell, SWT.BORDER);
+                this.promptField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            // clear and enable the field
+            this.promptField.setText("");
+            this.promptField.setEnabled(true);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetPromptNULL)
+        {
+            if (this.promptField == null || this.promptField.isDisposed())
+            {
+                // create prompt field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Prompt: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.promptField = new Text(this.shell, SWT.BORDER);
+                this.promptField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            this.promptField.setText("null");
+            // disable the field
+            this.promptField.setEnabled(false);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetDefaultDEFINE)
+        {
+            // check does the field already exist
+            if (this.defaultField == null || this.defaultField.isDisposed())
+            {
+                // create default field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Default value: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.defaultField = new Text(this.shell, SWT.BORDER);
+                this.defaultField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            // clear and enable the field
+            this.defaultField.setText("");
+            this.defaultField.setEnabled(true);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetDefaultNULL)
+        {
+            if (this.defaultField == null || this.defaultField.isDisposed())
+            {
+                // create default field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Default value: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.defaultField = new Text(this.shell, SWT.BORDER);
+                this.defaultField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            this.defaultField.setText("null");
+            // disable the field
+            this.defaultField.setEnabled(false);
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetLimitMIN)
+        {
+            if (this.minField == null || this.minField.isDisposed())
+            {
+                // create min field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Min length: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.minField = new ConstrainedText(this.shell,
+                                                    SWT.BORDER,
+                                                    ConstrainedText.NUMERIC);
+                this.minField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+        if (e.widget == this.cmdSetLimitMAX)
+        {
+            if (this.maxField == null || this.maxField.isDisposed())
+            {
+                // create max field
+                Label label = new Label(this.shell, SWT.NONE);
+                label.setText("Max length: ");
+                label.setLayoutData(
+                    new GridData(SWT.RIGHT, SWT.CENTER, true, false));
+
+                this.maxField = new ConstrainedText(this.shell,
+                                                    SWT.BORDER,
+                                                    ConstrainedText.NUMERIC);
+                this.maxField.setLayoutData(
+                    new GridData(SWT.LEFT, SWT.CENTER, true, false));
+            }
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // clear command
+        if (e.widget == this.cmdClear)
+        {
+            // dispose all config field (clear the screen)
+            Control[] controls = this.shell.getChildren();
+            for (int i=0; i<controls.length; i++)
+            {
+                if (controls[i] != null && !controls[i].isDisposed())
+                    controls[i].dispose();
+            }
+            // update the shell
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        // Exit command handling
+        super.widgetSelected(e);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,83 @@
+<!--
+#
+# 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="ShellTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ShellTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_01"/>
+    <property name="midlet2.name" value="ShellTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_02"/>
+    <property name="midlet3.name" value="ShellTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_03"/>
+    <property name="midlet4.name" value="ShellTestMIDlet_04"/>
+    <property name="midlet4.icon.name" value="icon.png"/>
+    <property name="midlet4.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_04"/>
+    <property name="midlet5.name" value="ShellTestMIDlet_05"/>
+    <property name="midlet5.icon.name" value="icon.png"/>
+    <property name="midlet5.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_05"/>
+    <property name="midlet6.name" value="ShellTestMIDlet_06"/>
+    <property name="midlet6.icon.name" value="icon.png"/>
+    <property name="midlet6.package.name" value="com.nokia.test.java.eswt.shell.ShellTestMIDlet_06"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ShellTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+            <midlet name="${midlet4.name}" icon="${midlet4.icon.name}" class="${midlet4.package.name}" />
+            <midlet name="${midlet5.name}" icon="${midlet5.icon.name}" class="${midlet5.package.name}" />
+            <midlet name="${midlet6.name}" icon="${midlet6.icon.name}" class="${midlet6.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
Binary file javauis/tsrc/fute/eswt/ShellTestMidletSuite/res/icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.SelectionEvent;
+
+import org.eclipse.swt.graphics.Image;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class ShellTestMIDlet_01 extends TestBaseMIDlet
+        implements FocusListener
+{
+
+    /** */
+    private Shell tooltip = null;
+    /** */
+    private Text field    = null;
+
+    private Image icon = null;
+
+    /* (non-Javadoc)
+     * @see TestCaseBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set a title
+        this.shell.setText("Modeless Shell test");
+
+        // create and setup layout
+        GridLayout layout = new GridLayout(2, false);
+        layout.horizontalSpacing = 10;
+        this.shell.setLayout(layout);
+
+        // create text fields
+        Label label1 = new Label(this.shell, SWT.NONE);
+        label1.setText("First field: ");
+        GridData l1data = new GridData();
+        l1data.horizontalAlignment = SWT.RIGHT;
+        label1.setLayoutData(l1data);
+
+        Text first_field = new Text(this.shell, SWT.BORDER);
+        first_field.setText("First");
+        first_field.addFocusListener(this);
+        GridData f1data = new GridData();
+        f1data.horizontalAlignment = SWT.FILL;
+        first_field.setLayoutData(f1data);
+
+        Label label2 = new Label(this.shell, SWT.NONE);
+        label2.setText("Second field: ");
+        GridData l2data = new GridData();
+        l2data.horizontalAlignment = SWT.RIGHT;
+        label2.setLayoutData(l2data);
+
+        this.field = new Text(this.shell, SWT.BORDER);
+        this.field.setText("Second");
+        this.field.addFocusListener(this);
+        GridData f2data = new GridData();
+        f2data.horizontalAlignment = SWT.FILL;
+        this.field.setLayoutData(f2data);
+
+        createToolTip("Second field is focused");
+    }
+
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create an image
+        this.icon =
+            new Image(this.display,
+                      this.getClass().getResourceAsStream("/res/icon.png"));
+
+        Label image = new Label(this.tooltip, SWT.NONE);
+        image.setImage(icon);
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(10, Display.getCurrent().getBounds().height/2);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+     */
+    public void focusGained(FocusEvent event)
+    {
+        if (event.widget == this.field)
+        {
+            if (this.tooltip != null)
+                this.tooltip.setVisible(true);
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+     */
+    public void focusLost(FocusEvent event)
+    {
+        if (event.widget == this.field)
+        {
+            if (this.tooltip != null)
+            {
+                this.tooltip.setVisible(false);
+            }
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget.getData("text").equals("Exit"))
+        {
+            icon.dispose();
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the shell component
+ * - shell trimming
+ * - shell stays on top
+ * - using shell as popup dialog
+ */
+public class ShellTestMIDlet_02 extends TestBaseMIDlet implements KeyListener
+{
+    /** new shell instance */
+    private Shell testshell = null;
+    /** "close" command */
+    private Command cmdClose = null;
+    /** "maximize" / "restore" / "switch" command */
+    private Command cmdSwitch = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Shell Test 2");
+        this.shell.addKeyListener(this);
+        this.shell.setLayout(new GridLayout());
+        Label label = new Label(this.shell, SWT.CENTER);
+        label.setText("Original Shell");
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label2 = new Label(this.shell, SWT.CENTER);
+        label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+        label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label3 = new Label(this.shell, SWT.CENTER);
+        label3.setText("Shell CA:"+this.shell.getClientArea().width+","+this.shell.getClientArea().height);
+        label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label4 = new Label(this.shell, SWT.CENTER);
+        label4.setText("S to D:"+this.shell.toDisplay(0,0).x+","+this.shell.toDisplay(0,0).y);
+        label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "shell trim" menuitem
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Shell Trim");
+        item.addSelectionListener(this);
+        // "dialog trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Dialog Trim");
+        item.addSelectionListener(this);
+        // "no trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("No Trim");
+        item.addSelectionListener(this);
+        // "on top" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("On Top");
+        item.addSelectionListener(this);
+        // "popup" submenu
+        Menu menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Popup");
+        item.setMenu(menu);
+        // "type 1" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 1");
+        item.addSelectionListener(this);
+        // "type 2" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 2");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * close the test shell and dispose its buttons
+     */
+    private void closeTestShell()
+    {
+        if (this.testshell != null && !this.testshell.isDisposed())
+            this.testshell.dispose();
+    }
+
+    /**
+     * creates a shell based on the given parameters
+     * @param style the style og the shell
+     * @param title the title of the shell
+     * @param labelStr string for a label on the shell
+     * @param leftCmd string for the left softkey command
+     * @param doPack true if the should be pack()-ed before layout()
+     */
+    private void createTestShell(int style, String title, String labelStr, String leftCmd, boolean doPack)
+    {
+        // close the previous shell
+        this.closeTestShell();
+        // create the new shell
+        this.testshell = new Shell(this.shell, style);
+        // set title
+        if (title != null)
+            this.testshell.setText(title);
+        this.testshell.setLayout(new GridLayout());
+        // add a label
+        Label label = new Label(this.testshell, SWT.CENTER);
+        label.setText(labelStr);
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label2 = new Label(this.testshell, SWT.CENTER);
+        label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+        label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label3 = new Label(this.testshell, SWT.CENTER);
+        label3.setText("Shell CA:"+this.testshell.getClientArea().width+","+this.testshell.getClientArea().height);
+        label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label4 = new Label(this.testshell, SWT.CENTER);
+        label4.setText("S to D:"+this.testshell.toDisplay(0,0).x+","+this.testshell.toDisplay(0,0).y);
+        label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // left softkey command
+        if (leftCmd != null)
+        {
+            this.cmdSwitch = new Command(this.testshell, Command.SELECT, 0);
+            this.cmdSwitch.setText(leftCmd);
+            this.cmdSwitch.addSelectionListener(this);
+        }
+        // "close" right softkey command
+        this.cmdClose = new Command(this.testshell, Command.EXIT, 0);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+        // display the new shell
+        if (doPack)
+            this.testshell.pack();
+        this.testshell.layout();
+        this.testshell.open();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Shell Trim".equals(scmd))
+            {
+                // open a new shell with shell_trim
+                this.createTestShell(SWT.SHELL_TRIM, "Shell", "Shell Trim Style", null, false);
+                return;
+            }
+            if ("Dialog Trim".equals(scmd))
+            {
+                // open a new shell with dialog_trim
+                this.createTestShell(SWT.DIALOG_TRIM, "Dialog", "Dialog Trim Style", "Maximize", true);
+                return;
+            }
+            if ("No Trim".equals(scmd))
+            {
+                // open a new shell with no_trim
+                this.createTestShell(SWT.NO_TRIM, "No", "No Trim Style", null, false);
+                return;
+            }
+            if ("On Top".equals(scmd))
+            {
+                // open a new shell with on_top
+                this.createTestShell(SWT.ON_TOP, "On Top", "Shell stays on top", "Switch", false);
+                this.testshell.addKeyListener(this);
+                return;
+            }
+            if ("Type 1".equals(scmd))
+            {
+                // open a shell as a popup with dialog trim
+                this.createTestShell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL, "Type 1", "Popup type 1", null, true);
+                return;
+            }
+            if ("Type 2".equals(scmd))
+            {
+                // open a shell as a popup with border trim, no title
+                this.createTestShell(SWT.BORDER | SWT.APPLICATION_MODAL, null, "Popup type 2", null, true);
+                return;
+            }
+        }
+        else if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Maximize".equals(scmd))
+            {
+                // maximize the test shell
+                this.cmdSwitch.setText("Restore");
+                this.testshell.setMaximized(true);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Restore".equals(scmd))
+            {
+                // restore the test shell
+                this.cmdSwitch.setText("Maximize");
+                this.testshell.setMaximized(false);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Switch".equals(scmd))
+            {
+                // switch to the original shell
+                this.shell.setActive();
+                this.shell.update();
+                return;
+            }
+            if (event.widget == this.cmdClose)
+            {
+                // close the test shell
+                this.closeTestShell();
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     *  a key is pressed...
+     */
+    public void keyPressed(KeyEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * a key is released
+     */
+    public void keyReleased(KeyEvent event)
+    {
+        if ((event.keyCode | SWT.KEYCODE_BIT) == SWT.KEYPAD_0)
+            // close the test shell
+            this.closeTestShell();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the hell component
+ * - shell containing composites
+ */
+public class ShellTestMIDlet_03 extends TestBaseMIDlet
+{
+    /** composite instances */
+    private Composite comp1 = null;
+    private Composite comp2 = null;
+    private Composite comp3 = null;
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Shell Test 3");
+        this.shell.setLayout(new FillLayout(SWT.VERTICAL));
+
+        // "composite 1" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Composite 1");
+        cmd.addSelectionListener(this);
+        // "composite 2" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 1);
+        cmd.setText("Composite 2");
+        cmd.addSelectionListener(this);
+        // "composite 3" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 2);
+        cmd.setText("Composite 3");
+        cmd.addSelectionListener(this);
+
+        // setup composite 1
+        this.comp1 = new Composite(this.shell, SWT.BORDER | SWT.V_SCROLL);
+        this.comp1.setVisible(false);
+        // "1st composite" left softkey command
+        cmd = new Command(this.comp1, Command.SELECT, 0);
+        cmd.setText("1st Composite");
+
+        // setup composite 2
+        this.comp2 = new Composite(this.shell, SWT.BORDER |SWT.H_SCROLL);
+        this.comp2.setVisible(false);
+        // "2nd composite" left softkey command
+        cmd = new Command(this.comp2, Command.SELECT, 0);
+        cmd.setText("2nd Composite");
+
+        // setup composite 3
+        this.comp3 = new Composite(this.shell, SWT.H_SCROLL | SWT.V_SCROLL);
+        this.comp3.setVisible(false);
+        // "3rd composite" left softkey command
+        cmd = new Command(this.comp3, Command.SELECT, 0);
+        cmd.setText("3rd Composite");
+    }
+
+    private void chgComp(String title, boolean c1, boolean c2, boolean c3)
+    {
+        this.shell.setText(title);
+        this.shell.update();
+        this.comp1.setVisible(c1);
+        this.comp2.setVisible(c2);
+        this.comp3.setVisible(c3);
+    }
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Composite 1".equals(scmd))
+            {
+                // show the 1st composite
+                this.chgComp("Composite 1", true, false, false);
+                return;
+            }
+            if ("Composite 2".equals(scmd))
+            {
+                // show the 2nd composite
+                this.chgComp("Composite 2", false, true, false);
+                return;
+            }
+            if ("Composite 3".equals(scmd))
+            {
+                // show the 3rd composite
+                this.chgComp("Composite 3", false, false, true);
+                return;
+            }
+            if (event.widget == this.cmdExit)
+            {
+                // dispose the composites before exit
+                if (this.comp1 != null && !this.comp1.isDisposed())
+                    this.comp1.dispose();
+                if (this.comp2 != null && !this.comp2.isDisposed())
+                    this.comp2.dispose();
+                if (this.comp3 != null && !this.comp3.isDisposed())
+                    this.comp3.dispose();
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,332 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.ercp.swt.mobile.MobileDevice;
+import org.eclipse.ercp.swt.mobile.Screen;
+import org.eclipse.ercp.swt.mobile.ScreenEvent;
+import org.eclipse.ercp.swt.mobile.ScreenListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the shell component
+ * - shell trimming
+ * - shell stays on top
+ * - using shell as popup dialog
+ */
+public class ShellTestMIDlet_04 extends TestBaseMIDlet implements KeyListener, ControlListener, ScreenListener
+{
+    /** new shell instance */
+    private Shell testshell = null;
+    /** "close" command */
+    private Command cmdClose = null;
+    /** "maximize" / "restore" / "switch" command */
+    private Command cmdSwitch = null;
+    private MobileDevice iDevice;
+    private Screen iScreen;
+
+    private boolean closeShell;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Shell Test 4");
+        this.shell.addKeyListener(this);
+        this.shell.setLayout(new GridLayout());
+        Label label = new Label(this.shell, SWT.CENTER);
+        label.setText("Original Shell");
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label2 = new Label(this.shell, SWT.CENTER);
+        label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+        label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label3 = new Label(this.shell, SWT.CENTER);
+        label3.setText("Shell CA:"+this.shell.getClientArea().width+","+this.shell.getClientArea().height);
+        label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label4 = new Label(this.shell, SWT.CENTER);
+        label4.setText("S to D:"+this.shell.toDisplay(0,0).x+","+this.shell.toDisplay(0,0).y);
+        label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        closeShell = false;
+        iDevice = MobileDevice.getMobileDevice();
+        this.iScreen = iDevice.getScreens()[0];
+        iScreen.addEventListener(this);
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "shell trim" menuitem
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Shell Trim");
+        item.addSelectionListener(this);
+        // "dialog trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Dialog Trim");
+        item.addSelectionListener(this);
+        // "no trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("No Trim");
+        item.addSelectionListener(this);
+        // "on top" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("On Top");
+        item.addSelectionListener(this);
+        // "popup" submenu
+        Menu menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Popup");
+        item.setMenu(menu);
+        // "type 1" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 1");
+        item.addSelectionListener(this);
+        // "type 2" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 2");
+        item.addSelectionListener(this);
+
+        // "change" menuitem for shell closing or moving
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Change Shell state");
+        item.addSelectionListener(this);
+
+    }
+
+    /**
+     * close the test shell and dispose its buttons
+     */
+    private void closeTestShell()
+    {
+        if (this.testshell != null && !this.testshell.isDisposed())
+            this.testshell.dispose();
+    }
+
+    /**
+     * creates a shell based on the given parameters
+     * @param style the style og the shell
+     * @param title the title of the shell
+     * @param labelStr string for a label on the shell
+     * @param leftCmd string for the left softkey command
+     * @param doPack true if the should be pack()-ed before layout()
+     */
+    private void createTestShell(int style, String title, String labelStr, String leftCmd, boolean doPack)
+    {
+        // close the previous shell
+        this.closeTestShell();
+        // create the new shell
+        this.testshell = new Shell(this.shell, style);
+        // set title
+        if (title != null)
+            this.testshell.setText(title);
+        this.testshell.setLayout(new GridLayout());
+        // add a label
+        Label label = new Label(this.testshell, SWT.CENTER);
+        label.setText(labelStr);
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label2 = new Label(this.testshell, SWT.CENTER);
+        label2.setText("Display CA:"+this.display.getClientArea().width+","+this.display.getClientArea().height);
+        label2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label3 = new Label(this.testshell, SWT.CENTER);
+        label3.setText("Shell CA:"+this.testshell.getClientArea().width+","+this.testshell.getClientArea().height);
+        label3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        Label label4 = new Label(this.testshell, SWT.CENTER);
+        label4.setText("S to D:"+this.testshell.toDisplay(0,0).x+","+this.testshell.toDisplay(0,0).y);
+        label4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // left softkey command
+        if (leftCmd != null)
+        {
+            this.cmdSwitch = new Command(this.testshell, Command.SELECT, 0);
+            this.cmdSwitch.setText(leftCmd);
+            this.cmdSwitch.addSelectionListener(this);
+        }
+        this.testshell.addControlListener(this);
+
+        // "close" right softkey command
+        this.cmdClose = new Command(this.testshell, Command.EXIT, 0);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+        // display the new shell
+        if (doPack)
+            this.testshell.pack();
+        this.testshell.layout();
+        this.testshell.open();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Shell Trim".equals(scmd))
+            {
+                // open a new shell with shell_trim
+                this.createTestShell(SWT.SHELL_TRIM, "Shell", "Shell Trim Style", null, false);
+                return;
+            }
+            if ("Dialog Trim".equals(scmd))
+            {
+                // open a new shell with dialog_trim
+                this.createTestShell(SWT.DIALOG_TRIM, "Dialog", "Dialog Trim Style", "Maximize", true);
+                return;
+            }
+            if ("No Trim".equals(scmd))
+            {
+                // open a new shell with no_trim
+                this.createTestShell(SWT.NO_TRIM, "No", "No Trim Style", null, false);
+                return;
+            }
+            if ("On Top".equals(scmd))
+            {
+                // open a new shell with on_top
+                this.createTestShell(SWT.ON_TOP, "On Top", "Shell stays on top", "Switch", false);
+                this.testshell.addKeyListener(this);
+                return;
+            }
+            if ("Type 1".equals(scmd))
+            {
+                // open a shell as a popup with dialog trim
+                this.createTestShell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL, "Type 1", "Popup type 1", null, true);
+                return;
+            }
+            if ("Type 2".equals(scmd))
+            {
+                // open a shell as a popup with border trim, no title
+                this.createTestShell(SWT.BORDER | SWT.APPLICATION_MODAL, null, "Popup type 2", null, true);
+                return;
+            }
+            if ("Change Shell state".equals(scmd))
+            {
+                // close
+
+                this.closeShell = !(this.closeShell);
+
+                return;
+            }
+        }
+        else if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Maximize".equals(scmd))
+            {
+                // maximize the test shell
+                this.cmdSwitch.setText("Restore");
+                this.testshell.setMaximized(true);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Restore".equals(scmd))
+            {
+                // restore the test shell
+                this.cmdSwitch.setText("Maximize");
+                this.testshell.setMaximized(false);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Switch".equals(scmd))
+            {
+                // switch to the original shell
+                this.shell.setActive();
+                this.shell.update();
+                return;
+            }
+            if (event.widget == this.cmdClose)
+            {
+                // close the test shell
+                this.closeTestShell();
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     *  a key is pressed...
+     */
+    public void keyPressed(KeyEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * a key is released
+     */
+    public void keyReleased(KeyEvent event)
+    {
+        if ((event.keyCode | SWT.KEYCODE_BIT) == SWT.KEYPAD_0)
+            // close the test shell
+            this.closeTestShell();
+    }
+
+    public void controlMoved(ControlEvent e)
+    {
+        System.out.println("Control moved");
+    }
+    public void controlResized(ControlEvent e)
+    {
+        System.out.println("Control Resisized");
+        if (e.widget instanceof Shell)
+        {
+            this.testshell.setLocation(100, 50);
+            System.out.println("testshell Resisized");
+        }
+    }
+    public void screenActivated(ScreenEvent event)
+    {
+    }
+    public void screenDeactivated(ScreenEvent event)
+    {
+    }
+    public void screenOrientationChanged(ScreenEvent event)
+    {
+        System.out.println("Shell Moved");
+        if (this.closeShell)
+        {
+            if (this.testshell != null)
+                this.testshell.close();
+        }
+        if (event.orientation == Screen.LANDSCAPE)
+        {
+            this.testshell.setLocation(100, 100);
+            System.out.println("testshell landscape");
+        }
+        if (event.orientation == Screen.PORTRAIT)
+        {
+            this.testshell.setLocation(0, 0);
+            System.out.println("testshell portrait");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,302 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the shell component
+ * - shell trimming
+ * - shell stays on top
+ * - using shell as popup dialog
+ */
+public class ShellTestMIDlet_05 extends TestBaseMIDlet implements KeyListener
+{
+    /** new shell instance */
+    private Shell testshell = null;
+    /** "close" command */
+    private Command cmdClose = null;
+    /** "maximize" / "restore" / "switch" command */
+    private Command cmdSwitch = null;
+
+    /** testing command */
+    private Command cmdTest = null;
+
+    /** "close" command */
+    private MenuItem miClose = null;
+    /** "maximize" / "restore" / "switch" command */
+    private MenuItem miShow = null;
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Shell Test 2");
+        this.shell.addKeyListener(this);
+        this.shell.setLayout(new GridLayout());
+        Label label = new Label(this.shell, SWT.CENTER);
+        label.setText("Original Shell");
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "shell trim" menuitem
+        MenuItem item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Shell Trim");
+        item.addSelectionListener(this);
+        // "dialog trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("Dialog Trim");
+        item.addSelectionListener(this);
+        // "no trim" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("No Trim");
+        item.addSelectionListener(this);
+        // "on top" menuitem
+        item = new MenuItem(mainmenu, SWT.PUSH);
+        item.setText("On Top");
+        item.addSelectionListener(this);
+        // "popup" submenu
+        Menu menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Popup");
+        item.setMenu(menu);
+        // "type 1" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 1");
+        item.addSelectionListener(this);
+        // "type 2" menuitem for "popup" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Type 2");
+        item.addSelectionListener(this);
+
+        // "close" menuitem for making shell invisible
+        this.miClose = new MenuItem(mainmenu, SWT.PUSH);
+        this.miClose.setText("Close main shell");
+        this.miClose.addSelectionListener(this);
+        // "close" menuitem for making shell invisible
+        this.miShow = new MenuItem(mainmenu, SWT.PUSH);
+        this.miShow.setText("Show main shell");
+        this.miShow.addSelectionListener(this);
+        this.miShow.setEnabled(false);
+
+        this.cmdTest = new Command(this.shell, Command.SELECT, 0);
+        this.cmdTest.setText("Test");
+        this.cmdTest.addSelectionListener(this);
+
+        this.shell.setCapture(true);
+    }
+
+    /**
+     * close the test shell and dispose its buttons
+     */
+    private void closeTestShell()
+    {
+        if (this.testshell != null && !this.testshell.isDisposed())
+            this.testshell.dispose();
+
+    }
+
+    /**
+     * creates a shell based on the given parameters
+     * @param style the style og the shell
+     * @param title the title of the shell
+     * @param labelStr string for a label on the shell
+     * @param leftCmd string for the left softkey command
+     * @param doPack true if the should be pack()-ed before layout()
+     */
+    private void createTestShell(int style, String title, String labelStr, String leftCmd, boolean doPack)
+    {
+        // close the previous shell
+        this.closeTestShell();
+        // create the new shell
+        this.testshell = new Shell(this.shell, style);
+        // set title
+        if (title != null)
+            this.testshell.setText(title);
+        this.testshell.setLayout(new GridLayout());
+        // add a label
+        Label label = new Label(this.testshell, SWT.CENTER);
+        label.setText(labelStr);
+        label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        // left softkey command
+        if (leftCmd != null)
+        {
+            this.cmdSwitch = new Command(this.testshell, Command.SELECT, 0);
+            this.cmdSwitch.setText(leftCmd);
+            this.cmdSwitch.addSelectionListener(this);
+        }
+        // "close" right softkey command
+        this.cmdClose = new Command(this.testshell, Command.EXIT, 0);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+
+        if (!this.shell.isVisible())
+        {
+            this.shell.setCapture(false);
+            this.testshell.setCapture(true);
+        }
+        // display the new shell
+        if (doPack)
+            this.testshell.pack();
+        this.testshell.layout();
+        this.testshell.open();
+
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Shell Trim".equals(scmd))
+            {
+                // open a new shell with shell_trim
+                this.createTestShell(SWT.SHELL_TRIM, "Shell", "Shell Trim Style", null, false);
+                return;
+            }
+            if ("Dialog Trim".equals(scmd))
+            {
+                // open a new shell with dialog_trim
+                this.createTestShell(SWT.DIALOG_TRIM, "Dialog", "Dialog Trim Style", "Maximize", true);
+                return;
+            }
+            if ("No Trim".equals(scmd))
+            {
+                // open a new shell with no_trim
+                this.createTestShell(SWT.NO_TRIM, "No", "No Trim Style", null, false);
+                return;
+            }
+            if ("On Top".equals(scmd))
+            {
+                // open a new shell with on_top
+                this.createTestShell(SWT.ON_TOP, "On Top", "Shell stays on top", "Switch", false);
+                this.testshell.addKeyListener(this);
+                return;
+            }
+            if ("Type 1".equals(scmd))
+            {
+                // open a shell as a popup with dialog trim
+                this.createTestShell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL, "Type 1", "Popup type 1", null, true);
+                return;
+            }
+            if ("Type 2".equals(scmd))
+            {
+                // open a shell as a popup with border trim, no title
+                this.createTestShell(SWT.BORDER | SWT.APPLICATION_MODAL, null, "Popup type 2", null, true);
+                return;
+            }
+            if ("Close main shell".equals(scmd))
+            {
+                // make main shell invisible
+                this.shell.setVisible(false);
+                this.miClose.setEnabled(false);
+                this.miShow.setEnabled(true);
+                this.cmdSwitch = new Command(this.shell, Command.SELECT, 0);
+                this.cmdSwitch.setText("Switch");
+                this.cmdSwitch.addSelectionListener(this);
+                return;
+            }
+            if ("Show main shell".equals(scmd))
+            {
+                // make main shell visible
+                this.shell.setVisible(true);
+                this.miClose.setEnabled(true);
+                this.miShow.setEnabled(false);
+                return;
+            }
+        }
+        else if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Maximize".equals(scmd))
+            {
+                // maximize the test shell
+                this.cmdSwitch.setText("Restore");
+                this.testshell.setMaximized(true);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Restore".equals(scmd))
+            {
+                // restore the test shell
+                this.cmdSwitch.setText("Maximize");
+                this.testshell.setMaximized(false);
+                this.testshell.update();
+                this.shell.update();
+                return;
+            }
+            if ("Switch".equals(scmd))
+            {
+                // switch to the original shell
+                this.shell.setActive();
+                this.shell.update();
+                return;
+            }
+            if (event.widget == this.cmdClose)
+            {
+                // close the test shell
+                this.closeTestShell();
+                if (!this.shell.isVisible())
+                {
+                    this.shell.setVisible(true);
+                    this.miClose.setEnabled(true);
+                    this.miShow.setEnabled(false);
+                }
+                return;
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     *  a key is pressed...
+     */
+    public void keyPressed(KeyEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * a key is released
+     */
+    public void keyReleased(KeyEvent event)
+    {
+        if ((event.keyCode | SWT.KEYCODE_BIT) == SWT.KEYPAD_0)
+            // close the test shell
+            this.closeTestShell();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/ShellTestMidletSuite/src/com/nokia/test/java/eswt/shell/ShellTestMIDlet_06.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,182 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.shell;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the hell component
+ * - shell containing composites
+ */
+public class ShellTestMIDlet_06 extends TestBaseMIDlet
+{
+    /** composite instances */
+    private Composite comp1 = null;
+    private Composite comp2 = null;
+    private Composite comp3 = null;
+
+    private Button txtButton = null;
+    private Button txtButton2 = null;
+    private Button txtButton3 = null;
+
+    private Button numButton = null;
+    private Button numButton2 = null;
+    private Button numButton3 = null;
+
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Shell Test 6");
+        this.shell.setLayout(new FillLayout(SWT.VERTICAL));
+
+        // "composite 1" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Composite 1");
+        cmd.addSelectionListener(this);
+        // "composite 2" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 1);
+        cmd.setText("Composite 2");
+        cmd.addSelectionListener(this);
+        // "composite 3" left softkey command
+        cmd = new Command(this.shell, Command.SELECT, 2);
+        cmd.setText("Composite 3");
+        cmd.addSelectionListener(this);
+
+        // setup composite 1
+        this.comp1 = new Composite(this.shell, SWT.BORDER | SWT.V_SCROLL);
+        this.comp1.setLayout(new FillLayout());
+        this.comp1.setVisible(false);
+        this.txtButton = new Button(this.comp1, SWT.BORDER|SWT.PUSH);
+        this.txtButton.setText("Comp1");
+        this.numButton = new Button(this.comp1, SWT.BORDER|SWT.PUSH);
+        numButton.setText("000,000");
+
+        // "1st composite" left softkey command
+        cmd = new Command(this.comp1, Command.SELECT, 0);
+        cmd.setText("1st Composite");
+
+        // setup composite 2
+        this.comp2 = new Composite(this.shell, SWT.BORDER |SWT.H_SCROLL);
+        this.comp2.setLayout(new RowLayout());
+        this.comp2.setVisible(false);
+        this.txtButton2 = new Button(this.comp2, SWT.BORDER|SWT.PUSH);
+        this.txtButton2.setText("Comp2");
+        this.numButton2 = new Button(this.comp2, SWT.BORDER|SWT.PUSH);
+        numButton.setText("000,000");
+        // "2nd composite" left softkey command
+        cmd = new Command(this.comp2, Command.SELECT, 0);
+        cmd.setText("2nd Composite");
+
+        // setup composite 3
+        this.comp3 = new Composite(this.shell, SWT.H_SCROLL | SWT.V_SCROLL);
+        this.comp3.setLayout(new GridLayout(1,true));
+        this.comp3.setVisible(false);
+        this.txtButton3 = new Button(this.comp3, SWT.BORDER|SWT.PUSH);
+        this.txtButton3.setText("Comp3");
+        this.numButton3 = new Button(this.comp3, SWT.BORDER|SWT.PUSH);
+        numButton.setText("000,000");
+        // "3rd composite" left softkey command
+        cmd = new Command(this.comp3, Command.SELECT, 0);
+        cmd.setText("3rd Composite");
+        this.shell.layout();
+        numButton.setText(txtButton.getSize().x+","+txtButton.getSize().y);
+        numButton2.setText(txtButton2.getSize().x+","+txtButton2.getSize().y);
+        numButton3.setText(txtButton3.getSize().x+","+txtButton3.getSize().y);
+    }
+
+    private void chgComp(String title, boolean c1, boolean c2, boolean c3)
+    {
+        this.shell.setText(title);
+        if (c1)
+        {
+            this.comp1.layout();
+            this.comp1.setVisible(c1);
+            this.comp2.setVisible(c2);
+            this.comp3.setVisible(c3);
+        }
+        else if (c2)
+        {
+
+            this.comp2.layout();
+            this.comp1.setVisible(c1);
+            this.comp2.setVisible(c2);
+            this.comp3.setVisible(c3);
+        }
+        else if (c3)
+        {
+
+            this.comp3.layout();
+            this.comp1.setVisible(c1);
+            this.comp2.setVisible(c2);
+            this.comp3.setVisible(c3);
+        }
+    }
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Composite 1".equals(scmd))
+            {
+                // show the 1st composite
+                this.chgComp("Composite 1", true, false, false);
+                return;
+            }
+            if ("Composite 2".equals(scmd))
+            {
+                // show the 2nd composite
+                this.chgComp("Composite 2", false, true, false);
+                return;
+            }
+            if ("Composite 3".equals(scmd))
+            {
+                // show the 3rd composite
+                this.chgComp("Composite 3", false, false, true);
+                return;
+            }
+            if (event.widget == this.cmdExit)
+            {
+                // dispose the composites before exit
+                if (this.comp1 != null && !this.comp1.isDisposed())
+                    this.comp1.dispose();
+                if (this.comp2 != null && !this.comp2.isDisposed())
+                    this.comp2.dispose();
+                if (this.comp3 != null && !this.comp3.isDisposed())
+                    this.comp3.dispose();
+            }
+        }
+        super.widgetSelected(event);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SliderTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="SliderTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="SliderTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.slider.SliderTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="SliderTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SliderTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SliderTestMidletSuite/src/com/nokia/test/java/eswt/slider/SliderTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,305 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.slider;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.events.ShellListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Slider;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the slider component
+ * - creating slider
+ * - changing values of slider
+ * - operating slider
+ */
+public class SliderTestMIDlet_01 extends TestBaseMIDlet implements ShellListener
+{
+    /** screen to get initial slider parameters */
+    private Shell startScreen = null;
+    /** screen for changing slider settings */
+    private Shell settingsShell = null;
+    /** min. value (startup) */
+    private ConstrainedText minStart = null;
+    /** max. value (startup) */
+    private ConstrainedText maxStart = null;
+    /** min. value (settings) */
+    private ConstrainedText minSet = null;
+    /** max. value (settings) */
+    private ConstrainedText maxSet = null;
+    /** selection value */
+    private ConstrainedText selection = null;
+    /** thumb size */
+    private ConstrainedText thumb = null;
+    /** increment value */
+    private ConstrainedText increment = null;
+    /** pageincrement value */
+    private ConstrainedText pageinc = null;
+    /** slider instance */
+    private Slider slider = null;
+
+    /**
+     * create startup screen
+     */
+    private void setupStartupShell()
+    {
+        // screen for the initial slider creation
+        this.startScreen = new Shell(this.display, SWT.SHELL_TRIM);
+        this.startScreen.setText("Create Slider");
+        this.startScreen.setLayout(new GridLayout(2, false));
+
+        // "min. value:" label
+        Label label = new Label(this.startScreen, SWT.NONE);
+        label.setText("Min. value:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "min. value:"
+        this.minStart = new ConstrainedText(this.startScreen, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.minStart.setText(String.valueOf(0));
+        this.minStart.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "max. value:" label
+        label = new Label(this.startScreen, SWT.NONE);
+        label.setText("Max. value:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "max. value:"
+        this.maxStart = new ConstrainedText(this.startScreen, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.maxStart.setText(String.valueOf(100));
+        this.maxStart.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "create" left softkey command
+        Command cmd = new Command(this.startScreen, Command.SELECT, 0);
+        cmd.setText("Create");
+        cmd.addSelectionListener(this);
+    }
+
+    /**
+     * create settings screen
+     */
+    private void setupSettingsShell()
+    {
+        // screen for changing the slider's settings
+        this.settingsShell = new Shell(this.display, SWT.SHELL_TRIM);
+        this.settingsShell.setText("Settings");
+        this.settingsShell.setLayout(new GridLayout(2, false));
+
+        // "min. value:" label
+        Label label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Min. value:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "min. value:"
+        this.minSet = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.minSet.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "max. value:" label
+        label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Max. value:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "max. value:"
+        this.maxSet = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.maxSet.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "selection:" label
+        label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Selection:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for " :"
+        this.selection = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.selection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "thumb:" label
+        label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Thumb:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "thumb:"
+        this.thumb = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.thumb.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "increment:" label
+        label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Increment:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for "increment:"
+        this.increment = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.increment.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "page increment:" label
+        label = new Label(this.settingsShell, SWT.NONE);
+        label.setText("Page increment:");
+        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+        // input field for page increment":"
+        this.pageinc = new ConstrainedText(this.settingsShell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.pageinc.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        // "ok" left softkey command
+        Command cmd = new Command(this.settingsShell, Command.SELECT, 0);
+        cmd.setText("Ok");
+        cmd.addSelectionListener(this);
+        // "cancel" right softkey command
+        cmd = new Command(this.settingsShell, Command.EXIT, 0);
+        cmd.setText("Cancel");
+        cmd.addSelectionListener(this);
+
+        this.settingsShell.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Slider Test");
+        this.shell.addShellListener(this);
+        this.shell.setLayout(new GridLayout());
+
+        // "change" left softkey command
+        Command cmd = new Command(this.shell, Command.SELECT, 0);
+        cmd.setText("Change");
+        cmd.addSelectionListener(this);
+        // "close" right softkey command
+        cmd = new Command(this.shell, Command.EXIT, 0);
+        cmd.setText("Close");
+        cmd.addSelectionListener(this);
+
+        // setup the initial screen
+        this.setupStartupShell();
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command)
+        {
+            String scmd = ((Command) event.widget).getText();
+            if ("Create".equals(scmd))
+            {
+                // create the slider
+                this.slider = new Slider(this.shell, SWT.HORIZONTAL);
+                this.slider.setMinimum(Integer.parseInt(this.minStart.getText()));
+                this.slider.setMaximum(Integer.parseInt(this.maxStart.getText()));
+                this.slider.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+                this.shell.layout();
+                this.shell.setActive();
+                return;
+            }
+            if ("Change".equals(scmd))
+            {
+                // open the settings screen
+                if (this.settingsShell == null)
+                    this.setupSettingsShell();
+                this.minSet.setText(String.valueOf(this.slider.getMinimum()));
+                this.maxSet.setText(String.valueOf(this.slider.getMaximum()));
+                this.selection.setText(String.valueOf(this.slider.getSelection()));
+                this.thumb.setText(String.valueOf(this.slider.getThumb()));
+                this.increment.setText(String.valueOf(this.slider.getIncrement()));
+                this.pageinc.setText(String.valueOf(this.slider.getPageIncrement()));
+                this.settingsShell.setActive();
+                return;
+            }
+            if ("Close".equals(scmd))
+            {
+                // close the screen with the slider
+                this.minStart.setText(String.valueOf(this.slider.getMinimum()));
+                this.maxStart.setText(String.valueOf(this.slider.getMaximum()));
+                this.slider.dispose();
+                this.startScreen.setActive();
+                return;
+            }
+            if ("Ok".equals(scmd))
+            {
+                // change slider parameters
+                this.slider.setValues(Integer.parseInt(this.selection.getText()), Integer.parseInt(this.minSet.getText()), Integer.parseInt(this.maxSet.getText()), Integer.parseInt(this.thumb.getText()), Integer.parseInt(this.increment.getText()), Integer.parseInt(this.pageinc.getText()));
+                this.shell.setActive();
+                return;
+            }
+            if ("Cancel".equals(scmd))
+            {
+                // cancel new settings
+                this.shell.setActive();
+                return;
+            }
+            if (event.widget == this.cmdExit)
+            {
+                // exit the midlet
+                if (this.settingsShell != null && !this.settingsShell.isDisposed())
+                    this.settingsShell.dispose();
+                if (this.startScreen != null && !this.startScreen.isDisposed())
+                    this.startScreen.dispose();
+            }
+        }
+        super.widgetSelected(event);
+    }
+
+    /**
+     * shelllistener implementation; shell activated
+     */
+    public void shellActivated(ShellEvent event)
+    {
+        // at start change to the initial screen
+        this.cmdExit.dispose();
+        this.cmdExit = new Command(this.startScreen, Command.EXIT, 0);
+        this.cmdExit.setText("Exit");
+        this.cmdExit.addSelectionListener(this);
+        this.shell.removeShellListener(this);
+        this.startScreen.layout();
+        this.startScreen.open();
+    }
+
+    /**
+     * shelllistener implementation; shell activated
+     */
+    public void shellClosed(ShellEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * shelllistener implementation; shell deactivated
+     */
+    public void shellDeactivated(ShellEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * shelllistener implementation; shell deiconified
+     */
+    public void shellDeiconified(ShellEvent event)
+    {
+        // N/A
+    }
+
+    /**
+     * shelllistener implementation; shell iconified
+     */
+    public void shellIconified(ShellEvent event)
+    {
+        // N/A
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SortedListTestMidletSuite/build.xml	Tue May 25 12:34:19 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: 
+#
+-->
+
+<project name="SortedListTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="SortedListTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.sortedlist.SortedListTestMIDlet_01"/>
+    <property name="midlet2.name" value="SortedListTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.sortedlist.SortedListTestMIDlet_02"/>
+    <property name="midlet3.name" value="SortedListTestMIDlet_03"/>
+    <property name="midlet3.icon.name" value="icon.png"/>
+    <property name="midlet3.package.name" value="com.nokia.test.java.eswt.sortedlist.SortedListTestMIDlet_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="SortedListTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+package com.nokia.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,340 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.sortedlist;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+import java.util.Random;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.SortedList;
+
+/**
+ * The midlet is used to examine creation and browsing the content
+ * of SortedList component. It is also used to check a scroll bar
+ * appearance in case if the List's content doesn't fit the control bounds.
+ *
+ */
+public class SortedListTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** currently used list style */
+    protected int order_style   = SWT.NONE;
+    protected int type_style    = SWT.NONE;
+    protected int mode_style    = SWT.NONE;
+
+    /** sorted list */
+    protected SortedList list   = null;
+
+    private Shell tooltip = null;
+    /** commands */
+    protected Command cmdSetOrderASC        = null;
+    protected Command cmdSetOrderDESC   = null;
+    protected Command cmdSetTypeSINGLE  = null;
+    protected Command cmdSetTypeMULTI   = null;
+    protected Command cmdSetFilter      = null;
+
+    protected Command cmdEnableText     = null;
+    protected Command cmdDisableText    = null;
+
+    protected Command cmdCreate = null;
+
+    private MenuItem itemCreate = null;
+    private MenuItem itemSet = null;
+
+    /** a Text field used to define the number of items in the list */
+    protected ConstrainedText itemCount = null;
+
+    /** an array of chars used to generate random strings */
+    protected char[] charArray =
+    {
+        'A','a','B','b','C','c','D','d','E','e',
+        'F','f','G','g','H','h','I','i','J','j',
+        'K','k','L','l','M','m','N','n','O','o',
+        'P','p','Q','q','R','r','S','s','T','t',
+        'U','u','V','v','W','w','X','x','Y','y',
+        'Z','z'
+    };
+
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set the shell title
+        this.shell.setText("SortedList Test");
+
+        // create and set a layout
+        this.shell.setLayout(new GridLayout(2, false));
+
+        this.createToolTip("");
+        // create the CREATE command
+        this.cmdCreate = new Command(this.shell, Command.SELECT, 0);
+        this.cmdCreate.setText("Create");
+        this.cmdCreate.addSelectionListener(this);
+
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSettings.setText("Settings");
+
+        Command cmdSetType = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdSetType.setText("Type");
+
+        this.cmdSetTypeSINGLE = new Command(cmdSetType, Command.GENERAL, 1);
+        this.cmdSetTypeSINGLE.setText("SINGLE");
+        this.cmdSetTypeSINGLE.addSelectionListener(this);
+
+        this.cmdSetTypeMULTI = new Command(cmdSetType, Command.GENERAL, 0);
+        this.cmdSetTypeMULTI.setText("MULTI");
+        this.cmdSetTypeMULTI.addSelectionListener(this);
+
+        Command cmdSetOrder = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdSetOrder.setText("Order");
+
+        this.cmdSetOrderASC = new Command(cmdSetOrder, Command.GENERAL, 1);
+        this.cmdSetOrderASC.setText("ASC");
+        this.cmdSetOrderASC.addSelectionListener(this);
+
+        this.cmdSetOrderDESC = new Command(cmdSetOrder, Command.GENERAL, 0);
+        this.cmdSetOrderDESC.setText("DESC");
+        this.cmdSetOrderDESC.addSelectionListener(this);
+
+        this.cmdSetFilter = new Command(this.shell, Command.SELECT, 0);
+        this.cmdSetFilter.setText("Set Filter");
+        this.cmdSetFilter.addSelectionListener(this);
+
+        this.cmdEnableText = new Command(this.shell, Command.SELECT, 0);
+        this.cmdEnableText.setText("Enable Text");
+        this.cmdEnableText.addSelectionListener(this);
+
+        this.cmdDisableText = new Command(this.shell, Command.SELECT, 0);
+        this.cmdDisableText.setText("Disable Text");
+        this.cmdDisableText.addSelectionListener(this);
+
+        // create text field for defining the number of items in the list
+        Label nlabel = new Label(this.shell, SWT.NONE);
+        nlabel.setText("Items amount: ");
+        GridData nldata = new GridData();
+        nldata.horizontalAlignment = SWT.RIGHT;
+        nlabel.setLayoutData(nldata);
+
+        this.itemCount = new ConstrainedText(this.shell, SWT.BORDER, ConstrainedText.NUMERIC);
+        this.itemCount.setTextLimit(2);
+        this.itemCount.setText(String.valueOf(0));
+    }
+
+    /**
+     * Create new SortedList with user defined settings.
+     * Before creating a new list, previously created is disposed.
+     */
+    protected void createList()
+    {
+        // dispose previously created list
+        if (this.list != null && !this.list.isDisposed())
+        {
+            this.list.dispose();
+        }
+
+        // create new list
+        int count = Integer.parseInt(this.itemCount.getText());
+        int length = 4;//length of random string
+
+        String[] items = new String[count];
+        for (int i=0; i<count; i++)
+        {
+            items[i] = String.valueOf(getRandomString(i, length));
+        }
+
+        int style =
+            SWT.BORDER | SWT.V_SCROLL | this.type_style | this.order_style;
+
+        if (this.mode_style == SortedList.FILTER)
+            this.list = new SortedList(this.shell, style, mode_style);
+        else
+            this.list = new SortedList(this.shell, style);
+
+        GridData data = new GridData();
+        data.horizontalSpan = 2;
+        data.grabExcessHorizontalSpace  = true;
+        data.grabExcessVerticalSpace    = true;
+        data.horizontalAlignment        = SWT.CENTER;
+        data.horizontalAlignment        = SWT.CENTER;
+        this.list.setLayoutData(data);
+
+        this.list.setItems(items);
+        this.list.pack();
+        this.list.addSelectionListener(this);
+
+        Menu mainmenu = new Menu(this.list);
+        this.itemCreate = new MenuItem(mainmenu, SWT.PUSH);
+        itemCreate.setText("Create");
+        itemCreate.addSelectionListener(this);
+        this.itemSet = new MenuItem(mainmenu, SWT.PUSH);
+        itemSet.setText("Set");
+        itemSet.addSelectionListener(this);
+        this.list.setMenu(mainmenu);
+
+        this.shell.pack();
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        // create command
+        if (event.widget == this.cmdCreate || event.widget == this.itemCreate)
+        {
+            createList();
+        }
+
+        // config commands
+        if (event.widget == this.cmdSetTypeSINGLE)
+        {
+            this.type_style = SWT.SINGLE;
+            return;
+        }
+        if (event.widget == this.cmdSetTypeMULTI)
+        {
+            this.type_style = SWT.MULTI;
+            return;
+        }
+        if (event.widget == this.cmdSetOrderASC)
+        {
+            this.order_style = SWT.UP;
+            return;
+        }
+        if (event.widget == this.cmdSetOrderDESC)
+        {
+            this.order_style = SWT.DOWN;
+            return;
+        }
+        if (event.widget == this.cmdSetFilter)
+        {
+            this.mode_style = SortedList.FILTER;
+            return;
+        }
+        if (event.widget == this.cmdEnableText)
+        {
+            this.itemCount.setEnabled(true);
+            return;
+        }
+        if (event.widget == this.cmdDisableText)
+        {
+            this.itemCount.setEnabled(false);
+            return;
+        }
+        else if (event.widget instanceof SortedList)
+        {
+            updateToolTip("Sel: "+ this.list.getFocus());
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+
+        updateToolTip("Def: "+this.list.getFocus());
+        super.widgetDefaultSelected(event);
+
+    }
+
+
+
+
+    /**
+     * Create a rundom string from char array.
+     * @param length The length of result string
+     * @return generated random string
+     */
+    protected String getRandomString(int seed, int length)
+    {
+        String result = null;
+        char[] chars = new char[length];
+
+        for (int i=0; i<length; i++)
+        {
+            Random rand = new Random(System.currentTimeMillis() + seed + i);
+            int index = (rand.nextInt() >>> 1) % (this.charArray.length);
+            chars[i] = this.charArray[index];
+        }
+        result = new String(chars);
+
+        return result;
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(5,5);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.sortedlist;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.SortedList;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ *
+ */
+public class SortedListTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** */
+    protected SortedList list = null;
+    /** */
+    protected String[] itemStrings =
+    {
+        "ABC", "dsgwew", "abdfsd", "zadsvd",
+        "CBA", "sasvds", "bmorbp", "vdbdfs",
+        "KSA", "wbfdps", "xdpvsv", "jsavfd",
+        "007", "123954", "937205", "295462"
+    };
+    /** */
+    protected Text field = null;
+
+    /** Commands */
+    protected Command cmdSingleTest     = null;
+    protected Command cmdMultiTest      = null;
+
+    protected Command cmdAdd            = null;
+    protected Command cmdRemoveSelected = null;
+    protected Command cmdRemoveAll      = null;
+    protected Command cmdSetDefaults    = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set the shell title
+        this.shell.setText("SortedList Test");
+
+        // create test case selection commands
+        this.cmdSingleTest = new Command(this.shell, Command.GENERAL, 1);
+        this.cmdSingleTest.setText("Single");
+        this.cmdSingleTest.addSelectionListener(this);
+
+        this.cmdMultiTest = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdMultiTest.setText("Multi");
+        this.cmdMultiTest.addSelectionListener(this);
+    }
+
+    /**
+     * Testcase setup.
+     * Cleanup the screen and initialize test case for
+     * specified list type (Sinlge\Multi).
+     */
+    protected void setup(int type)
+    {
+        // cleanup the shell
+        this.cleanup();
+        this.shell.update();
+
+        // create and set layout
+        GridLayout layout = new GridLayout(1, true);
+
+        this.shell.setLayout(layout);
+
+        // create commands
+        this.cmdAdd = new Command(this.shell, Command.GENERAL, 3);
+        this.cmdAdd.setText("Add");
+        this.cmdAdd.addSelectionListener(this);
+
+        Command cmdRemove = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdRemove.setText("Remove");
+        this.cmdRemoveSelected = new Command(cmdRemove, Command.SELECT, 0);
+        this.cmdRemoveSelected.setText("Selected");
+        this.cmdRemoveSelected.addSelectionListener(this);
+        this.cmdRemoveAll = new Command(cmdRemove, Command.SELECT, 0);
+        this.cmdRemoveAll.setText("All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        Command cmdSet = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSet.setText("Set");
+        this.cmdSetDefaults = new Command(cmdSet, Command.SELECT, 0);
+        this.cmdSetDefaults.setText("Defaults");
+        this.cmdSetDefaults.addSelectionListener(this);
+
+        this.list = new SortedList(this.shell, type | SWT.BORDER | SWT.V_SCROLL, SortedList.FILTER);
+        GridData listData = new GridData(SWT.FILL, SWT.FILL, true, true);
+        this.list.setLayoutData(listData);
+        // create Text field and SortedList (default values)
+        Label label = new Label(this.shell, SWT.NONE);
+        label.setText("List Item: ");
+        GridData ldata = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+        label.setLayoutData(ldata);
+
+        this.field = new Text(this.shell, SWT.BORDER);
+        GridData fdata = new GridData(SWT.FILL, SWT.CENTER, true, false);
+        this.field.setLayoutData(fdata);
+        this.list.setItems(this.itemStrings);
+
+        // layout and update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Cleanup.
+     */
+    private void cleanup()
+    {
+        // screen cleanup
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            if (controls[i] != null && !controls[i].isDisposed())
+                controls[i].dispose();
+        }
+
+        // Options menu cleanup
+        if (this.cmdSingleTest != null &&
+                !this.cmdSingleTest.isDisposed())
+        {
+            this.cmdSingleTest.dispose();
+        }
+
+        if (this.cmdMultiTest != null &&
+                !this.cmdMultiTest.isDisposed())
+        {
+            this.cmdMultiTest.dispose();
+        }
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+
+        // test case selection
+        if (event.widget == this.cmdSingleTest)
+        {
+            this.setup(SWT.SINGLE);
+            return;
+        }
+        if (event.widget == this.cmdMultiTest)
+        {
+            this.setup(SWT.MULTI);
+            return;
+        }
+
+        // test case relevant actions
+        if (event.widget == this.cmdAdd)
+        {
+            if (this.list == null ||
+                    this.list.isDisposed() ||
+                    this.field == null)
+            {
+                return;
+            }
+
+            this.list.add(this.field.getText());
+            GridData listData = new GridData(SWT.FILL, SWT.FILL, true, true);
+            this.list.setLayoutData(listData);
+            return;
+        }
+        if (event.widget == this.cmdRemoveSelected)
+        {
+            if (this.list == null || this.list.isDisposed())
+            {
+                return;
+            }
+
+            String[] selected = this.list.getSelection();
+            for (int i=0; i<selected.length; i++)
+            {
+                this.list.remove(selected[i]);
+            }
+            return;
+        }
+        if (event.widget == this.cmdRemoveAll)
+        {
+            if (this.list == null || this.list.isDisposed())
+            {
+                return;
+            }
+
+            this.list.removeAll();
+            return;
+        }
+        if (event.widget == this.cmdSetDefaults)
+        {
+            if (this.list == null || this.list.isDisposed())
+            {
+                return;
+            }
+
+            this.list.setItems(this.itemStrings);
+            return;
+        }
+
+        // exit or ignore
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/SortedListTestMidletSuite/src/com/nokia/test/java/eswt/sortedlist/SortedListTestMIDlet_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,392 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.sortedlist;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+import java.util.Random;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.SortedList;
+
+/**
+ * The midlet is used to examine creation and browsing the content
+ * of SortedList component. It is also used to check a scroll bar
+ * appearance in case if the List's content doesn't fit the control bounds.
+ *
+ */
+public class SortedListTestMIDlet_03 extends TestBaseMIDlet
+{
+
+    /** currently used list style */
+    protected int order_style   = SWT.NONE;
+    protected int type_style    = SWT.NONE;
+    protected int mode_style    = SWT.NONE;
+
+    /** sorted list */
+    protected SortedList list   = null;
+
+    private Shell tooltip = null;
+    /** commands */
+    protected Command cmdSetOrderASC        = null;
+    protected Command cmdSetOrderDESC   = null;
+    protected Command cmdSetTypeSINGLE  = null;
+    protected Command cmdSetTypeMULTI   = null;
+    protected Command cmdSetFilter      = null;
+
+    protected Command cmdEnableText     = null;
+    protected Command cmdDisableText    = null;
+
+    protected Command cmdCreate = null;
+    protected Command cmdCreate2 = null;
+    private Command cmdClose                = null;
+    private Command cmdShell                = null;
+
+    /** a Text field used to define the number of items in the list */
+    protected ConstrainedText itemCount = null;
+
+    /** an array of chars used to generate random strings */
+    protected char[] charArray =
+    {
+        'A','a','B','b','C','c','D','d','E','e',
+        'F','f','G','g','H','h','I','i','J','j',
+        'K','k','L','l','M','m','N','n','O','o',
+        'P','p','Q','q','R','r','S','s','T','t',
+        'U','u','V','v','W','w','X','x','Y','y',
+        'Z','z'
+    };
+
+    /** new shell instance */
+    private Shell testshell = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set the shell title
+        this.shell.setText("SortedList Test");
+
+        // create and set a layout
+        this.shell.setLayout(new GridLayout(2, false));
+
+        this.createToolTip("");
+        // create the CREATE command
+        this.cmdCreate = new Command(this.shell, Command.SELECT, 0);
+        this.cmdCreate.setText("Create");
+        this.cmdCreate.addSelectionListener(this);
+        // create the CREATE command
+        this.cmdCreate2 = new Command(this.shell, Command.SELECT, 0);
+        this.cmdCreate2.setText("Create both");
+        this.cmdCreate2.addSelectionListener(this);
+
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdSettings.setText("Settings");
+
+        Command cmdSetType = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdSetType.setText("Type");
+
+        this.cmdSetTypeSINGLE = new Command(cmdSetType, Command.GENERAL, 1);
+        this.cmdSetTypeSINGLE.setText("SINGLE");
+        this.cmdSetTypeSINGLE.addSelectionListener(this);
+
+        this.cmdSetTypeMULTI = new Command(cmdSetType, Command.GENERAL, 0);
+        this.cmdSetTypeMULTI.setText("MULTI");
+        this.cmdSetTypeMULTI.addSelectionListener(this);
+
+        Command cmdSetOrder = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdSetOrder.setText("Order");
+
+        this.cmdSetOrderASC = new Command(cmdSetOrder, Command.GENERAL, 1);
+        this.cmdSetOrderASC.setText("ASC");
+        this.cmdSetOrderASC.addSelectionListener(this);
+
+        this.cmdSetOrderDESC = new Command(cmdSetOrder, Command.GENERAL, 0);
+        this.cmdSetOrderDESC.setText("DESC");
+        this.cmdSetOrderDESC.addSelectionListener(this);
+
+        this.cmdSetFilter = new Command(this.shell, Command.SELECT, 0);
+        this.cmdSetFilter.setText("Set Filter");
+        this.cmdSetFilter.addSelectionListener(this);
+
+        this.cmdShell = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdShell.setText("Show shell");
+        this.cmdShell.addSelectionListener(this);
+
+        this.cmdEnableText = new Command(this.shell, Command.SELECT, 0);
+        this.cmdEnableText.setText("Enable Text");
+        this.cmdEnableText.addSelectionListener(this);
+
+        this.cmdDisableText = new Command(this.shell, Command.SELECT, 0);
+        this.cmdDisableText.setText("Disable Text");
+        this.cmdDisableText.addSelectionListener(this);
+    }
+    /**
+     * creates a shell based on the given parameters
+     * @param style the style og the shell
+     * @param title the title of the shell
+     * @param labelStr string for a label on the shell
+     * @param leftCmd string for the left softkey command
+     * @param doPack true if the should be pack()-ed before layout()
+     */
+    private void createTestShell(int style, String title, boolean doPack)
+    {
+        // create the new shell
+        this.testshell = new Shell(this.shell, style);
+        // set title
+        if (title != null)
+            this.testshell.setText(title);
+        this.testshell.setLayout(new GridLayout());
+
+        // create new list
+        int count = 20;
+        int length = 4;//length of random string
+
+        String[] items = new String[count];
+        for (int i=0; i<count; i++)
+        {
+            items[i] = String.valueOf(getRandomString(i, length));
+        }
+        // add a sortedlist
+        SortedList list = new SortedList(this.testshell, SWT.BORDER | SWT.V_SCROLL | this.type_style | this.order_style, SortedList.FILTER);
+        list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        list.setItems(items);
+
+        // "close" right softkey command
+        this.cmdClose = new Command(this.testshell, Command.EXIT, 0);
+        this.cmdClose.setText("Close");
+        this.cmdClose.addSelectionListener(this);
+        // display the new shell
+        if (doPack)
+            this.testshell.pack();
+        this.testshell.layout();
+        this.testshell.open();
+    }
+    /**
+     * Create new SortedList with user defined settings.
+     * Before creating a new list, previously created is disposed.
+     */
+    protected void createList(int nmb)
+    {
+        // dispose previously created list
+        Control[] controls = this.shell.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        // create new list
+        int count = 20;
+        int length = 4;//length of random string
+
+        String[] items = new String[count];
+        for (int i=0; i<count; i++)
+        {
+            items[i] = String.valueOf(getRandomString(i, length));
+        }
+
+        while (nmb != 0)
+        {
+            int style =
+                SWT.BORDER | SWT.V_SCROLL | this.type_style | this.order_style;
+
+            if (this.mode_style == SortedList.FILTER)
+                this.list = new SortedList(this.shell, style, mode_style);
+            else
+                this.list = new SortedList(this.shell, style);
+
+            GridData data = new GridData();
+            data.horizontalSpan = 1;
+            data.grabExcessHorizontalSpace  = false;
+            data.grabExcessVerticalSpace    = true;
+            data.horizontalAlignment        = SWT.CENTER;
+            data.horizontalAlignment        = SWT.CENTER;
+            this.list.setLayoutData(data);
+
+            this.list.setItems(items);
+            this.list.addSelectionListener(this);
+            nmb--;
+        }
+        this.shell.pack();
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        // create command
+        if (event.widget == this.cmdCreate)
+        {
+            createList(1);
+        }
+        if (event.widget == this.cmdCreate2)
+        {
+            createList(2);
+        }
+
+        // config commands
+        if (event.widget == this.cmdSetTypeSINGLE)
+        {
+            this.type_style = SWT.SINGLE;
+            return;
+        }
+        if (event.widget == this.cmdSetTypeMULTI)
+        {
+            this.type_style = SWT.MULTI;
+            return;
+        }
+        if (event.widget == this.cmdSetOrderASC)
+        {
+            this.order_style = SWT.UP;
+            return;
+        }
+        if (event.widget == this.cmdSetOrderDESC)
+        {
+            this.order_style = SWT.DOWN;
+            return;
+        }
+        if (event.widget == this.cmdSetFilter)
+        {
+            this.mode_style = SortedList.FILTER;
+            return;
+        }
+        if (event.widget == this.cmdEnableText)
+        {
+            this.itemCount.setEnabled(true);
+            return;
+        }
+        if (event.widget == this.cmdDisableText)
+        {
+            this.itemCount.setEnabled(false);
+            return;
+        }
+        if (event.widget == this.cmdShell)
+        {
+            this.createTestShell(SWT.SHELL_TRIM,"Second Shell", false);
+        }
+        if (event.widget == this.cmdClose)
+        {
+            // close the test shell
+            this.closeTestShell();
+            return;
+        }
+        else if (event.widget instanceof SortedList)
+        {
+            updateToolTip("Sel: "+ this.list.getFocus());
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+
+        updateToolTip("Def: "+this.list.getFocus());
+        super.widgetDefaultSelected(event);
+
+    }
+
+
+    /**
+     * close the test shell and dispose its controls
+     */
+    private void closeTestShell()
+    {
+        if (this.testshell != null && !this.testshell.isDisposed())
+            this.testshell.dispose();
+    }
+
+    /**
+     * Create a rundom string from char array.
+     * @param length The length of result string
+     * @return generated random string
+     */
+    protected String getRandomString(int seed, int length)
+    {
+        String result = null;
+        char[] chars = new char[length];
+
+        for (int i=0; i<length; i++)
+        {
+            Random rand = new Random(System.currentTimeMillis() + seed + i);
+            int index = (rand.nextInt() >>> 1) % (this.charArray.length);
+            chars[i] = this.charArray[index];
+        }
+        result = new String(chars);
+
+        return result;
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(Display.getCurrent().getBounds().width/2, Display.getCurrent().getBounds().height/2);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TableTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="TableTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TableTestMidlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.table.TableTestMidlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TableTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/medium.jpg has changed
Binary file javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/small.png has changed
Binary file javauis/tsrc/fute/eswt/TableTestMidletSuite/res/res/sphere.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TableTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TableTestMidletSuite/src/com/nokia/test/java/eswt/table/TableTestMidlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,575 @@
+/*
+* 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.test.java.eswt.table;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class TableTestMidlet_01 extends TestBaseMIDlet
+{
+
+    private Table table = null;
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** transparent image */
+    private Image transimg = null;
+    /** gif image */
+
+    private Shell tooltip = null;
+    /** commands */
+    protected Command cmdSingleTable    = null;
+    protected Command cmdMultiTable     = null;
+    protected Command cmdAlignSingleTable   = null;
+    protected Command cmdAlignMultiTable    = null;
+    protected Command cmdImageSingleTable   = null;
+    protected Command cmdImageMultiTable    = null;
+    protected Command cmdLargeMultiTable        = null;
+    protected Command cmdHideTable      = null;
+    protected Command cmdLargeSingleTable       = null;
+    protected Command cmdHeader         = null;
+    protected Command cmdLines          = null;
+    protected Command cmdSetCheck       = null;
+    protected Command cmdClear              = null;
+    private Command cmdRemove               = null;
+    private Command cmdRemoveAll            = null;
+    private Command cmdRemoveAllButFirst    = null;
+
+    private Command cmdSetColor         = null;
+
+    /** Aligment menu commands */
+    private Command cmdAligmentLEFT   = null;
+    private Command cmdAligmentRIGHT  = null;
+    private Command cmdAligmentCENTER = null;
+
+    private MenuItem cmdSingle;
+
+    private MenuItem cmdMulti;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Table Tests");
+        // create and set a layout
+        this.shell.setLayout(new GridLayout(2, false));
+        this.createToolTip("");
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        // try to initialize the images
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Transparent image could not be loaded");
+            this.transimg = null;
+        }
+
+        // "singletable" left softkey command
+        this.cmdSingleTable = new Command(this.shell, Command.SELECT, 2);
+        cmdSingleTable.setText("Single Table");
+        cmdSingleTable.addSelectionListener(this);
+        // "multitable" creation command
+        this.cmdMultiTable = new Command(this.shell, Command.SELECT, 1);
+        cmdMultiTable.setText("Multi Table");
+        cmdMultiTable.addSelectionListener(this);
+        // table with hide creation command
+        this.cmdHideTable = new Command(this.shell, Command.SELECT, 0);
+        cmdHideTable.setText("Table with Hide");
+        cmdHideTable.addSelectionListener(this);
+        // large "singletable" left softkey command
+        this.cmdLargeSingleTable = new Command(this.shell, Command.SELECT, 2);
+        cmdLargeSingleTable.setText("Large Single Table");
+        cmdLargeSingleTable.addSelectionListener(this);
+        // large "multitable" left softkey command
+        this.cmdLargeMultiTable = new Command(this.shell, Command.SELECT, 1);
+        cmdLargeMultiTable.setText("Large Multi Table");
+        cmdLargeMultiTable.addSelectionListener(this);
+        // large "singletable" left softkey command
+        this.cmdAlignSingleTable = new Command(this.shell, Command.SELECT, 2);
+        cmdAlignSingleTable.setText("Align Single Table");
+        cmdAlignSingleTable.addSelectionListener(this);
+        // large "multitable" left softkey command
+        this.cmdAlignMultiTable = new Command(this.shell, Command.SELECT, 1);
+        cmdAlignMultiTable.setText("Align Multi Table");
+        cmdAlignMultiTable.addSelectionListener(this);
+        // image "singletable" left softkey command
+        this.cmdImageSingleTable = new Command(this.shell, Command.SELECT, 2);
+        cmdImageSingleTable.setText("Image Single Table");
+        cmdImageSingleTable.addSelectionListener(this);
+        // image "multitable" left softkey command
+        this.cmdImageMultiTable = new Command(this.shell, Command.SELECT, 1);
+        cmdImageMultiTable.setText("Image Multi Table");
+        cmdImageMultiTable.addSelectionListener(this);
+
+
+        // command
+        this.cmdHeader = new Command(this.shell, Command.SELECT, 0);
+        cmdHeader.setText("Change Header Visibility");
+        cmdHeader.addSelectionListener(this);
+        //  command
+        this.cmdLines = new Command(this.shell, Command.SELECT, 0);
+        cmdLines.setText("Change Lines Visibility");
+        cmdLines.addSelectionListener(this);
+
+        //  command
+        this.cmdSetColor = new Command(this.shell, Command.SELECT, 0);
+        cmdSetColor.setText("Change color");
+        cmdSetColor.addSelectionListener(this);
+
+        //  command
+        this.cmdSetCheck = new Command(this.shell, Command.SELECT, 0);
+        cmdSetCheck.setText("Change Check");
+        cmdSetCheck.addSelectionListener(this);
+
+
+        // Aligment submenu
+        Command cmdAligment = new Command(this.shell, Command.COMMANDGROUP, 4);
+        cmdAligment.setText("Aligment");
+
+        this.cmdAligmentLEFT = new Command(cmdAligment, Command.GENERAL, 2);
+        this.cmdAligmentLEFT.setText("LEFT");
+        this.cmdAligmentLEFT.addSelectionListener(this);
+
+        this.cmdAligmentCENTER = new Command(cmdAligment, Command.GENERAL, 1);
+        this.cmdAligmentCENTER.setText("CENTER");
+        this.cmdAligmentCENTER.addSelectionListener(this);
+
+        this.cmdAligmentRIGHT = new Command(cmdAligment, Command.GENERAL, 0);
+        this.cmdAligmentRIGHT.setText("RIGHT");
+        this.cmdAligmentRIGHT.addSelectionListener(this);
+
+        // Aligment submenu
+        Command cmdRemoveMenu = new Command(this.shell, Command.COMMANDGROUP, 4);
+        cmdRemoveMenu.setText("Remove");
+
+        this.cmdRemove = new Command(cmdRemoveMenu, Command.GENERAL, 2);
+        this.cmdRemove.setText("Selected");
+        this.cmdRemove.addSelectionListener(this);
+
+        this.cmdRemoveAll = new Command(cmdRemoveMenu, Command.GENERAL, 1);
+        this.cmdRemoveAll.setText("Remove All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        this.cmdRemoveAllButFirst = new Command(cmdRemoveMenu, Command.GENERAL, 0);
+        this.cmdRemoveAllButFirst.setText("Remove All but first");
+        this.cmdRemoveAllButFirst.addSelectionListener(this);
+
+        //  command
+        this.cmdClear = new Command(this.shell, Command.SELECT, 1);
+        cmdClear.setText("Clear Shell");
+        cmdClear.addSelectionListener(this);
+
+    }
+
+    /**
+     * Cleanup the screen.
+     * Removes all widget objects which are currently presented
+     * on the shell.
+     */
+    private void shellCleanup()
+    {
+
+        if (this.shell == null || this.shell.isDisposed()) return;
+
+        Control[] controls = this.shell.getChildren();
+
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        this.shell.update();
+    }
+
+    private void createTable(int style, int rows, int cols, boolean pack)
+    {
+
+        if (pack && style == SWT.MULTI)
+        {
+            table = new Table(this.shell,style|SWT.CHECK);
+        }
+        else
+        {
+            table = new Table(this.shell,style);
+        }
+        table.setSize(new Point(this.shell.getClientArea().width, this.shell.getClientArea().height/2));
+
+        final int ROWS = rows;
+        final int COLS = cols;
+        for (int i = 0; i < ROWS; ++i)
+        {
+            new TableItem(table, 0);
+        }
+        for (int c = 0; c < COLS; ++c)
+        {
+            TableColumn column = new TableColumn(table, 0);
+            column.setText("Column " + c);
+            for (int i = 0; i < ROWS; ++i)
+            {
+                table.getItem(i).setText(c, "Item " + c + ", " + i);
+            }
+            if (pack)
+                column.pack();
+            else
+            {
+                column.setWidth((int)(this.shell.getClientArea().width/2));
+                column.setAlignment(SWT.CENTER);
+            }
+        }
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+        table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        if (style == SWT.SINGLE)
+        {
+            table.addSelectionListener(this);
+        }
+        Menu mainmenu = new Menu(this.table);
+        this.cmdSingle = new MenuItem(mainmenu, SWT.PUSH);
+        cmdSingle.setText("Single");
+        cmdSingle.addSelectionListener(this);
+        this.cmdMulti = new MenuItem(mainmenu, SWT.PUSH);
+        cmdMulti.setText("Multi");
+        cmdMulti.addSelectionListener(this);
+        this.table.setMenu(mainmenu);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+    private void createImageTable(int style, int rows, int cols, boolean pack)
+    {
+        table = new Table(this.shell,style);
+        table.setSize(new Point(this.shell.getClientArea().width, this.shell.getClientArea().height));
+
+        final int ROWS = rows;
+        final int COLS = cols;
+        for (int i = 0; i < ROWS; ++i)
+        {
+            new TableItem(table, 0);
+        }
+        for (int c = 0; c < COLS; ++c)
+        {
+            TableColumn column = new TableColumn(table, 0);
+            column.setText("Column " + c);
+            for (int i = 0; i < ROWS; ++i)
+            {
+                table.getItem(i).setText(c, "Item " + c + ", " + i);
+                if (pack)
+                    table.getItem(i).setImage(this.smallimg);
+                else
+                {
+                    table.getItem(i).setImage(this.bigimg);
+                }
+            }
+            if (pack)
+                column.pack();
+            else
+            {
+                column.setWidth((int)(this.shell.getClientArea().width/2));
+                column.setAlignment(SWT.CENTER);
+            }
+        }
+        table.getItem(0).setImage(this.transimg);
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+        table.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command || event.widget instanceof MenuItem)
+        {
+            this.tooltip.setVisible(false);
+            try
+            {
+                if (event.widget == this.cmdSingleTable || event.widget == this.cmdSingle)
+                {
+                    createTable(SWT.SINGLE,5,2,true);
+                }
+                else if (event.widget == this.cmdMultiTable || event.widget == this.cmdMulti)
+                {
+                    createTable(SWT.MULTI,5,2,true);
+                }
+                else if (event.widget == this.cmdLargeMultiTable)
+                {
+                    createTable(SWT.MULTI,50,20,true);
+                }
+                else if (event.widget == this.cmdLargeSingleTable)
+                {
+                    createTable(SWT.SINGLE,50,20,true);
+                }
+                else if (event.widget == this.cmdHideTable)
+                {
+                    createTable(SWT.HIDE_SELECTION,5,2,true);
+                }
+                else if (event.widget == this.cmdAlignMultiTable)
+                {
+                    createTable(SWT.MULTI,10,2,false);
+                }
+                else if (event.widget == this.cmdAlignSingleTable)
+                {
+                    createTable(SWT.SINGLE,10,2,false);
+                }
+                else if (event.widget == this.cmdImageSingleTable)
+                {
+                    createImageTable(SWT.SINGLE,5,2,false);
+                }
+                else if (event.widget == this.cmdImageMultiTable)
+                {
+                    createImageTable(SWT.MULTI,5,2,true);
+                }
+                else if (event.widget == this.cmdHeader)
+                {
+                    if (table.getHeaderVisible())
+                        table.setHeaderVisible(false);
+                    else
+                        table.setHeaderVisible(true);
+                }
+                else if (event.widget == this.cmdLines)
+                {
+                    if (table.getLinesVisible())
+                        table.setLinesVisible(false);
+                    else
+                        table.setLinesVisible(true);
+                }
+                else if (event.widget == this.cmdAligmentLEFT)
+                {
+                    table.getColumn(0).setAlignment(SWT.LEFT);
+                    table.getColumn(1).setAlignment(SWT.LEFT);
+                }
+                else if (event.widget == this.cmdAligmentCENTER)
+                {
+                    table.getColumn(0).setAlignment(SWT.CENTER);
+                    table.getColumn(1).setAlignment(SWT.CENTER);
+                }
+                else if (event.widget == this.cmdAligmentRIGHT)
+                {
+                    table.getColumn(0).setAlignment(SWT.RIGHT);
+                    table.getColumn(1).setAlignment(SWT.RIGHT);
+                }
+                else if (event.widget == this.cmdClear)
+                {
+                    this.shellCleanup();
+                }
+                else if (event.widget == this.cmdRemove)
+                {
+                    if (table.getSelectionCount() <= 1)
+                    {
+                        if (table.getSelectionIndex() != -1)
+                            table.remove(table.getSelectionIndex());
+                    }
+                    else
+                    {
+                        table.remove(table.getSelectionIndices());
+                    }
+                }
+                else if (event.widget == this.cmdRemoveAll)
+                {
+                    table.removeAll();
+                }
+                else if (event.widget == this.cmdRemoveAllButFirst)
+                {
+                    table.remove(1,table.getItemCount()-1);
+                }
+                else if (event.widget == this.cmdSetCheck)
+                {
+
+                    for (int i = 0; i < table.getItems().length; i++)
+                    {
+                        if (!table.getItem(0).getChecked())
+                            table.getItems()[i].setChecked(true);
+                        else
+                            table.getItems()[i].setChecked(false);
+                    }
+                }
+                else if (event.widget == this.cmdSetColor)
+                {
+                    if (table.getSelectionCount() <= 1)
+                    {
+                        if (table.getSelectionIndex() != -1)
+                            table.getItem((table.getSelectionIndex())).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
+                        table.getItem((table.getSelectionIndex())).setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+                    }
+                    else
+                    {
+                        for (int i= 0; i < table.getSelectionIndices().length; i++)
+                        {
+                            table.getItem(table.getSelectionIndices()[i]).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
+                            table.getItem(table.getSelectionIndices()[i]).setForeground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+                        }
+                    }
+                }
+
+            }
+            catch (Exception ex)
+            {
+                // display the exception
+                MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                msg.setMessage(ex.getMessage());
+                msg.open();
+                return;
+            }
+        }
+        else if (event.widget instanceof Table)
+        {
+            try
+            {
+                Table table = (Table)event.widget;
+                updateToolTip("Sel: "+ table.getItem(table.getSelectionIndex()).getText());
+            }
+            catch (Exception ex)
+            {
+                // display the exception
+                MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                msg.setMessage(ex.getMessage());
+                msg.open();
+                return;
+            }
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+        try
+        {
+            if (event.widget instanceof Table)
+            {
+                Table table = (Table)event.widget;
+                updateToolTip("Def: "+table.getItem(table.getSelectionIndex()).getText());
+            }
+        }
+        catch (Exception ex)
+        {
+            // display the exception
+            MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+            msg.setMessage(ex.getMessage());
+            msg.open();
+            return;
+        }
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(5, 5);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+
+
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="TaskTipTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TaskTipTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.tasktip.TaskTipTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TaskTipTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TaskTipTestMidletSuite/src/com/nokia/test/java/eswt/tasktip/TaskTipTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,487 @@
+/*
+* 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.test.java.eswt.tasktip;
+
+import java.util.Date;
+import java.util.Vector;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.ConstrainedText;
+import org.eclipse.ercp.swt.mobile.DateEditor;
+import org.eclipse.ercp.swt.mobile.HyperLink;
+import org.eclipse.ercp.swt.mobile.MobileShell;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Slider;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ercp.swt.mobile.TaskTip;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class TaskTipTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /**  */
+    private Vector tasktips = new Vector();
+
+    private Command cmdSetInvisible         = null;
+    private Command cmdSetInvisibleSel      = null;
+    private Command cmdSetInvisibleAll      = null;
+    /** */
+
+    private Command cmdAddPlain             = null;
+    private Command cmdAddSmooth            = null;
+    private Command cmdAddIndeterminate     = null;
+
+    private Command cmdRemove               = null;
+    private Command cmdRemoveTaskTip        = null;
+    private Command cmdRemoveAll            = null;
+
+    private Command cmdSetTaskTip           = null;
+    private Command cmdSetLongText          = null;
+
+    private Command cmdSetHalf              = null;
+    private Command cmdSetFull              = null;
+
+    private Command cmdChange                   = null;
+
+    private int PLAIN = 0;
+
+    /** mobileshell instance */
+    private MobileShell mshell = null;
+
+    private String longtxt = "This is a tasktip! It has a long text that should be"+
+                             "truncated at some point. Let's see if that happens...";
+
+
+    protected void init()
+    {
+        // init the shell
+        if (this.shell != null && !this.shell.isDisposed())
+            this.shell.dispose();
+
+        this.shell = new Shell(this.display, SWT.V_SCROLL);
+        this.shell.setText("TaskTip Test");
+
+        GridLayout layout = new GridLayout(1, false);
+        this.shell.setLayout(layout);
+
+        // set the menu
+        this.menuSetup(this.shell);
+        this.addAll(this.shell);
+
+        // create the mobileshell with the labels
+        this.mshell = new MobileShell(this.display, SWT.SHELL_TRIM, MobileShell.SMALL_STATUS_PANE);
+        this.mshell.setText("Label Test 3 - Mobile Shell");
+        this.mshell.setLayout(new GridLayout());
+        Command cmd = null;
+        // "switch" left softkey command
+        cmd = new Command(this.mshell, Command.SELECT, 0);
+        cmd.setText("Switch");
+        cmd.addSelectionListener(this);
+        // "exit" right softkey command
+        cmd = new Command(this.mshell, Command.EXIT, 0);
+        cmd.setText("Exit");
+        cmd.addSelectionListener(this);
+        this.addAll(this.mshell);
+        this.mshell.pack();
+        this.mshell.open();
+        this.mshell.setVisible(false);
+    }
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+    private void menuSetup(Composite parent)
+    {
+        // create menu commands
+
+        // Set Invisible submenu
+        this.cmdSetInvisible = new Command(parent, Command.COMMANDGROUP, 3);
+        this.cmdSetInvisible.setText("Set Invisible");
+
+        this.cmdSetInvisibleSel =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 1);
+        this.cmdSetInvisibleSel.setText("Top");
+        this.cmdSetInvisibleSel.addSelectionListener(this);
+
+        this.cmdSetInvisibleAll =
+            new Command(this.cmdSetInvisible, Command.GENERAL, 0);
+        this.cmdSetInvisibleAll.setText("All");
+        this.cmdSetInvisibleAll.addSelectionListener(this);
+
+        this.cmdAddPlain =
+            new Command(parent, Command.GENERAL, 1);
+        this.cmdAddPlain.setText("Plain TaskTip");
+        this.cmdAddPlain.addSelectionListener(this);
+
+        this.cmdAddSmooth =
+            new Command(parent, Command.GENERAL, 1);
+        this.cmdAddSmooth.setText("Smooth TaskTip");
+        this.cmdAddSmooth.addSelectionListener(this);
+
+        this.cmdAddIndeterminate =
+            new Command(parent, Command.GENERAL, 1);
+        this.cmdAddIndeterminate.setText("Indeterminate TaskTip");
+        this.cmdAddIndeterminate.addSelectionListener(this);
+
+        // Remove submenu
+        this.cmdRemove = new Command(parent, Command.COMMANDGROUP, 0);
+        this.cmdRemove.setText("Remove");
+
+        this.cmdRemoveTaskTip =
+            new Command(this.cmdRemove, Command.GENERAL, 1);
+        this.cmdRemoveTaskTip.setText("Remove Selected");
+        this.cmdRemoveTaskTip.addSelectionListener(this);
+
+        this.cmdRemoveAll =
+            new Command(this.cmdRemove, Command.GENERAL, 0);
+        this.cmdRemoveAll.setText("Remove All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        this.cmdSetTaskTip = new Command(parent, Command.GENERAL, 0);
+        this.cmdSetTaskTip.setText("Set TaskTip");
+        this.cmdSetTaskTip.addSelectionListener(this);
+
+        this.cmdSetLongText = new Command(parent, Command.GENERAL, 0);
+        this.cmdSetLongText.setText("Set Long Text TaskTip");
+        this.cmdSetLongText.addSelectionListener(this);
+
+        this.cmdSetHalf = new Command(parent, Command.GENERAL, 0);
+        this.cmdSetHalf.setText("Set Half");
+        this.cmdSetHalf.addSelectionListener(this);
+
+        this.cmdSetFull = new Command(parent, Command.GENERAL, 0);
+        this.cmdSetFull.setText("Set Full");
+        this.cmdSetFull.addSelectionListener(this);
+
+        this.cmdChange = new Command(parent, Command.SELECT, 0);
+        this.cmdChange.setText("Switch");
+        this.cmdChange.addSelectionListener(this);
+
+
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (!(event.widget instanceof Command || event.widget instanceof MenuItem)) return;
+
+        boolean changed = false;
+
+        if (event.widget instanceof MenuItem)
+        {
+            event.widget.dispose();
+            changed = true;
+        }
+
+        // Set Invisible commands
+        if (event.widget == this.cmdSetInvisibleSel)
+        {
+            ((TaskTip)this.tasktips.lastElement()).setVisible(false);
+            changed = true;
+
+        }
+        else if (event.widget == this.cmdSetInvisibleAll)
+        {
+
+            for (int i=0; i<tasktips.size(); i++)
+            {
+                ((TaskTip)this.tasktips.elementAt(i)).setVisible(false);
+            }
+            changed = true;
+        }
+        else
+
+
+            // Remove commands
+            if (event.widget == this.cmdRemoveTaskTip)
+            {
+                ((TaskTip)this.tasktips.lastElement()).dispose();
+                changed = true;
+            }
+            else if (event.widget == this.cmdRemoveAll)
+            {
+                this.tasktips.removeAllElements();
+                changed = true;
+            }
+            else if (event.widget == this.cmdSetTaskTip)
+            {
+                QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+                dlg.setPromptText("Enter text:", "");
+
+                String txt = dlg.open();
+                ((TaskTip)this.tasktips.lastElement()).setText(txt);
+
+                changed = true;
+
+            }
+            else if (event.widget == this.cmdSetLongText)
+            {
+                ((TaskTip)this.tasktips.lastElement()).setText(this.longtxt);
+            }
+            else if (event.widget == this.cmdAddPlain)
+            {
+                this.addTaskTip(this.PLAIN,this.display.getActiveShell());
+                changed = true;
+            }
+            else if (event.widget == this.cmdAddSmooth)
+            {
+                this.addTaskTip(SWT.SMOOTH,this.display.getActiveShell());
+                changed = true;
+            }
+            else if (event.widget == this.cmdAddIndeterminate)
+            {
+                this.addTaskTip(SWT.INDETERMINATE,this.display.getActiveShell());
+                changed = true;
+            }
+            else if (event.widget == this.cmdSetHalf)
+            {
+                ((TaskTip)this.tasktips.lastElement()).setMaximum(100);
+                ((TaskTip)this.tasktips.lastElement()).setSelection(50);
+            }
+            else if (event.widget == this.cmdSetFull)
+            {
+                ((TaskTip)this.tasktips.lastElement()).setMaximum(100);
+                ((TaskTip)this.tasktips.lastElement()).setSelection(100);
+            }
+            else if (event.widget == this.cmdChange || "Switch".equals(((Command) event.widget).getText()))
+            {
+
+                this.mshell.setVisible(!this.mshell.isVisible());
+                this.shell.setVisible(!this.shell.isVisible());
+                if (this.shell.isVisible())
+                    this.menuSetup(shell);
+                else
+                    this.menuSetup(mshell);
+
+                return;
+            }
+        // update the shell if needed
+        if (changed)
+        {
+            if (this.shell.getChildren().length == 0)
+            {
+                this.cmdSetInvisible.setEnabled(false);
+                this.cmdRemove.setEnabled(false);
+            }
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.update();
+            return;
+        }
+
+        super.widgetSelected(event);
+    }
+
+    /**
+     * Create a TaskTip and add it to current shell.
+     */
+    private void addTaskTip(int style,Shell parent)
+    {
+
+        if (parent == null)
+        {
+            return;
+        }
+
+        if (style == this.PLAIN)
+        {
+            TaskTip tasktip = new TaskTip(parent);
+            tasktip.setText("A plain tasktip");
+            tasktip.setVisible(true);
+            tasktips.addElement(tasktip);
+        }
+        else
+        {
+            TaskTip tasktip = new TaskTip(parent, style);
+            if (style == SWT.SMOOTH)
+                tasktip.setText("A smooth tasktip");
+            else
+                tasktip.setText("A indeterminate tasktip");
+            tasktip.setVisible(true);
+            tasktips.addElement(tasktip);
+        }
+
+    }
+    /**
+     * Create a Label and add it to current shell.
+     */
+    private void addLabel(Composite parent)
+    {
+        // control
+        Label control = new Label(parent, SWT.NONE);
+        control.setText("A Label control");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Hyperlink and add it to current shell.
+     */
+    private void addHyperlink(Composite parent)
+    {
+        // control
+        HyperLink control = new HyperLink(parent, SWT.NONE, HyperLink.EMAIL);
+        control.setText("some.name@foo.com");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Text and add it to current shell.
+     */
+    private void addText(Composite parent)
+    {
+        // control
+        Text control = new Text(parent, SWT.BORDER);
+        control.setText("Text field");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a ConstrainedText and add it to current shell.
+     */
+    private void addConstrainedText(Composite parent)
+    {
+        // control
+        ConstrainedText control =
+            new ConstrainedText(parent, SWT.BORDER, ConstrainedText.PHONENUMBER);
+        control.setText("+*#0123456789");
+        control.setTextLimit(15);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Slider control and add it to current shell.
+     */
+    private void addSlider(Composite parent)
+    {
+        // control
+        Slider control = new Slider(parent, SWT.HORIZONTAL);
+        control.setMaximum(10);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a DateEditor and add it to current shell.
+     */
+    private void addDateEditor(Composite parent)
+    {
+        // control
+        DateEditor control =
+            new DateEditor(parent, SWT.BORDER, DateEditor.DATE_TIME);
+        control.setDate(new Date());
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Button and add it to current shell.
+     */
+    private void addButton(Composite parent)
+    {
+        // control
+        Button control = new Button(parent, SWT.PUSH);
+        control.setText("A Button");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Create a Combo control and add it to current shell.
+     */
+    private void addCombo(Composite parent)
+    {
+        // control
+        Combo control =
+            new Combo(parent, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
+        control.add("item 1");
+        control.add("item 2");
+        control.add("item 3");
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+        control.pack();
+    }
+
+    /**
+     * Create a ProgressBar and add it to current shell.
+     */
+    private void addProgressBar(Composite parent)
+    {
+        // control
+        ProgressBar control = new ProgressBar(parent, SWT.BORDER | SWT.HORIZONTAL);
+        control.setMaximum(100);
+        GridData data = new GridData();
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = SWT.CENTER;
+        control.setLayoutData(data);
+    }
+
+    /**
+     * Add all controls at once.
+     */
+    private void addAll(Composite parent)
+    {
+        addLabel(parent);
+        addHyperlink(parent);
+        addText(parent);
+        addConstrainedText(parent);
+        addDateEditor(parent);
+        addButton(parent);
+        addCombo(parent);
+        addSlider(parent);
+        addProgressBar(parent);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextExtensionMidlet/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="TextExtensionTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TextExtensionTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.textextension.TextExtensionTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TextExtensionTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextExtensionMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextExtensionMidlet/src/com/nokia/test/java/eswt/textextension/TextExtensionTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,972 @@
+/*
+* 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.test.java.eswt.textextension;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ercp.swt.mobile.TextExtension;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the textextension component
+ * -
+ */
+
+public class TextExtensionTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** */
+    private TextExtension topLeftField  = null;
+    private TextExtension topRightField = null;
+    private TextExtension bottomLeftField   = null;
+    private TextExtension bottomRightField  = null;
+
+    /** Do menu commands */
+    private Command cmdDoAppend     = null;
+    private Command cmdDoInsert     = null;
+
+    /** Input mode menu commands */
+    private Command cmdModeReadOnly = null;
+    private Command cmdModeEditable = null;
+
+    /** Text Limit menu commands */
+    private Command cmdLimitNONE    = null;
+    private Command cmdLimitCustom  = null;
+
+    /** Text adding menu commands */
+    private Command cmdLong         = null;
+    private Command cmdExtraLong    = null;
+    private Command cmdOverExtraLong    = null;
+
+    /** Text type menu commands */
+    private Command cmdMULTI    = null;
+    private Command cmdSINGLE   = null;
+
+    /** Aligment menu commands */
+    private Command cmdAligmentLEFT   = null;
+    private Command cmdAligmentRIGHT  = null;
+    private Command cmdAligmentCENTER = null;
+
+    /** Wrapping menu command */
+    private Command cmdWrapYES  = null;
+    private Command cmdWrapNO   = null;
+
+    /** Scrolling commands */
+    private Command cmdScrollVertical   = null;
+    private Command cmdScrollHorizontal = null;
+    private Command cmdScrollBOTH       = null;
+    private Command cmdScrollNONE       = null;
+
+    /** Style menu commands */
+    private Command cmdEmail  = null;
+    private Command cmdURL = null;
+    private Command cmdNonPred = null;
+    private Command cmdLatinOnly = null;
+    private Command cmdEmail_Non  = null;
+    private Command cmdURL_Non = null;
+    private Command cmdURL_LatinOnly_Non = null;
+    private Command cmdEmail_LatinOnly = null;
+    private Command cmdURL_LatinOnly = null;
+    private Command cmdEmail_LatinOnly_Non = null;
+
+    /** Case modifier commands */
+    private Command cmdUPPERCASE = null;
+    private Command cmdLOWERCASE = null;
+    private Command cmdTEXTCASE = null;
+    private Command cmdTITLECASE = null;
+
+
+    private Command cmdBASIC_LATIN = null;
+    private Command cmdGREEK = null;
+    private Command cmdCYRILLIC = null;
+    private Command cmdARMENIAN = null;
+    private Command cmdHEBREW = null;
+    private Command cmdARABIC = null;
+    private Command cmdDEVANAGARI = null;
+    private Command cmdBENGALI = null;
+    private Command cmdTHAI = null;
+    private Command cmdHIRAGANA = null;
+    private Command cmdKATAKANA = null;
+    private Command cmdHANGUL_SYLLABLES = null;
+    private Command cmdFULLWIDTH_DIGITS = null;
+    private Command cmdFULLWIDTH_LATIN = null;
+    private Command cmdHALFWIDTH_KATAKANA = null;
+    private Command cmdHANJA = null;
+    private Command cmdKANJI = null;
+    private Command cmdLATIN = null;
+    private Command cmdLATIN_DIGITS = null;
+    private Command cmdSIMPLIFIED_HANZI = null;
+    private Command cmdTRADITIONAL_HANZI = null;
+
+    private int extension;
+
+    final private String BASIC_LATIN = "UCB_BASIC_LATIN";
+    final private String GREEK = "UCB_GREEK";
+    final private String CYRILLIC = "UCB_CYRILLIC";
+    final private String ARMENIAN = "UCB_ARMENIAN";
+    final private String HEBREW = "UCB_HEBREW";
+    final private String ARABIC = "UCB_ARABIC";
+    final private String DEVANAGARI = "UCB_DEVANAGARI";
+    final private String BENGALI = "UCB_BENGALI";
+    final private String THAI = "UCB_THAI";
+    final private String HIRAGANA = "UCB_HIRAGANA";
+    final private String KATAKANA = "UCB_KATAKANA";
+    final private String HANGUL_SYLLABLES = "UCB_HANGUL_SYLLABLES";
+    final private String FULLWIDTH_DIGITS = "IS_FULLWIDTH_DIGITS";
+    final private String FULLWIDTH_LATIN = "IS_FULLWIDTH_LATIN";
+    final private String HALFWIDTH_KATAKANA = "IS_HALFWIDTH_KATAKANA";
+    final private String HANJA = "IS_HANJA";
+    final private String KANJI = "IS_KANJI";
+    final private String LATIN = "IS_LATIN";
+    final private String LATIN_DIGITS = "IS_LATIN_DIGITS";
+    final private String SIMPLIFIED_HANZI = "IS_SIMPLIFIED_HANZI";
+    final private String TRADITIONAL_HANZI = "IS_TRADITIONAL_HANZI";
+
+    final private int longtext = 149;
+    final private int extralong = 999;
+    final private int overextra = 1001;
+
+    final private String thousand_chars = "123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_"+
+                                          "123456789_123456789_123456789_123456789_123456789_123456789_123456789_";
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set title
+        this.shell.setText("TextExtension Test");
+
+        // create and set the layout
+        this.shell.setLayout(new FormLayout());
+
+        // create menu
+
+        // Do menu
+        Command cmdDo = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdDo.setText("Do");
+
+        this.cmdDoAppend = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoAppend.setText("Append");
+        this.cmdDoAppend.addSelectionListener(this);
+
+        this.cmdDoInsert = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoInsert.setText("Insert");
+        this.cmdDoInsert.addSelectionListener(this);
+
+        Command cmdStyle = new Command(this.shell, Command.COMMANDGROUP, 2);
+        cmdStyle.setText("Style");
+
+        this.cmdEmail = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdEmail.setText("EMAIL");
+        this.cmdEmail.addSelectionListener(this);
+
+        this.cmdURL = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdURL.setText("URL");
+        this.cmdURL.addSelectionListener(this);
+
+        this.cmdNonPred = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdNonPred.setText("NON_PREDICTIVE");
+        this.cmdNonPred.addSelectionListener(this);
+
+        this.cmdLatinOnly = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdLatinOnly.setText("LATIN_ONLY");
+        this.cmdLatinOnly.addSelectionListener(this);
+
+        this.cmdEmail_Non = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdEmail_Non.setText("EMAIL | NON_PREDICTIVE");
+        this.cmdEmail_Non.addSelectionListener(this);
+
+        this.cmdURL_Non = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdURL_Non.setText("URL | NON_PREDICTIVE");
+        this.cmdURL_Non.addSelectionListener(this);
+
+        this.cmdEmail_LatinOnly = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdEmail_LatinOnly.setText("EMAIL | LATIN_ONLY");
+        this.cmdEmail_LatinOnly.addSelectionListener(this);
+
+        this.cmdEmail_LatinOnly_Non = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdEmail_LatinOnly_Non.setText("EMAIL | LATIN_ONLY | NON_PREDICTIVE");
+        this.cmdEmail_LatinOnly_Non.addSelectionListener(this);
+
+        this.cmdURL_LatinOnly = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdURL_LatinOnly.setText("URL | LATIN_ONLY");
+        this.cmdURL_LatinOnly.addSelectionListener(this);
+
+        this.cmdURL_LatinOnly_Non = new Command(cmdStyle, Command.GENERAL, 1);
+        this.cmdURL_LatinOnly_Non.setText("URL | LATIN_ONLY | NON_PREDICTIVE");
+        this.cmdURL_LatinOnly_Non.addSelectionListener(this);
+
+        // Setting Case menu
+        Command cmdSetCase = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSetCase.setText("Set Case");
+
+        this.cmdUPPERCASE = new Command(cmdSetCase, Command.GENERAL, 1);
+        this.cmdUPPERCASE.setText("UPPERCASE");
+        this.cmdUPPERCASE.addSelectionListener(this);
+
+        this.cmdTEXTCASE = new Command(cmdSetCase, Command.GENERAL, 1);
+        this.cmdTEXTCASE.setText("TEXTCASE");
+        this.cmdTEXTCASE.addSelectionListener(this);
+
+        this.cmdLOWERCASE = new Command(cmdSetCase, Command.GENERAL, 1);
+        this.cmdLOWERCASE.setText("LOWERCASE");
+        this.cmdLOWERCASE.addSelectionListener(this);
+
+        this.cmdTITLECASE = new Command(cmdSetCase, Command.GENERAL, 1);
+        this.cmdTITLECASE.setText("TITLECASE");
+        this.cmdTITLECASE.addSelectionListener(this);
+
+        // Setting input mode menu
+        Command cmdSetInput = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSetInput.setText("Set Input");
+
+        this.cmdBASIC_LATIN = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdBASIC_LATIN.setText(this.BASIC_LATIN);
+        this.cmdBASIC_LATIN.addSelectionListener(this);
+
+        this.cmdGREEK = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdGREEK.setText(this.GREEK);
+        this.cmdGREEK.addSelectionListener(this);
+
+        this.cmdCYRILLIC = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdCYRILLIC.setText(this.CYRILLIC);
+        this.cmdCYRILLIC.addSelectionListener(this);
+
+        this.cmdARMENIAN = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdARMENIAN.setText(this.ARMENIAN);
+        this.cmdARMENIAN.addSelectionListener(this);
+
+        this.cmdHEBREW = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdHEBREW.setText(this.HEBREW);
+        this.cmdHEBREW.addSelectionListener(this);
+
+        this.cmdARABIC = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdARABIC.setText(this.ARABIC);
+        this.cmdARABIC.addSelectionListener(this);
+
+        this.cmdDEVANAGARI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdDEVANAGARI.setText(this.DEVANAGARI);
+        this.cmdDEVANAGARI.addSelectionListener(this);
+
+        this.cmdBENGALI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdBENGALI.setText(this.BENGALI);
+        this.cmdBENGALI.addSelectionListener(this);
+
+        this.cmdTHAI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdTHAI.setText(this.THAI);
+        this.cmdTHAI.addSelectionListener(this);
+
+        this.cmdHIRAGANA= new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdHIRAGANA.setText(this.HIRAGANA);
+        this.cmdHIRAGANA.addSelectionListener(this);
+
+        this.cmdKATAKANA = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdKATAKANA.setText(this.KATAKANA);
+        this.cmdKATAKANA.addSelectionListener(this);
+
+        this.cmdHANGUL_SYLLABLES = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdHANGUL_SYLLABLES.setText(this.HANGUL_SYLLABLES);
+        this.cmdHANGUL_SYLLABLES.addSelectionListener(this);
+
+        this.cmdFULLWIDTH_LATIN = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdFULLWIDTH_LATIN.setText(this.FULLWIDTH_LATIN);
+        this.cmdFULLWIDTH_LATIN.addSelectionListener(this);
+
+        this.cmdFULLWIDTH_DIGITS = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdFULLWIDTH_DIGITS.setText(this.FULLWIDTH_DIGITS);
+        this.cmdFULLWIDTH_DIGITS.addSelectionListener(this);
+
+        this.cmdHALFWIDTH_KATAKANA= new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdHALFWIDTH_KATAKANA.setText(this.HALFWIDTH_KATAKANA);
+        this.cmdHALFWIDTH_KATAKANA.addSelectionListener(this);
+
+        this.cmdHANJA = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdHANJA.setText(this.HANJA);
+        this.cmdHANJA.addSelectionListener(this);
+
+        this.cmdKANJI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdKANJI.setText(this.KANJI);
+        this.cmdKANJI.addSelectionListener(this);
+
+        this.cmdLATIN = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdLATIN.setText(this.LATIN);
+        this.cmdLATIN.addSelectionListener(this);
+
+        this.cmdLATIN_DIGITS = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdLATIN_DIGITS.setText(this.LATIN_DIGITS);
+        this.cmdLATIN_DIGITS.addSelectionListener(this);
+
+        this.cmdSIMPLIFIED_HANZI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdSIMPLIFIED_HANZI.setText(this.SIMPLIFIED_HANZI);
+        this.cmdSIMPLIFIED_HANZI.addSelectionListener(this);
+
+        this.cmdTRADITIONAL_HANZI = new Command(cmdSetInput, Command.GENERAL, 1);
+        this.cmdTRADITIONAL_HANZI.setText(this.TRADITIONAL_HANZI);
+        this.cmdTRADITIONAL_HANZI.addSelectionListener(this);
+
+        // Long text submenu
+        Command cmdText = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdText.setText("Set Long Texts");
+
+        this.cmdLong = new Command(cmdText, Command.GENERAL, 2);
+        this.cmdLong.setText("149 chars");
+        this.cmdLong.addSelectionListener(this);
+
+        this.cmdExtraLong = new Command(cmdText, Command.GENERAL, 2);
+        this.cmdExtraLong.setText("999 chars");
+        this.cmdExtraLong.addSelectionListener(this);
+
+        this.cmdOverExtraLong = new Command(cmdText, Command.GENERAL, 2);
+        this.cmdOverExtraLong.setText("1001 chars");
+        this.cmdOverExtraLong.addSelectionListener(this);
+
+        // Settings menu
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        // Type submenu
+        Command cmdType = new Command(cmdSettings, Command.COMMANDGROUP, 4);
+        cmdType.setText("Type");
+
+        this.cmdMULTI = new Command(cmdType, Command.GENERAL, 2);
+        this.cmdMULTI.setText("Multi");
+        this.cmdMULTI.addSelectionListener(this);
+
+        this.cmdSINGLE = new Command(cmdType, Command.GENERAL, 2);
+        this.cmdSINGLE.setText("Single");
+        this.cmdSINGLE.addSelectionListener(this);
+
+        // Aligment submenu
+        Command cmdAligment = new Command(cmdSettings, Command.COMMANDGROUP, 4);
+        cmdAligment.setText("Aligment");
+
+        this.cmdAligmentLEFT = new Command(cmdAligment, Command.GENERAL, 2);
+        this.cmdAligmentLEFT.setText("LEFT");
+        this.cmdAligmentLEFT.addSelectionListener(this);
+
+        this.cmdAligmentCENTER = new Command(cmdAligment, Command.GENERAL, 1);
+        this.cmdAligmentCENTER.setText("CENTER");
+        this.cmdAligmentCENTER.addSelectionListener(this);
+
+        this.cmdAligmentRIGHT = new Command(cmdAligment, Command.GENERAL, 0);
+        this.cmdAligmentRIGHT.setText("RIGHT");
+        this.cmdAligmentRIGHT.addSelectionListener(this);
+
+        // Mode submenu
+        Command cmdMode = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdMode.setText("Mode");
+
+        this.cmdModeEditable = new Command(cmdMode, Command.GENERAL, 1);
+        this.cmdModeEditable.setText("EDITABLE");
+        this.cmdModeEditable.addSelectionListener(this);
+
+        this.cmdModeReadOnly = new Command(cmdMode, Command.GENERAL, 0);
+        this.cmdModeReadOnly.setText("READ_ONLY");
+        this.cmdModeReadOnly.addSelectionListener(this);
+
+        // Text Limit submenu
+        Command cmdLimit = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdLimit.setText("Limit");
+
+        this.cmdLimitCustom = new Command(cmdLimit, Command.GENERAL, 1);
+        this.cmdLimitCustom.setText("CUSTOM");
+        this.cmdLimitCustom.addSelectionListener(this);
+
+        this.cmdLimitNONE = new Command(cmdLimit, Command.GENERAL, 0);
+        this.cmdLimitNONE.setText("NONE");
+        this.cmdLimitNONE.addSelectionListener(this);
+
+        // Wrapping submenu
+        Command cmdWrap = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdWrap.setText("Wrap");
+
+        this.cmdWrapYES = new Command(cmdWrap, Command.GENERAL, 1);
+        this.cmdWrapYES.setText("YES");
+        this.cmdWrapYES.addSelectionListener(this);
+
+        this.cmdWrapNO = new Command(cmdWrap, Command.GENERAL, 0);
+        this.cmdWrapNO.setText("NO");
+        this.cmdWrapNO.addSelectionListener(this);
+
+        // scrolling submenu
+        Command cmdScroll = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdScroll.setText("Scroll Bar");
+
+        this.cmdScrollNONE = new Command(cmdScroll, Command.GENERAL, 3);
+        this.cmdScrollNONE.setText("NONE");
+        this.cmdScrollNONE.addSelectionListener(this);
+
+        this.cmdScrollHorizontal = new Command(cmdScroll, Command.GENERAL, 2);
+        this.cmdScrollHorizontal.setText("HORIZONTAL");
+        this.cmdScrollHorizontal.addSelectionListener(this);
+
+        this.cmdScrollVertical = new Command(cmdScroll, Command.GENERAL, 1);
+        this.cmdScrollVertical.setText("VERTICAL");
+        this.cmdScrollVertical.addSelectionListener(this);
+
+        this.cmdScrollBOTH = new Command(cmdScroll, Command.GENERAL, 0);
+        this.cmdScrollBOTH.setText("BOTH");
+        this.cmdScrollBOTH.addSelectionListener(this);
+
+        this.extension = -1;
+
+        // create field Labels
+        Label tllabel = new Label(this.shell, SWT.NONE);
+        tllabel.setText("UPPERCASE");
+
+        FormData tlldata = new FormData();
+        tlldata.left = new FormAttachment(0, 0);
+        tlldata.top = new FormAttachment(0, 0);
+        tllabel.setLayoutData(tlldata);
+
+        Label trlabel = new Label(this.shell, SWT.NONE);
+        trlabel.setText("LOWERCASE");
+
+        FormData trdata = new FormData();
+        trdata.left = new FormAttachment(50, 0);
+        trdata.top = new FormAttachment(0, 0);
+        trlabel.setLayoutData(trdata);
+
+        // create Text fields
+        // top left
+        this.topLeftField = new TextExtension(this.shell, SWT.BORDER | SWT.SINGLE);
+        this.topLeftField.setInitialInputMode(TextExtension.UPPERCASE,null);
+
+        // create and set the layout data
+        FormData textTLdata = new FormData();
+        textTLdata.left = new FormAttachment(tllabel, 0, SWT.LEFT);
+        textTLdata.top = new FormAttachment(tllabel, 5, SWT.BOTTOM);
+        textTLdata.right = new FormAttachment(40, 0);
+        this.topLeftField.setLayoutData(textTLdata);
+
+        // top right
+        this.topRightField = new TextExtension(this.shell, SWT.BORDER | SWT.SINGLE);
+        this.topRightField.setInitialInputMode(TextExtension.LOWERCASE,null);
+        // create and set the layout data
+        FormData textTRdata = new FormData();
+        textTRdata.left = new FormAttachment(trlabel, 0, SWT.LEFT);
+        textTRdata.top = new FormAttachment(trlabel, 5, SWT.BOTTOM);
+        textTRdata.right = new FormAttachment(90, 0);
+        this.topRightField.setLayoutData(textTRdata);
+
+        // create field Labels
+        Label bllabel = new Label(this.shell, SWT.NONE);
+        bllabel.setText("TEXTCASE");
+
+        FormData bldata = new FormData();
+        bldata.left = new FormAttachment(0, 0);
+        bldata.top = new FormAttachment(50, 0);
+        bllabel.setLayoutData(bldata);
+
+        Label mlabel = new Label(this.shell, SWT.NONE);
+        mlabel.setText("TITLECASE");
+
+        FormData mldata = new FormData();
+        mldata.left = new FormAttachment(50, 0);
+        mldata.top = new FormAttachment(50, 0);
+        mlabel.setLayoutData(mldata);
+
+        // bottom left
+        this.bottomLeftField = new TextExtension(this.shell, SWT.BORDER | SWT.SINGLE);
+        this.bottomLeftField.setInitialInputMode(TextExtension.TEXTCASE,null);
+        // create and set the layout data
+        FormData textBLdata = new FormData();
+        textBLdata.left = new FormAttachment(bllabel, 0, SWT.LEFT);
+        textBLdata.top = new FormAttachment(bllabel, 5, SWT.BOTTOM);
+        textBLdata.right = new FormAttachment(40, 0);
+        this.bottomLeftField.setLayoutData(textBLdata);
+
+        // top right
+        this.bottomRightField = new TextExtension(this.shell, SWT.BORDER | SWT.SINGLE);
+        this.bottomRightField.setInitialInputMode(TextExtension.TITLECASE,null);
+        // create and set the layout data
+        FormData mdata = new FormData();
+        mdata.left = new FormAttachment(mlabel, 0, SWT.LEFT);
+        mdata.top = new FormAttachment(mlabel, 5, SWT.BOTTOM);
+        mdata.right = new FormAttachment(90, 0);
+        this.bottomRightField.setLayoutData(mdata);
+
+    }
+
+    private void changeExtension(int style)
+    {
+
+        this.topLeftField = this.replaceField(this.topLeftField, this.topLeftField.getStyle(), style);
+        this.topRightField = this.replaceField(this.topRightField, this.topRightField.getStyle(), style);
+        this.bottomLeftField = this.replaceField(this.bottomLeftField, this.bottomLeftField.getStyle(), style);
+        this.bottomRightField = this.replaceField(this.bottomRightField, this.bottomRightField.getStyle(), style);
+
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    private void changeCase(int style)
+    {
+
+        this.topLeftField.setInitialInputMode(style,null);
+        this.topRightField.setInitialInputMode(style,null);
+        this.bottomLeftField.setInitialInputMode(style,null);
+        this.bottomRightField.setInitialInputMode(style,null);
+
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+    private void changeInput(String style)
+    {
+
+        this.topLeftField.setInitialInputMode(TextExtension.UPPERCASE,style);
+        this.topRightField.setInitialInputMode(TextExtension.LOWERCASE,style);
+        this.bottomLeftField.setInitialInputMode(TextExtension.TEXTCASE,style);
+        this.bottomRightField.setInitialInputMode(TextExtension.TITLECASE,style);
+        this.shell.setText(style);
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+    /**
+     * Change the style of the field if needed.
+     * The styles defined by mask parameter will be cleaned up (unset)
+     * before new style (style parameter) will be applied.
+     * @param field A Text control
+     * @param mask Set of styles to be cleaned
+     * @param change A style constant to be set
+     */
+    private void changeStyle(TextExtension field, int mask, int change)
+    {
+        if (field == null || field.isDisposed()) return;
+
+        int style = field.getStyle();
+        if ((style & change) != change)  // need to update the style
+        {
+            // update the style
+            style &= ~mask;
+            style ^= change;
+
+            field = this.replaceField(field, style,this.extension);
+
+            // update the layout and redraw
+            this.shell.layout();
+            this.shell.update();
+        }
+    }
+
+    /**
+     * Set long texts.
+     * @param nro, number of inserted char.
+     */
+    private void setLongTexts(int nro)
+    {
+
+        this.topLeftField.setText(this.thousand_chars.substring(0,nro));
+        this.topRightField.setText(this.thousand_chars.substring(0,nro));
+        this.bottomLeftField.setText(this.thousand_chars.substring(0,nro));
+        this.bottomRightField.setText(this.thousand_chars.substring(0,nro));
+
+        // update the layout and redraw
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Set the wrap on or off.
+     * @param wrapOn if true, wrapping will be switched on and off otherwise.
+     */
+    private void setWrap(TextExtension field, boolean wrapOn)
+    {
+        int style = field.getStyle();
+        style &= ~SWT.WRAP;
+
+        if (wrapOn)
+        {
+            style |= SWT.WRAP;
+        }
+
+        field = this.replaceField(field, style,this.extension);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Set the scrollbar(s) for specified field.
+     * @param field a Text field
+     * @param type type of the scrollbar(s) to be set
+     */
+    private void setScrollBar(TextExtension field, int type)
+    {
+        // clean up the scroll bars
+        int style = field.getStyle();
+        style &= ~SWT.V_SCROLL;
+        style &= ~SWT.H_SCROLL;
+        // set new scrollbar(s)
+        if (type != SWT.NONE)
+        {
+            style |= type;
+        }
+
+        // replace the field
+        field = this.replaceField(field, style,this.extension);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Replace specified field with new one.
+     * Creates new field with defined style and copies some parameters along
+     * with data from the specified field.
+     * @param field a field containing data
+     * @return created field
+     */
+    private TextExtension replaceField(TextExtension field, int style,int extensionstyle)
+    {
+        try
+        {
+            // store current state of the field
+            String text = field.getText();
+            Point selection = field.getSelection();
+            FormData data = (FormData) field.getLayoutData();
+            TextExtension nfield = null;
+            this.extension = extensionstyle;
+            // create new field
+            if (this.extension == -1)
+            {
+                nfield = new TextExtension(this.shell, style);
+            }
+            else
+            {
+                nfield = new TextExtension(this.shell, style, this.extension);
+            }
+            nfield.setText(text);
+            nfield.setSelection(selection);
+            nfield.setLayoutData(data);
+            nfield.setFocus();
+
+            // dispose old field
+            field.dispose();
+
+            return nfield;
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Text could not be changed: "+ex.toString());
+            return field;
+        }
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        if (!(e.widget instanceof Command)) return;
+
+        TextExtension field = this.getFocusedField();
+
+        // Do commands handling
+        if (e.widget == this.cmdDoAppend)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.append(text);
+            }
+            return;
+        }
+        if (e.widget == this.cmdDoInsert)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.insert(text);
+            }
+            return;
+        }
+
+        // Settings commands handling
+        // aligment
+        if (e.widget == this.cmdAligmentLEFT)
+        {
+            int mask = SWT.NONE | SWT.CENTER | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.LEFT);
+            return;
+        }
+        if (e.widget == this.cmdAligmentCENTER)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.CENTER);
+            return;
+        }
+        if (e.widget == this.cmdAligmentRIGHT)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.CENTER;
+            this.changeStyle(field, mask, SWT.RIGHT);
+            return;
+        }
+        // type
+        if (e.widget == this.cmdMULTI)
+        {
+            int mask = SWT.SINGLE;
+            this.changeStyle(field, mask, SWT.MULTI);
+            return;
+        }
+        if (e.widget == this.cmdSINGLE)
+        {
+            int mask = SWT.MULTI;
+            this.changeStyle(field, mask, SWT.SINGLE);
+            return;
+        }
+        // mode
+        if (e.widget == this.cmdModeEditable)
+        {
+            field.setEditable(true);
+            return;
+        }
+        if (e.widget == this.cmdModeReadOnly)
+        {
+            field.setEditable(false);
+            return;
+        }
+        // text limit
+        if (e.widget == this.cmdLimitCustom)
+        {
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.NUMERIC);
+            dlg.setPromptText("Input a number:", "10");
+            dlg.setMaximum(4);
+            String res = dlg.open();
+            if (res != null && !("".equals(res)))
+            {
+                field.setTextLimit(Integer.parseInt(res));
+            }
+            return;
+        }
+        if (e.widget == this.cmdLimitNONE)
+        {
+            field.setTextLimit(Text.LIMIT);
+            return;
+        }
+        // wrapping
+        if (e.widget == this.cmdWrapYES)
+        {
+            this.setWrap(this.getFocusedField(), true);
+            return;
+        }
+        if (e.widget == this.cmdWrapNO)
+        {
+            this.setWrap(this.getFocusedField(), false);
+            return;
+        }
+        // adding long texts
+        if (e.widget == this.cmdLong)
+        {
+            this.setLongTexts(this.longtext);
+            return;
+        }
+        if (e.widget == this.cmdExtraLong)
+        {
+            this.setLongTexts(this.extralong);
+            return;
+        }
+        if (e.widget == this.cmdOverExtraLong)
+        {
+            this.setLongTexts(this.overextra);
+            return;
+        }
+        // scrolling
+        if (e.widget == this.cmdScrollNONE)
+        {
+            this.setScrollBar(field, SWT.NONE);
+            return;
+        }
+        if (e.widget == this.cmdScrollVertical)
+        {
+            this.setScrollBar(field, SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollBOTH)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL | SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollHorizontal)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdEmail)
+        {
+            this.shell.setText("EMAILADDRESS - TextExtension Test");
+            this.changeExtension(TextExtension.EMAILADDRESS);
+            return;
+        }
+        if (e.widget == this.cmdURL)
+        {
+            this.shell.setText("URL - TextExtension Test");
+            this.changeExtension(TextExtension.URL);
+            return;
+        }
+        if (e.widget == this.cmdNonPred)
+        {
+            this.shell.setText("NonPred - TextExtension Test");
+            this.changeExtension(TextExtension.NON_PREDICTIVE);
+            return;
+        }
+        if (e.widget == this.cmdLatinOnly)
+        {
+            this.shell.setText("LatinOnly - TextExtension Test");
+            this.changeExtension(TextExtension.LATIN_INPUT_ONLY);
+            return;
+        }
+        if (e.widget == this.cmdEmail_Non)
+        {
+            this.shell.setText("Email_Non - TextExtension Test");
+            this.changeExtension(TextExtension.EMAILADDRESS | TextExtension.NON_PREDICTIVE);
+            return;
+        }
+        if (e.widget == this.cmdURL_Non)
+        {
+            this.shell.setText("URL_Non - TextExtension Test");
+            this.changeExtension(TextExtension.URL | TextExtension.NON_PREDICTIVE);
+            return;
+        }
+        if (e.widget == this.cmdEmail_LatinOnly_Non)
+        {
+            this.shell.setText("Email_LatinOnly_Non - TextExtension Test");
+            this.changeExtension(TextExtension.EMAILADDRESS | TextExtension.NON_PREDICTIVE | TextExtension.LATIN_INPUT_ONLY);
+            return;
+        }
+        if (e.widget == this.cmdEmail_LatinOnly)
+        {
+            this.shell.setText("Email_LatinOnly - TextExtension Test");
+            this.changeExtension(TextExtension.EMAILADDRESS | TextExtension.LATIN_INPUT_ONLY);
+            return;
+        }
+        if (e.widget == this.cmdURL_LatinOnly_Non)
+        {
+            this.shell.setText("URL_LatinOnly_Non - TextExtension Test");
+            this.changeExtension(TextExtension.URL | TextExtension.NON_PREDICTIVE | TextExtension.LATIN_INPUT_ONLY);
+            return;
+        }
+        if (e.widget == this.cmdURL_LatinOnly)
+        {
+            this.shell.setText("URL_LatinOnly - TextExtension Test");
+            this.changeExtension(TextExtension.URL | TextExtension.LATIN_INPUT_ONLY);
+            return;
+        }
+        if (e.widget == this.cmdUPPERCASE)
+        {
+            this.changeCase(TextExtension.UPPERCASE);
+            return;
+        }
+        if (e.widget == this.cmdLOWERCASE)
+        {
+            this.changeCase(TextExtension.LOWERCASE);
+            return;
+        }
+        if (e.widget == this.cmdTEXTCASE)
+        {
+            this.changeCase(TextExtension.TEXTCASE);
+            return;
+        }
+        if (e.widget == this.cmdTITLECASE)
+        {
+            this.changeCase(TextExtension.TITLECASE);
+            return;
+        }
+        if (e.widget == this.cmdBASIC_LATIN || e.widget == this.cmdGREEK ||
+                e.widget == this.cmdCYRILLIC || e.widget == this.cmdARABIC ||
+                e.widget == this.cmdBENGALI || e.widget == this.cmdARMENIAN ||
+                e.widget == this.cmdTHAI || e.widget == this.cmdHEBREW ||
+                e.widget == this.cmdDEVANAGARI || e.widget == this.cmdFULLWIDTH_DIGITS ||
+                e.widget == this.cmdFULLWIDTH_LATIN || e.widget == this.cmdLATIN ||
+                e.widget == this.cmdHALFWIDTH_KATAKANA || e.widget == this.cmdHANGUL_SYLLABLES ||
+                e.widget == this.cmdHANJA || e.widget == this.cmdHIRAGANA ||
+                e.widget == this.cmdKANJI || e.widget == this.cmdKATAKANA ||
+                e.widget == this.cmdLATIN_DIGITS || e.widget == this.cmdSIMPLIFIED_HANZI ||
+                e.widget == this.cmdTRADITIONAL_HANZI)
+        {
+
+            this.changeInput(((Command)(e.widget)).getText());
+
+            return;
+        }
+
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Return currently focused Text control.
+     * @return currently selected Text field, null otherwise.
+     */
+    private TextExtension getFocusedField()
+    {
+        Control control = this.shell.getDisplay().getFocusControl();
+        if (control instanceof TextExtension)
+            return (TextExtension) control;
+        else
+            return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="TextTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TextTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.text.TextTestMIDlet_01"/>
+    <property name="midlet2.name" value="TextTestMIDlet_02"/>
+    <property name="midlet2.icon.name" value="icon.png"/>
+    <property name="midlet2.package.name" value="com.nokia.test.java.eswt.text.TextTestMIDlet_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TextTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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}" />
+        </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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/text/TextTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,489 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.text;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ */
+public class TextTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    /** */
+    private Text singleField    = null;
+    private Text multiField     = null;
+
+    /** Do menu commands */
+    private Command cmdDoAppend     = null;
+    private Command cmdDoInsert     = null;
+
+    /** Input mode menu commands */
+    private Command cmdModeReadOnly = null;
+    private Command cmdModeEditable = null;
+
+    /** Text Limit menu commands */
+    private Command cmdLimitNONE    = null;
+    private Command cmdLimitCustom  = null;
+
+    /** Aligment menu commands */
+    private Command cmdAligmentLEFT   = null;
+    private Command cmdAligmentRIGHT  = null;
+    private Command cmdAligmentCENTER = null;
+
+    /** PASSWORD menu commands */
+    private Command cmdPassword   = null;
+
+    /** Wrapping menu command */
+    private Command cmdWrapYES  = null;
+    private Command cmdWrapNO   = null;
+
+    /** Scrolling commands */
+    private Command cmdScrollVertical   = null;
+    private Command cmdScrollHorizontal = null;
+    private Command cmdScrollBOTH       = null;
+    private Command cmdScrollNONE       = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set title
+        this.shell.setText("Text Test");
+
+        // create and set the layout
+        this.shell.setLayout(new FormLayout());
+
+        // create menu
+
+        // Do menu
+        Command cmdDo = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdDo.setText("Do");
+
+        this.cmdDoAppend = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoAppend.setText("Append");
+        this.cmdDoAppend.addSelectionListener(this);
+
+        this.cmdDoInsert = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoInsert.setText("Insert");
+        this.cmdDoInsert.addSelectionListener(this);
+
+        // Settings menu
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        // Aligment submenu
+        Command cmdAligment = new Command(cmdSettings, Command.COMMANDGROUP, 4);
+        cmdAligment.setText("Aligment");
+
+        this.cmdAligmentLEFT = new Command(cmdAligment, Command.GENERAL, 2);
+        this.cmdAligmentLEFT.setText("LEFT");
+        this.cmdAligmentLEFT.addSelectionListener(this);
+
+        this.cmdAligmentCENTER = new Command(cmdAligment, Command.GENERAL, 1);
+        this.cmdAligmentCENTER.setText("CENTER");
+        this.cmdAligmentCENTER.addSelectionListener(this);
+
+        this.cmdAligmentRIGHT = new Command(cmdAligment, Command.GENERAL, 0);
+        this.cmdAligmentRIGHT.setText("RIGHT");
+        this.cmdAligmentRIGHT.addSelectionListener(this);
+
+        // Mode submenu
+        Command cmdMode = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdMode.setText("Mode");
+
+        this.cmdModeEditable = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdModeEditable.setText("EDITABLE");
+        this.cmdModeEditable.addSelectionListener(this);
+
+        this.cmdModeReadOnly = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdModeReadOnly.setText("READ_ONLY");
+        this.cmdModeReadOnly.addSelectionListener(this);
+
+        this.cmdPassword = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdPassword.setText("PASSWORD");
+        this.cmdPassword.addSelectionListener(this);
+
+        // Text Limit submenu
+        Command cmdLimit = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdLimit.setText("Limit");
+
+        this.cmdLimitCustom = new Command(cmdLimit, Command.GENERAL, 1);
+        this.cmdLimitCustom.setText("CUSTOM");
+        this.cmdLimitCustom.addSelectionListener(this);
+
+        this.cmdLimitNONE = new Command(cmdLimit, Command.GENERAL, 0);
+        this.cmdLimitNONE.setText("NONE");
+        this.cmdLimitNONE.addSelectionListener(this);
+
+        // Wrapping submenu
+        Command cmdWrap = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdWrap.setText("Wrap");
+
+        this.cmdWrapYES = new Command(cmdWrap, Command.GENERAL, 1);
+        this.cmdWrapYES.setText("YES");
+        this.cmdWrapYES.addSelectionListener(this);
+
+        this.cmdWrapNO = new Command(cmdWrap, Command.GENERAL, 0);
+        this.cmdWrapNO.setText("NO");
+        this.cmdWrapNO.addSelectionListener(this);
+
+        // scrolling submenu
+        Command cmdScroll = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdScroll.setText("Scroll Bar");
+
+        this.cmdScrollNONE = new Command(cmdScroll, Command.GENERAL, 3);
+        this.cmdScrollNONE.setText("NONE");
+        this.cmdScrollNONE.addSelectionListener(this);
+
+        this.cmdScrollHorizontal = new Command(this.shell, Command.GENERAL, 2);
+        this.cmdScrollHorizontal.setText("HORIZONTAL");
+        this.cmdScrollHorizontal.addSelectionListener(this);
+
+        this.cmdScrollVertical = new Command(this.shell, Command.GENERAL, 1);
+        this.cmdScrollVertical.setText("VERTICAL");
+        this.cmdScrollVertical.addSelectionListener(this);
+
+        this.cmdScrollBOTH = new Command(this.shell, Command.GENERAL, 0);
+        this.cmdScrollBOTH.setText("BOTH");
+        this.cmdScrollBOTH.addSelectionListener(this);
+
+        // create field Labels
+        Label slabel = new Label(this.shell, SWT.NONE);
+        slabel.setText("Single");
+        FormData sldata = new FormData();
+        sldata.left = new FormAttachment(30, 0);
+        sldata.top = new FormAttachment(10, 0);
+        slabel.setLayoutData(sldata);
+
+        // create Text fields
+        // single
+        this.singleField = new Text(this.shell, SWT.BORDER | SWT.SINGLE);
+        // create and set the layout data
+        FormData sdata = new FormData();
+        sdata.left = new FormAttachment(slabel, 0, SWT.LEFT);
+        sdata.top = new FormAttachment(slabel, 5, SWT.BOTTOM);
+        sdata.right = new FormAttachment(70, 0);
+        this.singleField.setLayoutData(sdata);
+
+        Label mlabel = new Label(this.shell, SWT.NONE);
+        mlabel.setText("Multi");
+        FormData mldata = new FormData();
+        mldata.left = new FormAttachment(30, 0);
+        mldata.top = new FormAttachment(40, 0);
+        mlabel.setLayoutData(mldata);
+
+        // multi
+        this.multiField = new Text(this.shell, SWT.BORDER | SWT.MULTI);
+        Point size = this.singleField.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+        // create and set the layout data
+        FormData mdata = new FormData();
+        mdata.left = new FormAttachment(mlabel, 0, SWT.LEFT);
+        mdata.right = new FormAttachment(70, 0);
+        mdata.top = new FormAttachment(mlabel, 5, SWT.BOTTOM);
+        mdata.bottom = new FormAttachment(mlabel, (size.y * 3) + 5, SWT.BOTTOM);
+        this.multiField.setLayoutData(mdata);
+        this.multiField.setText("Here is Text with long text\n"+
+                                "with some line feeds \n"+
+                                "and scrollbars. \n"+
+                                "It's for testing scrolling\n"+
+                                "in multi Text.\n"+
+                                "Scrolling should go ok\n"+
+                                "both up and down.\n"+
+                                "Scrolling is done by using\n"+
+                                "scroll bars \n"+
+                                "and tapping and dragging\n"+
+                                "text content.\n"+
+                                "Hopefully testing goes ok!");
+    }
+
+    /**
+     * Change the style of the field if needed.
+     * The styles defined by mask parameter will be cleaned up (unset)
+     * before new style (style parameter) will be applied.
+     * @param field A Text control
+     * @param mask Set of styles to be cleaned
+     * @param change A style constant to be set
+     */
+    private void changeStyle(Text field, int mask, int change)
+    {
+        if (field == null || field.isDisposed()) return;
+
+        int style = field.getStyle();
+        if ((style & change) != change)  // need to update the style
+        {
+            // update the style
+            style &= ~mask;
+            style ^= change;
+
+            field = this.replaceField(field, style);
+
+            // update the layout and redraw
+            this.shell.layout();
+            this.shell.update();
+        }
+    }
+
+    /**
+     * Set the wrap on or off.
+     * @param wrapOn if true, wrapping will be switched on and off otherwise.
+     */
+    private void setWrap(Text field, boolean wrapOn)
+    {
+        int style = field.getStyle();
+        style &= ~SWT.WRAP;
+
+        if (wrapOn)
+        {
+            style |= SWT.WRAP;
+        }
+
+        field = this.replaceField(field, style);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Set the wrap on or off.
+     * @param wrapOn if true, wrapping will be switched on and off otherwise.
+     */
+    private void setPassword(Text field, boolean PasswordOn)
+    {
+        int style = field.getStyle();
+        style &= ~SWT.PASSWORD;
+
+        if (PasswordOn)
+        {
+            style |= SWT.PASSWORD;
+        }
+
+        field = this.replaceField(field, style);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+    /**
+     * Set the scrollbar(s) for specified field.
+     * @param field a Text field
+     * @param type type of the scrollbar(s) to be set
+     */
+    private void setScrollBar(Text field, int type)
+    {
+        // clean up the scroll bars
+        int style = field.getStyle();
+        style &= ~SWT.V_SCROLL;
+        style &= ~SWT.H_SCROLL;
+        // set new scrollbar(s)
+        if (type != SWT.NONE)
+        {
+            style |= type;
+        }
+
+        // replace the field
+        field = this.replaceField(field, style);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Replace specified field with new one.
+     * Creates new field with defined style and copies some parameters along
+     * with data from the specified field.
+     * @param field a field containing data
+     * @return created field
+     */
+    private Text replaceField(Text field, int style)
+    {
+        // store current state of the field
+        String text = field.getText();
+        int limit = field.getTextLimit();
+        Point selection = field.getSelection();
+        FormData data = (FormData) field.getLayoutData();
+
+        // create new field
+        Text nfield = new Text(this.shell, style);
+        nfield.setText(text);
+        nfield.setTextLimit(limit);
+        nfield.setSelection(selection);
+        nfield.setLayoutData(data);
+        nfield.setFocus();
+
+        // dispose old field
+        field.dispose();
+
+        return nfield;
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        if (!(e.widget instanceof Command)) return;
+
+        Text field = this.getFocusedField();
+
+        // Do commands handling
+        if (e.widget == this.cmdDoAppend)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.append(text);
+            }
+            return;
+        }
+        if (e.widget == this.cmdDoInsert)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.insert(text);
+            }
+            return;
+        }
+
+        // Settings commands handling
+        // aligment
+        if (e.widget == this.cmdAligmentLEFT)
+        {
+            int mask = SWT.NONE | SWT.CENTER | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.LEFT);
+            return;
+        }
+        if (e.widget == this.cmdAligmentCENTER)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.CENTER);
+            return;
+        }
+        if (e.widget == this.cmdAligmentRIGHT)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.CENTER;
+            this.changeStyle(field, mask, SWT.RIGHT);
+            return;
+        }
+        // mode
+        if (e.widget == this.cmdModeEditable)
+        {
+            field.setEditable(true);
+            return;
+        }
+        if (e.widget == this.cmdModeReadOnly)
+        {
+            field.setEditable(false);
+            return;
+        }
+        if (e.widget == this.cmdPassword)
+        {
+            this.setPassword(this.getFocusedField(), true);
+            return;
+        }
+        // text limit
+        if (e.widget == this.cmdLimitCustom)
+        {
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.NUMERIC);
+            dlg.setPromptText("Input a number:", "10");
+            dlg.setMaximum(2);
+            String res = dlg.open();
+            if (res != null && !("".equals(res)))
+            {
+                field.setTextLimit(Integer.parseInt(res));
+            }
+            return;
+        }
+        if (e.widget == this.cmdLimitNONE)
+        {
+            field.setTextLimit(Text.LIMIT);
+            return;
+        }
+        // wrapping
+        if (e.widget == this.cmdWrapYES)
+        {
+            this.setWrap(this.getFocusedField(), true);
+            return;
+        }
+        if (e.widget == this.cmdWrapNO)
+        {
+            this.setWrap(this.getFocusedField(), false);
+            return;
+        }
+        // scrolling
+        if (e.widget == this.cmdScrollNONE)
+        {
+            this.setScrollBar(field, SWT.NONE);
+            return;
+        }
+        if (e.widget == this.cmdScrollVertical)
+        {
+            this.setScrollBar(field, SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollBOTH)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL | SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollHorizontal)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL);
+            return;
+        }
+
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Return currently focused Text control.
+     * @return currently selected Text field, null otherwise.
+     */
+    private Text getFocusedField()
+    {
+        Control control = this.shell.getDisplay().getFocusControl();
+        if (control instanceof Text)
+            return (Text) control;
+        else
+            return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TextTestMidletSuite/src/com/nokia/test/java/eswt/text/TextTestMIDlet_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,482 @@
+/*
+* 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.test.java.eswt.text;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.ercp.swt.mobile.QueryDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.GridData;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class TextTestMIDlet_02 extends TestBaseMIDlet
+{
+
+    /** */
+    private Text readonlyField  = null;
+    private Text passwordField  = null;
+
+    private Text multiField     = null;
+
+    /** Do menu commands */
+    private Command cmdDoAppend     = null;
+    private Command cmdDoInsert     = null;
+
+    /** Input mode menu commands */
+    private Command cmdModeReadOnly = null;
+    private Command cmdModeEditable = null;
+
+    /** Text Limit menu commands */
+    private Command cmdLimitNONE    = null;
+    private Command cmdLimitCustom  = null;
+
+    /** Aligment menu commands */
+    private Command cmdAligmentLEFT   = null;
+    private Command cmdAligmentRIGHT  = null;
+    private Command cmdAligmentCENTER = null;
+
+    /** PASSWORD menu commands */
+    private Command cmdPassword   = null;
+
+    /** Wrapping menu command */
+    private Command cmdWrapYES  = null;
+    private Command cmdWrapNO   = null;
+
+    /** Scrolling commands */
+    private Command cmdScrollVertical   = null;
+    private Command cmdScrollHorizontal = null;
+    private Command cmdScrollBOTH       = null;
+    private Command cmdScrollNONE       = null;
+
+    /* (non-Javadoc)
+     * @see com.nokia.test.java.eswt.midlet.TestBaseMIDlet#init()
+     */
+    protected void init()
+    {
+        // set title
+        this.shell.setText("Text Test");
+
+        // create and set the layout
+        this.shell.setLayout(new GridLayout());
+
+        // create menu
+
+        // Do menu
+        Command cmdDo = new Command(this.shell, Command.COMMANDGROUP, 1);
+        cmdDo.setText("Do");
+
+        this.cmdDoAppend = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoAppend.setText("Append");
+        this.cmdDoAppend.addSelectionListener(this);
+
+        this.cmdDoInsert = new Command(cmdDo, Command.GENERAL, 1);
+        this.cmdDoInsert.setText("Insert");
+        this.cmdDoInsert.addSelectionListener(this);
+
+        // Settings menu
+        Command cmdSettings = new Command(this.shell, Command.COMMANDGROUP, 0);
+        cmdSettings.setText("Settings");
+
+        // Aligment submenu
+        Command cmdAligment = new Command(cmdSettings, Command.COMMANDGROUP, 4);
+        cmdAligment.setText("Aligment");
+
+        this.cmdAligmentLEFT = new Command(cmdAligment, Command.GENERAL, 2);
+        this.cmdAligmentLEFT.setText("LEFT");
+        this.cmdAligmentLEFT.addSelectionListener(this);
+
+        this.cmdAligmentCENTER = new Command(cmdAligment, Command.GENERAL, 1);
+        this.cmdAligmentCENTER.setText("CENTER");
+        this.cmdAligmentCENTER.addSelectionListener(this);
+
+        this.cmdAligmentRIGHT = new Command(cmdAligment, Command.GENERAL, 0);
+        this.cmdAligmentRIGHT.setText("RIGHT");
+        this.cmdAligmentRIGHT.addSelectionListener(this);
+
+        // Mode submenu
+        Command cmdMode = new Command(cmdSettings, Command.COMMANDGROUP, 3);
+        cmdMode.setText("Mode");
+
+        this.cmdModeEditable = new Command(cmdMode, Command.GENERAL, 1);
+        this.cmdModeEditable.setText("EDITABLE");
+        this.cmdModeEditable.addSelectionListener(this);
+
+        this.cmdModeReadOnly = new Command(cmdMode, Command.GENERAL, 0);
+        this.cmdModeReadOnly.setText("READ_ONLY");
+        this.cmdModeReadOnly.addSelectionListener(this);
+
+        this.cmdPassword = new Command(cmdMode, Command.GENERAL, 1);
+        this.cmdPassword.setText("PASSWORD");
+        this.cmdPassword.addSelectionListener(this);
+
+        // Text Limit submenu
+        Command cmdLimit = new Command(cmdSettings, Command.COMMANDGROUP, 2);
+        cmdLimit.setText("Limit");
+
+        this.cmdLimitCustom = new Command(cmdLimit, Command.GENERAL, 1);
+        this.cmdLimitCustom.setText("CUSTOM");
+        this.cmdLimitCustom.addSelectionListener(this);
+
+        this.cmdLimitNONE = new Command(cmdLimit, Command.GENERAL, 0);
+        this.cmdLimitNONE.setText("NONE");
+        this.cmdLimitNONE.addSelectionListener(this);
+
+        // Wrapping submenu
+        Command cmdWrap = new Command(cmdSettings, Command.COMMANDGROUP, 1);
+        cmdWrap.setText("Wrap");
+
+        this.cmdWrapYES = new Command(cmdWrap, Command.GENERAL, 1);
+        this.cmdWrapYES.setText("YES");
+        this.cmdWrapYES.addSelectionListener(this);
+
+        this.cmdWrapNO = new Command(cmdWrap, Command.GENERAL, 0);
+        this.cmdWrapNO.setText("NO");
+        this.cmdWrapNO.addSelectionListener(this);
+
+        // scrolling submenu
+        Command cmdScroll = new Command(cmdSettings, Command.COMMANDGROUP, 0);
+        cmdScroll.setText("Scroll Bar");
+
+        this.cmdScrollNONE = new Command(cmdScroll, Command.GENERAL, 3);
+        this.cmdScrollNONE.setText("NONE");
+        this.cmdScrollNONE.addSelectionListener(this);
+
+        this.cmdScrollHorizontal = new Command(cmdScroll, Command.GENERAL, 2);
+        this.cmdScrollHorizontal.setText("HORIZONTAL");
+        this.cmdScrollHorizontal.addSelectionListener(this);
+
+        this.cmdScrollVertical = new Command(cmdScroll, Command.GENERAL, 1);
+        this.cmdScrollVertical.setText("VERTICAL");
+        this.cmdScrollVertical.addSelectionListener(this);
+
+        this.cmdScrollBOTH = new Command(cmdScroll, Command.GENERAL, 0);
+        this.cmdScrollBOTH.setText("BOTH");
+        this.cmdScrollBOTH.addSelectionListener(this);
+
+        Label sblabel = new Label(this.shell, SWT.NONE);
+        sblabel.setText("Scroll bars");
+        sblabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+        // multi
+        this.multiField = new Text(this.shell, SWT.BORDER | SWT.MULTI |SWT.V_SCROLL|SWT.H_SCROLL);
+        this.multiField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        this.multiField.setText("Here is Text with long text\n"+
+                                "with some line feeds \n"+
+                                "and scrollbars. \n"+
+                                "It's for testing scrolling\n"+
+                                "in multi Text.\n"+
+                                "Scrolling should go ok\n"+
+                                "both up and down.\n"+
+                                "Scrolling is done by using\n"+
+                                "scroll bars \n"+
+                                "and tapping and dragging\n"+
+                                "text content.\n"+
+                                "Hopefully testing goes ok!");
+
+        // create field Labels
+        Label slabel = new Label(this.shell, SWT.NONE);
+        slabel.setText("Password");
+        slabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+        // create Text fields
+        // single
+        this.passwordField = new Text(this.shell, SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
+        // create and set the layout data
+        this.passwordField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        Label mlabel = new Label(this.shell, SWT.NONE);
+
+        mlabel.setText("ReadOnly");
+        mlabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+        this.readonlyField = new Text(this.shell, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
+        // create and set the layout data
+        this.readonlyField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+
+    }
+
+    /**
+     * Change the style of the field if needed.
+     * The styles defined by mask parameter will be cleaned up (unset)
+     * before new style (style parameter) will be applied.
+     * @param field A Text control
+     * @param mask Set of styles to be cleaned
+     * @param change A style constant to be set
+     */
+    private void changeStyle(Text field, int mask, int change)
+    {
+        if (field == null || field.isDisposed()) return;
+
+        int style = field.getStyle();
+        if ((style & change) != change)  // need to update the style
+        {
+            // update the style
+            style &= ~mask;
+            style ^= change;
+
+            field = this.replaceField(field, style);
+
+            // update the layout and redraw
+            this.shell.layout();
+            this.shell.update();
+        }
+    }
+
+    /**
+     * Set the wrap on or off.
+     * @param wrapOn if true, wrapping will be switched on and off otherwise.
+     */
+    private void setWrap(Text field, boolean wrapOn)
+    {
+        int style = field.getStyle();
+        style &= ~SWT.WRAP;
+
+        if (wrapOn)
+        {
+            style |= SWT.WRAP;
+        }
+
+        field = this.replaceField(field, style);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Set the wrap on or off.
+     * @param wrapOn if true, wrapping will be switched on and off otherwise.
+     */
+    private void setPassword(Text field, boolean PasswordOn)
+    {
+        int style = field.getStyle();
+        style &= ~SWT.PASSWORD;
+
+        if (PasswordOn)
+        {
+            style |= SWT.PASSWORD;
+        }
+
+        field = this.replaceField(field, style);
+
+        this.shell.layout();
+        this.shell.update();
+    }
+    /**
+     * Set the scrollbar(s) for specified field.
+     * @param field a Text field
+     * @param type type of the scrollbar(s) to be set
+     */
+    private void setScrollBar(Text field, int type)
+    {
+        // clean up the scroll bars
+        int style = field.getStyle();
+        style &= ~SWT.V_SCROLL;
+        style &= ~SWT.H_SCROLL;
+        // set new scrollbar(s)
+        if (type != SWT.NONE)
+        {
+            style |= type;
+        }
+
+        // replace the field
+        field = this.replaceField(field, style);
+
+        // update the shell
+        this.shell.layout();
+        this.shell.update();
+    }
+
+    /**
+     * Replace specified field with new one.
+     * Creates new field with defined style and copies some parameters along
+     * with data from the specified field.
+     * @param field a field containing data
+     * @return created field
+     */
+    private Text replaceField(Text field, int style)
+    {
+        // store current state of the field
+        String text = field.getText();
+        int limit = field.getTextLimit();
+        Point selection = field.getSelection();
+        GridData data = (GridData) field.getLayoutData();
+
+        // create new field
+        Text nfield = new Text(this.shell, style);
+        nfield.setText(text);
+        nfield.setTextLimit(limit);
+        nfield.setSelection(selection);
+        nfield.setLayoutData(data);
+        nfield.setFocus();
+        // dispose old field
+        field.dispose();
+
+        return nfield;
+    }
+
+    /*
+     *  (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent e)
+    {
+        if (!(e.widget instanceof Command)) return;
+
+        Text field = this.getFocusedField();
+
+        // Do commands handling
+        if (e.widget == this.cmdDoAppend)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.append(text);
+            }
+            return;
+        }
+        if (e.widget == this.cmdDoInsert)
+        {
+            // prompt for a text
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.STANDARD);
+            dlg.setPromptText("Input some text:", "default");
+            dlg.setMaximum(15);
+            String text = dlg.open();
+            if (text != null)
+            {
+                field.insert(text);
+            }
+            return;
+        }
+
+        // Settings commands handling
+        // aligment
+        if (e.widget == this.cmdAligmentLEFT)
+        {
+            int mask = SWT.NONE | SWT.CENTER | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.LEFT);
+            return;
+        }
+        if (e.widget == this.cmdAligmentCENTER)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.RIGHT;
+            this.changeStyle(field, mask, SWT.CENTER);
+            return;
+        }
+        if (e.widget == this.cmdAligmentRIGHT)
+        {
+            int mask = SWT.NONE | SWT.LEFT | SWT.CENTER;
+            this.changeStyle(field, mask, SWT.RIGHT);
+            return;
+        }
+        // mode
+        if (e.widget == this.cmdModeEditable)
+        {
+            field.setEditable(true);
+            return;
+        }
+        if (e.widget == this.cmdModeReadOnly)
+        {
+            field.setEditable(false);
+            return;
+        }
+        if (e.widget == this.cmdPassword)
+        {
+            this.setPassword(this.getFocusedField(), true);
+            return;
+        }
+        // text limit
+        if (e.widget == this.cmdLimitCustom)
+        {
+            QueryDialog dlg = new QueryDialog(this.shell, SWT.APPLICATION_MODAL, QueryDialog.NUMERIC);
+            dlg.setPromptText("Input a number:", "10");
+            dlg.setMaximum(2);
+            String res = dlg.open();
+            if (res != null && !("".equals(res)))
+            {
+                field.setTextLimit(Integer.parseInt(res));
+            }
+            return;
+        }
+        if (e.widget == this.cmdLimitNONE)
+        {
+            field.setTextLimit(Text.LIMIT);
+            return;
+        }
+        // wrapping
+        if (e.widget == this.cmdWrapYES)
+        {
+            this.setWrap(this.getFocusedField(), true);
+            return;
+        }
+        if (e.widget == this.cmdWrapNO)
+        {
+            this.setWrap(this.getFocusedField(), false);
+            return;
+        }
+        // scrolling
+        if (e.widget == this.cmdScrollNONE)
+        {
+            this.setScrollBar(field, SWT.NONE);
+            return;
+        }
+        if (e.widget == this.cmdScrollVertical)
+        {
+            this.setScrollBar(field, SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollBOTH)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL | SWT.V_SCROLL);
+            return;
+        }
+        if (e.widget == this.cmdScrollHorizontal)
+        {
+            this.setScrollBar(field, SWT.H_SCROLL);
+            return;
+        }
+
+        super.widgetSelected(e);
+    }
+
+    /**
+     * Return currently focused Text control.
+     * @return currently selected Text field, null otherwise.
+     */
+    private Text getFocusedField()
+    {
+        Control control = this.shell.getDisplay().getFocusControl();
+        if (control instanceof Text)
+            return (Text) control;
+        else
+            return null;
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="TimedMessageBoxtestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TimedMessageBoxTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.timedmessagebox.TimedMessageBoxTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TimedMessageBoxtestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/BigLabel.gif has changed
Binary file javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/SmallLabel.jpg has changed
Binary file javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/res/res/icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TimedMessageBoxMidlet/src/com/nokia/test/java/eswt/timedmessagebox/TimedMessageBoxTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,422 @@
+/*
+* Copyright (c) 2006-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.test.java.eswt.timedmessagebox;
+
+import org.eclipse.ercp.swt.mobile.TimedMessageBox;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+/**
+ * this class is intended to test the timedmessagebox component
+ * - icons and images in timedmessagebox
+ * - operating timedmessagebox
+ * - setting title and message
+ */
+public class TimedMessageBoxTestMIDlet_01 extends TestBaseMIDlet
+{
+    /** working timed messagebox */
+    private TimedMessageBox workbox = null;
+    /** information timed messagebox */
+    private TimedMessageBox infobox = null;
+    /** warning timed messagebox */
+    private TimedMessageBox warnbox = null;
+    /** error timed messagebox */
+    private TimedMessageBox errbox = null;
+    /** normal image */
+    private Image normimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** transparent image */
+    private Image transimg = null;
+    /** gif image */
+    private Image gifimg = null;
+
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    /**
+     * initialization
+     */
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("TimedMessageBox");
+
+        // try to initialize the images
+        try
+        {
+            this.normimg = new Image(this.display, this.getClass().getResourceAsStream("/res/icon.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.normimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/SmallLabel.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        // try to initialize the images
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.transimg = null;
+        }
+        try
+        {
+            this.gifimg = new Image(this.display, this.getClass().getResourceAsStream("/res/BigLabel.gif"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Gif image could not be loaded");
+            this.gifimg = null;
+        }
+
+        // setup the timed messageboxes
+        this.workbox = new TimedMessageBox(this.shell, SWT.ICON_WORKING);
+        this.workbox.setText("Working...");
+        this.workbox.setMessage("This is a \"working\" timed messagebox.");
+        this.infobox = new TimedMessageBox(this.shell, SWT.ICON_INFORMATION);
+        this.infobox.setText("Information...");
+        this.infobox.setMessage("This is an \"information\" timed messagebox.");
+        this.warnbox = new TimedMessageBox(this.shell, SWT.ICON_WARNING);
+        this.warnbox.setText("Warning...");
+        this.warnbox.setMessage("This is a \"warning\" timed messagebox.");
+        this.errbox = new TimedMessageBox(this.shell, SWT.ICON_ERROR);
+        this.errbox.setText("Error...");
+        this.errbox.setMessage("This is an \"error\" timed messagebox.");
+
+        // setup the menu
+        Menu mainmenu = new Menu(this.shell, SWT.BAR);
+        this.shell.setMenuBar(mainmenu);
+        // "show" submenu
+        Menu menu = new Menu(mainmenu);
+        MenuItem item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Show");
+        item.setMenu(menu);
+        // "working" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Working");
+        item.addSelectionListener(this);
+        // "information" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Information");
+        item.addSelectionListener(this);
+        // "warning" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Warning");
+        item.addSelectionListener(this);
+        // "error" menuitem for "show" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Error");
+        item.addSelectionListener(this);
+        // "image" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Image");
+        item.setMenu(menu);
+        // "null" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "normal" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Normal");
+        item.addSelectionListener(this);
+        // "big" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Big");
+        item.addSelectionListener(this);
+        // "transparent" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Transparent");
+        item.addSelectionListener(this);
+        // "Gif" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Gif");
+        item.addSelectionListener(this);
+        // "invalid" menuitem for "image" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Invalid");
+        item.addSelectionListener(this);
+        // "change title" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Change Title");
+        item.setMenu(menu);
+        // "null" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "empty" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Empty");
+        item.addSelectionListener(this);
+        // "short" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Short");
+        item.addSelectionListener(this);
+        // "long" menuitem for "change title" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Long");
+        item.addSelectionListener(this);
+        // "change text" submenu
+        menu = new Menu(mainmenu);
+        item = new MenuItem(mainmenu, SWT.CASCADE);
+        item.setText("Change Text");
+        item.setMenu(menu);
+        // "null" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Null");
+        item.addSelectionListener(this);
+        // "empty" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Empty");
+        item.addSelectionListener(this);
+        // "short" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Short");
+        item.addSelectionListener(this);
+        // "long" menuitem for "change text" submenu
+        item = new MenuItem(menu, SWT.PUSH);
+        item.setText("Long");
+        item.addSelectionListener(this);
+    }
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof MenuItem)
+        {
+            String scmd = ((MenuItem) event.widget).getText();
+            if ("Working".equals(scmd))
+            {
+                // display the working timed messagebox
+                this.workbox.open();
+                return;
+            }
+            if ("Information".equals(scmd))
+            {
+                // display the information timed messagebox
+                this.infobox.open();
+                return;
+            }
+            if ("Warning".equals(scmd))
+            {
+                // display the warning timed messagebox
+                this.warnbox.open();
+                return;
+            }
+            if ("Error".equals(scmd))
+            {
+                // display the error timed messagebox
+                this.errbox.open();
+                return;
+            }
+            if ("Null".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                try
+                {
+                    if ("Image".equals(scmd))
+                        // try to set a null image to a timed messagebox
+                        this.workbox.setImage(null);
+                    else if ("Change Title".equals(scmd))
+                        // try to set the title text to null
+                        this.workbox.setText(null);
+                    else if ("Change Text".equals(scmd))
+                        // try to set the message text to null
+                        this.workbox.setMessage(null);
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    this.showException(ex.getMessage());
+                }
+                return;
+            }
+            if ("Normal".equals(scmd))
+            {
+                // set an image with normal size to the timed messageboxes
+                if (this.normimg != null && !this.normimg.isDisposed())
+                {
+                    this.workbox.setImage(this.normimg);
+                    this.infobox.setImage(this.normimg);
+                    this.warnbox.setImage(this.normimg);
+                    this.errbox.setImage(this.normimg);
+                }
+                return;
+            }
+            if ("Big".equals(scmd))
+            {
+                // set an image with big size to the timed messageboxes
+                if (this.bigimg != null && !this.bigimg.isDisposed())
+                {
+                    this.workbox.setImage(this.bigimg);
+                    this.infobox.setImage(this.bigimg);
+                    this.warnbox.setImage(this.bigimg);
+                    this.errbox.setImage(this.bigimg);
+                }
+                return;
+            }
+            if ("Transparent".equals(scmd))
+            {
+                // set an image with normal size to the timed messageboxes
+                if (this.transimg != null && !this.transimg.isDisposed())
+                {
+                    this.workbox.setImage(this.transimg);
+                    this.infobox.setImage(this.transimg);
+                    this.warnbox.setImage(this.transimg);
+                    this.errbox.setImage(this.transimg);
+                }
+                return;
+            }
+            if ("Gif".equals(scmd))
+            {
+                // set an image with big size to the timed messageboxes
+                if (this.gifimg != null && !this.gifimg.isDisposed())
+                {
+                    this.workbox.setImage(this.gifimg);
+                    this.infobox.setImage(this.gifimg);
+                    this.warnbox.setImage(this.gifimg);
+                    this.errbox.setImage(this.gifimg);
+                }
+                return;
+            }
+            if ("Invalid".equals(scmd))
+            {
+                // try to set an invalid image to a messagebox
+                try
+                {
+                    this.workbox.setImage(new Image(this.display, this.getClass().getResourceAsStream("/res/invalid.png")));
+                }
+                catch (Exception ex)
+                {
+                    // display the exception
+                    this.showException(ex.getMessage());
+                }
+                return;
+            }
+            if ("Empty".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // change titles to an empty text
+                    this.workbox.setText("");
+                    this.infobox.setText("");
+                    this.warnbox.setText("");
+                    this.errbox.setText("");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // change message texts to an empty text
+                    this.workbox.setMessage("");
+                    this.infobox.setMessage("");
+                    this.warnbox.setMessage("");
+                    this.errbox.setMessage("");
+                    return;
+                }
+            }
+            if ("Short".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // set short titles to the timed messageboxes
+                    this.workbox.setText("Working...");
+                    this.infobox.setText("Information...");
+                    this.warnbox.setText("Warning...");
+                    this.errbox.setText("Error...");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // set short message texts to the timed messageboxes
+                    this.workbox.setMessage("This is a \"working\" timed messagebox.");
+                    this.infobox.setMessage("This is an \"information\" timed messagebox.");
+                    this.warnbox.setMessage("This is a \"warning\" timed messagebox.");
+                    this.errbox.setMessage("This is an \"error\" timed messagebox.");
+                    return;
+                }
+            }
+            if ("Long".equals(scmd))
+            {
+                scmd = ((MenuItem) event.widget).getParent().getParentItem().getText();
+                if ("Change Title".equals(scmd))
+                {
+                    // set long titles to the timed messageboxes
+                    this.workbox.setText("Long title for Working timed messagebox...");
+                    this.infobox.setText("Long title for Information timed messagebox...");
+                    this.warnbox.setText("Long title for Warning timed messagebox...");
+                    this.errbox.setText("Long title for Error timed messagebox...");
+                    return;
+                }
+                if ("Change Text".equals(scmd))
+                {
+                    // set long message texts to the timed messageboxes
+                    this.workbox.setMessage("This is a long text for the timed messagebox. It is not possible to scroll the text, because any keypress dismisses the messagebox. The text is truncated and it is not possible to the read the whole text.");
+                    this.infobox.setMessage("This is a long text for the timed messagebox. It is not possible to scroll the text, because any keypress dismisses the messagebox. The text is truncated and it is not possible to the read the whole text.");
+                    this.warnbox.setMessage("This is a long text for the timed messagebox. It is not possible to scroll the text, because any keypress dismisses the messagebox. The text is truncated and it is not possible to the read the whole text.");
+                    this.errbox.setMessage("This is a long text for the timed messagebox. It is not possible to scroll the text, because any keypress dismisses the messagebox. The text is truncated and it is not possible to the read the whole text.");
+                    return;
+                }
+            }
+        }
+        else if (event.widget == this.cmdExit)
+        {
+            // dispose the images before exit
+            if (this.normimg != null && !this.normimg.isDisposed())
+                this.normimg.dispose();
+            if (this.bigimg != null && !this.bigimg.isDisposed())
+                this.bigimg.dispose();
+        }
+        super.widgetSelected(event);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TreeTestMidletSuite/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="TreeTestMidletSuite" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="TreeTestMIDlet_01"/>
+    <property name="midlet1.icon.name" value="icon.png"/>
+    <property name="midlet1.package.name" value="com.nokia.test.java.eswt.tree.TreeTestMIDlet_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="TreeTestMidletSuite"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/alphatest_small.png has changed
Binary file javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/medium.jpg has changed
Binary file javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/small.png has changed
Binary file javauis/tsrc/fute/eswt/TreeTestMidletSuite/res/res/sphere.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TreeTestMidletSuite/src/com/nokia/test/java/eswt/midlet/TestBaseMIDlet.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+package com.nokia.test.java.eswt.midlet;
+
+import javax.microedition.midlet.MIDlet;
+import javax.microedition.midlet.MIDletStateChangeException;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+import org.eclipse.ercp.swt.mobile.Command;
+
+public abstract class TestBaseMIDlet extends MIDlet
+        implements Runnable, SelectionListener
+{
+
+    /** */
+    protected Display display = null;
+    /** */
+    protected Shell shell     = null;
+    /** */
+    protected Command cmdExit = null;
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#startApp()
+     */
+    protected void startApp() throws MIDletStateChangeException
+    {
+        new Thread(this).start();
+    }
+
+    /*  (non-Javadoc)
+     * @see java.lang.Runnable#run()
+     */
+    public void run()
+    {
+        try
+        {
+            this.display = new Display();
+            this.shell = new Shell(this.display);
+
+            // custom initialization
+            init();
+
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+
+            this.shell.pack();
+            this.shell.layout();
+            this.shell.open();
+
+            while (!this.shell.isDisposed())
+                if (!this.display.readAndDispatch())
+                    this.display.sleep();
+
+            this.display.dispose();
+
+        }
+        catch (Throwable e)
+        {
+            System.out.println("Exception: " + e.getMessage());
+        }
+
+        this.notifyDestroyed();
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
+     */
+    protected void destroyApp(boolean arg0) throws MIDletStateChangeException
+    {
+    }
+
+    /*  (non-Javadoc)
+     * @see javax.microedition.midlet.MIDlet#pauseApp()
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void setExit(boolean enable)
+    {
+
+        if (this.cmdExit.isDisposed() && enable)
+        {
+            this.cmdExit = new Command(this.shell, Command.EXIT, 0);
+            this.cmdExit.setText("Exit");
+            this.cmdExit.addSelectionListener(this);
+        }
+        else if (!enable)
+        {
+            if (!this.cmdExit.isDisposed())
+                this.cmdExit.dispose();
+        }
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget == this.cmdExit)
+        {
+            this.cmdExit.dispose();
+            this.shell.dispose();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+    }
+
+    /**
+     * Initialisation
+     */
+    protected abstract void init();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/TreeTestMidletSuite/src/com/nokia/test/java/eswt/tree/TreeTestMIDlet_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,464 @@
+/*
+* 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.test.java.eswt.tree;
+
+import org.eclipse.ercp.swt.mobile.Command;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.FontDialog;
+
+import com.nokia.test.java.eswt.midlet.TestBaseMIDlet;
+
+public class TreeTestMIDlet_01 extends TestBaseMIDlet
+{
+
+    private Tree tree = null;
+
+    /** small image */
+    private Image smallimg = null;
+    /** big image */
+    private Image bigimg = null;
+    /** transparent image */
+    private Image transimg = null;
+
+    private Shell tooltip = null;
+
+    /** commands */
+    protected Command cmdSingleTree = null;
+    protected Command cmdMultiTree  = null;
+    protected Command cmdCheckSingleTree    = null;
+    protected Command cmdCheckMultiTree     = null;
+    protected Command cmdImageSingleTree    = null;
+    protected Command cmdImageMultiTree     = null;
+    protected Command cmdLargeMultiTree     = null;
+    protected Command cmdHideTree       = null;
+    protected Command cmdLargeSingleTree        = null;
+    protected Command cmdHeader         = null;
+    protected Command cmdLines          = null;
+    protected Command cmdSetCheck       = null;
+    protected Command cmdRemoveAll          = null;
+    protected Command cmdSetColor           = null;
+    protected Command cmdSetFonts           = null;
+    protected Command cmdClear              = null;
+
+    private MenuItem cmdSingle;
+
+    private MenuItem cmdMulti;
+
+    protected static final int ROOT_ITEM_COUNT = 6;
+    protected static final int CHILD_ITEM_COUNT = 4;
+    /**
+     * show a messagebox with the thrown exception
+     * @param the text to be displayed in the messagebox
+     */
+    protected void showException(String msg)
+    {
+        MessageBox mb = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+        mb.setText("Exception");
+        mb.setMessage(msg);
+        mb.open();
+    }
+
+    protected void init()
+    {
+        // customize the shell
+        this.shell.setText("Tree Tests");
+        // create and set a layout
+        this.shell.setLayout(new GridLayout(2, false));
+        this.createToolTip("");
+        // try to initialize the images
+        try
+        {
+            this.smallimg = new Image(this.display, this.getClass().getResourceAsStream("/res/sphere.jpg"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.smallimg = null;
+        }
+        try
+        {
+            this.bigimg = new Image(this.display, this.getClass().getResourceAsStream("/res/small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Big image could not be loaded");
+            this.bigimg = null;
+        }
+        // try to initialize the images
+        try
+        {
+            this.transimg = new Image(this.display, this.getClass().getResourceAsStream("/res/alphatest_small.png"));
+        }
+        catch (Exception ex)
+        {
+            // show a messagebox about the exception
+            this.showException("Small image could not be loaded");
+            this.transimg = null;
+        }
+
+        // "singleTree" left softkey command
+        this.cmdSingleTree = new Command(this.shell, Command.SELECT, 2);
+        cmdSingleTree.setText("Single Tree");
+        cmdSingleTree.addSelectionListener(this);
+        // "multiTree" creation command
+        this.cmdMultiTree = new Command(this.shell, Command.SELECT, 1);
+        cmdMultiTree.setText("Multi Tree");
+        cmdMultiTree.addSelectionListener(this);
+        // Tree with hide creation command
+        this.cmdHideTree = new Command(this.shell, Command.SELECT, 0);
+        cmdHideTree.setText("Tree with Hide");
+        cmdHideTree.addSelectionListener(this);
+        // large "singleTree" left softkey command
+        this.cmdLargeSingleTree = new Command(this.shell, Command.SELECT, 2);
+        cmdLargeSingleTree.setText("Large Single Tree");
+        cmdLargeSingleTree.addSelectionListener(this);
+        // large "multiTree" left softkey command
+        this.cmdLargeMultiTree = new Command(this.shell, Command.SELECT, 1);
+        cmdLargeMultiTree.setText("Large Multi Tree");
+        cmdLargeMultiTree.addSelectionListener(this);
+        // large "singleTree" left softkey command
+        this.cmdCheckSingleTree = new Command(this.shell, Command.SELECT, 2);
+        cmdCheckSingleTree.setText("Check Single Tree");
+        cmdCheckSingleTree.addSelectionListener(this);
+        // large "multiTree" left softkey command
+        this.cmdCheckMultiTree = new Command(this.shell, Command.SELECT, 1);
+        cmdCheckMultiTree.setText("Check Multi Tree");
+        cmdCheckMultiTree.addSelectionListener(this);
+        // image "singleTree" left softkey command
+        this.cmdImageSingleTree = new Command(this.shell, Command.SELECT, 2);
+        cmdImageSingleTree.setText("Image Single Tree");
+        cmdImageSingleTree.addSelectionListener(this);
+        // image "multiTree" left softkey command
+        this.cmdImageMultiTree = new Command(this.shell, Command.SELECT, 1);
+        cmdImageMultiTree.setText("Image Multi Tree");
+        cmdImageMultiTree.addSelectionListener(this);
+
+        //  command
+        this.cmdSetColor = new Command(this.shell, Command.SELECT, 0);
+        cmdSetColor.setText("Change color");
+        cmdSetColor.addSelectionListener(this);
+
+        //  command
+        this.cmdSetCheck = new Command(this.shell, Command.SELECT, 0);
+        cmdSetCheck.setText("Change Check");
+        cmdSetCheck.addSelectionListener(this);
+
+        //  command
+        this.cmdSetFonts = new Command(this.shell, Command.SELECT, 1);
+        cmdSetFonts.setText("Change Fonts");
+        cmdSetFonts.addSelectionListener(this);
+
+        // Remove submenu
+        Command cmdRemoveMenu = new Command(this.shell, Command.COMMANDGROUP, 4);
+        cmdRemoveMenu.setText("Remove");
+
+        this.cmdRemoveAll = new Command(cmdRemoveMenu, Command.GENERAL, 1);
+        this.cmdRemoveAll.setText("Remove All");
+        this.cmdRemoveAll.addSelectionListener(this);
+
+        //  command
+        this.cmdClear = new Command(this.shell, Command.SELECT, 1);
+        cmdClear.setText("Clear Shell");
+        cmdClear.addSelectionListener(this);
+
+
+    }
+
+    /**
+     * Cleanup the screen.
+     * Removes all widget objects which are currently presented
+     * on the shell.
+     */
+    private void shellCleanup()
+    {
+
+        if (this.shell == null || this.shell.isDisposed()) return;
+
+        Control[] controls = this.shell.getChildren();
+
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+
+        this.shell.update();
+    }
+
+    protected void populateTree(Tree tree,int root,int child,boolean image)
+    {
+        TreeItem myitem = null, myitem2 = null;
+        int ROOT_ITEM_COUNT = root;
+        int CHILD_ITEM_COUNT = child;
+        for (int i=0; i<ROOT_ITEM_COUNT; i++)
+        {
+            TreeItem iItem = new TreeItem(tree, 0);
+            iItem.setText("Item (0) -" + i);
+            if (image)
+                iItem.setImage(this.bigimg);
+            if (i == 2)
+                myitem = iItem;
+            for (int j=0; j<CHILD_ITEM_COUNT; j++)
+            {
+                TreeItem jItem = new TreeItem(iItem, SWT.CHECK);
+                jItem.setText("TreeTreeItem (1) - " + j);
+                if (image)
+                    jItem.setImage(this.smallimg);
+                if (i == 2 && j == 2)
+                    myitem2 = jItem;
+                for (int k=0; k<4; k++)
+                {
+                    TreeItem kItem = new TreeItem(jItem, 0);
+                    kItem.setText("I (2) - " + k);
+                    if (image)
+                        kItem.setImage(this.transimg);
+                    for (int l=0; l<CHILD_ITEM_COUNT; l++)
+                    {
+                        TreeItem lItem = new TreeItem(kItem, 0);
+                        lItem.setText("TreeItem (3) - " + l);
+                    }
+                }
+            }
+        }
+        myitem.setExpanded(true);
+        myitem2.setExpanded(true);
+    }
+
+    private void createTree(int style, int root, int child, boolean pack)
+    {
+
+        if (pack && style == SWT.MULTI)
+        {
+            tree = new Tree(this.shell,style|SWT.CHECK);
+        }
+        else
+        {
+
+            tree = new Tree(this.shell,style);
+        }
+
+        tree.setSize(new Point(this.shell.getClientArea().width, this.shell.getClientArea().height));
+
+        this.populateTree(tree,root,child,false);
+
+        tree.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        tree.addSelectionListener(this);
+        Menu mainmenu = new Menu(this.tree);
+        this.cmdSingle = new MenuItem(mainmenu, SWT.PUSH);
+        cmdSingle.setText("Single");
+        cmdSingle.addSelectionListener(this);
+        this.cmdMulti = new MenuItem(mainmenu, SWT.PUSH);
+        cmdMulti.setText("Multi");
+        cmdMulti.addSelectionListener(this);
+        this.tree.setMenu(mainmenu);
+        this.shell.layout();
+        this.shell.update();
+    }
+    private void createImageTree(int style, int root, int child, boolean pack)
+    {
+        tree = new Tree(this.shell,style);
+        tree.setSize(new Point(this.shell.getClientArea().width, this.shell.getClientArea().height));
+
+        this.populateTree(tree,root,child,true);
+        tree.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+        this.shell.layout();
+        this.shell.update();
+    }
+
+
+    /**
+     * selectionlistener implementation
+     */
+    public void widgetSelected(SelectionEvent event)
+    {
+        if (event.widget instanceof Command || event.widget instanceof MenuItem)
+        {
+            try
+            {
+                if (event.widget == this.cmdSingleTree|| event.widget == this.cmdSingle)
+                {
+                    createTree(SWT.SINGLE,4,3,true);
+                }
+                else if (event.widget == this.cmdMultiTree|| event.widget == this.cmdMulti)
+                {
+                    createTree(SWT.MULTI,4,3,true);
+                }
+                else if (event.widget == this.cmdLargeMultiTree)
+                {
+                    createTree(SWT.MULTI,8,6,true);
+                }
+                else if (event.widget == this.cmdLargeSingleTree)
+                {
+                    createTree(SWT.SINGLE,8,6,true);
+                }
+                else if (event.widget == this.cmdCheckMultiTree)
+                {
+                    createTree(SWT.MULTI,5,1,false);
+                }
+                else if (event.widget == this.cmdCheckSingleTree)
+                {
+                    createTree(SWT.SINGLE,5,6,false);
+                }
+                else if (event.widget == this.cmdImageSingleTree)
+                {
+                    createImageTree(SWT.SINGLE,5,3,false);
+                }
+                else if (event.widget == this.cmdImageMultiTree)
+                {
+                    createImageTree(SWT.MULTI,5,3,true);
+                }
+                else if (event.widget == this.cmdClear)
+                {
+                    this.shellCleanup();
+                }
+                else
+
+                    if (event.widget == this.cmdRemoveAll)
+                    {
+                        tree.removeAll();
+                    }
+                    else
+
+                        if (event.widget == this.cmdSetCheck)
+                        {
+
+                            for (int i = 0; i < tree.getItems().length; i++)
+                            {
+                                if (!tree.getItems()[i].getChecked())
+                                    tree.getItems()[i].setChecked(true);
+                                else
+                                    tree.getItems()[i].setChecked(false);
+                            }
+                        }
+                        else if (event.widget == this.cmdSetColor)
+                        {
+
+                            for (int i= 0; i < tree.getSelection().length; i++)
+                            {
+                                tree.getSelection()[i].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
+                                tree.getSelection()[i].setForeground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+                            }
+
+                        }
+                        else if (event.widget == this.cmdSetFonts)
+                        {
+
+                            TreeItem trItem = tree.getSelection()[0];
+                            FontDialog dlg = new FontDialog(this.shell);
+                            Font font = new Font(this.display,dlg.open());
+
+                            if (font != null)
+                            {
+                                trItem.setFont(font);
+
+                                this.shell.layout();
+                                this.shell.update();
+                            }
+
+                        }
+
+            }
+            catch (Exception ex)
+            {
+                // display the exception
+                MessageBox msg = new MessageBox(this.shell, SWT.ICON_INFORMATION | SWT.OK);
+                msg.setMessage(ex.getMessage());
+                msg.open();
+                return;
+            }
+        }
+        else if (event.widget instanceof Tree)
+        {
+            updateToolTip("Sel");
+        }
+        super.widgetSelected(event);
+
+    }
+    /* (non-Javadoc)
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+     */
+    public void widgetDefaultSelected(SelectionEvent event)
+    {
+
+        updateToolTip("Def");
+
+    }
+    /**
+     *
+     */
+    private void createToolTip(String msg)
+    {
+
+        // create a modeless shell with border
+        this.tooltip = new Shell(this.shell, SWT.MODELESS | SWT.NO_FOCUS | SWT.BORDER);
+        this.tooltip.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // set the location so the tooltip will be shown in
+        // middle of the screen
+        this.tooltip.setLocation(5, 5);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(false);
+    }
+    /**
+     *
+     */
+    private void updateToolTip(String msg)
+    {
+
+        Control[] controls = this.tooltip.getChildren();
+        for (int i=0; i<controls.length; i++)
+        {
+            controls[i].dispose();
+        }
+        // create a label to be used as a tooltip text
+        Label label = new Label(this.tooltip, SWT.NONE);
+        label.setText(msg);
+
+        // finilize
+        this.tooltip.pack();
+        this.tooltip.layout();
+        this.tooltip.setVisible(true);
+    }
+
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/eswt/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,24 @@
+<!--
+#
+# 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="EswtFunctionalTestMidlets" default="pack">
+
+    <!-- Get general settings for sub directory. -->
+    <import file="../properties-sub-directory.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/DateField_Test/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="DateField_Test" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="DateField_Test"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="DateField_Test"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="DateField_Test"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/DateField_Test/src/DateFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the DateField (initial value and changing input mode)
+ *
+ */
+
+public class DateFieldTests extends Form implements CommandListener
+{
+
+    // reference to the parent MIDlet
+    private DateField_Test parent = null;
+
+    // DateField item
+    private DateField dateField = null;
+
+    // Commands for changing InputMode
+    private Command cmdDate = new Command("Date", Command.ITEM, 1);
+    private Command cmdTime = new Command("Time", Command.ITEM, 1);
+    private Command cmdDateTime = new Command("Date&Time", Command.ITEM, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public DateFieldTests(DateField_Test m)
+    {
+
+        //set the name of the form to be the name of MIDlet
+        super(m.getClass().getName());
+        this.parent = m;
+
+        try
+        {
+            // create a new Datefield
+            dateField = new DateField("DATEFIELD: ", DateField.DATE_TIME);
+
+            // set an initial date
+            Date newDate = new Date(0);
+            dateField.setDate(newDate);
+
+            // add DateField to Form
+            append(dateField);
+
+            // set input mode of the DateField
+            dateField.setInputMode(DateField.DATE_TIME);
+            dateField.setInputMode(DateField.TIME);
+            dateField.setInputMode(DateField.DATE);
+
+            // add commands to Form
+            addCommand(cmdDate);
+            addCommand(cmdTime);
+            addCommand(cmdDateTime);
+            addCommand(cmdExit);
+
+            setCommandListener(this);
+
+            // show DateField on display
+            Display.getDisplay(parent).setCurrent(this);
+
+        }
+        catch (Exception ex)
+        {
+            Alert eAlert = new Alert("Exception","Exception was thrown: "+ex.toString(),null, AlertType.ERROR);
+            Display.getDisplay(parent).setCurrent(eAlert);
+        }
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdTime)
+        {
+            dateField.setInputMode(DateField.TIME);
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        else if (c == cmdDate)
+        {
+            dateField.setInputMode(DateField.DATE);
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        else if (c == cmdDateTime)
+        {
+            dateField.setInputMode(DateField.DATE_TIME);
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/DateField_Test/src/DateField_Test.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for DateField_test.
+ *
+ */
+
+public class DateField_Test extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new DateFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/ListImageUpdate/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="ListImageUpdate" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="ListImageUpdate"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="com.nokia.midp.listimage.ListImageUpdate"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="ListImageUpdate"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/ListImageUpdate/res/Icon.png has changed
Binary file javauis/tsrc/fute/lcdui/ListImageUpdate/res/Star.png has changed
Binary file javauis/tsrc/fute/lcdui/ListImageUpdate/res/bigImage.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* 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"
+* 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.midp.listimage;
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the images needed for this MIDlet.
+ */
+
+public class Images
+{
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The big image
+     */
+    public Image bigImage = null;
+
+    /**
+     *  The small image which fits to the layout
+     */
+    public Image smallImage = null;
+    public Image starImage = null;
+
+    /**
+     *  The invalid image
+     */
+    public Image invalidImage = null;
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            bigImage  = Image.createImage("/bigImage.png");
+            smallImage = Image.createImage("/Icon.png");
+            starImage = Image.createImage("/Star.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+        {
+            instance = new Images();
+        }
+        return instance;
+    }
+
+
+    /**
+     *  Tries to load an image that is invalid
+     *
+     *@return                  The Invalid value
+     *@exception  IOException  Description of Exception
+     */
+    public Image getInvalid()
+    throws IOException
+    {
+        Image invalid = Image.createImage("/invalid.png");
+        return invalid;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/ListImageUpdate.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* 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"
+* 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.midp.listimage;
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+/**
+ * This is the main class for List and image update testing midlet.
+ */
+
+public class ListImageUpdate extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ListTest(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/ListImageUpdate/src/com/nokia/midp/listimage/ListTest.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* 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"
+* 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.midp.listimage;
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * With small images and one line element text and image update.
+ */
+
+public class ListTest extends List implements CommandListener
+{
+
+    private static ListImageUpdate mid = null;
+    private static ListTest instance = null;
+
+    private Command cmdUpdate = new Command("Update images", Command.SCREEN,1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private String element;
+    private Image aImage;
+    //the elements of this list
+    String str[] =
+    {
+        "1stElement should be shown in two lines and text should be truncated",
+        "2ndElement", "3rdElement", "4thElement",
+        "5thElement", "6thElement", "7thElement", "8thElement",
+        "9thElement", "10thElement"
+    };
+
+    public ListTest(ListImageUpdate m)
+    {
+        super("ListImageUpdate", List.IMPLICIT);
+        mid = m;
+        instance = this;
+        addElements();
+        addCommand(cmdUpdate);
+        addCommand(cmdExit);
+        setSelectCommand(SELECT_COMMAND);
+        setCommandListener(this);
+        Display.getDisplay(mid).setCurrent(instance);
+
+    }
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            append(str[i], Images.getInstance().smallImage);
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+
+        if (c == SELECT_COMMAND)
+        {
+            int eIndex = getSelectedIndex();
+
+            element = getString(eIndex);
+            aImage = getImage(eIndex);
+            if (aImage == Images.getInstance().smallImage)
+            {
+                set(eIndex, element, Images.getInstance().starImage);
+            }
+            else if (aImage == Images.getInstance().starImage)
+            {
+                set(eIndex, element, Images.getInstance().bigImage);
+            }
+            else if (aImage == Images.getInstance().bigImage)
+            {
+                set(eIndex, element, Images.getInstance().smallImage);
+            }
+        }
+        if (c == cmdUpdate)
+        {
+            for (int i= 0; i< 10; i++)
+            {
+                element = getString(i);
+                set(i,element, Images.getInstance().smallImage);
+            }
+        }
+        else if (c == cmdExit)
+        {
+            mid.destroyApp(false);
+            mid.notifyDestroyed();
+        }
+    }
+
+}//end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/MIDPTestCustomItem/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="MIDPTestCustomItem" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="MIDPTestCustomItem"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="com.nokia.midp.test.midptest.MIDPTestCustomItem"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="MIDPTestCustomItem"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.0"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/MIDPTestCustomItem.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* 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.midp.test.midptest;
+
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import javax.microedition.io.*;
+import javax.microedition.media.*;
+import javax.microedition.media.control.*;
+import java.io.*;
+
+/**
+ * Tests CustomItem repaint.
+ *
+ */
+public class MIDPTestCustomItem
+        extends MIDlet
+        implements CommandListener
+{
+
+    private Form iForm;
+    private Command iExitCommand = new Command("Exit", Command.EXIT, 2);
+    private Command iAppendCommand = new Command("append", Command.SCREEN, 1);
+
+    private Display iDisplay;// The display for this MIDlet
+    private VideoItem iVideoItemCommand;
+    private VideoItem iVideoItem;
+
+    private TestTimer iVideoItemCommandTimer;
+    private TestTimer iVideoItemTimer;
+
+    /**
+     * Constructs the MIDlet instance.
+     */
+    public MIDPTestCustomItem()
+    {
+        iDisplay = Display.getDisplay(this);
+
+        iForm = new Form("CustomItem test");
+
+        iForm.addCommand(iExitCommand);
+        iForm.addCommand(iAppendCommand);
+
+        iForm.setCommandListener(this);
+
+        iVideoItem = new VideoItem();
+
+        iForm.append(iVideoItem);
+
+        iVideoItemCommand = new VideoItem();
+
+        iVideoItemCommandTimer = new TestTimer(iVideoItem);
+        iVideoItemTimer = new TestTimer(iVideoItemCommand);
+    }
+
+
+    public void startApp()
+    {
+        iDisplay.setCurrent(iForm);
+    }
+
+
+    public void pauseApp()
+    {
+        System.out.println("INFO: pauseApp()");
+    }
+
+
+    public void destroyApp(boolean unconditional)
+    {
+        System.out.println("INFO: destroyApp()");
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == iExitCommand)
+        {
+            destroyApp(false);
+            notifyDestroyed();
+        }
+        else if (c == iAppendCommand)
+        {
+            iForm.append(iVideoItemCommand);
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/TestTimer.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* 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.midp.test.midptest;
+
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+class TestTimer extends TimerTask
+{
+    Timer iTimer;
+    Runnable iRunnable;
+
+    public TestTimer(Runnable aRunnable)
+    {
+        iRunnable = aRunnable;
+        iTimer = new Timer();
+        iTimer.scheduleAtFixedRate(this, (long)1000, 1000);
+    }
+
+    public void run()
+    {
+        iRunnable.run();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/MIDPTestCustomItem/src/com/nokia/midp/test/midptest/VideoItem.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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.midp.test.midptest;
+
+import javax.microedition.lcdui.CustomItem;
+import javax.microedition.lcdui.Graphics;
+import java.util.Random;
+
+public class VideoItem extends CustomItem implements Runnable
+{
+    int iX = 1;
+    int iDir = 1;
+
+    Random iRandom = new Random();
+
+    public VideoItem()
+    {
+        super("");
+    }
+
+    public void run()
+    {
+        if (iX > 500)
+        {
+            iDir = -1;
+        }
+        else if (iX <= 1)
+        {
+            iDir = 1;
+        }
+
+        iX += 50 * iDir;
+
+        invalidate();
+    }
+
+    /**
+     * From class CustomItem
+     *
+     */
+    protected void paint(Graphics aGraphics, int aWidth, int aHeight)
+    {
+        int x = iX;
+        aGraphics.setColor(iRandom.nextInt());
+        aGraphics.fillRect(0, 0, x, 500);
+        aGraphics.setColor(0);
+        aGraphics.drawLine(x, 0, x, 500);
+    }
+
+    /**
+     * From class CustomItem
+     *
+     */
+    protected int getMinContentHeight()
+    {
+        int minHeight = 50;
+        return minHeight;
+    }
+
+    /**
+     * From class CustomItem
+     *
+     */
+    protected int getMinContentWidth()
+    {
+        return iX;
+    }
+
+    /**
+     * From class CustomItem
+     *
+     */
+    protected int getPrefContentHeight(int aWidth)
+    {
+        int prefHeight = 50;
+        return prefHeight;
+    }
+
+    /**
+     * From class CustomItem
+     *
+     */
+    protected int getPrefContentWidth(int aHeight)
+    {
+        return iX;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Alert_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Alert_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Alert_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Alert_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_01/res/fractal.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_01/res/invalid.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_01/res/small.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_01/src/AlertTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2002-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test the Alert test cases:
+ * 1.Alert title
+ * 2.Default Alert texts and tones
+ * 3.Alert images and
+ * 4.Timed Alerts
+ */
+
+public class AlertTests extends Form implements CommandListener
+{
+
+    //reference to parent MIDlet
+    private Midp_Alert_01 parent = null;
+
+    //The TextField to get Alert title
+    private TextField title = new TextField("Title:", "Alert Title", 500, TextField.ANY);
+
+    //The TextField to get Alert text
+    private TextField text = new TextField("Text:", "Alert Text", 500, TextField.ANY);
+
+    //Alert time
+    private TextField time = new TextField("Time:", "5000", 100, TextField.NUMERIC);
+
+    /**
+    *  These are the types of the alerts to show within the choice group
+     */
+    private final static String[] CHOOSABLE_ALERTS =
+    {
+        "NULL",
+        "ALARM",
+        "CONFIRMATION",
+        "ERROR",
+        "INFO",
+        "WARNING"
+    };
+    //alert types
+    private final static AlertType[] CHOOSEABLE_ALERT_TYPES =
+    {
+        null,
+        AlertType.ALARM,
+        AlertType.CONFIRMATION,
+        AlertType.ERROR,
+        AlertType.INFO,
+        AlertType.WARNING
+    };
+
+    //These are the image names shown in the ChoiceGroup
+    private final static String[] ALERT_IMAGES =
+    {
+        "Null",
+        "Small Image",
+        "Big Image",
+        "Invalid Image"
+    };
+    //image names
+    private final static String[] ALERT_IMAGES_FILE_NAMES =
+    {
+        null,
+        "/small.png",
+        "/fractal.png",
+        "/invalid.png"
+    };
+
+    //the ChoiceGroup with Alert types
+    private ChoiceGroup alertTypes = new ChoiceGroup("Alert Type:", ChoiceGroup.EXCLUSIVE,
+            CHOOSABLE_ALERTS, null);
+    //the ChoiceGroup with Alert images
+    private ChoiceGroup alertImages = new ChoiceGroup("Alert Image:",
+            ChoiceGroup.EXCLUSIVE, ALERT_IMAGES, null);
+    //Command to show alert
+    private Command cmdShowAlert = new Command("Show alert", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private Alert newAlert;
+    /**
+     * @param m the parent MIDlet of this class
+     */
+    public AlertTests(Midp_Alert_01 m)
+    {
+        super("AlertTests");
+        this.parent = m;
+        newAlert = new Alert(null);
+        append(title);
+        append(text);
+        append(time);
+        append(alertTypes);
+        append(alertImages);
+        addCommand(cmdShowAlert);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdShowAlert)
+        {
+            Image image = null;
+            int index= 0;
+            String element = null;
+            try
+            {
+                index = alertTypes.getSelectedIndex();
+                element = alertTypes.getString(index);
+
+                int imgIndex = alertImages.getSelectedIndex();
+                if (ALERT_IMAGES_FILE_NAMES[imgIndex] != null)
+                {
+                    image = Image.createImage(ALERT_IMAGES_FILE_NAMES[imgIndex]);
+                }
+                newAlert.setTitle(title.getString());
+                newAlert.setString(text.getString());
+                newAlert.setImage(image);
+                newAlert.setType(CHOOSEABLE_ALERT_TYPES[index]);
+
+                if (time.size() != 0)
+                    newAlert.setTimeout(Integer.parseInt(time.getString()));
+
+                Display.getDisplay(parent).setCurrent(newAlert);
+            }
+            catch (java.io.IOException e)
+            {
+                System.out.println("commandAction: can't open Image: " +
+                                   e.toString());
+                Alert errorAlert = new Alert("Cannot open Image", e.toString(), null,
+                                             AlertType.ERROR);
+                errorAlert.setTimeout(Alert.FOREVER);
+                Display.getDisplay(parent).setCurrent(errorAlert);
+            }
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_01/src/Midp_Alert_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Alert tests.
+ */
+
+public class Midp_Alert_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new AlertTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Alert_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Alert_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Alert_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Alert_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_02/res/small.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/AlertTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is the starting point to select the Alert tests.
+ * It lets the user to launch the selected type of test.
+ *
+ */
+
+public class AlertTests extends List implements CommandListener
+{
+
+    //reference to parent MIDlet to go to the different screens
+    private static Midp_Alert_02 parent=null;
+
+    private static AlertTests instance = null;
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor displays the IMPLICIT List with MIDlet name as its's title.
+     * It then adds "Test1" and "Test2" elements to this List.
+     *
+     * @param the parent of this class
+     */
+    public AlertTests(Midp_Alert_02 parent)
+    {
+        super(parent.getClass().getName(), Choice.IMPLICIT);
+        this.parent = parent;
+        this.append("Test1", null);
+        this.append("Test2", null);
+        this.append("Test3", null);
+        this.append("Test4", null);
+        this.addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //show this screen
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Alert newAlert = new Alert(parent.getClass().getName(),  parent.getClass().getName(), null, AlertType.INFO);
+        Display.getDisplay(parent).setCurrent(newAlert,instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = instance.getSelectedIndex();
+        String element = instance.getString(index);
+        if (c == List.SELECT_COMMAND)
+        {
+            if (element.equals("Test1"))
+                Display.getDisplay(parent).setCurrent(new Test1());
+            else if (element.equals("Test2"))
+                Display.getDisplay(parent).setCurrent(new Test2());
+            else if (element.equals("Test3"))
+                Display.getDisplay(parent).setCurrent(new Test3());
+            else if (element.equals("Test4"))
+                Display.getDisplay(parent).setCurrent(new Test4());
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/IndicatorRunnable.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class IndicatorRunnable extends Gauge implements Runnable
+{
+
+    private boolean run = false;
+    private int counter;
+    public IndicatorRunnable()
+    {
+        super(null, false,  Gauge.INDEFINITE, Gauge.INCREMENTAL_IDLE);
+        new Thread(this).start();
+        counter = 0;
+    }
+
+    public void run()
+    {
+        while (!run)
+        {
+            setValue(Gauge.INCREMENTAL_UPDATING);
+            counter++;
+            try
+            {
+                Thread.currentThread().sleep(1000);
+            }
+            catch (InterruptedException err)
+            {
+            }
+        }
+    }
+    void setRun()
+    {
+        run = true;
+    }
+    public int getCount()
+    {
+        return counter;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Midp_Alert_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Alert tests.
+ */
+
+public class Midp_Alert_02 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new AlertTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test modal alerts
+ */
+
+public class Test1 extends Form implements CommandListener
+{
+
+    //the parent MIDlet
+    private MIDlet parent = null;
+
+    //the Alert title
+    private TextField title = new TextField("Title:", "Alert Title", 500, TextField.ANY);
+
+    //Alert images to be added to alertImages ChoiceGroup
+    private final static String[] ALERT_IMAGES = {"Null", "Small Image"};
+
+    //image file names
+    private final static String[] ALERT_IMAGES_FILE_NAMES = {null, "/small.png"};
+
+    //Multiple ChoiceGroup with "FOREVER" element
+    private ChoiceGroup forever = null;
+
+    //Alert text for modal Alert
+    private String text = "Alert should be modal";
+
+    //the ChoiceGroup with image names
+    private ChoiceGroup alertImages = new ChoiceGroup("Alert Image:",
+            ChoiceGroup.EXCLUSIVE, ALERT_IMAGES, null);
+
+    //the Command to show the Alert
+    private Command cmdShowAlert = new Command("Show alert", Command.SCREEN, 1);
+
+    /**
+     *
+     */
+    public Test1()
+    {
+        super("AlertTests");
+        forever = new ChoiceGroup(null, ChoiceGroup.MULTIPLE);
+        forever.append("FOREVER", null);
+        append(title);
+        append(forever);
+        append(alertImages);
+        addCommand(cmdShowAlert);
+        setCommandListener(this);
+        parent = AlertTests.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdShowAlert)
+        {
+            Image image = null;
+            int index= 0;
+            String element = null;
+            int type = 0;
+
+            try
+            {
+                int imgIndex = alertImages.getSelectedIndex();
+                if (ALERT_IMAGES_FILE_NAMES[imgIndex] != null)
+                {
+                    image = Image.createImage(ALERT_IMAGES_FILE_NAMES[imgIndex]);
+                }
+                String alertText = "This is a modal alert with very long text blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" +
+                                   "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah";
+
+                //the alert should become modal
+                Alert newAlert = new Alert(title.getString(), alertText, image, AlertType.INFO);
+                if (forever.isSelected(0))
+                {
+                    newAlert.setString(text);
+                    newAlert.setTimeout(Alert.FOREVER);
+                }
+                Display.getDisplay(parent).setCurrent(newAlert);
+            }
+            catch (java.io.IOException e)
+            {
+                System.out.println("commandAction: can't open Image: " +
+                                   e.toString());
+                Alert errorAlert = new Alert("ERROR", "Can't open Image: " + e.toString(), null,
+                                             AlertType.ERROR);
+                errorAlert.setTimeout(Alert.FOREVER);
+                Display.getDisplay(parent).setCurrent(errorAlert);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test Commands to Alerts
+ */
+
+public class Test2 extends Form implements CommandListener
+{
+
+    //the parent MIDlet
+    private MIDlet parent = null;
+
+    //the Alert title
+    private TextField title = new TextField("Title:", "Alert Title", 500, TextField.ANY);
+
+    //Alert text
+    private TextField text = new TextField("Text", "Alert text", 500, TextField.ANY);
+
+    //the Command strings added to alertCommands ChoiceGroup
+    private final String[] CMDS = {"One Command", "Two Commands", "Four Commands", "Zero Commands"};
+
+    //the ChoiceGroup to select the number of Commands to the Alert
+    private ChoiceGroup alertCommands = new ChoiceGroup("Alert with:",
+            ChoiceGroup.EXCLUSIVE, CMDS, null);
+
+    //the Command to show the Alert
+    private Command cmdShowAlert = new Command("Show alert", Command.SCREEN, 1);
+
+    private Alert newAlert;
+    //Commands to Alert
+    private Command cmd1 = new Command("cmd1",Command.SCREEN, 1);
+    private Command cmd2 = new Command("cmd2",Command.SCREEN, 1);
+    private Command cmd3 = new Command("cmd3",Command.SCREEN, 1);
+    private Command cmd4 = new Command("cmd4",Command.SCREEN, 1);
+
+    public Test2()
+    {
+        super("AlertTests");
+        append(title);
+        append(text);
+        append(alertCommands);
+        addCommand(cmdShowAlert);
+        setCommandListener(this);
+        parent = AlertTests.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = alertCommands.getSelectedIndex();
+        String element = alertCommands.getString(index);
+
+        if (c == cmdShowAlert)
+        {
+            newAlert = new Alert(title.getString(), text.getString(), null, AlertType.INFO);
+
+            if (element.equals(CMDS[0]))
+            {
+                newAlert.addCommand(cmd1);
+            }
+            else if (element.equals(CMDS[1]))
+            {
+                newAlert.addCommand(cmd1);
+                newAlert.addCommand(cmd2);
+            }
+            else if (element.equals(CMDS[2]))
+            {
+                newAlert.addCommand(cmd1);
+                newAlert.addCommand(cmd2);
+                newAlert.addCommand(cmd3);
+                newAlert.addCommand(cmd4);
+            }
+            else if (element.equals(CMDS[3]))
+            {
+                newAlert.removeCommand(cmd1);
+                newAlert.removeCommand(cmd2);
+                newAlert.removeCommand(cmd3);
+                newAlert.removeCommand(cmd4);
+            }
+            Display.getDisplay(parent).setCurrent(newAlert);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test Commands to Alerts
+ */
+
+public class Test3 extends Form implements CommandListener
+{
+
+    //the parent MIDlet
+    private MIDlet parent = null;
+
+    //the Alert title
+    private TextField title = new TextField("Title:", "Alert Title", 500, TextField.ANY);
+
+    //Alert text
+    private TextField text = new TextField("Text", "Alert text", 500, TextField.ANY);
+
+    //Alert time
+    private TextField time = new TextField("Time:", "5000", 100, TextField.NUMERIC);
+
+    //the Command strings added to alertCommands ChoiceGroup
+    private final String[] CMDS = {"One Command", "Two Commands", "Four Commands", "Zero Commands"};
+
+    //the ChoiceGroup to select the number of Commands to the Alert
+    private ChoiceGroup alertCommands = new ChoiceGroup("Alert with:",
+            ChoiceGroup.EXCLUSIVE, CMDS, null);
+
+    //the Command to show the Alert
+    private Command cmdShowAlert = new Command("Show alert", Command.SCREEN, 1);
+    private Alert newAlert = null;
+    //Commands to Alert
+    private Command cmd1 = new Command("cmd1",Command.SCREEN, 1);
+    private Command cmd2 = new Command("cmd2",Command.SCREEN, 1);
+    private Command cmd3 = new Command("cmd3",Command.SCREEN, 1);
+    private Command cmd4 = new Command("cmd4",Command.SCREEN, 1);
+
+    public Test3()
+    {
+        super("AlertTests");
+        append(title);
+        append(text);
+        append(time);
+        newAlert = new Alert(null);
+        append(alertCommands);
+        addCommand(cmdShowAlert);
+        setCommandListener(this);
+        parent = AlertTests.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = alertCommands.getSelectedIndex();
+        String element = alertCommands.getString(index);
+        if (c == cmdShowAlert)
+        {
+            newAlert.setTitle(title.getString());
+            newAlert.setString(text.getString());
+            newAlert.setType(AlertType.INFO);
+            newAlert.setCommandListener(this);
+            if (time.size() != 0)
+                newAlert.setTimeout(Integer.parseInt(time.getString()));
+            if (element.equals(CMDS[0]))
+            {
+                newAlert.addCommand(cmd1);
+                newAlert.removeCommand(cmd2);
+                newAlert.removeCommand(cmd3);
+                newAlert.removeCommand(cmd4);
+            }
+            else if (element.equals(CMDS[1]))
+            {
+                newAlert.addCommand(cmd1);
+                newAlert.addCommand(cmd2);
+                newAlert.removeCommand(cmd3);
+                newAlert.removeCommand(cmd4);
+            }
+            else if (element.equals(CMDS[2]))
+            {
+                newAlert.addCommand(cmd1);
+                newAlert.addCommand(cmd2);
+                newAlert.addCommand(cmd3);
+                newAlert.addCommand(cmd4);
+            }
+            else if (element.equals(CMDS[3]))
+            {
+                newAlert.removeCommand(cmd1);
+                newAlert.removeCommand(cmd2);
+                newAlert.removeCommand(cmd3);
+                newAlert.removeCommand(cmd4);
+                newAlert.setCommandListener(null);
+            }
+
+            Display.getDisplay(parent).setCurrent(newAlert);
+        }
+        if (c == cmd1)
+        {
+            StringItem si = new StringItem("Command1 execute:", "Success!!");
+            append(si);
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        if (c == cmd2)
+        {
+            Alert cmd2Alert = new Alert("Command2_Title", "Command2_Text", null, AlertType.INFO);
+            StringItem si = new StringItem("Command2 execute:", "Success!!");
+            append(si);
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        if (c == cmd3)
+        {
+        }
+        if (c == cmd4)
+        {
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_02/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+import java.io.*;
+/**
+ * This is the class to test Commands to Alerts
+ */
+
+public class Test4 extends Form implements CommandListener
+{
+
+    //the parent MIDlet
+    private MIDlet parent = null;
+
+    //the Alert title
+    private TextField title = new TextField("Title:", "Alert Title", 500, TextField.ANY);
+
+    //Alert text
+    private TextField text = new TextField("Text", "Alert text", 500, TextField.ANY);
+
+    //the Command to show the Alert
+    private Command cmdShowAlert = new Command("Show alert", Command.SCREEN, 1);
+
+    private Alert newAlert;
+
+    //Commands to Alert
+    private Command cmd1 = new Command("cmd1",Command.SCREEN, 1);
+    private Command cmd2 = new Command("cmd2",Command.SCREEN, 1);
+    private Command cmd3 = new Command("cmd3",Command.SCREEN, 1);
+    private Command cmd4 = new Command("cmd4",Command.SCREEN, 1);
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+
+    public Test4()
+    {
+        super("AlertTests");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        append(title);
+        append(text);
+        newAlert = new Alert(title.getString(), text.getString(), null, AlertType.INFO);
+        newAlert.setTimeout(8000);
+        addCommand(cmdShowAlert);
+        setCommandListener(this);
+
+        parent = AlertTests.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+
+        if (c == cmd1)
+        {
+            newAlert.addCommand(cmd2);
+        }
+        if (c == cmdShowAlert)
+        {
+            newAlert.addCommand(cmd1);
+            newAlert.setCommandListener(this);
+            Display.getDisplay(parent).setCurrent(newAlert);
+            timer.schedule(okTimerTask, 2000, 1000);
+        }
+    }
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 4)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                newAlert.addCommand(cmd2);
+                break;
+            case 2:
+                newAlert.addCommand(cmd3);
+                break;
+            case 3:
+                newAlert.addCommand(cmd4);
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_04/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Alert_04" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Alert_04"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Alert_04"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Alert_04"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_04/src/IndicatorRunnable.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class IndicatorRunnable extends Gauge implements Runnable
+{
+
+    private boolean run = false;
+    public IndicatorRunnable()
+    {
+        super(null, false,  Gauge.INDEFINITE, Gauge.INCREMENTAL_IDLE);
+        new Thread(this).start();
+    }
+
+    public void run()
+    {
+        while (!run)
+        {
+            setValue(Gauge.INCREMENTAL_UPDATING);
+            try
+            {
+                Thread.currentThread().sleep(1000);
+            }
+            catch (InterruptedException err)
+            {
+            }
+        }
+    }
+
+    void setRun()
+    {
+        run = true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_04/src/Midp_Alert_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class Midp_Alert_04 extends MIDlet implements CommandListener
+{
+
+    private Alert alert;
+    private Display display;
+    private Command cmd1 = new Command("Add indicator", Command.SCREEN, 1);
+    private Command cmdS = new Command("set string", Command.SCREEN, 1);
+    private Command cmdT = new Command("set type", Command.SCREEN, 1);
+    private Command cmd2 = new Command("Remove indicator", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private IndicatorRunnable indicator;
+
+
+    public Midp_Alert_04()
+    {
+        alert = new Alert("Alert with Indicator", "Indefinite-Incremental", null, AlertType.INFO);
+        indicator = new IndicatorRunnable();
+        alert.setIndicator(indicator);
+        alert.addCommand(cmdS);
+        alert.addCommand(cmdT);
+        alert.addCommand(cmd1);
+        alert.addCommand(cmd2);
+        alert.addCommand(cmdExit);
+        alert.setCommandListener(this);
+        display = Display.getDisplay(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        display.setCurrent(alert);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        indicator.setRun();
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+
+    public void commandAction(Command c, Displayable d)
+    {
+        if (c == cmd1)
+        {
+            try
+            {
+                alert.setIndicator(indicator);
+            }
+            catch (IllegalArgumentException iae)
+            {
+                Display.getDisplay(this).setCurrent(new Alert("Exception","Gauge in wrong state", null, AlertType.INFO));
+            }
+            catch (Exception ex)
+            {
+                Display.getDisplay(this).setCurrent(new Alert("Exception",ex.toString(), null, AlertType.INFO));
+            }
+        }
+        else if (c == cmd2)
+            alert.setIndicator(null);
+
+        else if (c == cmdS)
+            alert.setString("Text is Set");
+
+        else if (c == cmdT)
+            alert.setType(AlertType.ALARM);
+
+        else if (c == cmdExit)
+        {
+            destroyApp(false);
+            notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_05/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Alert_05" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Alert_05"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Alert_05"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Alert_05"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_05/res/fractal.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_05/res/invalid.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Alert_05/res/small.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_05/src/AlertTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,266 @@
+/*
+* Copyright (c) 2002-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test the Alert test cases:
+ */
+
+public class AlertTests extends Form implements CommandListener
+{
+
+    //reference to parent MIDlet
+    private Midp_Alert_05 parent = null;
+
+    Alert newAlert = new Alert(null);
+
+    Image image = null;
+    String longString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                        " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                        " urna, hendrerit id fringilla eu, feugiat blandit tellus. Curabitur" +
+                        " scelerisque tempus ante, eu convallis ligula ultrices nec. Nullam" +
+                        " vulputate aliquet ullamcorper. Lorem ipsum dolor sit amet," +
+                        " consectetur adipiscing elit. Proin at odio vel urna luctus dignissim" +
+                        " a quis urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
+                        " Phasellus aliquet luctus eros vitae aliquam. Suspendisse ut magna a" +
+                        " ipsum fermentum imperdiet. Maecenas eu nunc sed metus placerat" +
+                        " adipiscing. Duis lacus lacus, vestibulum id vestibulum a, tempus at" +
+                        " nulla. Proin sagittis nibh vitae dui interdum varius. Cras purus" +
+                        " nulla, lobortis eu laoreet a, ultricies vitae sem. Integer aliquam" +
+                        " ultricies metus. Nulla nec dignissim mi. Nullam risus augue, egestas" +
+                        " vitae facilisis eu, adipiscing eu turpis. Nulla convallis semper" +
+                        " lobortis. Nullam eget lacus nunc. Nam ipsum lectus, mattis in mollis" +
+                        " eu, tristique nec nibh. Nam pellentesque euismod est, a laoreet turpis" +
+                        " pulvinar bibendum. Sed malesuada lacus eu ante luctus ut faucibus odio" +
+                        " tristique. Donec quis mi ante. Praesent a porta velit. Duis tincidunt" +
+                        " velit eget sapien viverra pulvinar.";
+
+    //image names
+    private final static String[] ALERT_IMAGES_FILE_NAMES =
+    {
+        null,
+        "/small.png",
+        "/fractal.png",
+        "/invalid.png"
+    };
+
+    private Gauge indicator = null;
+
+    private Command cmdLongTitle = new Command("Set long title", Command.SCREEN, 1);
+    private Command cmdShortTitle = new Command("Set short title", Command.SCREEN, 1);
+    private Command cmdNullTitle = new Command("Set null title", Command.SCREEN, 1);
+    private Command cmdVeryLongString = new Command("Set very long string", Command.SCREEN, 1);
+    private Command cmdShortString = new Command("Set short string", Command.SCREEN, 1);
+    private Command cmdLongString = new Command("Set long string", Command.SCREEN, 1);
+    private Command cmdNullString = new Command("Set null string", Command.SCREEN, 1);
+    private Command cmdSmallImage = new Command("Set small image", Command.SCREEN, 1);
+    private Command cmdBigImage = new Command("Set big image", Command.SCREEN, 1);
+    private Command cmdInvalidImage = new Command("Set invalid image", Command.SCREEN, 1);
+    private Command cmdNullImage = new Command("Set null image", Command.SCREEN, 1);
+    private Command cmdAlarm = new Command("Set Alarm", Command.SCREEN, 1);
+    private Command cmdConfirmation = new Command("Set Confirmation", Command.SCREEN, 1);
+    private Command cmdError = new Command("Set Error", Command.SCREEN, 1);
+    private Command cmdInfo = new Command("Set Info", Command.SCREEN, 1);
+    private Command cmdWarning = new Command("Set Warning", Command.SCREEN, 1);
+    private Command cmdNullType = new Command("Set null type", Command.SCREEN, 1);
+    private Command cmdValue = new Command("Increase value", Command.SCREEN, 1);
+    private Command cmdAddIndicator = new Command("Add Indicator", Command.SCREEN, 1);
+    private Command cmdRemoveIndicator = new Command("Remove Indicator", Command.SCREEN, 1);
+    private Command cmdPlaySound = new Command("Play Sound", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * @param m the parent MIDlet of this class
+     */
+    public AlertTests(Midp_Alert_05 m)
+    {
+        super("AlertTests");
+        this.parent = m;
+
+        indicator = new Gauge(null, false,  10, 0);
+
+        newAlert.setTitle("Alert Title");
+        newAlert.addCommand(cmdShortString);
+        newAlert.addCommand(cmdShortTitle);
+        newAlert.addCommand(cmdLongTitle);
+        newAlert.addCommand(cmdNullTitle);
+        newAlert.addCommand(cmdAlarm);
+
+        newAlert.addCommand(cmdLongString);
+        newAlert.addCommand(cmdVeryLongString);
+        newAlert.addCommand(cmdNullString);
+        newAlert.addCommand(cmdSmallImage);
+        newAlert.addCommand(cmdBigImage);
+        newAlert.addCommand(cmdInvalidImage);
+        newAlert.addCommand(cmdNullImage);
+        newAlert.addCommand(cmdAlarm);
+        newAlert.addCommand(cmdConfirmation);
+        newAlert.addCommand(cmdError);
+        newAlert.addCommand(cmdInfo);
+        newAlert.addCommand(cmdWarning);
+        newAlert.addCommand(cmdNullType);
+        newAlert.addCommand(cmdAddIndicator);
+        newAlert.addCommand(cmdRemoveIndicator);
+        newAlert.addCommand(cmdValue);
+        newAlert.addCommand(cmdPlaySound);
+        newAlert.addCommand(cmdExit);
+        newAlert.setCommandListener(this);
+
+        Display.getDisplay(parent).setCurrent(newAlert);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        System.out.println("Checking commands...");
+        System.out.println(s.toString());
+        System.out.println(c.getLabel());
+        if (c == cmdNullTitle)
+        {
+            newAlert.setTitle(null);
+        }
+        if (c == cmdShortTitle)
+        {
+            newAlert.setTitle("Short Title");
+        }
+
+        if (c == cmdLongTitle)
+        {
+            newAlert.setTitle("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                              " tempor nisl in quam aliquet eu posuere eros tempor.");
+        }
+
+        if (c == cmdShortString)
+        {
+            System.out.println("Short String Command");
+            newAlert.setString("Short string");
+        }
+        if (c == cmdLongString)
+        {
+            newAlert.setString("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                               " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                               " urna, hendrerit id fringilla eu, feugiat blandit tellus. Curabitur" +
+                               " scelerisque tempus ante, eu convallis ligula ultrices nec.");
+        }
+        if (c == cmdVeryLongString)
+        {
+            newAlert.setString(longString);
+        }
+        if (c == cmdNullString)
+        {
+            newAlert.setString(null);
+        }
+
+        if (c == cmdAlarm)
+        {
+            System.out.println("Setting Alarm...");
+            newAlert.setType(AlertType.ALARM);
+        }
+        if (c == cmdConfirmation)
+        {
+            newAlert.setType(AlertType.CONFIRMATION);
+        }
+        if (c == cmdError)
+        {
+            newAlert.setType(AlertType.ERROR);
+        }
+        if (c == cmdInfo)
+        {
+            newAlert.setType(AlertType.INFO);
+        }
+        if (c == cmdWarning)
+        {
+            newAlert.setType(AlertType.WARNING);
+        }
+        if (c == cmdNullType)
+        {
+            newAlert.setType(null);
+        }
+
+        if (c == cmdPlaySound)
+        {
+            if (newAlert.getType().playSound(Display.getDisplay(parent)))
+                newAlert.setString("playSound() = true");
+            else
+                newAlert.setString("playSound() = false");
+        }
+
+        if (c == cmdSmallImage)
+        {
+            try
+            {
+                image = Image.createImage(ALERT_IMAGES_FILE_NAMES[1]);
+            }
+            catch (java.io.IOException e)
+            {
+            }
+            newAlert.setImage(image);
+        }
+        if (c == cmdBigImage)
+        {
+            try
+            {
+                image = Image.createImage(ALERT_IMAGES_FILE_NAMES[2]);
+            }
+            catch (java.io.IOException e)
+            {
+            }
+            newAlert.setImage(image);
+        }
+        if (c == cmdNullImage)
+        {
+            newAlert.setImage(null);
+        }
+
+        if (c == cmdInvalidImage)
+        {
+            try
+            {
+                image = Image.createImage(ALERT_IMAGES_FILE_NAMES[3]);
+            }
+            catch (java.io.IOException e)
+            {
+            }
+            newAlert.setImage(image);
+        }
+        if (c == cmdAddIndicator)
+            newAlert.setIndicator(indicator);
+        if (c == cmdRemoveIndicator)
+            newAlert.setIndicator(null);
+
+        if (c == cmdValue)
+        {
+            indicator.setValue(indicator.getValue()+1);
+        }
+        if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Alert_05/src/Midp_Alert_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Alert tests.
+ */
+
+public class Midp_Alert_05 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new AlertTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Canvas_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Canvas_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Canvas_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Canvas_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_01/src/CanvasTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+import javax.microedition.lcdui.*;
+import javax.microedition.midlet.*;
+
+/**
+ * This class is to test the below test cases:
+ * -Key codes of standard or default keys
+ * -Key codes of additional keys
+ * -Key codes to game actions mapping
+ *
+ */
+
+public class CanvasTests extends Canvas implements CommandListener
+{
+
+    //reference to MIDlet
+    private Midp_Canvas_01 parent = null;
+    private Command cmdGameActions = new Command("Game actions info", Command.SCREEN, 1);
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private String  keyCode = "KeyCode: None";
+    private String keyName = "KeyName: None";
+    private String gameAction = "GameAction KeyCode: None";
+
+    /**
+     *
+     * @param parent The parent MIDlet
+     */
+    public CanvasTests(Midp_Canvas_01 parent)
+    {
+        this.parent = parent;
+        addCommand(cmdGameActions);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    protected void paint(Graphics g)
+    {
+        g.setGrayScale(255);
+        g.fillRect(0, 0, getWidth(), getHeight());
+        g.setGrayScale(0);
+        int height = g.getFont().getHeight();
+        g.drawString("Canvas key codes test", 0, 0, Graphics.TOP|Graphics.LEFT);
+        g.drawString(keyCode, 0, height, Graphics.TOP|Graphics.LEFT);
+        g.drawString(keyName, 0, height*2, Graphics.TOP|Graphics.LEFT);
+        g.drawString(gameAction, 0, height*4, Graphics.TOP|Graphics.LEFT);
+    }
+
+    protected void keyPressed(int kyCode)
+    {
+        keyCode = "KeyCode: "+ kyCode;
+        keyName = "KeyName: "+getKeyName(kyCode);
+        gameAction = "GameAction KeyCode: " + getGameAction(kyCode);
+        repaint();
+        serviceRepaints();
+    }
+
+    private String getGameActionsInfo()
+    {
+        String info = "Default game\naction mapping:\n" +
+                      "ACTION: code (name)\n" +
+                      "FIRE: " + getActionString(Canvas.FIRE) +
+                      "UP: " + getActionString(Canvas.UP) +
+                      "DOWN: " + getActionString(Canvas.DOWN) +
+                      "LEFT: " + getActionString(Canvas.LEFT) +
+                      "RIGHT: " + getActionString(Canvas.RIGHT) +
+                      "GAME_A: " + getActionString(Canvas.GAME_A) +
+                      "GAME_B: " + getActionString(Canvas.GAME_B) +
+                      "GAME_C: " + getActionString(Canvas.GAME_C) +
+                      "GAME_D: " + getActionString(Canvas.GAME_D);
+        return info;
+    }
+
+    private String getActionString(int action)
+    {
+        return ("" + getKeyCode(action) + " (" + (getGameAction(getKeyCode(action)))+")\n");
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdGameActions)
+        {
+            Form form = new Form("Default key codes Info");
+            form.addCommand(cmdBack);
+            form.setCommandListener(this);
+            form.append(getGameActionsInfo());
+            Display.getDisplay(parent).setCurrent(form);
+        }
+        else if (c == cmdBack)
+        {
+            Display.getDisplay(parent).setCurrent(this);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_01/src/Midp_Canvas_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Canavas tests
+ */
+
+public class Midp_Canvas_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new CanvasTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Canvas_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Canvas_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Canvas_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Canvas_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_02/src/CanvasTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+import javax.microedition.lcdui.*;
+import javax.microedition.midlet.*;
+import java.io.*;
+
+/**
+ * This class is to test the below test cases:
+ *
+ */
+
+public class CanvasTests extends Canvas implements CommandListener
+{
+
+    //reference to MIDlet
+    private Midp_Canvas_02 parent = null;
+    private String info = null;
+    private boolean iToggle = true;
+    private Command cmd = new Command("Repaint", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    /**
+     *
+     * @param parent The parent MIDlet
+     */
+    public CanvasTests(Midp_Canvas_02 parent)
+    {
+        this.parent = parent;
+        addCommand(cmd);
+        addCommand(cmdExit);
+        setCommandListener(this);
+
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    protected void paint(Graphics g)
+    {
+        if (info == "repaint")
+        {
+            g.setGrayScale(100);
+        }
+        else
+        {
+            g.setGrayScale(255);
+        }
+        g.fillRect(0, 0, getWidth(), getHeight());
+        g.setGrayScale(0);
+        info = info +" "+ getWidth()+" "+ getHeight();
+        g.drawString(info , 0, 0, Graphics.TOP|Graphics.LEFT);
+
+    }
+
+    protected void sizeChanged(int w, int h)
+    {
+        info = "sizeChanged called";
+    }
+
+    protected void showNotify()
+    {
+        info = "showNotify called";
+    }
+
+    protected void keyPressed(int keyCode)
+    {
+        if (keyCode == KEY_NUM8)
+        {
+            if (iToggle)
+            {
+                setFullScreenMode(iToggle);
+                iToggle = false;
+            }
+            else if (!iToggle)
+            {
+                setFullScreenMode(iToggle);
+                iToggle = true;
+            }
+        }
+        else if (keyCode == KEY_NUM1)
+        {
+            info = "repaint";
+            repaint(0,0,50,50);
+            serviceRepaints();
+        }
+        else if (keyCode == KEY_NUM3)
+        {
+            info = "repaint";
+            repaint(getWidth()-50,0,50,50);
+            serviceRepaints();
+        }
+        else if (keyCode == KEY_NUM7)
+        {
+            info = "repaint";
+            repaint(0,getHeight()-50,50,50);
+            serviceRepaints();
+        }
+        else if (keyCode == KEY_NUM5)
+        {
+            info = "repaint";
+            repaint((getWidth()/2)-25,(getHeight()/2)-25,50,50);
+            serviceRepaints();
+        }
+        else if (keyCode == KEY_NUM9)
+        {
+            info = "repaint";
+            repaint(getWidth()-50,getHeight()-50,50,50);
+            serviceRepaints();
+        }
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmd)
+        {
+            info = "repaint";
+            repaint(20,20,50,50);
+            serviceRepaints();
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Canvas_02/src/Midp_Canvas_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Canavas tests
+ */
+
+public class Midp_Canvas_02 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new CanvasTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_ChoiceGroup_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_ChoiceGroup_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_ChoiceGroup_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_ChoiceGroup_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/Icon.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/bigImage.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/res/invalid.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/ChoiceGroupTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is called when the Midp_ChoiceGroup_01 MIDlet is launched. It displays
+ * the ChoiceGroup item on this Form and lets the tester to select the type of
+ * ChoiceGroup before invoking the tests.
+ *
+ */
+
+public class ChoiceGroupTests extends Form implements CommandListener
+{
+
+    //reference to parent MIDlet to go to the different screens
+    private static Midp_ChoiceGroup_01 parent=null;
+
+    //the ChoiceGroup, to select the cgType
+    private ChoiceGroup cg = null;
+
+    //the instance of this class
+    private static ChoiceGroupTests instance = null;
+
+    //the cgTypes added to the ChoiceGroup cg
+    private String[] cgTypes = {"Multiple ChoiceGroup", "Exclusive ChoiceGroup", "POPUP ChoiceGroup"};
+
+    //commands to invoke the respective tests
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+    private Command cmdTest2 = new Command("Test2", Command.SCREEN, 1);
+    private Command cmdTest3 = new Command("Test3", Command.SCREEN, 1);
+    private Command cmdTest4 = new Command("Test4", Command.SCREEN, 1);
+    private Command cmdTest5 = new Command("Test5", Command.SCREEN, 1);
+    private Command cmdTest6 = new Command("Test6", Command.SCREEN, 1);
+    private Command cmdTest7 = new Command("Test7", Command.SCREEN, 1);
+    private Command cmdTest8 = new Command("Test8", Command.SCREEN, 1);
+    private Command cmdTest9 = new Command("Test9", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor creates and appends the ChoiceGroup "cg"to this Form,
+     * adds all the test commands and sets the current screen as this Form.
+     *
+     * @param parent the parent MIDlet of this class.
+     */
+    public ChoiceGroupTests(Midp_ChoiceGroup_01 parent)
+    {
+
+        //label as the MIDlet class name
+        super(parent.getClass().getName());
+        this.parent = parent;
+        cg = new ChoiceGroup("Select CG type:", Choice.EXCLUSIVE, cgTypes, null);
+        append(cg);
+        //add commands
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        addCommand(cmdTest3);
+        addCommand(cmdTest4);
+        addCommand(cmdTest5);
+        addCommand(cmdTest6);
+        addCommand(cmdTest7);
+        addCommand(cmdTest8);
+        addCommand(cmdTest9);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //show this screen
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        int type;
+        if (t.equals(cgTypes[0]))
+        {
+            type = ChoiceGroup.MULTIPLE;
+        }
+        else if (t.equals(cgTypes[1]))
+        {
+            type = ChoiceGroup.EXCLUSIVE;
+        }
+        else
+        {
+            type = ChoiceGroup.POPUP;
+        }
+        if (c == cmdTest1)
+            Display.getDisplay(parent).setCurrent(new Test1(type));
+        else if (c== cmdTest2)
+            Display.getDisplay(parent).setCurrent(new Test2(type));
+        else if (c == cmdTest3)
+            Display.getDisplay(parent).setCurrent(new Test3(type));
+        else if (c == cmdTest4)
+            Display.getDisplay(parent).setCurrent(new Test4(type));
+        else if (c == cmdTest5)
+            Display.getDisplay(parent).setCurrent(new Test5(type));
+        else if (c == cmdTest6)
+            Display.getDisplay(parent).setCurrent(new Test6(type));
+        else if (c == cmdTest7)
+            Display.getDisplay(parent).setCurrent(new Test7(type));
+        else if (c == cmdTest8)
+            Display.getDisplay(parent).setCurrent(new Test8(type));
+        else if (c == cmdTest9)
+            Display.getDisplay(parent).setCurrent(new Test9(type));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the images needed to
+ * test ChoiceGroup.
+ *
+ */
+
+public class Images
+{
+
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The big image
+     */
+    public Image bigImage = null;
+
+    /**
+     *  The small image which fits to the layout
+     */
+    public Image smallImage = null;
+
+    /**
+     *  The invalid image
+     */
+    public Image invalidImage = null;
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            bigImage  = Image.createImage("/bigImage.png");
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+        {
+            instance = new Images();
+        }
+        return instance;
+    }
+
+    /**
+     *  Tries to load an image that is invalid
+     *
+     *@return                  The Invalid value
+     *@exception  IOException  Description of Exception
+     */
+    public Image getInvalid() throws IOException
+    {
+        Image invalid = Image.createImage("/invalid.png");
+        return invalid;
+    }
+    //end method
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Midp_ChoiceGroup_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the ChoiceGroup tests.
+ */
+
+public class Midp_ChoiceGroup_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ChoiceGroupTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the below ChoiceGroup test cases:
+ * 1.ChoiceGroup has element with no associated image.
+ * 2.ChoiceGroup has too long element label.
+ * 3.Adding as many elements with same image
+ * 4.ChoiceGroup is empty.
+ */
+
+public class Test1 extends Form implements CommandListener
+{
+
+    //The ChoiceGroup "cg" to test
+    private ChoiceGroup cg = null;
+
+    //The Command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //invoke to add image element to the ChoiceGroup "cg"
+    Command cmdAdd = new Command("Add image", Command.SCREEN, 1);
+
+    //invokes to remeove all elements in the ChoiceGroup "cg"
+    Command cmdRemove = new Command("Remove All", Command.SCREEN, 1);
+
+    //invokes to remeove all elements in the ChoiceGroup "cg"
+    Command cmdSize = new Command("Shown size", Command.SCREEN, 1);
+
+    //the longLabel which is added to ChoiceGroup "cg"
+    private final String longLabel = "This is a very long element label, it should be truncated" +
+                                     " with an ellipsis. This is a very long element label, it" +
+                                     " should be truncated with an ellipsis.";
+
+
+    //the ChoiceGroup "cg" elements
+    private String elements[] = {longLabel, "2nd Element", "3rd Element", "4th Element", "5 Element"};
+
+    /**
+     * This constructor creates ChoiceGroup "cg" with the elements inside and adds Commands to
+     * add and remove elements from the cg.The cg is appended to this form.
+     * Displays the current screen to be this form
+     *
+     * @param cgType The ChoiceGroup type
+     */
+    public Test1(int cgType)
+    {
+        super("Test1");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+
+        cg = new ChoiceGroup(cgLabel, cgType, elements, null);
+        append(cg);
+
+        //add commands
+        addCommand(cmdBack);
+        addCommand(cmdAdd);
+        addCommand(cmdRemove);
+        addCommand(cmdSize);
+
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+        else if (c == cmdAdd)
+            //insert element at the 0 position
+            cg.insert(0, "Inserted1", Images.getInstance().smallImage);
+        else if ((c == cmdRemove) && (cg.size() != 0))
+            cg.deleteAll();
+        else if (c == cmdSize)
+        {
+            //insert element at the 0 position
+            String size = new String("");
+            size = "Font Size: "+ cg.getFont(0).getSize();
+            cg.insert(0, size, null);
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the below ChoiceGroup test cases:
+ * 1.When the ChoiceGroup element image is larger than the layout it fits
+ *
+ */
+
+public class Test2 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    /**
+     * This constructor gets the bigImage from the Images class and appends to this
+     * form.
+     *
+     * @param cgType The ChoiceGroup type
+     */
+    public Test2(int cgType)
+    {
+        super("Test2");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        cg = new ChoiceGroup(cgLabel, cgType);
+        cg.append("Big Image", Images.getInstance().bigImage);
+        addCommand(cmdBack);
+        setCommandListener(this);
+        //append cg to this form
+        append(cg);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the below ChoiceGroup test case:
+ * 1.When the element label is longer than the image.
+ *
+ */
+
+public class Test3 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the longLabel which is added to the ChoiceGroup "cg"
+    private final String longLabel = "This is a very long element label with image." +
+                                     " This is a very long element label with image.";
+
+    /**
+     * This constructor is to create and append the ChoiceGroup  "cg".
+     * The ChoiceGroup contains biglabel element label longer than the bigImage.
+     *
+     * @param cgType The ChoiceGroup type
+     */
+
+    public Test3(int cgType)
+    {
+
+        super("Test3");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        cg = new ChoiceGroup(cgLabel, cgType);
+        cg.append(longLabel, Images.getInstance().smallImage);
+        append(cg);
+
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the below ChoiceGroup test case:
+ * 1.When the element image is invalid
+ *
+ */
+
+public class Test4 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the label
+    private final String longLabel = "This is a very long element label with image." +
+                                     " This is a very long element label with image.";
+    /**
+     * This constructor gets the invalid image from the Images class
+     * and appends to this form.
+     *
+     * @param cgType The ChoiceGroup type
+     */
+    public Test4(int cgType)
+    {
+        super("Test4");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        cg = new ChoiceGroup(cgLabel, cgType);
+        try
+        {
+            cg.append(longLabel, Images.getInstance().getInvalid());
+        }
+        catch (IOException e)
+        {
+            String msg = "Could not load invalid image";
+            cg.append(msg, null);
+        }
+        append(cg);
+
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the below ChoiceGroup test cases:
+ * 1.When it has all elements with an associated image.
+ * 2.When the element images are removed from the list.
+ *
+ */
+
+public class Test5 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the command to remove all the associated images of the elements
+    Command cmdRemove = new Command("Remove All Images", Command.SCREEN, 1);
+
+    //the elements in the ChoiceGroup "cg"
+    String str[] =
+    {
+        "1stElement", "2ndElement", "3rdElement", "4thElement",
+        "5thElement", "6thElement", "7thElement", "8thElement",
+        "9thElement", "10thElement"
+    };
+
+    /**
+    * This constructor creates ChoiceGroup with all elements(with images)inside and
+    * adds a command to remove all the images.The ChoiceGroup is appended to this Form.
+    * Displays the current screen to be this Form.
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test5(int cgType)
+    {
+        super("Test5");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        setCommandListener(this);
+        addCommand(cmdBack);
+        addCommand(cmdRemove);
+
+        cg = new ChoiceGroup(cgLabel, cgType);
+        append(cg);
+
+        //append all elements with associated image
+        addElements();
+    }
+
+    /**
+     * Adds all elements with associated image
+     * to the ChoiceGroup "cg"
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            cg.append(str[i], Images.getInstance().smallImage);
+    } //end of method
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+        if (c == cmdRemove)
+        {
+            int size = cg.size();
+            for (int i=0; i<size; i++)
+            {
+                cg.set(i, cg.getString(i), null);   //sets the image to be null
+            }
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test6.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is to test the below ChoiceGroup test case:
+ * 1.When it has only one element with associated image
+ */
+
+public class Test6 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements which are added to the cg
+    String str[] =
+    {
+        "2ndElement", "3rdElement", "4thElement",
+        "5thElement", "6thElement", "7thElement", "8thElement",
+        "9thElement", "10thElement"
+    };
+
+    /**
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test6(int cgType)
+    {
+
+        super("Test6");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        addCommand(cmdBack);
+        setCommandListener(this);
+        cg = new ChoiceGroup(cgLabel, cgType);
+        append(cg);
+        cg.append("1Element", Images.getInstance().smallImage);
+        //add elements to the ChoiceGroup "cg"
+        addElements();
+    }
+
+    /**
+     * to append elements to the ChoiceGroup "cg"
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 9; i++)
+        {
+            cg.append(str[i], null);
+        }
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test7.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is to test the below ChoiceGroup test case:
+ *1.elements with different fonts
+ *
+ */
+
+public class Test7 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    private ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements which are added to the cg
+    private String str[] =
+    {
+        "2ndElement", "3rdElement", "4thElement",
+        "5thElement", "6thElement", "7thElement", "8thElement",
+        "9thElement", "10thElement"
+    };
+
+    /**
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test7(int cgType)
+    {
+
+        super("Test7");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        addCommand(cmdBack);
+        setCommandListener(this);
+        cg = new ChoiceGroup(cgLabel, cgType);
+        append(cg);
+        cg.append("1stElement", Images.getInstance().smallImage);
+        //add elements to the ChoiceGroup "cg"
+        addElements();
+
+        cg.setFont(0, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
+        cg.setFont(1, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
+        cg.setFont(2, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
+        cg.setFont(3, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD|Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
+
+        cg.setFont(4, Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_UNDERLINED|Font.STYLE_ITALIC, Font.SIZE_SMALL));
+
+        cg.setFont(5, Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
+    }
+
+    /**
+     * to append elements to the ChoiceGroup "cg"
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 9; i++)
+        {
+            cg.append(str[i], null);
+        }
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test8.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This is to test deletion of element with or without icon. Main purpose
+ * is to run this on Popup ChoiceGroup when the list is open.
+ */
+
+public class Test8 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    public ChoiceGroup cg = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Commands for running the tests.
+    Command cmdTest1 = new Command("Test1, 5 sec delay", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test8(int cgType)
+    {
+
+        super("Test8");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        addCommand(cmdBack);
+        addCommand(cmdTest1);
+        setCommandListener(this);
+        cg = new ChoiceGroup(cgLabel, cgType);
+        append(cg);
+        //add two elements with image
+        cg.append("1st Element", Images.getInstance().smallImage);
+        cg.append("2nd Element", Images.getInstance().smallImage);
+        //add two elements without image
+        cg.append("3rd Element", null);
+        cg.append("4th Element", null);
+
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+        else if (c == cmdTest1)
+        {
+            timer.schedule(okTimerTask, 5000, 3000);
+            removeCommand(cmdTest1);
+        }
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count > 4)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                // Delete "1st Element"
+                cg.delete(0);
+                break;
+            case 2:
+                // Delete "3rd Element"
+                cg.delete(1);
+                break;
+            case 3:
+                // Delete "4th Element"
+                cg.delete(1);
+                break;
+            case 4:
+                // Delete "2nd Element"
+                cg.delete(0);
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ChoiceGroup_01/src/Test9.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This is to test appending a choicegroup without label, also test that removing
+ * the icons works ok.
+ */
+
+public class Test9 extends Form implements CommandListener
+{
+
+    //the ChoiceGroup to test
+    public ChoiceGroup cg = null;
+    public ChoiceGroup cg2 = null;
+
+    //the command to go back to the ChoiceGroupTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Commands for running the tests.
+    Command cmdTest1 = new Command("Add without label", Command.SCREEN, 1);
+    Command cmdTest2 = new Command("Remove icons", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test9(int cgType)
+    {
+
+        super("Test9");
+        String cgLabel = null;
+        //set the ChoiceGroup label according to the type of ChoiceGroup "cg"
+        if (cgType == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        addCommand(cmdBack);
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        setCommandListener(this);
+        cg = new ChoiceGroup(cgLabel, cgType);
+        append(cg);
+        appendElements(cg);
+        cg2 = new ChoiceGroup(null, cgType);
+        appendElements(cg2);
+
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+    }
+
+    private void appendElements(ChoiceGroup choicegroup)
+    {
+        //add two elements with image
+        choicegroup.append("1st Element", Images.getInstance().smallImage);
+        choicegroup.append("2nd Element", Images.getInstance().smallImage);
+        //add two elements without image
+        choicegroup.append("3rd Element", null);
+        choicegroup.append("4th Element", null);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ChoiceGroupTests.show();
+        else if (c == cmdTest1)
+        {
+            append(cg2);
+        }
+        else if (c == cmdTest2)
+        {
+            timer.schedule(okTimerTask, 5000, 3000);
+            removeCommand(cmdTest2);
+        }
+    }
+
+    public void removeIcons()
+    {
+        for (int i = 0; i < cg.size(); i++)
+        {
+            if (cg.getImage(i) != null)
+                cg.set(i, "Icon " + (i + 1) + " removed.", null);
+            else
+                cg.set(i, "" + (i + 1) + " had no Icon", null);
+        }
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count > 1)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                removeIcons();
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Command_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Command_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Command_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Command_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Midp_Command_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,125 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This is the main class for the Midp_Command_01 tests.
+ */
+
+public class Midp_Command_01 extends MIDlet implements CommandListener
+{
+
+    //reference to the parent MIDlet to go to the different screens
+    private static Midp_Command_01 instance = null;
+    Display display = null;
+    List listTests = null;
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private String[] tests = {"Test1", "Test2", "Test3", "Test4", "Test5", "Test6", "Test7", "Test8"};
+
+    public Midp_Command_01()
+    {
+        instance = this;
+        display = Display.getDisplay(this);
+        listTests = new List("Command Tests", List.IMPLICIT, tests, null);
+        listTests.addCommand(cmdExit);
+        listTests.setCommandListener(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    public void startApp()
+    {
+        display.setCurrent(listTests);
+    }
+
+    public Displayable getTestObject(String classString)
+    {
+        String testClassString = classString;
+        String exceptionText = "";
+        try
+        {
+            return (Displayable) Class.forName(testClassString).newInstance();
+        }
+        catch (ClassNotFoundException e)
+        {
+            exceptionText = "Test not available: " + testClassString;
+            return new Alert(null, exceptionText, null, null);
+        }
+        catch (IllegalAccessException e)
+        {
+            exceptionText = "IllegalAccessException:\n" + testClassString;
+            return new Alert("Error", exceptionText, null, null);
+        }
+        catch (InstantiationException e)
+        {
+            exceptionText = "InstantiationException:\n" + testClassString;
+            return new Alert("Error", exceptionText, null, null);
+        }
+    }
+
+    public void commandAction(Command c, Displayable d)
+    {
+        int pos = listTests.getSelectedIndex();
+        if (c == List.SELECT_COMMAND)
+        {
+            if (pos < 0 || pos > tests.length) return;
+            display.setCurrent(getTestObject(tests[pos]));
+        }
+        else if (c == cmdExit)
+        {
+            destroyApp(false);
+            notifyDestroyed();
+        }
+    }
+
+    public static Display getDisplay()
+    {
+        return instance.display;
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+
+    /**
+    * This method returns us to the initial list screen.
+    */
+    public static void goBack()
+    {
+        instance.startApp();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+
+
+public class Test1 extends Form implements CommandListener
+{
+
+    //StringItem to show the label of the Command
+    private StringItem str = null;
+
+    //the Commands
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdScreen = new Command("Screen", Command.SCREEN, 1);
+    private Command cmdItem = new Command("Item_With_Very_Long_Label", Command.ITEM, 1);
+    private Command cmdCancel = new Command("Cancel", Command.CANCEL, 1);
+    private Command cmdBack = new Command("Back_With_Very_Long_Label", Command.BACK, 1);
+    private Command cmdStop = new Command("Stop", Command.STOP, 1);
+    private Command cmdHelp = new Command("Help", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test1()
+    {
+        super("Test1");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Command:", null);
+        addCommand(cmdExit);
+        append(str);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            timer.schedule(okTimerTask, 2000, 3000);
+            str.setText(c.getLabel());
+        }
+        else if (c == cmdReturn)
+        {
+            Midp_Command_01.goBack();
+        }
+        str.setText(c.getLabel());
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                removeCommand(cmdExit);
+                addCommand(cmdOk);
+                break;
+            case 2:
+                removeCommand(cmdOk);
+                addCommand(cmdScreen);
+                break;
+            case 3:
+                removeCommand(cmdScreen);
+                addCommand(cmdItem);
+                break;
+            case 4:
+                removeCommand(cmdItem);
+                addCommand(cmdCancel);
+                break;
+            case 5:
+                removeCommand(cmdCancel);
+                addCommand(cmdBack);
+                break;
+            case 6:
+                removeCommand(cmdBack);
+                addCommand(cmdStop);
+                break;
+            case 7:
+                removeCommand(cmdStop);
+                addCommand(cmdHelp);
+                addCommand(cmdReturn);
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+
+/**
+ *
+ */
+public class Test2 extends Form implements CommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //the Commands
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdScreen = new Command("Screen", Command.SCREEN, 1);
+    private Command cmdItem = new Command("Item_with_very_long_Label", Command.ITEM, 1);
+    private Command cmdCancel = new Command("Cancel", Command.CANCEL, 1);
+    private Command cmdBackLong = new Command("Back_with_very_long_Label", Command.BACK, 1);
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+    private Command cmdStop = new Command("Stop", Command.STOP, 1);
+    private Command cmdStopLong = new Command("Stop_with_very_long_Label", Command.STOP, 1);
+    private Command cmdHelp = new Command("Help", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test2()
+    {
+        super("Test2");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Result:", "-SK: truncated Back_with_very_long_label");
+        append(str);
+        addCommand(cmdBackLong);
+
+        timer.schedule(okTimerTask, 2000, 6000);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 11)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                removeCommand(cmdBackLong);
+                addCommand(cmdBack);
+                addCommand(cmdCancel);
+                str.setText("-SK: Cancel\n"+"+SK: Back");
+                break;
+            case 2:
+                removeCommand(cmdCancel);
+                addCommand(cmdStop);
+                str.setText("-SK: Stop\n"+"+SK: Back");
+                break;
+            case 3:
+                removeCommand(cmdStop);
+                addCommand(cmdExit);
+                str.setText("-SK: Back\n"+"+SK: Exit");
+                break;
+            case 4:
+                addCommand(cmdStopLong);
+                addCommand(cmdCancel);
+                str.setText("-SK: truncated Stop_with_very_long_label\n"+"+SK: Options menu commands\n"+"Cancel,Back and Exit");
+                break;
+            case 5:
+                removeCommand(cmdStopLong);
+                removeCommand(cmdBack);
+                removeCommand(cmdExit);
+                removeCommand(cmdStopLong);
+                str.setText("-SK: Cancel");
+                break;
+            case 6:
+                addCommand(cmdStop);
+                str.setText("-SK: Stop\n"+"+SK: Cancel");
+                break;
+            case 7:
+                removeCommand(cmdStop);
+                addCommand(cmdExit);
+                str.setText("-SK: Cancel\n"+"+SK: Exit");
+                break;
+            case 8:
+                addCommand(cmdStop);
+                str.setText("-SK: Stop\n"+"+SK: Options menu commands\n"+"Cancel and Exit");
+                break;
+            case 9:
+                removeCommand(cmdCancel);
+                removeCommand(cmdExit);
+                str.setText("-SK: Stop");
+                break;
+            case 10:
+                addCommand(cmdExit);
+                str.setText("-SK: Stop\n"+"+SK: Exit");
+                break;
+            case 11:
+                removeCommand(cmdStop);
+                addCommand(cmdReturn);
+                str.setText("-SK: Exit");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Commands with same type and same priority
+ *
+ */
+
+public class Test3 extends Form implements CommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //the Commands with same type
+    private Command cmdOk1 = new Command("Ok1", Command.OK, 1);
+    private Command cmdOk2 = new Command("Ok2", Command.OK, 1);
+
+
+    private Command cmdScreen1 = new Command("Screen1", Command.SCREEN, 1);
+    private Command cmdScreen2 = new Command("Screen2", Command.SCREEN, 1);
+
+    private Command cmdItem1 = new Command("Item1", Command.ITEM, 1);
+    private Command cmdItem2 = new Command("Item2", Command.ITEM, 1);
+
+    private Command cmdCancel1 = new Command("Cancel1", Command.CANCEL, 1);
+    private Command cmdCancel2 = new Command("Cancel2", Command.CANCEL, 1);
+
+    private Command cmdBack1 = new Command("Back1", Command.BACK, 1);
+    private Command cmdBack2 = new Command("Back2", Command.BACK, 1);
+
+    private Command cmdStop1 = new Command("Stop1", Command.STOP, 1);
+    private Command cmdStop2 = new Command("Stop2", Command.STOP, 1);
+
+    private Command cmdHelp1 = new Command("Help1", Command.HELP, 1);
+    private Command cmdHelp2 = new Command("Help2", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test3()
+    {
+        super("Test3");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Result:", "None");
+        append(str);
+        timer.schedule(okTimerTask, 2000, 6000);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                addCommand(cmdOk1);
+                addCommand(cmdOk2);
+                str.setText("Ok1 and Ok2 in this order on Options list");
+                break;
+            case 2:
+                removeCommand(cmdOk1);
+                removeCommand(cmdOk2);
+                addCommand(cmdScreen1);
+                addCommand(cmdScreen2);
+                str.setText("Screen1 and Screen2 in this order on Options list");
+                break;
+            case 3:
+                removeCommand(cmdScreen1);
+                removeCommand(cmdScreen2);
+                addCommand(cmdItem1);
+                addCommand(cmdItem2);
+                str.setText("Item1 and Item2 in this order on Options list");
+                break;
+            case 4:
+                removeCommand(cmdItem1);
+                removeCommand(cmdItem2);
+                addCommand(cmdCancel1);
+                addCommand(cmdCancel2);
+                str.setText("Cancel1 on right soft key and Cancel2 on Options list");
+                break;
+            case 5:
+                removeCommand(cmdCancel1);
+                removeCommand(cmdCancel2);
+                addCommand(cmdBack1);
+                addCommand(cmdBack2);
+                str.setText("Back1 on right soft key and Back2 on Options list");
+                break;
+            case 6:
+                removeCommand(cmdBack1);
+                removeCommand(cmdBack2);
+                addCommand(cmdStop1);
+                addCommand(cmdStop2);
+                str.setText("Stop1 on right soft key and Stop2 on Options list");
+                break;
+            case 7:
+                removeCommand(cmdStop1);
+                removeCommand(cmdStop2);
+                addCommand(cmdHelp1);
+                addCommand(cmdHelp2);
+                str.setText("Help1 and Help2 in this order on Options list");
+                break;
+            case 8:
+                removeCommand(cmdHelp1);
+                removeCommand(cmdHelp2);
+                addCommand(cmdReturn);
+                str.setText("Choose Options->Return to go to the begining");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Same Commands with different priority
+ */
+
+public class Test4 extends Form implements CommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //same Commands with different type
+    private Command cmdOk1 = new Command("Ok1", Command.OK, 10);
+    private Command cmdOk2 = new Command("Ok2", Command.OK, 5);
+
+
+    private Command cmdScreen1 = new Command("Screen1", Command.SCREEN, 10);
+    private Command cmdScreen2 = new Command("Screen2", Command.SCREEN, 5);
+
+    private Command cmdItem1 = new Command("Item1", Command.ITEM, 10);
+    private Command cmdItem2 = new Command("Item2", Command.ITEM, 5);
+
+    private Command cmdCancel1 = new Command("Cancel1", Command.CANCEL, 10);
+    private Command cmdCancel2 = new Command("Cancel2", Command.CANCEL, 5);
+
+    private Command cmdBack1 = new Command("Back1", Command.BACK, 10);
+    private Command cmdBack2 = new Command("Back2", Command.BACK, 5);
+
+    private Command cmdStop1 = new Command("Stop1", Command.STOP, 10);
+    private Command cmdStop2 = new Command("Stop2", Command.STOP, 5);
+
+    private Command cmdHelp1 = new Command("Help1", Command.HELP, 10);
+    private Command cmdHelp2 = new Command("Help2", Command.HELP, 5);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test4()
+    {
+        super("Test4");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Result:", "None");
+        append(str);
+        timer.schedule(okTimerTask, 2000, 6000);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                addCommand(cmdOk1);
+                addCommand(cmdOk2);
+                str.setText("Ok2 and Ok1 in this order on Options list");
+                break;
+            case 2:
+                removeCommand(cmdOk1);
+                removeCommand(cmdOk2);
+                addCommand(cmdScreen1);
+                addCommand(cmdScreen2);
+                str.setText("Screen2 and Screen1 in this order on Options list");
+                break;
+            case 3:
+                removeCommand(cmdScreen1);
+                removeCommand(cmdScreen2);
+                addCommand(cmdItem1);
+                addCommand(cmdItem2);
+                str.setText("Item2 and Item1 in this order on Options list");
+                break;
+            case 4:
+                removeCommand(cmdItem1);
+                removeCommand(cmdItem2);
+                addCommand(cmdCancel1);
+                addCommand(cmdCancel2);
+                str.setText("Cancel2 on right soft key and Cancel1 on Options list");
+                break;
+            case 5:
+                removeCommand(cmdCancel1);
+                removeCommand(cmdCancel2);
+                addCommand(cmdBack1);
+                addCommand(cmdBack2);
+                str.setText("Back2 on right soft key and Back1 on Options list");
+                break;
+            case 6:
+                removeCommand(cmdBack1);
+                removeCommand(cmdBack2);
+                addCommand(cmdStop1);
+                addCommand(cmdStop2);
+                str.setText("Stop2 on right soft key and Stop1 on Options list");
+                break;
+            case 7:
+                removeCommand(cmdStop1);
+                removeCommand(cmdStop2);
+                addCommand(cmdHelp1);
+                addCommand(cmdHelp2);
+                str.setText("Help2 and Help1 in this order on Options list");
+                break;
+            case 8:
+                removeCommand(cmdHelp1);
+                removeCommand(cmdHelp2);
+                addCommand(cmdReturn);
+                str.setText("Choose Options->Return to go to the begining");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Screen:If Command label is empty default label is used
+ */
+
+public class Test5 extends Form implements CommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //Commands with null label
+    private Command cmdOk = new Command("", Command.OK, 1);
+
+    private Command cmdScreen = new Command("", Command.SCREEN, 1);
+
+    private Command cmdItem = new Command("", Command.ITEM, 1);
+
+    private Command cmdCancel = new Command("", Command.CANCEL, 1);
+
+    private Command cmdBack = new Command("", Command.BACK, 1);
+
+    private Command cmdStop = new Command("", Command.STOP, 1);
+
+    private Command cmdHelp = new Command("", Command.HELP, 1);
+
+    private Command cmdExit = new Command("", Command.EXIT, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test5()
+    {
+        super("Test5");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Result:", "None");
+        append(str);
+        timer.schedule(okTimerTask, 2000, 6000);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 9)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                addCommand(cmdOk);
+                str.setText("Options list has the default label for Command type OK");
+                break;
+            case 2:
+                removeCommand(cmdOk);
+                addCommand(cmdScreen);
+                str.setText("Options list has the default label for Command type SCREEN");
+                break;
+            case 3:
+                removeCommand(cmdScreen);
+                addCommand(cmdItem);
+                str.setText("Options list has the default label for Command type ITEM");
+                break;
+            case 4:
+                removeCommand(cmdItem);
+                addCommand(cmdCancel);
+                str.setText("RSK has the default label for Command type CANCEL");
+                break;
+            case 5:
+                removeCommand(cmdCancel);
+                addCommand(cmdBack);
+                str.setText("RSK has the default label for Command type BACK");
+                break;
+            case 6:
+                removeCommand(cmdBack);
+                addCommand(cmdStop);
+                str.setText("RSK has the default label for Command type STOP");
+                break;
+            case 7:
+                removeCommand(cmdStop);
+                addCommand(cmdHelp);
+                str.setText("Options list has the default label for Command type HELP");
+                break;
+            case 8:
+                removeCommand(cmdHelp);
+                addCommand(cmdExit);
+                str.setText("RSK has the default label for Command type EXIT");
+                break;
+            case 9:
+                removeCommand(cmdExit);
+                addCommand(cmdReturn);
+                str.setText("Choose Options->Return to go to the begining");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test6.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Screen:Commands with long and short labels
+ */
+
+public class Test6 extends Form implements CommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //Commands with null label
+    private Command cmdOk = new Command("Ok", "Ok label", Command.OK, 1);
+
+    private Command cmdScreen = new Command("Screen", "Screen with long label", Command.SCREEN, 1);
+
+    private Command cmdItem = new Command("Item", "Item with long label", Command.ITEM, 1);
+
+    private Command cmdCancel = new Command("Cancel", "Cancel with very long label", Command.CANCEL, 1);
+
+    private Command cmdBack = new Command("Back", "Back with very long label", Command.BACK, 1);
+
+    private Command cmdStop = new Command("Stop", "Stop with very long label", Command.STOP, 1);
+
+    private Command cmdHelp = new Command("Help", "Help with long label", Command.HELP, 1);
+
+    private Command cmdExit = new Command("Exit", "Exit with very long label", Command.EXIT, 1);
+
+    private Command cmdExtra = new Command("Extra", "Extra command for Options menu", Command.SCREEN,1);
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    /**
+     *
+     */
+    public Test6()
+    {
+        super("Test6");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem("Result:", "None");
+        append(str);
+        addCommand(cmdExit);
+        addCommand(cmdExtra);
+        timer.schedule(okTimerTask, 2000, 6000);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 9)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                addCommand(cmdOk);
+                str.setText("The label of Command in OPTIONS MENU: " + " "+ cmdOk.getLongLabel());
+                break;
+            case 2:
+                removeCommand(cmdOk);
+                addCommand(cmdScreen);
+                str.setText("The label of Command in OPTIONS MENU: " + " "+ cmdScreen.getLongLabel());
+                break;
+            case 3:
+                removeCommand(cmdScreen);
+                addCommand(cmdItem);
+                str.setText("The label of Command in OPTIONS MENU: " + " "+ cmdItem.getLongLabel());
+                break;
+            case 4:
+                removeCommand(cmdItem);
+                addCommand(cmdCancel);
+                str.setText("The label of Command is " + " "+ cmdCancel.getLabel());
+                break;
+            case 5:
+                removeCommand(cmdCancel);
+                addCommand(cmdBack);
+                str.setText("The label of Command is " + " "+ cmdBack.getLabel());
+                break;
+            case 6:
+                removeCommand(cmdBack);
+                addCommand(cmdStop);
+                str.setText("The label of Command is " + " "+ cmdStop.getLabel());
+                break;
+            case 7:
+                removeCommand(cmdStop);
+                addCommand(cmdHelp);
+                str.setText("The label of Command in OPTIONS MENU: " + " "+ cmdHelp.getLongLabel());
+                break;
+            case 8:
+                removeCommand(cmdHelp);
+                addCommand(cmdExit);
+                str.setText("The label of Command is " + " "+ cmdExit.getLabel());
+                break;
+            case 9:
+                removeCommand(cmdExit);
+                addCommand(cmdReturn);
+                str.setText("Choose Options->Return to go to the begining");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test7.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Screen:Command mapping to context sensitive options menu
+ *
+ */
+
+public class Test7 extends Form implements CommandListener, ItemCommandListener
+{
+
+    //the StringItem to show the result of each test case
+    private StringItem str = null;
+
+    //Commands
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    private Command cmdItem = new Command("Item", Command.ITEM, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    //command to go back to the previous screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //TextField to show ITEM command is called
+    private TextField tf = null;
+
+    //dummy Form to test OK command is called
+    private Form dummyForm = null;
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    public Test7()
+    {
+        super("Test7");
+        timer = new Timer();
+        okTimerTask = new CommandOkTimerTask();
+        str = new StringItem(null, "Context sensitive options menu and Options menu contains" + " "+
+                             cmdOk.getLabel()+ ". " + "\n Press selection key to activate Ok command.");
+        append(str);
+        addCommand(cmdOk);
+        setCommandListener(this);
+        dummyForm = new Form("Dummy Form");
+        tf = new TextField("Dummy", null, 50, TextField.ANY);
+        dummyForm.append(tf);
+        dummyForm.addCommand(cmdBack);
+        dummyForm.setCommandListener(this);
+        tf.addCommand(cmdItem);
+        tf.setItemCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_01.goBack();
+        else if (c == cmdOk)
+            Midp_Command_01.getDisplay().setCurrent(dummyForm);
+        else if (c == cmdBack)
+        {
+            Midp_Command_01.getDisplay().setCurrent(this);
+            timer.schedule(okTimerTask, 2000, 6000);
+        }
+    }
+
+    public void commandAction(Command c , Item i)
+    {
+        if (c == cmdItem)
+            tf.setString("Item Command is called");
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 3)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                addCommand(cmdOk);
+                addCommand(cmdItem);
+                str.setText("Context sensitive options menu and Options menu contains" + " " + "commands " +
+                            "in the order: "+cmdOk.getLabel() + " "+ "and" + " "+cmdItem.getLabel());
+                break;
+            case 2:
+                removeCommand(cmdItem);
+                removeCommand(cmdOk);
+                str.setText("Commands are removed");
+                break;
+            case 3:
+                addCommand(cmdReturn);
+                str.setText("Choose Options->Return to go to the begining");
+                break;
+            default:
+                return;
+            }
+            count++;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_01/src/Test8.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ */
+
+public class Test8 extends Form implements CommandListener
+{
+
+    //StringItem to show the label of the Command
+    private StringItem str = null;
+
+    //the Commands
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    /**
+     *
+     */
+    public Test8()
+    {
+        super("Test8");
+        append("There is EXIT_COMMAND in RSK and Return in Options");
+        addCommand(cmdExit);
+        addCommand(cmdReturn);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            Midp_Command_01.goBack();
+        }
+        else if (c == cmdReturn)
+        {
+            Midp_Command_01.goBack();
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Command_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Command_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Command_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Command_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Midp_Command_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This is the main class for the Midp_Command_02 tests.
+ */
+
+public class Midp_Command_02 extends MIDlet implements CommandListener
+{
+
+    //reference to the parent MIDlet to go to the different screens
+    private static Midp_Command_02 instance = null;
+    Display display = null;
+    List listTests = null;
+
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private String[] tests = {"Test1", "Test2", "Test3", "Test4", "Test5", "Test6", "Test7"};
+
+    public Midp_Command_02()
+    {
+        instance = this;
+        display = Display.getDisplay(this);
+        listTests = new List("Command Tests", List.IMPLICIT, tests, null);
+        listTests.addCommand(cmdOk);
+        listTests.addCommand(cmdExit);
+        listTests.setCommandListener(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    public void startApp()
+    {
+        display.setCurrent(listTests);
+    }
+
+    public void commandAction(Command c, Displayable d)
+    {
+        int pos = listTests.getSelectedIndex();
+        String element = listTests.getString(pos);
+        if (c == cmdOk || c == List.SELECT_COMMAND)
+        {
+            if (element.equals(tests[0]))
+                new Test1();
+            else if (element.equals(tests[1]))
+                new Test2();
+            else if (element.equals(tests[2]))
+                new Test3();
+            else if (element.equals(tests[3]))
+                new Test4();
+            else if (element.equals(tests[4]))
+                new Test5();
+            else if (element.equals(tests[5]))
+                new Test6();
+            else if (element.equals(tests[6]))
+                new Test7();
+        }
+        else if (c == cmdExit)
+        {
+            destroyApp(false);
+            notifyDestroyed();
+        }
+    }
+
+    public static Display getDisplay()
+    {
+        return instance.display;
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+
+    /**
+    * This method returns us to the initial list screen.
+    */
+    public static void goBack()
+    {
+        instance.startApp();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+
+/**
+ *
+ */
+public class Test1 implements CommandListener
+{
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdScreen = new Command("Screen", Command.SCREEN, 1);
+    private Command cmdItem = new Command("Item_With_Very_Long_Label", Command.ITEM, 1);
+    private Command cmdCancel = new Command("Cancel", Command.CANCEL, 1);
+    private Command cmdBack = new Command("Back_With_Very_Long_Label", Command.BACK, 1);
+    private Command cmdStop = new Command("Stop", Command.STOP, 1);
+    private Command cmdHelp = new Command("Help", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    private TestCanvas testCanvas = null;
+    int width, height;
+
+    public String commandDisplay1 = null;
+    public String commandDisplay2 = null;
+
+    /**
+     * This constructor creates cg with the elements inside and adds Commands to
+     * add and remove elements from the cg.The cg is appended to this form.
+     * Displays the current screen to be this form
+     */
+    public Test1()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        okTimerTask = new CommandOkTimerTask();
+        testCanvas.addCommand(cmdExit);
+        testCanvas.setCommandListener(this);
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+        commandDisplay1 = new String("Midp_Command_02 MIDlet");
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            timer.schedule(okTimerTask, 2000, 3000);
+            commandDisplay1 = new String("Command: ");
+            commandDisplay2 = new String(c.getLabel());
+            testCanvas.repaint();
+        }
+        if (c == cmdReturn)
+        {
+            Midp_Command_02.goBack();
+        }
+        else
+        {
+            commandDisplay1 = new String("Command: ");
+            commandDisplay2 = new String(c.getLabel());
+            testCanvas.repaint();
+        }
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.removeCommand(cmdExit);
+                testCanvas.addCommand(cmdOk);
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdOk);
+                testCanvas.addCommand(cmdScreen);
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdScreen);
+                testCanvas.addCommand(cmdItem);
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdItem);
+                testCanvas.addCommand(cmdCancel);
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdCancel);
+                testCanvas.addCommand(cmdBack);
+                break;
+            case 6:
+                testCanvas.removeCommand(cmdBack);
+                testCanvas.addCommand(cmdStop);
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdHelp);
+                testCanvas.addCommand(cmdReturn);
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+            g.drawString(commandDisplay1, 0, 20, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 10, 40, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+
+/**
+ *
+ */
+public class Test2 implements CommandListener
+{
+
+    //the Commands
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdScreen = new Command("Screen", Command.SCREEN, 1);
+    private Command cmdItem = new Command("Item_with_very_long_Label", Command.ITEM, 1);
+    private Command cmdCancel = new Command("Cancel", Command.CANCEL, 1);
+    private Command cmdBackLong = new Command("Back_with_very_long_Label", Command.BACK, 1);
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+    private Command cmdStop = new Command("Stop", Command.STOP, 1);
+    private Command cmdStopLong = new Command("Stop_with_very_long_Label", Command.STOP, 1);
+    private Command cmdHelp = new Command("Help", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    private TestCanvas testCanvas = null;
+
+    Timer timer;
+
+    private CommandOkTimerTask okTimerTask;
+
+    private String commandDisplay1 = null;
+    private String commandDisplay2 = null;
+    private String commandDisplay3 = null;
+    /**
+     *
+     */
+    public Test2()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        okTimerTask = new CommandOkTimerTask();
+        commandDisplay1 = new String("Result: ");
+        commandDisplay2 = new String("-SK: truncated Back_with_very_long_label");
+        commandDisplay3 = new String("");
+        testCanvas.addCommand(cmdBackLong);
+
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        timer.schedule(okTimerTask, 2000, 6000);
+        testCanvas.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_02.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 11)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.removeCommand(cmdBackLong);
+                testCanvas.addCommand(cmdBack);
+                testCanvas.addCommand(cmdCancel);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Cancel");
+                commandDisplay3 = new String("+SK: Back");
+                testCanvas.repaint();
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdCancel);
+                testCanvas.addCommand(cmdStop);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Stop");
+                commandDisplay3 = new String("+SK: Back");
+                testCanvas.repaint();
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdExit);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Back");
+                commandDisplay3 = new String("+SK: Exit");
+                testCanvas.repaint();
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdStopLong);
+                testCanvas.addCommand(cmdCancel);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: truncated Stop_with_very_long_label");
+                commandDisplay3 = new String("+SK: Options: Cancel, Back, Exit");
+                testCanvas.repaint();
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdStopLong);
+                testCanvas.removeCommand(cmdBack);
+                testCanvas.removeCommand(cmdExit);
+                testCanvas.removeCommand(cmdStopLong);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Cancel");
+                commandDisplay3 = new String("");
+                testCanvas.repaint();
+                break;
+            case 6:
+                testCanvas.addCommand(cmdStop);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Stop");
+                commandDisplay3 = new String("+SK: Cancel");
+                testCanvas.repaint();
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdExit);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Cancel");
+                commandDisplay3 = new String("+SK: Exit");
+                testCanvas.repaint();
+                break;
+            case 8:
+                testCanvas.addCommand(cmdStop);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Stop");
+                commandDisplay3 = new String("+SK: Options: Cancel, Exit");
+                testCanvas.repaint();
+                break;
+            case 9:
+                testCanvas.removeCommand(cmdCancel);
+                testCanvas.removeCommand(cmdExit);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Stop");
+                commandDisplay3 = new String("");
+                testCanvas.repaint();
+                break;
+            case 10:
+                testCanvas.addCommand(cmdExit);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Stop");
+                commandDisplay3 = new String("+SK: Exit");
+                testCanvas.repaint();
+                break;
+            case 11:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdReturn);
+                commandDisplay1 = new String("Result: ");
+                commandDisplay2 = new String("-SK: Exit");
+                commandDisplay3 = new String("");
+                testCanvas.repaint();
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        int width, height;
+
+        public TestCanvas()
+        {
+            width = this.getWidth();
+            height = this.getHeight();
+        }
+
+        protected void sizeChanged(int w,int h)
+        {
+            this.width = w;
+            this.height = h;
+        }
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+
+            g.drawString(commandDisplay1, 10, 15, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 10, 35, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay3, 10, 55, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Commands with same type and same priority
+ */
+
+public class Test3 implements CommandListener
+{
+
+    //the Commands with same type
+    private Command cmdOk1 = new Command("Ok1", Command.OK, 1);
+    private Command cmdOk2 = new Command("Ok2", Command.OK, 1);
+
+
+    private Command cmdScreen1 = new Command("Screen1", Command.SCREEN, 1);
+    private Command cmdScreen2 = new Command("Screen2", Command.SCREEN, 1);
+
+    private Command cmdItem1 = new Command("Item1", Command.ITEM, 1);
+    private Command cmdItem2 = new Command("Item2", Command.ITEM, 1);
+
+    private Command cmdCancel1 = new Command("Cancel1", Command.CANCEL, 1);
+    private Command cmdCancel2 = new Command("Cancel2", Command.CANCEL, 1);
+
+    private Command cmdBack1 = new Command("Back1", Command.BACK, 1);
+    private Command cmdBack2 = new Command("Back2", Command.BACK, 1);
+
+    private Command cmdStop1 = new Command("Stop1", Command.STOP, 1);
+    private Command cmdStop2 = new Command("Stop2", Command.STOP, 1);
+
+    private Command cmdHelp1 = new Command("Help1", Command.HELP, 1);
+    private Command cmdHelp2 = new Command("Help2", Command.HELP, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    private TestCanvas testCanvas;
+
+    private String commandDisplay1;
+    private String commandDisplay2;
+    int width, height;
+
+    /**
+     *
+     */
+    public Test3()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        okTimerTask = new CommandOkTimerTask();
+        commandDisplay1 = new String("Result: None");
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+        timer.schedule(okTimerTask, 2000, 6000);
+        testCanvas.repaint();
+        testCanvas.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_02.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.addCommand(cmdOk1);
+                testCanvas.addCommand(cmdOk2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Ok1, Ok2");
+                testCanvas.repaint();
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdOk1);
+                testCanvas.removeCommand(cmdOk2);
+                testCanvas.addCommand(cmdScreen1);
+                testCanvas.addCommand(cmdScreen2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Screen1, Screen2");
+                testCanvas.repaint();
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdScreen1);
+                testCanvas.removeCommand(cmdScreen2);
+                testCanvas.addCommand(cmdItem1);
+                testCanvas.addCommand(cmdItem2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Item1, Item2");
+                testCanvas.repaint();
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdItem1);
+                testCanvas.removeCommand(cmdItem2);
+                testCanvas.addCommand(cmdCancel1);
+                testCanvas.addCommand(cmdCancel2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Cancel2, RSK: Cancel1");
+                testCanvas.repaint();
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdCancel1);
+                testCanvas.removeCommand(cmdCancel2);
+                testCanvas.addCommand(cmdBack1);
+                testCanvas.addCommand(cmdBack2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Back2, RSK: Back1");
+                testCanvas.repaint();
+                break;
+            case 6:
+                testCanvas.removeCommand(cmdBack1);
+                testCanvas.removeCommand(cmdBack2);
+                testCanvas.addCommand(cmdStop1);
+                testCanvas.addCommand(cmdStop2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Stop2, RSK: Stop1");
+                testCanvas.repaint();
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop1);
+                testCanvas.removeCommand(cmdStop2);
+                testCanvas.addCommand(cmdHelp1);
+                testCanvas.addCommand(cmdHelp2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Help1, Help2");
+                testCanvas.repaint();
+                break;
+            case 8:
+                testCanvas.removeCommand(cmdHelp1);
+                testCanvas.removeCommand(cmdHelp2);
+                testCanvas.addCommand(cmdReturn);
+                commandDisplay1 = new String("");
+                commandDisplay2 = new String("Choose Options->Return");
+                testCanvas.repaint();
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+
+            g.drawString(commandDisplay1, 0, 5, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 7, 20, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,201 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Same Commands with different priority
+ */
+
+public class Test4 implements CommandListener
+{
+
+    //same Commands with different type
+    private Command cmdOk1 = new Command("Ok1", Command.OK, 10);
+    private Command cmdOk2 = new Command("Ok2", Command.OK, 5);
+
+
+    private Command cmdScreen1 = new Command("Screen1", Command.SCREEN, 10);
+    private Command cmdScreen2 = new Command("Screen2", Command.SCREEN, 5);
+
+    private Command cmdItem1 = new Command("Item1", Command.ITEM, 10);
+    private Command cmdItem2 = new Command("Item2", Command.ITEM, 5);
+
+    private Command cmdCancel1 = new Command("Cancel1", Command.CANCEL, 10);
+    private Command cmdCancel2 = new Command("Cancel2", Command.CANCEL, 5);
+
+    private Command cmdBack1 = new Command("Back1", Command.BACK, 10);
+    private Command cmdBack2 = new Command("Back2", Command.BACK, 5);
+
+    private Command cmdStop1 = new Command("Stop1", Command.STOP, 10);
+    private Command cmdStop2 = new Command("Stop2", Command.STOP, 5);
+
+    private Command cmdHelp1 = new Command("Help1", Command.HELP, 10);
+    private Command cmdHelp2 = new Command("Help2", Command.HELP, 5);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+
+    private TestCanvas testCanvas;
+
+    private String commandDisplay1 = null;
+    private String commandDisplay2 = null;
+    int width, height;
+
+    /**
+     *
+     */
+    public Test4()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        okTimerTask = new CommandOkTimerTask();
+        commandDisplay1 = new String("Result: None");
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+        timer.schedule(okTimerTask, 2000, 6000);
+        testCanvas.setCommandListener(this);
+        testCanvas.repaint();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_02.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 8)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.addCommand(cmdOk1);
+                testCanvas.addCommand(cmdOk2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Ok2, Ok1");
+                testCanvas.repaint();
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdOk1);
+                testCanvas.removeCommand(cmdOk2);
+                testCanvas.addCommand(cmdScreen1);
+                testCanvas.addCommand(cmdScreen2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Screen2, Screen1");
+                testCanvas.repaint();
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdScreen1);
+                testCanvas.removeCommand(cmdScreen2);
+                testCanvas.addCommand(cmdItem1);
+                testCanvas.addCommand(cmdItem2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Item2, Item1");
+                testCanvas.repaint();
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdItem1);
+                testCanvas.removeCommand(cmdItem2);
+                testCanvas.addCommand(cmdCancel1);
+                testCanvas.addCommand(cmdCancel2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Cancel1, RSK: Cancel2");
+                testCanvas.repaint();
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdCancel1);
+                testCanvas.removeCommand(cmdCancel2);
+                testCanvas.addCommand(cmdBack1);
+                testCanvas.addCommand(cmdBack2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Back1, RSK: Back2");
+                testCanvas.repaint();
+                break;
+            case 6:
+                testCanvas.removeCommand(cmdBack1);
+                testCanvas.removeCommand(cmdBack2);
+                testCanvas.addCommand(cmdStop1);
+                testCanvas.addCommand(cmdStop2);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("Options list: Stop1, RSK: Stop2");
+                testCanvas.repaint();
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop1);
+                testCanvas.removeCommand(cmdStop2);
+                testCanvas.addCommand(cmdHelp1);
+                testCanvas.addCommand(cmdHelp2);
+                commandDisplay1 = new String("Result (in this order):");
+                commandDisplay2 = new String("Options list: Help2, Help1");
+                testCanvas.repaint();
+                break;
+            case 8:
+                testCanvas.removeCommand(cmdHelp1);
+                testCanvas.removeCommand(cmdHelp2);
+                testCanvas.addCommand(cmdReturn);
+                commandDisplay1 = new String("");
+                commandDisplay2 = new String("Choose Options->Return");
+                testCanvas.repaint();
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+
+            g.drawString(commandDisplay1, 0, 5, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 7, 20, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Canvas:If Command label is empty default label is used
+ */
+
+public class Test5 implements CommandListener
+{
+
+    //Commands with null label
+    private Command cmdOk = new Command("", Command.OK, 1);
+
+    private Command cmdScreen = new Command("", Command.SCREEN, 1);
+
+    private Command cmdItem = new Command("", Command.ITEM, 1);
+
+    private Command cmdCancel = new Command("", Command.CANCEL, 1);
+
+    private Command cmdBack = new Command("", Command.BACK, 1);
+
+    private Command cmdStop = new Command("", Command.STOP, 1);
+
+    private Command cmdHelp = new Command("", Command.HELP, 1);
+
+    private Command cmdExit = new Command("", Command.EXIT, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+    private String commandDisplay1 = null;
+    private String commandDisplay2 = null;
+    private int type;
+    private TestCanvas testCanvas;
+    int width, height;
+
+    /**
+     *
+     */
+    public Test5()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        okTimerTask = new CommandOkTimerTask();
+        commandDisplay1 = new String("Result: None");
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+        timer.schedule(okTimerTask, 2000, 6000);
+        testCanvas.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_02.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 9)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.addCommand(cmdOk);
+                commandDisplay1 = new String("Options list: ");
+                commandDisplay2 = new String("default label for type OK");
+
+                testCanvas.repaint();
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdOk);
+                testCanvas.addCommand(cmdScreen);
+                commandDisplay1 = new String("Options list: ");
+                commandDisplay2 = new String("default label for type SCREEN");
+                testCanvas.repaint();
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdScreen);
+                testCanvas.addCommand(cmdItem);
+                commandDisplay1 = new String("Options list: ");
+                commandDisplay2 = new String("default label for type ITEM");
+                testCanvas.repaint();
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdItem);
+                testCanvas.addCommand(cmdCancel);
+                commandDisplay1 = new String("RSK: ");
+                commandDisplay2 = new String("default label for type CANCEL");
+                testCanvas.repaint();
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdCancel);
+                testCanvas.addCommand(cmdBack);
+                commandDisplay1 = new String("RSK: ");
+                commandDisplay2 = new String("default label for type BACK");
+                testCanvas.repaint();
+                break;
+            case 6:
+                testCanvas.removeCommand(cmdBack);
+                testCanvas.addCommand(cmdStop);
+                commandDisplay1 = new String("RSK: ");
+                commandDisplay2 = new String("default label for type STOP");
+                testCanvas.repaint();
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdHelp);
+                commandDisplay1 = new String("Options list: ");
+                commandDisplay2 = new String("default label for type HELP");
+                testCanvas.repaint();
+                break;
+            case 8:
+                testCanvas.removeCommand(cmdHelp);
+                testCanvas.addCommand(cmdExit);
+                commandDisplay1 = new String("RSK: ");
+                commandDisplay2 = new String("default label for type EXIT");
+                testCanvas.repaint();
+                break;
+            case 9:
+                testCanvas.removeCommand(cmdExit);
+                testCanvas.addCommand(cmdReturn);
+                commandDisplay1 = new String("");
+                commandDisplay2 = new String("Choose Options->Return");
+                testCanvas.repaint();
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+
+            g.drawString(commandDisplay1, 7, 5, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 7, 20, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test6.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,197 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the below Command test case:
+ * -Canvas:Commands with long and short labels
+ */
+
+public class Test6 implements CommandListener
+{
+
+    private Command cmdOk = new Command("Ok", "Ok with long label", Command.OK, 1);
+
+    private Command cmdScreen = new Command("Screen", "Screen with long label", Command.SCREEN, 1);
+
+    private Command cmdItem = new Command("Item", "Item with long label", Command.ITEM, 1);
+
+    private Command cmdCancel = new Command("Cancel", "Cancel with very long label", Command.CANCEL, 1);
+
+    private Command cmdBack = new Command("Back", "Back with very long label", Command.BACK, 1);
+
+    private Command cmdStop = new Command("Stop", "Stop with very long label", Command.STOP, 1);
+
+    private Command cmdHelp = new Command("Help", "Help with long label", Command.HELP, 1);
+
+    private Command cmdExit = new Command("Exit", "Exit with very long label", Command.EXIT, 1);
+
+    private Command cmdExtra = new Command("Extra", "Extra command for Options menu", Command.SCREEN,1);
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    Timer timer;
+    private CommandOkTimerTask okTimerTask;
+    private String commandDisplay1 = null;
+    private String commandDisplay2 = null;
+    private String commandDisplay3 = null;
+    private Canvas testCanvas;
+    int width, height;
+
+    /**
+     *
+     */
+    public Test6()
+    {
+        timer = new Timer();
+        testCanvas = new TestCanvas();
+        testCanvas.addCommand(cmdExit);
+        testCanvas.addCommand(cmdExtra);
+        okTimerTask = new CommandOkTimerTask();
+        commandDisplay1 = new String("Result: None");
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+        timer.schedule(okTimerTask, 2000, 6000);
+        testCanvas.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdReturn)
+            Midp_Command_02.goBack();
+    }
+
+    public class CommandOkTimerTask extends TimerTask
+    {
+        private int count = 1;
+        public void run()
+        {
+            if (count == 9)
+            {
+                cancel();
+            }
+            switch (count)
+            {
+            case 1:
+                testCanvas.addCommand(cmdOk);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("OPTION MENU Command label is: ");
+                commandDisplay3 = new String(cmdOk.getLongLabel());
+                testCanvas.repaint();
+                break;
+            case 2:
+                testCanvas.removeCommand(cmdOk);
+                testCanvas.addCommand(cmdScreen);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("OPTION MENU Command label is: ");
+                commandDisplay3 = new String(cmdScreen.getLongLabel());
+                testCanvas.repaint();
+                break;
+            case 3:
+                testCanvas.removeCommand(cmdScreen);
+                testCanvas.addCommand(cmdItem);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("OPTION MENU Command label is: ");
+                commandDisplay3 = new String(cmdItem.getLongLabel());
+                testCanvas.repaint();
+                break;
+            case 4:
+                testCanvas.removeCommand(cmdItem);
+                testCanvas.addCommand(cmdCancel);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("RSK Command label is: ");
+                commandDisplay3 = new String(cmdCancel.getLabel());
+                testCanvas.repaint();
+                break;
+            case 5:
+                testCanvas.removeCommand(cmdCancel);
+                testCanvas.addCommand(cmdBack);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("RSK Command label is: ");
+                commandDisplay3 = new String(cmdBack.getLabel());
+                testCanvas.repaint();
+                break;
+            case 6:
+                testCanvas.removeCommand(cmdBack);
+                testCanvas.addCommand(cmdStop);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("RSK Command label is: ");
+                commandDisplay3 = new String(cmdStop.getLabel());
+                testCanvas.repaint();
+                break;
+            case 7:
+                testCanvas.removeCommand(cmdStop);
+                testCanvas.addCommand(cmdHelp);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("OPTION MENU Command label is: ");
+                commandDisplay3 = new String(cmdHelp.getLongLabel());
+                testCanvas.repaint();
+                break;
+            case 8:
+                testCanvas.removeCommand(cmdHelp);
+                testCanvas.addCommand(cmdExit);
+                commandDisplay1 = new String("Result:");
+                commandDisplay2 = new String("RSK Command label is: ");
+                commandDisplay3 = new String(cmdExit.getLabel());
+                testCanvas.repaint();
+                break;
+            case 9:
+                testCanvas.removeCommand(cmdExit);
+                testCanvas.addCommand(cmdReturn);
+                commandDisplay1 = new String("");
+                commandDisplay2 = new String("Choose Options->Return");
+                commandDisplay3 = new String("");
+                testCanvas.repaint();
+                break;
+            default:
+                return;
+            }
+            count++;
+            System.out.println("count:" + count);
+        }
+    }
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+
+            g.drawString(commandDisplay1, 0, 5, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 7, 20, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay3, 7, 35, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Command_02/src/Test7.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ */
+
+public class Test7 implements CommandListener
+{
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //command to return to main screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    private TestCanvas testCanvas = null;
+    int width, height;
+
+    public String commandDisplay1 = null;
+    public String commandDisplay2 = null;
+
+    /**
+     * This constructor creates cg with the elements inside and adds Commands to
+     * add and remove elements from the cg.The cg is appended to this form.
+     * Displays the current screen to be this form
+     */
+    public Test7()
+    {
+        testCanvas = new TestCanvas();
+
+        testCanvas.addCommand(cmdExit);
+        testCanvas.addCommand(cmdReturn);
+        testCanvas.setCommandListener(this);
+        commandDisplay1 = new String("Midp_Command_02 MIDlet");
+        commandDisplay2 = new String("Exit on RSK and Return in Options");
+        Midp_Command_02.getDisplay().setCurrent(testCanvas);
+        width = testCanvas.getWidth();
+        height = testCanvas.getHeight();
+
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            Midp_Command_02.goBack();
+        }
+        if (c == cmdReturn)
+        {
+            Midp_Command_02.goBack();
+        }
+
+    }
+
+
+    public class TestCanvas extends Canvas
+    {
+
+        protected void paint(Graphics g)
+        {
+            g.setColor(255,255,255);
+            g.fillRect(0,0,width,height);
+            g.setColor(0,0,0);
+            g.drawString(commandDisplay1, 0, 20, Graphics.TOP | Graphics.LEFT);
+            g.drawString(commandDisplay2, 10, 40, Graphics.TOP | Graphics.LEFT);
+            return;
+        }
+
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_DateField_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_DateField_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_DateField_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_DateField_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_01/src/DateFieldModes.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class creates DateField according to the selected mode.
+ *
+ */
+
+public class DateFieldModes extends Form implements CommandListener
+{
+
+    //title to the DateField
+    private String title = null;
+    //DateField to test
+    private DateField df = null;
+    //command to go back to the DateFieldTests screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    /**
+     * This constructor creates the DateFields according to the mode.
+     * It also sets the title to be the name of the mode.
+     *
+     * @param mode The DateField mode
+     */
+    public DateFieldModes(int mode)
+    {
+
+        super("");
+        switch (mode)
+        {
+        case DateField.DATE:
+            title = "DATE";
+            df = new DateField(title, mode);
+            break;
+        case DateField.TIME:
+            title = "TIME";
+            df = new DateField(title, mode);
+            break;
+        case DateField.DATE_TIME:
+            title = "DATE_TIME";
+            df = new DateField(title, mode);
+            break;
+        }
+        append(df);
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            DateFieldTests.show();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_01/src/DateFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,125 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class lets the user to select mode of the DateField to be created.
+ *
+ */
+
+public class DateFieldTests extends Form implements CommandListener
+{
+
+    private static Midp_DateField_01 parent = null;
+
+    //ChoiceGroup to select the DateField mode
+    private ChoiceGroup cg = null;
+
+    //this instance
+    private static DateFieldTests instance = null;
+
+    //elements of cg
+    private String[] dfModes = {"DATE", "TIME", "DATE_TIME"};
+
+    //command to create the DateField for selected mode
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor creates the cg and appends to this Form
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public DateFieldTests(Midp_DateField_01 parent)
+    {
+        //set the name of the Form to be the name of the MIDlet
+        super(parent.getClass().getName());
+        this.parent = parent;
+        cg = new ChoiceGroup("Select DF Mode:", Choice.EXCLUSIVE, dfModes, null);
+        append(cg);
+        addCommand(cmdOk);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //show this screen
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        int mode = -1;
+        if (t.equals(dfModes[0]))
+        {
+            mode = DateField.DATE;
+        }
+        else if (t.equals(dfModes[1]))
+        {
+            mode = DateField.TIME;
+        }
+        else if (t.equals(dfModes[2]))
+        {
+            mode = DateField.DATE_TIME;
+        }
+        if (c == cmdOk)
+            Display.getDisplay(parent).setCurrent(new DateFieldModes(mode));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_01/src/Midp_DateField_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for DateField tests.
+ */
+
+public class Midp_DateField_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new DateFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_DateField_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_DateField_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_DateField_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_DateField_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_02/src/DateFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the DateField with ItemStateListener
+ *
+ */
+
+public class DateFieldTests extends Form implements ItemStateListener, CommandListener
+{
+
+    //referemce to the parent MIDlet
+    private Midp_DateField_02 m = null;
+
+    private StringItem si = null;
+
+    private DateField df = null;
+
+    private Command cmdCurrDate = new Command("Curr Date", Command.ITEM, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public DateFieldTests(Midp_DateField_02 m)
+    {
+        //set the name of the form to be the name of MIDlet
+        super(m.getClass().getName());
+        this.m = m;
+
+        si = new StringItem("Result:", null);
+        df = new DateField("Enter Date to test:", DateField.DATE);
+        setItemStateListener(this);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        append(df);
+        append(si);
+        Display.getDisplay(m).setCurrent(this);
+    }
+
+    public void itemStateChanged(Item i)
+    {
+        if (i == df)
+        {
+            si.setText("itemStateChanged is called");
+        }
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            m.destroyApp(false);
+            m.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_02/src/Midp_DateField_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_DateField_02 tests.
+ *
+ */
+
+public class Midp_DateField_02 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new DateFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_03/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_DateField_03" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_DateField_03"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_DateField_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_DateField_03"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_03/src/DateFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the DateField with ItemStateListener
+ *
+ */
+
+public class DateFieldTests extends Form implements ItemCommandListener, CommandListener
+{
+
+    //referemce to the parent MIDlet
+    private Midp_DateField_03 m = null;
+
+    private StringItem si= null;
+
+    private DateField df = null;
+
+    private Command cmdCurrDate = new Command("cmd", Command.ITEM, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public DateFieldTests(Midp_DateField_03 m)
+    {
+        //set the name of the form to be the name of MIDlet
+        super(m.getClass().getName());
+        this.m = m;
+
+        si = new StringItem("Result:", null);
+        df = new DateField("DateField:", DateField.DATE);
+        df.addCommand(cmdCurrDate);
+        df.setItemCommandListener(this);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        append(df);
+        append(si);
+        Display.getDisplay(m).setCurrent(this);
+    }
+
+    public void commandAction(Command c, Item i)
+    {
+        if (i == df)
+        {
+            si.setText("commandAction is called");
+        }
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            m.destroyApp(false);
+            m.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_DateField_03/src/Midp_DateField_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_DateField_03 tests.
+ *
+ */
+
+public class Midp_DateField_03 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new DateFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Form_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Form_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Form_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Form_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Form_01/res/bigImage.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Form_01/res/plasma.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_01/src/FormMethodsTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,392 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the methods of the Form like
+ * appending many items, appending one Item, deleting an Item and
+ * changing/replacing an Item etc.
+ *
+ * changed arrange of image items to get layout shown correctly
+ */
+
+public class FormMethodsTests extends List implements CommandListener, ItemStateListener
+{
+
+    private static Midp_Form_01 parent = null;
+
+    private static FormMethodsTests instance = null;
+
+    private final String exCgStr = "Exclusive ChoiceGroup";
+
+    private final String mulCgStr = "Multiple ChoiceGroup";
+
+    private final String popCgStr = "Popup ChoiceGroup";
+
+    private final String dfStr = "DateField";
+
+    private final String iGStr = "Interactive Gauge";
+
+    private final String nGStr = "Non interactive Gauge";
+
+    private final String siStr = "StringItem";
+
+    private final String tfStr = "TextField";
+
+    private final String bigImgStr = "Big Image";
+
+    private final String imgStr = "ImageItem";
+
+    private final String spacerStr = "Spacer";
+
+    private ChoiceGroup cg = null;
+
+    private DateField df = null;
+
+    private Gauge g = null;
+
+    private StringItem si = null;
+
+    private TextField tf = null;
+
+    private Spacer sp = null;
+
+    private List tests;
+
+    private Form itemForm = null;
+
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    private Command cmdAppend = new Command("Append Item", Command.SCREEN, 1);
+
+    private Command cmdReplace = new Command("Replace Item", Command.SCREEN, 1);
+
+    private Command cmdDelete = new Command("Delete Item", Command.SCREEN, 1);
+
+    private Command cmdManyItems = new Command("Many Items", Command.SCREEN, 1);
+
+    private Command cmdItemState = new Command("Item State Test", Command.SCREEN, 1);
+
+    private Command cmdChangeStringItem = new Command("Change StringItem", Command.SCREEN, 1);
+
+    private Command cmdChangeImageItem = new Command("Change ImageItem", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public FormMethodsTests(Midp_Form_01 parent)
+    {
+        super(parent.getClass().getName(), List.EXCLUSIVE);
+        this.parent = parent;
+
+        itemForm = new Form("Items");
+        addCommand(cmdManyItems);
+        addCommand(cmdAppend);
+        addCommand(cmdItemState);
+        addCommand(cmdExit);
+
+        itemForm.addCommand(cmdBack);
+        itemForm.setCommandListener(this);
+        itemForm.setItemStateListener(this);
+
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        instance.append(exCgStr, null);
+        instance.append(mulCgStr, null);
+        instance.append(popCgStr, null);
+        instance.append(dfStr, null);
+        instance.append(iGStr, null);
+        instance.append(nGStr, null);
+        instance.append(siStr, null);
+        instance.append(tfStr, null);
+        instance.append(imgStr, null);
+        instance.append(bigImgStr, null);
+        instance.append(spacerStr, null);
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    private void addChoiceGroup(String title, int type)
+    {
+        cg = new ChoiceGroup(title, type);
+        cg.append("1stElement", null);
+        cg.append("2ndElement", null);
+        cg.append("3ndElement", null);
+        cg.append("4thElement", null);
+        cg.append("5thElement", null);
+        cg.append("6thElement", null);
+        cg.append("7thElement", null);
+        cg.append("8thElement", null);
+        cg.append("9thElement", null);
+        itemForm.append(cg);
+    }
+
+    private void addGauge(String title, boolean mode)
+    {
+        g = new Gauge(title, mode, 10, 5);
+        itemForm.append(g);
+    }
+
+    private void addDateField(String title, int mode)
+    {
+        df = new DateField(title, mode);
+        itemForm.append(df);
+    }
+
+    private void addSpacer(int minWidth, int minHeight)
+    {
+        sp = new Spacer(minWidth, minHeight);
+        itemForm.append(sp);
+    }
+
+    private void addStringItem(String title, String text)
+    {
+        si = new StringItem(title, text);
+        itemForm.append(si);
+    }
+
+    private void addBigImage()
+    {
+        try
+        {
+            Image bigImage = Image.createImage("/bigImage.png");
+            itemForm.append(bigImage);
+        }
+        catch (java.io.IOException err)
+        {
+            System.out.println("Error in creating the image!");
+        }
+    }
+
+    private void addImageItem()
+    {
+        try
+        {
+            Image img = Image.createImage("/plasma.png");
+
+            itemForm.append(new ImageItem("Default Layout",
+                                          img,
+                                          ImageItem.LAYOUT_DEFAULT,
+                                          "Image Cannot be shown"));
+
+            itemForm.append(new ImageItem("Layout Center",
+                                          img,
+                                          ImageItem.LAYOUT_CENTER,
+                                          "Image Cannot be shown"));
+
+            itemForm.append(new ImageItem("Layout Left",
+                                          img,
+                                          ImageItem.LAYOUT_LEFT,
+                                          "Image Cannot be shown"));
+
+            itemForm.append(new ImageItem("Layout Center After",
+                                          img,
+                                          ImageItem.LAYOUT_CENTER |
+                                          ImageItem.LAYOUT_NEWLINE_AFTER,
+                                          "Image Cannot be shown"));
+
+            itemForm.append(new ImageItem("Layout Right",
+                                          img,
+                                          ImageItem.LAYOUT_RIGHT,
+                                          "Image Cannot be shown"));
+
+            itemForm.append(new ImageItem("Layout Center Before",
+                                          img,
+                                          ImageItem.LAYOUT_CENTER |
+                                          ImageItem.LAYOUT_NEWLINE_BEFORE,
+                                          "Image Cannot be shown"));
+
+        }
+        catch (java.io.IOException err)
+        {
+            System.out.println("Error in creating the image!");
+        }
+    }
+
+    private void addTextField(String label, int constraints)
+    {
+        if (label.equals("UNEDITABLE"))
+        {
+            tf = new TextField(label, "uneditable", 30, constraints);
+        }
+        else
+            tf = new TextField(label, "", 30, constraints);
+        itemForm.append(tf);
+    }
+
+    private void deleteFormItems()
+    {
+        int size = itemForm.size();
+        if (size != 0)
+        {
+            for (int i=0; i<size; i++)
+                itemForm.delete(0);
+        }
+    }
+    public void itemStateChanged(Item item)
+    {
+        itemForm.setTitle(item.getLabel() + " modified!");
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = instance.getSelectedIndex();
+        String item = instance.getString(index);
+        if (c == cmdItemState)
+        {
+            addChoiceGroup(exCgStr, ChoiceGroup.EXCLUSIVE);
+            addChoiceGroup(mulCgStr, ChoiceGroup.MULTIPLE);
+            addChoiceGroup(popCgStr, ChoiceGroup.POPUP);
+            addGauge(iGStr, true);
+            addDateField("DATE_TIME", DateField.DATE_TIME);
+            addTextField("ANY", TextField.ANY);
+            addStringItem("StringItemLabel", "StringItemText");
+            addImageItem();
+            itemForm.addCommand(cmdChangeStringItem);
+            itemForm.addCommand(cmdChangeImageItem);
+        }
+        if (c == cmdAppend || c == cmdManyItems)
+        {
+            if (c == cmdAppend)
+            {
+                deleteFormItems();
+                itemForm.removeCommand(cmdReplace);
+                itemForm.removeCommand(cmdDelete);
+            }
+            if (c == cmdManyItems)
+            {
+                itemForm.addCommand(cmdReplace);
+                itemForm.addCommand(cmdDelete);
+            }
+
+            if (item.equals(exCgStr))
+                addChoiceGroup(exCgStr, ChoiceGroup.EXCLUSIVE);
+            else if (item.equals(mulCgStr))
+                addChoiceGroup(mulCgStr, ChoiceGroup.MULTIPLE);
+            else if (item.equals(popCgStr))
+                addChoiceGroup(popCgStr, ChoiceGroup.POPUP);
+            else if (item.equals(iGStr))
+                addGauge(iGStr, true);
+            else if (item.equals(nGStr))
+                addGauge(nGStr, false);
+            else if (item.equals(dfStr))
+            {
+                addDateField("DATE", DateField.DATE);
+                addDateField("TIME", DateField.TIME);
+                addDateField("DATE_TIME", DateField.DATE_TIME);
+            }
+            else if (item.equals(siStr))
+                addStringItem("StringItemLabel", "StringItemText");
+            else if (item.equals(imgStr))
+                addImageItem();
+            else if (item.equals(spacerStr))
+                addSpacer(10,10);
+            else if (item.equals(tfStr))
+            {
+                addTextField("ANY", TextField.ANY);
+                addTextField("EMAILADDR", TextField.EMAILADDR);
+                addTextField("NUMERIC", TextField.NUMERIC);
+                addTextField("PHONENUMBER", TextField.PHONENUMBER);
+                addTextField("URL", TextField.URL);
+                addTextField("PASSWORD", TextField.PASSWORD);
+                addTextField("PASSWORD|NUMERIC", TextField.PASSWORD|TextField.NUMERIC);
+                addTextField("PASSWORD|PHONENUMBER", TextField.PASSWORD|TextField.PHONENUMBER);
+                addTextField("PASSWORD|URL", TextField.PASSWORD|TextField.URL);
+                addTextField("PASSWORD|EMAILADDR", TextField.PASSWORD|TextField.EMAILADDR);
+                addTextField("DECIMAL", TextField.DECIMAL);
+                addTextField("INITIAL_CAPS_SENTENCE", TextField.INITIAL_CAPS_SENTENCE);
+                addTextField("PINITIAL_CAPS_WORD", TextField.INITIAL_CAPS_WORD);
+                addTextField("UNEDITABLE", TextField.UNEDITABLE);
+                addTextField("NON_PREDICTIVE", TextField.NON_PREDICTIVE);
+                addTextField("SENSITIVE", TextField.SENSITIVE);
+            }
+            else if (item.equals(bigImgStr))
+                addBigImage();
+        }
+        if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+        Display.getDisplay(parent).setCurrent(itemForm);
+        if (c == cmdBack)
+            Display.getDisplay(parent).setCurrent(instance);
+        if (c == cmdReplace)
+        {
+            //Item to replace 1st Item
+            Item si = new StringItem("Replaced StringItem", "StringItem Text");
+            if (itemForm.size() != 0)
+                itemForm.set(0, si);
+            Display.getDisplay(parent).setCurrent(itemForm);
+        }
+        if (c == cmdDelete)
+        {
+            if (itemForm.size() == 0)
+            {
+                //to tell the user Form is empty
+                Alert a = new Alert("Info", "Form is empty,add Items before testing delete", null, AlertType.INFO);
+                a.setTimeout(5000);
+                Display.getDisplay(parent).setCurrent(a);
+            }
+            else
+            {
+                itemForm.delete(0);
+            }
+            Display.getDisplay(parent).setCurrent(itemForm);
+        }
+        if (c == cmdChangeStringItem)
+        {
+            (itemForm.get(6)).setLabel("StringItem Changed!");
+            (itemForm.get(6)).notifyStateChanged();
+        }
+        if (c == cmdChangeImageItem)
+        {
+            (itemForm.get(7)).setLabel("ImageItem Changed!");
+            (itemForm.get(7)).notifyStateChanged();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_01/src/Midp_Form_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_Form_01 tests.
+ */
+
+public class Midp_Form_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new FormMethodsTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        notifyDestroyed();
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Form_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Form_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Form_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Form_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Form_02/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/ChoiceGroupMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,336 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the various methods of ChoiceGroup
+ *
+ */
+
+public class ChoiceGroupMethods extends Form implements CommandListener
+{
+
+    private MIDlet m = null;
+
+    private ChoiceGroup cg = null;
+
+    private List listMethods = null;
+
+    private String listMethodsStr[] = {"Append", "Delete", "Insert", "Set",
+                                       "SetSelectedIndex", "DeleteAll"
+                                      };
+
+    private List listAppend = null;
+
+    private List listInsert = null;
+
+    private List listSet = null;
+
+    private List listSel = null;
+
+    private String listAppendStr[] = {"String", "Image"};
+
+    private String listInsertStr[] = {"with out Image", "with Image"};
+
+    private String listSetStr[] = {"with out Image", "with Image"};
+
+    private String listSelStr[] = {"Select", "UnSelect"};
+
+    private String elements[] = {"1st element", "2nd element", "3rd element"};
+
+    private String currScreen = null;
+
+    private Image smallImage = null;
+
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    private Command cmdAppend = new Command("Append", Command.OK, 1);
+
+    private Command cmdSet = new Command("Set", Command.OK, 1);
+
+    private Command cmdSel = new Command("Select", Command.OK, 1);
+
+    //insert command
+    Command cmdInsert = new Command("Insert", Command.SCREEN, 1);
+
+    private int type = 0;
+
+    /**
+     *
+     * @param cgType The ChoiceGroup type
+     */
+    public ChoiceGroupMethods(int cgType)
+    {
+
+        super("ChoiceGroup");
+        this.type = cgType;
+        String cgLabel = null;
+        if (type == ChoiceGroup.MULTIPLE)
+            cgLabel = "MULTIPLE";
+        else if (type == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (type == ChoiceGroup.POPUP)
+            cgLabel = "POPUP";
+        cg = new ChoiceGroup(cgLabel, type, elements, null);
+        append(cg);
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        setCommandListener(this);
+        m = FormUpdateTests.getParent();
+        currScreen = "choicegroup";
+    }
+
+    private void appendListMethods(String scrn)
+    {
+        listMethods = new List("ChoiceGroup Methods", List.EXCLUSIVE, listMethodsStr, null);
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+        currScreen = scrn;
+    }
+
+    private void appendListMethod(String scrn)
+    {
+        listAppend = new List("Append", List.EXCLUSIVE, listAppendStr, null);
+        listAppend.addCommand(cmdBack);
+        listAppend.addCommand(cmdAppend);
+        listAppend.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listAppend);
+        currScreen = scrn;
+    }
+
+    private void insertListMethod(String scrn)
+    {
+        listInsert = new List("Insert", List.EXCLUSIVE, listInsertStr, null);
+        listInsert.addCommand(cmdBack);
+        listInsert.addCommand(cmdInsert);
+        listInsert.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listInsert);
+        currScreen = scrn;
+    }
+
+    private void setListMethod(String scrn)
+    {
+        listSet = new List("Set", List.EXCLUSIVE, listInsertStr, null);
+        listSet.addCommand(cmdBack);
+        listSet.addCommand(cmdSet);
+        listSet.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSet);
+        currScreen = scrn;
+    }
+
+    private void setSelIndexListMethod(String scrn)
+    {
+        listSel = new List("SelectedIndex", List.EXCLUSIVE, listSelStr, null);
+        listSel.addCommand(cmdBack);
+        listSel.addCommand(cmdSel);
+        listSel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSel);
+        currScreen = scrn;
+    }
+
+    private Image createImage()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return smallImage;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (currScreen.equals("append"))
+            {
+                Display.getDisplay(m).setCurrent(listMethods);
+                currScreen = "main";
+            }
+            else if (currScreen.equals("choicegroup"))
+            {
+                FormUpdateTests.show();
+            }
+            else if (currScreen.equals("main"))
+            {
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+            else if (currScreen.equals("insert"))
+            {
+                Display.getDisplay(m).setCurrent(listMethods);
+                currScreen = "main";
+            }
+            else if (currScreen.equals("set"))
+            {
+                Display.getDisplay(m).setCurrent(listMethods);
+                currScreen = "main";
+            }
+            else if (currScreen.equals("select"))
+            {
+                Display.getDisplay(m).setCurrent(listMethods);
+                currScreen = "main";
+            }
+            else
+            {
+                FormUpdateTests.show();
+            }
+        }
+        else if (c == cmdMethods)
+            appendListMethods("main");
+        else if (c == cmdOk)
+        {
+            int index = listMethods.getSelectedIndex();
+            String str = listMethods.getString(index);
+            if (str.equals(listMethodsStr[0]))
+            {
+                appendListMethod("append");
+            }
+            else if (str.equals(listMethodsStr[1]))
+            {
+                if (cg.size() != 0)
+                {
+                    if (type == List.MULTIPLE)
+                        //For Multiple List delete the 1st element
+                        cg.delete(0);
+                    else
+                        cg.delete(cg.getSelectedIndex());
+                }
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+            else if (str.equals(listMethodsStr[2]))
+            {
+                insertListMethod("insert");
+            }
+            else if (str.equals(listMethodsStr[3]))
+            {
+                setListMethod("set");
+            }
+            else if (str.equals(listMethodsStr[4]))
+            {
+                setSelIndexListMethod("select");
+            }
+            else if (str.equals(listMethodsStr[5]))
+            {
+                if (cg.size() != 0)
+                    cg.deleteAll();
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+        }
+        else if (c == cmdAppend)
+        {
+            if (currScreen.equals("append"))
+            {
+                int i = listAppend.getSelectedIndex();
+                String element = listAppend.getString(i);
+                if (element.equals(listAppendStr[0]))
+                {
+                    cg.append("Appended", null);
+                    Display.getDisplay(m).setCurrent(this);
+                    currScreen = "choicegroup";
+                }
+                if (element.equals(listAppendStr[1]))
+                {
+                    Image img = createImage();
+                    cg.append("ImageAppended", img);
+                    Display.getDisplay(m).setCurrent(this);
+                    currScreen = "choicegroup";
+                }
+            }
+        }
+        else if (c == cmdInsert)
+        {
+            if (currScreen.equals("insert"))
+            {
+                int i = listInsert.getSelectedIndex();
+                String e = listInsert.getString(i);
+                if (e.equals(listInsertStr[0]))
+                {
+                    cg.insert(0, "inserted", null);
+                    Display.getDisplay(m).setCurrent(this);
+                    currScreen = "choicegroup";
+                }
+                else if (e.equals(listInsertStr[1]))
+                {
+                    Image img = createImage();
+                    cg.insert(0, "ImageInserted", img);
+                    Display.getDisplay(m).setCurrent(this);
+                    currScreen = "choicegroup";
+                }
+            }
+        }
+        else if (c == cmdSet)
+        {
+            int i = listSet.getSelectedIndex();
+            String e = listSet.getString(i);
+            if (e.equals(listSetStr[0]))
+            {
+                cg.set(0, "set", null);
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+            else
+            {
+                Image img = createImage();
+                cg.set(0, "ImageSet", img);
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+        }
+        else if (c == cmdSel)
+        {
+            int i = listSel.getSelectedIndex();
+            String e = listSel.getString(i);
+            if (e.equals(listSelStr[0]))
+            {
+                cg.setSelectedIndex(0, true);
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+            else
+            {
+                cg.setSelectedIndex(0, false);
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = "choicegroup";
+            }
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/DateFieldMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,255 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+import javax.microedition.lcdui.List;
+
+/**
+ * This class is to test the various methods of DateField
+ *
+ */
+
+public class DateFieldMethods extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet m = null;
+
+    //the DateField methods as elements in the listMethodsStr
+    private String listMethodsStr[] = {"SetDate", "SetInputMode", "SetLabel"};
+
+    //the Strings to set date as Current or NULL
+    private String listSetDateStr[] = {"Current", "NULL"};
+
+    //the Date modes as Strings to setMode in the DateField
+    private String listSetModeStr[] = {"DATE", "Date_TIME", "TIME"};
+
+    //the DateField labels as Strings to setLabel in DateField
+    private String listSetLabelStr[] = {"Label", "NULL" };
+
+    //instead I should use Displayable object to know about the
+    //current Displayable
+    private String methodsScrn = "methods";
+
+    private String mainScrn = "main";
+
+    private String setDateScrn = "date";
+
+    private String setModeScrn = "mode";
+
+    private String setLabelScrn = "label";
+
+    private String currScreen = null;
+
+    //the list to add listMethodsStr
+    private List listMethods = null;
+
+    //the list to add listSetDateStr
+    private List listSetDate = null;
+
+    //the list to add listSetModeStr
+    private List listSetMode = null;
+
+    //the list to add listSetLabelStr
+    private List listSetLabel = null;
+
+    //the DateField to test
+    private DateField df = null;
+
+    //the command to go back to the Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the commmand to invoke the DateField method for testing
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    //the command to display the listMethods Screen
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    //the command to set the DateField
+    private Command cmdSet = new Command("Set", Command.OK, 1);
+
+
+    public DateFieldMethods(MIDlet m)
+    {
+        super(m.getClass().getName());
+        this.m = m;
+        df = new DateField("DateField", DateField.DATE);
+        append(df);
+        setCommandListener(this);
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        currScreen = mainScrn;
+    }
+
+    /**
+     * This method creates the listMethods List and sets the
+     * current screen as listMethods.
+     *
+     *@param cScreen the current screen
+     */
+    private void addListMethods(String cScreen)
+    {
+        listMethods = new List("Methods", List.IMPLICIT, listMethodsStr, null);
+
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+        currScreen = cScreen;
+    }
+
+    /**
+     * This method creates the listSetDate List and sets the
+     * current screen as listSetDate.
+     *
+     *@param cScreen the current screen
+     */
+    private void addListSetDate(String cScreen)
+    {
+        listSetDate = new List("SetDate", List.IMPLICIT, listSetDateStr, null);
+
+        listSetDate.addCommand(cmdBack);
+        listSetDate.addCommand(cmdSet);
+        listSetDate.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetDate);
+        currScreen = cScreen;
+    }
+
+    /**
+     * This method creates the listSetMode List and sets the
+     * current screen as listSetMode .
+     *
+     *@param cScreen the current screen
+     */
+    private void addListSetMode(String cScreen)
+    {
+        listSetMode = new List("SetInputMode", List.IMPLICIT, listSetModeStr, null);
+
+        listSetMode.addCommand(cmdBack);
+        listSetMode.addCommand(cmdSet);
+        listSetMode.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetMode);
+        currScreen = cScreen;
+    }
+
+    /**
+     * This method creates the listSetLabel List and sets the
+     * current screen as listSetLabel .
+     *
+     *@param cScreen the current screen
+     */
+    private void addListSetLabel(String cScreen)
+    {
+        listSetLabel = new List("SetLabel", List.IMPLICIT, listSetLabelStr, null);
+
+        listSetLabel.addCommand(cmdBack);
+        listSetLabel.addCommand(cmdSet);
+        listSetLabel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLabel);
+        currScreen = cScreen;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (currScreen.equals(methodsScrn))
+            {
+                System.out.println("currScreen" + currScreen);
+                Display.getDisplay(m).setCurrent(this);
+                currScreen = mainScrn;
+            }
+            else if (currScreen.equals(setDateScrn) || currScreen.equals(setModeScrn)
+                     || currScreen.equals(setLabelScrn))
+            {
+                System.out.println("currScreen" + currScreen);
+                Display.getDisplay(m).setCurrent(listMethods);
+                currScreen = methodsScrn;
+            }
+            else
+            {
+                FormUpdateTests.show();
+            }
+        }
+
+        else if (c == cmdMethods)
+        {
+            addListMethods(methodsScrn);
+        }
+        else if (c == cmdOk || c == List.SELECT_COMMAND)
+        {
+            int index = listMethods.getSelectedIndex();
+            String element = listMethods.getString(index);
+            if (element.equals(listMethodsStr[0]))
+                addListSetDate(setDateScrn);
+            else if (element.equals(listMethodsStr[1]))
+                addListSetMode(setModeScrn);
+            else if (element.equals(listMethodsStr[2]))
+                addListSetLabel(setLabelScrn);
+        }
+        else if (c == cmdSet)
+        {
+            if (s == listSetDate)
+            {
+                int index = listSetDate.getSelectedIndex();
+                String element = listSetDate.getString(index);
+                if (element.equals(listSetDateStr[0]))
+                {
+                    df.setDate(Calendar.getInstance(TimeZone.getDefault())
+                               .getTime());
+                }
+                else if (element.equals(listSetDateStr[1]))
+                {
+                    df.setDate(null);
+                }
+            }
+            if (s == listSetMode)
+            {
+                int index = listSetMode.getSelectedIndex();
+                String element = listSetMode.getString(index);
+                if (element.equals(listSetModeStr[0]))
+                    df.setInputMode(df.DATE);
+                if (element.equals(listSetModeStr[1]))
+                    df.setInputMode(df.DATE_TIME);
+                if (element.equals(listSetModeStr[2]))
+                    df.setInputMode(df.TIME);
+            }
+            if (s == listSetLabel)
+            {
+                int index = listSetLabel.getSelectedIndex();
+                String element = listSetLabel.getString(index);
+                if (element.equals(listSetLabelStr[0]))
+                    df.setLabel("DateField label which should be too long to fit on one line");
+                if (element.equals(listSetLabelStr[1]))
+                    df.setLabel(null);
+            }
+            Display.getDisplay(m).setCurrent(this);
+            currScreen = mainScrn;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/FormUpdateTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,180 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class allows the user to select the Item to test
+ *
+ */
+
+public class FormUpdateTests extends List implements CommandListener
+{
+
+    //the reference to the MIDlet to go to different screens
+    private static Midp_Form_02 parent = null;
+
+    //the this instance
+    private static FormUpdateTests instance = null;
+
+    //String to add as an element to this List
+    private final String exCgStr = "Exclusive ChoiceGroup";
+
+    //String to add as an element to this List
+    private final String mulCgStr = "Multiple ChoiceGroup";
+
+    //String to add as an element to this List
+    private final String popCgStr = "Popup ChoiceGroup";
+
+    //String to add as an element to this List
+    private final String dfStr = "DateField";
+
+    //String to add as an element to this List
+    private final String iGStr = "Interactive Gauge";
+
+    //String to add as an element to this List
+    private final String nGStr = "NonInteractive Gauge";
+
+    //String to add as an element to this List
+    private final String siStr = "StringItem";
+
+    //String to add as an element to this List
+    private final String tfStr = "TextField";
+
+    //String to add as an element to this List
+    private final String imgStr = "ImageItem";
+
+    //the ChoiceGroup to test the methods
+    private ChoiceGroup cg = null;
+
+    //the DateField to test the methods
+    private DateField df = null;
+
+    //the Gauge to test the methods
+    private Gauge g = null;
+
+    //the StringItem to test the methods
+    private StringItem si = null;
+
+    //the TextField to test the methods
+    private TextField tf = null;
+
+    //the boolean to select the type of the Gauge
+    private boolean intGauge = true;
+
+    //the boolean to select the type of the Gauge
+    private boolean nonIntGauge = false;
+
+    //the Command to invoke the item to test
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    // The command to exit MIDlet.
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor appends the elements to this List
+     *
+     *@param MIDlet the reference to the MIDlet
+     */
+    public FormUpdateTests(Midp_Form_02 parent)
+    {
+        super(parent.getClass().getName(), List.EXCLUSIVE);
+        this.parent = parent;
+
+        addCommand(cmdOk);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //append elements to this List
+        instance.append(exCgStr, null);
+        instance.append(mulCgStr, null);
+        instance.append(popCgStr, null);
+        instance.append(dfStr, null);
+        instance.append(iGStr, null);
+        instance.append(nGStr, null);
+        instance.append(siStr, null);
+        instance.append(tfStr, null);
+        instance.append(imgStr, null);
+        //show this Screen
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = instance.getSelectedIndex();
+        String item = instance.getString(index);
+        if (c == cmdOk)
+        {
+            if (item.equals(exCgStr))
+                Display.getDisplay(parent).setCurrent(new ChoiceGroupMethods(ChoiceGroup.EXCLUSIVE));
+            if (item.equals(mulCgStr))
+                Display.getDisplay(parent).setCurrent(new ChoiceGroupMethods(ChoiceGroup.MULTIPLE));
+            if (item.equals(popCgStr))
+                Display.getDisplay(parent).setCurrent(new ChoiceGroupMethods(ChoiceGroup.POPUP));
+            if (item.equals(dfStr))
+                Display.getDisplay(parent).setCurrent(new DateFieldMethods(parent));
+            if (item.equals(iGStr))
+                Display.getDisplay(parent).setCurrent(new GaugeMethods(parent, intGauge));
+            if (item.equals(nGStr))
+                Display.getDisplay(parent).setCurrent(new GaugeMethods(parent, nonIntGauge));
+            if (item.equals(siStr))
+                Display.getDisplay(parent).setCurrent(new StringItemMethods(parent));
+            if (item.equals(tfStr))
+                Display.getDisplay(parent).setCurrent(new TextFieldMethods(parent));
+            if (item.equals(imgStr))
+                Display.getDisplay(parent).setCurrent(new ImageItemMethods(parent));
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/GaugeMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the various methods of Gauge
+ *
+ */
+
+public class GaugeMethods extends Form implements CommandListener
+{
+
+    private MIDlet m = null;
+
+    private String listMethodsStr[] = {"SetLabel", "SetValue", "SetMaxValue"};
+
+    private String listSetMaxValueStr[] = {"increase", "decrease"};
+
+    private String listSetValueStr[] = {"0", "1/2", "1"};
+
+    private String listSetLabelStr[] = {"Label", "NULL"};
+
+    private String methodsScrn = "methods";
+
+    private String mainScrn = "main";
+
+    private List listMethods = null;
+
+    private List listSetMaxValue = null;
+
+    private List listSetValue = null;
+
+    private List listSetLabel = null;
+
+    private Gauge g = null;
+
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    private Command cmdSet = new Command("Set", Command.OK, 1);
+
+    public GaugeMethods(MIDlet m, boolean type)
+    {
+        super(m.getClass().getName());
+        this.m = m;
+        if (type)
+            g = new Gauge("Interactive Gauge", type, 10, 5);
+        else
+            g = new Gauge("Non-interactive Gauge", type, 10, 5);
+        append(g);
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        setCommandListener(this);
+    }
+
+    private void addListMethods()
+    {
+        listMethods = new List("Methods", List.IMPLICIT, listMethodsStr, null);
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+    }
+
+    private void addListSetMaxValue()
+    {
+        listSetMaxValue = new List("SetMaxValue", List.IMPLICIT, listSetMaxValueStr, null);
+        listSetMaxValue.addCommand(cmdBack);
+        listSetMaxValue.addCommand(cmdSet);
+        listSetMaxValue.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetMaxValue);
+    }
+
+    private void addListSetValue()
+    {
+        listSetValue = new List("SetValue", List.IMPLICIT, listSetValueStr, null);
+        listSetValue.addCommand(cmdBack);
+        listSetValue.addCommand(cmdSet);
+        listSetValue.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetValue);
+    }
+
+    private void addListSetLabel()
+    {
+        listSetLabel = new List("SetLabel", List.IMPLICIT, listSetLabelStr, null);
+        listSetLabel.addCommand(cmdBack);
+        listSetLabel.addCommand(cmdSet);
+        listSetLabel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLabel);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (s == listMethods)
+                Display.getDisplay(m).setCurrent(this);
+            else if (s == listSetMaxValue || s == listSetValue || s == listSetLabel)
+                Display.getDisplay(m).setCurrent(listMethods);
+            else
+            {
+                FormUpdateTests.show();
+            }
+        }
+        else if (c == cmdMethods)
+        {
+            addListMethods();
+        }
+        else if (c == cmdSet)
+        {
+            if (s == listSetMaxValue)
+            {
+                int index = listSetMaxValue.getSelectedIndex();
+                String element = listSetMaxValue.getString(index);
+                if (element.equals(listSetMaxValueStr[0]))
+                    g.setMaxValue(g.getMaxValue() + 5);
+                else
+                    g.setMaxValue(g.getMaxValue() - 5);
+            }
+            else if (s == listSetValue)
+            {
+                int index = listSetValue.getSelectedIndex();
+                String element = listSetValue.getString(index);
+                if (element.equals(listSetValueStr[0]))
+                    g.setValue(0);
+                else if (element.equals(listSetValueStr[1]))
+                    g.setValue(g.getMaxValue()/2);
+                else if (element.equals(listSetValueStr[2]))
+                    g.setValue(1);
+            }
+            else if (s == listSetLabel)
+            {
+                int index = listSetLabel.getSelectedIndex();
+                String element = listSetLabel.getString(index);
+                if (element.equals(listSetLabelStr[0]))
+                    g.setLabel("Gauge label which should be too long to fit on one line");
+                else
+                    g.setLabel(null);
+            }
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdOk || c == List.SELECT_COMMAND)
+        {
+            int index = listMethods.getSelectedIndex();
+            String element = listMethods.getString(index);
+            if (element.equals(listMethodsStr[0]))
+                addListSetLabel();
+            if (element.equals(listMethodsStr[1]))
+                addListSetValue();
+            if (element.equals(listMethodsStr[2]))
+                addListSetMaxValue();
+        }
+    }
+}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/ImageItemMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,258 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+/**
+ * This class is to test the various methods of ImageItem
+ *
+ */
+
+public class ImageItemMethods extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet m = null;
+
+    //the ImageItem methods as elements in the listMethodsStr
+    private String listMethodsStr[] = {"SetLabel", "SetImage", "SetLayout"};
+
+    //the ImageItem labels as Strings to setLabel in StringItem
+    private String listSetLabelStr[] = {"Label", "NULL"};
+
+    //the image strings
+    private String listSetImageStr[] = {"Image", "NULL"};
+
+    //the layout strings
+    private String listSetLayoutStr[] = { "CENTER", "DEFAULT", "LEFT", "NEWLINE_AFTER",
+                                          "NEWLINE_BEFORE", "RIGHT"
+                                        };
+
+    //the list to add listMethodsStr
+    private List listMethods = null;
+
+    //the list to add listSetLabelStr
+    private List listSetLabel = null;
+
+    //the list to add listSetImageStr
+    private List listSetImage = null;
+
+    //the list to add listSetLayoutStr
+    private List listSetLayout = null;
+
+    //ImageItem to test
+    private ImageItem imgItem = null;
+
+    //the command to go back to the Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the commmand to invoke the StringItem method for testing
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    //the command to display the listMethods Screen
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    //the command to set the StringItem
+    private Command cmdSet = new Command("Set", Command.OK, 1);
+
+    private Image smallImage = null;
+
+    public ImageItemMethods(MIDlet m)
+    {
+
+        super(m.getClass().getName());
+        this.m = m;
+        try
+        {
+            smallImage  = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        imgItem = new ImageItem("ImageItem", smallImage, ImageItem.LAYOUT_DEFAULT, null);
+        append(imgItem);
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        setCommandListener(this);
+    }
+
+    /**
+     * This method creates the listMethods List and sets the
+     * current screen as listMethods.
+     *
+     */
+    private void addListMethods()
+    {
+        listMethods = new List("Methods", List.IMPLICIT, listMethodsStr, null);
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+    }
+
+    /**
+     * This method creates the listSetLabel List and sets the
+     * current screen as listSetLabel .
+     *
+     */
+    private void addListSetLabel()
+    {
+        listSetLabel = new List("SetLabel", List.IMPLICIT, listSetLabelStr, null);
+        listSetLabel.addCommand(cmdBack);
+        listSetLabel.addCommand(cmdSet);
+        listSetLabel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLabel);
+    }
+
+    /**
+     * This method creates the listSetImage List and sets the
+     * current screen as listSetImage.
+     *
+     */
+    private void addListSetImage()
+    {
+        listSetImage = new List("SetImage", List.IMPLICIT, listSetImageStr, null);
+        listSetImage.addCommand(cmdBack);
+        listSetImage.addCommand(cmdSet);
+        listSetImage.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetImage);
+    }
+
+    /**
+     * This method creates the listSetLayout List and sets the
+     * current screen as listSetLayout.
+     *
+     */
+    private void addListSetLayout()
+    {
+        listSetLayout = new List("SetLayout", List.IMPLICIT, listSetLayoutStr, null);
+        listSetLayout.addCommand(cmdBack);
+        listSetLayout.addCommand(cmdSet);
+        listSetLayout.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLayout);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (s == listMethods)
+                Display.getDisplay(m).setCurrent(this);
+            else if (s == listSetLabel || s == listSetImage || s == listSetLayout)
+                Display.getDisplay(m).setCurrent(listMethods);
+            else
+                FormUpdateTests.show();
+        }
+        else if (c == cmdMethods)
+        {
+            addListMethods();
+            imgItem.setImage(smallImage);
+            imgItem.setLayout(ImageItem.LAYOUT_DEFAULT);
+            imgItem.setLabel("ImageItem");
+        }
+        else if (c == cmdOk)
+        {
+            int index = listMethods.getSelectedIndex();
+            String element = listMethods.getString(index);
+            if (element.equals(listMethodsStr[0]))
+                addListSetLabel();
+            else if (element.equals(listMethodsStr[1]))
+                addListSetImage();
+            else if (element.equals(listMethodsStr[2]))
+                addListSetLayout();
+        }
+        else if (c == cmdSet)
+        {
+            if (s == listSetImage)
+            {
+                int index = listSetImage.getSelectedIndex();
+                String element = listSetImage.getString(index);
+                if (element.equals(listSetImageStr[0]))
+                {
+                    try
+                    {
+                        smallImage  = Image.createImage("/Icon.png");
+                    }
+                    catch (IOException e)
+                    {
+                        System.out.println("Error loading image\n" + e);
+                    }
+                    imgItem.setImage(smallImage);
+                }
+                else if (element.equals(listSetImageStr[1]))
+                    imgItem.setImage(null);
+            }
+            if (s == listSetLabel)
+            {
+                int index = listSetLabel.getSelectedIndex();
+                String element = listSetLabel.getString(index);
+                if (element.equals(listSetLabelStr[0]))
+                    imgItem.setLabel("ImageItem label which should be too long to fit on one line");
+                if (element.equals(listSetLabelStr[1]))
+                    imgItem.setLabel(null);
+            }
+            if (s == listSetLayout)
+            {
+                int index = listSetLayout.getSelectedIndex();
+                String element = listSetLayout.getString(index);
+                if (element.equals(listSetLayoutStr[0]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_CENTER);
+                    imgItem.setLabel("LAYOUT_CENTER");
+                }
+                if (element.equals(listSetLayoutStr[1]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_DEFAULT);
+                    imgItem.setLabel("LAYOUT_DEFAULT");
+                }
+                if (element.equals(listSetLayoutStr[2]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_LEFT);
+                    imgItem.setLabel("LAYOUT_LEFT");
+                }
+                if (element.equals(listSetLayoutStr[3]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_NEWLINE_AFTER);
+                    imgItem.setLabel("LAYOUT_NEWLINE_AFTER");
+                }
+                if (element.equals(listSetLayoutStr[4]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_NEWLINE_BEFORE);
+                    imgItem.setLabel("LAYOUT_NEWLINE_BEFORE");
+                }
+                if (element.equals(listSetLayoutStr[5]))
+                {
+                    imgItem.setLayout(ImageItem.LAYOUT_RIGHT);
+                    imgItem.setLabel("LAYOUT_RIGHT");
+                }
+            }
+            Display.getDisplay(m).setCurrent(this);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/Midp_Form_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2001-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_Form_02 tests.
+ */
+
+public class Midp_Form_02 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new FormUpdateTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/StringItemMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the various methods of StringItem
+ *
+ */
+
+public class StringItemMethods extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet m = null;
+
+    //the StringItem methods as elements in the listMethodsStr
+    private String listMethodsStr[] = {"SetLabel", "SetText"};
+
+    //the StringItem labels as Strings to setLabel in StringItem
+    private String listSetLabelStr[] = {"Label", "NULL"};
+
+    //the StringItem text as Strings to setText in StringItem
+    private String listSetTextStr[] = {"Text", "NULL"};
+
+    //the list to add listMethodsStr
+    private List listMethods = null;
+
+    //the list to add listSetLabelStr
+    private List listSetLabel = null;
+
+    //the list to add listSetTextStr
+    private List listSetText = null;
+
+    //the StringItem to test
+    private StringItem si = null;
+
+    //the command to go back to the Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the commmand to invoke the StringItem method for testing
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    //the command to display the listMethods Screen
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    //the command to set the StringItem
+    private Command cmdSet = new Command("Set", Command.OK, 1);
+
+
+    public StringItemMethods(MIDlet m)
+    {
+
+        super(m.getClass().getName());
+        this.m = m;
+        si = new StringItem("StringItem Label", "StringItem text");
+        append(si);
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        setCommandListener(this);
+    }
+
+    /**
+     * This method creates the listMethods List and sets the
+     * current screen as listMethods.
+     *
+     */
+    private void addListMethods()
+    {
+        listMethods = new List("Methods", List.IMPLICIT, listMethodsStr, null);
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+    }
+
+    /**
+     * This method creates the listSetLabel List and sets the
+     * current screen as listSetLabel .
+     *
+      */
+    private void addListSetLabel()
+    {
+        listSetLabel = new List("SetLabel", List.IMPLICIT, listSetLabelStr, null);
+        listSetLabel.addCommand(cmdBack);
+        listSetLabel.addCommand(cmdSet);
+        listSetLabel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLabel);
+    }
+
+    /**
+     * This method creates the listSetText List and sets the
+     * current screen as listSetText.
+     *
+      */
+    private void addListSetText()
+    {
+        listSetText = new List("SetText", List.IMPLICIT, listSetTextStr, null);
+        listSetText.addCommand(cmdBack);
+        listSetText.addCommand(cmdSet);
+        listSetText.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetText);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (s == listMethods)
+                Display.getDisplay(m).setCurrent(this);
+            else if (s == listSetLabel || s == listSetText)
+                Display.getDisplay(m).setCurrent(listMethods);
+            else
+                FormUpdateTests.show();
+        }
+        else if (c == cmdMethods)
+            addListMethods();
+        else if (c == cmdOk || c == List.SELECT_COMMAND)
+        {
+            int index = listMethods.getSelectedIndex();
+            String element = listMethods.getString(index);
+            if (element.equals(listMethodsStr[0]))
+                addListSetLabel();
+            else if (element.equals(listMethodsStr[1]))
+                addListSetText();
+        }
+        else if (c == cmdSet)
+        {
+            if (s == listSetText)
+            {
+                int index = listSetText.getSelectedIndex();
+                String element = listSetText.getString(index);
+                if (element.equals(listSetTextStr[0]))
+                    si.setText("StringItem text is set");
+                else if (element.equals(listSetTextStr[1]))
+                    si.setText(null);
+            }
+            if (s == listSetLabel)
+            {
+                int index = listSetLabel.getSelectedIndex();
+                String element = listSetLabel.getString(index);
+                if (element.equals(listSetLabelStr[0]))
+                    si.setLabel("StringItem label which should be too long to fit on one line");
+                if (element.equals(listSetLabelStr[1]))
+                    si.setLabel(null);
+            }
+            Display.getDisplay(m).setCurrent(this);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Form_02/src/TextFieldMethods.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,404 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the various methods of TextField
+ *
+ */
+
+public class TextFieldMethods extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet m = null;
+
+    //the TextField methods as elements in the listMethodsStr
+    private String listMethodsStr[] =
+    {
+        "setChars", "setConstraints", "setMaxSize", "setString",
+        "size", "setLabel", "insert(char)", "insert(string)", "remove", "create",
+        "create with 3 lines", "create with 6 lines"
+    };
+
+    private char c1[] =  { 'N', 'O', 'K', 'I', 'A'};
+
+    private char c2[] = { 'M', 'I', 'D', 'P'};
+
+    //the char to be inserted
+    private char insertedChar[] = { 't', 'h', 'e', 'i', 'n', 's', 'e', 'r', 't', 'e', 'd', 'c', 'h',
+                                    'a', 'r'
+                                  };
+
+    private String listSetCharsStr[] = { "NOKIA", "MIDP" };
+
+    //the string to test insert( String )
+    private String insertedStr = "inserted String";
+
+    //the TextField constraints as elements to listSetConstraints list
+    private String listSetConstraintsStr[]=
+    {
+        "ANY", "URL", "PHONENUMBER", "NUMERIC",
+        "EMAILADDR", "PASSWORD", "PWD|EMAILADDR",
+        "PWD|NUMERIC", "PWD|PNO", "PWD|URL",
+        "DECIMAL", "INITAL_CAPS_SENTENCE",
+        "INITIAL_CAPS_WORD", "UNEDITABLE", "NON_PREDICTIVE",
+        "SENSITIVE"
+    };
+
+    //the TextField max size as elements to listSetMaxSize lsit
+    private String listSetMaxSizeStr[] = { "increase", "decrease" };
+
+    //the TextField text as Strings to listSetString list
+    private String listSetStringStr[] = { "String", "NULL" };
+
+    //the TextField labels as elements to listSetLabel list
+    private String listSetLabelStr[] = { "Label", "NULL" };
+
+    //the list to add listMethodsStr
+    private List listMethods = null;
+
+    //the list to add listSetLabelStr
+    private List listSetLabel = null;
+
+    //the list to add listSetStringStr
+    private List listSetString = null;
+
+    //the list to add lsitSetConstraintsStr
+    private List listSetConstraints = null;
+
+    //the list to add listSetMaxSizeStr
+    private List listSetMaxSize = null;
+
+    //the list to add listSetCharsStr1 and listSetCharsStr2
+    private List listSetChars = null;
+
+    //the list to add listInsertStringStr
+    private List listInsertString = null;
+
+    //the TextField to test
+    private TextField tf;
+
+    //the command to go back to the Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the commmand to invoke the StringItem method for testing
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    //the command to display the listMethods Screen
+    private Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    //the command to set the TextField "tf"
+    private Command cmdSet = new Command("Set", Command.SCREEN, 1);
+
+    public TextFieldMethods(MIDlet m)
+    {
+
+        super(m.getClass().getName());
+        this.m = m;
+
+        tf = new TextField("TextField", "This is the text.", 30, TextField.ANY);
+        append(tf);
+
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+        setCommandListener(this);
+        m = FormUpdateTests.getParent();
+        Display.getDisplay(m).setCurrent(this);
+    }
+
+    /**
+     * This method creates the listMethods List and sets the
+     * current screen as listMethods.
+     *
+     */
+    private void addListMethods()
+    {
+        listMethods = new List("Methods", List.IMPLICIT, listMethodsStr, null);
+
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+    }
+
+    /**
+     * This method creates the listSetLabel List and sets the
+     * current screen as listSetLabel .
+     *
+     */
+    private void addListSetLabel()
+    {
+        listSetLabel = new List("SetLabel", List.IMPLICIT, listSetLabelStr, null);
+
+        listSetLabel.addCommand(cmdBack);
+        listSetLabel.addCommand(cmdSet);
+        listSetLabel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetLabel);
+    }
+
+    /**
+     * This method creates the listSetString List and sets the
+     * current screen as listSetString.
+     *
+     */
+    private void addListSetString()
+    {
+        listSetString = new List("SetText", List.IMPLICIT, listSetStringStr, null);
+
+        listSetString.addCommand(cmdBack);
+        listSetString.addCommand(cmdSet);
+        listSetString.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetString);
+    }
+
+    /**
+     * This method creates the listSetChars List and sets the
+     * current screen as listSetChars.
+     *
+     */
+    private void addListSetChars()
+    {
+        listSetChars = new List("SetChars", List.IMPLICIT, listSetCharsStr, null);
+
+        listSetChars.addCommand(cmdBack);
+        listSetChars.addCommand(cmdSet);
+        listSetChars.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetChars);
+    }
+
+    /**
+     * This method creates the listSetConstraints List and sets the
+     * current screen as listSetConstraints.
+     *
+     *@param cScreen the current screen
+     */
+    private void addListSetConstraints()
+    {
+        listSetConstraints = new List("SetConstraints", List.IMPLICIT, listSetConstraintsStr, null);
+
+        listSetConstraints.addCommand(cmdBack);
+        listSetConstraints.addCommand(cmdSet);
+        listSetConstraints.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetConstraints);
+    }
+
+    /**
+     * This method creates the listSetMaxSize List and sets the
+     * current screen as listSetMaxSize.
+     *
+     *@param cScreen the current screen
+     */
+    private void addListSetMaxSize()
+    {
+        listSetMaxSize = new List("SetMaxSize", List.IMPLICIT, listSetMaxSizeStr, null);
+
+        listSetMaxSize.addCommand(cmdBack);
+        listSetMaxSize.addCommand(cmdSet);
+        listSetMaxSize.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSetMaxSize);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (s == listMethods)
+                Display.getDisplay(m).setCurrent(this);
+            else if (s == listSetLabel || s == listSetString || s == listSetMaxSize || s == listSetConstraints
+                     || s == listSetChars)
+                Display.getDisplay(m).setCurrent(listMethods);
+            else
+                FormUpdateTests.show();
+        }
+        else if (c == cmdMethods)
+            addListMethods();
+        else if (c == cmdOk)
+        {
+            int index = listMethods.getSelectedIndex();
+            String element = listMethods.getString(index);
+            if (element.equals(listMethodsStr[0]))
+                addListSetChars();
+            else if (element.equals(listMethodsStr[1]))
+                addListSetConstraints();
+            else if (element.equals(listMethodsStr[2]))
+                addListSetMaxSize();
+            else if (element.equals(listMethodsStr[3]))
+                addListSetString();
+            else if (element.equals(listMethodsStr[4]))
+            {
+                int size = tf.size();
+                Alert sz = new Alert("SIZE", new Integer(size).toString(), null, null);
+                sz.setTimeout(7000);
+                Display.getDisplay(m).setCurrent(sz);
+            }
+            else if (element.equals(listMethodsStr[5]))
+                addListSetLabel();
+            else if (element.equals(listMethodsStr[6]))
+            {
+                try
+                {
+                    tf.insert(insertedChar, 3, 12, 1);
+                    Display.getDisplay(m).setCurrent(this);
+                }
+                catch (IllegalArgumentException  e)
+                {
+                    Alert a = new Alert("INFO", "TextField max size is less than the inserted chars", null, AlertType.INFO);
+                    a.setTimeout(7000);
+                    Display.getDisplay(m).setCurrent(a);
+                }
+            }
+            else if (element.equals(listMethodsStr[8]))
+            {
+                this.delete(0);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            else if (element.equals(listMethodsStr[9]))
+            {
+                tf = new TextField("TextField", "This is the text.", 30, TextField.ANY);
+                append(tf);
+                Display.getDisplay(m).setCurrent(this);
+
+            }
+            else if (element.equals(listMethodsStr[10]))
+            {
+                tf = new TextField("TextField", "TextField With a three(3)lines of text, TextField With a three(3) lines of text.", 100, TextField.ANY);
+                append(tf);
+                Display.getDisplay(m).setCurrent(this);
+
+            }
+            else if (element.equals(listMethodsStr[11]))
+            {
+                tf = new TextField("TextField", "TextField \nWith\na six(6)\nlines\nof text.\nVoila!", 200, TextField.ANY);
+                append(tf);
+                Display.getDisplay(m).setCurrent(this);
+
+            }
+            else if (element.equals(listMethodsStr[7]))
+                try
+                {
+                    tf.insert(insertedStr, 1);
+                    Display.getDisplay(m).setCurrent(this);
+                }
+                catch (IllegalArgumentException  e)
+                {
+                    Alert a = new Alert("INFO", "TextField max size is less than the inserted string", null, AlertType.INFO);
+                    a.setTimeout(7000);
+                    Display.getDisplay(m).setCurrent(a);
+                }
+
+        }
+        else if (c == cmdSet)
+        {
+            if (s == listSetString)
+            {
+                int index = listSetString.getSelectedIndex();
+                String element = listSetString.getString(index);
+                if (element.equals(listSetStringStr[0]))
+                {
+                    tf.setString("Nokia String set");
+                }
+                else if (element.equals(listSetStringStr[1]))
+                {
+                    tf.setString(null);
+                }
+            }
+            if (s == listSetLabel)
+            {
+                int index = listSetLabel.getSelectedIndex();
+                String element = listSetLabel.getString(index);
+                if (element.equals(listSetLabelStr[0]))
+                    tf.setLabel("TextField label which should be too long to fit on one line");
+                if (element.equals(listSetLabelStr[1]))
+                    tf.setLabel(null);
+            }
+            if (s == listSetChars)
+            {
+                int index = listSetChars.getSelectedIndex();
+                String element = listSetChars.getString(index);
+                if (element.equals(listSetCharsStr[0]))
+                    tf.setChars(c1, 0, 5); //I should catch IllegalArgumentException here
+                if (element.equals(listSetCharsStr[1]))
+                    tf.setChars(c2, 0, 4); //I should catch IllegalArgumentException here
+            }
+            if (s == listSetMaxSize)
+            {
+                int index = listSetMaxSize.getSelectedIndex();
+                String element = listSetMaxSize.getString(index);
+                //get the current size of textField and increase/decrease it by 15 everytime
+                int mSize = tf.getMaxSize();
+                if (element.equals(listSetMaxSizeStr[0]))
+                {
+                    tf.setMaxSize(mSize+15);
+                }
+                if (element.equals(listSetMaxSizeStr[1]))
+                {
+                    tf.setMaxSize(mSize-15);
+                }
+            }
+            if (s == listSetConstraints)
+            {
+                int index = listSetConstraints.getSelectedIndex();
+                String element = listSetConstraints.getString(index);
+                if (element.equals(listSetConstraintsStr[0]))
+                    tf.setConstraints(TextField.ANY);
+                if (element.equals(listSetConstraintsStr[1]))
+                    tf.setConstraints(TextField.URL);
+                if (element.equals(listSetConstraintsStr[2]))
+                    tf.setConstraints(TextField.PHONENUMBER);
+                if (element.equals(listSetConstraintsStr[3]))
+                    tf.setConstraints(TextField.NUMERIC);
+                if (element.equals(listSetConstraintsStr[4]))
+                    tf.setConstraints(TextField.EMAILADDR);
+                if (element.equals(listSetConstraintsStr[5]))
+                    tf.setConstraints(TextField.PASSWORD);
+                if (element.equals(listSetConstraintsStr[6]))
+                    tf.setConstraints(TextField.PASSWORD|TextField.EMAILADDR);
+                if (element.equals(listSetConstraintsStr[7]))
+                    tf.setConstraints(TextField.PASSWORD|TextField.NUMERIC);
+                if (element.equals(listSetConstraintsStr[8]))
+                    tf.setConstraints(TextField.PASSWORD|TextField.PHONENUMBER);
+                if (element.equals(listSetConstraintsStr[9]))
+                    tf.setConstraints(TextField.PASSWORD|TextField.URL);
+                if (element.equals(listSetConstraintsStr[10]))
+                    tf.setConstraints(TextField.DECIMAL);
+                if (element.equals(listSetConstraintsStr[11]))
+                    tf.setConstraints(TextField.INITIAL_CAPS_SENTENCE);
+                if (element.equals(listSetConstraintsStr[12]))
+                    tf.setConstraints(TextField.INITIAL_CAPS_WORD);
+                if (element.equals(listSetConstraintsStr[13]))
+                    tf.setConstraints(TextField.UNEDITABLE);
+                if (element.equals(listSetConstraintsStr[14]))
+                    tf.setConstraints(TextField.NON_PREDICTIVE);
+                if (element.equals(listSetConstraintsStr[15]))
+                    tf.setConstraints(TextField.SENSITIVE);
+            }
+            Display.getDisplay(m).setCurrent(this);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Gauge_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Gauge_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Gauge_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Gauge_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Gauge_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/GaugeTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test both the interactive and non-interactive
+ * gauges.
+ *
+ */
+
+public class GaugeTests extends Form implements CommandListener
+{
+
+    //reference to the MIDlet to go to different screens
+    private static Midp_Gauge_01 parent = null;
+
+    //the ChoiceGroup to select gauge types i.e. interactive or non-interactive
+    private ChoiceGroup cg = null;
+
+    //the instance of this class
+    private static GaugeTests instance = null;
+
+    //elements of cg
+    private String[] gTypes = {"Interactive", "Non-interactive", "CONTINUOUS_IDLE", "INCREMENTAL_IDLE", "CONTINUOUS_RUNNING", "INCREMENTAL_UPDATING" };
+
+    //the TextField to enter initial value of the Gauge
+    public TextField iValue = new TextField("initial Value:", "1", 3, TextField.NUMERIC);
+
+    //the TextField to enter max value of the Gauge
+    public TextField mValue = new TextField("maximum Value:", "10", 3, TextField.NUMERIC);
+
+    //invokes to create the Gauge according to the gauge types
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor creates ChoiceGroup "cg" and appends to this form.
+     * It also appends TextFields iValue and mValue for the user to enter the
+     * initial and max values of the Gauge to create.
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public GaugeTests(Midp_Gauge_01 parent)
+    {
+
+        //set the name of the form to be the name of MIDlet
+        super(parent.getClass().getName());
+        this.parent = parent;
+        cg = new ChoiceGroup("Select Gauge type:", Choice.EXCLUSIVE, gTypes, null);
+        append(cg);
+        //append TextFields
+        append(iValue);
+        append(mValue);
+        addCommand(cmdOk);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //show this screen
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     * get the string fron the iValue and convert it
+     * to int.
+     *
+     *@return int  the iValue
+     */
+    public int getInitialValue()
+    {
+        String s = iValue.getString();
+        int iValue = Integer.parseInt(s);
+        return iValue;
+    }
+
+    /**
+     * get the string fron the mValue and convert it
+     * to int.
+     *
+     *@return int  the mValue
+     */
+    public int getMaxValue()
+    {
+        String s = mValue.getString();
+        int mValue = Integer.parseInt(s);
+        return mValue;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        boolean type = true;
+        if (t.equals(gTypes[0]))
+        {
+            type = true;
+        }
+        else
+        {
+            type = false;
+        }
+        if (c == cmdOk)
+        {
+            if (t.equals(gTypes[2]))
+            {
+                Display.getDisplay(parent).setCurrent(new GaugeTypes(type, this, t));
+            }
+            else if (t.equals(gTypes[3]))
+            {
+                Display.getDisplay(parent).setCurrent(new GaugeTypes(type, this, t));
+            }
+            else if (t.equals(gTypes[4]))
+            {
+                Display.getDisplay(parent).setCurrent(new GaugeTypes(type, this, t));
+            }
+            else if (t.equals(gTypes[5]))
+            {
+                Display.getDisplay(parent).setCurrent(new GaugeTypes(type, this, t));
+            }
+            else
+            {
+                Display.getDisplay(parent).setCurrent(new GaugeTypes(type, this, t));
+            }
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/GaugeTypes.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the inital and maximum values of
+ * interactive and non-interactive gauges.
+ *
+ */
+
+public class GaugeTypes extends Form implements CommandListener
+{
+
+    //reference to the parent MIDlet
+    private MIDlet parent = null;
+
+    //reference to the GaugeTests
+    private GaugeTests gt = null;
+
+    //the Gauge to test
+    private Gauge g = null;
+
+    private String[] gTypes = {"Interactive", "Non-interactive", "CONTINUOUS_IDLE", "INCREMENTAL_IDLE", "CONTINUOUS_RUNNING", "INCREMENTAL_UPDATING" };
+
+    //command to go back to the GaugeTests screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the command to get the value of Gaguge "g"
+    private Command cmdGetValue = new Command("getValue", Command.SCREEN, 1);
+
+    //the command to get the max value of Gauge "g"
+    private Command cmdGetMaxValue = new Command("getMaxValue", Command.SCREEN, 1);
+    private Command cmdOk = new Command("Ok", Command.SCREEN, 1);
+
+    /**
+     *
+     *@parm type the boolean to select the type of the Gauge
+     *@param gt The reference to the GaugeTests object
+     */
+    public GaugeTypes(boolean type, GaugeTests gt, String value)
+    {
+
+        super(" ");
+        this.gt = gt;
+        if (type)
+        {
+            g = new Gauge("Interactive", type, gt.getMaxValue(), gt.getInitialValue());
+        }
+        else
+        {
+            if (value.equals(gTypes[1]))
+                g = new Gauge("Non-interactive", type, gt.getMaxValue(), gt.getInitialValue());
+            else if (value.equals(gTypes[2]))
+                g = new Gauge("CONTINUOUS_IDLE", type, Gauge.INDEFINITE, Gauge.CONTINUOUS_IDLE);
+            else if (value.equals(gTypes[3]))
+                g = new Gauge("INCREMENTAL_IDLE", type, Gauge.INDEFINITE, Gauge.INCREMENTAL_IDLE);
+            else if (value.equals(gTypes[4]))
+                g = new Gauge("CONTINUOUS_RUNNING", type, Gauge.INDEFINITE, Gauge.CONTINUOUS_RUNNING);
+            else if (value.equals(gTypes[5]))
+                g = new IndicatorRunnable();
+        }
+
+        append(g);
+        addCommand(cmdBack);
+        addCommand(cmdGetMaxValue);
+        addCommand(cmdGetValue);
+        addCommand(cmdOk);
+        g.setDefaultCommand(cmdGetValue);
+        setCommandListener(this);
+
+        parent = gt.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            GaugeTests.show();
+        else if (c == cmdGetValue)
+            showAlert(g.getValue());
+        else if (c == cmdGetMaxValue)
+            showAlert(g.getMaxValue());
+        else if (c == cmdOk)
+        {
+            Alert testAlert = null;
+            try
+            {
+                testAlert = new Alert("Container");
+                testAlert.setIndicator(g);
+                g.setLabel("Test");
+            }
+            catch (IllegalStateException ex)
+            {
+                //Test is passed
+                Alert iseAlert = new Alert("Illegal State",ex.toString(),null, AlertType.ERROR);
+                Display.getDisplay(parent).setCurrent(iseAlert);
+
+            }
+            catch (Exception ex)
+            {
+                //test is failed
+                Alert eAlert = new Alert("Wrong Exception","Wrong Exception was thrown: "+ex.toString(),null, AlertType.ERROR);
+                Display.getDisplay(parent).setCurrent(eAlert);
+            }
+            finally
+            {
+                testAlert.setIndicator(null);
+            }
+        }
+    }
+
+    /**
+     *  shows the alert with the value
+     *
+     *@param value the value
+     */
+    private void showAlert(int value)
+    {
+        Alert alert = new Alert("Value", "Value is: " + value, null, null);
+        alert.setTimeout(Alert.FOREVER);
+        Display.getDisplay(parent).setCurrent(alert);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/IndicatorRunnable.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class IndicatorRunnable extends Gauge implements Runnable
+{
+
+    private boolean run = false;
+    public IndicatorRunnable()
+    {
+        super("INCREMENTAL_UPDATING", false,  Gauge.INDEFINITE, Gauge.INCREMENTAL_IDLE);
+        new Thread(this).start();
+    }
+
+    public void setGo()
+    {
+        new Thread(this).start();
+    }
+
+    public void run()
+    {
+        while (!run)
+        {
+            setValue(Gauge.INCREMENTAL_UPDATING);
+            try
+            {
+                Thread.currentThread().sleep(500);
+            }
+            catch (InterruptedException err)
+            {
+                System.out.print(err.toString());
+            }
+        }
+    }
+    void setRun()
+    {
+        run = true;
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Gauge_01/src/Midp_Gauge_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_Gauge_01 tests.
+ */
+
+public class Midp_Gauge_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new GaugeTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_General_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_General_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_General_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_General_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.0"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_02/src/Midp_General_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class Midp_General_02 extends MIDlet
+{
+
+    TextBox tb;
+    Display display;
+
+    public Midp_General_02()
+    {
+        tb = new TextBox("TextBox", null, 1000, TextField.ANY);
+        display = Display.getDisplay(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        display.setCurrent(tb);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_04/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_General_04" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_General_04"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_General_04"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_General_04"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.0"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_04/src/Midp_General_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class Midp_General_04 extends MIDlet
+{
+
+    private Alert alert;
+    private Display display;
+
+    public Midp_General_04()
+    {
+        alert = new Alert("Alert title", "Alert Text", null, AlertType.INFO);
+        display = Display.getDisplay(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        display.setCurrent(alert);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_05/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_General_05" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_General_05"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_General_05"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_General_05"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.0"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_General_05/src/Midp_General_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class Midp_General_05 extends MIDlet
+{
+
+    private Canvas canvas;
+    private Display display;
+
+    public Midp_General_05()
+    {
+        display = Display.getDisplay(this);
+        canvas = new EmptyCanvas();
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        display.setCurrent(canvas);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
+class EmptyCanvas extends Canvas
+{
+    protected void paint(Graphics g)
+    {
+        g.setColor(0, 0, 0);
+        g.drawString("Empty Canvas", getWidth()/2, getHeight()/2, Graphics.TOP | Graphics.HCENTER);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_ImageItem_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_ImageItem_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_ImageItem_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_ImageItem_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/BigImageH.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/BigImageW.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/bigImage.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw_micro.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_ImageItem_01/res/jigsaw_small.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/ImageItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ *
+ */
+
+public class ImageItemTests extends List implements CommandListener
+{
+
+    //This is the reference to parent MIDlet so that various test screen can use
+    // use it
+    private static Midp_ImageItem_01 parent = null;
+
+    //the this instance
+    private static ImageItemTests instance = null;
+
+    //The elements in "this" list
+    private String[] tests = {"Test1", "Test2", "Test3", "Test4", "Test5"};
+
+    //img to be used for Test1
+    private Image bigImageW = null;
+
+    //img to be used for Test2
+    private Image bigImageH = null;
+
+    //img to be used for Test3
+    private Image bigImage = null;
+
+    //The command to invoke the tests
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * The constructor appends the this list elements and sets
+     * the label of the list to be the MIDlet class name and sets
+     * the current displayable this list.
+     *
+     * @param  parent  is the parent midlet for this class used so that the
+     * displayable can control its own behavior.
+     */
+    public ImageItemTests(Midp_ImageItem_01 parent)
+    {
+        super(parent.getClass().getName(), List.IMPLICIT);
+        this.parent = parent;
+
+        for (int i = 0; i< tests.length; i++)
+            append(tests[i], null);
+        //add Ok command to this list
+        addCommand(cmdOk);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //set this list as the current display
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdOk)
+        {
+            int index = instance.getSelectedIndex();
+            String t = instance.getString(index);
+            if (t.equals(tests[0]))
+            {
+                bigImageW = Images.getInstance().bigImageW;
+                Display.getDisplay(parent).setCurrent(new Test1(bigImageW));
+            }
+            else if (t.equals(tests[1]))
+            {
+                bigImageH = Images.getInstance().bigImageH;
+                Display.getDisplay(parent).setCurrent(new Test1(bigImageH));
+            }
+            else if (t.equals(tests[2]))
+            {
+                bigImage = Images.getInstance().bigImage;
+                Display.getDisplay(parent).setCurrent(new Test1(bigImage));
+            }
+            else if (t.equals(tests[3]))
+                Display.getDisplay(parent).setCurrent(new Test2());
+            else if (t.equals(tests[4]))
+                Display.getDisplay(parent).setCurrent(new Test5(parent));
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the needed images to test Midp_ImageItem_01
+ *
+ */
+
+public class Images
+{
+
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The big image which exceeds the width of the screen
+     */
+    public Image bigImageW = null;
+
+    /**
+     *  The big image which exceeds the height of the screen
+     */
+    public Image bigImageH = null;
+
+    /**
+     *  The big image which exceeds the height and width of the screen
+     */
+    public Image bigImage = null;
+
+    /**
+     *  The small jigsaw image
+     */
+    public Image smallJigsaw = null;
+
+    /**
+     *  The micro jigsaw image
+     */
+    public Image microJigsaw = null;
+
+    /**
+     *  The normal jigsaw image
+     */
+    public Image jigsaw = null;
+
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            bigImage = Image.createImage("/bigImage.png");
+            bigImageW  = Image.createImage("/BigImageW.png");
+            bigImageH  = Image.createImage("/BigImageH.png");
+            smallJigsaw = Image.createImage("/jigsaw_small.png");
+            microJigsaw = Image.createImage("/jigsaw_micro.png");
+            jigsaw = Image.createImage("/jigsaw.png");
+        }
+        catch (Exception e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+            instance = new Images();
+        return instance;
+    }
+    //end method
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Midp_ImageItem_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_ImageItem_01 tests.
+ */
+
+public class Midp_ImageItem_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ImageItemTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is the class to test ImageItems tests:
+ * 1.Big image which exceed the width of the screen
+ * 2.Big image which exceed the height of the screen
+ */
+
+public class Test1 extends Form implements CommandListener
+{
+
+    //Command to go back to the ImageItemTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //ImageItem to test
+    private ImageItem imgItem = null;
+
+    //text for imgItem
+    private final String text = "Test1 Image";
+
+    public Test1(Image img)
+    {
+        super("ImageItem tests");
+        //create imgItem and append to the Form
+        imgItem = new ImageItem("ImageItem", img,
+                                ImageItem.LAYOUT_DEFAULT, text);
+        //append imgItem to this Form
+        append(imgItem);
+
+        //add Commands
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ImageItemTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,385 @@
+/*
+* 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:
+*
+*/
+
+//import midp classes
+import javax.microedition.lcdui.*;
+import javax.microedition.midlet.*;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * This is the class to test the ImageItems Layouts
+ *
+ *  added layout for every StringItem
+ */
+public class Test2 extends Form implements CommandListener
+{
+
+    private Command prevCommand;
+    private Command changeCommand;
+    private Command backCommand;
+
+    private Command toggleSizeCommand;
+
+    private Image jigsaw_large = null;
+    private Image jigsaw_small = null;
+    private Image jigsaw_micro = null;
+    private Image jigsaw = null;
+
+    public Test2()
+    {
+        super("Layout test");
+        backCommand = new Command("Back", Command.SCREEN, 5);
+        prevCommand = new Command("Prev", Command.SCREEN, 2);
+        changeCommand = new Command("Next", Command.SCREEN, 1);
+        toggleSizeCommand = new Command("Toggle size", Command.SCREEN, 4);
+
+        jigsaw = jigsaw_large = Images.getInstance().jigsaw;
+        jigsaw_small = Images.getInstance().smallJigsaw;
+        jigsaw_micro = Images.getInstance().microJigsaw;
+
+        Item s1 = new StringItem("","");
+        Item s2 = new StringItem("","This is an ImageItem layouting test.");
+        Item s3 = new StringItem("","");
+        Item s4 = new StringItem("","");
+        Item s5 = new StringItem("","");
+        append(s1);
+        append(s2);
+        append(s3);
+        append(s4);
+        append(s5);
+
+        addCommand(prevCommand);
+        addCommand(changeCommand);
+        addCommand(backCommand);
+        addCommand(toggleSizeCommand);
+
+        setCommandListener(this);
+    }
+
+    static int change = -1;
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == prevCommand)
+        {
+            change--;
+            changeForm();
+        }
+        else if (c == changeCommand)
+        {
+            change++;
+            changeForm();
+        }
+        else if (c == backCommand)
+        {
+            ImageItemTests.show();
+        }
+        else if (c == toggleSizeCommand)
+        {
+            if (jigsaw == jigsaw_large)
+            {
+                jigsaw = jigsaw_small;
+            }
+            else if (jigsaw == jigsaw_small)
+            {
+                jigsaw = jigsaw_micro;
+            }
+            else
+            {
+                jigsaw = jigsaw_large;
+            }
+            changeForm();
+        }
+    }
+
+    private void changeForm()
+    {
+        Item s1 = null;
+        Item s2 = null;
+        Item s3 = null;
+        Item s4 = null;
+        Item jigsawItem = null;
+        Item jigsawItem2 = null;
+        Item jigsawItem3 = null;
+
+        Item testStr = new StringItem("","This is an ImageItem layouting test.");
+        Item empty1 = new StringItem("","");
+        Item empty2 = new StringItem("","");
+        Item empty3 = new StringItem("","");
+        Item empty4 = new StringItem("","");
+
+        switch (change)
+        {
+        case -1:
+            setTitle("Layout test");
+            set(0, empty1);
+            set(1, testStr);
+            set(2, empty2);
+            set(3, empty3);
+            set(4, empty4);
+            break;
+        case 0:
+            setTitle("DEFAULT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_DEFAULT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_DEFAULT);
+            s2.setLayout(Item.LAYOUT_DEFAULT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 1:
+            setTitle("LEFT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_LEFT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 2:
+            setTitle("RIGHT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_RIGHT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 3:
+            setTitle("CENTER");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_CENTER, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 4:
+            setTitle("NEWLINE_BEFORE");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 5:
+            setTitle("NEWLINE_AFTER");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_AFTER, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 6:
+            setTitle("NEWLINE_BEFORE|AFTER");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 7:
+            setTitle("NEWLINE_BEFORE|LEFT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_LEFT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 8:
+            setTitle("NEWLINE_BEFORE|RIGHT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_RIGHT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 9:
+            setTitle("NEWLINE_BEFORE|CENTER");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_CENTER, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 10:
+            setTitle("NEWLINE_AFTER|LEFT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_LEFT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 11:
+            setTitle("NEWLINE_AFTER|RIGHT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_RIGHT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 12:
+            setTitle("NEWLINE_AFTER|CENTER");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_CENTER, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 13:
+            setTitle("NEWLINE_BEFORE|AFTER|LEFT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_LEFT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 14:
+            setTitle("NEWLINE_BEFORE|AFTER|RIGHT");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_RIGHT, "Jigsaw.");
+            s1.setLayout(Item.LAYOUT_LEFT);
+            s2.setLayout(Item.LAYOUT_LEFT);
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            break;
+        case 15:
+            setTitle("NEWLINE_BEFORE|AFTER|CENTER");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER | ImageItem.LAYOUT_CENTER, "Jigsaw.");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, s2);
+            set(3, empty1);
+            break;
+        case 16:
+            setTitle("2 DEFAULT Images");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_DEFAULT, "Jigsaw.");
+            jigsawItem2 = new ImageItem("", jigsaw_micro, ImageItem.LAYOUT_DEFAULT, "Jigsaw micro.");
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, jigsawItem2);
+            set(3, s2);
+            set(4, empty1);
+            break;
+        case 17:
+            s1 = new StringItem("", "Lorem ipsum ");
+            s2 = new StringItem("", " dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                    " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                    " urna, hendrerit id fringilla eu, feugiat blandit tellus.");
+
+            setTitle("3 DEFAULT Images");
+            jigsawItem = new ImageItem("", jigsaw, ImageItem.LAYOUT_DEFAULT, "Jigsaw.");
+            jigsawItem2 = new ImageItem("", jigsaw_micro, ImageItem.LAYOUT_DEFAULT, "Jigsaw micro.");
+            jigsawItem3 = new ImageItem("", jigsaw_small, ImageItem.LAYOUT_DEFAULT, "Jigsaw small.");
+            set(0, s1);
+            set(1, jigsawItem);
+            set(2, jigsawItem2);
+            set(3, jigsawItem3);
+            set(4, s2);
+            break;
+        case 18:
+            change = -1;
+            changeForm();
+            return;
+        default:
+            change = 17;
+            changeForm();
+            return;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_ImageItem_01/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,372 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test all the ImageForm tests
+ *
+ */
+
+public class Test5 extends Form implements CommandListener, ItemCommandListener
+{
+
+    //referemce to the parent MIDlet
+    private MIDlet m = null;
+
+    //the form to add the ImageItems
+    private Form imageItemForm = null;
+
+    //the label to create the ImageItem
+    private TextField label = null;
+    //the text to create the ImageItem
+    private TextField width = null;
+    //the text to create the ImageItem
+    private TextField height = null;
+    //the ImageItem to test
+    private ImageItem imgItem = null;
+
+    private Image jigsaw_small = null;
+    private Image jigsaw_micro = null;
+    private Image jigsaw = null;
+
+    private ChoiceGroup cg = null;
+    private ChoiceGroup cgImages = null;
+    private String[] cgTypes = {"LAYOUT_DEFAULT","LAYOUT_LEFT","LAYOUT_RIGHT","LAYOUT_CENTER","LAYOUT_TOP","LAYOUT_BOTTOM",
+                                "LAYOUT_VCENTER","LAYOUT_NEWLINE_BEFORE","LAYOUT_NEWLINE_AFTER","LAYOUT_SHRINK","LAYOUT_VSHRINK",
+                                "LAYOUT_EXPAND","LAYOUT_VEXPAND"
+                               };
+
+    private String[] cgImageTypes = {"Normal","Small","Micro","Null"};
+
+    //the command to go back to the main screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the command to create the ImageItem with the entered label and text
+    private Command cmdCreate = new Command("Create", Command.SCREEN, 1);
+
+    //the command to create the ImageItem with the entered label and text and with focus
+    private Command cmdCreateHL = new Command("Create as Hyperlink", Command.SCREEN, 1);
+
+    //the command to create the ImageItem with the entered label and text and with focus
+    private Command cmdCreateButton = new Command("Create as Button", Command.SCREEN, 1);
+
+    //the command to unlock the Item
+    private Command cmdUnlock = new Command("Unlock", Command.SCREEN, 1);
+
+    //the command for layout test
+    private Command cmdLayout = new Command("Layout Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdLayoutButton = new Command("Layout Button Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdLayoutHL = new Command("Layout Hyperlink Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayout = new Command("Vertical Layout Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayoutHL = new Command("Vertical Layout Hyperlink Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayoutButton = new Command("Vertical Layout Button Test", Command.SCREEN, 1);
+
+    public Test5(MIDlet m)
+    {
+        //set the name of the form to be the name of MIDlet
+        super("Test 5");
+        this.m = m;
+
+        //create TextFields
+        label = new TextField("Label:", null, 200, TextField.ANY);
+        width = new TextField("Set preferred width:", null, 5, TextField.NUMERIC);
+        height = new TextField("Set preferred height:", null, 5, TextField.NUMERIC);
+        cgImages = new ChoiceGroup("Image:",ChoiceGroup.EXCLUSIVE,cgImageTypes,null);
+        cg = new ChoiceGroup("Layout:",ChoiceGroup.EXCLUSIVE,cgTypes,null);
+
+        jigsaw = Images.getInstance().jigsaw;
+        jigsaw_small = Images.getInstance().smallJigsaw;
+        jigsaw_micro = Images.getInstance().microJigsaw;
+
+        append(label);
+        append(width);
+        append(height);
+        append(cgImages);
+        append(cg);
+        addCommand(cmdCreate);
+        addCommand(cmdCreateHL);
+        addCommand(cmdCreateButton);
+        addCommand(cmdLayout);
+        addCommand(cmdLayoutHL);
+        addCommand(cmdLayoutButton);
+        addCommand(cmdVLayout);
+        addCommand(cmdVLayoutHL);
+        addCommand(cmdVLayoutButton);
+        setCommandListener(this);
+
+        Display.getDisplay(m).setCurrent(this);
+
+        //create ImageItemForm
+        imageItemForm = new Form("ImageItem");
+        imageItemForm.addCommand(cmdBack);
+        imageItemForm.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            label.setString(null);
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdLayout)
+        {
+
+            layoutTest(Item.PLAIN);
+
+        }
+        else if (c == cmdLayoutHL)
+        {
+
+            layoutTest(Item.HYPERLINK);
+
+        }
+        else if (c == cmdLayoutButton)
+        {
+
+            layoutTest(Item.BUTTON);
+
+        }
+        else if (c == cmdVLayout)
+        {
+
+            verticalLayoutTest(Item.PLAIN);
+
+        }
+        else if (c == cmdVLayoutHL)
+        {
+
+            verticalLayoutTest(Item.HYPERLINK);
+
+        }
+        else if (c == cmdVLayoutButton)
+        {
+
+            verticalLayoutTest(Item.BUTTON);
+
+        }
+        else
+        {
+            String l = label.getString();
+            String alt = "AltText";
+            int imgindex = cgImages.getSelectedIndex();
+            String img = cgImages.getString(imgindex);
+            int index = cg.getSelectedIndex();
+            String lo = cg.getString(index);
+            int layout = 0;
+            int mode = 0;
+
+            if (c == cmdCreate)
+                mode = Item.PLAIN;
+            else if (c == cmdCreateHL)
+            {
+                mode = Item.HYPERLINK;
+            }
+            else if (c == cmdCreateButton)
+            {
+                mode = Item.BUTTON;
+            }
+
+            if (lo.equals(cgTypes[0]))
+            {
+                layout = Item.LAYOUT_DEFAULT;
+            }
+            else if (lo.equals(cgTypes[1]))
+            {
+                layout = Item.LAYOUT_LEFT;
+            }
+            else if (lo.equals(cgTypes[2]))
+            {
+                layout = Item.LAYOUT_RIGHT;
+            }
+            else if (lo.equals(cgTypes[3]))
+            {
+                layout = Item.LAYOUT_CENTER;
+            }
+            else if (lo.equals(cgTypes[4]))
+            {
+                layout = Item.LAYOUT_TOP;
+            }
+            else if (lo.equals(cgTypes[5]))
+            {
+                layout = Item.LAYOUT_BOTTOM;
+            }
+            else if (lo.equals(cgTypes[6]))
+            {
+                layout = Item.LAYOUT_VCENTER;
+            }
+            else if (lo.equals(cgTypes[7]))
+            {
+                layout = Item.LAYOUT_NEWLINE_BEFORE;
+            }
+            else if (lo.equals(cgTypes[8]))
+            {
+                layout = Item.LAYOUT_NEWLINE_AFTER;
+            }
+            else if (lo.equals(cgTypes[9]))
+            {
+                layout = Item.LAYOUT_SHRINK;
+            }
+            else if (lo.equals(cgTypes[10]))
+            {
+                layout = Item.LAYOUT_VSHRINK;
+            }
+            else if (lo.equals(cgTypes[11]))
+            {
+                layout = Item.LAYOUT_EXPAND;
+            }
+            else if (lo.equals(cgTypes[12]))
+            {
+                layout = Item.LAYOUT_VEXPAND;
+            }
+
+            if (img.equals(cgImageTypes[0]))
+            {
+                imgItem = new ImageItem(l, jigsaw, layout, alt, mode);
+            }
+            else if (img.equals(cgImageTypes[1]))
+            {
+                imgItem = new ImageItem(l, jigsaw_small, layout, alt, mode);
+            }
+            else if (img.equals(cgImageTypes[2]))
+            {
+                imgItem = new ImageItem(l, jigsaw_micro, layout, alt, mode);
+            }
+            else if (img.equals(cgImageTypes[3]))
+            {
+                imgItem = new ImageItem(l, null, layout, alt, mode);
+            }
+
+            if (mode == Item.HYPERLINK || mode == Item.BUTTON)
+            {
+                imgItem.setDefaultCommand(cmdBack);
+                imgItem.setDefaultCommand(cmdUnlock);
+            }
+
+            imgItem.setItemCommandListener(this);
+            setSize(width.getString(),height.getString());
+            imgItem.setLayout(layout);
+            imageItemForm.append(imgItem);
+            Display.getDisplay(m).setCurrent(imageItemForm);
+        }
+    }
+    private void setSize(String width, String height)
+    {
+        if (width.equals("") && height.equals(""))
+        {
+            imgItem.setPreferredSize(-1,-1);
+        }
+        else if (height.equals(""))
+        {
+            imgItem.setPreferredSize(Integer.parseInt(width),-1);
+        }
+        else if (width.equals(""))
+        {
+            imgItem.setPreferredSize(-1,Integer.parseInt(height));
+        }
+        else
+        {
+            imgItem.setPreferredSize(Integer.parseInt(width),Integer.parseInt(height));
+        }
+    }
+    private void layoutTest(int mode)
+    {
+        imageItemForm.deleteAll();
+        imgItem = new ImageItem("Default Layout",jigsaw_small,ImageItem.LAYOUT_DEFAULT,"ImageItem",mode);
+        ImageItem si2 = new ImageItem("Layout Right",jigsaw_small,ImageItem.LAYOUT_RIGHT,"ImageItem",mode);
+        ImageItem si3 = new ImageItem("Layout Left",jigsaw_small,ImageItem.LAYOUT_LEFT,"ImageItem",mode);
+        ImageItem si4 = new ImageItem("Layout Center",jigsaw_small,ImageItem.LAYOUT_CENTER,"ImageItem",mode);
+        ImageItem si5 = new ImageItem("Layout Expand",jigsaw_small,ImageItem.LAYOUT_EXPAND | ImageItem.LAYOUT_NEWLINE_BEFORE,"ImageItem",mode);
+        si5.setDefaultCommand(cmdBack);
+
+        if (mode != Item.PLAIN)
+        {
+            imgItem.setDefaultCommand(cmdBack);
+            si2.setDefaultCommand(cmdBack);
+            si3.setDefaultCommand(cmdBack);
+            si4.setDefaultCommand(cmdBack);
+        }
+        imageItemForm.append(imgItem);
+        imageItemForm.append(si2);
+        imageItemForm.append(si3);
+        imageItemForm.append(si4);
+        imageItemForm.append(si5);
+
+        Display.getDisplay(m).setCurrent(imageItemForm);
+    }
+
+    private void verticalLayoutTest(int mode)
+    {
+        imageItemForm.deleteAll();
+        imgItem = new ImageItem("Default",jigsaw_small,ImageItem.LAYOUT_DEFAULT,"ImageItem",mode);
+        imgItem.setPreferredSize(-1,150);
+
+        ImageItem si7 = new ImageItem("Top",jigsaw_small,ImageItem.LAYOUT_TOP,"ImageItem",mode);
+        ImageItem si8 = new ImageItem("Vcenter",jigsaw_small,ImageItem.LAYOUT_VCENTER,"ImageItem",mode);
+        ImageItem si9 = new ImageItem("Vexpand",jigsaw_small,ImageItem.LAYOUT_VEXPAND,"ImageItem",mode);
+
+        if (mode != Item.PLAIN)
+        {
+            imgItem.setDefaultCommand(cmdBack);
+            si7.setDefaultCommand(cmdBack);
+            si8.setDefaultCommand(cmdBack);
+            si9.setDefaultCommand(cmdBack);
+        }
+        imageItemForm.append(imgItem);
+        imageItemForm.append(si7);
+        imageItemForm.append(si8);
+        imageItemForm.append(si9);
+
+        Display.getDisplay(m).setCurrent(imageItemForm);
+    }
+    public void commandAction(Command c, Item i)
+    {
+        if (c == cmdBack)
+        {
+            imgItem = null;
+            label.setString(null);
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdUnlock)
+        {
+            i.setPreferredSize(-1,-1);
+        }
+    }
+}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Item_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Item_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Item_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Item_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Item_01/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_01/src/ItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,286 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+/**
+ *
+ *  changed Append2 ImageItem so that StringItem has different layout than ImageItem.
+ */
+
+public class ItemTests extends Form implements CommandListener
+{
+
+    //reference to the MIDlet to go to different screens
+    private static Midp_Item_01 parent = null;
+
+    private String appendItems[] = {"StringItem1", "ImageItem", "ChoiceGroup", "DateField",
+                                    "Gauge", "TextField", "StringItem2"
+                                   };
+
+    //cg elements
+    private String cgElements[] = {"element1", "element2", "element3", "element4", "element5", "element6"};
+
+    private List list1, list2, list3, list4;
+
+    private Command cmdAppend1 =new Command("Append1", Command.SCREEN, 1);
+
+    private Command cmdAppend2 =new Command("Append2", Command.SCREEN, 1);
+
+    private Command cmdAppend3 =new Command("Append3", Command.SCREEN, 1);
+
+    private Command cmdAppend4 =new Command("Append4", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private StringItem str1, str2, str3;
+
+    private ChoiceGroup cg1;
+
+    private Gauge g1;
+
+    private DateField df1;
+
+    private TextField tf1;
+
+    private ImageItem imgItem1;
+
+    private Image image = null;
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ItemTests(Midp_Item_01 parent)
+    {
+        super(parent.getClass().getName());
+        this.parent = parent;
+        str1 = new StringItem("StringItem", "Text");
+        str2 = new StringItem("NewStringItem1", "Text");
+        str3 = new StringItem("\nNewStringItem2", "Text");
+        try
+        {
+            image = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        imgItem1 = new ImageItem("ImageItem", image,
+                                 Item.LAYOUT_NEWLINE_BEFORE, null);
+
+        cg1 = new ChoiceGroup("ChoiceGroup", Choice.EXCLUSIVE, cgElements, null);
+        df1 = new DateField("DateField", DateField.DATE_TIME);
+        tf1 = new TextField("TextField", null, 100, TextField.ANY);
+        g1= new Gauge("Interactive Gauge", true, 50, 10);
+
+        list1 = new List("Insert Item", Choice.IMPLICIT);
+        list2 = new List("Insert Item", Choice.IMPLICIT);
+        list3 = new List("Insert Item", Choice.IMPLICIT);
+        list4 = new List("Insert Item", Choice.IMPLICIT);
+        for (int i= 0; i<appendItems.length; i++)
+            list1.append(appendItems[i], null);
+        for (int i= 0; i<appendItems.length-1; i++)
+        {
+            list2.append(appendItems[i], null);
+            list3.append(appendItems[i], null);
+            list4.append(appendItems[i], null);
+        }
+        list1.setCommandListener(this);
+        list2.setCommandListener(this);
+        list3.setCommandListener(this);
+        list4.setCommandListener(this);
+        append(str1);
+        addCommand(cmdAppend1);
+        addCommand(cmdAppend2);
+        addCommand(cmdAppend3);
+        addCommand(cmdAppend4);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    private void deleteItems()
+    {
+        int size = size();
+        if (size>0)
+        {
+            for (int i=1; i<size; i++)
+                delete(i);
+        }
+    }
+
+    private void appendCg(int layout)
+    {
+        cg1.setLayout(layout);
+        append(cg1);
+    }
+
+    private void appendDf(int layout)
+    {
+        df1.setLayout(layout);
+        append(df1);
+    }
+    private void appendG(int layout)
+    {
+        g1.setLayout(layout);
+        append(g1);
+    }
+    private void appendImgItem(int layout)
+    {
+        imgItem1.setLayout(layout);
+        System.out.println(imgItem1.getLayout());
+        append(imgItem1);
+    }
+
+    private void appendSi(int layout)
+    {
+        str2.setLayout(layout);
+        append(str2);
+    }
+
+    private void appendTf(int layout)
+    {
+        tf1.setLayout(layout);
+        append(tf1);
+    }
+
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == List.SELECT_COMMAND)
+        {
+            imgItem1.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+            str1.setLayout(Item.LAYOUT_DEFAULT);
+            str2.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+            if (s == list1)
+            {
+                int i = list1.getSelectedIndex();
+                String item = list1.getString(i);
+                deleteItems();
+                if (item.equals(appendItems[0]))
+                    append(str2);
+                if (item.equals(appendItems[1]))
+                    append(imgItem1);
+                if (item.equals(appendItems[2]))
+                    append(cg1);
+                if (item.equals(appendItems[3]))
+                    append(df1);
+                if (item.equals(appendItems[4]))
+                    append(g1);
+                if (item.equals(appendItems[5]))
+                    append(tf1);
+                if (item.equals(appendItems[6]))
+                    append(str3);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+            if (s == list2)
+            {
+                int id = list2.getSelectedIndex();
+                String text = list2.getString(id);
+                deleteItems();
+                if (text.equals(appendItems[0]))
+                    appendSi(Item.LAYOUT_LEFT);
+                if (text.equals(appendItems[1]))
+                {//different layout for StringItem that IageItem has
+                    str1.setLayout(Item.LAYOUT_CENTER);
+                    appendImgItem(Item.LAYOUT_LEFT);
+                }
+                if (text.equals(appendItems[2]))
+                    appendCg(Item.LAYOUT_LEFT);
+                if (text.equals(appendItems[3]))
+                    appendDf(Item.LAYOUT_LEFT);
+                if (text.equals(appendItems[4]))
+                    appendG(Item.LAYOUT_LEFT);
+                if (text.equals(appendItems[5]))
+                    appendTf(Item.LAYOUT_LEFT);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+            if (s == list3)
+            {
+                int id = list3.getSelectedIndex();
+                String text = list3.getString(id);
+                deleteItems();
+                if (text.equals(appendItems[0]))
+                    appendSi(Item.LAYOUT_CENTER);
+                if (text.equals(appendItems[1]))
+                    appendImgItem(Item.LAYOUT_CENTER);
+                if (text.equals(appendItems[2]))
+                    appendCg(Item.LAYOUT_CENTER);
+                if (text.equals(appendItems[3]))
+                    appendDf(Item.LAYOUT_CENTER);
+                if (text.equals(appendItems[4]))
+                    appendG(Item.LAYOUT_CENTER);
+                if (text.equals(appendItems[5]))
+                    appendTf(Item.LAYOUT_CENTER);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+            if (s == list4)
+            {
+                int id = list4.getSelectedIndex();
+                String text = list4.getString(id);
+                deleteItems();
+                if (text.equals(appendItems[0]))
+                    appendSi(Item.LAYOUT_RIGHT);
+                if (text.equals(appendItems[1]))
+                    appendImgItem(Item.LAYOUT_RIGHT);
+                if (text.equals(appendItems[2]))
+                    appendCg(Item.LAYOUT_RIGHT);
+                if (text.equals(appendItems[3]))
+                    appendDf(Item.LAYOUT_RIGHT);
+                if (text.equals(appendItems[4]))
+                    appendG(Item.LAYOUT_RIGHT);
+                if (text.equals(appendItems[5]))
+                    appendTf(Item.LAYOUT_RIGHT);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+
+        }
+        else if (c == cmdAppend1)
+        {
+            Display.getDisplay(parent).setCurrent(list1);
+        }
+        else if (c == cmdAppend2)
+        {
+            Display.getDisplay(parent).setCurrent(list2);
+        }
+        else if (c == cmdAppend3)
+        {
+            Display.getDisplay(parent).setCurrent(list3);
+        }
+        else if (c == cmdAppend4)
+        {
+            Display.getDisplay(parent).setCurrent(list4);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_01/src/Midp_Item_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_Item_01 tests.
+ */
+
+public class Midp_Item_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ItemTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Item_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Item_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Item_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Item_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Item_02/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_02/src/ItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+/**
+ *
+ */
+
+public class ItemTests extends Form implements CommandListener
+{
+
+    //reference to the MIDlet to go to different screens
+    private static Midp_Item_02 parent = null;
+
+    private String appendItems[] = {"StringItem1", "ImageItem", "ChoiceGroup", "DateField",
+                                    "Gauge", "TextField", "StringItem2"
+                                   };
+
+    //cg elements
+    private String cgElements[] = {"element1", "element2", "element3", "element4", "element5", "element6"};
+
+    private List list1;
+
+    private Command cmdAppend1 =new Command("Append1", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private StringItem str1, str2, str3;
+
+    private ChoiceGroup cg1;
+
+    private Gauge g1;
+
+    private DateField df1;
+
+    private TextField tf1;
+
+    private ImageItem imgItem1;
+
+    private Image image = null;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ItemTests(Midp_Item_02 parent)
+    {
+        super(parent.getClass().getName());
+        this.parent = parent;
+        str1 = new StringItem("StringItem", "Text");
+        str2 = new StringItem("NewStringItem1", "Text");
+        str3 = new StringItem("NewStringItem2", "Text\n");
+        try
+        {
+            image = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        imgItem1 = new ImageItem("ImageItem", image,
+                                 Item.LAYOUT_NEWLINE_AFTER, null);
+        str2.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+
+        cg1 = new ChoiceGroup("ChoiceGroup", Choice.EXCLUSIVE, cgElements, null);
+        df1 = new DateField("DateField", DateField.DATE_TIME);
+        tf1 = new TextField("TextField", null, 100, TextField.ANY);
+        g1= new Gauge("Interactive Gauge", true, 50, 10);
+
+        list1 = new List("Insert Item", Choice.IMPLICIT);
+        for (int i= 0; i<appendItems.length; i++)
+            list1.append(appendItems[i], null);
+        list1.setCommandListener(this);
+        append(str1);
+        addCommand(cmdAppend1);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    private void deleteItems()
+    {
+        int size = size();
+        if (size>1)
+            delete(0);
+    }
+
+    /**
+    *  This method handles command invocations.
+    *
+    *@param  c  This is the command responsible for the event.
+    *@param  s  Should be equal to this.
+    */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == List.SELECT_COMMAND)
+        {
+            if (s == list1)
+            {
+                int i = list1.getSelectedIndex();
+                String item = list1.getString(i);
+                deleteItems();
+                if (item.equals(appendItems[0]))
+                    insert(0, str2);
+                if (item.equals(appendItems[1]))
+                    insert(0, imgItem1);
+                if (item.equals(appendItems[2]))
+                    insert(0, cg1);
+                if (item.equals(appendItems[3]))
+                    insert(0, df1);
+                if (item.equals(appendItems[4]))
+                    insert(0, g1);
+                if (item.equals(appendItems[5]))
+                    insert(0, tf1);
+                if (item.equals(appendItems[6]))
+                    insert(0, str3);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+        }
+        else if (c == cmdAppend1)
+        {
+            Display.getDisplay(parent).setCurrent(list1);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_02/src/Midp_Item_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_Item_02 tests.
+ */
+
+public class Midp_Item_02 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ItemTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_03/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Item_03" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Item_03"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Item_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Item_03"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Item_03/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_03/src/ItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+/**
+ *
+ */
+
+public class ItemTests extends Form implements CommandListener
+{
+
+    //reference to the MIDlet to go to different screens
+    private static Midp_Item_03 parent = null;
+
+    private String appendItems[] = {"StringItem1", "DateField",
+                                    "Gauge", "TextField"
+                                   };
+
+    private String insertItems[] = {"StringItem1", "ImageItem"};
+    private List list1, list2;
+
+    private Command cmdTest1 =new Command("Test1", Command.SCREEN, 1);
+
+    private Command cmdTest2 =new Command("Test2", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private StringItem str1, str2, str3, str4;
+
+    private Gauge g1;
+
+    private DateField df1;
+
+    private TextField tf1;
+
+    private ImageItem imgItem1;
+
+    private Image image = null;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ItemTests(Midp_Item_03 parent)
+    {
+        super(parent.getClass().getName());
+        this.parent = parent;
+        str1 = new StringItem("StringItem", "Text");
+        str2 = new StringItem("\nNewStringItem1", "Text");
+        str3 = new StringItem("StringItem", "Text");
+        str4 = new StringItem("NewStringItem1", "Text\n");
+        try
+        {
+            image = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        imgItem1 = new ImageItem("ImageItem", image,
+                                 Item.LAYOUT_NEWLINE_AFTER, null);
+        str2.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+        str4.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+        imgItem1.setLayout(Item.LAYOUT_NEWLINE_AFTER);
+
+        df1 = new DateField("\nDateField", DateField.DATE_TIME);
+        tf1 = new TextField("\nTextField", null, 100, TextField.ANY);
+        g1= new Gauge("\nInteractive Gauge", true, 50, 10);
+
+        df1.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+        tf1.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+        g1.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
+
+        list1 = new List("Append Item", Choice.IMPLICIT);
+        list2 = new List("Insert Item", Choice.IMPLICIT);
+        for (int i= 0; i<appendItems.length; i++)
+            list1.append(appendItems[i], null);
+        for (int i= 0; i<insertItems.length; i++)
+            list2.append(insertItems[i], null);
+
+        list1.setCommandListener(this);
+        list2.setCommandListener(this);
+        append(str1);
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    private void deleteItems()
+    {
+        int size = size();
+        for (int i= 1; i<size; i++)
+            delete(i);
+    }
+
+    /**
+    *  This method handles command invocations.
+    *
+    *@param  c  This is the command responsible for the event.
+    *@param  s  Should be equal to this.
+    */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == List.SELECT_COMMAND)
+        {
+            if (s == list1)
+            {
+                int i = list1.getSelectedIndex();
+                String item = list1.getString(i);
+                deleteItems();
+                if (item.equals(appendItems[0]))
+                    append(str2);
+                if (item.equals(appendItems[1]))
+                    append(df1);
+                if (item.equals(appendItems[2]))
+                    append(g1);
+                if (item.equals(appendItems[3]))
+                    append(tf1);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+            if (s == list2)
+            {
+                int index = list2.getSelectedIndex();
+                String elem = list2.getString(index);
+                if (elem.equals(insertItems[0]))
+                    insert(0, str4);
+                else if (elem.equals(insertItems[1]))
+                    insert(0, imgItem1);
+                Display.getDisplay(parent).setCurrent(this);
+            }
+        }
+        else if (c == cmdTest1)
+        {
+            Display.getDisplay(parent).setCurrent(list1);
+        }
+        else if (c == cmdTest2)
+        {
+            deleteAll();
+            append(str3);
+            Display.getDisplay(parent).setCurrent(list2);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Item_03/src/Midp_Item_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_Item_03 tests.
+ */
+
+public class Midp_Item_03 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ItemTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_List_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_List_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_List_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_List_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_List_01/res/Icon.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_List_01/res/bigImage.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_List_01/res/invalid.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2001-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the images needed for this MIDlet
+ *
+ */
+
+public class Images
+{
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The big image
+     */
+    public Image bigImage = null;
+
+    /**
+     *  The small image which fits to the layout
+     */
+    public Image smallImage = null;
+
+    /**
+     *  The invalid image
+     */
+    public Image invalidImage = null;
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            bigImage  = Image.createImage("/bigImage.png");
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+        {
+            instance = new Images();
+        }
+        return instance;
+    }
+
+    /**
+     *  Tries to load an image that is invalid
+     *
+     *@return                  The Invalid value
+     *@exception  IOException  Description of Exception
+     */
+    public Image getInvalid()
+    throws IOException
+    {
+        Image invalid = Image.createImage("/invalid.png");
+        return invalid;
+    }
+    //end method
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/ListTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is called when Midp_List_01 MIDlet is launched.It displays
+ * a ChoiceGroup item on this Form and lets the user to select the type of
+ * List before running the tests
+ *
+ */
+
+public class ListTests extends Form implements CommandListener
+{
+
+    //reference to the MIDlet to go to different screens
+    private static Midp_List_01 parent = null;
+
+    //ChoiceGroup which contains the list types to be selected
+    private ChoiceGroup cg = null;
+
+    //this instance
+    private static ListTests instance = null;
+
+    private String[] listTypes = { "Exclusive", "Implicit", "Multiple" };
+
+    //the command to test Test1
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+    //the command to test Test2
+    private Command cmdTest2 = new Command("Test2", Command.SCREEN, 1);
+    //the command to test Test3
+    private Command cmdTest3 = new Command("Test3", Command.SCREEN, 1);
+    //the command to test Test4
+    private Command cmdTest4 = new Command("Test4", Command.SCREEN, 1);
+    //the command to test Test5
+    private Command cmdTest5 = new Command("Test5", Command.SCREEN, 1);
+    //the command to test Test6
+    private Command cmdTest6 = new Command("Test6", Command.SCREEN, 1);
+    //the command to test Test7
+    private Command cmdTest7 = new Command("Test7", Command.SCREEN, 1);
+    //the command to test Test8
+    private Command cmdTest8 = new Command("Test8", Command.SCREEN, 1);
+    //the command to exit midlet
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+
+    public static int type;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ListTests(Midp_List_01 parent)
+    {
+        super(parent.getClass().getName());
+        this.parent = parent;
+        //create ChoiceGroup
+        cg = new ChoiceGroup("Select List type:", Choice.EXCLUSIVE, listTypes, null);
+        append(cg);
+        //addCommands
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        addCommand(cmdTest3);
+        addCommand(cmdTest4);
+        addCommand(cmdTest5);
+        addCommand(cmdTest6);
+        addCommand(cmdTest7);
+        addCommand(cmdTest8);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        show();
+    }
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        if (t.equals(listTypes[0]))
+            type = List.EXCLUSIVE;
+        else if (t.equals(listTypes[1]))
+            type = List.IMPLICIT;
+        else if (t.equals(listTypes[2]))
+            type = List.MULTIPLE;
+        if (c == cmdTest1)
+            Display.getDisplay(parent).setCurrent(new Test1(type));
+        else if (c== cmdTest2)
+            Display.getDisplay(parent).setCurrent(new Test2(type));
+        else if (c == cmdTest3)
+            Display.getDisplay(parent).setCurrent(new Test3(type));
+        else if (c == cmdTest4)
+            Display.getDisplay(parent).setCurrent(new Test4(type));
+        else if (c == cmdTest5)
+            Display.getDisplay(parent).setCurrent(new Test5(type));
+        else if (c == cmdTest6)
+            Display.getDisplay(parent).setCurrent(new Test6(type));
+        else if (c == cmdTest7)
+            Display.getDisplay(parent).setCurrent(new Test7(type));
+        else if (c == cmdTest8)
+            Display.getDisplay(parent).setCurrent(new Test8(type));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+    public static String whatFace(int face)
+    {
+        if (face == Font.FACE_SYSTEM)
+            return "SYSTEM";
+        else if (face == Font.FACE_MONOSPACE)
+            return "MONOSPACE";
+        else if (face == Font.FACE_PROPORTIONAL)
+            return "PROPORTIONAL";
+        else return null;
+    }
+
+    public static String whatStyle(int style)
+    {
+        if (style== Font.STYLE_PLAIN)
+            return "PLAIN";
+        else if (style== Font.STYLE_ITALIC)
+            return "ITALIC";
+        else if (style== Font.STYLE_BOLD)
+            return "BOLD";
+        else if (style== Font.STYLE_UNDERLINED)
+            return "UNDERLINED";
+        else return "MIXED";
+    }
+
+    public static String whatSize(int size)
+    {
+        if (size== Font.SIZE_SMALL)
+            return "SMALL";
+        else if (size== Font.SIZE_MEDIUM)
+            return "MEDIUM";
+        else if (size== Font.SIZE_LARGE)
+            return "LARGE";
+        else return null;
+    }
+
+
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Midp_List_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_List_01 tests.
+ */
+
+public class Midp_List_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ListTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+/**
+ * This class is to test the List:
+ * 1.when it has elements with no associated image.
+ * 2.when it has too long element label.
+ * 3.when it has many elements with image
+ * 4.when the list is empty.
+ *
+ */
+
+public class Test1 extends List implements CommandListener
+{
+
+    //the instance of this
+    private Test1 instance = null;
+
+    //the command to go back to the ListTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+    Command cmdAdd = new Command("Add image", Command.SCREEN, 1);
+    Command cmdRemove = new Command("Remove All", Command.SCREEN, 1);
+    Command cmdSize = new Command("Show size", Command.SCREEN, 1);
+
+    //elements to this list
+    private final String element1 = "This is a very long element label. It should be truncated after two lines" +
+                                    " with an ellipsis. Check the output that the ellipsis exists there." +
+                                    " Let's see if this text is so long that it will be longer than" +
+                                    " four lines in the possible list info popup window. Then we can see" +
+                                    " if the text was scrollable.";
+    private final String element2 ="2nd Element";
+    private final String element3 ="3rd Element";
+    private final String element4 ="4th Element";
+    private final String element5 ="5th Element";
+
+    /**
+     *
+     * @param listType The List type
+     */
+    public Test1(int listType)
+    {
+
+        super("Test1", listType);
+
+        //append elements to this list
+        append(element1, null);
+        append(element2, null);
+        append(element3, null);
+        append(element4, null);
+        append(element5, null);
+
+        //add commands to this list
+        addCommand(cmdBack);
+        addCommand(cmdAdd);
+        addCommand(cmdRemove);
+        addCommand(cmdSize);
+        setCommandListener(this);
+
+        if (instance == null)
+            instance = this;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+        else if (c == cmdAdd)
+            instance.insert(0, "Inserted1", Images.getInstance().smallImage);
+        else if ((c == cmdRemove) && (instance.size() != 0))
+        {
+            instance.deleteAll();
+        }
+        else if (c == cmdSize)
+        {
+            //insert element at the 0 position
+            String size = new String("");
+            System.out.println("Font Size: ");
+            System.out.println(this.getFont(instance.getSelectedIndex()).getSize());
+            System.out.println(this.getFont(instance.getSelectedIndex()).getStyle());
+            System.out.println(this.getFont(instance.getSelectedIndex()).getFace());
+            System.out.println(this.getFont(instance.getSelectedIndex()).getHeight());
+            size = "Font Size: "+instance.getFont(instance.getSelectedIndex()).getHeight()+" "+
+                   ListTests.whatSize(instance.getFont(instance.getSelectedIndex()).getSize())+" "+
+                   ListTests.whatStyle(instance.getFont(instance.getSelectedIndex()).getStyle())+" "+
+                   ListTests.whatFace(instance.getFont(instance.getSelectedIndex()).getFace());
+            instance.insert(0, size, null);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * 1.When the element image is larger than the layout it fits
+ */
+
+public class Test2 extends List implements CommandListener
+{
+
+    //command to go Back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    /**
+     *
+     * @param listType The List type
+     */
+    public Test2(int listType)
+    {
+
+        super("Test2", listType);
+        //add Back command
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        //append big image to this list
+        append("Big Image", Images.getInstance().bigImage);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * 1.When the element label is longer than the image.
+ */
+
+public class Test3 extends List implements CommandListener
+{
+
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the longLabel added to this List
+    private final String longLabel = "This is a very long label and there is also an image";
+
+    /**
+     *
+     * @param listType The List type
+     */
+    public Test3(int listType)
+    {
+        super("Test3", listType);
+        //add Back command
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        //append long label with image to this list
+        append(longLabel, Images.getInstance().smallImage);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2001-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * 1.When the element image is invalid
+ */
+
+public class Test4 extends List implements CommandListener
+{
+
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //long label
+    private final String longLabel = "This is a very long label and there is also an image";
+
+    /**
+     *
+     * @param listType The List type
+     */
+    public Test4(int listType)
+    {
+
+        super("Test4", listType);
+        String listLabel = null;
+        //add Back command
+        addCommand(cmdBack);
+        setCommandListener(this);
+        try
+        {
+            append(longLabel, Images.getInstance().getInvalid());
+        }
+        catch (IOException e)
+        {
+            String msg = "Could not load invalid image";
+            append(msg, null);
+        }
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * 1.When it has all elements with an associated image.
+ * 2.When the element images are removed from the list.
+ *
+ */
+
+public class Test5 extends List implements CommandListener
+{
+
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Command to remove all the images to test list elements with no images
+    Command cmdRemove = new Command("Remove All Images", Command.SCREEN, 1);
+
+    //the elements of this list
+    String str[] = {"1stElement", "2ndElement", "3rdElement", "4thElement",
+                    "5thElement", "6thElement", "7thElement", "8thElement",
+                    "9thElement", "10thElement"
+                   };
+
+    /**
+    *
+    * @param listType The List type
+    */
+    public Test5(int listType)
+    {
+        super("Test5", listType);
+        //add Commands
+        addCommand(cmdBack);
+        addCommand(cmdRemove);
+        setCommandListener(this);
+
+        addElements();
+    }
+
+    /**
+     * appends the list elements with associated images
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            append(str[i], Images.getInstance().smallImage);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+        if (c == cmdRemove)
+        {
+            int size = this.size();
+            for (int i=0; i<size; i++)
+            {
+                Image img = this.getImage(i);
+                this.set(i, this.getString(i), null);
+            }
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test6.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test List:
+ * 1.When it has only one element with associated image
+ *
+ */
+
+public class Test6 extends List implements CommandListener
+{
+
+    //Command to go back to the screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //elements which are added to this list
+    String str[] = { "2ndElement", "3rdElement", "4thElement",
+                     "5thElement", "6thElement", "7thElement", "8thElement",
+                     "9thElement", "10thElement"
+                   };
+
+    /**
+    *
+    * @param listType The List type
+    */
+    public Test6(int listType)
+    {
+
+        super("Test6", listType);
+        //add Commands
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        append("1Element", Images.getInstance().smallImage);
+        addElements();
+    }
+
+    /**
+    * appends the list elements without image
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 9; i++)
+            append(str[i], null);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test7.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,300 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test methods of the List
+ *
+ */
+
+public class Test7 extends List implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet m = null;
+
+    //list which contains list method names as elements
+    private List listMethods = null;
+
+    //elements of listMethods
+    private String listMethodsStr[] = {"Append", "Delete", "Insert", "Set",
+                                       "SetSelectedIndex"
+                                      };
+    //list append to test append
+    private List listAppend = null;
+
+    //list to test insert
+    private List listInsert = null;
+
+    //list to test set
+    private List listSet = null;
+
+    //list to test selected index
+    private List listSel = null;
+
+    //array of strings added to listAppend
+    private String listAppendStr[] = {"String", "Image"};
+
+    //array of strings added to listInsert
+    private String listInsertStr[] = {"without Image", "with Image"};
+
+    //array of strings added to listSet
+    private String listSetStr[] = {"without Image", "with Image"};
+
+    //array of strings added to listSel
+    private String listSelStr[] = {"Select", "UnSelect"};
+
+    //the initial elements in this list
+    private String first = "1stelement";
+    private String second = "2ndelement";
+    private String third = "3rdelement";
+
+    //an image which fits in the layout
+    private Image smallImage = null;
+
+    //Command back to go to the previous screens
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Command to popup the list methods
+    Command cmdMethods = new Command("Methods", Command.SCREEN, 1);
+
+    //Ok command
+    Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    //append command
+    Command cmdAppend = new Command("Append", Command.SCREEN, 1);
+
+    //insert command
+    Command cmdInsert = new Command("Insert", Command.SCREEN, 1);
+
+    //set Command
+    Command cmdSet = new Command("Set", Command.SCREEN, 1);
+
+    //Select Command
+    Command cmdSel = new Command("Select", Command.SCREEN, 1);
+
+    /**
+     *
+     * @param listType The List type
+     */
+    public Test7(int listType)
+    {
+
+        super("List", listType);
+        //append 3 elements to this list
+        append(first, null);
+        append(second, null);
+        append(third, null);
+
+        //add Commands
+        addCommand(cmdBack);
+        addCommand(cmdMethods);
+
+        setCommandListener(this);
+
+        m = ListTests.getParent();
+    }
+    /**
+     * This method will create the listMethods with all the methods to test
+     *
+
+     */
+    private void appendListMethods()
+    {
+        listMethods = new List("ChoiceGroup Methods", List.EXCLUSIVE, listMethodsStr, null);
+        listMethods.addCommand(cmdBack);
+        listMethods.addCommand(cmdOk);
+        listMethods.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listMethods);
+    }
+
+    private void appendListMethod()
+    {
+        listAppend = new List("Append", List.EXCLUSIVE, listAppendStr, null);
+        listAppend.addCommand(cmdBack);
+        listAppend.addCommand(cmdAppend);
+        listAppend.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listAppend);
+    }
+
+    private void insertListMethod()
+    {
+        listInsert = new List("Insert", List.EXCLUSIVE, listInsertStr, null);
+        listInsert.addCommand(cmdBack);
+        listInsert.addCommand(cmdInsert);
+        listInsert.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listInsert);
+    }
+
+    private void setListMethod()
+    {
+        listSet = new List("Set", List.EXCLUSIVE, listInsertStr, null);
+        listSet.addCommand(cmdBack);
+        listSet.addCommand(cmdSet);
+        listSet.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSet);
+    }
+
+    private void setSelIndexListMethod()
+    {
+        listSel = new List("SelectedIndex", List.EXCLUSIVE, listSelStr, null);
+        listSel.addCommand(cmdBack);
+        listSel.addCommand(cmdSel);
+        listSel.setCommandListener(this);
+        Display.getDisplay(m).setCurrent(listSel);
+    }
+
+    //create image
+    private Image createImage()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return smallImage;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            if (s == listAppend || s == listInsert || s == listSet || s == listSel)
+                Display.getDisplay(m).setCurrent(listMethods);
+            else if (s == this)
+                ListTests.show();
+            else if (s == listMethods)
+                Display.getDisplay(m).setCurrent(this);
+            else
+                ListTests.show();
+        }
+        else if (c == cmdMethods)
+            appendListMethods();
+        else if (c == cmdOk)
+        {
+            int index = listMethods.getSelectedIndex();
+            String str = listMethods.getString(index);
+            if (str.equals(listMethodsStr[0]))
+            {
+                appendListMethod();
+            }
+            else if (str.equals(listMethodsStr[1]))
+            {
+                if (this.size() != 0)
+                {
+                    if (ListTests.type == List.MULTIPLE)
+                        //For Multiple List delete the 1st element
+                        this.delete(0);
+                    else
+                        this.delete(this.getSelectedIndex());
+                }
+                Display.getDisplay(m).setCurrent(this);
+            }
+            else if (str.equals(listMethodsStr[2]))
+            {
+                insertListMethod();
+            }
+            else if (str.equals(listMethodsStr[3]))
+            {
+                setListMethod();
+            }
+            else if (str.equals(listMethodsStr[4]))
+            {
+                setSelIndexListMethod();
+            }
+        }
+        else if (c == cmdAppend)
+        {
+            int i = listAppend.getSelectedIndex();
+            String element = listAppend.getString(i);
+            if (element.equals(listAppendStr[0]))
+            {
+                this.append("Appended", null);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            if (element.equals(listAppendStr[1]))
+            {
+                Image img = createImage();
+                this.append("ImageAppended", img);
+                Display.getDisplay(m).setCurrent(this);
+            }
+        }
+        else if (c == cmdInsert)
+        {
+            int i = listInsert.getSelectedIndex();
+            String e = listInsert.getString(i);
+            if (e.equals(listInsertStr[0]))
+            {
+                this.insert(0, "inserted", null);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            else
+            {
+                Image img = createImage();
+                this.insert(0, "ImageInserted", img);
+                Display.getDisplay(m).setCurrent(this);
+            }
+        }
+        else if (c == cmdSet)
+        {
+            int i = listSet.getSelectedIndex();
+            String e = listSet.getString(i);
+            if (e.equals(listSetStr[0]))
+            {
+                this.set(0, "set", null);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            else
+            {
+                Image img = createImage();
+                this.set(0, "ImageSet", img);
+                Display.getDisplay(m).setCurrent(this);
+            }
+        }
+        else if (c == cmdSel)
+        {
+            int i = listSel.getSelectedIndex();
+            String e = listSel.getString(i);
+            if (e.equals(listSelStr[0]))
+            {
+                this.setSelectedIndex(0, true);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            else
+            {
+                this.setSelectedIndex(0, false);
+                Display.getDisplay(m).setCurrent(this);
+            }
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_01/src/Test8.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This is to test the below ChoiceGroup test case:
+ *1.elements with different fonts
+ *
+ */
+
+public class Test8 extends List implements CommandListener
+{
+
+    //the instance of this
+    private Test8 instance = null;
+    //Command to go back to the screen
+    Command cmdOK = new Command("Ok", Command.SCREEN, 1);
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+    Command cmdSmallImage = new Command("Add small image", Command.SCREEN, 1);
+    Command cmdBigImage = new Command("Add big image", Command.SCREEN, 1);
+    Command cmdRemoveImage = new Command("Remove image", Command.SCREEN, 1);
+    Command cmdNullFont = new Command("Set null font", Command.SCREEN, 1);
+    Command cmdShowFont = new Command("Show font", Command.SCREEN, 1);
+    Command cmdWrapOn = new Command("Wrap on", Command.SCREEN, 1);
+    Command cmdWrapOff = new Command("Wrap off", Command.SCREEN, 1);
+    //elements which are added to this list
+    String str[] =
+    {
+        "2nd: ", "3rd: ", "4th: ",
+        "5th: ", "6th: ", "7th: ", "8th: ",
+        "9th: ", "10th: "
+    };
+
+    /**
+    *
+    * @param listType The List type
+    */
+
+    public Test8(int listType)
+    {
+        super("Test8", listType);
+        addCommand(cmdOK);
+        setCommandListener(this);
+        append("Without image", null);
+        append("With small image", null);
+        append("With big image", null);
+    }
+
+    public void RealTest8(int image)
+    {
+        deleteAll();
+        removeCommand(cmdOK);
+        //add Commands
+        addCommand(cmdBack);
+        addCommand(cmdShowFont);
+        addCommand(cmdSmallImage);
+        addCommand(cmdBigImage);
+        addCommand(cmdRemoveImage);
+        addCommand(cmdNullFont);
+        addCommand(cmdWrapOn);
+
+        setCommandListener(this);
+        if (image == 0)
+            append("Default: ",null);
+        else if (image == 1)
+            append("Default: ", Images.getInstance().smallImage);
+        else if (image == 2)
+            append("Default: ", Images.getInstance().bigImage);
+
+        addElements();
+        setFont(1, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
+        setFont(2, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
+        setFont(3, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
+        setFont(4, Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD|Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
+
+        setFont(5, Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_UNDERLINED|Font.STYLE_ITALIC, Font.SIZE_SMALL));
+        setFont(6, Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_BOLD, Font.SIZE_LARGE));
+        setFont(7, Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
+        setFont(8, Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
+
+        if (instance == null)
+            instance = this;
+    }
+
+    /**
+     * appends the list elements without image
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 9; i++)
+            append(str[i], null);
+    }
+
+    private String fontInfo(int element)
+    {
+        if (element == -1)
+        {
+            return Font.getDefaultFont().getHeight()+" "+
+                   ListTests.whatSize(Font.getDefaultFont().getSize())+" "+
+                   ListTests.whatStyle(Font.getDefaultFont().getStyle())+" "+
+                   ListTests.whatFace(Font.getDefaultFont().getFace());
+        }
+        else
+        {
+            return this.getFont(element).getHeight()+" "+
+                   ListTests.whatSize(this.getFont(element).getSize())+" "+
+                   ListTests.whatStyle(this.getFont(element).getStyle())+" "+
+                   ListTests.whatFace(this.getFont(element).getFace());
+        }
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdOK)
+        {
+            RealTest8(getSelectedIndex());
+        }
+        else if (c == cmdBack)
+        {
+            ListTests.show();
+        }
+        else if (c == cmdSmallImage)
+        {
+            instance.set(this.getSelectedIndex(), this.getString(getSelectedIndex()),Images.getInstance().smallImage);
+        }
+        else if (c == cmdBigImage)
+        {
+            instance.set(this.getSelectedIndex(), this.getString(getSelectedIndex()),Images.getInstance().bigImage);
+        }
+        else if (c == cmdRemoveImage)
+        {
+            instance.set(this.getSelectedIndex(), this.getString(getSelectedIndex()),null);
+        }
+        else if (c == cmdNullFont)
+        {
+            instance.setFont(this.getSelectedIndex(),null);
+        }
+        else if (c == cmdShowFont)
+        {
+            set(this.getSelectedIndex(), this.getString(this.getSelectedIndex()) + " " + fontInfo(this.getSelectedIndex()),
+                this.getImage(getSelectedIndex()));
+        }
+        else if (c == cmdWrapOn)
+        {
+            removeCommand(cmdWrapOn);
+            addCommand(cmdWrapOff);
+            setFitPolicy(Choice.TEXT_WRAP_ON);
+        }
+        else if (c == cmdWrapOff)
+        {
+            removeCommand(cmdWrapOff);
+            addCommand(cmdWrapOn);
+            setFitPolicy(Choice.TEXT_WRAP_OFF);
+        }
+
+    }
+}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_List_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_List_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_List_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_List_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_List_02/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_02/src/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the images needed to
+ * test List.
+ *
+ */
+
+public class Images
+{
+
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The small image which fits to the layout
+     */
+    public Image smallImage = null;
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+        {
+            instance = new Images();
+        }
+        return instance;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_02/src/ListTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is called when the Midp_List_02 MIDlet is launched. It displays
+ * the ChoiceGroup item on this Form and lets the tester to select the type of
+ * List before invoking the tests
+ *
+ */
+
+public class ListTests extends Form implements CommandListener
+{
+
+    //reference to parent MIDlet to go to the different screens
+    private static Midp_List_02 parent=null;
+
+    //The ChoiceGroup, to select the List type
+    private ChoiceGroup cg = null;
+
+    //the instance of this class
+    private static ListTests instance = null;
+
+    //The cgTypes added to the ChoiceGroup cg
+    private String[] listTypes = {"Exclusive ChoiceGroup", "Implicit ChoiceGroup"};
+
+    //commands to invoke the respective tests
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+    //the command to exit midlet
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ListTests(Midp_List_02 parent)
+    {
+
+        //label as the MIDlet class name
+        super(parent.getClass().getName());
+        this.parent = parent;
+        cg = new ChoiceGroup("Select List type:", Choice.EXCLUSIVE, listTypes, null);
+        append(cg);
+        //add command
+        addCommand(cmdTest1);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //show this screen
+        show();
+    }
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        int type = 0;
+        if (t.equals(listTypes[0]))
+            type = ChoiceGroup.EXCLUSIVE;
+        else if (t.equals(listTypes[1]))
+            type = ChoiceGroup.IMPLICIT;
+        if (c == cmdTest1)
+            Display.getDisplay(parent).setCurrent(new Test1(type));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_02/src/Midp_List_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the List tests.
+ */
+
+public class Midp_List_02 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ListTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_02/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the List element selection when the element is
+ * deleted, inserted and replaced.
+ *
+ */
+
+public class Test1 extends List implements CommandListener
+{
+
+    private MIDlet m = null;
+    //The Command to go back to the ListTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    Command cmdAdd = new Command("Add", Command.SCREEN, 1);
+    Command cmdInsert = new Command("Insert", Command.SCREEN, 1);
+    Command cmdSet = new Command("Set", Command.SCREEN, 1);
+    Command cmdDelete = new Command("Delete", Command.SCREEN, 1);
+    Command cmdDeleteAll = new Command("Delete All", Command.SCREEN, 1);
+
+    //the List elements
+    private String elements[] = {"1st Element", "2nd Element", "3rd Element", "4th Element",
+                                 "5 Element", "6th Element", "7th Element", "8th Element"
+                                };
+
+    /**
+    * This constructor adds elements to this List and adds Commands to
+    * add, insert, set and delte elements from the List.
+    * Displays the current screen to be this List
+    *
+    * @param cgType The ChoiceGroup type
+    */
+    public Test1(int cgType)
+    {
+
+        super(null, cgType);
+        String cgLabel = null;
+        //set the List title according to the type of this List
+        if (cgType == ChoiceGroup.EXCLUSIVE)
+            cgLabel = "EXCLUSIVE";
+        else if (cgType == ChoiceGroup.IMPLICIT)
+            cgLabel = "IMPLICIT";
+        this.setTitle(cgLabel);
+        for (int i=0; i<elements.length; i++)
+            this.append(elements[i], null);
+
+        //add commands
+        addCommand(cmdInsert);
+        addCommand(cmdSet);
+        addCommand(cmdDelete);
+        addCommand(cmdAdd);
+        addCommand(cmdDeleteAll);
+        addCommand(cmdBack);
+        setCommandListener(this);
+        m = ListTests.getParent();
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = this.getSelectedIndex();
+        if (c == cmdBack)
+            ListTests.show();
+        if (c == cmdAdd)
+            this.append("Added", Images.getInstance().smallImage);
+        else if (c==cmdDeleteAll)
+            this.deleteAll();
+        try
+        {
+            if (c == cmdInsert)
+                this.insert(index, "Inserted", Images.getInstance().smallImage);
+            else if (c==cmdSet)
+                this.set(index, "Replaced", Images.getInstance().smallImage);
+            else if (c==cmdDelete)
+                this.delete(index);
+        }
+        catch (IndexOutOfBoundsException iobe)
+        {
+            Alert a = new Alert("IOB Exception", "List is empty", null, AlertType.INFO);
+            Display.getDisplay(m).setCurrent(a);
+        }
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_List_04" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_List_04"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_List_04"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_List_04"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_List_04/res/Icon.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_List_04/res/bigImage.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Images.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2001-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to create all the images needed for this MIDlet
+ *
+ */
+
+public class Images
+{
+    /**
+     *  The one and only instance of this class
+     */
+    private static Images instance = null;
+
+    /**
+     *  The big image
+     */
+    public Image bigImage = null;
+
+    /**
+     *  The small image which fits to the layout
+     */
+    public Image smallImage = null;
+
+    /**
+     *  The invalid image
+     */
+    public Image invalidImage = null;
+
+    /**
+     *  Constructor for the Images object
+     */
+    private Images()
+    {
+        try
+        {
+            bigImage  = Image.createImage("/bigImage.png");
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+    }
+    //end method
+
+
+    /**
+     *  Returns a reference to the one and only instance of this class
+     *
+     *@return    The Instance value
+     */
+    public static Images getInstance()
+    {
+        if (instance == null)
+        {
+            instance = new Images();
+        }
+        return instance;
+    }
+
+
+    /**
+     *  Tries to load an image that is invalid
+     *
+     *@return                  The Invalid value
+     *@exception  IOException  Description of Exception
+     */
+    public Image getInvalid()
+    throws IOException
+    {
+        Image invalid = Image.createImage("/invalid.png");
+        return invalid;
+    }
+    //end method
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/ListTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is called when Midp_List_04 MIDlet is launched.It displays
+ * a ChoiceGroup item on this Form and lets the user to select the type of
+ * List before running the tests
+ *
+ */
+
+public class ListTests extends Form implements CommandListener
+{
+    //reference to the MIDlet to go to different screens
+    private static Midp_List_04 parent = null;
+    //ChoiceGroup which contains the list types to be selected
+    private ChoiceGroup cg = null;
+    //this instance
+    private static ListTests instance = null;
+    private String[] listTypes = { "Exclusive", "Implicit", "Multiple" };
+
+    //the command to test Test1
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+    //the command to test Test2
+    private Command cmdTest2 = new Command("Test2", Command.SCREEN, 1);
+    //the command to test Test3
+    private Command cmdTest3 = new Command("Test3", Command.SCREEN, 1);
+    //the command to test Test4
+    private Command cmdTest4 = new Command("Test4", Command.SCREEN, 1);
+    //the command to test Test5
+    private Command cmdTest5 = new Command("Test5", Command.SCREEN, 1);
+    //the command to test Test6
+    private Command cmdTest6 = new Command("Test6", Command.SCREEN, 1);
+    //the command to test Test7
+    private Command cmdTest7 = new Command("Test7", Command.SCREEN, 1);
+    //cmd to exit midlet
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public static int type;
+
+    public ListTests(Midp_List_04 parent)
+    {
+        super(parent.getClass().getName());
+        this.parent = parent;
+        //create ChoiceGroup
+        cg = new ChoiceGroup("Select List type:", Choice.EXCLUSIVE, listTypes, null);
+        append(cg);
+        //addCommands
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        addCommand(cmdTest3);
+        addCommand(cmdTest4);
+        addCommand(cmdTest5);
+        addCommand(cmdTest6);
+        addCommand(cmdTest7);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        show();
+    }
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = cg.getSelectedIndex();
+        String t = cg.getString(index);
+        if (t.equals(listTypes[0]))
+            type = List.EXCLUSIVE;
+        else if (t.equals(listTypes[1]))
+            type = List.IMPLICIT;
+        else if (t.equals(listTypes[2]))
+            type = List.MULTIPLE;
+        if (c == cmdTest1)
+            Display.getDisplay(parent).setCurrent(new Test1(type));
+        else if (c== cmdTest2)
+            Display.getDisplay(parent).setCurrent(new Test2(type));
+        else if (c == cmdTest3)
+            Display.getDisplay(parent).setCurrent(new Test3(type));
+        else if (c == cmdTest4)
+            Display.getDisplay(parent).setCurrent(new Test4(type));
+        else if (c == cmdTest5)
+            Display.getDisplay(parent).setCurrent(new Test5(type));
+        else if (c == cmdTest6)
+            Display.getDisplay(parent).setCurrent(new Test6(type));
+        else if (c == cmdTest7)
+            Display.getDisplay(parent).setCurrent(new Test7(type));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+
+    }
+    //end method
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Midp_List_04.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_List_04 tests.
+ */
+
+public class Midp_List_04 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ListTests(this);
+    }
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the List:
+ *
+ */
+
+public class Test1 extends List implements CommandListener
+{
+
+    //the instance of this
+    private Test1 instance = null;
+    //the command to go back to the ListTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //elements to this list
+    private final String element1 = "1st Element";
+    private final String element2 ="2nd Element";
+    private final String element3 ="3rd Element";
+    private final String element4 ="4th Element";
+    private final String element5 ="5th Element";
+    private final String element6 ="6th Element";
+    private final String element7 ="7th Element";
+    private final String element8 ="8th Element";
+    private final String element9 ="9th Element";
+    private final String element10 ="10th Element";
+    private final String element11 ="11th Element";
+
+    public Test1(int listType)
+    {
+        super("Test1", listType);
+        //append elements to this list
+        append(element1, null);
+        append(element2, null);
+        append(element3, null);
+        append(element4, null);
+        append(element5, null);
+        append(element6, null);
+        append(element7, null);
+        append(element8, null);
+        append(element9, null);
+        append(element10, null);
+        append(element11, null);
+        //add commands to this list
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        if (instance == null)
+            instance = this;
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the List:
+ *
+ */
+
+public class Test2 extends List implements CommandListener
+{
+
+    //the command to go back to the ListTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //elements to this list
+    private final String element1 = "1st Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element2 ="2nd Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element3 ="3rd Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element4 ="4th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element5 ="5th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element6 ="6th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element7 ="7th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element8 ="8th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element9 ="9th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element10 ="10th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+    private final String element11 ="11th Element should be shown in two lines if it is too big to fit in two line text should be wrapped";
+
+    public Test2(int listType)
+    {
+        super("Test2", listType);
+        //append elements to this list
+        append(element1, null);
+        append(element2, null);
+        append(element3, null);
+        append(element4, null);
+        append(element5, null);
+        append(element6, null);
+        append(element7, null);
+        append(element8, null);
+        append(element9, null);
+        append(element10, null);
+        append(element11, null);
+        //add commands to this list
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * With small images and one line element text
+ *
+ */
+
+public class Test3 extends List implements CommandListener
+{
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements of this list
+    String str[] = {"1stElement", "2ndElement", "3rdElement", "4thElement",
+                    "5thElement", "6thElement", "7thElement", "8thElement",
+                    "9thElement", "10thElement"
+                   };
+
+    public Test3(int listType)
+    {
+        super("Test3", listType);
+        //add Command
+        addCommand(cmdBack);
+        setCommandListener(this);
+        addElements();
+    }
+    /**
+     * appends the list elements with associated images
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            append(str[i], Images.getInstance().smallImage);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * With big images and one line element text
+ *
+ */
+
+public class Test4 extends List implements CommandListener
+{
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements of this list
+    String str[] = {"1st Element", "2nd Element", "3rd Element", "4th Element",
+                    "5th Element", "6th Element", "7th Element", "8th Element",
+                    "9th Element", "10th Element"
+                   };
+
+    public Test4(int listType)
+    {
+        super("Test4", listType);
+        //add Command
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        addElements();
+    }
+    /**
+     * appends the list elements with associated images
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            append(str[i], Images.getInstance().bigImage);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test5.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * With small images and one line element text
+ *
+ */
+
+public class Test5 extends List implements CommandListener
+{
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements of this list
+    String str[] =
+    {
+        "1st Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "2nd Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "3rd Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "4th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "5th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "6th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "7th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "8th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "9th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "10th Element should be shown in two lines if it is too big to fit in two line text should be wrapped",
+        "11th Element should be shown in two lines if it is too big to fit in two line text should be wrapped"
+    };
+
+    public Test5(int listType)
+    {
+        super("Test5", listType);
+        //add Command
+        addCommand(cmdBack);
+        setCommandListener(this);
+        addElements();
+        setFitPolicy(List.TEXT_WRAP_ON);
+    }
+    /**
+     * appends the list elements with associated images
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< str.length; i++)
+            append(str[i], Images.getInstance().bigImage);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test6.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2004-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the List:
+ *
+ */
+
+public class Test6 extends List implements CommandListener
+{
+
+    //the instance of this
+    private Test6 instance = null;
+    //the command to go back to the ListTests screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //elements to this list
+    private final String element1 = "1st Element is the longest one and it should be truncated if it is too long.";
+    private final String element2 ="2nd Element";
+    private final String element3 ="3rd Element";
+    private final String element4 ="4th Element";
+    private final String element5 ="5th Element";
+    private final String element6 ="6th Element";
+    private final String element7 ="7th Element";
+    private final String element8 ="8th Element";
+    private final String element9 ="9th Element";
+    private final String element10 ="10th Element";
+    private final String element11 ="11th Element";
+
+    public Test6(int listType)
+    {
+        super("Test6", listType);
+        //append elements to this list
+        append(element1, null);
+        append(element2, null);
+        append(element3, null);
+        append(element4, null);
+        append(element5, null);
+        append(element6, null);
+        append(element7, null);
+        append(element8, null);
+        append(element9, null);
+        append(element10, null);
+        append(element11, null);
+        //add commands to this list
+        addCommand(cmdBack);
+        setCommandListener(this);
+
+        if (instance == null)
+            instance = this;
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_List_04/src/Test7.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2004-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+import java.io.*;
+/**
+ * This class is to test the List:
+ * With small images and one line element text
+ *
+ */
+
+public class Test7 extends List implements CommandListener
+{
+    //Command to go back to the main screen
+    Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the elements of this list
+    String str[] = {"1stElement should be shown in two lines and text should be truncated", "2ndElement", "3rdElement", "4thElement",
+                    "5thElement", "6thElement", "7thElement", "8thElement",
+                    "9thElement", "10thElement"
+                   };
+
+    public Test7(int listType)
+    {
+        super("Test7", listType);
+        //add Command
+        addCommand(cmdBack);
+        setCommandListener(this);
+        addElements();
+    }
+    /**
+     * appends the list elements with associated images
+     */
+    private void addElements()
+    {
+        for (int i= 0; i< 10; i++)
+            append(str[i], Images.getInstance().smallImage);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            ListTests.show();
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Spacer_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Spacer_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Spacer_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Spacer_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Spacer_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Spacer_01/res/bigImage.png has changed
Binary file javauis/tsrc/fute/lcdui/Midp_Spacer_01/res/plasma.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Spacer_01/src/Midp_Spacer_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_Spacer_01 tests.
+ */
+
+public class Midp_Spacer_01 extends MIDlet
+{
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new SpacerTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        notifyDestroyed();
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Spacer_01/src/SpacerTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,325 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the methods of the Form like
+ * appending many items, appending one Item, deleting an Item and
+ * changing/replacing an Item etc.
+ *
+ * changed arrange of image items to get layout shown correctly
+ */
+
+public class SpacerTests extends List implements CommandListener
+{
+
+    private static Midp_Spacer_01 parent = null;
+
+    private static SpacerTests instance = null;
+
+    private final String exCgStr = "Exclusive ChoiceGroup";
+
+    private final String mulCgStr = "Multiple ChoiceGroup";
+
+    private final String popCgStr = "Popup ChoiceGroup";
+
+    private final String dfStr = "DateField";
+
+    private final String iGStr = "Interactive Gauge";
+
+    private final String nGStr = "Non interactive Gauge";
+
+    private final String siStr = "StringItem";
+
+    private final String tfStr = "TextField";
+
+    private final String bigImgStr = "Big Image";
+
+    private final String imgStr = "ImageItem";
+
+    private final String smallSpacerStr = "Small Spacer";
+
+    private final String bigSpacerStr = "Big Spacer";
+
+    private final String wideSpacerStr = "Wide Spacer";
+
+    private final String tallSpacerStr = "Tall Spacer";
+
+    private ChoiceGroup cg = null;
+
+    private DateField df = null;
+
+    private Gauge g = null;
+
+    private StringItem si = null;
+
+    private TextField tf = null;
+
+    private Spacer sp = null;
+
+    private List tests;
+
+    private Form itemForm = null;
+
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    private Command cmdAppend = new Command("Append Item", Command.SCREEN, 1);
+
+    private Command cmdReplace = new Command("Replace Item", Command.SCREEN, 1);
+
+    private Command cmdDelete = new Command("Delete Item", Command.SCREEN, 1);
+
+    private Command cmdManyItems = new Command("Many Items", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public SpacerTests(Midp_Spacer_01 parent)
+    {
+        super(parent.getClass().getName(), List.EXCLUSIVE);
+        this.parent = parent;
+
+        itemForm = new Form("Items");
+        addCommand(cmdManyItems);
+        addCommand(cmdAppend);
+        addCommand(cmdExit);
+
+        itemForm.addCommand(cmdBack);
+        itemForm.setCommandListener(this);
+
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        instance.append(smallSpacerStr, null);
+        instance.append(bigSpacerStr, null);
+        instance.append(wideSpacerStr, null);
+        instance.append(tallSpacerStr, null);
+        instance.append(exCgStr, null);
+        instance.append(mulCgStr, null);
+        instance.append(popCgStr, null);
+        instance.append(dfStr, null);
+        instance.append(iGStr, null);
+        instance.append(nGStr, null);
+        instance.append(siStr, null);
+        instance.append(tfStr, null);
+        instance.append(imgStr, null);
+        instance.append(bigImgStr, null);
+
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    private void addChoiceGroup(String title, int type)
+    {
+        cg = new ChoiceGroup(title, type);
+        cg.append("1stElement", null);
+        cg.append("2ndElement", null);
+        cg.append("3ndElement", null);
+        itemForm.append(cg);
+    }
+
+    private void addGauge(String title, boolean mode)
+    {
+        g = new Gauge(title, mode, 10, 5);
+        itemForm.append(g);
+    }
+
+    private void addDateField(String title, int mode)
+    {
+        df = new DateField(title, mode);
+        itemForm.append(df);
+    }
+
+    private void addSpacer(int minWidth, int minHeight)
+    {
+        sp = new Spacer(minWidth, minHeight);
+        itemForm.append(sp);
+    }
+
+    private void addStringItem(String title, String text)
+    {
+        si = new StringItem(title, text);
+        itemForm.append(si);
+    }
+
+    private void addBigImage()
+    {
+        try
+        {
+            Image bigImage = Image.createImage("/bigImage.png");
+            itemForm.append(bigImage);
+        }
+        catch (java.io.IOException err)
+        {
+            System.out.println("Error in creating the image!");
+        }
+    }
+
+    private void addImageItem()
+    {
+        try
+        {
+            Image img = Image.createImage("/plasma.png");
+
+            itemForm.append(new ImageItem("Default Layout",
+                                          img,
+                                          ImageItem.LAYOUT_DEFAULT,
+                                          "Image Cannot be shown"));
+        }
+        catch (java.io.IOException err)
+        {
+            System.out.println("Error in creating the image!");
+        }
+    }
+
+    private void addTextField(String label, int constraints)
+    {
+        if (label.equals("UNEDITABLE"))
+        {
+            tf = new TextField(label, "uneditable", 30, constraints);
+        }
+        else
+            tf = new TextField(label, "", 30, constraints);
+        itemForm.append(tf);
+    }
+
+    private void deleteFormItems()
+    {
+        int size = itemForm.size();
+        if (size != 0)
+        {
+            for (int i=0; i<size; i++)
+                itemForm.delete(0);
+        }
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = instance.getSelectedIndex();
+        String item = instance.getString(index);
+        if (c == cmdAppend || c == cmdManyItems)
+        {
+            if (c == cmdAppend)
+            {
+                deleteFormItems();
+                itemForm.removeCommand(cmdReplace);
+                itemForm.removeCommand(cmdDelete);
+            }
+            if (c == cmdManyItems)
+            {
+                itemForm.addCommand(cmdReplace);
+                itemForm.addCommand(cmdDelete);
+            }
+            if (item.equals(exCgStr))
+                addChoiceGroup(exCgStr, ChoiceGroup.EXCLUSIVE);
+            else if (item.equals(mulCgStr))
+                addChoiceGroup(mulCgStr, ChoiceGroup.MULTIPLE);
+            else if (item.equals(popCgStr))
+                addChoiceGroup(popCgStr, ChoiceGroup.POPUP);
+            else if (item.equals(iGStr))
+                addGauge(iGStr, true);
+            else if (item.equals(nGStr))
+                addGauge(nGStr, false);
+            else if (item.equals(dfStr))
+            {
+                addDateField("DATE", DateField.DATE);
+                addDateField("TIME", DateField.TIME);
+                addDateField("DATE_TIME", DateField.DATE_TIME);
+            }
+            else if (item.equals(siStr))
+                addStringItem("StringItemLabel", "StringItemText");
+            else if (item.equals(imgStr))
+                addImageItem();
+            else if (item.equals(smallSpacerStr))
+                addSpacer(20,20);
+            else if (item.equals(bigSpacerStr))
+                addSpacer(100,100);
+            else if (item.equals(wideSpacerStr))
+                addSpacer(1000,10);
+            else if (item.equals(tallSpacerStr))
+                addSpacer(10,1000);
+            else if (item.equals(tfStr))
+            {
+                addTextField("ANY", TextField.ANY);
+                addTextField("UNEDITABLE", TextField.UNEDITABLE);
+            }
+            else if (item.equals(bigImgStr))
+                addBigImage();
+        }
+        Display.getDisplay(parent).setCurrent(itemForm);
+        if (c == cmdBack)
+            Display.getDisplay(parent).setCurrent(instance);
+        if (c == cmdReplace)
+        {
+            //Item to replace 1st Item
+            Item si = new StringItem("Replaced StringItem", "StringItem Text");
+            if (itemForm.size() != 0)
+                itemForm.set(0, si);
+            Display.getDisplay(parent).setCurrent(itemForm);
+        }
+        if (c == cmdDelete)
+        {
+            if (itemForm.size() == 0)
+            {
+                //to tell the user Form is empty
+                Alert a = new Alert("Info", "Form is empty,add Items before testing delete", null, AlertType.INFO);
+                a.setTimeout(5000);
+                Display.getDisplay(parent).setCurrent(a);
+            }
+            else
+            {
+                itemForm.delete(0);
+            }
+            Display.getDisplay(parent).setCurrent(itemForm);
+        }
+        if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_StringItem_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <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="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_StringItem_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/FormStringItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,500 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test all the StringItem tests
+ */
+
+public class FormStringItemTests extends Form implements CommandListener, ItemCommandListener
+{
+
+    //referemce to the parent MIDlet
+    private Midp_StringItem_01 m = null;
+
+    //the form to add the StringItems
+    private Form stringItemForm = null;
+
+    //the label to create the StringItem
+    private TextField label = null;
+
+    //the text to create the StringItem
+    private TextField text = null;
+
+    //the text to create the StringItem
+    private TextField width = null;
+    //the text to create the StringItem
+    private TextField height = null;
+
+    //the StringItem to test
+    private StringItem si = null;
+
+    private ChoiceGroup cg = null;
+    private String[] cgTypes = {"LAYOUT_DEFAULT","LAYOUT_LEFT","LAYOUT_RIGHT","LAYOUT_CENTER","LAYOUT_TOP","LAYOUT_BOTTOM",
+                                "LAYOUT_VCENTER","LAYOUT_NEWLINE_BEFORE","LAYOUT_NEWLINE_AFTER","LAYOUT_SHRINK","LAYOUT_VSHRINK",
+                                "LAYOUT_EXPAND","LAYOUT_VEXPAND"
+                               };
+
+    //the command to go back to the main screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the command to create the StringItem with the entered label and text
+    private Command cmdCreate = new Command("Create", Command.SCREEN, 1);
+
+    //the command to create the StringItem with the entered label and text and with focus
+    private Command cmdCreateHL = new Command("Create as Hyperlink", Command.SCREEN, 1);
+
+    //the command to create the StringItem with the entered label and text and with focus
+    private Command cmdCreateButton = new Command("Create as Button", Command.SCREEN, 1);
+
+    //the command to unlock the Item
+    private Command cmdUnlock = new Command("Unlock", Command.SCREEN, 1);
+    //the command for the item
+    private Command cmdItem = new Command("Item cmd", Command.ITEM, 1);
+
+    //the command to remove/restore the item command or the first item
+    private Command cmdRemoveCommand = new Command("Remove command", Command.SCREEN, 1);
+    private Command cmdRestoreCommand = new Command("Restore command", Command.SCREEN, 1);
+    private Command cmdRemoveItem = new Command("Remove first item", Command.SCREEN, 1);
+
+    //Command for adding the itemcommandlisteners for the stringitems in layout tests
+    private Command cmdAddListeners = new Command("Add listeners", Command.SCREEN, 1);
+
+    //the command for layout test
+    private Command cmdLayout = new Command("Layout Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdLayoutButton = new Command("Layout Button Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdLayoutHL = new Command("Layout Hyperlink Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayout = new Command("Vertical Layout Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayoutHL = new Command("Vertical Layout Hyperlink Test", Command.SCREEN, 1);
+    //the command for layout test
+    private Command cmdVLayoutButton = new Command("Vertical Layout Button Test", Command.SCREEN, 1);
+    //the command for adding a StringItem with long text
+    private Command cmdLongText = new Command("Long text layout test", Command.SCREEN, 1);
+
+    private Command cmdNext = new Command("Next", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    static int change = -1;
+
+    public FormStringItemTests(Midp_StringItem_01 m)
+    {
+        //set the name of the form to be the name of MIDlet
+        super(m.getClass().getName());
+        this.m = m;
+
+        //create TextFields
+        label = new TextField("Label:", null, 200, TextField.ANY);
+        text = new TextField("Text:", null, 200, TextField.ANY);
+        width = new TextField("Set preferred width:", null, 5, TextField.NUMERIC);
+        height = new TextField("Set preferred height:", null, 5, TextField.NUMERIC);
+        cg = new ChoiceGroup("Layout:",ChoiceGroup.EXCLUSIVE,cgTypes,null);
+        append(label);
+        append(text);
+        append(width);
+        append(height);
+        append(cg);
+        addCommand(cmdCreate);
+        addCommand(cmdCreateHL);
+        addCommand(cmdCreateButton);
+        addCommand(cmdLayout);
+        addCommand(cmdLayoutHL);
+        addCommand(cmdLayoutButton);
+        addCommand(cmdVLayout);
+        addCommand(cmdVLayoutHL);
+        addCommand(cmdVLayoutButton);
+        addCommand(cmdLongText);
+        addCommand(cmdExit);
+        setCommandListener(this);
+
+        Display.getDisplay(m).setCurrent(this);
+
+        //create StringItemForm
+        stringItemForm = new Form("StringItem");
+        stringItemForm.addCommand(cmdBack);
+        stringItemForm.setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            label.setString(null);
+            text.setString(null);
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdLongText)
+        {
+            String longString = "This is a really long string. Check that you can successfully" +
+                                " read the last line (congratulations).\n" +
+                                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                " urna, hendrerit id fringilla eu, feugiat blandit tellus. Curabitur" +
+                                " scelerisque tempus ante, eu convallis ligula ultrices nec. Nullam" +
+                                " vulputate aliquet ullamcorper. Lorem ipsum dolor sit amet," +
+                                " consectetur adipiscing elit. Proin at odio vel urna luctus dignissim" +
+                                " a quis urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
+                                " Phasellus aliquet luctus eros vitae aliquam. Suspendisse ut magna a" +
+                                " ipsum fermentum imperdiet. Maecenas eu nunc sed metus placerat" +
+                                " adipiscing. Duis lacus lacus, vestibulum id vestibulum a, tempus at" +
+                                " nulla. Proin sagittis nibh vitae dui interdum varius. Cras purus" +
+                                " nulla, lobortis eu laoreet a, ultricies vitae sem. Integer aliquam" +
+                                " ultricies metus. Nulla nec dignissim mi. Nullam risus augue, egestas" +
+                                " vitae facilisis eu, adipiscing eu turpis. Nulla convallis semper" +
+                                " lobortis. Nullam eget lacus nunc. Nam ipsum lectus, mattis in mollis" +
+                                " eu, tristique nec nibh. Nam pellentesque euismod est, a laoreet turpis" +
+                                " pulvinar bibendum. Sed malesuada lacus eu ante luctus ut faucibus odio" +
+                                " tristique. Donec quis mi ante. Praesent a porta velit. Duis tincidunt" +
+                                " velit eget sapien viverra pulvinar.\n" +
+                                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas" +
+                                " tempor nisl in quam aliquet eu posuere eros tempor. Vivamus felis" +
+                                " urna, hendrerit id fringilla eu, feugiat blandit tellus. Curabitur" +
+                                " scelerisque tempus ante, eu convallis ligula ultrices nec. Nullam" +
+                                " vulputate aliquet ullamcorper. Lorem ipsum dolor sit amet," +
+                                " consectetur adipiscing elit. Proin at odio vel urna luctus dignissim" +
+                                " a quis urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
+                                " Phasellus aliquet luctus eros vitae aliquam. Suspendisse ut magna a" +
+                                " ipsum fermentum imperdiet. Maecenas eu nunc sed metus placerat" +
+                                " adipiscing. Duis lacus lacus, vestibulum id vestibulum a, tempus at" +
+                                " nulla. Proin sagittis nibh vitae dui interdum varius. Cras purus" +
+                                " nulla, lobortis eu laoreet a, ultricies vitae sem. Integer aliquam" +
+                                " ultricies metus. Nulla nec dignissim mi. Nullam risus augue, egestas" +
+                                " vitae facilisis eu, adipiscing eu turpis. Nulla convallis semper" +
+                                " lobortis. Nullam eget lacus nunc. Nam ipsum lectus, mattis in mollis" +
+                                " eu, tristique nec nibh. Nam pellentesque euismod est, a laoreet turpis" +
+                                " pulvinar bibendum. Sed malesuada lacus eu ante luctus ut faucibus odio" +
+                                " tristique. Donec quis mi ante. Praesent a porta velit. Duis tincidunt" +
+                                " velit eget sapien viverra pulvinar.\n" +
+                                "Now, congratulations if you can read this final line!";
+            si = new StringItem("The StringItem", longString);
+            stringItemForm.append(si);
+            Display.getDisplay(m).setCurrent(stringItemForm);
+        }
+        else if (c == cmdNext)
+        {
+            change++;
+            changeForm();
+        }
+        else if (c == cmdRemoveCommand)
+        {
+            Item item = null;
+            item = stringItemForm.get(0);
+            item.removeCommand(cmdUnlock);
+            item.removeCommand(cmdItem);
+        }
+        else if (c == cmdRestoreCommand)
+        {
+            Item item = null;
+            item = stringItemForm.get(0);
+            item.addCommand(cmdUnlock);
+            item.setDefaultCommand(cmdItem);
+        }
+        else if (c == cmdRemoveItem)
+        {
+            stringItemForm.delete(0);
+        }
+        else if (c == cmdLayout)
+        {
+
+            layoutTest(Item.PLAIN);
+
+        }
+        else if (c == cmdLayoutHL)
+        {
+
+            layoutTest(Item.HYPERLINK);
+
+        }
+        else if (c == cmdLayoutButton)
+        {
+
+            layoutTest(Item.BUTTON);
+
+        }
+        else if (c == cmdVLayout)
+        {
+
+            verticalLayoutTest(Item.PLAIN);
+
+        }
+        else if (c == cmdVLayoutHL)
+        {
+
+            verticalLayoutTest(Item.HYPERLINK);
+
+        }
+        else if (c == cmdVLayoutButton)
+        {
+
+            verticalLayoutTest(Item.BUTTON);
+
+        }
+        else if (c == cmdAddListeners)
+        {
+            int size = stringItemForm.size();
+            for (int i = 0; i < size; i++)
+            {
+                Item item = null;
+                item = stringItemForm.get(i);
+                item.setItemCommandListener(this);
+            }
+        }
+        else if (c == cmdExit)
+        {
+            m.destroyApp(false);
+            m.notifyDestroyed();
+        }
+        else
+        {
+            String l = label.getString();
+            String t = text.getString();
+            int index = cg.getSelectedIndex();
+            String lo = cg.getString(index);
+            int layout = 0;
+
+            if (c == cmdCreate)
+                si = new StringItem(l, t);
+            else if (c == cmdCreateHL)
+            {
+                si = new StringItem(l, t, Item.HYPERLINK);
+                si.setDefaultCommand(cmdItem);
+            }
+            else if (c == cmdCreateButton)
+            {
+                si = new StringItem(l, t, Item.BUTTON);
+                si.setDefaultCommand(cmdItem);
+            }
+
+            if (lo.equals(cgTypes[0]))
+            {
+                layout = Item.LAYOUT_DEFAULT;
+            }
+            else if (lo.equals(cgTypes[1]))
+            {
+                layout = Item.LAYOUT_LEFT;
+            }
+            else if (lo.equals(cgTypes[2]))
+            {
+                layout = Item.LAYOUT_RIGHT;
+            }
+            else if (lo.equals(cgTypes[3]))
+            {
+                layout = Item.LAYOUT_CENTER;
+            }
+            else if (lo.equals(cgTypes[4]))
+            {
+                layout = Item.LAYOUT_TOP;
+            }
+            else if (lo.equals(cgTypes[5]))
+            {
+                layout = Item.LAYOUT_BOTTOM;
+            }
+            else if (lo.equals(cgTypes[6]))
+            {
+                layout = Item.LAYOUT_VCENTER;
+            }
+            else if (lo.equals(cgTypes[7]))
+            {
+                layout = Item.LAYOUT_NEWLINE_BEFORE;
+            }
+            else if (lo.equals(cgTypes[8]))
+            {
+                layout = Item.LAYOUT_NEWLINE_AFTER;
+            }
+            else if (lo.equals(cgTypes[9]))
+            {
+                layout = Item.LAYOUT_SHRINK;
+            }
+            else if (lo.equals(cgTypes[10]))
+            {
+                layout = Item.LAYOUT_VSHRINK;
+            }
+            else if (lo.equals(cgTypes[11]))
+            {
+                layout = Item.LAYOUT_EXPAND;
+            }
+            else if (lo.equals(cgTypes[12]))
+            {
+                layout = Item.LAYOUT_VEXPAND;
+            }
+            si.setItemCommandListener(this);
+            si.setLayout(layout);
+            setSize(width.getString(),height.getString());
+            stringItemForm.append(si);
+            stringItemForm.addCommand(cmdRemoveCommand);
+            stringItemForm.addCommand(cmdRestoreCommand);
+            stringItemForm.addCommand(cmdRemoveItem);
+            Display.getDisplay(m).setCurrent(stringItemForm);
+        }
+    }
+    public void commandAction(Command c, Item i)
+    {
+        if (c == cmdBack)
+        {
+            label.setString(null);
+            text.setString(null);
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdUnlock)
+        {
+            i.setPreferredSize(-1,-1);
+        }
+        else if (c == cmdItem)
+        {
+            i.setLabel(i.getLabel() + ".");
+        }
+    }
+    private void setSize(String width, String height)
+    {
+        if (width.equals("") && height.equals(""))
+        {
+            si.setPreferredSize(-1,-1);
+        }
+        else if (height.equals(""))
+        {
+            si.setPreferredSize(Integer.parseInt(width),-1);
+        }
+        else if (width.equals(""))
+        {
+            si.setPreferredSize(-1,Integer.parseInt(height));
+        }
+        else
+        {
+            si.setPreferredSize(Integer.parseInt(width),Integer.parseInt(height));
+        }
+    }
+    private void layoutTest(int mode)
+    {
+        stringItemForm.deleteAll();
+        stringItemForm.addCommand(cmdAddListeners);
+        si = new StringItem("Default Layout","StringItem",mode);
+
+        StringItem si2 = new StringItem("Layout Right","StringItem",mode);
+        si2.setLayout(StringItem.LAYOUT_RIGHT);
+
+        StringItem si3 = new StringItem("Layout Left","StringItem",mode);
+        si3.setLayout(StringItem.LAYOUT_LEFT);
+
+        StringItem si4 = new StringItem("Layout Center","StringItem",mode);
+        si4.setLayout(StringItem.LAYOUT_CENTER);
+
+        StringItem si5 = new StringItem("Layout Expand","StringItem",mode);
+        si5.setLayout(StringItem.LAYOUT_EXPAND | StringItem.LAYOUT_NEWLINE_BEFORE);
+        si5.setDefaultCommand(cmdBack);
+
+        if (mode != Item.PLAIN)
+        {
+            si.setDefaultCommand(cmdBack);
+            si2.setDefaultCommand(cmdBack);
+            si3.setDefaultCommand(cmdBack);
+            si4.setDefaultCommand(cmdBack);
+        }
+        stringItemForm.append(si);
+        stringItemForm.append(si2);
+        stringItemForm.append(si3);
+        stringItemForm.append(si4);
+        stringItemForm.append(si5);
+
+        Display.getDisplay(m).setCurrent(stringItemForm);
+    }
+
+    private void verticalLayoutTest(int mode)
+    {
+        stringItemForm.deleteAll();
+        si = new StringItem("Default","String",mode);
+        Spacer sp = new Spacer(10, this.getHeight());
+        if (mode != Item.PLAIN)
+        {
+            si.setDefaultCommand(cmdBack);
+        }
+        stringItemForm.addCommand(cmdNext);
+
+        stringItemForm.append(si);
+        stringItemForm.append(sp);
+        Display.getDisplay(m).setCurrent(stringItemForm);
+    }
+    private void changeForm()
+    {
+
+        switch (change)
+        {
+        case -1:
+            stringItemForm.setTitle("Default");
+            si.setLabel("Default");
+            si.setLayout(StringItem.LAYOUT_DEFAULT);
+            break;
+        case 0:
+            stringItemForm.setTitle("Default(75,75)");
+            si.setPreferredSize(75,75);
+            break;
+        case 1:
+            stringItemForm.setTitle("Top");
+            si.setPreferredSize(-1,-1);
+            si.setLabel("Top");
+            si.setLayout(StringItem.LAYOUT_TOP);
+            break;
+        case 2:
+            stringItemForm.setTitle("Top(75,75)");
+            si.setPreferredSize(75,75);
+            break;
+        case 3:
+            stringItemForm.setTitle("Vcenter");
+            si.setPreferredSize(-1,-1);
+            si.setLabel("VCenter");
+            si.setLayout(StringItem.LAYOUT_VCENTER);
+            break;
+        case 4:
+            stringItemForm.setTitle("Vcenter(75,75)");
+            si.setPreferredSize(75,75);
+            break;
+        case 5:
+            stringItemForm.setTitle("Bottom");
+            si.setPreferredSize(-1,-1);
+            si.setLabel("Bottom");
+            si.setLayout(StringItem.LAYOUT_BOTTOM);
+            break;
+        case 6:
+            stringItemForm.setTitle("Bottom(75,75)");
+            si.setPreferredSize(75,75);
+            break;
+        case 7:
+            stringItemForm.setTitle("Vexpand");
+            si.setPreferredSize(-1,-1);
+            si.setLabel("Vexpand");
+            si.setLayout(StringItem.LAYOUT_VEXPAND);
+            break;
+        case 8:
+            change = -1;
+            changeForm();
+            return;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/Midp_StringItem_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* 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"
+* 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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for Midp_StringItem_01 tests.
+ */
+
+public class Midp_StringItem_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new FormStringItemTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This is the main class for StringItemTests1 tests.
+ */
+
+public class StringItemTests1 extends MIDlet implements CommandListener, ItemCommandListener
+{
+
+    //the form to add the StringItems
+    private Form stringItemForm = null;
+    //the StringItem to test
+    private StringItem si = null;
+    //the StringItem types
+    private String[] siTypes = {"PLAIN", "HYPERLINK", "BUTTON"};
+
+    // commands for StringItem type
+    private Command cmdSI1 = new Command(siTypes[0], Command.SCREEN, 1);
+    private Command cmdSI2 = new Command(siTypes[1], Command.SCREEN, 1);
+    private Command cmdSI3 = new Command(siTypes[2], Command.SCREEN, 1);
+
+    // Commands for label and text
+    private Command cmd01 = new Command("Label and text", Command.SCREEN, 1);
+    private Command cmd02 = new Command("Text, empty label", Command.SCREEN, 1);
+    private Command cmd03 = new Command("Whitespace in label, normal text", Command.SCREEN, 1);
+    private Command cmd04 = new Command("Very long text, normal label", Command.SCREEN, 1);
+    private Command cmd09 = new Command("Very long label, normal text", Command.SCREEN, 1);
+    // Commands for new line char tests
+    private Command cmd05 = new Command("Label with 1 newline, normal text", Command.SCREEN, 1);
+    private Command cmd06 = new Command("Label with 2 newline, normal text", Command.SCREEN, 1);
+    private Command cmd07 = new Command("Text with 1 newline, normal label", Command.SCREEN, 1);
+    private Command cmd08 = new Command("Text with 2 newline, normal label", Command.SCREEN, 1);
+    // Commands for the StringItems
+    private Command cmdItem1 = new Command("Itemcommand1", Command.ITEM, 1);
+    private Command cmdItem2 = new Command("Itemcommand2", Command.ITEM, 1);
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        stringItemForm = new Form("StringItem");
+        si = new StringItem("Label", "Text");
+        stringItemForm.append(si);
+        stringItemForm.addCommand(cmdSI1);
+        stringItemForm.addCommand(cmdSI2);
+        stringItemForm.addCommand(cmdSI3);
+        stringItemForm.addCommand(cmd01);
+        stringItemForm.addCommand(cmd02);
+        stringItemForm.addCommand(cmd03);
+        stringItemForm.addCommand(cmd04);
+        stringItemForm.addCommand(cmd05);
+        stringItemForm.addCommand(cmd06);
+        stringItemForm.addCommand(cmd07);
+        stringItemForm.addCommand(cmd08);
+        stringItemForm.addCommand(cmd09);
+        stringItemForm.setCommandListener(this);
+        Display.getDisplay(this).setCurrent(stringItemForm);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdSI1)
+        {
+            // Plain type
+            stringItemForm.deleteAll();
+            si = new StringItem("Label", "Text");
+            stringItemForm.append(si);
+        }
+        else if (c == cmdSI2)
+        {
+            // Hyperlink type
+            stringItemForm.deleteAll();
+            si = new StringItem("Label", "Text", Item.HYPERLINK);
+            stringItemForm.append(si);
+            si.addCommand(cmdItem1);
+            si.addCommand(cmdItem2);
+            si.setItemCommandListener(this);
+        }
+        else if (c == cmdSI3)
+        {
+            // Button type
+            stringItemForm.deleteAll();
+            si = new StringItem("Label", "Text", Item.BUTTON);
+            stringItemForm.append(si);
+            si.addCommand(cmdItem1);
+            si.addCommand(cmdItem2);
+            si.setItemCommandListener(this);
+        }
+        else if (c == cmd01)
+        {
+            si.setLabel("This is the label");
+            si.setText("This is the text.");
+        }
+        else if (c == cmd02)
+        {
+            si.setLabel("");
+            si.setText("This is the text.");
+        }
+        else if (c == cmd03)
+        {
+            si.setLabel("          ");
+            si.setText("This is the text.");
+        }
+        else if (c == cmd04)
+        {
+            si.setLabel("This is the label");
+            si.setText("This is a very long text. " +
+                       "This is a very long text. " +
+                       "This is a very long text. " +
+                       "This is a very long text. " +
+                       "This is a very long text. " +
+                       "This is a very long text. " +
+                       "This is a very long text.");
+        }
+        else if (c == cmd05)
+        {
+            si.setLabel("Label with 1\nnewline char");
+            si.setText("This is the text.");
+        }
+        else if (c == cmd06)
+        {
+            si.setLabel("Label with 2\n\nnewline chars");
+            si.setText("This is the text.");
+        }
+        else if (c == cmd07)
+        {
+            si.setLabel("This is the label");
+            si.setText("Text with 1\nnewline char.");
+        }
+        else if (c == cmd08)
+        {
+            si.setLabel("This is the label");
+            si.setText("Text with 2\n\nnewline chars.");
+        }
+        else if (c == cmd09)
+        {
+            si.setText("This is the text.");
+            si.setLabel("This is a very long label. " +
+                        "This is a very long label. " +
+                        "This is a very long label. " +
+                        "This is a very long label. " +
+                        "This is a very long label. " +
+                        "This is a very long label. " +
+                        "This is a very long label.");
+        }
+    }
+
+    public void commandAction(Command c, Item i)
+    {
+        Alert alert = new Alert(c.getLabel(),"Command executed.",null, AlertType.INFO);
+        Display.getDisplay(this).setCurrent(alert);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This is the main class for StringItemTests1 tests.
+ */
+
+public class StringItemTests2 extends MIDlet implements CommandListener, ItemCommandListener
+{
+
+    //the form to add the StringItems
+    private Form stringItemForm = null;
+    //the main form
+    private Form mainForm = null;
+    //the StringItem to test
+    private StringItem si = null;
+    //list for StringItem types
+    private ChoiceGroup cgType = null;
+    //list for labels
+    private ChoiceGroup cgLabel = null;
+    //list for texts
+    private ChoiceGroup cgText = null;
+    //the StringItem types
+    private String[] siTypes = {"PLAIN", "HYPERLINK", "BUTTON"};
+    private String[] siLabels = {"empty", "Short label", "This is a very long label that might not fit on the screen."};
+    private String[] siStrings =
+    {
+        "1 This fits on one line.",
+        "2 This is one short paragraph that should fit on 2 lines.",
+        "3 This is one longer paragraph that might take about 3 lines in the device, depends on screen size.",
+        "4 This paragraph\nhas one linefeed.",
+        "5 This is a somewhat longer paragraph that might take about three lines.\nHere was a linefeed.",
+        "6TheWrappingBasedOnCharacterBoundariesCanBeTestedWithThisLineOfText."
+    };
+
+    private Command cmdAdd = new Command("Add item", Command.SCREEN, 1);
+    private Command cmdForward = new Command("Switch form", Command.SCREEN, 1);
+    // Command to go back to main form
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+    // Command to clear the test form
+    private Command cmdClear = new Command("Clear form", Command.SCREEN, 1);
+
+    // Commands for the StringItems
+    private Command cmdItem1 = new Command("Itemcommand1", Command.ITEM, 1);
+    private Command cmdItem2 = new Command("Itemcommand2", Command.ITEM, 1);
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        stringItemForm = new Form("StringItem");
+        mainForm = new Form("Main");
+        cgType = new ChoiceGroup("Type:", ChoiceGroup.POPUP, siTypes, null);
+        cgLabel = new ChoiceGroup("Label:", ChoiceGroup.POPUP, siLabels, null);
+        cgText = new ChoiceGroup("Text:", ChoiceGroup.POPUP, siStrings, null);
+
+        mainForm.append(cgType);
+        mainForm.append(cgLabel);
+        mainForm.append(cgText);
+
+        mainForm.addCommand(cmdAdd);
+        mainForm.addCommand(cmdForward);
+        mainForm.setCommandListener(this);
+        stringItemForm.addCommand(cmdBack);
+        stringItemForm.addCommand(cmdClear);
+        stringItemForm.setCommandListener(this);
+        Display.getDisplay(this).setCurrent(mainForm);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdAdd)
+        {
+            // Create correct type of stringitem
+            int index = cgType.getSelectedIndex();
+            if (index == 0)
+                si = new StringItem("", "", Item.PLAIN);
+            else
+            {
+                if (index == 1)
+                    si = new StringItem("", "", Item.HYPERLINK);
+                else if (index == 2)
+                    si = new StringItem("", "", Item.BUTTON);
+                si.addCommand(cmdItem1);
+                si.addCommand(cmdItem2);
+                si.setItemCommandListener(this);
+            }
+
+            // Set the label
+            index = cgLabel.getSelectedIndex();
+            if (index == 0)
+                si.setLabel("");
+            else
+                si.setLabel(cgLabel.getString(index));
+            // Set the text
+            index = cgText.getSelectedIndex();
+            si.setText(cgText.getString(index));
+            stringItemForm.append(si);
+            Display.getDisplay(this).setCurrent(stringItemForm);
+        }
+
+        else if (c == cmdBack)
+        {
+            Display.getDisplay(this).setCurrent(mainForm);
+        }
+        else if (c == cmdClear)
+        {
+            stringItemForm.deleteAll();
+        }
+        else if (c == cmdForward)
+        {
+            Display.getDisplay(this).setCurrent(stringItemForm);
+        }
+    }
+
+    public void commandAction(Command c, Item i)
+    {
+        Alert alert = new Alert(c.getLabel(),"Command executed.",null, AlertType.INFO);
+        Display.getDisplay(this).setCurrent(alert);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextBox_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextBox_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextBox_01"/>
+    <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.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/Midp_TextBox_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_TextBox_01 tests.
+ */
+
+public class Midp_TextBox_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ScreenTextBoxTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/ScreenTextBoxTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,361 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the below TextBox test cases:
+ * 1.Layout
+ * 2.TextBox constraints and T9 support
+ *
+ */
+
+public class ScreenTextBoxTests extends Form implements CommandListener
+{
+
+    //parent MIDlet
+    private static Midp_TextBox_01 parent = null;
+
+    //the instance of this class
+    private static ScreenTextBoxTests instance = null;
+
+    //TextBox1 for testing test1
+    private TextBox tb1 = null;
+
+    //TextBox2 for testing test2
+    private TextBox tb2 = null;
+
+    //TextBox3 for testing test3
+    private TextBox tb3 = null;
+
+    //Form for testing test3 which contains textFields title and maxSize
+    private Form formTest3 = null;
+
+    //TextField to set TextBox title for test3
+    private TextField titleT = null;
+
+    //TextField to set TextBox maxSize for test3
+    private TextField maxSizeT = null;
+
+    //List which contains TextField constraints name as elements to test Test2
+    private List listConstraints = null;
+
+    //elements in the listConstraints
+    private final String listElements[] =
+    {
+        "ANY", "URL", "PHONENUMBER", "NUMERIC",
+        "EMAILADDR", "PASSWORD", "PWD|EMAILADDR",
+        "PWD|NUMERIC", "PWD|PNO", "PWD|URL",
+        "DECIMAL", "INITAL_CAPS_SENTENCE",
+        "INITIAL_CAPS_WORD", "UNEDITABLE", "NON_PREDICTIVE",
+        "SENSITIVE",
+        "DECIMAL|PWD", "NUMERIC|UNEDITABLE",
+        "DECIMAL|UNEDITABLE", "URL|UNEDITABLE", "EMAILADDR|UNEDITABLE",
+        "PHONENUMBER|UNEDITABLE", "ANY|PWD|UNEDITABLE", "NUMERIC|PWD|UNEDITABLE",
+        "DECIMAL|PWD|UNEDITABLE", "URL|PWD|UNEDITABLE", "EMAILADDR|PWD|UNDEDITABLE",
+        "PNO|PWD|UNDEDITABLE"
+    };
+
+    //command for test3
+    private Command cmdGetMaxSize = new Command("getMaxSize", Command.SCREEN, 1);
+
+    //command to show tb3
+    private Command cmdShowTextBox3 = new Command("ShowTextBox3", Command.SCREEN, 1);
+
+    //Command for test1
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+
+    //Command for test2
+    private Command cmdTest2 = new Command("Test2", Command.SCREEN, 1);
+
+    //Command for test3
+    private Command cmdTest3 = new Command("Test3", Command.SCREEN, 1);
+
+    //Command to set title to TextBox1
+    private Command cmdNullT = new Command("Null Title", Command.OK, 1);
+
+    //Command to set title to TextBox1
+    private Command cmdEmptyT = new Command("Empty Title", Command.SCREEN, 1);
+
+    //Command to set title to TextBox1
+    private Command cmdBigT = new Command("Big Title", Command.SCREEN, 1);
+
+    //Command to go Back to the previous Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Command to Ok whic is added to the listConstraints
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //maximum size which is specified while creating TextBox
+    private final int MAX_SIZE = 100;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public ScreenTextBoxTests(Midp_TextBox_01 parent)
+    {
+
+        //set the title of the form as the name of the MIDlet
+        super(parent.getClass().getName());
+        this.parent = parent;
+
+        if (instance == null)
+        {
+            instance = this;
+        }
+        //add test commands
+        instance.addCommand(cmdTest1);
+        instance.addCommand(cmdTest2);
+        instance.addCommand(cmdTest3);
+        instance.addCommand(cmdExit);
+
+        //create TextBox with constraints ANY
+        tb3 = new TextBox("ANY", null, MAX_SIZE, TextField.ANY);
+
+        //add cmdBack to tb2
+        tb3.addCommand(cmdBack);
+        tb3.setCommandListener(this);
+        setCommandListener(this);
+        show();
+    }
+
+    /**
+     * creates and sets the current screen to be tb1
+     */
+    private void addTextBoxTest1()
+    {
+        //create TextBox
+        tb1 = new TextBox("ANY", null, MAX_SIZE, TextField.ANY);
+        //add commands to TextBox1
+        Ticker t = new Ticker("Test1");
+        tb1.setTicker(t);
+        tb1.addCommand(cmdNullT);
+        tb1.addCommand(cmdEmptyT);
+        tb1.addCommand(cmdBigT);
+        tb1.addCommand(cmdBack);
+        tb1.setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(tb1);
+    }
+
+    /**
+     * creates and sets the current screen to be tb2
+     */
+    private void addTextBoxTest2(String title, int constraints)
+    {
+        //create TextBox with constraints ANY
+        tb2 = new TextBox(title, null, MAX_SIZE, constraints);
+        //add cmdBack to tb2
+        tb2.addCommand(cmdBack);
+        tb2.setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(tb2);
+    }
+    private void addUneditableTextBoxTest2(String title, int constraints)
+    {
+        //create TextBox with constraints ANY
+        tb2 = new TextBox(title, "Uneditable", MAX_SIZE, constraints);
+        //add cmdBack to tb2
+        tb2.addCommand(cmdBack);
+        tb2.setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(tb2);
+    }
+
+    private void addNumericUneditableTextBoxTest2(String title, int constraints)
+    {
+        //create TextBox with constraints ANY
+        tb2 = new TextBox(title, "123", MAX_SIZE, constraints);
+        //add cmdBack to tb2
+        tb2.addCommand(cmdBack);
+        tb2.setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(tb2);
+    }
+    /**
+     * Method to create and set the current screen
+     * to be formTest3
+     */
+    private void addFormTest3()
+    {
+        //create form with title
+        formTest3 = new Form("Test3");
+        titleT = new TextField("Title", "ANY", 50, TextField.ANY);
+        maxSizeT = new TextField("MaxSize", null, 6, TextField.NUMERIC);
+        formTest3.append(titleT);
+        formTest3.append(maxSizeT);
+        formTest3.addCommand(cmdBack);
+        formTest3.addCommand(cmdGetMaxSize);
+        formTest3.addCommand(cmdShowTextBox3);
+        formTest3.setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(formTest3);
+    }
+
+    /**
+     * create the listConstraints with elements.
+     * This is called when Test2 command is pressed
+     */
+    private void addListConstraints()
+    {
+        listConstraints = new List("ListConstraints", List.IMPLICIT, listElements, null);
+        listConstraints.setCommandListener(this);
+        listConstraints.addCommand(cmdBack);
+        listConstraints.addCommand(cmdOk);
+        Display.getDisplay(parent).setCurrent(listConstraints);
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdTest1)
+        {
+            addTextBoxTest1();
+            Display.getDisplay(parent).setCurrent(tb1);
+        }
+        else if (c == cmdNullT)
+        {
+            tb1.setTitle(null);
+            Display.getDisplay(parent).setCurrent(tb1);
+        }
+        else if (c == cmdEmptyT)
+        {
+            tb1.setTitle(" ");
+            Display.getDisplay(parent).setCurrent(tb1);
+        }
+        else if (c == cmdBigT)
+        {
+            tb1.setTitle("The title of this TextBox is too long to fit in to the" +
+                         " reserved space");
+            Display.getDisplay(parent).setCurrent(tb1);
+        }
+        else if (c == cmdBack)
+        {
+            if (s == tb1 || s == listConstraints || s == formTest3)
+                Display.getDisplay(parent).setCurrent(instance);
+            else if (s == tb2)
+                Display.getDisplay(parent).setCurrent(listConstraints);
+            else if (s == tb3)
+                Display.getDisplay(parent).setCurrent(formTest3);
+        }
+        else if (c == cmdTest2)
+            addListConstraints();
+        else if (c == cmdOk)
+        {
+            int index = listConstraints.getSelectedIndex();
+            String element = listConstraints.getString(index);
+            if (element.equals(listElements[0]))
+                addTextBoxTest2("ANY", TextField.ANY);
+            else if (element.equals(listElements[1]))
+                addTextBoxTest2("URL", TextField.URL);
+            else if (element.equals(listElements[2]))
+                addTextBoxTest2("PHONENUMBER", TextField.PHONENUMBER);
+            else if (element.equals(listElements[3]))
+                addTextBoxTest2("NUMERIC", TextField.NUMERIC);
+            else if (element.equals(listElements[4]))
+                addTextBoxTest2("EMAILADDR", TextField.EMAILADDR);
+            else if (element.equals(listElements[5]))
+                addTextBoxTest2("PASSWORD", TextField.PASSWORD);
+            else if (element.equals(listElements[6]))
+                addTextBoxTest2("PWD|EMAILADDR", TextField.PASSWORD|TextField.EMAILADDR);
+            else if (element.equals(listElements[7]))
+                addTextBoxTest2("PWD|NUMERIC", TextField.PASSWORD|TextField.NUMERIC);
+            else if (element.equals(listElements[8]))
+                addTextBoxTest2("PWD|PNO", TextField.PASSWORD|TextField.PHONENUMBER);
+            else if (element.equals(listElements[9]))
+                addTextBoxTest2("PWD|URL", TextField.PASSWORD|TextField.URL);
+            else if (element.equals(listElements[10]))
+                addTextBoxTest2("DECIMAL", TextField.DECIMAL);
+            else if (element.equals(listElements[11]))
+                addTextBoxTest2("INITIAL_CAPS_SENTENCE", TextField.INITIAL_CAPS_SENTENCE);
+            else if (element.equals(listElements[12]))
+                addTextBoxTest2("INITIAL_CAPS_WORD", TextField.INITIAL_CAPS_WORD);
+            else if (element.equals(listElements[13]))
+                addUneditableTextBoxTest2("UNEDITABLE", TextField.UNEDITABLE);
+            else if (element.equals(listElements[14]))
+                addTextBoxTest2("NON_PREDICTIVE", TextField.NON_PREDICTIVE);
+            else if (element.equals(listElements[15]))
+                addTextBoxTest2("SENSITIVE", TextField.SENSITIVE);
+
+            else if (element.equals(listElements[16]))
+                addTextBoxTest2("DECIMAL|PWD", TextField.DECIMAL|TextField.PASSWORD);
+            else if (element.equals(listElements[17]))
+                addNumericUneditableTextBoxTest2("NUMERIC|UNEDITABLE", TextField.NUMERIC|TextField.UNEDITABLE);
+            else if (element.equals(listElements[18]))
+                addNumericUneditableTextBoxTest2("DECIMAL|UNEDITABLE", TextField.DECIMAL|TextField.UNEDITABLE);
+            else if (element.equals(listElements[19]))
+                addUneditableTextBoxTest2("URL|UNEDITABLE", TextField.URL|TextField.UNEDITABLE);
+            else if (element.equals(listElements[20]))
+                addUneditableTextBoxTest2("EMAILADDR|UNEDITABLE", TextField.EMAILADDR|TextField.UNEDITABLE);
+            else if (element.equals(listElements[21]))
+                addNumericUneditableTextBoxTest2("PHONENUMBER|UNEDITABLE", TextField.PHONENUMBER|TextField.UNEDITABLE);
+
+            else if (element.equals(listElements[22]))
+                addUneditableTextBoxTest2("ANY|PWD|UNEDITABLE", TextField.ANY|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[23]))
+                addNumericUneditableTextBoxTest2("NUMERIC|PWD|UNEDITABLE", TextField.NUMERIC|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[24]))
+                addNumericUneditableTextBoxTest2("DECIMAL|PWD|UNEDITABLE", TextField.DECIMAL|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[25]))
+                addUneditableTextBoxTest2("URL|PWD|UNEDITABLE", TextField.URL|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[26]))
+                addUneditableTextBoxTest2("EMAILADDR|PWD|UNDEDITABLE", TextField.EMAILADDR|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[27]))
+                addNumericUneditableTextBoxTest2("PNO|PWD|UNDEDITABLE", TextField.PHONENUMBER|TextField.PASSWORD|TextField.UNEDITABLE);
+        }
+        else if (c == cmdTest3)
+            addFormTest3();
+        else if (c == cmdGetMaxSize)
+        {
+            String sz = maxSizeT.getString();
+            if (sz.length() != 0)
+                tb3.setMaxSize(Integer.parseInt(sz));
+            int mSize = tb3.getMaxSize();
+            Alert a = new Alert("Max Size", new Integer(mSize).toString(),
+                                null, AlertType.INFO);
+            a.setTimeout(Alert.FOREVER);
+            Display.getDisplay(parent).setCurrent(a);
+        }
+        else if (c == cmdShowTextBox3)
+        {
+            tb3.setTitle(titleT.getString());
+            Display.getDisplay(parent).setCurrent(tb3);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+    //end method
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_03/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextBox_03" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextBox_03"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextBox_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_TextBox_03"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_03/src/Midp_TextBox_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test TextBox test case:
+ * -TextBox remembers the cursor position when the control loses focus and regains
+ * later.
+ *
+ */
+
+public class Midp_TextBox_03 extends MIDlet implements CommandListener
+{
+
+    //This is to create popup TextBox
+    public TextBox tb1 = null;
+
+    private List dummyList = null;
+
+    private String[] listStrs = { "1st element", "2nd element", "3rd element", "4th element",
+                                  "5th element", "6th element"
+                                };
+
+    //Commands
+    private Command cmdNext = new Command("Next", Command.SCREEN, 1);
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    private final int MAX_SIZE = 50;
+
+    public Midp_TextBox_03()
+    {
+        tb1 = new TextBox("Test TextBox", null, MAX_SIZE, TextField.ANY);
+        tb1.addCommand(cmdNext);
+        tb1.addCommand(cmdExit);
+        tb1.setCommandListener(this);
+
+        dummyList = new List("Dummy List", List.IMPLICIT, listStrs, null);
+        dummyList.addCommand(cmdBack);
+        dummyList.setCommandListener(this);
+    }
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        Display.getDisplay(this).setCurrent(tb1);
+    }
+
+    /**
+     * This method handles command invocations
+     *
+     * @param c The Command
+     * @param d The Displayable
+     */
+    public void commandAction(Command c, Displayable d)
+    {
+        if (c == cmdNext)
+            Display.getDisplay(this).setCurrent(dummyList);
+        else if (c == cmdBack)
+            Display.getDisplay(this).setCurrent(tb1);
+        else if (c == cmdExit)
+        {
+            destroyApp(false);
+            notifyDestroyed();
+        }
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextField_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextField_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextField_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_TextField_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_01/src/Midp_TextField_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_TextField_01 tests.
+ */
+
+public class Midp_TextField_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new TextFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_01/src/TextFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,202 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test all TextField constraints
+ *
+ */
+
+public class TextFieldTests extends List implements CommandListener
+{
+
+    //parent MIDlet
+    private static Midp_TextField_01 parent = null;
+    //TextField to set TextBox title for test3
+    private TextField tf = null;
+    private Form testForm = null;
+    //elements in the listConstraints
+    private final String listElements[] =
+    {
+        "ANY", "URL", "PHONENUMBER", "NUMERIC",
+        "EMAILADDR", "PASSWORD", "PWD|EMAILADDR",
+        "PWD|NUMERIC", "PWD|PNO", "PWD|URL",
+        "DECIMAL", "INITAL_CAPS_SENTENCE",
+        "INITIAL_CAPS_WORD", "UNEDITABLE", "NON_PREDICTIVE",
+        "SENSITIVE",
+        "DECIMAL|PWD", "NUMERIC|UNEDITABLE",
+        "DECIMAL|UNEDITABLE", "URL|UNEDITABLE", "EMAILADDR|UNEDITABLE",
+        "PHONENUMBER|UNEDITABLE", "ANY|PWD|UNEDITABLE", "NUMERIC|PWD|UNEDITABLE",
+        "DECIMAL|PWD|UNEDITABLE", "URL|PWD|UNEDITABLE", "EMAILADDR|PWD|UNDEDITABLE",
+        "PNO|PWD|UNDEDITABLE"
+    };
+    //Command to go Back to the previous Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //Ok command which is added to this List
+    private Command cmdOk = new Command("Ok", Command.OK, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //maximum size of the TextField
+    private final int MAX_SIZE = 50;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public TextFieldTests(Midp_TextField_01 parent)
+    {
+        //set the title of the list as the name of the MIDlet
+        super(parent.getClass().getName(), List.IMPLICIT);
+        this.parent = parent;
+        for (int i =0; i<listElements.length; i++)
+            append(listElements[i], null);
+        testForm = new Form("Test Form");
+        testForm.addCommand(cmdBack);
+        testForm.setCommandListener(this);
+
+        addCommand(cmdOk);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    /**
+     *
+     * @param title The TextField title
+     * @param constraint The TextField constraint
+     */
+    private void addTextField(String title, int constraint)
+    {
+        tf = new TextField(title, null, MAX_SIZE, constraint);
+        if (testForm.size() != 0)
+            testForm.deleteAll();
+        testForm.append(tf);
+        Display.getDisplay(parent).setCurrent(testForm);
+    }
+
+    private void addNumericTextField(String title, int constraint)
+    {
+        tf = new TextField(title, null, MAX_SIZE, constraint);
+        if (testForm.size() != 0)
+            testForm.deleteAll();
+        testForm.append(tf);
+        Display.getDisplay(parent).setCurrent(testForm);
+    }
+
+    private void addUneditableTextField(String title, int constraint)
+    {
+        tf = new TextField(title, "Uneditable", MAX_SIZE, constraint);
+        if (testForm.size() != 0)
+            testForm.deleteAll();
+        testForm.append(tf);
+        Display.getDisplay(parent).setCurrent(testForm);
+    }
+
+    private void addNumericUneditableTextField(String title, int constraint)
+    {
+        tf = new TextField(title, "123", MAX_SIZE, constraint);
+        if (testForm.size() != 0)
+            testForm.deleteAll();
+        testForm.append(tf);
+        Display.getDisplay(parent).setCurrent(testForm);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+            Display.getDisplay(parent).setCurrent(this);
+        else if (c == cmdOk || c == List.SELECT_COMMAND)
+        {
+            int index = getSelectedIndex();
+            String element = getString(index);
+            if (element.equals(listElements[0]))
+                addTextField("ANY", TextField.ANY);
+            else if (element.equals(listElements[1]))
+                addTextField("URL", TextField.URL);
+            else if (element.equals(listElements[2]))
+                addTextField("PHONENUMBER", TextField.PHONENUMBER);
+            else if (element.equals(listElements[3]))
+                addNumericTextField("NUMERIC", TextField.NUMERIC);
+            else if (element.equals(listElements[4]))
+                addTextField("EMAILADDR", TextField.EMAILADDR);
+            else if (element.equals(listElements[5]))
+                addTextField("PASSWORD", TextField.PASSWORD);
+            else if (element.equals(listElements[6]))
+                addTextField("PWD|EMAILADDR", TextField.PASSWORD|TextField.EMAILADDR);
+            else if (element.equals(listElements[7]))
+                addNumericTextField("PWD|NUMERIC", TextField.PASSWORD|TextField.NUMERIC);
+            else if (element.equals(listElements[8]))
+                addTextField("PWD|PNO", TextField.PASSWORD|TextField.PHONENUMBER);
+            else if (element.equals(listElements[9]))
+                addTextField("PWD|URL", TextField.PASSWORD|TextField.URL);
+            else if (element.equals(listElements[10]))
+                addTextField("DECIMAL", TextField.DECIMAL);
+            else if (element.equals(listElements[11]))
+                addTextField("INITIAL_CAPS_SENTENCE", TextField.INITIAL_CAPS_SENTENCE);
+            else if (element.equals(listElements[12]))
+                addTextField("INITIAL_CAPS_WORD", TextField.INITIAL_CAPS_WORD);
+            else if (element.equals(listElements[13]))
+                addUneditableTextField("UNEDITABLE", TextField.UNEDITABLE);
+            else if (element.equals(listElements[14]))
+                addTextField("NON_PREDICTIVE", TextField.NON_PREDICTIVE);
+            else if (element.equals(listElements[15]))
+                addTextField("SENSITIVE", TextField.SENSITIVE);
+            else if (element.equals(listElements[16]))
+                addNumericTextField("DECIMAL|PWD", TextField.DECIMAL|TextField.PASSWORD);
+            else if (element.equals(listElements[17]))
+                addNumericUneditableTextField("NUMERIC|UNEDITABLE", TextField.NUMERIC|TextField.UNEDITABLE);
+            else if (element.equals(listElements[18]))
+                addNumericUneditableTextField("DECIMAL|UNEDITABLE", TextField.DECIMAL|TextField.UNEDITABLE);
+            else if (element.equals(listElements[19]))
+                addUneditableTextField("URL|UNEDITABLE", TextField.URL|TextField.UNEDITABLE);
+            else if (element.equals(listElements[20]))
+                addUneditableTextField("EMAILADDR|UNEDITABLE", TextField.EMAILADDR|TextField.UNEDITABLE);
+            else if (element.equals(listElements[21]))
+                addNumericUneditableTextField("PHONENUMBER|UNEDITABLE", TextField.PHONENUMBER|TextField.UNEDITABLE);
+            else if (element.equals(listElements[22]))
+                addUneditableTextField("ANY|PWD|UNEDITABLE", TextField.ANY|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[23]))
+                addNumericUneditableTextField("NUMERIC|PWD|UNEDITABLE", TextField.NUMERIC|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[24]))
+                addNumericUneditableTextField("DECIMAL|PWD|UNEDITABLE", TextField.DECIMAL|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[25]))
+                addUneditableTextField("URL|PWD|UNEDITABLE", TextField.URL|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[26]))
+                addUneditableTextField("EMAILADDR|PWD|UNDEDITABLE", TextField.EMAILADDR|TextField.PASSWORD|TextField.UNEDITABLE);
+            else if (element.equals(listElements[27]))
+                addNumericUneditableTextField("PNO|PWD|UNDEDITABLE", TextField.PHONENUMBER|TextField.PASSWORD|TextField.UNEDITABLE);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_02/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextField_02" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextField_02"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextField_02"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_TextField_02"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_02/src/Midp_TextField_02.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_TextField_02 tests.
+ */
+
+public class Midp_TextField_02 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new TextFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_02/src/TextFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the TextFields editing space indicators.
+ */
+
+public class TextFieldTests extends Form implements CommandListener
+{
+
+    //reference to the parent MIDlet
+    private Midp_TextField_02 parent = null;
+
+    //Command to get the size of the TextField
+    private Command cmdSize = new Command("Size", Command.SCREEN, 1);
+
+    //Command to get the maxSize of the TextField
+    private Command cmdMaxSize = new Command("MaxSize", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //The maximum size of the TextField
+    private final int MAX_SIZE = 50;
+    private TextField tf = null;
+
+    /**
+     *
+     * @param m The parent MIDlet of this class
+     */
+    public TextFieldTests(Midp_TextField_02 m)
+    {
+
+        super(m.getClass().getName());
+        this.parent =m;
+        tf = new TextField("ANY", "Editing space indicators are presented.",
+                           MAX_SIZE, TextField.ANY);
+        append(tf);
+        addCommand(cmdSize);
+        addCommand(cmdMaxSize);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  d  Should be equal to this.
+     */
+
+    public void commandAction(Command c, Displayable d)
+    {
+        if (c == cmdSize)
+        {
+            Alert a = new Alert(null, "TextField size: " + tf.size(), null, null);
+            Display.getDisplay(parent).setCurrent(a);
+        }
+        else if (c == cmdMaxSize)
+        {
+            Alert a = new Alert(null, "TextField maximum size: " + tf.getMaxSize(),
+                                null, null);
+            Display.getDisplay(parent).setCurrent(a);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_03/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextField_03" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextField_03"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextField_03"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_TextField_03"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_03/src/Midp_TextField_03.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_TextField_03 tests.
+ */
+
+public class Midp_TextField_03 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new TextFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_03/src/TextFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the TextField test case:
+ * -TextField remembers the cursor position when the control loses focus and
+ * regains later
+ *
+ */
+
+public class TextFieldTests extends Form implements CommandListener
+{
+
+    //reference to the parent MIDlet
+    private Midp_TextField_03 parent = null;
+
+    private final int MAX_SIZE = 50;
+
+    private TextField testTextField = null;
+
+    private Gauge dummyGauge = null;
+
+    private ChoiceGroup cg = null;
+
+    private TextField dummyTextField = null;
+
+    private ChoiceGroup dummyChoiceGroup = null;
+
+    private String[] cgStrs = {"1st element", "2nd element", "3rd element", "4th element"};
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     *
+     * @param m The parent MIDlet of this class
+     */
+    public TextFieldTests(Midp_TextField_03 m)
+    {
+        super(m.getClass().getName());
+        this.parent =m;
+        testTextField = new TextField("Test TextField", null, MAX_SIZE, TextField.ANY);
+        dummyGauge = new Gauge("Interactive Gauge", true, 20, 5);
+        dummyTextField = new TextField("Dummy TextField", null, MAX_SIZE, TextField.ANY);
+        dummyChoiceGroup = new ChoiceGroup("Dummy ChoiceGroup", ChoiceGroup.EXCLUSIVE, cgStrs, null);
+        append(testTextField);
+        append(dummyGauge);
+        append(dummyTextField);
+        append(dummyChoiceGroup);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        Display.getDisplay(parent).setCurrent(this);
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_05/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_TextField_05" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_TextField_05"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_TextField_05"/>
+    <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.description" value="This is a test MIDlet to test TextField initial input modes."/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_05/src/Midp_TextField_05.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_TextField_05 tests.
+ */
+
+public class Midp_TextField_05 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new TextFieldTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_05/src/TextFieldTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,231 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the below TextField test case:
+ * -setInitialInputMode(String characterSubset): Initial mode set to
+ *
+ */
+
+public class TextFieldTests extends Form implements CommandListener
+{
+
+    //parent MIDlet
+    private static Midp_TextField_05 parent = null;
+
+    //TextFields to test
+    private TextField tf1 = null;
+
+    private TextField tf2 = null;
+
+    private TextField tf3 = null;
+
+    private TextField tf4 = null;
+
+    private TextField tf5 = null;
+
+    private TextField tf6 = null;
+
+    Command cmdNonLatin = new Command("Non-Latin", Command.SCREEN, 1);
+    Command cmdIndian = new Command("Indian", Command.SCREEN, 1);
+    Command cmdJapanese = new Command("Japanese", Command.SCREEN, 1);
+    Command cmdKorean = new Command("Korean", Command.SCREEN, 1);
+    Command cmdChinese = new Command("Chinese", Command.SCREEN, 1);
+    Command cmdLatin = new Command("Latin", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    //maximum size which is specified while creating TextField
+    private final int MAX_SIZE = 100;
+
+    /**
+     *
+     * @param parent The parent MIDlet of this class
+     */
+    public TextFieldTests(Midp_TextField_05 parent)
+    {
+        //set the title of the form as the name of the MIDlet
+        super(parent.getClass().getName());
+        addCommand(cmdNonLatin);
+        addCommand(cmdIndian);
+        addCommand(cmdJapanese);
+        addCommand(cmdKorean);
+        addCommand(cmdChinese);
+        addCommand(cmdLatin);
+        addCommand(cmdExit);
+
+        setCommandListener(this);
+        this.parent = parent;
+        tf1 = new TextField("MIDP_UPPERCASE_LATIN", null, MAX_SIZE, TextField.ANY);
+        tf1.setInitialInputMode("MIDP_UPPERCASE_LATIN");
+
+        tf2 = new TextField("MIDP_LOWERCASE_LATIN", null, MAX_SIZE, TextField.ANY);
+        tf2.setInitialInputMode("MIDP_LOWERCASE_LATIN");
+
+        tf3 = new TextField("IS_LATIN", null, MAX_SIZE, TextField.ANY);
+        tf3.setInitialInputMode("IS_LATIN");
+
+        tf4 = new TextField("UCB_BASIC_LATIN", null, MAX_SIZE, TextField.ANY);
+        tf4.setInitialInputMode("UCB_BASIC_LATIN");
+
+        tf5 = new TextField(null, null, MAX_SIZE, TextField.ANY);
+
+        tf6 = new TextField(null, null, MAX_SIZE, TextField.ANY);
+
+        append(tf1);
+        append(tf2);
+        append(tf3);
+        append(tf4);
+
+        Display.getDisplay(parent).setCurrent(this);
+    }
+    public void clearFields()
+    {
+        deleteAll();
+        tf1.setInitialInputMode(null);
+        tf2.setInitialInputMode(null);
+        tf1.setString(null);
+        tf2.setString(null);
+        tf3.setString(null);
+        tf4.setString(null);
+        tf5.setString(null);
+        tf6.setString(null);
+    }
+
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdLatin)
+        {
+            clearFields();
+
+            tf1.setLabel("MIDP_UPPERCASE_LATIN");
+            tf1.setInitialInputMode("MIDP_UPPERCASE_LATIN");
+
+            tf2.setLabel("MIDP_LOWERCASE_LATIN");
+            tf2.setInitialInputMode("MIDP_LOWERCASE_LATIN");
+
+            tf3.setLabel("IS_LATIN");
+            tf3.setInitialInputMode("IS_LATIN");
+
+            tf4.setLabel("UCB_BASIC_LATIN");
+            tf4.setInitialInputMode("UCB_BASIC_LATIN");
+
+            append(tf1);
+            append(tf2);
+            append(tf3);
+            append(tf4);
+        }
+        else if (c == cmdNonLatin)
+        {
+            clearFields();
+            tf1.setLabel("UCB_GREEK");
+            tf1.setInitialInputMode("UCB_GREEK");
+
+            tf2.setLabel("UCB_CYRILLIC");
+            tf2.setInitialInputMode("UCB_CYRILLIC");
+
+            tf3.setLabel("UCB_ARMENIAN");
+            tf3.setInitialInputMode("UCB_ARMENIAN");
+
+            tf4.setLabel("UCB_HEBREW");
+            tf4.setInitialInputMode("UCB_HEBREW");
+
+            tf5.setLabel("UCB_ARABIC");
+            tf4.setInitialInputMode("UCB_ARABIC");
+
+            tf6.setLabel("UCB_THAI");
+            tf4.setInitialInputMode("UCB_THAI");
+            append(tf1);
+            append(tf2);
+            append(tf3);
+            append(tf4);
+            append(tf5);
+            append(tf6);
+        }
+        else if (c == cmdIndian)
+        {
+            clearFields();
+            tf1.setLabel("UCB_DEVANAGARI");
+            tf1.setInitialInputMode("UCB_DEVANAGARI");
+
+            tf2.setLabel("UCB_BENGALI");
+            tf2.setInitialInputMode("UCB_BENGALI");
+            append(tf1);
+            append(tf2);
+        }
+        else if (c == cmdJapanese)
+        {
+            clearFields();
+            tf1.setLabel("UCB_HIRAGANA");
+            tf1.setInitialInputMode("UCB_HIRAGANA");
+
+            tf2.setLabel("UCB_KATAKANA");
+            tf2.setInitialInputMode("UCB_KATAKANA");
+
+            tf3.setLabel("IS_FULLWIDTH_DIGITS");
+            tf3.setInitialInputMode("IS_FULLWIDTH_DIGITS");
+
+            tf4.setLabel("IS_FULLWIDTH_LATIN");
+            tf4.setInitialInputMode("IS_FULLWIDTH_LATIN");
+
+            tf5.setLabel("IS_HALFWIDTH_KATAKANA");
+            tf4.setInitialInputMode("IS_HALFWIDTH_KATAKANA");
+
+            tf6.setLabel("IS_KANJI");
+            tf4.setInitialInputMode("IS_KANJI");
+
+            append(tf1);
+            append(tf2);
+            append(tf3);
+            append(tf4);
+            append(tf5);
+            append(tf6);
+        }
+        else if (c == cmdKorean)
+        {
+            clearFields();
+            tf1.setLabel("IS_HANJA");
+            tf1.setInitialInputMode("IS_HANJA");
+
+            tf2.setLabel("UCB_HANGUL_SYLLABLES");
+            tf2.setInitialInputMode("UCB_HANGUL_SYLLABLES");
+            append(tf1);
+            append(tf2);
+        }
+        else if (c == cmdChinese)
+        {
+            clearFields();
+            tf1.setLabel("IS_SIMPLIFIED_HANZI");
+            tf1.setInitialInputMode("IS_SIMPLIFIED_HANZI");
+
+            tf2.setLabel("IS_TRADITIONAL_HANZI");
+            tf2.setInitialInputMode("IS_TRADITIONAL_HANZI");
+            append(tf1);
+            append(tf2);
+        }
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="Midp_Ticker_01" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="Midp_Ticker_01"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="Midp_Ticker_01"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="Midp_Ticker_01"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
Binary file javauis/tsrc/fute/lcdui/Midp_Ticker_01/res/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Midp_Ticker_01.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for the Midp_Ticker_01 tests.
+ */
+
+public class Midp_Ticker_01 extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new ScreenTickerTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/ScreenTickerTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class will call the series of tests to test Ticker
+ *
+ */
+
+public class ScreenTickerTests extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet to go to the different screens
+    private static Midp_Ticker_01 parent = null;
+
+    //the this instance
+    private static ScreenTickerTests instance = null;
+
+    //the command to invoke Test1
+    private Command cmdTest1 = new Command("Test1", Command.SCREEN, 1);
+
+    //the command to invoke Test2
+    private Command cmdTest2 = new Command("Test2", Command.SCREEN, 1);
+
+    //the command to invoke Test3
+    private Command cmdTest3 = new Command("Test3", Command.SCREEN, 1);
+
+    //the command to invoke Test3
+    private Command cmdTest4 = new Command("Test4", Command.SCREEN, 1);
+
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    /**
+     * This constructor will display a Form with MIDlet name as it's title.
+     * And adds the Test Commands to this Form.
+     *
+     * @param parent parent The parent MIDlet of this class
+     */
+    public ScreenTickerTests(Midp_Ticker_01 parent)
+    {
+
+        //set the title of this form to be the name of the MIDlet
+        super(parent.getClass().getName());
+        this.parent = parent;
+
+        //add test commands
+        addCommand(cmdTest1);
+        addCommand(cmdTest2);
+        addCommand(cmdTest3);
+        addCommand(cmdTest4);
+        addCommand(cmdExit);
+        setCommandListener(this);
+        if (instance == null)
+        {
+            instance = this;
+        }
+        show();
+    }
+
+    /**
+     *  Sets this to be the current screen
+     *
+     *@return    The Parent value
+     */
+    public static MIDlet getParent()
+    {
+        return parent;
+    }
+
+    /**
+     *  Show this screen
+     */
+    public static void show()
+    {
+        Display.getDisplay(parent).setCurrent(instance);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdTest1)
+            Display.getDisplay(parent).setCurrent(new Test1(this));
+        else if (c== cmdTest2)
+            Display.getDisplay(parent).setCurrent(new Test2(this));
+        else if (c == cmdTest3)
+            Display.getDisplay(parent).setCurrent(new Test3(this));
+        else if (c == cmdTest4)
+            Display.getDisplay(parent).setCurrent(new Test4(this));
+        else if (c == cmdExit)
+        {
+            parent.destroyApp(false);
+            parent.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test1.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This test class will test Ticker text:
+ * 1.contains whitespaces
+ * 2.one character
+ * 3.longer than the line
+ */
+
+public class Test1 extends List implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet parent = null;
+
+    // The ticker which is added to the Form screen
+    private ScreenTickerTests st = null;
+
+    // Ticker to test
+    private Ticker testTicker = null;
+
+    //String to test white spaces
+    private final String whiteSpaces = "Ticker with whitespaces";
+
+    //String to test one character
+    private final String oneChar = "Ticker with one char";
+
+    //String to test the ticker text which is longer than line
+    private final String longerThanLine = "Ticker longer than a line";
+
+    //String to test newline character
+    private final String newlineChar = "Ticker with newline char";
+
+    private final String hebrew = "Ticker with hebrew";
+    private char heb_data[] = {0x05D0, 0x05D1, 0x05D2, 0x05E0};
+    private String hebrewChars = new String(heb_data);
+    private final String arabic = "Ticker with arabic";
+    private char arab_data[] = {0x0660, 0x0661, 0x0662, 0x0641};
+    private String arabicChars = new String(arab_data);
+
+    private Command cmdOk = new Command("OK", Command.OK, 1);
+
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    /**
+     *
+     * @param st
+     */
+    public Test1(ScreenTickerTests st)
+    {
+        //title of the List and the List type
+        super("Test1", List.IMPLICIT);
+        this.st = st;
+
+        //get the parent MIDlet
+        this.parent = ScreenTickerTests.getParent();
+        testTicker = new Ticker("Hello MIDP");
+
+        append(whiteSpaces, null);
+        append(oneChar, null);
+        append(longerThanLine, null);
+        append(newlineChar, null);
+        append(hebrew, null);
+        append(arabic, null);
+        addCommand(cmdOk);
+        addCommand(cmdBack);
+        setCommandListener(this);
+    }
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = getSelectedIndex();
+        String element = getString(index);
+        if (c == SELECT_COMMAND || c == cmdOk)
+        {
+            st.setTicker(testTicker);
+            if (element.equals(whiteSpaces))
+                testTicker.setString("  ");
+            else if (element.equals(oneChar))
+                testTicker.setString("N");
+            else if (element.equals(longerThanLine))
+                testTicker.setString("The length of the text is longer than one" +
+                                     " line and should take at least two lines.");
+            else if (element.equals(newlineChar))
+                testTicker.setString("Newline char \n");
+            else if (element.equals(hebrew))
+                testTicker.setString(hebrewChars);
+            else if (element.equals(arabic))
+                testTicker.setString(arabicChars);
+
+            ScreenTickerTests.show();
+        }
+        else if (c == cmdBack)
+            Display.getDisplay(parent).setCurrent(st);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test2.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,332 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+
+/**
+ * This class is to test the ticker
+ * which is added and removed from different Screen objects
+ *
+ */
+
+public class Test2 extends List implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet parent = null;
+
+    //ScreenFormTests reference
+    private ScreenTickerTests st = null;
+
+    //the testTicker to test on different screens
+    private Ticker testTicker = null;
+
+    // The TextBox to which Ticker is added and removed
+    private TextBox tb = null;
+
+    //The List to which Ticker is added and removed
+    private List list = null;
+
+    //The Alert to which the Ticker is added and removed
+    private Alert alert = null;
+
+    //the form to which the Ticker is added and removed
+    private Form form = null;
+
+    //The TextField which is added to Form to test Form check
+    private TextField tf = null;
+
+    //The ImageItem which is added to Form to test Form check
+    private ImageItem imgItem = null;
+
+    //The DateField which is added to Form to test Form check
+    private DateField df = null;
+
+    //The Gauge which is added to Form to test Form check
+    private Gauge g = null;
+
+    //The ChoiceGroup which is added to Form to test Form check
+    private ChoiceGroup cg = null;
+
+    //list elements
+    private String elements[] = {"element 1", "element 2", "element 3", "element 4", "element 5",
+                                 "element 6", "element 7", "element 8"
+                                };
+    // this instance
+    private Test2 instance = null;
+
+    //List which contains ticker tests as elements
+    private List Test2List = null;
+
+    //String which is added to Test2List
+    private final String addedToAlert = "Added to Alert";
+
+    //String which is added to Test2List
+    private final String addedToList = "Added to List";
+
+    //String which is added to Test2List
+    private final String addedToForm = "Added to Form";
+
+    //String which is added to Test2List
+    private final String addedToTextBox = "Added to TextBox";
+
+    //String which is added to Test2List
+    private final String removedFromAlert = "Removed from Alert";
+
+    //String which is added to Test2List
+    private final String removedFromList = "Removed from List";
+
+    //String which is added to Test2List
+    private final String removedFromForm = "Removed form Form";
+
+    //String which is added to TextBox
+    private final String removedFromTextBox = "Removed from TextBox";
+
+    /*
+     *  To indicate whether a Ticker is associated with the Alert. false
+     *  indicates no Ticker is associated.
+     */
+    private static boolean alertFlag = false;
+
+    /**
+     *  To indicate whether a Ticker is associated with the Alert. false
+     *  indicates no Ticker is associated.
+     */
+    private static boolean formFlag = false;
+
+    /**
+     *  To indicate whether a Ticker is associated with the List. false
+     *  indicates no Ticker is associated.
+     */
+    private static boolean listFlag = false;
+
+    /**
+     *  To indicate whether a Ticker is associated with the TextBox. false
+     *  indicates no Ticker is associated.
+     */
+    private static boolean textBoxFlag = false;
+
+    //the smallImage
+    private Image smallImage = null;
+
+    //The set of images passed to the List constructor
+    private Image[] imageElements = null;
+
+    private Command cmdOk = new Command("OK", Command.OK, 1);
+
+    //the command to go back to ScreenTickerTests screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    /**
+     *
+     * @param st
+     */
+    public Test2(ScreenTickerTests st)
+    {
+        //title of the List and the List type
+        super("Test2", List.IMPLICIT);
+        this.st = st;
+        testTicker = new Ticker(" ");
+
+        //get the parent MIDlet
+        this.parent = ScreenTickerTests.getParent();
+
+        if (instance == null)
+        {
+            instance = this;
+        }
+
+        append(addedToAlert, null);
+        append(removedFromAlert, null);
+
+        append(addedToList, null);
+        append(removedFromList, null);
+
+        append(addedToForm, null);
+        append(removedFromForm, null);
+
+        append(addedToTextBox, null);
+        append(removedFromTextBox, null);
+
+        //add command Ok to this list
+        addCommand(cmdOk);
+
+        //add command Back to this list
+        addCommand(cmdBack);
+
+        //set the listener
+        setCommandListener(this);
+
+        alert = new Alert("Ticker to Alert", null, null, AlertType.INFO);
+        list = new List("Ticker to List", List.EXCLUSIVE, elements, createImage());
+        list.addCommand(cmdBack);
+        list.setCommandListener(this);
+
+        tb = new TextBox("Ticke to TextBox", null, 100, TextField.ANY);
+        tb.addCommand(cmdBack);
+        tb.setCommandListener(this);
+
+        form = new Form("Ticker to Form");
+        tf = new TextField("TextField", null, 30, TextField.ANY);
+        imgItem = new ImageItem("ImageItem", createImageItem(), ImageItem.LAYOUT_DEFAULT,
+                                "error loading image");
+        df = new DateField("DateField", DateField.DATE_TIME);
+        g = new Gauge("Gauge", true, 10, 5);
+        cg = new ChoiceGroup("ChoiceGroup", ChoiceGroup.MULTIPLE);
+        cg.append("element 1", createImageItem());
+        cg.append("element 2", null);
+        cg.append("element 3", createImageItem());
+
+        form.append(tf);
+        form.append(imgItem);
+        form.append(df);
+        form.append(g);
+        form.append(cg);
+        form.addCommand(cmdBack);
+        form.setCommandListener(this);
+    }
+
+    //this method creates image elements which is used by the list elements
+    private Image[] createImage()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+            imageElements = new Image[]
+            {smallImage, null, smallImage, null, null, smallImage,
+             smallImage, null
+            };
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return imageElements;
+    }
+
+    //this method creates a image which is used by the imageitem to test Form check
+    private Image createImageItem()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return smallImage;
+    }
+
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        int index = instance.getSelectedIndex();
+        String element = instance.getString(index);
+        if (c == List.SELECT_COMMAND || c == cmdOk)
+        {
+            if (element.equals(addedToAlert))
+            {
+                if (alertFlag == false)
+                    alertFlag = true;
+                testTicker.setString("Ticker to Alert");
+                alert.setTicker(testTicker);
+                Display.getDisplay(parent).setCurrent(alert);
+            }
+            else if (element.equals(removedFromAlert))
+            {
+                if (alertFlag == true)
+                {
+                    alertFlag = false;
+                    alert.setTicker(null);
+                }
+                Display.getDisplay(parent).setCurrent(alert);
+            }
+            else if (element.equals(addedToList))
+            {
+                if (listFlag == false)
+                    listFlag = true;
+                testTicker.setString("Ticker to List");
+                list.setTicker(testTicker);
+                Display.getDisplay(parent).setCurrent(list);
+            }
+            else if (element.equals(removedFromList))
+            {
+                if (listFlag == true)
+                {
+                    listFlag = false;
+                    list.setTicker(null);
+                }
+                Display.getDisplay(parent).setCurrent(list);
+            }
+            else if (element.equals(addedToTextBox))
+            {
+                if (textBoxFlag == false)
+                    textBoxFlag = true;
+                testTicker.setString("Ticker to TextBox");
+                tb.setTicker(testTicker);
+                Display.getDisplay(parent).setCurrent(tb);
+            }
+            else if (element.equals(removedFromTextBox))
+            {
+                if (textBoxFlag == true)
+                {
+                    textBoxFlag = false;
+                    tb.setTicker(null);
+                }
+                Display.getDisplay(parent).setCurrent(tb);
+            }
+            else if (element.equals(addedToForm))
+            {
+                if (formFlag == false)
+                {
+                    formFlag = true;
+                }
+                testTicker.setString("Ticker to Form");
+                form.setTicker(testTicker);
+                Display.getDisplay(parent).setCurrent(form);
+            }
+            else if (element.equals(removedFromForm))
+            {
+                if (formFlag == true)
+                {
+                    formFlag = false;
+                    form.setTicker(null);
+                }
+                Display.getDisplay(parent).setCurrent(form);
+            }
+        }
+        if (c == cmdBack)
+        {
+            if (s == list || s == tb || s == form)
+                Display.getDisplay(parent).setCurrent(this);
+            else if (s == instance)
+                Display.getDisplay(parent).setCurrent(st);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test3.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,299 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+import javax.microedition.lcdui.List;
+
+/**
+ * This class is to test the Ticker test cases:
+ * 1.Ticker must not be interrupted when it changes from one Screen
+ * object to another Screen object
+ * 2.Old Ticker is hidden and stopped when added to different Screen objects.
+ *
+ */
+
+public class Test3 extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet parent = null;
+
+    //ScreenFormTests reference
+    private ScreenTickerTests st = null;
+
+    //the testTicker1 to test on different screens
+    private Ticker testTicker1 = null;
+
+    //the testTicker2 to test on different screens
+    private Ticker testTicker2 = null;
+
+    // The TextBox to which Ticker is added
+    private TextBox tb = null;
+
+    //The List to which Ticker is added
+    private List list = null;
+
+    //The Alert to which the Ticker is added
+    private Alert alert = null;
+
+    //The TextField which is added to Form
+    private TextField tf = null;
+
+    //The ImageItem which is added to Form
+    private ImageItem imgItem = null;
+
+    //The DateField which is added to Form
+    private DateField df = null;
+
+    //The Gauge which is added to Form
+    private Gauge g = null;
+
+    //The ChoiceGroup which is added to Form
+    private ChoiceGroup cg = null;
+
+    //list elements
+    private String elements[] = {"element 1", "element 2", "element 3", "element 4", "element 5",
+                                 "element 6", "element 7", "element 8"
+                                };
+
+    // this instance
+    private Test3 instance = null;
+
+    private Image smallImage = null;
+
+    //The set of images passed to the List constructor
+    private Image[] imageElements = null;
+
+
+    private Command cmdShowS = new Command("ShowScreens", Command.SCREEN, 1);
+
+    private Command cmdReplaceT = new Command("Replace Ticker", Command.SCREEN, 1);
+
+    //a timer which schedules all the tasks in this MIDlet
+    private Timer timer = null;
+
+    private ShowAlertTT showAlertTT = null;
+
+    private static boolean replaceTicker = false;
+
+    /**
+     *
+     * @param st
+     */
+    public Test3(ScreenTickerTests st)
+    {
+        //title of the Form
+        super("Test Form");
+        this.st = st;
+
+        timer = new Timer();
+
+        testTicker1 = new Ticker("1st Ticker");
+
+        //Ticker2 will be shown when cmdReplaceT is pressed
+        testTicker2 = new Ticker("2nd Ticker");
+
+        //get the parent MIDlet
+        this.parent = ScreenTickerTests.getParent();
+
+        if (instance == null)
+        {
+            instance = this;
+        }
+        alert = new Alert("Ticker to Alert", null, null, AlertType.ALARM);
+        alert.setTicker(testTicker1);
+
+        list = new List("Ticker to List", List.EXCLUSIVE, elements, createImage());
+        list.setTicker(testTicker1);
+
+        tb = new TextBox("Ticker to TextBox", null, 100, TextField.ANY);
+        tb.setTicker(testTicker1);
+
+        tf = new TextField("TextField", null, 30, TextField.ANY);
+        imgItem = new ImageItem("ImageItem", createImageItem(), ImageItem.LAYOUT_DEFAULT,
+                                "error loading image");
+        df = new DateField("DateField", DateField.DATE_TIME);
+        g = new Gauge("Gauge", true, 10, 5);
+        cg = new ChoiceGroup("ChoiceGroup", ChoiceGroup.MULTIPLE);
+        cg.append("element 1", createImageItem());
+        cg.append("element 2", null);
+        cg.append("element 3", createImageItem());
+
+        instance.append(tf);
+        instance.append(imgItem);
+        instance.append(df);
+        instance.append(g);
+        instance.append(cg);
+
+        instance.setTicker(testTicker1);
+
+        //add Commands
+        addCommand(cmdReplaceT);
+        addCommand(cmdShowS);
+
+        //set the listener
+        setCommandListener(this);
+    }
+
+    /**
+     * This method creates image elements which is used by the list elements
+     */
+
+    private Image[] createImage()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+            imageElements = new Image[]
+            {smallImage, null, smallImage, null, null, smallImage,
+             smallImage, null
+            };
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return imageElements;
+    }
+
+    /**
+     * This method creates a image which is used by the imageitem to test Form check
+     */
+    private Image createImageItem()
+    {
+        try
+        {
+            smallImage = Image.createImage("/Icon.png");
+        }
+        catch (java.io.IOException e)
+        {
+            System.out.println("Error loading image\n" + e);
+        }
+        return smallImage;
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+
+        if (c == cmdShowS)
+        {
+            showAlertTT = new ShowAlertTT();
+            timer.schedule(showAlertTT, 100);
+        }
+        else if (c == cmdReplaceT)
+        {
+            replaceTicker = true;
+            instance.setTicker(testTicker2);
+
+        }
+    }
+
+    /**
+     *
+     */
+    private class ShowAlertTT extends TimerTask
+    {
+        /**
+         *  The action to be performed by this timer task.
+         */
+        public void run()
+        {
+            Display.getDisplay(parent).setCurrent(alert);
+            if (replaceTicker == true)
+                alert.setTicker(testTicker2);
+            ShowFormTT showFormTT = new ShowFormTT();
+            timer.schedule(showFormTT, 4000);
+            cancel();
+        }
+    }
+
+    private class ShowFormTT extends TimerTask
+    {
+
+        /**
+         *  The action to be performed by this timer task.
+         */
+        public void run()
+        {
+            Display.getDisplay(parent).setCurrent(instance);
+            if (replaceTicker == true)
+                instance.setTicker(testTicker2);
+            ShowListTT showListTT = new ShowListTT();
+            timer.schedule(showListTT, 4000);
+            cancel();
+        }
+    }
+
+    private class ShowListTT extends TimerTask
+    {
+
+        /**
+         *  The action to be performed by this timer task.
+         */
+        public void run()
+        {
+            Display.getDisplay(parent).setCurrent(list);
+            if (replaceTicker == true)
+                list.setTicker(testTicker2);
+            ShowTextBoxTT showTextBoxTT = new ShowTextBoxTT();
+            timer.schedule(showTextBoxTT, 4000);
+            cancel();
+        }
+    }
+
+    private class ShowTextBoxTT extends TimerTask
+    {
+
+        /**
+         *  The action to be performed by this timer task.
+         */
+        public void run()
+        {
+            Display.getDisplay(parent).setCurrent(tb);
+            if (replaceTicker == true)
+                tb.setTicker(testTicker2);
+            ShowInitFormTT showInitFormTT = new ShowInitFormTT();
+            timer.schedule(showInitFormTT, 7000);
+            cancel();
+        }
+    }
+
+    private class ShowInitFormTT extends TimerTask
+    {
+
+        /**
+         *  The action to be performed by this timer task.
+         */
+        public void run()
+        {
+            Display.getDisplay(parent).setCurrent(st);
+            cancel();
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/Midp_Ticker_01/src/Test4.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test the Ticker behaviour:
+ * 1.When TextField is focussed
+ * 2.On TextField when editing indicators are changed
+ * 3.On TextBox when editing indicators are changed
+ *
+ */
+
+public class Test4 extends Form implements CommandListener
+{
+
+    //the reference to the MIDlet
+    private MIDlet parent = null;
+
+    //ScreenFormTests reference
+    private ScreenTickerTests st = null;
+
+    //the testTicker1 to test on different screens
+    private Ticker testTicker = null;
+
+    // The TextBox to which Ticker is added
+    private TextBox tb = null;
+
+    //The TextField which is added to Form
+    private TextField tf = null;
+
+    //The Guage whic is added to Form
+    private Gauge g = null;
+
+    //command to show TextBox
+    private Command cmdShowTextBox = new Command("Show TextBox", Command.SCREEN, 1);
+
+    //command to go back to this Screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //command to go back to ScreenTickerTests Screen
+    private Command cmdReturn = new Command("Return", Command.SCREEN, 1);
+
+    /**
+    *
+    * @param st
+    */
+    public Test4(ScreenTickerTests st)
+    {
+
+        //title of the Form
+        super("Test Form");
+        this.st = st;
+        testTicker = new Ticker("Test Ticker");
+
+        //get the parent MIDlet
+        this.parent = ScreenTickerTests.getParent();
+        tb = new TextBox("Ticker to TextBox", null, 100, TextField.ANY);
+        tb.setTicker(testTicker);
+        tb.addCommand(cmdBack);
+        tb.setCommandListener(this);
+        tf = new TextField("TextField", null, 30, TextField.ANY);
+        g = new Gauge("Interactive Gauge:", true, 20, 10);
+        append(g);
+        append(tf);
+        setTicker(testTicker);
+
+        //add Commands
+        addCommand(cmdShowTextBox);
+        addCommand(cmdReturn);
+
+        //set the listener
+        setCommandListener(this);
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdShowTextBox)
+            Display.getDisplay(parent).setCurrent(tb);
+        else if (c == cmdReturn)
+            Display.getDisplay(parent).setCurrent(st);
+        else if (c == cmdBack)
+            Display.getDisplay(parent).setCurrent(this);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/StringOutOfBounds/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,37 @@
+<!--
+#
+# 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="StringOutOfBounds" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="StringOutOfBounds"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="StringOutOfBounds"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="StringOutOfBounds"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.1"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- Get settings for a basic MIDlet. -->
+    <import file="../../properties-basic-midlet.xml"/>
+
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/StringOutOfBounds/src/FormStringItemTests.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.util.*;
+
+/**
+ * This class is to test all the StringItem tests
+ *
+ */
+
+public class FormStringItemTests extends Form implements CommandListener
+{
+
+    //referemce to the parent MIDlet
+    private StringOutOfBounds m = null;
+
+    //the form to add the StringItems
+    private Form stringItemForm = null;
+
+    //the label to create the StringItem
+    private TextField label = null;
+
+    //the text to create the StringItem
+    private TextField text = null;
+
+    //the StringItem to test
+    private StringItem si = null;
+    private StringItem siOrig1 = new StringItem("Label_Original 1", "Text1");
+    private StringItem siOrig2 = new StringItem("Label_Original 2", "Text2");
+    //the command to go back to the main screen
+    private Command cmdBack = new Command("Back", Command.BACK, 1);
+
+    //the command to create the StringItem with the entered label and text
+    private Command cmdCreate = new Command("Create", Command.SCREEN, 1);
+    private Command cmdOtherForm = new Command("Other Form", Command.SCREEN, 1);
+    private Command cmdExit = new Command("Exit", Command.EXIT, 1);
+
+    public FormStringItemTests(StringOutOfBounds m)
+    {
+        //set the name of the form to be the name of MIDlet
+        super(m.getClass().getName());
+        this.m = m;
+
+        this.append(siOrig1);
+        this.append(siOrig2);
+
+        addCommand(cmdCreate);
+        addCommand(cmdOtherForm);
+        addCommand(cmdBack);
+        addCommand(cmdExit);
+        setCommandListener(this);
+
+        Display.getDisplay(m).setCurrent(this);
+
+        //create StringItemForm
+        stringItemForm = new Form("StringItem");
+    }
+
+    /**
+     *  This method handles command invocations.
+     *
+     *@param  c  This is the command responsible for the event.
+     *@param  s  Should be equal to this.
+     */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == cmdBack)
+        {
+            Display.getDisplay(m).setCurrent(this);
+        }
+        else if (c == cmdCreate)
+        {
+            try
+            {
+                si = new StringItem("New Label","New Text");
+                this.insert(this.size()+1,si);
+                Display.getDisplay(m).setCurrent(this);
+            }
+            catch (IndexOutOfBoundsException ie)
+            {
+                Alert ieAlert = new Alert("IndexOOB",ie.toString(),null, null);
+                Display.getDisplay(m).setCurrent(ieAlert);
+            }
+            catch (Exception e)
+            {
+                Alert eAlert = new Alert("Wrong Exception","Wrong Exception was thrown: "+e.toString(),null, null);
+                Display.getDisplay(m).setCurrent(eAlert);
+            }
+        }
+        else if (c == cmdOtherForm)
+        {
+            try
+            {
+                stringItemForm.append(siOrig1);
+                stringItemForm.append(siOrig2);
+                Display.getDisplay(m).setCurrent(stringItemForm);
+            }
+            catch (IllegalStateException ise)
+            {
+                Alert iseAlert = new Alert("Illegal State",ise.toString(),null, null);
+                Display.getDisplay(m).setCurrent(iseAlert);
+            }
+        }
+        else if (c == cmdExit)
+        {
+            m.destroyApp(false);
+            m.notifyDestroyed();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/StringOutOfBounds/src/StringOutOfBounds.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2003-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:
+*
+*/
+
+/**
+ * import midp classes.
+ */
+import javax.microedition.midlet.*;
+
+/**
+ * This is the main class for StringOutOfBounds tests.
+ *
+ */
+
+public class StringOutOfBounds extends MIDlet
+{
+
+    /**
+     * Signals the MIDlet to start and enter the Active state.
+     */
+    protected void startApp()
+    {
+        new FormStringItemTests(this);
+    }
+
+    /**
+     *  Signals the MIDlet to terminate and enter the Destroyed state.
+     *
+     */
+    protected void destroyApp(boolean unconditional)
+    {
+        System.out.println("destroyApp is called");
+    }
+
+    /**
+     *  Signals the MIDlet to stop and enter the Paused state.
+     */
+    protected void pauseApp()
+    {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/build.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,24 @@
+<!--
+#
+# 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="LcduiFunctionalTestMidlets" default="pack">
+
+    <!-- Get general settings for sub directory. -->
+    <import file="../properties-sub-directory.xml"/>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/deviceControl/build.xml	Tue May 25 12:34:19 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: 
+#
+-->
+
+<project name="deviceControl" default="pack">
+
+    <!-- Get general settings for MIDlet projects. -->
+    <import file="../../properties.xml"/>
+
+    <!-- Set properties for this project. -->
+    <property name="midlet1.name" value="DeviceVibra"/>
+    <property name="midlet1.icon.name" value=""/>
+    <property name="midlet1.package.name" value="DeviceVibra"/>
+    <property name="midlet2.name" value="FlashBackLight"/>
+    <property name="midlet2.icon.name" value=""/>
+    <property name="midlet2.package.name" value="FlashBackLight"/>
+    <property name="midlet3.name" value="FlashLight"/>
+    <property name="midlet3.icon.name" value=""/>
+    <property name="midlet3.package.name" value="FlashLight"/>
+    <property name="midlet.permissions" value=""/>
+    <property name="package.name" value="deviceControl"/>
+    <property name="company.name" value="Nokia"/>
+    <property name="midlet.version" value="1.0"/>
+    <property name="midlet.description" value=""/>
+
+    <!-- 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/deviceControl/src/DeviceVibra.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* 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:
+*
+*/
+
+/*****
+ *  Flash Light
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+public class DeviceVibra extends MIDlet  implements CommandListener, Runnable
+{
+
+    private  Display display = null;
+    private Thread thread = null;
+    private Canvas canvas = null;
+    private Command exitCommand = new Command("Exit", Command.EXIT, 1);
+    private Command startTest = new Command("Start Test", Command.SCREEN, 3);
+
+
+    public DeviceVibra()
+    {
+        canvas = new TestingCanvas();
+        display = Display.getDisplay(this);
+        canvas.addCommand(startTest);
+        canvas.addCommand(exitCommand);
+        canvas.setCommandListener(this);
+    }
+
+    /** * */
+    public void displayToForeGround()
+    {
+        display.setCurrent(canvas);
+    }
+
+    public void startApp()
+    {
+        displayToForeGround();
+    }
+    /** * Pause */
+    public void pauseApp() {}
+
+    /** * Destroy must cleanup everything. */
+    public void destroyApp(boolean unconditional) { }
+    /** *
+     *  From runnable
+     *  */
+    public void run()
+    {
+        try
+        {
+            System.out.println("Thread started ..... ");
+            display.vibrate(3000);
+
+            Thread.sleep(3000);
+
+            display.flashBacklight(3000);
+            display.vibrate(5000);
+
+            Thread.sleep(8000);
+
+        }
+        catch (Exception e)
+        {
+            System.out.println("E x c e p t t i o n in run" + e.toString());
+        }
+    }
+
+    /**** Handle the command */
+    public void commandAction(Command c, Displayable s)
+    {
+
+        if (c == exitCommand)
+        {
+            destroyApp(true);
+            notifyDestroyed();
+        }
+
+        if (c == startTest)
+        {
+            thread = new Thread(this);
+            thread.start();
+        }
+    }// end of commandAction
+
+    /**
+     *
+     */
+    class TestingCanvas extends Canvas
+    {
+        protected void paint(Graphics g)
+        {
+            g.drawString("Device control", 5, 5, Graphics.TOP|Graphics.LEFT);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/deviceControl/src/FlashBackLight.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,134 @@
+/*
+* 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:
+*
+*/
+
+/*****
+ *  Flash Back Light
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+public class FlashBackLight extends MIDlet  implements CommandListener, Runnable
+{
+
+    private  Display display = null;
+    private Thread thread = null;
+    private Canvas canvas = null;
+    private String deviceControlMessage = "Device Control";
+    private Command exitCommand = new Command("Exit", Command.EXIT, 1);
+    private Command backLightCommnad = new Command("Back Light", Command.SCREEN, 3);
+    private Command vibraCommnad = new Command("Start Vibra", Command.SCREEN, 3);
+    private Command vibraStopCommnad = new Command("Stop Vibra", Command.SCREEN, 3);
+    private Command currentCommand = null;
+
+    public FlashBackLight()
+    {
+        canvas = new TestingCanvas();
+        display = Display.getDisplay(this);
+        canvas.addCommand(backLightCommnad);
+        canvas.addCommand(vibraCommnad);
+        canvas.addCommand(vibraStopCommnad);
+        canvas.addCommand(exitCommand);
+        canvas.setCommandListener(this);
+    }
+
+    /** * */
+    public void displayToForeGround()
+    {
+        display.setCurrent(canvas);
+    }
+
+    public void startApp()
+    {
+        displayToForeGround();
+    }
+    /** * Pause */
+    public void pauseApp() {}
+
+    /** * Destroy must cleanup everything. */
+    public void destroyApp(boolean unconditional) { }
+    /** *
+     *  From runnable
+     *  */
+    public void run()
+    {
+        try
+        {
+            System.out.println("Thread started ..... ");
+            if (currentCommand == backLightCommnad)
+                display.flashBacklight(10000);
+            else if (currentCommand == vibraCommnad)
+                display.vibrate(10000);
+            else
+                display.flashBacklight(1000);
+            Thread.sleep(3000);
+        }
+        catch (Exception e)
+        {
+            System.out.println("E x c e p t t i o n in run" + e.toString());
+        }
+    }
+
+    /**** Handle the command */
+    public void commandAction(Command c, Displayable s)
+    {
+        if (c == exitCommand)
+        {
+            destroyApp(true);
+            notifyDestroyed();
+        }
+        if (c == vibraStopCommnad)
+        {
+            display.vibrate(0);
+        }
+
+        currentCommand = c;
+        thread = new Thread(this);
+        thread.start();
+    }// end of commandAction
+
+    /**
+     *
+     */
+    class TestingCanvas extends Canvas
+    {
+        protected void paint(Graphics g)
+        {
+            g.drawString("Device control", 5, 5, Graphics.TOP|Graphics.LEFT);
+        }
+        protected void keyPressed(int keyCode)
+        {
+            if (getGameAction(keyCode) == FIRE || keyCode == KEY_NUM1 || keyCode == KEY_NUM3)
+            {
+                display.flashBacklight(1000);
+            }
+            else if (getGameAction(keyCode) == GAME_A || getGameAction(keyCode) == GAME_B
+                     || getGameAction(keyCode) == GAME_C || getGameAction(keyCode) == GAME_D)
+            {
+                display.flashBacklight(2000);
+            }
+            else if (keyCode == KEY_NUM0)
+            {
+                display.flashBacklight(0);
+            }
+            else if (keyCode == KEY_NUM8)
+            {
+                display.vibrate(0);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/lcdui/deviceControl/src/FlashLight.java	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* 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:
+*
+*/
+
+/*****
+ *  Flash Light
+ */
+import javax.microedition.midlet.*;
+import javax.microedition.lcdui.*;
+import java.io.*;
+
+public class FlashLight extends MIDlet  implements CommandListener, Runnable
+{
+
+    private  Display display = null;
+    private Thread thread = null;
+    private Canvas canvas = null;
+    private Command exitCommand = new Command("Exit", Command.EXIT, 1);
+    private Command stopCommand = new Command("Stop Flashing", Command.SCREEN, 1);
+    private Command startTest10 = new Command("Start Test 10s", Command.SCREEN, 3);
+    private Command startTest60 = new Command("Start Test 60s", Command.SCREEN, 3);
+    private Command startTest120 = new Command("Start Test 120s", Command.SCREEN, 3);
+    private Command startTest240 = new Command("Start Test 240s", Command.SCREEN, 3);
+    private Command currentCommand = null;
+
+
+    public FlashLight()
+    {
+        canvas = new TestingCanvas();
+        display = Display.getDisplay(this);
+        canvas.addCommand(startTest10);
+        canvas.addCommand(startTest60);
+        canvas.addCommand(startTest120);
+        canvas.addCommand(startTest240);
+        canvas.addCommand(stopCommand);
+        canvas.addCommand(exitCommand);
+        canvas.setCommandListener(this);
+    }
+
+    /** * */
+    public void displayToForeGround()
+    {
+        display.setCurrent(canvas);
+    }
+
+    public void startApp()
+    {
+        displayToForeGround();
+    }
+    /** * Pause */
+    public void pauseApp() {}
+
+    /** * Destroy must cleanup everything. */
+    public void destroyApp(boolean unconditional) { }
+
+    /** *
+     *  From runnable
+     *  */
+    public void run()
+    {
+        try
+        {
+            System.out.println("Thread started ..... ");
+            if (currentCommand == startTest10)
+                display.flashBacklight(10000);
+            else if (currentCommand == startTest60)
+                display.flashBacklight(60000);
+            else if (currentCommand == startTest120)
+                display.flashBacklight(120000);
+            else if (currentCommand == startTest240)
+                display.flashBacklight(240000);
+
+            Thread.sleep(3000);
+
+        }
+        catch (Exception e)
+        {
+            System.out.println("E x c e p t t i o n in run" + e.toString());
+        }
+    }
+
+    /**** Handle the command */
+    public void commandAction(Command c, Displayable s)
+    {
+
+        if (c == exitCommand)
+        {
+            destroyApp(true);
+            notifyDestroyed();
+        }
+        if (c == stopCommand)
+        {
+            display.flashBacklight(0);
+        }
+        currentCommand = c;
+        thread = new Thread(this);
+        thread.start();
+
+    }// end of commandAction
+
+    /**
+     *
+     */
+    class TestingCanvas extends Canvas
+    {
+        protected void paint(Graphics g)
+        {
+
+            g.drawString("Device control", 5, 5, Graphics.TOP|Graphics.LEFT);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/properties-basic-midlet.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,50 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<project name="PropertiesBasicMidlet">
+
+    <!-- Package Preverified 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>
+
+        <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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/properties-sub-directory.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,34 @@
+<!--
+#
+# 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="PropertiesSubDirectory">
+
+    <!-- Call the build.xml files in the sub directories. -->
+    <target name="pack">
+      <subant target="pack">
+        <fileset dir="." includes="*/build.xml"/>
+      </subant>
+    </target>
+
+    <target name="clean">
+      <subant target="clean">
+        <fileset dir="." includes="*/build.xml"/>
+      </subant>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/properties.xml	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,99 @@
+<!--
+#
+# 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="Properties">
+
+    <property name="top" value="."/>
+    <property name="src" value="src"/>
+    <property name="res" value="res"/>
+    <property name="build" value="build"/>
+    <property name="bin" value="${build}/bin"/>
+    <property name="classes" value="${build}/classes"/>
+    <property name="prever" value="${build}/preverified"/>
+    <property name="lib" value="${top}/lib"/>
+    <property name="ext" value="${lib}/ext"/>
+
+    <property name="wtk.home" value="C:/WTK"/>
+    <property name="midp_home" value="${wtk.home}"/>
+    <property name="midp_lib" value="${midp_home}/lib/midpapi21.jar"/>
+    <property name="cldc_home" value="${wtk.home}"/>
+    <property name="cldc_lib" value="${cldc_home}/lib/cldcapi11.jar"/>
+    <property name="wtk.cldc.version" value="1.1"/>
+    <property name="wtk.midp.version" value="2.1"/>
+    <property name="java_public_api" value="${wtk.home}/lib/ext/java_public_api.jar"/>
+
+    <taskdef resource="antenna.properties" classpath="${wtk.home}/lib/ext/antenna-bin-1.0.2.jar"/>
+
+
+    <filelist
+        id="ext_lib"
+        dir="${ext}"
+        files=""/>
+
+    <path id="project.class.path">
+        <pathelement path="${cldc_lib}"/>
+        <pathelement path="${midp_lib}"/>
+        <pathelement path="${java_public_api}"/>
+        <filelist refid="ext_lib"/>
+    </path>	
+    <property name="cp.path" refid="project.class.path"/>
+    <!-- <echo message="project.class.path: '${cp.path}'."/> -->
+
+
+    <!-- Combine Tasks -->
+    <target name="all" depends="init,compile,preverify,pack"/>
+
+    <!-- Remove Build Directories -->
+    <target name="clean">
+        <delete dir="${build}"/>
+    </target>
+
+    <!-- Create Build Directories -->
+    <target name="init" depends="clean">
+        <!-- Create the build directory structure used by compile and dist -->
+        <mkdir dir="${build}"/>
+        <mkdir dir="${bin}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${prever}"/>
+        <mkdir dir="${res}"/>
+    </target>
+
+    <target name="compile" depends="init">
+        <mkdir dir="${classes}"/>
+        <javac
+            destdir="${classes}"
+            srcdir="${src}"
+            target="1.1"
+            source="1.3"
+            debug="true"
+            debuglevel="debug">
+            <classpath refid="project.class.path"/>
+        </javac>
+    </target>
+
+    <!-- Preverify classes -->
+    <target name="preverify" depends="compile">
+        <mkdir dir="${prever}"/>
+        <wtkpreverify
+            srcdir="${classes}"
+            destdir="${prever}">
+            <classpath refid="project.class.path"/>
+        </wtkpreverify>
+    </target>
+
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/tsrc/fute/readme.txt	Tue May 25 12:34:19 2010 +0300
@@ -0,0 +1,60 @@
+Instructions on how to build functional test MIDlets
+====================================================
+
+This file gives instructions on how to use the build.xml files for MIDlet suite 
+compilation and packing.
+
+
+Requirements
+------------
+
+* Get a local copy of the directory containing the UI FuTe MIDlets from the 
+version control system. Get the whole structure, because the xml files in the 
+root will be needed.
+
+* Apache Ant installed. It is used for compiling the MIDlet source files and 
+packing the classes and resources into MIDlet packages.
+
+* Environment variable JAVA_HOME value is set to the path where JDK is 
+installed.
+
+* Sun Java Wireless Toolkit for CLDC (WTK) installed to "C:\WTK". The location 
+is defined in the file "properties.xml":
+
+    o <property name="wtk.home" value="C:/WTK"/> 
+
+* Java public api classes jar file "java_public_api.jar" should be copied to WTK 
+lib directory, in sub directory "ext". The file can be found i.e. in the SDK 
+package. You can use also some other jar/zip package that contains the needed 
+classes, it is used only for compiling the MIDlets. The location of the file is 
+defined in the file "properties.xml":
+
+    o <property name="java_public_api" value="${wtk.home}/lib/ext/java_public_api.jar"/> 
+
+* Antenna library file should be copied to WTK lib directory, in sub directory 
+"ext". It can be found from the Internet: http://antenna.sourceforge.net/. The 
+location of the file is defined in the file "properties.xml":
+
+    o <taskdef resource="antenna.properties" classpath="${wtk.home}/lib/ext/antenna-bin-1.0.2.jar"/> 
+
+
+Building & packing MIDlets
+--------------------------
+
+Building the MIDlets can be done in the MIDlet project directory itself, or in 
+some of the parent directories. If it is done in the MIDlet project directory, 
+only that MIDlet will be built. If it is done in the root of the UI FuTe 
+MIDlets, then all of them will be built.
+
+The default action for Ant is "pack". It will compile and create the MIDlet 
+packages. Compilation is done by using either one of these commands:
+
+    ant
+    ant pack
+
+If you want to clean the build directories, it can be done with command:
+
+    ant clean
+
+The compiled classes and MIDlets are stored in a directory named "build" to the 
+MIDlet suite project directory.
--- a/jrt_plat/java_env_info_api/java_env_info_api.metaxml	Tue May 11 16:07:20 2010 +0300
+++ b/jrt_plat/java_env_info_api/java_env_info_api.metaxml	Tue May 25 12:34:19 2010 +0300
@@ -5,7 +5,7 @@
   <type>c++</type>
   <collection>javacommons</collection>
   <libs>
-    <lib name="javaenv.lib" />  
+    <lib name="javaenvinfo.lib" />  
   </libs>
   <release category="platform" sinceversion="3.2"/>
   <attributes>
--- a/rom/java_2_1.iby	Tue May 11 16:07:20 2010 +0300
+++ b/rom/java_2_1.iby	Tue May 25 12:34:19 2010 +0300
@@ -241,7 +241,7 @@
 
 
 // Java environment info
-file=ABI_DIR\BUILD_DIR\javaenv.dll                                          SHARED_LIB_DIR\javaenv.dll
+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
@@ -355,4 +355,7 @@
 data=ZRESOURCE\java\installerOdcList                                        JAVA_RES_IMG\installerodclist
 data=ZRESOURCE\java\tckRunnerOdcList                                        JAVA_RES_IMG\tckrunnerodclist
 
+// trust roots list
+data=ZRESOURCE\java\security\trustroots\midprootslist                       JAVA_RES_IMG\security\trustroots\midprootslist
+
 #endif
--- a/rom/java_3_1.iby	Tue May 11 16:07:20 2010 +0300
+++ b/rom/java_3_1.iby	Tue May 25 12:34:19 2010 +0300
@@ -142,27 +142,30 @@
 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
+/*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
+/*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 UI API
 file=ABI_DIR\BUILD_DIR\javanokiaui.dll                                     SHARED_LIB_DIR\javanokiaui.dll
 data=JAVA_VM_RES_BLD\javanokiaui.odc                                       JAVA_VM_RES_IMG\javanokiaui.odc
 
 // Nokia Sound API
-file=ABI_DIR\BUILD_DIR\javanokiasound.dll                                   SHARED_LIB_DIR\javanokiasound.dll
+/*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
+/*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
@@ -240,7 +243,7 @@
 
 
 // Java environment info
-file=ABI_DIR\BUILD_DIR\javaenv.dll                                          SHARED_LIB_DIR\javaenv.dll
+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
@@ -354,4 +357,7 @@
 data=ZRESOURCE\java\installerOdcList                                        JAVA_RES_IMG\installerodclist
 data=ZRESOURCE\java\tckRunnerOdcList                                        JAVA_RES_IMG\tckrunnerodclist
 
+// trust roots list
+data=ZRESOURCE\java\security\trustroots\midprootslist                       JAVA_RES_IMG\security\trustroots\midprootslist
+
 #endif
--- a/rom/javalocalization_3_1.iby	Tue May 11 16:07:20 2010 +0300
+++ b/rom/javalocalization_3_1.iby	Tue May 25 12:34:19 2010 +0300
@@ -19,9 +19,6 @@
 #define __JAVALOCALIZATION_IBY__
 
 data=DATAZ_\RESOURCE_FILES_DIR\java\javausermessages.rsc            RESOURCE_FILES_DIR\java\javausermessages.rsc
-data=DATAZ_\RESOURCE_FILES_DIR\java\pimcm.rsc                       RESOURCE_FILES_DIR\java\pimcm.rsc
-data=DATAZ_\RESOURCE_FILES_DIR\java\pimevent.rsc                    RESOURCE_FILES_DIR\java\pimevent.rsc
-data=DATAZ_\RESOURCE_FILES_DIR\java\pimtodo.rsc                     RESOURCE_FILES_DIR\java\pimtodo.rsc
 data=DATAZ_\QT_TRANSLATIONS_DIR\javaruntimeapplicationsettings.qm   QT_TRANSLATIONS_DIR\javaruntimeapplicationsettings.qm 
 
 #endif // __JAVALOCALIZATION_IBY__